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
39,600
TinyDecoder::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* z) { // torch.tanh(x / 3) * 3 auto h = ggml_scale(ctx, z, 1.0f / 3.0f); h = ggml_tanh_inplace(ctx, h); h = ggml_scale(ctx, h, 3.0f); // conv(4, 64) h = ggml_nn_conv_2d(ctx, h, conv_input_w, conv_input_b, 1, 1, 1, 1); // nn.ReLU() h = ggml_relu_inplace(ctx, h); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = input_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_1_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = middle_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_2_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = output_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_3_w, NULL, 1, 1, 1, 1); // Block(64, 64) h = final_block.forward(ctx, h); // conv(64, 3) h = ggml_nn_conv_2d(ctx, h, conv_final_w, conv_final_b, 1, 1, 1, 1); return h; }
O0
cpp
TinyDecoder::forward(ggml_context*, ggml_tensor*): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rdi movq 0x40(%rsp), %rsi movss 0xf7fe5(%rip), %xmm0 # 0x17f214 callq 0x121b40 movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x120850 movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movss 0xf5dbd(%rip), %xmm0 # 0x17d01c callq 0x121b40 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x120910 movq %rax, 0x38(%rsp) movl $0x0, 0x34(%rsp) movq 0x20(%rsp), %rcx movl 0x34(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x87315 movq 0x20(%rsp), %rdi addq $0x20, %rdi movslq 0x34(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x87820 movq %rax, 0x38(%rsp) movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x872d1 movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movl $0x2, %edx callq 0x126450 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0xe0(%rax), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x38(%rsp) movl $0x0, 0x30(%rsp) movq 0x20(%rsp), %rcx movl 0x30(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x873cc movq 0x20(%rsp), %rdi addq $0xe8, %rdi movslq 0x30(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x87820 movq %rax, 0x38(%rsp) movl 0x30(%rsp), %eax addl $0x1, %eax movl %eax, 0x30(%rsp) jmp 0x87385 movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movl $0x2, %edx callq 0x126450 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x1a8(%rax), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x38(%rsp) movl $0x0, 0x2c(%rsp) movq 0x20(%rsp), %rcx movl 0x2c(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x87483 movq 0x20(%rsp), %rdi addq $0x1b0, %rdi # imm = 0x1B0 movslq 0x2c(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x87820 movq %rax, 0x38(%rsp) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x8743c movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movl $0x2, %edx callq 0x126450 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x270(%rax), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq 0x20(%rsp), %rdi movq %rax, 0x38(%rsp) addq $0x278, %rdi # imm = 0x278 movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x87820 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x48(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x2b8(%rax), %rdx movq 0x2c0(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax addq $0x58, %rsp retq nopw (%rax,%rax)
_ZN11TinyDecoder7forwardEP12ggml_contextP11ggml_tensor: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov rax, [rsp+58h+var_8] mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_18] movss xmm0, cs:dword_17F214 call ggml_scale mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] call ggml_tanh_inplace mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] movss xmm0, cs:dword_17D01C call ggml_scale mov rcx, rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_20], rcx mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov rdx, [rax+10h] mov rcx, [rax+18h] mov r9d, 1 mov r8d, r9d mov [rsp+58h+var_58], 1 mov [rsp+58h+var_50], 1 mov [rsp+58h+var_48], 1 mov [rsp+58h+var_40], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] call ggml_relu_inplace mov [rsp+58h+var_20], rax mov [rsp+58h+var_24], 0 loc_872D1: mov rcx, [rsp+58h+var_38] mov eax, [rsp+58h+var_24] cmp eax, [rcx+0Ch] jge short loc_87315 mov rdi, [rsp+58h+var_38] add rdi, 20h ; ' ' movsxd rax, [rsp+58h+var_24] shl rax, 6 add rdi, rax mov rsi, [rsp+58h+var_10] mov rdx, [rsp+58h+var_20] call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov [rsp+58h+var_20], rax mov eax, [rsp+58h+var_24] add eax, 1 mov [rsp+58h+var_24], eax jmp short loc_872D1 loc_87315: mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov edx, 2 call ggml_upscale mov rcx, rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_20], rcx mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov rdx, [rax+0E0h] xor eax, eax mov ecx, eax mov r9d, 1 mov r8d, r9d mov [rsp+58h+var_58], 1 mov [rsp+58h+var_50], 1 mov [rsp+58h+var_48], 1 mov [rsp+58h+var_40], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+58h+var_20], rax mov [rsp+58h+var_28], 0 loc_87385: mov rcx, [rsp+58h+var_38] mov eax, [rsp+58h+var_28] cmp eax, [rcx+0Ch] jge short loc_873CC mov rdi, [rsp+58h+var_38] add rdi, 0E8h movsxd rax, [rsp+58h+var_28] shl rax, 6 add rdi, rax mov rsi, [rsp+58h+var_10] mov rdx, [rsp+58h+var_20] call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov [rsp+58h+var_20], rax mov eax, [rsp+58h+var_28] add eax, 1 mov [rsp+58h+var_28], eax jmp short loc_87385 loc_873CC: mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov edx, 2 call ggml_upscale mov rcx, rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_20], rcx mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov rdx, [rax+1A8h] xor eax, eax mov ecx, eax mov r9d, 1 mov r8d, r9d mov [rsp+58h+var_58], 1 mov [rsp+58h+var_50], 1 mov [rsp+58h+var_48], 1 mov [rsp+58h+var_40], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+58h+var_20], rax mov [rsp+58h+var_2C], 0 loc_8743C: mov rcx, [rsp+58h+var_38] mov eax, [rsp+58h+var_2C] cmp eax, [rcx+0Ch] jge short loc_87483 mov rdi, [rsp+58h+var_38] add rdi, 1B0h movsxd rax, [rsp+58h+var_2C] shl rax, 6 add rdi, rax mov rsi, [rsp+58h+var_10] mov rdx, [rsp+58h+var_20] call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov [rsp+58h+var_20], rax mov eax, [rsp+58h+var_2C] add eax, 1 mov [rsp+58h+var_2C], eax jmp short loc_8743C loc_87483: mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov edx, 2 call ggml_upscale mov rcx, rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_20], rcx mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov rdx, [rax+270h] xor eax, eax mov ecx, eax mov r9d, 1 mov r8d, r9d mov [rsp+58h+var_58], 1 mov [rsp+58h+var_50], 1 mov [rsp+58h+var_48], 1 mov [rsp+58h+var_40], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov rdi, [rsp+58h+var_38] mov [rsp+58h+var_20], rax add rdi, 278h mov rsi, [rsp+58h+var_10] mov rdx, [rsp+58h+var_20] call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov rcx, rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_20], rcx mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_20] mov rdx, [rax+2B8h] mov rcx, [rax+2C0h] mov r9d, 1 mov r8d, r9d mov [rsp+58h+var_58], 1 mov [rsp+58h+var_50], 1 mov [rsp+58h+var_48], 1 mov [rsp+58h+var_40], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+58h+var_20], rax mov rax, [rsp+58h+var_20] add rsp, 58h retn
long long TinyDecoder::forward(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax int v5; // eax long long v6; // rax int v7; // eax int v8; // eax int v9; // eax long long v10; // rax int v11; // eax int k; // [rsp+2Ch] [rbp-2Ch] int j; // [rsp+30h] [rbp-28h] int i; // [rsp+34h] [rbp-24h] long long v16; // [rsp+38h] [rbp-20h] long long v17; // [rsp+38h] [rbp-20h] long long v18; // [rsp+38h] [rbp-20h] v3 = ggml_scale(a2, a3, 0.33333334); v4 = ggml_tanh_inplace(a2, v3); v5 = ggml_scale(a2, v4, 3.0); v6 = ggml_nn_conv_2d(a2, v5, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24), 1, 1, 1, 1, 1, 1); v16 = ggml_relu_inplace(a2, v6); for ( i = 0; i < *(_DWORD *)(a1 + 12); ++i ) v16 = TAEBlock::forward(((long long)i << 6) + a1 + 32, a2, v16); v7 = ggml_upscale(a2, v16, 2LL); v17 = ggml_nn_conv_2d(a2, v7, *(_QWORD *)(a1 + 224), 0LL, 1, 1, 1, 1, 1, 1); for ( j = 0; j < *(_DWORD *)(a1 + 12); ++j ) v17 = TAEBlock::forward(((long long)j << 6) + a1 + 232, a2, v17); v8 = ggml_upscale(a2, v17, 2LL); v18 = ggml_nn_conv_2d(a2, v8, *(_QWORD *)(a1 + 424), 0LL, 1, 1, 1, 1, 1, 1); for ( k = 0; k < *(_DWORD *)(a1 + 12); ++k ) v18 = TAEBlock::forward(((long long)k << 6) + a1 + 432, a2, v18); v9 = ggml_upscale(a2, v18, 2LL); v10 = ggml_nn_conv_2d(a2, v9, *(_QWORD *)(a1 + 624), 0LL, 1, 1, 1, 1, 1, 1); v11 = TAEBlock::forward(a1 + 632, a2, v10); return ggml_nn_conv_2d(a2, v11, *(_QWORD *)(a1 + 696), *(_QWORD *)(a1 + 704), 1, 1, 1, 1, 1, 1); }
forward: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [0x0027f214] CALL 0x00221b40 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00220850 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOVSS XMM0,dword ptr [0x0027d01c] CALL 0x00221b40 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00220910 MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x34],0x0 LAB_001872d1: MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RCX + 0xc] JGE 0x00187315 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 MOVSXD RAX,dword ptr [RSP + 0x34] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00187820 MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x001872d1 LAB_00187315: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV EDX,0x2 CALL 0x00226450 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0xe0] XOR EAX,EAX MOV ECX,EAX MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x30],0x0 LAB_00187385: MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0xc] JGE 0x001873cc MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0xe8 MOVSXD RAX,dword ptr [RSP + 0x30] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00187820 MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x30] ADD EAX,0x1 MOV dword ptr [RSP + 0x30],EAX JMP 0x00187385 LAB_001873cc: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV EDX,0x2 CALL 0x00226450 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0x1a8] XOR EAX,EAX MOV ECX,EAX MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_0018743c: MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0xc] JGE 0x00187483 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x1b0 MOVSXD RAX,dword ptr [RSP + 0x2c] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00187820 MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x0018743c LAB_00187483: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV EDX,0x2 CALL 0x00226450 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0x270] XOR EAX,EAX MOV ECX,EAX MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RAX ADD RDI,0x278 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00187820 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0x2b8] MOV RCX,qword ptr [RAX + 0x2c0] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x58 RET
/* TinyDecoder::forward(ggml_context*, ggml_tensor*) */ int8 __thiscall TinyDecoder::forward(TinyDecoder *this,ggml_context *param_1,ggml_tensor *param_2) { int8 uVar1; ggml_tensor *pgVar2; int local_2c; int local_28; int local_24; ggml_tensor *local_20; uVar1 = ggml_scale(DAT_0027f214,param_1,param_2); uVar1 = ggml_tanh_inplace(param_1,uVar1); pgVar2 = (ggml_tensor *)ggml_scale(DAT_0027d01c,param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x10), *(ggml_tensor **)(this + 0x18),1,1,1,1,1,1); local_20 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); for (local_24 = 0; local_24 < *(int *)(this + 0xc); local_24 = local_24 + 1) { local_20 = (ggml_tensor *) TAEBlock::forward((TAEBlock *)(this + (long)local_24 * 0x40 + 0x20),param_1,local_20) ; } pgVar2 = (ggml_tensor *)ggml_upscale(param_1,local_20,2); local_20 = (ggml_tensor *) ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0xe0),(ggml_tensor *)0x0,1,1,1, 1,1,1); for (local_28 = 0; local_28 < *(int *)(this + 0xc); local_28 = local_28 + 1) { local_20 = (ggml_tensor *) TAEBlock::forward((TAEBlock *)(this + (long)local_28 * 0x40 + 0xe8),param_1,local_20) ; } pgVar2 = (ggml_tensor *)ggml_upscale(param_1,local_20,2); local_20 = (ggml_tensor *) ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x1a8),(ggml_tensor *)0x0,1,1,1 ,1,1,1); for (local_2c = 0; local_2c < *(int *)(this + 0xc); local_2c = local_2c + 1) { local_20 = (ggml_tensor *) TAEBlock::forward((TAEBlock *)(this + (long)local_2c * 0x40 + 0x1b0),param_1,local_20 ); } pgVar2 = (ggml_tensor *)ggml_upscale(param_1,local_20,2); pgVar2 = (ggml_tensor *) ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x270),(ggml_tensor *)0x0,1,1,1,1 ,1,1); pgVar2 = (ggml_tensor *)TAEBlock::forward((TAEBlock *)(this + 0x278),param_1,pgVar2); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x2b8), *(ggml_tensor **)(this + 0x2c0),1,1,1,1,1,1); return uVar1; }
39,601
TinyDecoder::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* z) { // torch.tanh(x / 3) * 3 auto h = ggml_scale(ctx, z, 1.0f / 3.0f); h = ggml_tanh_inplace(ctx, h); h = ggml_scale(ctx, h, 3.0f); // conv(4, 64) h = ggml_nn_conv_2d(ctx, h, conv_input_w, conv_input_b, 1, 1, 1, 1); // nn.ReLU() h = ggml_relu_inplace(ctx, h); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = input_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_1_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = middle_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_2_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = output_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_3_w, NULL, 1, 1, 1, 1); // Block(64, 64) h = final_block.forward(ctx, h); // conv(64, 3) h = ggml_nn_conv_2d(ctx, h, conv_final_w, conv_final_b, 1, 1, 1, 1); return h; }
O2
cpp
TinyDecoder::forward(ggml_context*, ggml_tensor*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movss 0x621a1(%rip), %xmm0 # 0x9985c movq %rsi, %rdi movq %rdx, %rsi callq 0x6b500 movq %rbx, %rdi movq %rax, %rsi callq 0x6aa8a movss 0x5f93b(%rip), %xmm0 # 0x97014 movq %rbx, %rdi movq %rax, %rsi callq 0x6b500 movq 0x10(%r14), %rdx movq 0x18(%r14), %rcx pushq $0x1 popq %r15 movq %rbx, %rdi movq %rax, %rsi movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 callq 0x1ce99 addq $0x10, %rsp movq %rbx, %rdi movq %rax, %rsi callq 0x6aaaa leaq 0x20(%r14), %r12 xorl %r13d, %r13d movslq 0xc(%r14), %rcx cmpq %rcx, %r13 jge 0x3773b movq %r12, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x379d4 incq %r13 addq $0x40, %r12 jmp 0x3771b pushq $0x2 popq %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x6df2e movq 0xe0(%r14), %rsi subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl %r15d, %ecx movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x6d9f6 addq $0x20, %rsp leaq 0xe8(%r14), %r12 xorl %r13d, %r13d movslq 0xc(%r14), %rcx cmpq %rcx, %r13 jge 0x3779c movq %r12, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x379d4 incq %r13 addq $0x40, %r12 jmp 0x3777c pushq $0x2 popq %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x6df2e movq 0x1a8(%r14), %rsi subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl %r15d, %ecx movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x6d9f6 addq $0x20, %rsp leaq 0x1b0(%r14), %r12 xorl %r13d, %r13d movslq 0xc(%r14), %rcx cmpq %rcx, %r13 jge 0x377fd movq %r12, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x379d4 incq %r13 addq $0x40, %r12 jmp 0x377dd pushq $0x2 popq %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x6df2e movq 0x270(%r14), %rsi subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl %r15d, %ecx movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x6d9f6 addq $0x20, %rsp leaq 0x278(%r14), %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x379d4 movq 0x2b8(%r14), %rdx movq 0x2c0(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 callq 0x1ce99 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN11TinyDecoder7forwardEP12ggml_contextP11ggml_tensor: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi movss xmm0, cs:dword_9985C mov rdi, rsi mov rsi, rdx call ggml_scale mov rdi, rbx mov rsi, rax call ggml_tanh_inplace movss xmm0, cs:dword_97014 mov rdi, rbx mov rsi, rax call ggml_scale mov rdx, [r14+10h] mov rcx, [r14+18h] push 1 pop r15 mov rdi, rbx mov rsi, rax mov r8d, r15d mov r9d, r15d push r15 push r15 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) add rsp, 10h mov rdi, rbx mov rsi, rax call ggml_relu_inplace lea r12, [r14+20h] xor r13d, r13d loc_3771B: movsxd rcx, dword ptr [r14+0Ch] cmp r13, rcx jge short loc_3773B mov rdi, r12 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r13 add r12, 40h ; '@' jmp short loc_3771B loc_3773B: push 2 pop rdx mov rdi, rbx mov rsi, rax call ggml_upscale mov rsi, [r14+0E0h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, r15d mov r8d, r15d mov r9d, r15d push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h lea r12, [r14+0E8h] xor r13d, r13d loc_3777C: movsxd rcx, dword ptr [r14+0Ch] cmp r13, rcx jge short loc_3779C mov rdi, r12 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r13 add r12, 40h ; '@' jmp short loc_3777C loc_3779C: push 2 pop rdx mov rdi, rbx mov rsi, rax call ggml_upscale mov rsi, [r14+1A8h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, r15d mov r8d, r15d mov r9d, r15d push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h lea r12, [r14+1B0h] xor r13d, r13d loc_377DD: movsxd rcx, dword ptr [r14+0Ch] cmp r13, rcx jge short loc_377FD mov rdi, r12 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r13 add r12, 40h ; '@' jmp short loc_377DD loc_377FD: push 2 pop rdx mov rdi, rbx mov rsi, rax call ggml_upscale mov rsi, [r14+270h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, r15d mov r8d, r15d mov r9d, r15d push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h lea rdi, [r14+278h] mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov rdx, [r14+2B8h] mov rcx, [r14+2C0h] mov rdi, rbx mov rsi, rax mov r8d, r15d mov r9d, r15d push r15 push r15 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long TinyDecoder::forward(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax int v5; // eax long long v6; // rax long long v7; // rax long long v8; // r12 long long i; // r13 int v10; // eax long long v11; // rax long long v12; // r12 long long j; // r13 int v14; // eax long long v15; // rax long long v16; // r12 long long k; // r13 int v18; // eax long long v19; // rax int v20; // eax v3 = ggml_scale(a2, a3, 0.33333334); v4 = ggml_tanh_inplace(a2, v3); v5 = ggml_scale(a2, v4, 3.0); v6 = ggml_nn_conv_2d(a2, v5, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24), 1, 1, 1, 1); v7 = ggml_relu_inplace(a2, v6); v8 = a1 + 32; for ( i = 0LL; i < *(int *)(a1 + 12); ++i ) { v7 = TAEBlock::forward(v8, a2, v7); v8 += 64LL; } v10 = ggml_upscale(a2, v7, 2LL); v11 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 224), v10, 1, 1, 1, 1, 1, 1); v12 = a1 + 232; for ( j = 0LL; j < *(int *)(a1 + 12); ++j ) { v11 = TAEBlock::forward(v12, a2, v11); v12 += 64LL; } v14 = ggml_upscale(a2, v11, 2LL); v15 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 424), v14, 1, 1, 1, 1, 1, 1); v16 = a1 + 432; for ( k = 0LL; k < *(int *)(a1 + 12); ++k ) { v15 = TAEBlock::forward(v16, a2, v15); v16 += 64LL; } v18 = ggml_upscale(a2, v15, 2LL); v19 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 624), v18, 1, 1, 1, 1, 1, 1); v20 = TAEBlock::forward(a1 + 632, a2, v19); return ggml_nn_conv_2d(a2, v20, *(_QWORD *)(a1 + 696), *(_QWORD *)(a1 + 704), 1, 1, 1, 1); }
forward: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOVSS XMM0,dword ptr [0x0019985c] MOV RDI,RSI MOV RSI,RDX CALL 0x0016b500 MOV RDI,RBX MOV RSI,RAX CALL 0x0016aa8a MOVSS XMM0,dword ptr [0x00197014] MOV RDI,RBX MOV RSI,RAX CALL 0x0016b500 MOV RDX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x18] PUSH 0x1 POP R15 MOV RDI,RBX MOV RSI,RAX MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 CALL 0x0011ce99 ADD RSP,0x10 MOV RDI,RBX MOV RSI,RAX CALL 0x0016aaaa LEA R12,[R14 + 0x20] XOR R13D,R13D LAB_0013771b: MOVSXD RCX,dword ptr [R14 + 0xc] CMP R13,RCX JGE 0x0013773b MOV RDI,R12 MOV RSI,RBX MOV RDX,RAX CALL 0x001379d4 INC R13 ADD R12,0x40 JMP 0x0013771b LAB_0013773b: PUSH 0x2 POP RDX MOV RDI,RBX MOV RSI,RAX CALL 0x0016df2e MOV RSI,qword ptr [R14 + 0xe0] SUB RSP,0x8 MOV RDI,RBX MOV RDX,RAX MOV ECX,R15D MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 PUSH R15 CALL 0x0016d9f6 ADD RSP,0x20 LEA R12,[R14 + 0xe8] XOR R13D,R13D LAB_0013777c: MOVSXD RCX,dword ptr [R14 + 0xc] CMP R13,RCX JGE 0x0013779c MOV RDI,R12 MOV RSI,RBX MOV RDX,RAX CALL 0x001379d4 INC R13 ADD R12,0x40 JMP 0x0013777c LAB_0013779c: PUSH 0x2 POP RDX MOV RDI,RBX MOV RSI,RAX CALL 0x0016df2e MOV RSI,qword ptr [R14 + 0x1a8] SUB RSP,0x8 MOV RDI,RBX MOV RDX,RAX MOV ECX,R15D MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 PUSH R15 CALL 0x0016d9f6 ADD RSP,0x20 LEA R12,[R14 + 0x1b0] XOR R13D,R13D LAB_001377dd: MOVSXD RCX,dword ptr [R14 + 0xc] CMP R13,RCX JGE 0x001377fd MOV RDI,R12 MOV RSI,RBX MOV RDX,RAX CALL 0x001379d4 INC R13 ADD R12,0x40 JMP 0x001377dd LAB_001377fd: PUSH 0x2 POP RDX MOV RDI,RBX MOV RSI,RAX CALL 0x0016df2e MOV RSI,qword ptr [R14 + 0x270] SUB RSP,0x8 MOV RDI,RBX MOV RDX,RAX MOV ECX,R15D MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 PUSH R15 CALL 0x0016d9f6 ADD RSP,0x20 LEA RDI,[R14 + 0x278] MOV RSI,RBX MOV RDX,RAX CALL 0x001379d4 MOV RDX,qword ptr [R14 + 0x2b8] MOV RCX,qword ptr [R14 + 0x2c0] MOV RDI,RBX MOV RSI,RAX MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 CALL 0x0011ce99 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* TinyDecoder::forward(ggml_context*, ggml_tensor*) */ void __thiscall TinyDecoder::forward(TinyDecoder *this,ggml_context *param_1,ggml_tensor *param_2) { int8 uVar1; ggml_tensor *pgVar2; int8 unaff_RBX; int8 unaff_R12; TinyDecoder *pTVar3; long lVar4; int iVar5; int iVar6; uVar1 = ggml_scale(DAT_0019985c,param_1,param_2); uVar1 = ggml_tanh_inplace(param_1,uVar1); pgVar2 = (ggml_tensor *)ggml_scale(DAT_00197014,param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x10), *(ggml_tensor **)(this + 0x18),1,1,1,1,(int)unaff_RBX,(int)unaff_R12); pgVar2 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); pTVar3 = this + 0x20; for (lVar4 = 0; lVar4 < *(int *)(this + 0xc); lVar4 = lVar4 + 1) { pgVar2 = (ggml_tensor *)TAEBlock::forward((TAEBlock *)pTVar3,param_1,pgVar2); pTVar3 = (TinyDecoder *)((TAEBlock *)pTVar3 + 0x40); } uVar1 = ggml_upscale(param_1,pgVar2,2); pgVar2 = (ggml_tensor *)ggml_conv_2d(param_1,*(int8 *)(this + 0xe0),uVar1,1,1,1,1,1,1); pTVar3 = this + 0xe8; for (lVar4 = 0; lVar4 < *(int *)(this + 0xc); lVar4 = lVar4 + 1) { pgVar2 = (ggml_tensor *)TAEBlock::forward((TAEBlock *)pTVar3,param_1,pgVar2); pTVar3 = (TinyDecoder *)((TAEBlock *)pTVar3 + 0x40); } uVar1 = ggml_upscale(param_1,pgVar2,2); pgVar2 = (ggml_tensor *)ggml_conv_2d(param_1,*(int8 *)(this + 0x1a8),uVar1,1,1,1,1,1,1); pTVar3 = this + 0x1b0; for (lVar4 = 0; iVar6 = (int)unaff_R12, iVar5 = (int)unaff_RBX, lVar4 < *(int *)(this + 0xc); lVar4 = lVar4 + 1) { pgVar2 = (ggml_tensor *)TAEBlock::forward((TAEBlock *)pTVar3,param_1,pgVar2); pTVar3 = (TinyDecoder *)((TAEBlock *)pTVar3 + 0x40); } uVar1 = ggml_upscale(param_1,pgVar2,2); pgVar2 = (ggml_tensor *)ggml_conv_2d(param_1,*(int8 *)(this + 0x270),uVar1,1,1,1,1,1,1); pgVar2 = (ggml_tensor *)TAEBlock::forward((TAEBlock *)(this + 0x278),param_1,pgVar2); ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x2b8),*(ggml_tensor **)(this + 0x2c0),1,1 ,1,1,iVar5,iVar6); return; }
39,602
TinyDecoder::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* z) { // torch.tanh(x / 3) * 3 auto h = ggml_scale(ctx, z, 1.0f / 3.0f); h = ggml_tanh_inplace(ctx, h); h = ggml_scale(ctx, h, 3.0f); // conv(4, 64) h = ggml_nn_conv_2d(ctx, h, conv_input_w, conv_input_b, 1, 1, 1, 1); // nn.ReLU() h = ggml_relu_inplace(ctx, h); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = input_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_1_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = middle_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_2_w, NULL, 1, 1, 1, 1); // Block(64, 64), Block(64, 64), Block(64, 64) for (int i = 0; i < num_blocks; i++) { h = output_blocks[i].forward(ctx, h); } // nn.Upsample(scale_factor=2) h = ggml_upscale(ctx, h, 2); // conv(64, 64, bias=False) h = ggml_nn_conv_2d(ctx, h, conv_3_w, NULL, 1, 1, 1, 1); // Block(64, 64) h = final_block.forward(ctx, h); // conv(64, 3) h = ggml_nn_conv_2d(ctx, h, conv_final_w, conv_final_b, 1, 1, 1, 1); return h; }
O3
cpp
TinyDecoder::forward(ggml_context*, ggml_tensor*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movss 0x67f91(%rip), %xmm0 # 0xbc92c movq %rsi, %rdi movq %rdx, %rsi callq 0x9159e movq %rbx, %rdi movq %rax, %rsi callq 0x90b61 movss 0x6565b(%rip), %xmm0 # 0xba014 movq %rbx, %rdi movq %rax, %rsi callq 0x9159e movq 0x10(%r14), %rsi movq 0x18(%r14), %r15 subq $0x8, %rsp movl $0x1, %r10d movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r10 pushq %r10 pushq %r10 callq 0x932c7 addq $0x20, %rsp movq %rax, %r12 testq %r15, %r15 je 0x54a34 movq 0x10(%r15), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %rbx, %rdi movq %r15, %rsi callq 0x91eef movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x8f9f3 movq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x90bcf cmpl $0x0, 0xc(%r14) jle 0x54a6b leaq 0x20(%r14), %r15 xorl %r12d, %r12d movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x54e62 incq %r12 movslq 0xc(%r14), %rcx addq $0x40, %r15 cmpq %rcx, %r12 jl 0x54a4d movq %rbx, %rdi movq %rax, %rsi movl $0x2, %edx callq 0x93722 movq 0xe0(%r14), %rsi subq $0x8, %rsp movl $0x1, %r12d movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r12 pushq %r12 pushq %r12 callq 0x932c7 addq $0x20, %rsp cmpl $0x0, 0xc(%r14) jle 0x54ae1 leaq 0xe8(%r14), %r15 xorl %r13d, %r13d movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x54e62 incq %r13 movslq 0xc(%r14), %rcx addq $0x40, %r15 cmpq %rcx, %r13 jl 0x54ac3 movq %rbx, %rdi movq %rax, %rsi movl $0x2, %edx callq 0x93722 movq 0x1a8(%r14), %rsi subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r12 pushq %r12 pushq %r12 callq 0x932c7 addq $0x20, %rsp cmpl $0x0, 0xc(%r14) jle 0x54b51 leaq 0x1b0(%r14), %r15 xorl %r12d, %r12d movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x54e62 incq %r12 movslq 0xc(%r14), %rcx addq $0x40, %r15 cmpq %rcx, %r12 jl 0x54b33 movq %rbx, %rdi movq %rax, %rsi movl $0x2, %edx callq 0x93722 movq 0x270(%r14), %rsi subq $0x8, %rsp movl $0x1, %r15d movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x932c7 addq $0x20, %rsp leaq 0x278(%r14), %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x54e62 movq 0x2b8(%r14), %rsi movq 0x2c0(%r14), %r14 subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x932c7 addq $0x20, %rsp movq %rax, %r15 testq %r14, %r14 je 0x54c20 movq 0x10(%r14), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %rbx, %rdi movq %r14, %rsi callq 0x91eef movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x8f9f3 movq %r15, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN11TinyDecoder7forwardEP12ggml_contextP11ggml_tensor: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi movss xmm0, cs:dword_BC92C mov rdi, rsi mov rsi, rdx call ggml_scale mov rdi, rbx mov rsi, rax call ggml_tanh_inplace movss xmm0, cs:dword_BA014 mov rdi, rbx mov rsi, rax call ggml_scale mov rsi, [r14+10h] mov r15, [r14+18h] sub rsp, 8 mov r10d, 1 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r10 push r10 push r10 call ggml_conv_2d add rsp, 20h mov r12, rax test r15, r15 jz short loc_54A34 mov r8, [r15+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, rbx mov rsi, r15 call ggml_reshape_4d mov rdi, rbx mov rsi, r12 mov rdx, rax call ggml_add mov r12, rax loc_54A34: mov rdi, rbx mov rsi, r12 call ggml_relu_inplace cmp dword ptr [r14+0Ch], 0 jle short loc_54A6B lea r15, [r14+20h] xor r12d, r12d loc_54A4D: mov rdi, r15 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r12 movsxd rcx, dword ptr [r14+0Ch] add r15, 40h ; '@' cmp r12, rcx jl short loc_54A4D loc_54A6B: mov rdi, rbx mov rsi, rax mov edx, 2 call ggml_upscale mov rsi, [r14+0E0h] sub rsp, 8 mov r12d, 1 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r12 push r12 push r12 call ggml_conv_2d add rsp, 20h cmp dword ptr [r14+0Ch], 0 jle short loc_54AE1 lea r15, [r14+0E8h] xor r13d, r13d loc_54AC3: mov rdi, r15 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r13 movsxd rcx, dword ptr [r14+0Ch] add r15, 40h ; '@' cmp r13, rcx jl short loc_54AC3 loc_54AE1: mov rdi, rbx mov rsi, rax mov edx, 2 call ggml_upscale mov rsi, [r14+1A8h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r12 push r12 push r12 call ggml_conv_2d add rsp, 20h cmp dword ptr [r14+0Ch], 0 jle short loc_54B51 lea r15, [r14+1B0h] xor r12d, r12d loc_54B33: mov rdi, r15 mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) inc r12 movsxd rcx, dword ptr [r14+0Ch] add r15, 40h ; '@' cmp r12, rcx jl short loc_54B33 loc_54B51: mov rdi, rbx mov rsi, rax mov edx, 2 call ggml_upscale mov rsi, [r14+270h] sub rsp, 8 mov r15d, 1 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h lea rdi, [r14+278h] mov rsi, rbx mov rdx, rax call _ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor; TAEBlock::forward(ggml_context *,ggml_tensor *) mov rsi, [r14+2B8h] mov r14, [r14+2C0h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h mov r15, rax test r14, r14 jz short loc_54C20 mov r8, [r14+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, rbx mov rsi, r14 call ggml_reshape_4d mov rdi, rbx mov rsi, r15 mov rdx, rax pop rbx pop r12 pop r13 pop r14 pop r15 jmp ggml_add loc_54C20: mov rax, r15 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long TinyDecoder::forward(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax int v5; // eax long long v6; // r15 long long v7; // r12 long long v8; // rax long long v9; // rax long long v10; // r15 long long v11; // r12 int v12; // eax long long v13; // rax long long v14; // r15 long long v15; // r13 int v16; // eax long long v17; // rax long long v18; // r15 long long v19; // r12 int v20; // eax long long v21; // rax int v22; // eax long long v23; // r14 long long result; // rax long long v25; // r15 long long v26; // rax v3 = ggml_scale(a2, a3, 0.33333334); v4 = ggml_tanh_inplace(a2, v3); v5 = ggml_scale(a2, v4, 3.0); v6 = *(_QWORD *)(a1 + 24); v7 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 16), v5, 1, 1, 1, 1, 1, 1); if ( v6 ) { v8 = ggml_reshape_4d(a2, v6, 1LL, 1LL, *(_QWORD *)(v6 + 16), 1LL); v7 = ggml_add(a2, v7, v8); } v9 = ggml_relu_inplace(a2, v7); if ( *(int *)(a1 + 12) > 0 ) { v10 = a1 + 32; v11 = 0LL; do { v9 = TAEBlock::forward(v10, a2, v9); ++v11; v10 += 64LL; } while ( v11 < *(int *)(a1 + 12) ); } v12 = ggml_upscale(a2, v9, 2LL); v13 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 224), v12, 1, 1, 1, 1, 1, 1); if ( *(int *)(a1 + 12) > 0 ) { v14 = a1 + 232; v15 = 0LL; do { v13 = TAEBlock::forward(v14, a2, v13); ++v15; v14 += 64LL; } while ( v15 < *(int *)(a1 + 12) ); } v16 = ggml_upscale(a2, v13, 2LL); v17 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 424), v16, 1, 1, 1, 1, 1, 1); if ( *(int *)(a1 + 12) > 0 ) { v18 = a1 + 432; v19 = 0LL; do { v17 = TAEBlock::forward(v18, a2, v17); ++v19; v18 += 64LL; } while ( v19 < *(int *)(a1 + 12) ); } v20 = ggml_upscale(a2, v17, 2LL); v21 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 624), v20, 1, 1, 1, 1, 1, 1); v22 = TAEBlock::forward(a1 + 632, a2, v21); v23 = *(_QWORD *)(a1 + 704); result = ggml_conv_2d(a2, *(_QWORD *)(a1 + 696), v22, 1, 1, 1, 1, 1, 1); v25 = result; if ( v23 ) { v26 = ggml_reshape_4d(a2, v23, 1LL, 1LL, *(_QWORD *)(v23 + 16), 1LL); return ggml_add(a2, v25, v26); } return result; }
39,603
translog_chaser_page_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_chaser_page_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { struct st_translog_buffer *buffer_to_flush; my_bool rc; DBUG_ENTER("translog_chaser_page_next"); DBUG_ASSERT(cursor->chaser); rc= translog_page_next(horizon, cursor, &buffer_to_flush); if (buffer_to_flush != NULL) { translog_buffer_lock(buffer_to_flush); translog_buffer_decrease_writers(buffer_to_flush); used_buffs_register_unlock(&cursor->buffs, buffer_to_flush); if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(rc); }
O0
c
translog_chaser_page_next: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x51b62 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x18(%rbp), %rdx callq 0x4f5b0 movb %al, -0x19(%rbp) cmpq $0x0, -0x18(%rbp) je 0x51bb7 movq -0x18(%rbp), %rdi callq 0x45cc0 movq -0x18(%rbp), %rdi callq 0x518c0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x51910 cmpb $0x0, -0x19(%rbp) jne 0x51bae movq -0x18(%rbp), %rdi callq 0x4bef0 movb %al, -0x19(%rbp) movq -0x18(%rbp), %rdi callq 0x45d00 jmp 0x51bb9 movb -0x19(%rbp), %al movb %al, -0x1a(%rbp) movb -0x1a(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
translog_chaser_page_next: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_51B62: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_18] call translog_page_next mov [rbp+var_19], al cmp [rbp+var_18], 0 jz short loc_51BB7 mov rdi, [rbp+var_18] call translog_buffer_lock mov rdi, [rbp+var_18] call translog_buffer_decrease_writers mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call used_buffs_register_unlock cmp [rbp+var_19], 0 jnz short loc_51BAE mov rdi, [rbp+var_18] call translog_buffer_flush mov [rbp+var_19], al loc_51BAE: mov rdi, [rbp+var_18] call translog_buffer_unlock loc_51BB7: jmp short $+2 loc_51BB9: mov al, [rbp+var_19] mov [rbp+var_1A], al mov al, [rbp+var_1A] add rsp, 20h pop rbp retn
char translog_chaser_page_next(long long *a1, long long a2) { char v3; // [rsp+7h] [rbp-19h] long long v4; // [rsp+8h] [rbp-18h] BYREF long long v5; // [rsp+10h] [rbp-10h] long long *v6; // [rsp+18h] [rbp-8h] v6 = a1; v5 = a2; v3 = translog_page_next(a1, a2, &v4); if ( v4 ) { translog_buffer_lock(v4); translog_buffer_decrease_writers(v4); used_buffs_register_unlock(v5); if ( !v3 ) v3 = translog_buffer_flush(v4); translog_buffer_unlock(v4); } return v3; }
translog_chaser_page_next: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00151b62 LAB_00151b62: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x18] CALL 0x0014f5b0 MOV byte ptr [RBP + -0x19],AL CMP qword ptr [RBP + -0x18],0x0 JZ 0x00151bb7 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145cc0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001518c0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00151910 CMP byte ptr [RBP + -0x19],0x0 JNZ 0x00151bae MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014bef0 MOV byte ptr [RBP + -0x19],AL LAB_00151bae: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145d00 LAB_00151bb7: JMP 0x00151bb9 LAB_00151bb9: MOV AL,byte ptr [RBP + -0x19] MOV byte ptr [RBP + -0x1a],AL MOV AL,byte ptr [RBP + -0x1a] ADD RSP,0x20 POP RBP RET
char translog_chaser_page_next(int8 param_1,int8 param_2) { char local_21; long local_20; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_1; local_21 = translog_page_next(param_1,param_2,&local_20); if (local_20 != 0) { translog_buffer_lock(local_20); translog_buffer_decrease_writers(local_20); used_buffs_register_unlock(local_18,local_20); if (local_21 == '\0') { local_21 = translog_buffer_flush(local_20); } translog_buffer_unlock(local_20); } return local_21; }
39,604
translog_chaser_page_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_chaser_page_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { struct st_translog_buffer *buffer_to_flush; my_bool rc; DBUG_ENTER("translog_chaser_page_next"); DBUG_ASSERT(cursor->chaser); rc= translog_page_next(horizon, cursor, &buffer_to_flush); if (buffer_to_flush != NULL) { translog_buffer_lock(buffer_to_flush); translog_buffer_decrease_writers(buffer_to_flush); used_buffs_register_unlock(&cursor->buffs, buffer_to_flush); if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(rc); }
O3
c
translog_chaser_page_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 leaq -0x20(%rbp), %rbx movq %rbx, %rdx callq 0x49bee movl %eax, %r15d movq (%rbx), %rbx testq %rbx, %rbx je 0x4a6b3 movq %rbx, %rdi callq 0x43733 movq %rbx, %rdi callq 0x4a47f incb 0x19(%r14) movb $0x1, %r14b testb %r15b, %r15b jne 0x4a696 movq %rbx, %rdi callq 0x47401 movl %eax, %r14d movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x4a6c4 addq $0x100090, %rbx # imm = 0x100090 movq %rbx, %rdi callq 0x2a1f0 jmp 0x4a6b6 movl %r15d, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x36434d(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0x4a6a2
translog_chaser_page_next: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi lea rbx, [rbp+var_20] mov rdx, rbx call translog_page_next mov r15d, eax mov rbx, [rbx] test rbx, rbx jz short loc_4A6B3 mov rdi, rbx call translog_buffer_lock mov rdi, rbx call translog_buffer_decrease_writers inc byte ptr [r14+19h] mov r14b, 1 test r15b, r15b jnz short loc_4A696 mov rdi, rbx call translog_buffer_flush mov r14d, eax loc_4A696: mov rdi, [rbx+1000D0h] test rdi, rdi jnz short loc_4A6C4 loc_4A6A2: add rbx, 100090h mov rdi, rbx call _pthread_mutex_unlock jmp short loc_4A6B6 loc_4A6B3: mov r14d, r15d loc_4A6B6: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_4A6C4: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4A6A2
long long translog_chaser_page_next(long long *a1, long long a2) { long long v2; // rax unsigned int v3; // r14d unsigned int v4; // eax char v5; // r15 long long v6; // rbx long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = a2; LOBYTE(v4) = translog_page_next(a1, a2, v8); v5 = v4; v6 = v8[0]; if ( v8[0] ) { translog_buffer_lock(v8[0]); translog_buffer_decrease_writers(v6); ++*(_BYTE *)(a2 + 25); LOBYTE(v3) = 1; if ( !v5 ) v3 = translog_buffer_flush(v6); if ( *(_QWORD *)(v6 + 1048784) ) PSI_server[44](); pthread_mutex_unlock(v6 + 1048720); } else { return v4; } return v3; }
translog_chaser_page_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI LEA RBX,[RBP + -0x20] MOV RDX,RBX CALL 0x00149bee MOV R15D,EAX MOV RBX,qword ptr [RBX] TEST RBX,RBX JZ 0x0014a6b3 MOV RDI,RBX CALL 0x00143733 MOV RDI,RBX CALL 0x0014a47f INC byte ptr [R14 + 0x19] MOV R14B,0x1 TEST R15B,R15B JNZ 0x0014a696 MOV RDI,RBX CALL 0x00147401 MOV R14D,EAX LAB_0014a696: MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x0014a6c4 LAB_0014a6a2: ADD RBX,0x100090 MOV RDI,RBX CALL 0x0012a1f0 JMP 0x0014a6b6 LAB_0014a6b3: MOV R14D,R15D LAB_0014a6b6: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0014a6c4: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014a6a2
ulong translog_chaser_page_next(int8 param_1,long param_2) { uint uVar1; long in_RAX; ulong uVar2; long local_28; local_28 = in_RAX; uVar1 = translog_page_next(param_1,param_2,&local_28); uVar2 = (ulong)uVar1; if (local_28 != 0) { translog_buffer_lock(local_28); translog_buffer_decrease_writers(local_28); *(char *)(param_2 + 0x19) = *(char *)(param_2 + 0x19) + '\x01'; uVar2 = CONCAT71((int7)((ulong)param_2 >> 8),1); if ((char)uVar1 == '\0') { uVar1 = translog_buffer_flush(local_28); uVar2 = (ulong)uVar1; } if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + local_28) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock ((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + local_28)); } return uVar2 & 0xffffffff; }
39,605
find_group_name
bluesky950520[P]quickjs/libregexp.c
static int find_group_name(REParseState *s, const char *name) { const char *p, *buf_end; size_t len, name_len; int capture_index; p = (char *)s->group_names.buf; if (!p) return -1; buf_end = (char *)s->group_names.buf + s->group_names.size; name_len = strlen(name); capture_index = 1; while (p < buf_end) { len = strlen(p); if (len == name_len && memcmp(name, p, name_len) == 0) return capture_index; p += len + 1; capture_index++; } return -1; }
O1
c
find_group_name: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x70(%rdi), %r15 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r15, %r15 je 0x96a0d movq %rsi, %r14 movq 0x78(%rdi), %rbp movq %rsi, %rdi callq 0xe240 testq %rbp, %rbp jle 0x96a0d movq %rax, %r12 addq %r15, %rbp movl $0x1, %ebx movq %r15, %rdi callq 0xe240 movq %rax, %r13 cmpq %r12, %rax jne 0x969fb movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0xe690 testl %eax, %eax je 0x96a0d addq %r13, %r15 incq %r15 incl %ebx cmpq %rbp, %r15 jb 0x969d9 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_group_name: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, [rdi+70h] mov ebx, 0FFFFFFFFh test r15, r15 jz short loc_96A0D mov r14, rsi mov rbp, [rdi+78h] mov rdi, rsi call _strlen test rbp, rbp jle short loc_96A0D mov r12, rax add rbp, r15 mov ebx, 1 loc_969D9: mov rdi, r15 call _strlen mov r13, rax cmp rax, r12 jnz short loc_969FB mov rdi, r14 mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_96A0D loc_969FB: add r15, r13 inc r15 inc ebx cmp r15, rbp jb short loc_969D9 mov ebx, 0FFFFFFFFh loc_96A0D: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long find_group_name(long long a1, long long a2) { unsigned long long v2; // r15 unsigned int i; // ebx long long v4; // rbp long long v5; // rax long long v6; // r12 unsigned long long v7; // rbp long long v8; // rcx long long v9; // r13 v2 = *(_QWORD *)(a1 + 112); i = -1; if ( v2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = strlen(a2); if ( v4 > 0 ) { v6 = v5; v7 = v2 + v4; for ( i = 1; ; ++i ) { v9 = strlen(v2); if ( v9 == v6 && !(unsigned int)bcmp(a2, v2, v6, v8) ) break; v2 += v9 + 1; if ( v2 >= v7 ) return (unsigned int)-1; } } } return i; }
find_group_name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x70] MOV EBX,0xffffffff TEST R15,R15 JZ 0x00196a0d MOV R14,RSI MOV RBP,qword ptr [RDI + 0x78] MOV RDI,RSI CALL 0x0010e240 TEST RBP,RBP JLE 0x00196a0d MOV R12,RAX ADD RBP,R15 MOV EBX,0x1 LAB_001969d9: MOV RDI,R15 CALL 0x0010e240 MOV R13,RAX CMP RAX,R12 JNZ 0x001969fb MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0010e690 TEST EAX,EAX JZ 0x00196a0d LAB_001969fb: ADD R15,R13 INC R15 INC EBX CMP R15,RBP JC 0x001969d9 MOV EBX,0xffffffff LAB_00196a0d: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int find_group_name(long param_1,char *param_2) { long lVar1; int iVar2; size_t __n; size_t sVar3; int iVar4; char *pcVar5; char *__s; __s = *(char **)(param_1 + 0x70); if (__s != (char *)0x0) { lVar1 = *(long *)(param_1 + 0x78); __n = strlen(param_2); if (0 < lVar1) { pcVar5 = __s + lVar1; iVar4 = 1; do { sVar3 = strlen(__s); if ((sVar3 == __n) && (iVar2 = bcmp(param_2,__s,__n), iVar2 == 0)) { return iVar4; } __s = __s + sVar3 + 1; iVar4 = iVar4 + 1; } while (__s < pcVar5); } } return -1; }
39,606
find_group_name
bluesky950520[P]quickjs/libregexp.c
static int find_group_name(REParseState *s, const char *name) { const char *p, *buf_end; size_t len, name_len; int capture_index; p = (char *)s->group_names.buf; if (!p) return -1; buf_end = (char *)s->group_names.buf + s->group_names.size; name_len = strlen(name); capture_index = 1; while (p < buf_end) { len = strlen(p); if (len == name_len && memcmp(name, p, name_len) == 0) return capture_index; p += len + 1; capture_index++; } return -1; }
O3
c
find_group_name: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x70(%rdi), %r15 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r15, %r15 je 0x992fa movq %rsi, %r14 movq 0x78(%rdi), %rbp movq %rsi, %rdi callq 0xe240 testq %rbp, %rbp jle 0x992fa movq %rax, %r12 addq %r15, %rbp movl $0x1, %ebx movq %r15, %rdi callq 0xe240 movq %rax, %r13 cmpq %r12, %rax jne 0x992e8 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0xe690 testl %eax, %eax je 0x992fa addq %r13, %r15 incq %r15 incl %ebx cmpq %rbp, %r15 jb 0x992c6 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_group_name: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, [rdi+70h] mov ebx, 0FFFFFFFFh test r15, r15 jz short loc_992FA mov r14, rsi mov rbp, [rdi+78h] mov rdi, rsi call _strlen test rbp, rbp jle short loc_992FA mov r12, rax add rbp, r15 mov ebx, 1 loc_992C6: mov rdi, r15 call _strlen mov r13, rax cmp rax, r12 jnz short loc_992E8 mov rdi, r14 mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_992FA loc_992E8: add r15, r13 inc r15 inc ebx cmp r15, rbp jb short loc_992C6 mov ebx, 0FFFFFFFFh loc_992FA: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long find_group_name(long long a1, long long a2) { unsigned long long v2; // r15 unsigned int i; // ebx long long v4; // rbp long long v5; // rax long long v6; // r12 unsigned long long v7; // rbp long long v8; // rcx long long v9; // r13 v2 = *(_QWORD *)(a1 + 112); i = -1; if ( v2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = strlen(a2); if ( v4 > 0 ) { v6 = v5; v7 = v2 + v4; for ( i = 1; ; ++i ) { v9 = strlen(v2); if ( v9 == v6 && !(unsigned int)bcmp(a2, v2, v6, v8) ) break; v2 += v9 + 1; if ( v2 >= v7 ) return (unsigned int)-1; } } } return i; }
find_group_name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x70] MOV EBX,0xffffffff TEST R15,R15 JZ 0x001992fa MOV R14,RSI MOV RBP,qword ptr [RDI + 0x78] MOV RDI,RSI CALL 0x0010e240 TEST RBP,RBP JLE 0x001992fa MOV R12,RAX ADD RBP,R15 MOV EBX,0x1 LAB_001992c6: MOV RDI,R15 CALL 0x0010e240 MOV R13,RAX CMP RAX,R12 JNZ 0x001992e8 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0010e690 TEST EAX,EAX JZ 0x001992fa LAB_001992e8: ADD R15,R13 INC R15 INC EBX CMP R15,RBP JC 0x001992c6 MOV EBX,0xffffffff LAB_001992fa: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int find_group_name(long param_1,char *param_2) { long lVar1; int iVar2; size_t __n; size_t sVar3; int iVar4; char *pcVar5; char *__s; __s = *(char **)(param_1 + 0x70); if (__s != (char *)0x0) { lVar1 = *(long *)(param_1 + 0x78); __n = strlen(param_2); if (0 < lVar1) { pcVar5 = __s + lVar1; iVar4 = 1; do { sVar3 = strlen(__s); if ((sVar3 == __n) && (iVar2 = bcmp(param_2,__s,__n), iVar2 == 0)) { return iVar4; } __s = __s + sVar3 + 1; iVar4 = iVar4 + 1; } while (__s < pcVar5); } } return -1; }
39,607
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator=(testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&&)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
class GTEST_API_ Matcher<std::string> : public internal::MatcherBase<std::string> { public: Matcher() = default; explicit Matcher(const MatcherInterface<const std::string&>* impl) : internal::MatcherBase<std::string>(impl) {} explicit Matcher(const MatcherInterface<std::string>* impl) : internal::MatcherBase<std::string>(impl) {} template <typename M, typename = typename std::remove_reference< M>::type::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase<std::string>(std::forward<M>(m)) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a string object. Matcher(const std::string& s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. Matcher(const char* s); // NOLINT }
O0
c
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator=(testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&&): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x45ff0 movq -0x10(%rbp), %rdi movl $0x18, %esi callq 0xa640 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_10], rdi call _ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::Matcher<std::string>::~Matcher() mov rdi, [rbp+var_10]; void * mov esi, 18h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void testing::Matcher<std::string>::~Matcher(void *a1) { testing::Matcher<std::string>::~Matcher((long long)a1); operator delete(a1, 0x18uLL); }
~Matcher: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x00145ff0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x18 CALL 0x0010a640 ADD RSP,0x10 POP RBP RET
/* testing::Matcher<std::__cxx11::string >::~Matcher() */ void __thiscall testing::Matcher<std::__cxx11::string>::~Matcher(Matcher<std::__cxx11::string> *this) { ~Matcher(this); operator_delete(this,0x18); return; }
39,608
link_to_changed_list
eloqsql/storage/maria/ma_pagecache.c
static inline void link_to_changed_list(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block) { unlink_changed(block); link_changed(block, &pagecache->changed_blocks[FILE_HASH(block->hash_link->file, pagecache)]); block->status|=PCBLOCK_CHANGED; pagecache->blocks_changed++; pagecache->global_blocks_changed++; }
O0
c
link_to_changed_list: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x40520 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq 0x128(%rax), %rsi movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl 0x28(%rax), %eax movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax shlq $0x3, %rax addq %rax, %rsi callq 0x40620 movq -0x10(%rbp), %rax movzwl 0x74(%rax), %ecx orl $0x20, %ecx movw %cx, 0x74(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x58(%rax) movq -0x8(%rbp), %rax movq 0x168(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x168(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
link_to_changed_list: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call unlink_changed mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax+128h] mov rax, [rbp+var_10] mov rax, [rax+20h] mov eax, [rax+28h] mov rcx, [rbp+var_8] mov rcx, [rcx+28h] sub rcx, 1 and rax, rcx shl rax, 3 add rsi, rax call link_changed mov rax, [rbp+var_10] movzx ecx, word ptr [rax+74h] or ecx, 20h mov [rax+74h], cx mov rax, [rbp+var_8] mov rcx, [rax+58h] add rcx, 1 mov [rax+58h], rcx mov rax, [rbp+var_8] mov rcx, [rax+168h] add rcx, 1 mov [rax+168h], rcx add rsp, 10h pop rbp retn
_QWORD * link_to_changed_list(_QWORD *a1, long long a2) { _QWORD *result; // rax unlink_changed(a2); link_changed(a2, 8 * ((a1[5] - 1LL) & *(unsigned int *)(*(_QWORD *)(a2 + 32) + 40LL)) + a1[37]); *(_WORD *)(a2 + 116) |= 0x20u; ++a1[11]; result = a1; ++a1[45]; return result; }
link_to_changed_list: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00140520 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x128] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV EAX,dword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x28] SUB RCX,0x1 AND RAX,RCX SHL RAX,0x3 ADD RSI,RAX CALL 0x00140620 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x74] OR ECX,0x20 MOV word ptr [RAX + 0x74],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] ADD RCX,0x1 MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x168] ADD RCX,0x1 MOV qword ptr [RAX + 0x168],RCX ADD RSP,0x10 POP RBP RET
void link_to_changed_list(long param_1,long param_2) { unlink_changed(param_2); link_changed(param_2,*(long *)(param_1 + 0x128) + ((ulong)*(uint *)(*(long *)(param_2 + 0x20) + 0x28) & *(long *)(param_1 + 0x28) - 1U) * 8); *(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) | 0x20; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + 1; return; }
39,609
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>::at<char const (&) [8], 0>(char const (&) [8])
monkey531[P]llama/common/./json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O0
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>::at<char const (&) [8], 0>(char const (&) [8]): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2c80 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x11d878 jmp 0x11d954 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x50540 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04c0 movq %rax, 0x90(%rsp) leaq 0xb7880(%rip), %rsi # 0x1d5128 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x125a10 jmp 0x11d8bf movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xbbd90 jmp 0x11d8dd movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x134807(%rip), %rsi # 0x2520f8 leaq -0x7d388(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0x11dae5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x11d939 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x510c0 testb $0x1, 0x83(%rsp) jne 0x11d945 jmp 0x11d94f movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0x11dad8 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x126b60 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa2ac0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb9f0 testb $0x1, %al jne 0x11d99d jmp 0x11daae movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d60 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x61bd0 jmp 0x11d9e2 leaq 0xb796b(%rip), %rsi # 0x1d5354 leaq 0xb796a(%rip), %rcx # 0x1d535a leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x126c30 jmp 0x11da01 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0xb9940 jmp 0x11da1b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1347b5(%rip), %rsi # 0x2521e0 leaq -0x64af2(%rip), %rdx # 0xb8f40 callq 0x508f0 jmp 0x11dae5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x11da90 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x11da86 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x510c0 leaq 0x30(%rsp), %rdi callq 0x510c0 leaq 0x2f(%rsp), %rdi callq 0x510a0 testb $0x1, 0x2e(%rsp) jne 0x11daa3 jmp 0x11daac movq (%rsp), %rdi callq 0x50c40 jmp 0x11dad8 leaq 0x78(%rsp), %rdi callq 0xbbbe0 movq 0x20(%rsp), %rdi movq %rax, %rsi addq $0x20, %rsi movq $-0x1, %rdx callq 0x1258f0 addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_11D878 jmp loc_11D954 loc_11D878: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_11D8BF: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_11D8DD: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_11DAE5 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_11D939 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_11D939: test [rsp+arg_7B], 1 jnz short loc_11D945 jmp short loc_11D94F loc_11D945: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_11D94F: jmp loc_11DAD8 loc_11D954: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_11D99D jmp loc_11DAAE loc_11D99D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_11D9E2: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_11DA01: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_11DA1B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_11DAE5 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_11DA90 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_11DA86 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_11DA86: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_11DA90: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_11DAA3 jmp short loc_11DAAC loc_11DAA3: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_11DAAC: jmp short loc_11DAD8 loc_11DAAE: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+0C8h+var_A8] mov rsi, rax add rsi, 20h ; ' ' mov rdx, 0FFFFFFFFFFFFFFFFh call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parent(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>&,ulong) add rsp, 0C8h retn loc_11DAD8: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_11DAE5: nop word ptr [rax+rax+00000000h] nop
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d long long v7; // rax int v9; // [rsp+0h] [rbp-C8h] void *v10; // [rsp+0h] [rbp-C8h] nlohmann::json_abi_v3_11_3::detail::out_of_range *v11; // [rsp+0h] [rbp-C8h] void *v12; // [rsp+8h] [rbp-C0h] long long v13; // [rsp+8h] [rbp-C0h] int v14; // [rsp+10h] [rbp-B8h] int v15; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] nlohmann::json_abi_v3_11_3::detail::type_error *v17; // [rsp+18h] [rbp-B0h] long long v18; // [rsp+20h] [rbp-A8h] char v19; // [rsp+2Fh] [rbp-99h] BYREF _BYTE v20[32]; // [rsp+30h] [rbp-98h] BYREF int v21[8]; // [rsp+50h] [rbp-78h] BYREF char v22[8]; // [rsp+70h] [rbp-58h] BYREF int v23[2]; // [rsp+78h] [rbp-50h] BYREF char v24; // [rsp+83h] [rbp-45h] char v25[8]; // [rsp+90h] [rbp-38h] BYREF int v26[8]; // [rsp+98h] [rbp-30h] BYREF int v27[2]; // [rsp+B8h] [rbp-10h] long long v28; // [rsp+C0h] [rbp-8h] v28 = a1; *(_QWORD *)v27 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v26, (int)"cannot use at() with ", (int)v25, v2, v3, v4, v9, v12, v14, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v17, 304, (long long)v26, a1); v24 = 0; __cxa_throw( v17, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v23 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v27); *(_QWORD *)v22 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v23, (long long)v22) ) { v10 = __cxa_allocate_exception(0x20uLL); v13 = *(_QWORD *)v27; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v20, v13, (long long)&v19); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v21, (int)"key '", (int)v20, (int)"' not found", v5, v6, v10, v13, (int)&v19, v15, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v11, 403, (long long)v21, v18); __cxa_throw( v11, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v23); 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>::set_parent( a1, v7 + 32, -1LL); }
39,610
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>::at<char const (&) [8], 0>(char const (&) [8])
monkey531[P]llama/common/./json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
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>::at<char const (&) [8], 0>(char const (&) [8]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x6932b movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x69315 movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x6930a addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x692eb jmp 0x6930d movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x69389 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3e096 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x53426(%rip), %rsi # 0xbc773 leaq 0x20(%rsp), %rdi callq 0x6f3e3 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x49cf4 xorl %ebp, %ebp leaq 0x84f40(%rip), %rsi # 0xee2b8 leaq -0x1cfcf(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 jmp 0x69402 movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x590a2 leaq 0x535e1(%rip), %rsi # 0xbc99f leaq 0x535e0(%rip), %rcx # 0xbc9a5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6f9be movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x49008 xorl %ebp, %ebp leaq 0x84fad(%rip), %rsi # 0xee3a0 leaq -0x1d04a(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69420 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x6946b movq 0x10(%rsp), %rsi jmp 0x69463 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69475 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x69475 jmp 0x69472 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6946b movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x69475 jmp 0x6947d movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_6932B mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_69315 loc_692EB: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_6930A add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_692EB jmp short loc_6930D loc_6930A: mov rax, rbx loc_6930D: mov rcx, [r14+8] mov rbx, [rcx+8] loc_69315: cmp rax, rbx jz short loc_69389 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6932B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_69402 loc_69389: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_69402: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69420 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69420: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_6946B mov rsi, [rsp+68h+var_58] jmp short loc_69463 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_69475 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_69475 jmp short loc_69472 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6946B mov rsi, [rsp+68h+var_38] loc_69463: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6946B: test bpl, bpl jnz short loc_69475 jmp short loc_6947D loc_69472: mov r14, rax loc_69475: mov rdi, rbx; void * call ___cxa_free_exception loc_6947D: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = (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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v11, "key '", v9, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0016932b MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00169315 LAB_001692eb: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x0016930a ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001692eb JMP 0x0016930d LAB_0016930a: MOV RAX,RBX LAB_0016930d: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00169315: CMP RAX,RBX JZ 0x00169389 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016932b: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e096 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00169346: LEA RSI,[0x1bc773] LEA RDI,[RSP + 0x20] CALL 0x0016f3e3 MOV BPL,0x1 LAB_0016935a: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00149cf4 XOR EBP,EBP LEA RSI,[0x1ee2b8] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30 LAB_00169389: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_001693ac: MOV RDI,RSP MOV RSI,R15 CALL 0x001590a2 LAB_001693b7: LEA RSI,[0x1bc99f] LEA RCX,[0x1bc9a5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016f9be MOV BPL,0x1 LAB_001693d5: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00149008 XOR EBP,EBP LEA RSI,[0x1ee3a0] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00169346 to 00169356 has its CatchHandler @ 00169472 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 0016935a to 00169386 has its CatchHandler @ 0016944d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001693ac to 001693b6 has its CatchHandler @ 0016944b */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001693b7 to 001693d1 has its CatchHandler @ 00169430 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001693d5 to 00169401 has its CatchHandler @ 00169402 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
39,611
action_a_inc
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/parts/engine.c
int32_t action_a_inc (PENGINE_T instance, uint32_t parm, uint32_t flags) { int32_t value ; if (flags & (PART_ACTION_FLAG_VALIDATE)) { return parts_valadate_int (instance, parm, flags, INT_MIN, INT_MAX) ; } value = parts_get_int (instance, parm, flags, INT_MIN, INT_MAX) ; int32_t acc = 0 ; engine_get_variable (instance, ENGINE_VARIABLE_ACCUMULATOR, &acc) ; acc++ ; if (acc > value) { acc = value ; } engine_set_variable (instance, ENGINE_VARIABLE_ACCUMULATOR, acc) ; return acc ; }
O0
c
action_a_inc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x77ec movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl $0x80000000, %ecx # imm = 0x80000000 movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF callq 0x91b0 movl %eax, -0x4(%rbp) jmp 0x784a movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl $0x80000000, %ecx # imm = 0x80000000 movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF callq 0x92f0 movl %eax, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x10(%rbp), %rdi xorl %esi, %esi leaq -0x20(%rbp), %rdx callq 0x13470 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jle 0x7836 movl -0x1c(%rbp), %eax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rdi movl -0x20(%rbp), %edx xorl %esi, %esi callq 0x13550 movl -0x20(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
action_a_inc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_77EC mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, 80000000h mov r8d, 7FFFFFFFh call parts_valadate_int mov [rbp+var_4], eax jmp short loc_784A loc_77EC: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, 80000000h mov r8d, 7FFFFFFFh call parts_get_int mov [rbp+var_1C], eax mov [rbp+var_20], 0 mov rdi, [rbp+var_10] xor esi, esi lea rdx, [rbp+var_20] call engine_get_variable mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jle short loc_7836 mov eax, [rbp+var_1C] mov [rbp+var_20], eax loc_7836: mov rdi, [rbp+var_10] mov edx, [rbp+var_20] xor esi, esi call engine_set_variable mov eax, [rbp+var_20] mov [rbp+var_4], eax loc_784A: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long action_a_inc(long long a1, unsigned int a2, unsigned int a3) { unsigned int v4; // [rsp+0h] [rbp-20h] BYREF int v5; // [rsp+4h] [rbp-1Ch] unsigned int v6; // [rsp+8h] [rbp-18h] unsigned int v7; // [rsp+Ch] [rbp-14h] long long v8; // [rsp+10h] [rbp-10h] v8 = a1; v7 = a2; v6 = a3; if ( (a3 & 1) != 0 ) { return (unsigned int)parts_valadate_int(v8, v7, v6, 0x80000000LL, 0x7FFFFFFFLL); } else { v5 = parts_get_int(v8, v7, v6, 0x80000000LL, 0x7FFFFFFFLL); v4 = 0; engine_get_variable(v8, 0LL, &v4); if ( (int)++v4 > v5 ) v4 = v5; engine_set_variable(v8, 0LL, v4); return v4; } }
action_a_inc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x001077ec MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,0x80000000 MOV R8D,0x7fffffff CALL 0x001091b0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0010784a LAB_001077ec: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,0x80000000 MOV R8D,0x7fffffff CALL 0x001092f0 MOV dword ptr [RBP + -0x1c],EAX MOV dword ptr [RBP + -0x20],0x0 MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI LEA RDX,[RBP + -0x20] CALL 0x00113470 MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JLE 0x00107836 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x20],EAX LAB_00107836: MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x00113550 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x4],EAX LAB_0010784a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int action_a_inc(int8 param_1,int4 param_2,uint param_3) { int local_28; int local_24; uint local_20; int4 local_1c; int8 local_18; int local_c; local_20 = param_3; local_1c = param_2; local_18 = param_1; if ((param_3 & 1) == 0) { local_24 = parts_get_int(param_1,param_2,param_3,0x80000000,0x7fffffff); local_28 = 0; engine_get_variable(local_18,0,&local_28); local_28 = local_28 + 1; if (local_24 < local_28) { local_28 = local_24; } engine_set_variable(local_18,0,local_28); local_c = local_28; } else { local_c = parts_valadate_int(param_1,param_2,param_3,0x80000000,0x7fffffff); } return local_c; }
39,612
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp
void checkSubParam(const json& data, const std::string& param, const std::string& subparam) { if (!data.contains(param)) { std::string errMsg = "missing param in json data: " + param; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } if (!((data[param]).contains(subparam))) { std::string errMsg = "missing subparam in json data: " + subparam; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } }
O0
cpp
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x5f7e0 testb $0x1, %al jne 0x621b7 movq -0x10(%rbp), %rdx leaq 0x2abe1(%rip), %rsi # 0x8cc88 leaq -0x38(%rbp), %rdi callq 0x5df60 callq 0x5bc60 movq %rax, -0xc0(%rbp) jmp 0x620be leaq -0x69(%rbp), %rdi movq %rdi, -0xc8(%rbp) callq 0x611c0 movq -0xc8(%rbp), %rdx leaq 0x2abc9(%rip), %rsi # 0x8cca5 leaq -0x68(%rbp), %rdi callq 0x60e40 jmp 0x620e7 movq -0xc0(%rbp), %rdi movl $0x2, %esi leaq -0x68(%rbp), %rdx leaq -0x38(%rbp), %rcx callq 0x5ee40 jmp 0x62102 leaq -0x68(%rbp), %rdi callq 0x5cfd0 leaq -0x69(%rbp), %rdi callq 0x5eab0 movl $0x10, %edi callq 0x5c6c0 movq %rax, %rdi movq %rdi, %rax movq %rax, -0xd0(%rbp) leaq -0x38(%rbp), %rsi callq 0x61040 jmp 0x62136 movq -0xd0(%rbp), %rdi movq 0x44e84(%rip), %rsi # 0xa6fc8 movq 0x44e65(%rip), %rdx # 0xa6fb0 callq 0x60f20 jmp 0x62320 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x621a9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x62186 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x68(%rbp), %rdi callq 0x5cfd0 leaq -0x69(%rbp), %rdi callq 0x5eab0 jmp 0x621a9 movq -0xd0(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) callq 0x5d520 leaq -0x38(%rbp), %rdi callq 0x5cfd0 jmp 0x62317 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x5e820 movq %rax, %rdi movq -0x18(%rbp), %rsi callq 0x5f7e0 testb $0x1, %al jne 0x6230e movq -0x18(%rbp), %rdx leaq 0x2aad2(%rip), %rsi # 0x8ccb5 leaq -0x90(%rbp), %rdi callq 0x5df60 callq 0x5bc60 movq %rax, -0xd8(%rbp) jmp 0x621fd leaq -0xb1(%rbp), %rdi movq %rdi, -0xe0(%rbp) callq 0x611c0 movq -0xe0(%rbp), %rdx leaq 0x2aa87(%rip), %rsi # 0x8cca5 leaq -0xb0(%rbp), %rdi callq 0x60e40 jmp 0x6222c movq -0xd8(%rbp), %rdi movl $0x2, %esi leaq -0xb0(%rbp), %rdx leaq -0x90(%rbp), %rcx callq 0x5ee40 jmp 0x6224d leaq -0xb0(%rbp), %rdi callq 0x5cfd0 leaq -0xb1(%rbp), %rdi callq 0x5eab0 movl $0x10, %edi callq 0x5c6c0 movq %rax, %rdi movq %rdi, %rax movq %rax, -0xe8(%rbp) leaq -0x90(%rbp), %rsi callq 0x61040 jmp 0x6228a movq -0xe8(%rbp), %rdi movq 0x44d30(%rip), %rsi # 0xa6fc8 movq 0x44d11(%rip), %rdx # 0xa6fb0 callq 0x60f20 jmp 0x62320 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x62300 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x622da movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0xb0(%rbp), %rdi callq 0x5cfd0 leaq -0xb1(%rbp), %rdi callq 0x5eab0 jmp 0x62300 movq -0xe8(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) callq 0x5d520 leaq -0x90(%rbp), %rdi callq 0x5cfd0 jmp 0x62317 addq $0xf0, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0x611b0
_Z13checkSubParamRKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKS9_SH_: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; 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>::contains(std::string const&) test al, 1 jnz loc_621B7 mov rdx, [rbp+var_10] lea rsi, aMissingParamIn; "missing param in json data: " lea rdi, [rbp+var_38]; this call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov [rbp+var_C0], rax jmp short $+2 loc_620BE: lea rdi, [rbp+var_69] mov [rbp+var_C8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_C8] lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdi, [rbp+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_620E7: mov rdi, [rbp+var_C0] mov esi, 2 lea rdx, [rbp+var_68] lea rcx, [rbp+var_38] call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) jmp short $+2 loc_62102: lea rdi, [rbp+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax mov rax, rdi mov [rbp+var_D0], rax lea rsi, [rbp+var_38] call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) jmp short $+2 loc_62136: mov rdi, [rbp+var_D0]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp _Z14addShapeParamsR5ShapeRKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; addShapeParams(Shape &,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_621A9 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_62186 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_62186: lea rdi, [rbp+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_621A9 mov rdi, [rbp+var_D0]; void * mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax call ___cxa_free_exception loc_621A9: lea rdi, [rbp+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_62317 loc_621B7: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&) mov rdi, rax mov rsi, [rbp+var_18] call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; 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>::contains(std::string const&) test al, 1 jnz loc_6230E mov rdx, [rbp+var_18] lea rsi, aMissingSubpara; "missing subparam in json data: " lea rdi, [rbp+var_90]; this call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov [rbp+var_D8], rax jmp short $+2 loc_621FD: lea rdi, [rbp+var_B1] mov [rbp+var_E0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_E0] lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdi, [rbp+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_6222C: mov rdi, [rbp+var_D8] mov esi, 2 lea rdx, [rbp+var_B0] lea rcx, [rbp+var_90] call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) jmp short $+2 loc_6224D: lea rdi, [rbp+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax mov rax, rdi mov [rbp+var_E8], rax lea rsi, [rbp+var_90] call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) jmp short $+2 loc_6228A: mov rdi, [rbp+var_E8]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp short _Z14addShapeParamsR5ShapeRKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; addShapeParams(Shape &,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_62300 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_622DA mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_622DA: lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_62300 mov rdi, [rbp+var_E8]; void * mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax call ___cxa_free_exception loc_62300: lea rdi, [rbp+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_62317 loc_6230E: add rsp, 0F0h pop rbp retn loc_62317: mov rdi, [rbp+var_40] call __Unwind_Resume
long long checkSubParam(long long a1, long long a2, long long a3) { long long v3; // rax long long result; // rax void *v5; // [rsp+8h] [rbp-E8h] long long v6; // [rsp+18h] [rbp-D8h] void *exception; // [rsp+20h] [rbp-D0h] long long Instance; // [rsp+30h] [rbp-C0h] char v9; // [rsp+3Fh] [rbp-B1h] BYREF _BYTE v10[32]; // [rsp+40h] [rbp-B0h] BYREF _BYTE v11[39]; // [rsp+60h] [rbp-90h] BYREF char v12; // [rsp+87h] [rbp-69h] BYREF _BYTE v13[36]; // [rsp+88h] [rbp-68h] BYREF _BYTE v14[32]; // [rsp+B8h] [rbp-38h] BYREF long long v15; // [rsp+D8h] [rbp-18h] long long v16; // [rsp+E0h] [rbp-10h] long long v17; // [rsp+E8h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; if ( (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>::contains( a1, a2) & 1) == 0 ) { std::operator+<char>(v14, "missing param in json data: ", v16); Instance = Logger::getInstance((Logger *)v14); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v13, "FIGURES_STORAGE", &v12); Logger::log(Instance, 2LL, v13, v14); std::string::~string(v13); std::allocator<char>::~allocator(&v12); exception = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(exception, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } v3 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( v17, v16); result = 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>::contains( v3, v15); if ( (result & 1) == 0 ) { std::operator+<char>(v11, "missing subparam in json data: ", v15); v6 = Logger::getInstance((Logger *)v11); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v10, "FIGURES_STORAGE", &v9); Logger::log(v6, 2LL, v10, v11); std::string::~string(v10); std::allocator<char>::~allocator(&v9); v5 = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v5, v11); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } return result; }
checkSubParam: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015f7e0 TEST AL,0x1 JNZ 0x001621b7 MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x18cc88] LEA RDI,[RBP + -0x38] CALL 0x0015df60 LAB_001620b0: CALL 0x0015bc60 MOV qword ptr [RBP + -0xc0],RAX JMP 0x001620be LAB_001620be: LEA RDI,[RBP + -0x69] MOV qword ptr [RBP + -0xc8],RDI CALL 0x001611c0 MOV RDX,qword ptr [RBP + -0xc8] LAB_001620d5: LEA RSI,[0x18cca5] LEA RDI,[RBP + -0x68] CALL 0x00160e40 JMP 0x001620e7 LAB_001620e7: MOV RDI,qword ptr [RBP + -0xc0] MOV ESI,0x2 LEA RDX,[RBP + -0x68] LEA RCX,[RBP + -0x38] CALL 0x0015ee40 LAB_00162100: JMP 0x00162102 LAB_00162102: LEA RDI,[RBP + -0x68] CALL 0x0015cfd0 LEA RDI,[RBP + -0x69] CALL 0x0015eab0 MOV EDI,0x10 CALL 0x0015c6c0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0xd0],RAX LAB_0016212b: LEA RSI,[RBP + -0x38] CALL 0x00161040 JMP 0x00162136 LAB_00162136: MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [0x001a6fc8] MOV RDX,qword ptr [0x001a6fb0] CALL 0x00160f20 LAB_001621b7: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015e820 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] CALL 0x0015f7e0 TEST AL,0x1 JNZ 0x0016230e MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x18ccb5] LEA RDI,[RBP + -0x90] CALL 0x0015df60 LAB_001621ef: CALL 0x0015bc60 MOV qword ptr [RBP + -0xd8],RAX JMP 0x001621fd LAB_001621fd: LEA RDI,[RBP + -0xb1] MOV qword ptr [RBP + -0xe0],RDI CALL 0x001611c0 MOV RDX,qword ptr [RBP + -0xe0] LAB_00162217: LEA RSI,[0x18cca5] LEA RDI,[RBP + -0xb0] CALL 0x00160e40 JMP 0x0016222c LAB_0016222c: MOV RDI,qword ptr [RBP + -0xd8] MOV ESI,0x2 LEA RDX,[RBP + -0xb0] LEA RCX,[RBP + -0x90] CALL 0x0015ee40 LAB_0016224b: JMP 0x0016224d LAB_0016224d: LEA RDI,[RBP + -0xb0] CALL 0x0015cfd0 LEA RDI,[RBP + -0xb1] CALL 0x0015eab0 MOV EDI,0x10 CALL 0x0015c6c0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0xe8],RAX LAB_0016227c: LEA RSI,[RBP + -0x90] CALL 0x00161040 JMP 0x0016228a LAB_0016228a: MOV RDI,qword ptr [RBP + -0xe8] MOV RSI,qword ptr [0x001a6fc8] MOV RDX,qword ptr [0x001a6fb0] CALL 0x00160f20 LAB_0016230e: ADD RSP,0xf0 POP RBP RET
/* checkSubParam(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> const&, std::__cxx11::string const&, std::__cxx11::string const&) */ void checkSubParam(basic_json *param_1,string *param_2,string *param_3) { ulong uVar1; int8 uVar2; invalid_argument *piVar3; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this; allocator local_b9; string local_b8 [32]; string local_98 [39]; allocator local_71; string local_70 [48]; string local_40 [32]; string *local_20; string *local_18; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_10; local_20 = param_3; local_18 = param_2; local_10 = (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> *)param_1; uVar1 = 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> ::contains((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> *)param_1,param_2); if ((uVar1 & 1) == 0) { std::operator+((char *)local_40,(string *)"missing param in json data: "); /* try { // try from 001620b0 to 001620b4 has its CatchHandler @ 00162155 */ uVar2 = Logger::getInstance(); std::allocator<char>::allocator(); /* try { // try from 001620d5 to 001620e4 has its CatchHandler @ 00162163 */ std::__cxx11::string::string<std::allocator<char>>(local_70,"FIGURES_STORAGE",&local_71); /* try { // try from 001620e7 to 001620ff has its CatchHandler @ 00162171 */ Logger::log(uVar2,2,local_70,local_40); std::__cxx11::string::~string(local_70); std::allocator<char>::~allocator((allocator<char> *)&local_71); piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0016212b to 00162133 has its CatchHandler @ 00162191 */ std::invalid_argument::invalid_argument(piVar3,local_40); /* try { // try from 00162136 to 0016214f has its CatchHandler @ 00162155 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar3,PTR_typeinfo_001a6fc8,PTR__invalid_argument_001a6fb0); } this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](local_10,local_18); uVar1 = 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> ::contains(this,local_20); if ((uVar1 & 1) == 0) { std::operator+((char *)local_98,(string *)"missing subparam in json data: "); /* try { // try from 001621ef to 001621f3 has its CatchHandler @ 001622a6 */ uVar2 = Logger::getInstance(); std::allocator<char>::allocator(); /* try { // try from 00162217 to 00162229 has its CatchHandler @ 001622b4 */ std::__cxx11::string::string<std::allocator<char>>(local_b8,"FIGURES_STORAGE",&local_b9); /* try { // try from 0016222c to 0016224a has its CatchHandler @ 001622c2 */ Logger::log(uVar2,2,local_b8,local_98); std::__cxx11::string::~string(local_b8); std::allocator<char>::~allocator((allocator<char> *)&local_b9); piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0016227c to 00162287 has its CatchHandler @ 001622e8 */ std::invalid_argument::invalid_argument(piVar3,local_98); /* try { // try from 0016228a to 001622a3 has its CatchHandler @ 001622a6 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar3,PTR_typeinfo_001a6fc8,PTR__invalid_argument_001a6fb0); } return; }
39,613
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp
void checkSubParam(const json& data, const std::string& param, const std::string& subparam) { if (!data.contains(param)) { std::string errMsg = "missing param in json data: " + param; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } if (!((data[param]).contains(subparam))) { std::string errMsg = "missing subparam in json data: " + subparam; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } }
O1
cpp
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 cmpb $0x1, (%rdi) jne 0x12874 movq %rdx, %rbx movq %rdi, %r15 movq 0x8(%rdi), %rdi movq %r14, %rsi callq 0x11850 movq 0x8(%r15), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x12874 movq %r15, %rdi movq %r14, %rsi callq 0x119f0 cmpb $0x1, (%rax) jne 0x1290f movq %rax, %r14 movq 0x8(%rax), %rdi movq %rbx, %rsi callq 0x11850 movq 0x8(%r14), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x1290f addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xfd81(%rip), %rsi # 0x225fc leaq 0x20(%rsp), %rdi movq %r14, %rdx callq 0x118a0 callq 0x11260 movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xfd79(%rip), %rsi # 0x22619 leaq 0xfd81(%rip), %rdx # 0x22628 movq %rsp, %rdi callq 0x11370 movq %rsp, %rdx leaq 0x20(%rsp), %rcx movq %rbx, %rdi movl $0x2, %esi callq 0x11af0 movq (%rsp), %rdi cmpq %r14, %rdi je 0x128da movq 0x10(%rsp), %rsi incq %rsi callq 0x119b0 movl $0x10, %edi callq 0x11460 movq %rax, %r14 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x11fe0 movq 0x1a6dd(%rip), %rsi # 0x2cfd8 movq 0x1a6be(%rip), %rdx # 0x2cfc0 movq %r14, %rdi callq 0x11fb0 jmp 0x129a5 leaq 0xfd13(%rip), %rsi # 0x22629 leaq 0x20(%rsp), %rdi movq %rbx, %rdx callq 0x118a0 callq 0x11260 movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xfcde(%rip), %rsi # 0x22619 leaq 0xfce6(%rip), %rdx # 0x22628 movq %rsp, %rdi callq 0x11370 movq %rsp, %rdx leaq 0x20(%rsp), %rcx movq %rbx, %rdi movl $0x2, %esi callq 0x11af0 movq (%rsp), %rdi cmpq %r14, %rdi je 0x12975 movq 0x10(%rsp), %rsi incq %rsi callq 0x119b0 movl $0x10, %edi callq 0x11460 movq %rax, %r14 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x11fe0 movq 0x1a642(%rip), %rsi # 0x2cfd8 movq 0x1a623(%rip), %rdx # 0x2cfc0 movq %r14, %rdi callq 0x11fb0 jmp 0x129a7 movq %rax, %rbx movq %r14, %rdi callq 0x116b0 jmp 0x129da jmp 0x129b6 movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x129da movq 0x10(%rsp), %rsi incq %rsi callq 0x119b0 jmp 0x129da jmp 0x129d7 jmp 0x129d7 jmp 0x129d7 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x129f5 movq 0x30(%rsp), %rsi incq %rsi callq 0x119b0 movq %rbx, %rdi callq 0x12010
_Z13checkSubParamRKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKS9_SH_: push r15 push r14 push rbx sub rsp, 40h mov r14, rsi cmp byte ptr [rdi], 1 jnz short loc_12874 mov rbx, rdx mov r15, rdi mov rdi, [rdi+8] mov rsi, r14 call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,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>>,std::_Select1st<std::pair<std::string const,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>>>,std::less<void>,std::allocator<std::pair<std::string const,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>>>>::find(std::string const&) mov rcx, [r15+8] add rcx, 8 cmp rax, rcx jz short loc_12874 mov rdi, r15 mov rsi, r14 call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&) cmp byte ptr [rax], 1 jnz loc_1290F mov r14, rax mov rdi, [rax+8] mov rsi, rbx call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,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>>,std::_Select1st<std::pair<std::string const,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>>>,std::less<void>,std::allocator<std::pair<std::string const,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>>>>::find(std::string const&) mov rcx, [r14+8] add rcx, 8 cmp rax, rcx jz loc_1290F add rsp, 40h pop rbx pop r14 pop r15 retn loc_12874: lea rsi, aMissingParamIn; "missing param in json data: " lea rdi, [rsp+58h+var_38]; this mov rdx, r14 call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov rbx, rax lea r14, [rsp+58h+var_48] mov [r14-10h], r14 lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdx, aFiguresStorage+0Fh; "" mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdx, rsp lea rcx, [rsp+58h+var_38] mov rdi, rbx mov esi, 2 call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_128DA mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_128DA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+58h+var_38] mov rdi, rax call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_129A5 loc_1290F: lea rsi, aMissingSubpara; "missing subparam in json data: " lea rdi, [rsp+58h+var_38]; this mov rdx, rbx call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov rbx, rax lea r14, [rsp+58h+var_48] mov [r14-10h], r14 lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdx, aFiguresStorage+0Fh; "" mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdx, rsp lea rcx, [rsp+58h+var_38] mov rdi, rbx mov esi, 2 call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_12975 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_12975: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+58h+var_38] mov rdi, rax call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_129A5: jmp short $+2 loc_129A7: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_129DA jmp short $+2 loc_129B6: mov rbx, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_129DA mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_129DA jmp short loc_129D7 jmp short loc_129D7 jmp short $+2 loc_129D7: mov rbx, rax loc_129DA: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_129F5 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_129F5: mov rdi, rbx call __Unwind_Resume
long long checkSubParam(long long a1, long long a2, long long a3) { long long v4; // rax long long v5; // r14 long long result; // rax long long Instance; // rbx void *exception; // r14 long long v9; // rbx void *v10; // r14 void *v11[2]; // [rsp+0h] [rbp-58h] BYREF _QWORD v12[2]; // [rsp+10h] [rbp-48h] BYREF _BYTE v13[16]; // [rsp+20h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 || std::_Rb_tree<std::string,std::pair<std::string const,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>>,std::_Select1st<std::pair<std::string const,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>>>,std::less<void>,std::allocator<std::pair<std::string const,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>>>>::find( *(_QWORD *)(a1 + 8), a2) == *(_QWORD *)(a1 + 8) + 8LL ) { std::operator+<char>(v13, "missing param in json data: ", a2); Instance = Logger::getInstance((Logger *)v13); v11[0] = v12; std::string::_M_construct<char const*>(v11, "FIGURES_STORAGE", ""); Logger::log(Instance, 2LL, v11, v13); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); exception = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } v4 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, a2); if ( *(_BYTE *)v4 != 1 || (v5 = v4, result = std::_Rb_tree<std::string,std::pair<std::string const,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>>,std::_Select1st<std::pair<std::string const,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>>>,std::less<void>,std::allocator<std::pair<std::string const,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>>>>::find( *(_QWORD *)(v4 + 8), a3), result == *(_QWORD *)(v5 + 8) + 8LL) ) { std::operator+<char>(v13, "missing subparam in json data: ", a3); v9 = Logger::getInstance((Logger *)v13); v11[0] = v12; std::string::_M_construct<char const*>(v11, "FIGURES_STORAGE", ""); Logger::log(v9, 2LL, v11, v13); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); v10 = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v10, v13); __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } return result; }
checkSubParam: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI CMP byte ptr [RDI],0x1 JNZ 0x00112874 MOV RBX,RDX MOV R15,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RSI,R14 CALL 0x00111850 MOV RCX,qword ptr [R15 + 0x8] ADD RCX,0x8 CMP RAX,RCX JZ 0x00112874 MOV RDI,R15 MOV RSI,R14 CALL 0x001119f0 CMP byte ptr [RAX],0x1 JNZ 0x0011290f MOV R14,RAX MOV RDI,qword ptr [RAX + 0x8] MOV RSI,RBX CALL 0x00111850 MOV RCX,qword ptr [R14 + 0x8] ADD RCX,0x8 CMP RAX,RCX JZ 0x0011290f ADD RSP,0x40 POP RBX POP R14 POP R15 RET LAB_00112874: LEA RSI,[0x1225fc] LEA RDI,[RSP + 0x20] MOV RDX,R14 CALL 0x001118a0 LAB_00112888: CALL 0x00111260 MOV RBX,RAX LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_00112899: LEA RSI,[0x122619] LEA RDX,[0x122628] MOV RDI,RSP CALL 0x00111370 LAB_001128af: MOV RDX,RSP LEA RCX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x2 CALL 0x00111af0 LAB_001128c4: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x001128da MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001119b0 LAB_001128da: MOV EDI,0x10 CALL 0x00111460 MOV R14,RAX LAB_001128e7: LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x00111fe0 LAB_001128f4: MOV RSI,qword ptr [0x0012cfd8] MOV RDX,qword ptr [0x0012cfc0] MOV RDI,R14 CALL 0x00111fb0 LAB_0011290f: LEA RSI,[0x122629] LEA RDI,[RSP + 0x20] MOV RDX,RBX CALL 0x001118a0 LAB_00112923: CALL 0x00111260 MOV RBX,RAX LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_00112934: LEA RSI,[0x122619] LEA RDX,[0x122628] MOV RDI,RSP CALL 0x00111370 LAB_0011294a: MOV RDX,RSP LEA RCX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x2 CALL 0x00111af0 LAB_0011295f: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x00112975 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001119b0 LAB_00112975: MOV EDI,0x10 CALL 0x00111460 MOV R14,RAX LAB_00112982: LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x00111fe0 LAB_0011298f: MOV RSI,qword ptr [0x0012cfd8] MOV RDX,qword ptr [0x0012cfc0] MOV RDI,R14 CALL 0x00111fb0
/* checkSubParam(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> const&, std::__cxx11::string const&, std::__cxx11::string const&) */ void checkSubParam(basic_json *param_1,string *param_2,string *param_3) { long lVar1; char *pcVar2; int8 uVar3; invalid_argument *piVar4; long *local_58 [2]; long local_48 [2]; string local_38 [32]; if (*param_1 == (basic_json)0x1) { lVar1 = std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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>>,std::_Select1st<std::pair<std::__cxx11::string_const,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> ::find(*(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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>>,std::_Select1st<std::pair<std::__cxx11::string_const,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> **)(param_1 + 8),param_2); if (lVar1 != *(long *)(param_1 + 8) + 8) { pcVar2 = (char *)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> ::operator[]((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,param_2); if (*pcVar2 == '\x01') { lVar1 = std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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>>,std::_Select1st<std::pair<std::__cxx11::string_const,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> ::find(*(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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>>,std::_Select1st<std::pair<std::__cxx11::string_const,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> **)(pcVar2 + 8),param_3); if (lVar1 != *(long *)(pcVar2 + 8) + 8) { return; } } std::operator+((char *)local_38,(string *)"missing subparam in json data: "); /* try { // try from 00112923 to 00112927 has its CatchHandler @ 001129d5 */ uVar3 = Logger::getInstance(); local_58[0] = local_48; /* try { // try from 00112934 to 00112949 has its CatchHandler @ 001129d1 */ std::__cxx11::string::_M_construct<char_const*>(local_58,"FIGURES_STORAGE",""); /* try { // try from 0011294a to 0011295e has its CatchHandler @ 001129b4 */ Logger::log(uVar3,2,local_58,local_38); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 00112982 to 0011298e has its CatchHandler @ 001129a5 */ std::invalid_argument::invalid_argument(piVar4,local_38); /* try { // try from 0011298f to 001129a4 has its CatchHandler @ 001129d5 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_0012cfd8,PTR__invalid_argument_0012cfc0); } } std::operator+((char *)local_38,(string *)"missing param in json data: "); /* try { // try from 00112888 to 0011288c has its CatchHandler @ 001129d7 */ uVar3 = Logger::getInstance(); local_58[0] = local_48; /* try { // try from 00112899 to 001128ae has its CatchHandler @ 001129d3 */ std::__cxx11::string::_M_construct<char_const*>(local_58,"FIGURES_STORAGE",""); /* try { // try from 001128af to 001128c3 has its CatchHandler @ 001129b6 */ Logger::log(uVar3,2,local_58,local_38); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 001128e7 to 001128f3 has its CatchHandler @ 001129a7 */ std::invalid_argument::invalid_argument(piVar4,local_38); /* try { // try from 001128f4 to 00112909 has its CatchHandler @ 001129d7 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_0012cfd8,PTR__invalid_argument_0012cfc0); }
39,614
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp
void checkSubParam(const json& data, const std::string& param, const std::string& subparam) { if (!data.contains(param)) { std::string errMsg = "missing param in json data: " + param; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } if (!((data[param]).contains(subparam))) { std::string errMsg = "missing subparam in json data: " + subparam; LOG_ERROR(FIGURES_STORAGE_LOG, errMsg); throw std::invalid_argument(errMsg); } }
O2
cpp
checkSubParam(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x1d5e0 testb %al, %al je 0x1e1fb movq %r15, %rdi movq %r14, %rsi callq 0x1d1a0 movq %rax, %rdi movq %rbx, %rsi callq 0x1d5e0 testb %al, %al je 0x1e27c addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xd3ea(%rip), %rsi # 0x2b5ec leaq 0x30(%rsp), %rdi movq %r14, %rdx callq 0x1cf60 callq 0x1c450 movq %rax, %rbx leaq 0xd3eb(%rip), %rsi # 0x2b609 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x1dc00 pushq $0x2 popq %rsi leaq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rcx movq %rbx, %rdi callq 0x1d340 leaq 0x10(%rsp), %rdi callq 0x1c6f0 pushq $0x10 popq %rdi callq 0x1c790 movq %rax, %r14 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x1dc50 movq 0x1ad6d(%rip), %rsi # 0x38fd8 movq 0x1ad4e(%rip), %rdx # 0x38fc0 movq %r14, %rdi callq 0x1dc20 jmp 0x1e2fb leaq 0xd396(%rip), %rsi # 0x2b619 leaq 0x30(%rsp), %rdi movq %rbx, %rdx callq 0x1cf60 callq 0x1c450 movq %rax, %rbx leaq 0xd36a(%rip), %rsi # 0x2b609 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x1dc00 pushq $0x2 popq %rsi leaq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rcx movq %rbx, %rdi callq 0x1d340 leaq 0x10(%rsp), %rdi callq 0x1c6f0 pushq $0x10 popq %rdi callq 0x1c790 movq %rax, %r14 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x1dc50 movq 0x1acec(%rip), %rsi # 0x38fd8 movq 0x1accd(%rip), %rdx # 0x38fc0 movq %r14, %rdi callq 0x1dc20 jmp 0x1e2fd movq %rax, %rbx movq %r14, %rdi callq 0x1cc30 jmp 0x1e324 jmp 0x1e30c movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1c6f0 jmp 0x1e324 jmp 0x1e321 jmp 0x1e321 jmp 0x1e321 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x1c6f0 movq %rbx, %rdi callq 0x1dcb0
_Z13checkSubParamRKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKS9_SH_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdx mov r14, rsi mov r15, rdi call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; 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>::contains(std::string const&) test al, al jz short loc_1E1FB mov rdi, r15 mov rsi, r14 call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&) mov rdi, rax mov rsi, rbx call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; 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>::contains(std::string const&) test al, al jz loc_1E27C add rsp, 50h pop rbx pop r14 pop r15 retn loc_1E1FB: lea rsi, aMissingParamIn; "missing param in json data: " lea rdi, [rsp+68h+var_38]; this mov rdx, r14 call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov rbx, rax lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) push 2 pop rsi lea rdx, [rsp+68h+var_58] lea rcx, [rsp+68h+var_38] mov rdi, rbx call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+68h+var_38] mov rdi, rax call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_1E2FB loc_1E27C: lea rsi, aMissingSubpara; "missing subparam in json data: " lea rdi, [rsp+68h+var_38]; this mov rdx, rbx call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) call __ZN6Logger11getInstanceEv; Logger::getInstance(void) mov rbx, rax lea rsi, aFiguresStorage; "FIGURES_STORAGE" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) push 2 pop rsi lea rdx, [rsp+68h+var_58] lea rcx, [rsp+68h+var_38] mov rdi, rbx call __ZN6Logger3logENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; Logger::log(Logger::Level,std::string const&,std::string const&) lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+68h+var_38] mov rdi, rax call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_1E2FB: jmp short $+2 loc_1E2FD: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_1E324 jmp short $+2 loc_1E30C: mov rbx, rax lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1E324 jmp short loc_1E321 jmp short loc_1E321 jmp short $+2 loc_1E321: mov rbx, rax loc_1E324: lea rdi, [rsp+68h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long checkSubParam(long long a1, long long a2, long long a3) { long long v4; // rax long long result; // rax long long Instance; // rbx void *exception; // r14 long long v8; // rbx void *v9; // r14 char v10; // [rsp+Fh] [rbp-59h] BYREF _BYTE v11[32]; // [rsp+10h] [rbp-58h] BYREF _BYTE v12[56]; // [rsp+30h] [rbp-38h] BYREF if ( !(unsigned __int8)((long long (*)(void))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>::contains)() ) { std::operator+<char>(v12, "missing param in json data: ", a2); Instance = Logger::getInstance((Logger *)v12); std::string::basic_string<std::allocator<char>>(v11, "FIGURES_STORAGE", &v10); Logger::log(Instance, 2LL, v11, v12); std::string::~string(v11); exception = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(exception, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } v4 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, a2); result = 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>::contains( v4, a3); if ( !(_BYTE)result ) { std::operator+<char>(v12, "missing subparam in json data: ", a3); v8 = Logger::getInstance((Logger *)v12); std::string::basic_string<std::allocator<char>>(v11, "FIGURES_STORAGE", &v10); Logger::log(v8, 2LL, v11, v12); std::string::~string(v11); v9 = __cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v9, v12); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } return result; }
checkSubParam: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0011d5e0 TEST AL,AL JZ 0x0011e1fb MOV RDI,R15 MOV RSI,R14 CALL 0x0011d1a0 MOV RDI,RAX MOV RSI,RBX CALL 0x0011d5e0 TEST AL,AL JZ 0x0011e27c ADD RSP,0x50 POP RBX POP R14 POP R15 RET LAB_0011e1fb: LEA RSI,[0x12b5ec] LEA RDI,[RSP + 0x30] MOV RDX,R14 CALL 0x0011cf60 LAB_0011e20f: CALL 0x0011c450 LAB_0011e214: MOV RBX,RAX LEA RSI,[0x12b609] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0011dc00 LAB_0011e22d: PUSH 0x2 POP RSI LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0x30] MOV RDI,RBX CALL 0x0011d340 LAB_0011e242: LEA RDI,[RSP + 0x10] CALL 0x0011c6f0 PUSH 0x10 POP RDI CALL 0x0011c790 MOV R14,RAX LAB_0011e257: LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x0011dc50 LAB_0011e264: MOV RSI,qword ptr [0x00138fd8] MOV RDX,qword ptr [0x00138fc0] MOV RDI,R14 CALL 0x0011dc20 LAB_0011e27c: LEA RSI,[0x12b619] LEA RDI,[RSP + 0x30] MOV RDX,RBX CALL 0x0011cf60 LAB_0011e290: CALL 0x0011c450 LAB_0011e295: MOV RBX,RAX LEA RSI,[0x12b609] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0011dc00 LAB_0011e2ae: PUSH 0x2 POP RSI LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0x30] MOV RDI,RBX CALL 0x0011d340 LAB_0011e2c3: LEA RDI,[RSP + 0x10] CALL 0x0011c6f0 PUSH 0x10 POP RDI CALL 0x0011c790 MOV R14,RAX LAB_0011e2d8: LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x0011dc50 LAB_0011e2e5: MOV RSI,qword ptr [0x00138fd8] MOV RDX,qword ptr [0x00138fc0] MOV RDI,R14 CALL 0x0011dc20
/* checkSubParam(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> const&, std::__cxx11::string const&, std::__cxx11::string const&) */ void checkSubParam(basic_json *param_1,string *param_2,string *param_3) { basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this; int8 uVar1; char cVar2; invalid_argument *piVar3; allocator local_59; string local_58 [32]; string local_38 [32]; cVar2 = 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> ::contains((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> *)param_1,param_2); if (cVar2 == '\0') { std::operator+((char *)local_38,(string *)"missing param in json data: "); /* try { // try from 0011e20f to 0011e213 has its CatchHandler @ 0011e321 */ uVar1 = Logger::getInstance(); /* try { // try from 0011e214 to 0011e22c has its CatchHandler @ 0011e31d */ std::__cxx11::string::string<std::allocator<char>>(local_58,"FIGURES_STORAGE",&local_59); /* try { // try from 0011e22d to 0011e241 has its CatchHandler @ 0011e30c */ Logger::log(uVar1,2,local_58,local_38); std::__cxx11::string::~string(local_58); piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0011e257 to 0011e263 has its CatchHandler @ 0011e2fd */ std::invalid_argument::invalid_argument(piVar3,local_38); /* try { // try from 0011e264 to 0011e279 has its CatchHandler @ 0011e321 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar3,PTR_typeinfo_00138fd8,PTR__invalid_argument_00138fc0); } this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,param_2); cVar2 = 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> ::contains(this,param_3); if (cVar2 != '\0') { return; } std::operator+((char *)local_38,(string *)"missing subparam in json data: "); /* try { // try from 0011e290 to 0011e294 has its CatchHandler @ 0011e31f */ uVar1 = Logger::getInstance(); /* try { // try from 0011e295 to 0011e2ad has its CatchHandler @ 0011e31b */ std::__cxx11::string::string<std::allocator<char>>(local_58,"FIGURES_STORAGE",&local_59); /* try { // try from 0011e2ae to 0011e2c2 has its CatchHandler @ 0011e30a */ Logger::log(uVar1,2,local_58,local_38); std::__cxx11::string::~string(local_58); piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0011e2d8 to 0011e2e4 has its CatchHandler @ 0011e2fb */ std::invalid_argument::invalid_argument(piVar3,local_38); /* try { // try from 0011e2e5 to 0011e2fa has its CatchHandler @ 0011e31f */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar3,PTR_typeinfo_00138fd8,PTR__invalid_argument_00138fc0); }
39,615
LefDefParser::lefwEndBeginext()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwEndBeginext() { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_BEGINEXT_START && lefwState != LEFW_BEGINEXT) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\nENDEXT\n\n"); else fprintf(lefwFile, ";\nENDEXT\n\n"); lefwState = LEFW_BEGINEXT_END; lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwEndBeginext(): pushq %rbx leaq 0xc4ce(%rip), %rax # 0x24e00 movq (%rax), %rcx testq %rcx, %rcx je 0x1897a leaq 0xc713(%rip), %rdx # 0x25054 movl $0x2, %eax cmpl $0x0, (%rdx) je 0x189a8 leaq 0xc6fe(%rip), %rbx # 0x25050 movl (%rbx), %edx cmpl $0x14, %edx je 0x1895e cmpl $0x3, %edx jne 0x189a8 cmpb $0x1, 0xc787(%rip) # 0x250ec jne 0x18981 leaq 0x3a7f(%rip), %rsi # 0x1c3ed movq %rcx, %rdi xorl %eax, %eax callq 0x18c35 jmp 0x18997 movl $0x1, %eax jmp 0x189a8 leaq 0x3a65(%rip), %rdi # 0x1c3ed movl $0xa, %esi movl $0x1, %edx callq 0x1110 movl $0x51, (%rbx) leaq 0xc6a8(%rip), %rax # 0x2504c incl (%rax) xorl %eax, %eax popq %rbx retq
_ZN12LefDefParser15lefwEndBeginextEv: push rbx lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rax] test rcx, rcx jz short loc_1897A lea rdx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov eax, 2 cmp dword ptr [rdx], 0 jz short loc_189A8 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rbx] cmp edx, 14h jz short loc_1895E cmp edx, 3 jnz short loc_189A8 loc_1895E: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_18981 lea rsi, aEndext; ";\nENDEXT\n\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_18997 loc_1897A: mov eax, 1 jmp short loc_189A8 loc_18981: lea rdi, aEndext; ";\nENDEXT\n\n" mov esi, 0Ah mov edx, 1 call _fwrite loc_18997: mov dword ptr [rbx], 51h ; 'Q' lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_189A8: pop rbx retn
long long LefDefParser::lefwEndBeginext( LefDefParser *this, long long a2, long long a3, long long a4, int a5, int a6) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit && (LefDefParser::lefwState == 20 || LefDefParser::lefwState == 3) ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)";\nENDEXT\n\n", LefDefParser::lefwState, LefDefParser::lefwFile, a5, a6); else fwrite(";\nENDEXT\n\n", 10LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); LefDefParser::lefwState = 81; ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwEndBeginext: PUSH RBX LEA RAX,[0x124e00] MOV RCX,qword ptr [RAX] TEST RCX,RCX JZ 0x0011897a LEA RDX,[0x125054] MOV EAX,0x2 CMP dword ptr [RDX],0x0 JZ 0x001189a8 LEA RBX,[0x125050] MOV EDX,dword ptr [RBX] CMP EDX,0x14 JZ 0x0011895e CMP EDX,0x3 JNZ 0x001189a8 LAB_0011895e: CMP byte ptr [0x001250ec],0x1 JNZ 0x00118981 LEA RSI,[0x11c3ed] MOV RDI,RCX XOR EAX,EAX CALL 0x00118c35 JMP 0x00118997 LAB_0011897a: MOV EAX,0x1 JMP 0x001189a8 LAB_00118981: LEA RDI,[0x11c3ed] MOV ESI,0xa MOV EDX,0x1 CALL 0x00101110 LAB_00118997: MOV dword ptr [RBX],0x51 LEA RAX,[0x12504c] INC dword ptr [RAX] XOR EAX,EAX LAB_001189a8: POP RBX RET
/* LefDefParser::lefwEndBeginext() */ int8 LefDefParser::lefwEndBeginext(void) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (lefwDidInit != 0) { if ((lefwState == 0x14) || (lefwState == 3)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,";\nENDEXT\n\n"); } else { fwrite(";\nENDEXT\n\n",10,1,lefwFile); } lefwState = 0x51; lefwLines = lefwLines + 1; uVar1 = 0; } } } return uVar1; }
39,616
my_default_csname
eloqsql/mysys/charset.c
const char* my_default_csname() { const char* csname = NULL; #ifdef _WIN32 char cpbuf[64]; int cp = GetConsoleCP(); if (cp == 0) cp = GetACP(); snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp); csname = my_os_charset_to_mysql_charset(cpbuf); #elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO) if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET))) csname = my_os_charset_to_mysql_charset(csname); #endif return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME; }
O0
c
my_default_csname: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq $0x0, -0x8(%rbp) xorl %edi, %edi leaq 0x604ca(%rip), %rsi # 0xd0d93 callq 0x367b0 cmpq $0x0, %rax je 0x708f5 movl $0xe, %edi callq 0x36730 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0x708f5 movq -0x8(%rbp), %rdi callq 0x70920 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x70906 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x70913 leaq 0x5acf2(%rip), %rax # 0xcb5ff movq %rax, -0x10(%rbp) jmp 0x70913 movq -0x10(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_default_csname: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], 0 xor edi, edi lea rsi, asc_D0D8F+4; "" call _setlocale cmp rax, 0 jz short loc_708F5 mov edi, 0Eh call _nl_langinfo mov [rbp+var_8], rax cmp rax, 0 jz short loc_708F5 mov rdi, [rbp+var_8] call my_os_charset_to_mysql_charset mov [rbp+var_8], rax loc_708F5: cmp [rbp+var_8], 0 jz short loc_70906 mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short loc_70913 loc_70906: lea rax, aLatin1; "latin1" mov [rbp+var_10], rax jmp short $+2 loc_70913: mov rax, [rbp+var_10] add rsp, 10h pop rbp retn
const char *my_default_csname() { long long v2; // [rsp+8h] [rbp-8h] v2 = 0LL; if ( setlocale(0LL, "") ) { v2 = nl_langinfo(14LL); if ( v2 ) v2 = my_os_charset_to_mysql_charset(v2); } if ( v2 ) return (const char *)v2; else return "latin1"; }
my_default_csname: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],0x0 XOR EDI,EDI LEA RSI,[0x1d0d93] CALL 0x001367b0 CMP RAX,0x0 JZ 0x001708f5 MOV EDI,0xe CALL 0x00136730 MOV qword ptr [RBP + -0x8],RAX CMP RAX,0x0 JZ 0x001708f5 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00170920 MOV qword ptr [RBP + -0x8],RAX LAB_001708f5: CMP qword ptr [RBP + -0x8],0x0 JZ 0x00170906 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x00170913 LAB_00170906: LEA RAX,[0x1cb5ff] MOV qword ptr [RBP + -0x10],RAX JMP 0x00170913 LAB_00170913: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
char * my_default_csname(void) { char *pcVar1; char *local_18; char *local_10; local_10 = (char *)0x0; pcVar1 = setlocale(0,&DAT_001d0d93); if (pcVar1 != (char *)0x0) { local_10 = nl_langinfo(0xe); if (local_10 != (char *)0x0) { local_10 = (char *)my_os_charset_to_mysql_charset(local_10); } } if (local_10 == (char *)0x0) { local_18 = "latin1"; } else { local_18 = local_10; } return local_18; }
39,617
mysql_ssl_set
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) { #ifdef HAVE_TLS char enable= 1; return (mysql_optionsv(mysql, MYSQL_OPT_SSL_ENFORCE, &enable) | mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, key) | mysql_optionsv(mysql, MYSQL_OPT_SSL_CERT, cert) | mysql_optionsv(mysql, MYSQL_OPT_SSL_CA, ca) | mysql_optionsv(mysql, MYSQL_OPT_SSL_CAPATH, capath) | mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, cipher)) ? 1 : 0; #else return 0; #endif }
O3
c
mysql_ssl_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, -0x40(%rbp) movq %r8, -0x38(%rbp) movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r14 leaq -0x29(%rbp), %rdx movb $0x1, (%rdx) movl $0x26, %esi xorl %eax, %eax callq 0x190e2 movl %eax, %r15d movq %r14, %rdi movl $0x19, %esi movq %rbx, %rdx xorl %eax, %eax callq 0x190e2 movl %eax, %ebx orl %r15d, %ebx movq %r14, %rdi movl $0x1a, %esi movq %r13, %rdx xorl %eax, %eax callq 0x190e2 movl %eax, %r15d movq %r14, %rdi movl $0x1b, %esi movq %r12, %rdx xorl %eax, %eax callq 0x190e2 movl %eax, %r12d orl %r15d, %r12d orl %ebx, %r12d movq %r14, %rdi movl $0x1c, %esi movq -0x38(%rbp), %rdx xorl %eax, %eax callq 0x190e2 movl %eax, %ebx orl %r12d, %ebx movq %r14, %rdi movl $0x1d, %esi movq -0x40(%rbp), %rdx xorl %eax, %eax callq 0x190e2 xorl %ecx, %ecx orl %ebx, %eax setne %cl movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_ssl_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r9 mov [rbp+var_38], r8 mov r12, rcx mov r13, rdx mov rbx, rsi mov r14, rdi lea rdx, [rbp+var_29] mov byte ptr [rdx], 1 mov esi, 26h ; '&' xor eax, eax call mysql_optionsv mov r15d, eax mov rdi, r14 mov esi, 19h mov rdx, rbx xor eax, eax call mysql_optionsv mov ebx, eax or ebx, r15d mov rdi, r14 mov esi, 1Ah mov rdx, r13 xor eax, eax call mysql_optionsv mov r15d, eax mov rdi, r14 mov esi, 1Bh mov rdx, r12 xor eax, eax call mysql_optionsv mov r12d, eax or r12d, r15d or r12d, ebx mov rdi, r14 mov esi, 1Ch mov rdx, [rbp+var_38] xor eax, eax call mysql_optionsv mov ebx, eax or ebx, r12d mov rdi, r14 mov esi, 1Dh mov rdx, [rbp+var_40] xor eax, eax call mysql_optionsv xor ecx, ecx or eax, ebx setnz cl mov eax, ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BOOL8 mysql_ssl_set( long long a1, char *a2, char *a3, long long a4, char *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char *v14; // r12 int v16; // r15d long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 int v22; // ebx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 int v28; // r15d long long v29; // rcx long long v30; // r8 long long v31; // r9 __m128 v32; // xmm4 __m128 v33; // xmm5 long long v34; // rcx long long v35; // r8 long long v36; // r9 __m128 v37; // xmm4 __m128 v38; // xmm5 int v39; // ebx long long v40; // rcx long long v41; // r8 long long v42; // r9 __m128 v43; // xmm4 __m128 v44; // xmm5 char v46; // [rsp+0h] [rbp-40h] char v47; // [rsp+0h] [rbp-40h] char v48; // [rsp+0h] [rbp-40h] char v49; // [rsp+0h] [rbp-40h] char *v50; // [rsp+0h] [rbp-40h] char v52[41]; // [rsp+17h] [rbp-29h] BYREF v14 = (char *)a4; v52[0] = 1; v16 = mysql_optionsv(a1, 38, v52, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a6); v22 = v16 | mysql_optionsv(a1, 25, a2, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14, v46); v28 = mysql_optionsv(a1, 26, a3, v23, v24, v25, a7, a8, a9, a10, v26, v27, a13, a14, v47); LODWORD(v14) = v22 | v28 | mysql_optionsv(a1, 27, v14, v29, v30, v31, a7, a8, a9, a10, v32, v33, a13, a14, v48); v39 = (unsigned int)v14 | mysql_optionsv(a1, 28, a5, v34, v35, v36, a7, a8, a9, a10, v37, v38, a13, a14, v49); return (v39 | (unsigned int)mysql_optionsv(a1, 29, v50, v40, v41, v42, a7, a8, a9, a10, v43, v44, a13, a14, (char)v50)) != 0; }
mysql_ssl_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R9 MOV qword ptr [RBP + -0x38],R8 MOV R12,RCX MOV R13,RDX MOV RBX,RSI MOV R14,RDI LEA RDX,[RBP + -0x29] MOV byte ptr [RDX],0x1 MOV ESI,0x26 XOR EAX,EAX CALL 0x001190e2 MOV R15D,EAX MOV RDI,R14 MOV ESI,0x19 MOV RDX,RBX XOR EAX,EAX CALL 0x001190e2 MOV EBX,EAX OR EBX,R15D MOV RDI,R14 MOV ESI,0x1a MOV RDX,R13 XOR EAX,EAX CALL 0x001190e2 MOV R15D,EAX MOV RDI,R14 MOV ESI,0x1b MOV RDX,R12 XOR EAX,EAX CALL 0x001190e2 MOV R12D,EAX OR R12D,R15D OR R12D,EBX MOV RDI,R14 MOV ESI,0x1c MOV RDX,qword ptr [RBP + -0x38] XOR EAX,EAX CALL 0x001190e2 MOV EBX,EAX OR EBX,R12D MOV RDI,R14 MOV ESI,0x1d MOV RDX,qword ptr [RBP + -0x40] XOR EAX,EAX CALL 0x001190e2 XOR ECX,ECX OR EAX,EBX SETNZ CL MOV EAX,ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool mysql_ssl_set(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; iVar1 = mysql_optionsv(param_1,0x26); iVar2 = mysql_optionsv(param_1,0x19,param_2); iVar3 = mysql_optionsv(param_1,0x1a,param_3); iVar4 = mysql_optionsv(param_1,0x1b,param_4); iVar5 = mysql_optionsv(param_1,0x1c,param_5); iVar6 = mysql_optionsv(param_1,0x1d,param_6); return iVar6 != 0 || (iVar5 != 0 || ((iVar4 != 0 || iVar3 != 0) || (iVar2 != 0 || iVar1 != 0))); }
39,618
ESRGAN::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_first_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_first_b for (int i = 0; i < num_blocks; i++) { mem_size += body_blocks[i].calculate_mem_size(); } mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_body_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_body_w // upsample mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up1_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up1_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up2_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up2_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_hr_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_hr_b mem_size += out_channels * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_last_w mem_size += out_channels * ggml_type_size(GGML_TYPE_F32); // conv_last_b return mem_size; }
O0
cpp
ESRGAN::calculate_mem_size(): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rcx movq %rcx, 0x60(%rsp) movl 0x78(%rcx), %eax imull 0x70(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x58(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x58(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx movq %rcx, 0x78(%rsp) movslq 0x78(%rax), %rax movq %rax, 0x68(%rsp) xorl %edi, %edi callq 0x11afb0 movq %rax, %rcx movq 0x68(%rsp), %rax imulq %rcx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl $0x0, 0x74(%rsp) movq 0x60(%rsp), %rcx movl 0x74(%rsp), %eax cmpl 0x6c(%rcx), %eax jge 0xf0783 movq 0x60(%rsp), %rdi addq $0x98, %rdi movslq 0x74(%rsp), %rax imulq $0x110, %rax, %rax # imm = 0x110 addq %rax, %rdi callq 0xf0a40 addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x74(%rsp), %eax addl $0x1, %eax movl %eax, 0x74(%rsp) jmp 0xf073e movq 0x60(%rsp), %rcx movl 0x78(%rcx), %eax imull 0x78(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x8(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x8(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx addq 0x78(%rsp), %rcx movq %rcx, 0x78(%rsp) movslq 0x78(%rax), %rax movq %rax, 0x10(%rsp) xorl %edi, %edi callq 0x11afb0 movq 0x60(%rsp), %rcx movq %rax, %rdx movq 0x10(%rsp), %rax imulq %rdx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x78(%rcx), %eax imull 0x78(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x18(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x18(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx addq 0x78(%rsp), %rcx movq %rcx, 0x78(%rsp) movslq 0x78(%rax), %rax movq %rax, 0x20(%rsp) xorl %edi, %edi callq 0x11afb0 movq 0x60(%rsp), %rcx movq %rax, %rdx movq 0x20(%rsp), %rax imulq %rdx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x78(%rcx), %eax imull 0x78(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x28(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x28(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx addq 0x78(%rsp), %rcx movq %rcx, 0x78(%rsp) movslq 0x78(%rax), %rax movq %rax, 0x30(%rsp) xorl %edi, %edi callq 0x11afb0 movq 0x60(%rsp), %rcx movq %rax, %rdx movq 0x30(%rsp), %rax imulq %rdx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x78(%rcx), %eax imull 0x78(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x38(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x38(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx addq 0x78(%rsp), %rcx movq %rcx, 0x78(%rsp) movslq 0x78(%rax), %rax movq %rax, 0x40(%rsp) xorl %edi, %edi callq 0x11afb0 movq 0x60(%rsp), %rcx movq %rax, %rdx movq 0x40(%rsp), %rax imulq %rdx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x74(%rcx), %eax imull 0x78(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x48(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x48(%rsp), %rcx movq %rax, %rdx movq 0x60(%rsp), %rax imulq %rdx, %rcx addq 0x78(%rsp), %rcx movq %rcx, 0x78(%rsp) movslq 0x74(%rax), %rax movq %rax, 0x50(%rsp) xorl %edi, %edi callq 0x11afb0 movq %rax, %rcx movq 0x50(%rsp), %rax imulq %rcx, %rax addq 0x78(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax addq $0x88, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN6ESRGAN18calculate_mem_sizeEv: sub rsp, 88h mov [rsp+88h+var_8], rdi mov rcx, [rsp+88h+var_8] mov [rsp+88h+var_28], rcx mov eax, [rcx+78h] imul eax, [rcx+70h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_30], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_30] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+78h] mov [rsp+88h+var_20], rax xor edi, edi call ggml_type_size mov rcx, rax mov rax, [rsp+88h+var_20] imul rax, rcx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov [rsp+88h+var_14], 0 loc_F073E: mov rcx, [rsp+88h+var_28] mov eax, [rsp+88h+var_14] cmp eax, [rcx+6Ch] jge short loc_F0783 mov rdi, [rsp+88h+var_28] add rdi, 98h movsxd rax, [rsp+88h+var_14] imul rax, 110h add rdi, rax; this call _ZN11EsrganBlock18calculate_mem_sizeEv; EsrganBlock::calculate_mem_size(void) add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov eax, [rsp+88h+var_14] add eax, 1 mov [rsp+88h+var_14], eax jmp short loc_F073E loc_F0783: mov rcx, [rsp+88h+var_28] mov eax, [rcx+78h] imul eax, [rcx+78h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_80], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_80] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx add rcx, [rsp+88h+var_10] mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+78h] mov [rsp+88h+var_78], rax xor edi, edi call ggml_type_size mov rcx, [rsp+88h+var_28] mov rdx, rax mov rax, [rsp+88h+var_78] imul rax, rdx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov eax, [rcx+78h] imul eax, [rcx+78h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_70], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_70] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx add rcx, [rsp+88h+var_10] mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+78h] mov [rsp+88h+var_68], rax xor edi, edi call ggml_type_size mov rcx, [rsp+88h+var_28] mov rdx, rax mov rax, [rsp+88h+var_68] imul rax, rdx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov eax, [rcx+78h] imul eax, [rcx+78h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_60], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_60] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx add rcx, [rsp+88h+var_10] mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+78h] mov [rsp+88h+var_58], rax xor edi, edi call ggml_type_size mov rcx, [rsp+88h+var_28] mov rdx, rax mov rax, [rsp+88h+var_58] imul rax, rdx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov eax, [rcx+78h] imul eax, [rcx+78h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_50], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_50] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx add rcx, [rsp+88h+var_10] mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+78h] mov [rsp+88h+var_48], rax xor edi, edi call ggml_type_size mov rcx, [rsp+88h+var_28] mov rdx, rax mov rax, [rsp+88h+var_48] imul rax, rdx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov eax, [rcx+74h] imul eax, [rcx+78h] imul eax, 3 imul eax, 3 cdqe mov [rsp+88h+var_40], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+88h+var_40] mov rdx, rax mov rax, [rsp+88h+var_28] imul rcx, rdx add rcx, [rsp+88h+var_10] mov [rsp+88h+var_10], rcx movsxd rax, dword ptr [rax+74h] mov [rsp+88h+var_38], rax xor edi, edi call ggml_type_size mov rcx, rax mov rax, [rsp+88h+var_38] imul rax, rcx add rax, [rsp+88h+var_10] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_10] add rsp, 88h retn
long long ESRGAN::calculate_mem_size(ESRGAN *this) { long long v2; // [rsp+8h] [rbp-80h] long long v3; // [rsp+10h] [rbp-78h] long long v4; // [rsp+18h] [rbp-70h] long long v5; // [rsp+20h] [rbp-68h] long long v6; // [rsp+28h] [rbp-60h] long long v7; // [rsp+30h] [rbp-58h] long long v8; // [rsp+38h] [rbp-50h] long long v9; // [rsp+40h] [rbp-48h] long long v10; // [rsp+48h] [rbp-40h] long long v11; // [rsp+50h] [rbp-38h] long long v12; // [rsp+58h] [rbp-30h] long long v13; // [rsp+68h] [rbp-20h] int i; // [rsp+74h] [rbp-14h] long long v15; // [rsp+78h] [rbp-10h] long long v16; // [rsp+78h] [rbp-10h] long long v17; // [rsp+78h] [rbp-10h] long long v18; // [rsp+78h] [rbp-10h] long long v19; // [rsp+78h] [rbp-10h] long long v20; // [rsp+78h] [rbp-10h] long long v21; // [rsp+78h] [rbp-10h] long long v22; // [rsp+78h] [rbp-10h] long long v23; // [rsp+78h] [rbp-10h] long long v24; // [rsp+78h] [rbp-10h] long long v25; // [rsp+78h] [rbp-10h] v12 = 9 * *((_DWORD *)this + 28) * *((_DWORD *)this + 30); v15 = ggml_type_size(1LL) * v12; v13 = *((int *)this + 30); v16 = v15 + ggml_type_size(0LL) * v13; for ( i = 0; i < *((_DWORD *)this + 27); ++i ) v16 += EsrganBlock::calculate_mem_size((ESRGAN *)((char *)this + 272 * i + 152)); v2 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v17 = v16 + ggml_type_size(1LL) * v2; v3 = *((int *)this + 30); v18 = v17 + ggml_type_size(0LL) * v3; v4 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v19 = v18 + ggml_type_size(1LL) * v4; v5 = *((int *)this + 30); v20 = v19 + ggml_type_size(0LL) * v5; v6 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v21 = v20 + ggml_type_size(1LL) * v6; v7 = *((int *)this + 30); v22 = v21 + ggml_type_size(0LL) * v7; v8 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v23 = v22 + ggml_type_size(1LL) * v8; v9 = *((int *)this + 30); v24 = v23 + ggml_type_size(0LL) * v9; v10 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 29); v25 = v24 + ggml_type_size(1LL) * v10; v11 = *((int *)this + 29); return v25 + ggml_type_size(0LL) * v11; }
calculate_mem_size: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],RCX MOV EAX,dword ptr [RCX + 0x78] IMUL EAX,dword ptr [RCX + 0x70] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x58],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x58] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x78] MOV qword ptr [RSP + 0x68],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x68] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV dword ptr [RSP + 0x74],0x0 LAB_001f073e: MOV RCX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RSP + 0x74] CMP EAX,dword ptr [RCX + 0x6c] JGE 0x001f0783 MOV RDI,qword ptr [RSP + 0x60] ADD RDI,0x98 MOVSXD RAX,dword ptr [RSP + 0x74] IMUL RAX,RAX,0x110 ADD RDI,RAX CALL 0x001f0a40 ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV EAX,dword ptr [RSP + 0x74] ADD EAX,0x1 MOV dword ptr [RSP + 0x74],EAX JMP 0x001f073e LAB_001f0783: MOV RCX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RCX + 0x78] IMUL EAX,dword ptr [RCX + 0x78] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x8],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x78] MOV qword ptr [RSP + 0x10],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x60] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x10] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV EAX,dword ptr [RCX + 0x78] IMUL EAX,dword ptr [RCX + 0x78] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x18],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x18] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x78] MOV qword ptr [RSP + 0x20],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x60] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x20] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV EAX,dword ptr [RCX + 0x78] IMUL EAX,dword ptr [RCX + 0x78] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x28],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x28] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x78] MOV qword ptr [RSP + 0x30],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x60] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x30] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV EAX,dword ptr [RCX + 0x78] IMUL EAX,dword ptr [RCX + 0x78] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x38],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x38] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x78] MOV qword ptr [RSP + 0x40],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x60] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x40] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV EAX,dword ptr [RCX + 0x74] IMUL EAX,dword ptr [RCX + 0x78] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x48],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x48] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x60] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RCX MOVSXD RAX,dword ptr [RAX + 0x74] MOV qword ptr [RSP + 0x50],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x50] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x78] ADD RSP,0x88 RET
/* ESRGAN::calculate_mem_size() */ long __thiscall ESRGAN::calculate_mem_size(ESRGAN *this) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; int iVar15; long lVar16; long lVar17; long lVar18; long lVar19; long lVar20; long lVar21; long lVar22; long lVar23; long lVar24; long lVar25; int local_14; long local_10; iVar1 = *(int *)(this + 0x78); iVar2 = *(int *)(this + 0x70); lVar16 = ggml_type_size(1); iVar3 = *(int *)(this + 0x78); lVar17 = ggml_type_size(0); local_10 = iVar3 * lVar17 + (iVar1 * iVar2 * 9) * lVar16; for (local_14 = 0; local_14 < *(int *)(this + 0x6c); local_14 = local_14 + 1) { lVar16 = EsrganBlock::calculate_mem_size((EsrganBlock *)(this + (long)local_14 * 0x110 + 0x98)); local_10 = lVar16 + local_10; } iVar1 = *(int *)(this + 0x78); iVar2 = *(int *)(this + 0x78); lVar16 = ggml_type_size(1); iVar3 = *(int *)(this + 0x78); lVar17 = ggml_type_size(0); iVar4 = *(int *)(this + 0x78); iVar5 = *(int *)(this + 0x78); lVar18 = ggml_type_size(1); iVar6 = *(int *)(this + 0x78); lVar19 = ggml_type_size(0); iVar7 = *(int *)(this + 0x78); iVar8 = *(int *)(this + 0x78); lVar20 = ggml_type_size(1); iVar9 = *(int *)(this + 0x78); lVar21 = ggml_type_size(0); iVar10 = *(int *)(this + 0x78); iVar11 = *(int *)(this + 0x78); lVar22 = ggml_type_size(1); iVar12 = *(int *)(this + 0x78); lVar23 = ggml_type_size(0); iVar13 = *(int *)(this + 0x74); iVar14 = *(int *)(this + 0x78); lVar24 = ggml_type_size(1); iVar15 = *(int *)(this + 0x74); lVar25 = ggml_type_size(0); return iVar15 * lVar25 + (iVar13 * iVar14 * 9) * lVar24 + iVar12 * lVar23 + (iVar10 * iVar11 * 9) * lVar22 + iVar9 * lVar21 + (iVar7 * iVar8 * 9) * lVar20 + iVar6 * lVar19 + (iVar4 * iVar5 * 9) * lVar18 + iVar3 * lVar17 + (iVar1 * iVar2 * 9) * lVar16 + local_10; }
39,619
ESRGAN::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_first_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_first_b for (int i = 0; i < num_blocks; i++) { mem_size += body_blocks[i].calculate_mem_size(); } mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_body_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_body_w // upsample mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up1_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up1_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up2_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up2_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_hr_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_hr_b mem_size += out_channels * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_last_w mem_size += out_channels * ggml_type_size(GGML_TYPE_F32); // conv_last_b return mem_size; }
O1
cpp
ESRGAN::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movl 0x78(%rdi), %eax imull 0x70(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %rbx, %r15 movslq 0x78(%r14), %rbx xorl %edi, %edi callq 0x8e159 imulq %rbx, %rax addq %r15, %rax movq %rax, (%rsp) cmpl $0x0, 0x6c(%r14) jle 0x7ca1a leaq 0x98(%r14), %rax xorl %r13d, %r13d movq %rax, %rbp movq %rax, 0x8(%rsp) movq %r14, 0x10(%rsp) imulq $0x110, %r13, %rbx # imm = 0x110 cmpl $0x0, 0x108(%rax,%rbx) jle 0x7c9f6 addq %rax, %rbx movq %rbp, %r15 xorl %r14d, %r14d xorl %r12d, %r12d movq %r15, %rdi callq 0x7cb84 addq %rax, %r12 incq %r14 movslq 0x108(%rbx), %rax addq $0x58, %r15 cmpq %rax, %r14 jl 0x7c9d6 jmp 0x7c9f9 xorl %r12d, %r12d addq %r12, (%rsp) incq %r13 movq 0x10(%rsp), %r14 movslq 0x6c(%r14), %rax addq $0x110, %rbp # imm = 0x110 cmpq %rax, %r13 movq 0x8(%rsp), %rax jl 0x7c9b9 movl 0x78(%r14), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %rax, %r12 imulq %rbx, %r12 movslq 0x78(%r14), %rbx xorl %edi, %edi callq 0x8e159 movq %rax, %r15 imulq %rbx, %r15 addq %r12, %r15 addq (%rsp), %r15 movl 0x78(%r14), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %r14, %r13 movq %rax, %r14 imulq %rbx, %r14 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8e159 movq %rax, %r12 imulq %rbx, %r12 addq %r14, %r12 movl 0x78(%r13), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %rax, %r14 imulq %rbx, %r14 addq %r12, %r14 addq %r15, %r14 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8e159 movq %rax, %r15 imulq %rbx, %r15 movl 0x78(%r13), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %rax, %r12 imulq %rbx, %r12 addq %r15, %r12 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8e159 movq %rax, %r15 imulq %rbx, %r15 addq %r12, %r15 movl 0x74(%r13), %eax imull 0x78(%r13), %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8e159 movq %rax, %r12 imulq %rbx, %r12 addq %r15, %r12 addq %r14, %r12 movslq 0x74(%r13), %rbx xorl %edi, %edi callq 0x8e159 imulq %rbx, %rax addq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6ESRGAN18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov eax, [rdi+78h] imul eax, [rdi+70h] lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, rbx movsxd rbx, dword ptr [r14+78h] xor edi, edi call ggml_type_size imul rax, rbx add rax, r15 mov [rsp+48h+var_48], rax cmp dword ptr [r14+6Ch], 0 jle short loc_7CA1A lea rax, [r14+98h] xor r13d, r13d mov rbp, rax mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], r14 loc_7C9B9: imul rbx, r13, 110h cmp dword ptr [rax+rbx+108h], 0 jle short loc_7C9F6 add rbx, rax mov r15, rbp xor r14d, r14d xor r12d, r12d loc_7C9D6: mov rdi, r15; this call _ZN18ResidualDenseBlock18calculate_mem_sizeEv; ResidualDenseBlock::calculate_mem_size(void) add r12, rax inc r14 movsxd rax, dword ptr [rbx+108h] add r15, 58h ; 'X' cmp r14, rax jl short loc_7C9D6 jmp short loc_7C9F9 loc_7C9F6: xor r12d, r12d loc_7C9F9: add [rsp+48h+var_48], r12 inc r13 mov r14, [rsp+48h+var_38] movsxd rax, dword ptr [r14+6Ch] add rbp, 110h cmp r13, rax mov rax, [rsp+48h+var_40] jl short loc_7C9B9 loc_7CA1A: mov eax, [r14+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, rbx movsxd rbx, dword ptr [r14+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx add r15, r12 add r15, [rsp+48h+var_48] mov eax, [r14+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r13, r14 mov r14, rax imul r14, rbx movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r12, rax imul r12, rbx add r12, r14 mov eax, [r13+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, rbx add r14, r12 add r14, r15 movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx mov eax, [r13+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, rbx add r12, r15 movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx add r15, r12 mov eax, [r13+74h] imul eax, [r13+78h] lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, rbx add r12, r15 add r12, r14 movsxd rbx, dword ptr [r13+74h] xor edi, edi call ggml_type_size imul rax, rbx add rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ESRGAN::calculate_mem_size(ESRGAN *this) { ESRGAN *v1; // r14 long long v2; // rbx long long v3; // r15 long long v4; // rbx char *v5; // rax long long v6; // r13 ResidualDenseBlock *v7; // rbp char *v8; // rbx ResidualDenseBlock *v9; // r15 long long v10; // r14 long long v11; // r12 long long v12; // rbx long long v13; // r12 long long v14; // rbx long long v15; // r15 long long v16; // rbx ESRGAN *v17; // r13 long long v18; // r14 long long v19; // rbx long long v20; // r12 long long v21; // rbx long long v22; // r14 long long v23; // rbx long long v24; // r15 long long v25; // rbx long long v26; // r12 long long v27; // rbx long long v28; // r15 long long v29; // rbx long long v30; // r12 long long v31; // rbx long long v33; // [rsp+0h] [rbp-48h] v1 = this; v2 = 9 * *((_DWORD *)this + 28) * *((_DWORD *)this + 30); v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 30); v33 = v3 + v4 * ggml_type_size(0LL); if ( *((int *)this + 27) > 0 ) { v5 = (char *)this + 152; v6 = 0LL; v7 = (ESRGAN *)((char *)this + 152); do { if ( *(int *)&v5[272 * v6 + 264] <= 0 ) { v11 = 0LL; } else { v8 = &v5[272 * v6]; v9 = v7; v10 = 0LL; v11 = 0LL; do { v11 += ResidualDenseBlock::calculate_mem_size(v9); ++v10; v9 = (ResidualDenseBlock *)((char *)v9 + 88); } while ( v10 < *((int *)v8 + 66) ); } v33 += v11; ++v6; v1 = this; v7 = (ResidualDenseBlock *)((char *)v7 + 272); v5 = (char *)this + 152; } while ( v6 < *((int *)this + 27) ); } v12 = 9 * *((_DWORD *)v1 + 30) * *((_DWORD *)v1 + 30); v13 = v12 * ggml_type_size(1LL); v14 = *((int *)v1 + 30); v15 = v33 + v13 + v14 * ggml_type_size(0LL); v16 = 9 * *((_DWORD *)v1 + 30) * *((_DWORD *)v1 + 30); v17 = v1; v18 = v16 * ggml_type_size(1LL); v19 = *((int *)v17 + 30); v20 = v18 + v19 * ggml_type_size(0LL); v21 = 9 * *((_DWORD *)v17 + 30) * *((_DWORD *)v17 + 30); v22 = v15 + v20 + v21 * ggml_type_size(1LL); v23 = *((int *)v17 + 30); v24 = v23 * ggml_type_size(0LL); v25 = 9 * *((_DWORD *)v17 + 30) * *((_DWORD *)v17 + 30); v26 = v24 + v25 * ggml_type_size(1LL); v27 = *((int *)v17 + 30); v28 = v26 + v27 * ggml_type_size(0LL); v29 = 9 * *((_DWORD *)v17 + 30) * *((_DWORD *)v17 + 29); v30 = v22 + v28 + v29 * ggml_type_size(1LL); v31 = *((int *)v17 + 29); return v30 + v31 * ggml_type_size(0LL); }
39,620
ESRGAN::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_first_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_first_b for (int i = 0; i < num_blocks; i++) { mem_size += body_blocks[i].calculate_mem_size(); } mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_body_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_body_w // upsample mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up1_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up1_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up2_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up2_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_hr_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_hr_b mem_size += out_channels * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_last_w mem_size += out_channels * ggml_type_size(GGML_TYPE_F32); // conv_last_b return mem_size; }
O2
cpp
ESRGAN::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x78(%rdi), %eax imull 0x70(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r14 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r15 imulq %r14, %r15 movslq 0x78(%rbx), %r13 xorl %r12d, %r12d xorl %edi, %edi callq 0x67b83 movq %rax, %r14 imulq %r13, %r14 addq %r15, %r14 leaq 0x98(%rbx), %r15 movslq 0x6c(%rbx), %rax cmpq %rax, %r12 jge 0x5808d movq %r15, %rdi callq 0x581d6 addq %rax, %r14 incq %r12 addq $0x110, %r15 # imm = 0x110 jmp 0x5806d movl 0x78(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 pushq $0x1 popq %rbp movl %ebp, %edi callq 0x67b83 movq %rax, %r12 imulq %r15, %r12 movslq 0x78(%rbx), %r13 xorl %edi, %edi callq 0x67b83 movq %rax, %r15 imulq %r13, %r15 addq %r14, %r15 addq %r12, %r15 movl 0x78(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r14 movl %ebp, %edi callq 0x67b83 movq %rax, %r12 imulq %r14, %r12 movslq 0x78(%rbx), %r13 xorl %edi, %edi callq 0x67b83 movq %rax, %r14 imulq %r13, %r14 addq %r12, %r14 addq %r15, %r14 movl 0x78(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl %ebp, %edi callq 0x67b83 movq %rax, %r15 imulq %r12, %r15 movslq 0x78(%rbx), %r13 xorl %edi, %edi callq 0x67b83 movq %rax, %r12 imulq %r13, %r12 addq %r15, %r12 movl 0x78(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r13 movl %ebp, %edi callq 0x67b83 movq %rax, %r15 imulq %r13, %r15 addq %r12, %r15 addq %r14, %r15 movslq 0x78(%rbx), %r12 xorl %edi, %edi callq 0x67b83 movq %rax, %r14 imulq %r12, %r14 movl 0x74(%rbx), %eax imull 0x78(%rbx), %eax leal (%rax,%rax,8), %eax movslq %eax, %r13 movl %ebp, %edi callq 0x67b83 movq %rax, %r12 imulq %r13, %r12 addq %r14, %r12 movslq 0x74(%rbx), %rbx xorl %edi, %edi callq 0x67b83 imulq %rbx, %rax addq %r12, %rax addq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6ESRGAN18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi+78h] imul eax, [rdi+70h] lea eax, [rax+rax*8] movsxd r14, eax push 1 pop rdi call ggml_type_size mov r15, rax imul r15, r14 movsxd r13, dword ptr [rbx+78h] xor r12d, r12d xor edi, edi call ggml_type_size mov r14, rax imul r14, r13 add r14, r15 lea r15, [rbx+98h] loc_5806D: movsxd rax, dword ptr [rbx+6Ch] cmp r12, rax jge short loc_5808D mov rdi, r15; this call _ZN11EsrganBlock18calculate_mem_sizeEv; EsrganBlock::calculate_mem_size(void) add r14, rax inc r12 add r15, 110h jmp short loc_5806D loc_5808D: mov eax, [rbx+78h] imul eax, eax lea eax, [rax+rax*8] movsxd r15, eax push 1 pop rbp mov edi, ebp call ggml_type_size mov r12, rax imul r12, r15 movsxd r13, dword ptr [rbx+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, r13 add r15, r14 add r15, r12 mov eax, [rbx+78h] imul eax, eax lea eax, [rax+rax*8] movsxd r14, eax mov edi, ebp call ggml_type_size mov r12, rax imul r12, r14 movsxd r13, dword ptr [rbx+78h] xor edi, edi call ggml_type_size mov r14, rax imul r14, r13 add r14, r12 add r14, r15 mov eax, [rbx+78h] imul eax, eax lea eax, [rax+rax*8] movsxd r12, eax mov edi, ebp call ggml_type_size mov r15, rax imul r15, r12 movsxd r13, dword ptr [rbx+78h] xor edi, edi call ggml_type_size mov r12, rax imul r12, r13 add r12, r15 mov eax, [rbx+78h] imul eax, eax lea eax, [rax+rax*8] movsxd r13, eax mov edi, ebp call ggml_type_size mov r15, rax imul r15, r13 add r15, r12 add r15, r14 movsxd r12, dword ptr [rbx+78h] xor edi, edi call ggml_type_size mov r14, rax imul r14, r12 mov eax, [rbx+74h] imul eax, [rbx+78h] lea eax, [rax+rax*8] movsxd r13, eax mov edi, ebp call ggml_type_size mov r12, rax imul r12, r13 add r12, r14 movsxd rbx, dword ptr [rbx+74h] xor edi, edi call ggml_type_size imul rax, rbx add rax, r12 add rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ESRGAN::calculate_mem_size(ESRGAN *this) { long long v1; // r14 long long v2; // r15 long long v3; // r13 long long v4; // r12 long long v5; // r14 EsrganBlock *v6; // r15 long long v7; // r15 long long v8; // r12 long long v9; // r13 long long v10; // r15 long long v11; // r14 long long v12; // r12 long long v13; // r13 long long v14; // r14 long long v15; // r12 long long v16; // r15 long long v17; // r13 long long v18; // r12 long long v19; // r13 long long v20; // r15 long long v21; // r12 long long v22; // r14 long long v23; // r13 long long v24; // r12 long long v25; // rbx v1 = 9 * *((_DWORD *)this + 28) * *((_DWORD *)this + 30); v2 = v1 * ggml_type_size(1LL); v3 = *((int *)this + 30); v4 = 0LL; v5 = v2 + v3 * ggml_type_size(0LL); v6 = (ESRGAN *)((char *)this + 152); while ( v4 < *((int *)this + 27) ) { v5 += EsrganBlock::calculate_mem_size(v6); ++v4; v6 = (EsrganBlock *)((char *)v6 + 272); } v7 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v8 = v7 * ggml_type_size(1LL); v9 = *((int *)this + 30); v10 = v8 + v5 + v9 * ggml_type_size(0LL); v11 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v12 = v11 * ggml_type_size(1LL); v13 = *((int *)this + 30); v14 = v10 + v12 + v13 * ggml_type_size(0LL); v15 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v16 = v15 * ggml_type_size(1LL); v17 = *((int *)this + 30); v18 = v16 + v17 * ggml_type_size(0LL); v19 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 30); v20 = v14 + v18 + v19 * ggml_type_size(1LL); v21 = *((int *)this + 30); v22 = v21 * ggml_type_size(0LL); v23 = 9 * *((_DWORD *)this + 30) * *((_DWORD *)this + 29); v24 = v22 + v23 * ggml_type_size(1LL); v25 = *((int *)this + 29); return v20 + v24 + v25 * ggml_type_size(0LL); }
calculate_mem_size: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x78] IMUL EAX,dword ptr [RDI + 0x70] LEA EAX,[RAX + RAX*0x8] MOVSXD R14,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R15,RAX IMUL R15,R14 MOVSXD R13,dword ptr [RBX + 0x78] XOR R12D,R12D XOR EDI,EDI CALL 0x00167b83 MOV R14,RAX IMUL R14,R13 ADD R14,R15 LEA R15,[RBX + 0x98] LAB_0015806d: MOVSXD RAX,dword ptr [RBX + 0x6c] CMP R12,RAX JGE 0x0015808d MOV RDI,R15 CALL 0x001581d6 ADD R14,RAX INC R12 ADD R15,0x110 JMP 0x0015806d LAB_0015808d: MOV EAX,dword ptr [RBX + 0x78] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R15,EAX PUSH 0x1 POP RBP MOV EDI,EBP CALL 0x00167b83 MOV R12,RAX IMUL R12,R15 MOVSXD R13,dword ptr [RBX + 0x78] XOR EDI,EDI CALL 0x00167b83 MOV R15,RAX IMUL R15,R13 ADD R15,R14 ADD R15,R12 MOV EAX,dword ptr [RBX + 0x78] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R14,EAX MOV EDI,EBP CALL 0x00167b83 MOV R12,RAX IMUL R12,R14 MOVSXD R13,dword ptr [RBX + 0x78] XOR EDI,EDI CALL 0x00167b83 MOV R14,RAX IMUL R14,R13 ADD R14,R12 ADD R14,R15 MOV EAX,dword ptr [RBX + 0x78] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R12,EAX MOV EDI,EBP CALL 0x00167b83 MOV R15,RAX IMUL R15,R12 MOVSXD R13,dword ptr [RBX + 0x78] XOR EDI,EDI CALL 0x00167b83 MOV R12,RAX IMUL R12,R13 ADD R12,R15 MOV EAX,dword ptr [RBX + 0x78] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R13,EAX MOV EDI,EBP CALL 0x00167b83 MOV R15,RAX IMUL R15,R13 ADD R15,R12 ADD R15,R14 MOVSXD R12,dword ptr [RBX + 0x78] XOR EDI,EDI CALL 0x00167b83 MOV R14,RAX IMUL R14,R12 MOV EAX,dword ptr [RBX + 0x74] IMUL EAX,dword ptr [RBX + 0x78] LEA EAX,[RAX + RAX*0x8] MOVSXD R13,EAX MOV EDI,EBP CALL 0x00167b83 MOV R12,RAX IMUL R12,R13 ADD R12,R14 MOVSXD RBX,dword ptr [RBX + 0x74] XOR EDI,EDI CALL 0x00167b83 IMUL RAX,RBX ADD RAX,R12 ADD RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ESRGAN::calculate_mem_size() */ long __thiscall ESRGAN::calculate_mem_size(ESRGAN *this) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; long lVar12; long lVar13; long lVar14; long lVar15; long lVar16; long lVar17; long lVar18; long lVar19; long lVar20; long lVar21; long lVar22; ESRGAN *this_00; iVar1 = *(int *)(this + 0x78); iVar2 = *(int *)(this + 0x70); lVar12 = ggml_type_size(1); iVar3 = *(int *)(this + 0x78); lVar13 = ggml_type_size(0); lVar13 = lVar13 * iVar3 + lVar12 * (iVar1 * iVar2 * 9); this_00 = this + 0x98; for (lVar12 = 0; lVar12 < *(int *)(this + 0x6c); lVar12 = lVar12 + 1) { lVar14 = EsrganBlock::calculate_mem_size((EsrganBlock *)this_00); lVar13 = lVar13 + lVar14; this_00 = (ESRGAN *)((EsrganBlock *)this_00 + 0x110); } iVar1 = *(int *)(this + 0x78); lVar12 = ggml_type_size(1); iVar2 = *(int *)(this + 0x78); lVar14 = ggml_type_size(0); iVar3 = *(int *)(this + 0x78); lVar15 = ggml_type_size(1); iVar4 = *(int *)(this + 0x78); lVar16 = ggml_type_size(0); iVar5 = *(int *)(this + 0x78); lVar17 = ggml_type_size(1); iVar6 = *(int *)(this + 0x78); lVar18 = ggml_type_size(0); iVar7 = *(int *)(this + 0x78); lVar19 = ggml_type_size(1); iVar8 = *(int *)(this + 0x78); lVar20 = ggml_type_size(0); iVar9 = *(int *)(this + 0x74); iVar10 = *(int *)(this + 0x78); lVar21 = ggml_type_size(1); iVar11 = *(int *)(this + 0x74); lVar22 = ggml_type_size(0); return lVar22 * iVar11 + lVar21 * (iVar9 * iVar10 * 9) + lVar20 * iVar8 + lVar19 * (iVar7 * iVar7 * 9) + lVar18 * iVar6 + lVar17 * (iVar5 * iVar5 * 9) + lVar16 * iVar4 + lVar15 * (iVar3 * iVar3 * 9) + lVar14 * iVar2 + lVar13 + lVar12 * (iVar1 * iVar1 * 9); }
39,621
ESRGAN::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_first_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_first_b for (int i = 0; i < num_blocks; i++) { mem_size += body_blocks[i].calculate_mem_size(); } mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_body_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_body_w // upsample mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up1_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up1_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_up2_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_up2_b mem_size += num_features * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_hr_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv_hr_b mem_size += out_channels * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_last_w mem_size += out_channels * ggml_type_size(GGML_TYPE_F32); // conv_last_b return mem_size; }
O3
cpp
ESRGAN::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movl 0x78(%rdi), %eax imull 0x70(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %rbx, %r15 movslq 0x78(%r14), %rbx xorl %edi, %edi callq 0x8ceea imulq %rbx, %rax addq %r15, %rax movl 0x6c(%r14), %edx testl %edx, %edx jle 0x7b9ad leaq 0x98(%r14), %rsi xorl %r13d, %r13d movq %rsi, %rbp movq %r14, 0x8(%rsp) movq %rsi, (%rsp) imulq $0x110, %r13, %r12 # imm = 0x110 cmpl $0x0, 0x108(%rsi,%r12) jle 0x7b996 movq %rax, 0x10(%rsp) addq %rsi, %r12 movq %rbp, %r15 xorl %r14d, %r14d xorl %ebx, %ebx movq %r15, %rdi callq 0x7bb1a addq %rax, %rbx incq %r14 movslq 0x108(%r12), %rax addq $0x58, %r15 cmpq %rax, %r14 jl 0x7b963 movq 0x8(%rsp), %r14 movl 0x6c(%r14), %edx movq 0x10(%rsp), %rax movq (%rsp), %rsi jmp 0x7b998 xorl %ebx, %ebx addq %rbx, %rax incq %r13 movslq %edx, %rcx addq $0x110, %rbp # imm = 0x110 cmpq %rcx, %r13 jl 0x7b941 movl 0x78(%r14), %ecx imull %ecx, %ecx leal (%rcx,%rcx,8), %ecx movslq %ecx, %rbx movl $0x1, %edi movq %rax, %r13 callq 0x8ceea movq %rax, %r12 imulq %rbx, %r12 movslq 0x78(%r14), %rbx xorl %edi, %edi callq 0x8ceea movq %rax, %r15 imulq %rbx, %r15 addq %r12, %r15 addq %r13, %r15 movl 0x78(%r14), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8ceea movq %r14, %r13 movq %rax, %r14 imulq %rbx, %r14 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8ceea movq %rax, %r12 imulq %rbx, %r12 addq %r14, %r12 movl 0x78(%r13), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8ceea movq %rax, %r14 imulq %rbx, %r14 addq %r12, %r14 addq %r15, %r14 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8ceea movq %rax, %r15 imulq %rbx, %r15 movl 0x78(%r13), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8ceea movq %rax, %r12 imulq %rbx, %r12 addq %r15, %r12 movslq 0x78(%r13), %rbx xorl %edi, %edi callq 0x8ceea movq %rax, %r15 imulq %rbx, %r15 addq %r12, %r15 movl 0x74(%r13), %eax imull 0x78(%r13), %eax leal (%rax,%rax,8), %eax movslq %eax, %rbx movl $0x1, %edi callq 0x8ceea movq %rax, %r12 imulq %rbx, %r12 addq %r15, %r12 addq %r14, %r12 movslq 0x74(%r13), %rbx xorl %edi, %edi callq 0x8ceea imulq %rbx, %rax addq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6ESRGAN18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov eax, [rdi+78h] imul eax, [rdi+70h] lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, rbx movsxd rbx, dword ptr [r14+78h] xor edi, edi call ggml_type_size imul rax, rbx add rax, r15 mov edx, [r14+6Ch] test edx, edx jle loc_7B9AD lea rsi, [r14+98h] xor r13d, r13d mov rbp, rsi mov [rsp+48h+var_40], r14 mov [rsp+48h+var_48], rsi loc_7B941: imul r12, r13, 110h cmp dword ptr [rsi+r12+108h], 0 jle short loc_7B996 mov [rsp+48h+var_38], rax add r12, rsi mov r15, rbp xor r14d, r14d xor ebx, ebx loc_7B963: mov rdi, r15; this call _ZN18ResidualDenseBlock18calculate_mem_sizeEv; ResidualDenseBlock::calculate_mem_size(void) add rbx, rax inc r14 movsxd rax, dword ptr [r12+108h] add r15, 58h ; 'X' cmp r14, rax jl short loc_7B963 mov r14, [rsp+48h+var_40] mov edx, [r14+6Ch] mov rax, [rsp+48h+var_38] mov rsi, [rsp+48h+var_48] jmp short loc_7B998 loc_7B996: xor ebx, ebx loc_7B998: add rax, rbx inc r13 movsxd rcx, edx add rbp, 110h cmp r13, rcx jl short loc_7B941 loc_7B9AD: mov ecx, [r14+78h] imul ecx, ecx lea ecx, [rcx+rcx*8] movsxd rbx, ecx mov edi, 1 mov r13, rax call ggml_type_size mov r12, rax imul r12, rbx movsxd rbx, dword ptr [r14+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx add r15, r12 add r15, r13 mov eax, [r14+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r13, r14 mov r14, rax imul r14, rbx movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r12, rax imul r12, rbx add r12, r14 mov eax, [r13+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, rbx add r14, r12 add r14, r15 movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx mov eax, [r13+78h] imul eax, eax lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, rbx add r12, r15 movsxd rbx, dword ptr [r13+78h] xor edi, edi call ggml_type_size mov r15, rax imul r15, rbx add r15, r12 mov eax, [r13+74h] imul eax, [r13+78h] lea eax, [rax+rax*8] movsxd rbx, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, rbx add r12, r15 add r12, r14 movsxd rbx, dword ptr [r13+74h] xor edi, edi call ggml_type_size imul rax, rbx add rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ESRGAN::calculate_mem_size(ESRGAN *this) { ESRGAN *v1; // r14 long long v2; // rbx long long v3; // r15 long long v4; // rbx long long v5; // rax int v6; // edx char *v7; // rsi long long v8; // r13 ResidualDenseBlock *v9; // rbp ResidualDenseBlock *v10; // r15 long long v11; // r14 long long v12; // rbx long long v13; // rbx long long v14; // r13 long long v15; // r12 long long v16; // rbx long long v17; // r15 long long v18; // rbx ESRGAN *v19; // r13 long long v20; // r14 long long v21; // rbx long long v22; // r12 long long v23; // rbx long long v24; // r14 long long v25; // rbx long long v26; // r15 long long v27; // rbx long long v28; // r12 long long v29; // rbx long long v30; // r15 long long v31; // rbx long long v32; // r12 long long v33; // rbx long long v35; // [rsp+10h] [rbp-38h] v1 = this; v2 = 9 * *((_DWORD *)this + 28) * *((_DWORD *)this + 30); v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 30); v5 = v3 + v4 * ggml_type_size(0LL); v6 = *((_DWORD *)this + 27); if ( v6 > 0 ) { v7 = (char *)this + 152; v8 = 0LL; v9 = (ESRGAN *)((char *)this + 152); do { if ( *(int *)&v7[272 * v8 + 264] <= 0 ) { v12 = 0LL; } else { v35 = v5; v10 = v9; v11 = 0LL; v12 = 0LL; do { v12 += ResidualDenseBlock::calculate_mem_size(v10); ++v11; v10 = (ResidualDenseBlock *)((char *)v10 + 88); } while ( v11 < *(int *)&v7[272 * v8 + 264] ); v1 = this; v6 = *((_DWORD *)this + 27); v5 = v35; v7 = (char *)this + 152; } v5 += v12; ++v8; v9 = (ResidualDenseBlock *)((char *)v9 + 272); } while ( v8 < v6 ); } v13 = 9 * *((_DWORD *)v1 + 30) * *((_DWORD *)v1 + 30); v14 = v5; v15 = v13 * ggml_type_size(1LL); v16 = *((int *)v1 + 30); v17 = v14 + v15 + v16 * ggml_type_size(0LL); v18 = 9 * *((_DWORD *)v1 + 30) * *((_DWORD *)v1 + 30); v19 = v1; v20 = v18 * ggml_type_size(1LL); v21 = *((int *)v19 + 30); v22 = v20 + v21 * ggml_type_size(0LL); v23 = 9 * *((_DWORD *)v19 + 30) * *((_DWORD *)v19 + 30); v24 = v17 + v22 + v23 * ggml_type_size(1LL); v25 = *((int *)v19 + 30); v26 = v25 * ggml_type_size(0LL); v27 = 9 * *((_DWORD *)v19 + 30) * *((_DWORD *)v19 + 30); v28 = v26 + v27 * ggml_type_size(1LL); v29 = *((int *)v19 + 30); v30 = v28 + v29 * ggml_type_size(0LL); v31 = 9 * *((_DWORD *)v19 + 30) * *((_DWORD *)v19 + 29); v32 = v24 + v30 + v31 * ggml_type_size(1LL); v33 = *((int *)v19 + 29); return v32 + v33 * ggml_type_size(0LL); }
39,622
my_once_free
eloqsql/mysys/my_once.c
void my_once_free(void) { reg1 USED_MEM *next,*old; DBUG_ENTER("my_once_free"); for (next=my_once_root_block ; next ; ) { old=next; next= next->next ; free((uchar*) old); } my_once_root_block=0; DBUG_VOID_RETURN; }
O0
c
my_once_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x377f21(%rip), %rax # 0x3f8f00 movq (%rax), %rax movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x8100b movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rdi callq 0x28400 jmp 0x80fe6 leaq 0x377eee(%rip), %rax # 0x3f8f00 movq $0x0, (%rax) jmp 0x8101b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
my_once_free: push rbp mov rbp, rsp sub rsp, 10h lea rax, my_once_root_block mov rax, [rax] mov [rbp+var_8], rax loc_80FE6: cmp [rbp+var_8], 0 jz short loc_8100B mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_8], rax mov rdi, [rbp+var_10] call _free jmp short loc_80FE6 loc_8100B: lea rax, my_once_root_block mov qword ptr [rax], 0 jmp short $+2 loc_8101B: add rsp, 10h pop rbp retn
_QWORD *my_once_free() { _QWORD *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *v2; // [rsp+8h] [rbp-8h] v2 = (_QWORD *)my_once_root_block; while ( v2 ) { v1 = v2; v2 = (_QWORD *)*v2; free(v1); } result = &my_once_root_block; my_once_root_block = 0LL; return result; }
my_once_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x4f8f00] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX LAB_00180fe6: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0018100b MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00128400 JMP 0x00180fe6 LAB_0018100b: LEA RAX,[0x4f8f00] MOV qword ptr [RAX],0x0 JMP 0x0018101b LAB_0018101b: ADD RSP,0x10 POP RBP RET
void my_once_free(void) { int8 *puVar1; int8 local_10; local_10 = my_once_root_block; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; free(local_10); local_10 = puVar1; } my_once_root_block = (int8 *)0x0; return; }
39,623
my_read_charset_file
eloqsql/mysys/charset.c
static my_bool my_read_charset_file(MY_CHARSET_LOADER *loader, const char *filename, myf myflags) { uchar *buf; int fd; size_t len, tmp_len; MY_STAT stat_info; if (!my_stat(filename, &stat_info, MYF(myflags)) || ((len= (uint)stat_info.st_size) > MY_MAX_ALLOWED_BUF) || !(buf= (uchar*) my_malloc(key_memory_charset_loader,len,myflags))) return TRUE; if ((fd= mysql_file_open(key_file_charset, filename, O_RDONLY, myflags)) < 0) goto error; tmp_len= mysql_file_read(fd, buf, len, myflags); mysql_file_close(fd, myflags); if (tmp_len != len) goto error; if (my_parse_charset_xml(loader, (char *) buf, len)) { my_printf_error(EE_UNKNOWN_CHARSET, "Error while parsing '%s': %s\n", MYF(0), filename, loader->error); goto error; } my_free(buf); return FALSE; error: my_free(buf); return TRUE; }
O3
c
my_read_charset_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx leaq -0x120(%rbp), %rsi movq %r14, %rdi callq 0x9f3c3 testq %rax, %rax je 0x9334c movl -0xf0(%rbp), %r13d cmpq $0x100000, %r13 # imm = 0x100000 ja 0x9334c leaq 0xb73e60(%rip), %rax # 0xc07094 movl (%rax), %edi movq %r13, %rsi movq %r12, %rdx callq 0x9f6e1 testq %rax, %rax je 0x9334c movq %rax, %r15 movq %rbx, -0x38(%rbp) leaq 0xb734d8(%rip), %rax # 0xc06730 movl (%rax), %esi leaq 0x2f1daf(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0x90(%rbp), %rdi leaq -0x48(%rbp), %rbx movl $0x2, %edx movq %r14, %rcx movq %rbx, %r8 callq *0x148(%rax) movq %rax, (%rbx) testq %rax, %rax jne 0x9335e movq %r14, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x9fca4 movl %eax, %ebx testl %ebx, %ebx js 0x93344 leaq 0x2f1d66(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x933a7 movl %ebx, %edi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx callq 0xa0264 movq %rax, -0x30(%rbp) leaq 0x2f1d2b(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %ebx, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x9341b movl %ebx, %edi movq %r12, %rsi callq 0x9fe49 cmpq %r13, -0x30(%rbp) jne 0x93344 movq -0x38(%rbp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0xd0430 testb %al, %al je 0x93344 leaq 0x47c00(%rip), %rsi # 0xdaf2f movl $0x16, %edi xorl %edx, %edx movq %r14, %rcx movq -0x38(%rbp), %r8 xorl %eax, %eax callq 0x9dc21 movq %r15, %rdi callq 0x9f90e addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2f1cab(%rip), %rcx # 0x385010 movq (%rcx), %rcx leaq 0x47b87(%rip), %rsi # 0xdaef6 movq %rax, %rdi movl $0x223, %edx # imm = 0x223 callq *0x1f0(%rcx) movq %r14, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x9fca4 movl %eax, %ebx leaq 0x2f1c7d(%rip), %rax # 0x385010 movq (%rax), %rax movq -0x48(%rbp), %rdi movl %ebx, %esi callq *0x200(%rax) jmp 0x9329b movq %rax, %rcx leaq 0x2f1c5f(%rip), %rax # 0x385010 movq (%rax), %rax leaq 0x47b3b(%rip), %rdx # 0xdaef6 movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %r13, %rsi movl $0x225, %ecx # imm = 0x225 callq *0x210(%rax) movl %ebx, %edi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx callq 0xa0264 xorl %esi, %esi testq %rax, %rax movl $0x0, %ecx cmoveq %r13, %rcx cmpq $-0x1, %rax movq %rax, -0x30(%rbp) cmovneq %rax, %rsi testb $0x6, %r12b cmovneq %rcx, %rsi leaq 0x2f1c07(%rip), %rax # 0x385010 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x932de movq %rax, %rdi movl %ebx, %esi movq %r12, %rdx callq 0x2e8a4 jmp 0x9330f
my_read_charset_file: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r12, rdx mov r14, rsi mov rbx, rdi lea rsi, [rbp+var_120] mov rdi, r14 call my_stat test rax, rax jz loc_9334C mov r13d, [rbp+var_F0] cmp r13, offset xmmword_100000 ja loc_9334C lea rax, key_memory_charset_loader mov edi, [rax] mov rsi, r13 mov rdx, r12 call my_malloc test rax, rax jz loc_9334C mov r15, rax mov [rbp+var_38], rbx lea rax, key_file_charset mov esi, [rax] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] lea rbx, [rbp+var_48] mov edx, 2 mov rcx, r14 mov r8, rbx call qword ptr [rax+148h] mov [rbx], rax test rax, rax jnz loc_9335E mov rdi, r14 xor esi, esi mov rdx, r12 call my_open mov ebx, eax loc_9329B: test ebx, ebx js loc_93344 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_933A7 mov edi, ebx mov rsi, r15 mov rdx, r13 mov rcx, r12 call my_read mov [rbp+var_30], rax loc_932DE: lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, ebx mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz loc_9341B mov edi, ebx mov rsi, r12 call my_close loc_9330F: cmp [rbp+var_30], r13 jnz short loc_93344 mov rdi, [rbp+var_38] mov rsi, r15 mov rdx, r13 call my_parse_charset_xml test al, al jz short loc_93344 lea rsi, aErrorWhilePars; "Error while parsing '%s': %s\n" mov edi, 16h xor edx, edx mov rcx, r14 mov r8, [rbp+var_38] xor eax, eax call my_printf_error loc_93344: mov rdi, r15 call my_free loc_9334C: add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9335E: lea rcx, PSI_server mov rcx, [rcx] lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 223h call qword ptr [rcx+1F0h] mov rdi, r14 xor esi, esi mov rdx, r12 call my_open mov ebx, eax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_48] mov esi, ebx call qword ptr [rax+200h] jmp loc_9329B loc_933A7: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, r13 mov ecx, 225h call qword ptr [rax+210h] mov edi, ebx mov rsi, r15 mov rdx, r13 mov rcx, r12 call my_read xor esi, esi test rax, rax mov ecx, 0 cmovz rcx, r13 cmp rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rax cmovnz rsi, rax test r12b, 6 cmovnz rsi, rcx lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_932DE loc_9341B: mov rdi, rax mov esi, ebx mov rdx, r12 call my_read_charset_file_cold_1 jmp loc_9330F
long long my_read_charset_file(long long a1, long long a2, long long a3) { int v4; // r14d long long result; // rax long long v6; // r13 long long v7; // r15 long long v8; // rax long long v9; // rbx long long v10; // rax long long v11; // rax int v12; // r9d long long v13; // rax long long v14; // rdx long long v15; // rsi long long v16; // rcx char v17[48]; // [rsp+0h] [rbp-120h] BYREF unsigned int v18; // [rsp+30h] [rbp-F0h] _BYTE v19[72]; // [rsp+90h] [rbp-90h] BYREF long long v20; // [rsp+D8h] [rbp-48h] BYREF long long v21; // [rsp+E0h] [rbp-40h] long long v22; // [rsp+E8h] [rbp-38h] long long v23; // [rsp+F0h] [rbp-30h] v4 = a2; result = my_stat(a2, v17, a3); if ( result ) { v6 = v18; if ( v18 <= (unsigned long long)&xmmword_100000 ) { result = my_malloc(key_memory_charset_loader, v18, a3); if ( result ) { v7 = result; v22 = a1; v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v19, key_file_charset, 2LL, a2, &v20); v20 = v8; if ( v8 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v8, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 547LL); v9 = (unsigned int)my_open(a2, 0LL, a3); ((void ( *)(long long, long long))PSI_server[64])(v20, v9); } else { LODWORD(v9) = my_open(a2, 0LL, a3); } if ( (int)v9 >= 0 ) { v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, (unsigned int)v9, 6LL); if ( v10 ) { v21 = v10; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v10, v6, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 549LL); v13 = my_read((unsigned int)v9, v7, v6, a3); v15 = 0LL; v16 = 0LL; if ( !v13 ) v16 = v6; v23 = v13; if ( v13 != -1 ) v15 = v13; if ( (a3 & 6) != 0 ) v15 = v16; ((void ( *)(long long, long long, long long, long long))PSI_server[67])(v21, v15, v14, v16); } else { v23 = my_read((unsigned int)v9, v7, v6, a3); } v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, (unsigned int)v9, 4LL); if ( v11 ) my_read_charset_file_cold_1(v11, v9, a3); else my_close((unsigned int)v9, a3); if ( v23 == v6 ) { if ( (unsigned __int8)my_parse_charset_xml(v22, v7, v6) ) my_printf_error(22, (unsigned int)"Error while parsing '%s': %s\n", 0, v4, v22, v12); } } return my_free(v7); } } } return result; }
my_read_charset_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R12,RDX MOV R14,RSI MOV RBX,RDI LEA RSI,[RBP + -0x120] MOV RDI,R14 CALL 0x0019f3c3 TEST RAX,RAX JZ 0x0019334c MOV R13D,dword ptr [RBP + -0xf0] CMP R13,0x100000 JA 0x0019334c LEA RAX,[0xd07094] MOV EDI,dword ptr [RAX] MOV RSI,R13 MOV RDX,R12 CALL 0x0019f6e1 TEST RAX,RAX JZ 0x0019334c MOV R15,RAX MOV qword ptr [RBP + -0x38],RBX LEA RAX,[0xd06730] MOV ESI,dword ptr [RAX] LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] LEA RBX,[RBP + -0x48] MOV EDX,0x2 MOV RCX,R14 MOV R8,RBX CALL qword ptr [RAX + 0x148] MOV qword ptr [RBX],RAX TEST RAX,RAX JNZ 0x0019335e MOV RDI,R14 XOR ESI,ESI MOV RDX,R12 CALL 0x0019fca4 MOV EBX,EAX LAB_0019329b: TEST EBX,EBX JS 0x00193344 LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001933a7 MOV EDI,EBX MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 CALL 0x001a0264 MOV qword ptr [RBP + -0x30],RAX LAB_001932de: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,EBX MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0019341b MOV EDI,EBX MOV RSI,R12 CALL 0x0019fe49 LAB_0019330f: CMP qword ptr [RBP + -0x30],R13 JNZ 0x00193344 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R15 MOV RDX,R13 CALL 0x001d0430 TEST AL,AL JZ 0x00193344 LEA RSI,[0x1daf2f] MOV EDI,0x16 XOR EDX,EDX MOV RCX,R14 MOV R8,qword ptr [RBP + -0x38] XOR EAX,EAX CALL 0x0019dc21 LAB_00193344: MOV RDI,R15 CALL 0x0019f90e LAB_0019334c: ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019335e: LEA RCX,[0x485010] MOV RCX,qword ptr [RCX] LEA RSI,[0x1daef6] MOV RDI,RAX MOV EDX,0x223 CALL qword ptr [RCX + 0x1f0] MOV RDI,R14 XOR ESI,ESI MOV RDX,R12 CALL 0x0019fca4 MOV EBX,EAX LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] MOV ESI,EBX CALL qword ptr [RAX + 0x200] JMP 0x0019329b LAB_001933a7: MOV RCX,RAX LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1daef6] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,R13 MOV ECX,0x225 CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 CALL 0x001a0264 XOR ESI,ESI TEST RAX,RAX MOV ECX,0x0 CMOVZ RCX,R13 CMP RAX,-0x1 MOV qword ptr [RBP + -0x30],RAX CMOVNZ RSI,RAX TEST R12B,0x6 CMOVNZ RSI,RCX LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x001932de LAB_0019341b: MOV RDI,RAX MOV ESI,EBX MOV RDX,R12 CALL 0x0012e8a4 JMP 0x0019330f
void my_read_charset_file(int8 param_1,int8 param_2,ulong param_3) { char cVar1; int iVar2; long lVar3; long lVar4; ulong uVar5; ulong uVar6; ulong uVar7; int1 local_128 [48]; uint local_f8; int1 local_98 [72]; long local_50; long local_48; int8 local_40; ulong local_38; lVar3 = my_stat(param_2,local_128); if ((lVar3 != 0) && (uVar7 = (ulong)local_f8, uVar7 < 0x100001)) { lVar3 = my_malloc(key_memory_charset_loader,uVar7,param_3); if (lVar3 != 0) { local_40 = param_1; local_50 = (**(code **)(PSI_server + 0x148))(local_98,key_file_charset,2,param_2,&local_50); if (local_50 == 0) { iVar2 = my_open(param_2,0,param_3); } else { (**(code **)(PSI_server + 0x1f0)) (local_50,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x223); iVar2 = my_open(param_2,0,param_3); (**(code **)(PSI_server + 0x200))(local_50,iVar2); } if (-1 < iVar2) { lVar4 = (**(code **)(PSI_server + 0x158))(local_98,iVar2,6); if (lVar4 == 0) { local_38 = my_read(iVar2,lVar3,uVar7,param_3); } else { local_48 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar7,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x225); local_38 = my_read(iVar2,lVar3,uVar7,param_3); uVar5 = 0; if (local_38 == 0) { uVar5 = uVar7; } uVar6 = 0; if (local_38 != 0xffffffffffffffff) { uVar6 = local_38; } if ((param_3 & 6) != 0) { uVar6 = uVar5; } (**(code **)(PSI_server + 0x218))(local_48,uVar6); } lVar4 = (**(code **)(PSI_server + 0x158))(local_98,iVar2,4); if (lVar4 == 0) { my_close(iVar2,param_3); } else { my_read_charset_file_cold_1(lVar4,iVar2,param_3); } if (local_38 == uVar7) { cVar1 = my_parse_charset_xml(local_40,lVar3,uVar7); if (cVar1 != '\0') { my_printf_error(0x16,"Error while parsing \'%s\': %s\n",0,param_2,local_40); } } } my_free(lVar3); } } return; }
39,624
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string() const
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/input/lexer.hpp
std::string get_token_string() const { // escape control characters std::string result; for (const auto c : token_string) { if (static_cast<unsigned char>(c) <= '\x1F') { // escape control characters std::array<char, 9> cs{{}}; static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) result += cs.data(); } else { // add character as is result.push_back(static_cast<std::string::value_type>(c)); } } return result; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string() const: subq $0x78, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movb $0x0, 0x67(%rsp) callq 0x13060 movq 0x20(%rsp), %rax addq $0x38, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x2cf80 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x2cfb0 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x2d630 testb $0x1, %al jne 0x7ac83 jmp 0x7ad3b leaq 0x50(%rsp), %rdi callq 0x2d670 movb (%rax), %al movb %al, 0x47(%rsp) movzbl 0x47(%rsp), %eax cmpl $0x1f, %eax jg 0x7ad17 movb $0x0, 0x40(%rsp) movq $0x0, 0x38(%rsp) leaq 0x38(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x85a80 movq 0x8(%rsp), %rdi movq %rax, (%rsp) callq 0x85a90 movq (%rsp), %rdi movq %rax, %rsi movzbl 0x47(%rsp), %ecx leaq 0x553aa4(%rip), %rdx # 0x5ce77f xorl %eax, %eax callq 0x13320 movq 0x8(%rsp), %rdi callq 0x85a80 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x12be0 jmp 0x7acfb jmp 0x7ad2a movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) callq 0x13768 jmp 0x7ad5b movq 0x10(%rsp), %rdi movsbl 0x47(%rsp), %esi callq 0x12a40 jmp 0x7ad28 jmp 0x7ad2a jmp 0x7ad2c leaq 0x50(%rsp), %rdi callq 0x2d750 jmp 0x7ac6b movb $0x1, 0x67(%rsp) testb $0x1, 0x67(%rsp) jne 0x7ad51 movq 0x10(%rsp), %rdi callq 0x13768 movq 0x18(%rsp), %rax addq $0x78, %rsp retq movq 0x30(%rsp), %rdi callq 0x13540 nopw %cs:(%rax,%rax) nop
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE16get_token_stringEv: sub rsp, 78h mov [rsp+78h+var_68], rdi mov rax, rdi mov [rsp+78h+var_60], rax mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov rax, [rsp+78h+var_10] mov [rsp+78h+var_58], rax mov [rsp+78h+var_11], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rsp+78h+var_58] add rax, 38h ; '8' mov [rsp+78h+var_20], rax mov rdi, [rsp+78h+var_20] call _ZNKSt6vectorIcSaIcEE5beginEv; std::vector<char>::begin(void) mov [rsp+78h+var_28], rax mov rdi, [rsp+78h+var_20] call _ZNKSt6vectorIcSaIcEE3endEv; std::vector<char>::end(void) mov [rsp+78h+var_30], rax loc_7AC6B: lea rdi, [rsp+78h+var_28] lea rsi, [rsp+78h+var_30] call _ZN9__gnu_cxxneIPKcSt6vectorIcSaIcEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<char const*,std::vector<char>>(__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&,__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&) test al, 1 jnz short loc_7AC83 jmp loc_7AD3B loc_7AC83: lea rdi, [rsp+78h+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(void) mov al, [rax] mov [rsp+78h+var_31], al movzx eax, [rsp+78h+var_31] cmp eax, 1Fh jg short loc_7AD17 mov [rsp+78h+var_38], 0 mov [rsp+78h+var_40], 0 lea rdi, [rsp+78h+var_40] mov [rsp+78h+var_70], rdi call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void) mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_78], rax call _ZNKSt5arrayIcLm9EE4sizeEv; std::array<char,9ul>::size(void) mov rdi, [rsp+78h+var_78] mov rsi, rax movzx ecx, [rsp+78h+var_31] lea rdx, aU4x; "<U+%.4X>" xor eax, eax call _snprintf mov rdi, [rsp+78h+var_70] call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void) mov rdi, [rsp+78h+var_68] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_7ACFB: jmp short loc_7AD2A mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7AD5B loc_7AD17: mov rdi, [rsp+78h+var_68] movsx esi, [rsp+78h+var_31] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short $+2 loc_7AD28: jmp short $+2 loc_7AD2A: jmp short $+2 loc_7AD2C: lea rdi, [rsp+78h+var_28] call _ZN9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(void) jmp loc_7AC6B loc_7AD3B: mov [rsp+78h+var_11], 1 test [rsp+78h+var_11], 1 jnz short loc_7AD51 mov rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7AD51: mov rax, [rsp+78h+var_60] add rsp, 78h retn loc_7AD5B: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string( long long a1, long long a2) { double v2; // xmm0_8 long long v3; // rax long long v4; // rax long long v6; // [rsp+0h] [rbp-78h] long long v7; // [rsp+38h] [rbp-40h] BYREF char v8; // [rsp+40h] [rbp-38h] unsigned __int8 v9; // [rsp+47h] [rbp-31h] long long v10; // [rsp+48h] [rbp-30h] BYREF _QWORD v11[2]; // [rsp+50h] [rbp-28h] BYREF char v12; // [rsp+67h] [rbp-11h] long long v13; // [rsp+68h] [rbp-10h] long long v14; // [rsp+70h] [rbp-8h] v14 = a1; v13 = a2; v12 = 0; v2 = std::string::basic_string(a1); v11[1] = a2 + 56; v11[0] = std::vector<char>::begin((_QWORD *)(a2 + 56)); v10 = std::vector<char>::end(a2 + 56); while ( __gnu_cxx::operator!=<char const*,std::vector<char>>((long long)v11, (long long)&v10) ) { v9 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*((long long)v11); if ( v9 > 0x1Fu ) { std::string::push_back(a1, (unsigned int)(char)v9); } else { v8 = 0; v7 = 0LL; v6 = std::array<char,9ul>::data(v2); v3 = std::array<char,9ul>::size(&v7); snprintf(v6, v3, "<U+%.4X>", v9); v4 = std::array<char,9ul>::data(v2); std::string::operator+=(a1, v4); } __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(v11); } return a1; }
get_token_string: SUB RSP,0x78 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x67],0x0 CALL 0x00113060 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x38 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0012cf80 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0012cfb0 MOV qword ptr [RSP + 0x48],RAX LAB_0017ac6b: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x0012d630 TEST AL,0x1 JNZ 0x0017ac83 JMP 0x0017ad3b LAB_0017ac83: LEA RDI,[RSP + 0x50] CALL 0x0012d670 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x47],AL MOVZX EAX,byte ptr [RSP + 0x47] CMP EAX,0x1f JG 0x0017ad17 MOV byte ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x38],0x0 LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x8],RDI CALL 0x00185a80 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX CALL 0x00185a90 MOV RDI,qword ptr [RSP] MOV RSI,RAX MOVZX ECX,byte ptr [RSP + 0x47] LEA RDX,[0x6ce77f] XOR EAX,EAX CALL 0x00113320 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00185a80 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX LAB_0017acf4: CALL 0x00112be0 JMP 0x0017acfb LAB_0017acfb: JMP 0x0017ad2a LAB_0017ad17: MOV RDI,qword ptr [RSP + 0x10] MOVSX ESI,byte ptr [RSP + 0x47] CALL 0x00112a40 LAB_0017ad26: JMP 0x0017ad28 LAB_0017ad28: JMP 0x0017ad2a LAB_0017ad2a: JMP 0x0017ad2c LAB_0017ad2c: LEA RDI,[RSP + 0x50] CALL 0x0012d750 JMP 0x0017ac6b LAB_0017ad3b: MOV byte ptr [RSP + 0x67],0x1 TEST byte ptr [RSP + 0x67],0x1 JNZ 0x0017ad51 MOV RDI,qword ptr [RSP + 0x10] CALL 0x00113768 LAB_0017ad51: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x78 RET
/* WARNING: Removing unreachable block (ram,0x0017ad47) */ /* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string() const */ string * nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::get_token_string(void) { bool bVar1; byte *pbVar2; char *pcVar3; size_t __maxlen; long in_RSI; string *in_RDI; int8 local_40; int1 local_38; byte local_31; int8 local_30; int8 local_28; vector<char,std::allocator<char>> *local_20; int1 local_11; local_11 = 0; std::__cxx11::string::string(in_RDI); local_20 = (vector<char,std::allocator<char>> *)(in_RSI + 0x38); local_28 = std::vector<char,std::allocator<char>>::begin(local_20); local_30 = std::vector<char,std::allocator<char>>::end(local_20); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_28,(__normal_iterator *)&local_30), bVar1) { pbVar2 = (byte *)__gnu_cxx:: __normal_iterator<char_const*,std::vector<char,std::allocator<char>>>:: operator*((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>> *)&local_28); local_31 = *pbVar2; if (local_31 < 0x20) { local_38 = 0; local_40 = 0; pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40); __maxlen = std::array<char,9ul>::size(); snprintf(pcVar3,__maxlen,"<U+%.4X>",(ulong)local_31); pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40); /* try { // try from 0017acf4 to 0017ad25 has its CatchHandler @ 0017acfd */ std::__cxx11::string::operator+=(in_RDI,pcVar3); } else { std::__cxx11::string::push_back((char)in_RDI); } __gnu_cxx::__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::operator++ ((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>> *)&local_28); } return in_RDI; }
39,625
ma_get_bitmap_description
eloqsql/storage/maria/ma_bitmap.c
size_t _ma_get_bitmap_description(MARIA_FILE_BITMAP *bitmap, uchar *bitmap_data, pgcache_page_no_t page, char *out) { uchar *pos, *end; size_t count=0, dot_printed= 0, len; char buff[80], last[80]; page++; last[0]=0; for (pos= bitmap_data, end= pos+ bitmap->used_size ; pos < end ; pos+= 6) { ulonglong bits= uint6korr(pos); /* 6 bytes = 6*8/3= 16 patterns */ uint i; for (i= 0; i < 16 ; i++, bits>>= 3) { if (count > 60) { if (memcmp(buff, last, count)) { memcpy(last, buff, count); len= sprintf(out, "%8lu: ", (ulong) (page - count)); memcpy(out+len, buff, count); out+= len + count + 1; out[-1]= '\n'; dot_printed= 0; } else if (!(dot_printed++)) { out= strmov(out, "...\n"); } count= 0; } buff[count++]= '0' + (uint) (bits & 7); page++; } } len= sprintf(out, "%8lu: ", (ulong) (page - count)); memcpy(out+len, buff, count); out[len + count]= '\n'; out[len + count + 1]= 0; return len + count + 1; }
O0
c
ma_get_bitmap_description: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xb8(%rbp) movq %rsi, -0xc0(%rbp) movq %rdx, -0xc8(%rbp) movq %rcx, -0xd0(%rbp) movq $0x0, -0xe8(%rbp) movq $0x0, -0xf0(%rbp) movq -0xc8(%rbp), %rax addq $0x1, %rax movq %rax, -0xc8(%rbp) movb $0x0, -0xb0(%rbp) movq -0xc0(%rbp), %rax movq %rax, -0xd8(%rbp) movq -0xd8(%rbp), %rax movq -0xb8(%rbp), %rcx movl 0x24(%rcx), %ecx addq %rcx, %rax movq %rax, -0xe0(%rbp) movq -0xd8(%rbp), %rax cmpq -0xe0(%rbp), %rax jae 0x630cd movq -0xd8(%rbp), %rdi callq 0x631a0 movq %rax, -0x100(%rbp) movl $0x0, -0x104(%rbp) cmpl $0x10, -0x104(%rbp) jae 0x630b4 cmpq $0x3c, -0xe8(%rbp) jbe 0x63053 leaq -0x60(%rbp), %rdi leaq -0xb0(%rbp), %rsi movq -0xe8(%rbp), %rdx callq 0x2a810 cmpl $0x0, %eax je 0x63011 leaq -0xb0(%rbp), %rdi leaq -0x60(%rbp), %rsi movq -0xe8(%rbp), %rdx callq 0x2a090 movq -0xd0(%rbp), %rdi movq -0xc8(%rbp), %rdx subq -0xe8(%rbp), %rdx leaq 0xef531(%rip), %rsi # 0x1524dc movb $0x0, %al callq 0x2a790 cltq movq %rax, -0xf8(%rbp) movq -0xd0(%rbp), %rdi addq -0xf8(%rbp), %rdi leaq -0x60(%rbp), %rsi movq -0xe8(%rbp), %rdx callq 0x2a090 movq -0xf8(%rbp), %rax addq -0xe8(%rbp), %rax addq $0x1, %rax addq -0xd0(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0xd0(%rbp), %rax movb $0xa, -0x1(%rax) movq $0x0, -0xf0(%rbp) jmp 0x63048 movq -0xf0(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xf0(%rbp) cmpq $0x0, %rax jne 0x63046 movq -0xd0(%rbp), %rdi leaq 0xef4a9(%rip), %rsi # 0x1524e3 callq 0x2a710 movq %rax, -0xd0(%rbp) jmp 0x63048 movq $0x0, -0xe8(%rbp) movq -0x100(%rbp), %rax andq $0x7, %rax addl $0x30, %eax movb %al, %cl movq -0xe8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xe8(%rbp) movb %cl, -0x60(%rbp,%rax) movq -0xc8(%rbp), %rax addq $0x1, %rax movq %rax, -0xc8(%rbp) movl -0x104(%rbp), %eax addl $0x1, %eax movl %eax, -0x104(%rbp) movq -0x100(%rbp), %rax shrq $0x3, %rax movq %rax, -0x100(%rbp) jmp 0x62f3d jmp 0x630b6 movq -0xd8(%rbp), %rax addq $0x6, %rax movq %rax, -0xd8(%rbp) jmp 0x62f0c movq -0xd0(%rbp), %rdi movq -0xc8(%rbp), %rdx movq -0xe8(%rbp), %rax subq %rax, %rdx leaq 0xef3f0(%rip), %rsi # 0x1524dc xorl %eax, %eax callq 0x2a790 cltq movq %rax, -0xf8(%rbp) movq -0xd0(%rbp), %rdi movq -0xf8(%rbp), %rax addq %rax, %rdi movq -0xe8(%rbp), %rdx leaq -0x60(%rbp), %rsi callq 0x2a090 movq -0xd0(%rbp), %rax movq -0xf8(%rbp), %rcx movq -0xe8(%rbp), %rdx addq %rdx, %rcx movb $0xa, (%rax,%rcx) movq -0xd0(%rbp), %rax movq -0xf8(%rbp), %rcx movq -0xe8(%rbp), %rdx addq %rdx, %rcx movb $0x0, 0x1(%rax,%rcx) movq -0xf8(%rbp), %rax movq -0xe8(%rbp), %rcx leaq 0x1(%rax,%rcx), %rax movq %rax, -0x110(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x63192 movq -0x110(%rbp), %rax addq $0x110, %rsp # imm = 0x110 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
_ma_get_bitmap_description: push rbp mov rbp, rsp sub rsp, 110h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_B8], rdi mov [rbp+var_C0], rsi mov [rbp+var_C8], rdx mov [rbp+var_D0], rcx mov [rbp+var_E8], 0 mov [rbp+var_F0], 0 mov rax, [rbp+var_C8] add rax, 1 mov [rbp+var_C8], rax mov [rbp+var_B0], 0 mov rax, [rbp+var_C0] mov [rbp+var_D8], rax mov rax, [rbp+var_D8] mov rcx, [rbp+var_B8] mov ecx, [rcx+24h] add rax, rcx mov [rbp+var_E0], rax loc_62F0C: mov rax, [rbp+var_D8] cmp rax, [rbp+var_E0] jnb loc_630CD mov rdi, [rbp+var_D8] call uint6korr_2 mov [rbp+var_100], rax mov [rbp+var_104], 0 loc_62F3D: cmp [rbp+var_104], 10h jnb loc_630B4 cmp [rbp+var_E8], 3Ch ; '<' jbe loc_63053 lea rdi, [rbp+var_60] lea rsi, [rbp+var_B0] mov rdx, [rbp+var_E8] call _memcmp cmp eax, 0 jz loc_63011 lea rdi, [rbp+var_B0] lea rsi, [rbp+var_60] mov rdx, [rbp+var_E8] call _memcpy mov rdi, [rbp+var_D0] mov rdx, [rbp+var_C8] sub rdx, [rbp+var_E8] lea rsi, a8lu; "%8lu: " mov al, 0 call _sprintf cdqe mov [rbp+var_F8], rax mov rdi, [rbp+var_D0] add rdi, [rbp+var_F8] lea rsi, [rbp+var_60] mov rdx, [rbp+var_E8] call _memcpy mov rax, [rbp+var_F8] add rax, [rbp+var_E8] add rax, 1 add rax, [rbp+var_D0] mov [rbp+var_D0], rax mov rax, [rbp+var_D0] mov byte ptr [rax-1], 0Ah mov [rbp+var_F0], 0 jmp short loc_63048 loc_63011: mov rax, [rbp+var_F0] mov rcx, rax add rcx, 1 mov [rbp+var_F0], rcx cmp rax, 0 jnz short loc_63046 mov rdi, [rbp+var_D0] lea rsi, asc_1524E3; "...\n" call _stpcpy mov [rbp+var_D0], rax loc_63046: jmp short $+2 loc_63048: mov [rbp+var_E8], 0 loc_63053: mov rax, [rbp+var_100] and rax, 7 add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_E8] mov rdx, rax add rdx, 1 mov [rbp+var_E8], rdx mov [rbp+rax+var_60], cl mov rax, [rbp+var_C8] add rax, 1 mov [rbp+var_C8], rax mov eax, [rbp+var_104] add eax, 1 mov [rbp+var_104], eax mov rax, [rbp+var_100] shr rax, 3 mov [rbp+var_100], rax jmp loc_62F3D loc_630B4: jmp short $+2 loc_630B6: mov rax, [rbp+var_D8] add rax, 6 mov [rbp+var_D8], rax jmp loc_62F0C loc_630CD: mov rdi, [rbp+var_D0] mov rdx, [rbp+var_C8] mov rax, [rbp+var_E8] sub rdx, rax lea rsi, a8lu; "%8lu: " xor eax, eax call _sprintf cdqe mov [rbp+var_F8], rax mov rdi, [rbp+var_D0] mov rax, [rbp+var_F8] add rdi, rax mov rdx, [rbp+var_E8] lea rsi, [rbp+var_60] call _memcpy mov rax, [rbp+var_D0] mov rcx, [rbp+var_F8] mov rdx, [rbp+var_E8] add rcx, rdx mov byte ptr [rax+rcx], 0Ah mov rax, [rbp+var_D0] mov rcx, [rbp+var_F8] mov rdx, [rbp+var_E8] add rcx, rdx mov byte ptr [rax+rcx+1], 0 mov rax, [rbp+var_F8] mov rcx, [rbp+var_E8] lea rax, [rax+rcx+1] mov [rbp+var_110], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_63192 mov rax, [rbp+var_110] add rsp, 110h pop rbp retn loc_63192: call ___stack_chk_fail
long long ma_get_bitmap_description(long long a1, unsigned long long a2, long long a3, long long a4) { unsigned long long v5; // rax unsigned int i; // [rsp+Ch] [rbp-104h] unsigned long long v8; // [rsp+10h] [rbp-100h] long long v9; // [rsp+18h] [rbp-F8h] long long v10; // [rsp+18h] [rbp-F8h] long long v11; // [rsp+20h] [rbp-F0h] unsigned long long v12; // [rsp+28h] [rbp-E8h] unsigned long long v13; // [rsp+30h] [rbp-E0h] unsigned long long v14; // [rsp+38h] [rbp-D8h] long long v16; // [rsp+48h] [rbp-C8h] _BYTE v17[80]; // [rsp+60h] [rbp-B0h] BYREF _BYTE v18[88]; // [rsp+B0h] [rbp-60h] BYREF unsigned long long v19; // [rsp+108h] [rbp-8h] v19 = __readfsqword(0x28u); v12 = 0LL; v11 = 0LL; v16 = a3 + 1; v17[0] = 0; v14 = a2; v13 = *(unsigned int *)(a1 + 36) + a2; while ( v14 < v13 ) { v8 = uint6korr_2(v14); for ( i = 0; i < 0x10; ++i ) { if ( v12 > 0x3C ) { if ( !(unsigned int)memcmp(v18, v17, v12) ) { if ( !v11++ ) a4 = stpcpy(a4, "...\n"); } else { memcpy(v17, v18, v12); v9 = (int)sprintf(a4, "%8lu: ", v16 - v12); memcpy(v9 + a4, v18, v12); a4 += v12 + v9 + 1; *(_BYTE *)(a4 - 1) = 10; v11 = 0LL; } v12 = 0LL; } v5 = v12++; v18[v5] = (v8 & 7) + 48; ++v16; v8 >>= 3; } v14 += 6LL; } v10 = (int)sprintf(a4, "%8lu: ", v16 - v12); memcpy(v10 + a4, v18, v12); *(_BYTE *)(a4 + v12 + v10) = 10; *(_BYTE *)(a4 + v12 + v10 + 1) = 0; return v10 + v12 + 1; }
_ma_get_bitmap_description: PUSH RBP MOV RBP,RSP SUB RSP,0x110 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xb8],RDI MOV qword ptr [RBP + -0xc0],RSI MOV qword ptr [RBP + -0xc8],RDX MOV qword ptr [RBP + -0xd0],RCX MOV qword ptr [RBP + -0xe8],0x0 MOV qword ptr [RBP + -0xf0],0x0 MOV RAX,qword ptr [RBP + -0xc8] ADD RAX,0x1 MOV qword ptr [RBP + -0xc8],RAX MOV byte ptr [RBP + -0xb0],0x0 MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RBP + -0xb8] MOV ECX,dword ptr [RCX + 0x24] ADD RAX,RCX MOV qword ptr [RBP + -0xe0],RAX LAB_00162f0c: MOV RAX,qword ptr [RBP + -0xd8] CMP RAX,qword ptr [RBP + -0xe0] JNC 0x001630cd MOV RDI,qword ptr [RBP + -0xd8] CALL 0x001631a0 MOV qword ptr [RBP + -0x100],RAX MOV dword ptr [RBP + -0x104],0x0 LAB_00162f3d: CMP dword ptr [RBP + -0x104],0x10 JNC 0x001630b4 CMP qword ptr [RBP + -0xe8],0x3c JBE 0x00163053 LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xe8] CALL 0x0012a810 CMP EAX,0x0 JZ 0x00163011 LEA RDI,[RBP + -0xb0] LEA RSI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0xe8] CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0xd0] MOV RDX,qword ptr [RBP + -0xc8] SUB RDX,qword ptr [RBP + -0xe8] LEA RSI,[0x2524dc] MOV AL,0x0 CALL 0x0012a790 CDQE MOV qword ptr [RBP + -0xf8],RAX MOV RDI,qword ptr [RBP + -0xd0] ADD RDI,qword ptr [RBP + -0xf8] LEA RSI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0xe8] CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0xf8] ADD RAX,qword ptr [RBP + -0xe8] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0xd0] MOV byte ptr [RAX + -0x1],0xa MOV qword ptr [RBP + -0xf0],0x0 JMP 0x00163048 LAB_00163011: MOV RAX,qword ptr [RBP + -0xf0] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xf0],RCX CMP RAX,0x0 JNZ 0x00163046 MOV RDI,qword ptr [RBP + -0xd0] LEA RSI,[0x2524e3] CALL 0x0012a710 MOV qword ptr [RBP + -0xd0],RAX LAB_00163046: JMP 0x00163048 LAB_00163048: MOV qword ptr [RBP + -0xe8],0x0 LAB_00163053: MOV RAX,qword ptr [RBP + -0x100] AND RAX,0x7 ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0xe8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xe8],RDX MOV byte ptr [RBP + RAX*0x1 + -0x60],CL MOV RAX,qword ptr [RBP + -0xc8] ADD RAX,0x1 MOV qword ptr [RBP + -0xc8],RAX MOV EAX,dword ptr [RBP + -0x104] ADD EAX,0x1 MOV dword ptr [RBP + -0x104],EAX MOV RAX,qword ptr [RBP + -0x100] SHR RAX,0x3 MOV qword ptr [RBP + -0x100],RAX JMP 0x00162f3d LAB_001630b4: JMP 0x001630b6 LAB_001630b6: MOV RAX,qword ptr [RBP + -0xd8] ADD RAX,0x6 MOV qword ptr [RBP + -0xd8],RAX JMP 0x00162f0c LAB_001630cd: MOV RDI,qword ptr [RBP + -0xd0] MOV RDX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RBP + -0xe8] SUB RDX,RAX LEA RSI,[0x2524dc] XOR EAX,EAX CALL 0x0012a790 CDQE MOV qword ptr [RBP + -0xf8],RAX MOV RDI,qword ptr [RBP + -0xd0] MOV RAX,qword ptr [RBP + -0xf8] ADD RDI,RAX MOV RDX,qword ptr [RBP + -0xe8] LEA RSI,[RBP + -0x60] CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0xf8] MOV RDX,qword ptr [RBP + -0xe8] ADD RCX,RDX MOV byte ptr [RAX + RCX*0x1],0xa MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0xf8] MOV RDX,qword ptr [RBP + -0xe8] ADD RCX,RDX MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0 MOV RAX,qword ptr [RBP + -0xf8] MOV RCX,qword ptr [RBP + -0xe8] LEA RAX,[RAX + RCX*0x1 + 0x1] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00163192 MOV RAX,qword ptr [RBP + -0x110] ADD RSP,0x110 POP RBP RET LAB_00163192: CALL 0x0012a250
long _ma_get_bitmap_description(long param_1,ulong param_2,long param_3,char *param_4) { uint uVar1; int iVar2; long lVar3; long in_FS_OFFSET; bool bVar4; uint local_10c; ulong local_108; long local_f8; size_t local_f0; ulong local_e0; char *local_d8; long local_d0; int1 local_b8 [80]; char local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_f0 = 0; local_f8 = 0; local_d0 = param_3 + 1; local_b8[0] = 0; uVar1 = *(uint *)(param_1 + 0x24); local_d8 = param_4; for (local_e0 = param_2; local_e0 < param_2 + uVar1; local_e0 = local_e0 + 6) { local_108 = uint6korr(local_e0); for (local_10c = 0; local_10c < 0x10; local_10c = local_10c + 1) { if (0x3c < local_f0) { iVar2 = memcmp(local_68,local_b8,local_f0); if (iVar2 == 0) { lVar3 = local_f8 + 1; bVar4 = local_f8 == 0; local_f8 = lVar3; if (bVar4) { local_d8 = stpcpy(local_d8,"...\n"); } } else { memcpy(local_b8,local_68,local_f0); iVar2 = sprintf(local_d8,"%8lu: ",local_d0 - local_f0); memcpy(local_d8 + iVar2,local_68,local_f0); local_d8 = local_d8 + (long)iVar2 + local_f0 + 1; local_d8[-1] = '\n'; local_f8 = 0; } local_f0 = 0; } local_68[local_f0] = ((byte)local_108 & 7) + 0x30; local_d0 = local_d0 + 1; local_108 = local_108 >> 3; local_f0 = local_f0 + 1; } } iVar2 = sprintf(local_d8,"%8lu: ",local_d0 - local_f0); lVar3 = (long)iVar2; memcpy(local_d8 + lVar3,local_68,local_f0); local_d8[lVar3 + local_f0] = '\n'; local_d8[lVar3 + local_f0 + 1] = '\0'; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar3 + 1 + local_f0; }
39,626
ma_log_change
eloqsql/storage/maria/ma_write.c
my_bool _ma_log_change(MARIA_PAGE *ma_page, const uchar *key_pos, uint length, enum en_key_debug debug_marker __attribute__((unused))) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 6 + 7], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uint offset= (uint) (key_pos - ma_page->buff), translog_parts; MARIA_HA *info= ma_page->info; my_off_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_change"); DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length)); DBUG_ASSERT(info->s->now_transactional); DBUG_ASSERT(offset + length <= ma_page->size); DBUG_ASSERT(ma_page->org_size == ma_page->size); /* Store address of new root page */ page= ma_page->pos / info->s->block_size; page_store(log_data + FILEID_STORE_SIZE, page); log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE; #ifdef EXTRA_DEBUG_KEY_CHANGES (*log_pos++)= KEY_OP_DEBUG; (*log_pos++)= debug_marker; #endif log_pos[0]= KEY_OP_OFFSET; int2store(log_pos+1, offset); log_pos[3]= KEY_OP_CHANGE; int2store(log_pos+4, length); log_pos+= 6; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (log_pos - log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; translog_parts= 2; _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &length, &translog_parts); if (translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) (log_pos - log_data) + length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
ma_log_change: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movq %rsi, -0x38(%rbp) movl %edx, -0x3c(%rbp) movl %ecx, -0x40(%rbp) movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movl %eax, -0xb4(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0xc0(%rbp) movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0xc0(%rbp), %rcx movq (%rcx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xc8(%rbp) jmp 0x87acf jmp 0x87ad1 jmp 0x87ad3 jmp 0x87ad5 jmp 0x87ad7 jmp 0x87ad9 jmp 0x87adb movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0xc0(%rbp), %rcx movq (%rcx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xc8(%rbp) leaq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0xd0(%rbp) movq -0xc8(%rbp), %rax movl %eax, %ecx movq -0xd0(%rbp), %rax movl %ecx, (%rax) movq -0xc8(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xd0(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x20(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb $0x1, (%rax) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0xd8(%rbp) movl -0xb4(%rbp), %eax movw %ax, %cx movq -0xd8(%rbp), %rax movw %cx, (%rax) movq -0x50(%rbp), %rax movb $0x3, 0x3(%rax) movq -0x50(%rbp), %rax addq $0x4, %rax movq %rax, -0xe0(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0xe0(%rbp), %rax movw %cx, (%rax) movq -0x50(%rbp), %rax addq $0x6, %rax movq %rax, -0x50(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x50(%rbp), %rax leaq -0x20(%rbp), %rcx subq %rcx, %rax movq %rax, -0x88(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x3c(%rbp), %eax movq %rax, -0x78(%rbp) movl $0x2, -0xb8(%rbp) movq -0xc0(%rbp), %rax movq 0x8(%rax), %rdx movq -0xc0(%rbp), %rcx movq -0x50(%rbp), %rax leaq -0x20(%rbp), %rsi subq %rsi, %rax movl %eax, %r8d addl -0x3c(%rbp), %r8d movl -0xb8(%rbp), %r9d addl $0x2, %r9d leaq -0xb0(%rbp), %r10 leaq -0x20(%rbp), %rax leaq -0x48(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x55370 cmpb $0x0, %al je 0x87c42 jmp 0x87c3c movb $0x1, -0x21(%rbp) jmp 0x87c48 jmp 0x87c44 movb $0x0, -0x21(%rbp) movb -0x21(%rbp), %al movb %al, -0xe1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x87c72 movb -0xe1(%rbp), %al addq $0x100, %rsp # imm = 0x100 popq %rbp retq callq 0x2a270 nopw (%rax,%rax)
_ma_log_change: push rbp mov rbp, rsp sub rsp, 100h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_38], rsi mov [rbp+var_3C], edx mov [rbp+var_40], ecx mov rax, [rbp+var_38] mov rcx, [rbp+var_30] mov rcx, [rcx+10h] sub rax, rcx mov [rbp+var_B4], eax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_C0], rax mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_C0] mov rcx, [rcx] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_C8], rax jmp short $+2 loc_87ACF: jmp short $+2 loc_87AD1: jmp short $+2 loc_87AD3: jmp short $+2 loc_87AD5: jmp short $+2 loc_87AD7: jmp short $+2 loc_87AD9: jmp short $+2 loc_87ADB: mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_C0] mov rcx, [rcx] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_C8], rax lea rax, [rbp+var_20] add rax, 2 mov [rbp+var_D0], rax mov rax, [rbp+var_C8] mov ecx, eax mov rax, [rbp+var_D0] mov [rax], ecx mov rax, [rbp+var_C8] shr rax, 20h mov cl, al mov rax, [rbp+var_D0] mov [rax+4], cl lea rax, [rbp+var_20] add rax, 2 add rax, 5 mov [rbp+var_50], rax mov rax, [rbp+var_50] mov byte ptr [rax], 1 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_D8], rax mov eax, [rbp+var_B4] mov cx, ax mov rax, [rbp+var_D8] mov [rax], cx mov rax, [rbp+var_50] mov byte ptr [rax+3], 3 mov rax, [rbp+var_50] add rax, 4 mov [rbp+var_E0], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_E0] mov [rax], cx mov rax, [rbp+var_50] add rax, 6 mov [rbp+var_50], rax lea rax, [rbp+var_20] mov [rbp+var_90], rax mov rax, [rbp+var_50] lea rcx, [rbp+var_20] sub rax, rcx mov [rbp+var_88], rax mov rax, [rbp+var_38] mov [rbp+var_80], rax mov eax, [rbp+var_3C] mov [rbp+var_78], rax mov [rbp+var_B8], 2 mov rax, [rbp+var_C0] mov rdx, [rax+8] mov rcx, [rbp+var_C0] mov rax, [rbp+var_50] lea rsi, [rbp+var_20] sub rax, rsi mov r8d, eax add r8d, [rbp+var_3C] mov r9d, [rbp+var_B8] add r9d, 2 lea r10, [rbp+var_B0] lea rax, [rbp+var_20] lea rdi, [rbp+var_48] mov esi, 0Ch xor r11d, r11d mov [rsp+100h+var_100], r10 mov [rsp+100h+var_F8], rax mov [rsp+100h+var_F0], 0 call translog_write_record cmp al, 0 jz short loc_87C42 jmp short $+2 loc_87C3C: mov [rbp+var_21], 1 jmp short loc_87C48 loc_87C42: jmp short $+2 loc_87C44: mov [rbp+var_21], 0 loc_87C48: mov al, [rbp+var_21] mov [rbp+var_E1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_87C72 mov al, [rbp+var_E1] add rsp, 100h pop rbp retn loc_87C72: call ___stack_chk_fail
bool ma_log_change(long long **a1, long long a2, unsigned int a3, int a4) { unsigned long long v5; // [rsp+38h] [rbp-C8h] long long *v6; // [rsp+40h] [rbp-C0h] __int16 v7; // [rsp+4Ch] [rbp-B4h] _QWORD v8[13]; // [rsp+50h] [rbp-B0h] BYREF _BYTE v9[8]; // [rsp+B8h] [rbp-48h] BYREF int v10; // [rsp+C0h] [rbp-40h] unsigned int v11; // [rsp+C4h] [rbp-3Ch] long long v12; // [rsp+C8h] [rbp-38h] long long **v13; // [rsp+D0h] [rbp-30h] __int16 v14; // [rsp+E0h] [rbp-20h] BYREF int v15; // [rsp+E2h] [rbp-1Eh] char v16; // [rsp+E6h] [rbp-1Ah] char v17; // [rsp+E7h] [rbp-19h] __int16 v18; // [rsp+E8h] [rbp-18h] char v19; // [rsp+EAh] [rbp-16h] __int16 v20; // [rsp+EBh] [rbp-15h] _BYTE v21[19]; // [rsp+EDh] [rbp-13h] BYREF long long savedregs; // [rsp+100h] [rbp+0h] BYREF *(_QWORD *)&v21[11] = __readfsqword(0x28u); v13 = a1; v12 = a2; v11 = a3; v10 = a4; v7 = a2 - (unsigned __int16)a1[2]; v6 = *a1; v5 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980); v15 = v5; v16 = BYTE4(v5); v17 = 1; v18 = v7; v19 = 3; v20 = a3; v8[12] = v21; v8[4] = &v14; v8[5] = 13LL; v8[6] = a2; v8[7] = a3; return translog_write_record( (long long)v9, 0xCu, v6[1], v6, a3 + (unsigned int)v21 - ((unsigned int)&savedregs - 32), 4u, v8, &v14, 0LL) != 0; }
_ma_log_change: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x30],RDI MOV qword ptr [RBP + -0x38],RSI MOV dword ptr [RBP + -0x3c],EDX MOV dword ptr [RBP + -0x40],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX MOV dword ptr [RBP + -0xb4],EAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xc8],RAX JMP 0x00187acf LAB_00187acf: JMP 0x00187ad1 LAB_00187ad1: JMP 0x00187ad3 LAB_00187ad3: JMP 0x00187ad5 LAB_00187ad5: JMP 0x00187ad7 LAB_00187ad7: JMP 0x00187ad9 LAB_00187ad9: JMP 0x00187adb LAB_00187adb: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xc8],RAX LEA RAX,[RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xd0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0xc8] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xd0] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x20] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0xd8],RAX MOV EAX,dword ptr [RBP + -0xb4] MOV CX,AX MOV RAX,qword ptr [RBP + -0xd8] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x3],0x3 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x4 MOV qword ptr [RBP + -0xe0],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0xe0] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x6 MOV qword ptr [RBP + -0x50],RAX LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0xb8],0x2 MOV RAX,qword ptr [RBP + -0xc0] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0xc0] MOV RAX,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x20] SUB RAX,RSI MOV R8D,EAX ADD R8D,dword ptr [RBP + -0x3c] MOV R9D,dword ptr [RBP + -0xb8] ADD R9D,0x2 LEA R10,[RBP + -0xb0] LEA RAX,[RBP + -0x20] LEA RDI,[RBP + -0x48] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00155370 CMP AL,0x0 JZ 0x00187c42 JMP 0x00187c3c LAB_00187c3c: MOV byte ptr [RBP + -0x21],0x1 JMP 0x00187c48 LAB_00187c42: JMP 0x00187c44 LAB_00187c44: MOV byte ptr [RBP + -0x21],0x0 LAB_00187c48: MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0xe1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00187c72 MOV AL,byte ptr [RBP + -0xe1] ADD RSP,0x100 POP RBP RET LAB_00187c72: CALL 0x0012a270
int8 _ma_log_change(long *param_1,int8 param_2,uint param_3,int4 param_4) { long *plVar1; char cVar2; ulong uVar3; long in_FS_OFFSET; int1 local_b8 [32]; int1 *local_98; long local_90; int8 local_88; ulong local_80; int1 *local_58; int1 local_50 [8]; int4 local_48; uint local_44; int8 local_40; long *local_38; int1 local_29; int1 local_28 [2]; int4 local_26; int1 local_22; int1 local_21; short local_20; int1 local_1e; int2 local_1d; int1 auStack_1b [11]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = (short)param_2 - (short)param_1[2]; plVar1 = (long *)*param_1; uVar3 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc); local_26 = (int4)uVar3; local_22 = (int1)(uVar3 >> 0x20); local_21 = 1; local_1e = 3; local_1d = (int2)param_3; local_58 = auStack_1b; local_98 = local_28; local_90 = (long)local_58 - (long)local_28; local_80 = (ulong)param_3; local_88 = param_2; local_48 = param_4; local_44 = param_3; local_40 = param_2; local_38 = param_1; cVar2 = translog_write_record (local_50,0xc,plVar1[1],plVar1,((int)local_58 - (int)local_28) + param_3,4, local_b8,local_28,0); local_29 = cVar2 != '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,627
ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int>>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
TerminalInputParser::Output TerminalInputParser::ParseCursorReporting( std::vector<int> arguments) { if (arguments.size() != 2) { return SPECIAL; } Output output(CURSOR_REPORTING); output.cursor.y = arguments[0]; // NOLINT output.cursor.x = arguments[1]; // NOLINT return output; }
O1
cpp
ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int>>): movq %rdi, %rax movq (%rdx), %rcx movq 0x8(%rdx), %rdx subq %rcx, %rdx cmpq $0x8, %rdx jne 0x33adb movl $0x5, (%rax) movl (%rcx), %edx movl %edx, 0x8(%rax) movl 0x4(%rcx), %ecx movl %ecx, 0x4(%rax) retq movl $0x3, (%rax) retq
_ZN5ftxui19TerminalInputParser20ParseCursorReportingESt6vectorIiSaIiEE: mov rax, rdi mov rcx, [rdx] mov rdx, [rdx+8] sub rdx, rcx cmp rdx, 8 jnz short loc_33ADB mov dword ptr [rax], 5 mov edx, [rcx] mov [rax+8], edx mov ecx, [rcx+4] mov [rax+4], ecx retn loc_33ADB: mov dword ptr [rax], 3 retn
_DWORD * ftxui::TerminalInputParser::ParseCursorReporting(_DWORD *a1, long long a2, long long a3) { _DWORD *result; // rax _DWORD *v4; // rcx result = a1; v4 = *(_DWORD **)a3; if ( *(_QWORD *)(a3 + 8) - *(_QWORD *)a3 == 8LL ) { *a1 = 5; a1[2] = *v4; a1[1] = v4[1]; } else { *a1 = 3; } return result; }
ParseCursorReporting: MOV RAX,RDI MOV RCX,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] SUB RDX,RCX CMP RDX,0x8 JNZ 0x00133adb MOV dword ptr [RAX],0x5 MOV EDX,dword ptr [RCX] MOV dword ptr [RAX + 0x8],EDX MOV ECX,dword ptr [RCX + 0x4] MOV dword ptr [RAX + 0x4],ECX RET LAB_00133adb: MOV dword ptr [RAX],0x3 RET
/* ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int> >) */ void ftxui::TerminalInputParser::ParseCursorReporting (int4 *param_1,int8 param_2,int8 *param_3) { int4 *puVar1; puVar1 = (int4 *)*param_3; if (param_3[1] - (long)puVar1 == 8) { *param_1 = 5; param_1[2] = *puVar1; param_1[1] = puVar1[1]; return; } *param_1 = 3; return; }
39,628
ma_update_state_lsns_sub
eloqsql/storage/maria/ma_create.c
int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid, my_bool do_sync, my_bool update_create_rename_lsn) { uchar buf[LSN_STORE_SIZE * 3], *ptr; uchar trid_buff[8]; File file= share->kfile.file; DBUG_ENTER("_ma_update_state_lsns_sub"); DBUG_ASSERT(file >= 0); CRASH_IF_S3_TABLE(share); if (lsn == LSN_IMPOSSIBLE) { int res; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; /* table name is logged only for information */ log_array[TRANSLOG_INTERNAL_PARTS + 0].str= (uchar *)(share->open_file_name.str); log_array[TRANSLOG_INTERNAL_PARTS + 0].length= share->open_file_name.length + 1; if ((res= translog_write_record(&lsn, LOGREC_IMPORTED_TABLE, &dummy_transaction_object, NULL, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length, sizeof(log_array)/sizeof(log_array[0]), log_array, NULL, NULL))) DBUG_RETURN(res); } for (ptr= buf; ptr < (buf + sizeof(buf)); ptr+= LSN_STORE_SIZE) lsn_store(ptr, lsn); share->state.skip_redo_lsn= share->state.is_of_horizon= lsn; share->state.create_trid= create_trid; mi_int8store(trid_buff, create_trid); /* Update create_rename_lsn if update was requested or if the old one had an impossible value. */ if (update_create_rename_lsn || (share->state.create_rename_lsn > lsn && lsn != LSN_IMPOSSIBLE)) { share->state.create_rename_lsn= lsn; if (share->id != 0) { /* If OP is the operation which is calling us, if table is later written, we could see in the log: FILE_ID ... REDO_OP ... REDO_INSERT. (that can happen in real life at least with OP=REPAIR). As FILE_ID will be ignored by Recovery because it is < create_rename_lsn, REDO_INSERT would be ignored too, wrongly. To avoid that, we force a LOGREC_FILE_ID to be logged at next write: */ translog_deassign_id_from_share(share); } } else lsn_store(buf, share->state.create_rename_lsn); DBUG_RETURN(my_pwrite(file, buf, sizeof(buf), sizeof(share->state.header) + MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) || my_pwrite(file, trid_buff, sizeof(trid_buff), sizeof(share->state.header) + MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) || (do_sync && mysql_file_sync(file, MYF(0)))); }
O3
c
ma_update_state_lsns_sub: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r8d, %r12d movl %ecx, %r14d movq %rdx, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rsi, -0x60(%rbp) movl 0x760(%rdi), %r13d testq %rsi, %rsi je 0x618f1 movq %rsi, %rax shrq $0x20, %rax movq %rsi, %rcx shrq $0x28, %rcx movq %rsi, %rdx shrq $0x30, %rdx movq $-0x7, %rdi movb %al, -0x49(%rbp,%rdi) movb %cl, -0x48(%rbp,%rdi) movb %dl, -0x47(%rbp,%rdi) movl %esi, -0x46(%rbp,%rdi) addq $0x7, %rdi cmpq $0xe, %rdi jb 0x6184a movq %rsi, 0x180(%r15) movq %rsi, 0x188(%r15) movq %rbx, 0xe0(%r15) movq %rbx, %rax shrq $0x20, %rax movb %al, -0x55(%rbp) movq %rbx, %rax shrq $0x28, %rax movb %al, -0x56(%rbp) movq %rbx, %rax shrq $0x30, %rax movb %al, -0x57(%rbp) movq %rbx, %rax shrq $0x38, %rax movb %al, -0x58(%rbp) movb %bl, -0x51(%rbp) movb %bh, -0x52(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, -0x53(%rbp) shrl $0x18, %ebx movb %bl, -0x54(%rbp) testb %r12b, %r12b jne 0x618d1 movq 0x178(%r15), %rax cmpq %rsi, %rax setle %cl testq %rsi, %rsi sete %dl orb %cl, %dl jne 0x6194a movq %rsi, 0x178(%r15) cmpw $0x0, 0x620(%r15) je 0x6196b movq %r15, %rdi callq 0x39bdf jmp 0x6196b movq 0x5e0(%r15), %rax leaq -0xb0(%rbp), %rcx movq %rax, 0x20(%rcx) movq 0x5e8(%r15), %r8 incq %r8 movq %r8, 0x28(%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rcx, (%rsp) leaq 0x3a446c(%rip), %rdx # 0x405d90 leaq -0x60(%rbp), %rdi movl $0x29, %esi xorl %ecx, %ecx movl $0x3, %r9d callq 0x2ad24 testb %al, %al je 0x619ee movsbl %al, %ebx jmp 0x619f9 movq %rax, %rcx shrq $0x20, %rcx movb %cl, -0x50(%rbp) movq %rax, %rcx shrq $0x28, %rcx movb %cl, -0x4f(%rbp) movq %rax, %rcx shrq $0x30, %rcx movb %cl, -0x4e(%rbp) movl %eax, -0x4d(%rbp) leaq -0x50(%rbp), %rsi movl $0x15, %edx movl $0x1c, %ecx movl $0x4, %r8d movl %r13d, %edi callq 0xa6e22 movl $0x1, %ebx testq %rax, %rax jne 0x619f9 leaq -0x58(%rbp), %rsi movl $0x8, %edx movl $0x89, %ecx movl $0x4, %r8d movl %r13d, %edi callq 0xa6e22 testq %rax, %rax jne 0x619f9 testb %r14b, %r14b je 0x619f7 leaq 0x32d89a(%rip), %rax # 0x38f258 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r13d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x61a1c movl %r13d, %edi xorl %esi, %esi callq 0xa7ad8 xorl %ebx, %ebx testl %eax, %eax setne %bl jmp 0x619f9 movq -0x60(%rbp), %rsi jmp 0x6182e xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x61a32 movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x64(%rbp), %rbx movq %rax, %rdi movl %r13d, %esi movq %rbx, %rdx callq 0x2dc8f movl (%rbx), %eax jmp 0x619e5 callq 0x2a270
_ma_update_state_lsns_sub: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r12d, r8d mov r14d, ecx mov rbx, rdx mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_60], rsi mov r13d, [rdi+760h] test rsi, rsi jz loc_618F1 loc_6182E: mov rax, rsi shr rax, 20h mov rcx, rsi shr rcx, 28h mov rdx, rsi shr rdx, 30h mov rdi, 0FFFFFFFFFFFFFFF9h loc_6184A: mov [rbp+rdi+var_49], al mov [rbp+rdi+var_48], cl mov [rbp+rdi+var_47], dl mov [rbp+rdi+var_46], esi add rdi, 7 cmp rdi, 0Eh jb short loc_6184A mov [r15+180h], rsi mov [r15+188h], rsi mov [r15+0E0h], rbx mov rax, rbx shr rax, 20h mov [rbp+var_55], al mov rax, rbx shr rax, 28h mov [rbp+var_56], al mov rax, rbx shr rax, 30h mov [rbp+var_57], al mov rax, rbx shr rax, 38h mov [rbp+var_58], al mov [rbp+var_51], bl mov [rbp+var_52], bh mov eax, ebx shr eax, 10h mov [rbp+var_53], al shr ebx, 18h mov [rbp+var_54], bl test r12b, r12b jnz short loc_618D1 mov rax, [r15+178h] cmp rax, rsi setle cl test rsi, rsi setz dl or dl, cl jnz short loc_6194A loc_618D1: mov [r15+178h], rsi cmp word ptr [r15+620h], 0 jz loc_6196B mov rdi, r15 call translog_deassign_id_from_share jmp short loc_6196B loc_618F1: mov rax, [r15+5E0h] lea rcx, [rbp+var_B0] mov [rcx+20h], rax mov r8, [r15+5E8h] inc r8 mov [rcx+28h], r8 xorps xmm0, xmm0 movups [rsp+0D0h+var_C8], xmm0 mov [rsp+0D0h+var_D0], rcx lea rdx, dummy_transaction_object lea rdi, [rbp+var_60] mov esi, 29h ; ')' xor ecx, ecx mov r9d, 3 call translog_write_record test al, al jz loc_619EE movsx ebx, al jmp loc_619F9 loc_6194A: mov rcx, rax shr rcx, 20h mov [rbp+var_50], cl mov rcx, rax shr rcx, 28h mov [rbp+var_4F], cl mov rcx, rax shr rcx, 30h mov [rbp+var_4E], cl mov [rbp+var_4D], eax loc_6196B: lea rsi, [rbp+var_50] mov edx, 15h mov ecx, 1Ch mov r8d, 4 mov edi, r13d call my_pwrite mov ebx, 1 test rax, rax jnz short loc_619F9 lea rsi, [rbp+var_58] mov edx, 8 mov ecx, 89h mov r8d, 4 mov edi, r13d call my_pwrite test rax, rax jnz short loc_619F9 test r14b, r14b jz short loc_619F7 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r13d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_61A1C mov edi, r13d xor esi, esi call my_sync loc_619E5: xor ebx, ebx test eax, eax setnz bl jmp short loc_619F9 loc_619EE: mov rsi, [rbp+var_60] jmp loc_6182E loc_619F7: xor ebx, ebx loc_619F9: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_61A32 mov eax, ebx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_61A1C: lea rbx, [rbp+var_64] mov rdi, rax mov esi, r13d mov rdx, rbx call _ma_update_state_lsns_sub_cold_1 mov eax, [rbx] jmp short loc_619E5 loc_61A32: call ___stack_chk_fail
long long ma_update_state_lsns_sub(long long a1, long long a2, long long a3, char a4, char a5) { unsigned int v9; // r13d unsigned long long v10; // rdi long long v11; // rax char v12; // al unsigned int v13; // ebx long long v14; // rax int v15; // eax _OWORD v17[2]; // [rsp+20h] [rbp-B0h] BYREF long long v18; // [rsp+40h] [rbp-90h] long long v19; // [rsp+48h] [rbp-88h] int v20; // [rsp+6Ch] [rbp-64h] BYREF long long v21; // [rsp+70h] [rbp-60h] BYREF _BYTE v22[8]; // [rsp+78h] [rbp-58h] BYREF _BYTE v23[3]; // [rsp+80h] [rbp-50h] BYREF int v24; // [rsp+83h] [rbp-4Dh] _BYTE v25[25]; // [rsp+87h] [rbp-49h] unsigned long long v26; // [rsp+A0h] [rbp-30h] v26 = __readfsqword(0x28u); v21 = a2; v9 = *(_DWORD *)(a1 + 1888); if ( !a2 ) { v18 = *(_QWORD *)(a1 + 1504); v19 = *(_QWORD *)(a1 + 1512) + 1LL; v12 = translog_write_record( (unsigned long long)&v21, (long long *)((char *)&qword_28 + 1), (long long)dummy_transaction_object, 0LL, v19, 3, v17, 0LL, 0LL); if ( v12 ) return (unsigned int)v12; a2 = v21; } v10 = -7LL; do { v25[v10] = BYTE4(a2); v25[v10 + 1] = BYTE5(a2); v25[v10 + 2] = BYTE6(a2); *(_DWORD *)&v25[v10 + 3] = a2; v10 += 7LL; } while ( v10 < 0xE ); *(_QWORD *)(a1 + 384) = a2; *(_QWORD *)(a1 + 392) = a2; *(_QWORD *)(a1 + 224) = a3; v22[3] = BYTE4(a3); v22[2] = BYTE5(a3); v22[1] = BYTE6(a3); v22[0] = HIBYTE(a3); v22[6] = BYTE1(a3); v22[7] = a3; v22[5] = BYTE2(a3); v22[4] = BYTE3(a3); if ( !a5 && (v11 = *(_QWORD *)(a1 + 376), v11 <= a2 || a2 == 0) ) { v23[0] = BYTE4(*(_QWORD *)(a1 + 376)); v23[1] = BYTE5(v11); v23[2] = BYTE6(v11); v24 = v11; } else { *(_QWORD *)(a1 + 376) = a2; if ( *(_WORD *)(a1 + 1568) ) translog_deassign_id_from_share(a1); } v13 = 1; if ( !my_pwrite(v9, v23, 21LL, 28LL, 4LL) && !my_pwrite(v9, v22, 8LL, 137LL, 4LL) ) { if ( a4 ) { v14 = ((long long ( *)(_OWORD *, _QWORD, long long))PSI_server[43])(v17, v9, 16LL); if ( v14 ) { ma_update_state_lsns_sub_cold_1(v14, v9, &v20); v15 = v20; } else { v15 = my_sync(v9, 0LL); } return v15 != 0; } else { return 0; } } return v13; }
_ma_update_state_lsns_sub: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R12D,R8D MOV R14D,ECX MOV RBX,RDX MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x60],RSI MOV R13D,dword ptr [RDI + 0x760] TEST RSI,RSI JZ 0x001618f1 LAB_0016182e: MOV RAX,RSI SHR RAX,0x20 MOV RCX,RSI SHR RCX,0x28 MOV RDX,RSI SHR RDX,0x30 MOV RDI,-0x7 LAB_0016184a: MOV byte ptr [RBP + RDI*0x1 + -0x49],AL MOV byte ptr [RBP + RDI*0x1 + -0x48],CL MOV byte ptr [RBP + RDI*0x1 + -0x47],DL MOV dword ptr [RBP + RDI*0x1 + -0x46],ESI ADD RDI,0x7 CMP RDI,0xe JC 0x0016184a MOV qword ptr [R15 + 0x180],RSI MOV qword ptr [R15 + 0x188],RSI MOV qword ptr [R15 + 0xe0],RBX MOV RAX,RBX SHR RAX,0x20 MOV byte ptr [RBP + -0x55],AL MOV RAX,RBX SHR RAX,0x28 MOV byte ptr [RBP + -0x56],AL MOV RAX,RBX SHR RAX,0x30 MOV byte ptr [RBP + -0x57],AL MOV RAX,RBX SHR RAX,0x38 MOV byte ptr [RBP + -0x58],AL MOV byte ptr [RBP + -0x51],BL MOV byte ptr [RBP + -0x52],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RBP + -0x53],AL SHR EBX,0x18 MOV byte ptr [RBP + -0x54],BL TEST R12B,R12B JNZ 0x001618d1 MOV RAX,qword ptr [R15 + 0x178] CMP RAX,RSI SETLE CL TEST RSI,RSI SETZ DL OR DL,CL JNZ 0x0016194a LAB_001618d1: MOV qword ptr [R15 + 0x178],RSI CMP word ptr [R15 + 0x620],0x0 JZ 0x0016196b MOV RDI,R15 CALL 0x00139bdf JMP 0x0016196b LAB_001618f1: MOV RAX,qword ptr [R15 + 0x5e0] LEA RCX,[RBP + -0xb0] MOV qword ptr [RCX + 0x20],RAX MOV R8,qword ptr [R15 + 0x5e8] INC R8 MOV qword ptr [RCX + 0x28],R8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RCX LEA RDX,[0x505d90] LEA RDI,[RBP + -0x60] MOV ESI,0x29 XOR ECX,ECX MOV R9D,0x3 CALL 0x0012ad24 TEST AL,AL JZ 0x001619ee MOVSX EBX,AL JMP 0x001619f9 LAB_0016194a: MOV RCX,RAX SHR RCX,0x20 MOV byte ptr [RBP + -0x50],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RBP + -0x4f],CL MOV RCX,RAX SHR RCX,0x30 MOV byte ptr [RBP + -0x4e],CL MOV dword ptr [RBP + -0x4d],EAX LAB_0016196b: LEA RSI,[RBP + -0x50] MOV EDX,0x15 MOV ECX,0x1c MOV R8D,0x4 MOV EDI,R13D CALL 0x001a6e22 MOV EBX,0x1 TEST RAX,RAX JNZ 0x001619f9 LEA RSI,[RBP + -0x58] MOV EDX,0x8 MOV ECX,0x89 MOV R8D,0x4 MOV EDI,R13D CALL 0x001a6e22 TEST RAX,RAX JNZ 0x001619f9 TEST R14B,R14B JZ 0x001619f7 LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R13D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00161a1c MOV EDI,R13D XOR ESI,ESI CALL 0x001a7ad8 LAB_001619e5: XOR EBX,EBX TEST EAX,EAX SETNZ BL JMP 0x001619f9 LAB_001619ee: MOV RSI,qword ptr [RBP + -0x60] JMP 0x0016182e LAB_001619f7: XOR EBX,EBX LAB_001619f9: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00161a32 MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00161a1c: LEA RBX,[RBP + -0x64] MOV RDI,RAX MOV ESI,R13D MOV RDX,RBX CALL 0x0012dc8f MOV EAX,dword ptr [RBX] JMP 0x001619e5 LAB_00161a32: CALL 0x0012a270
uint _ma_update_state_lsns_sub (long param_1,long param_2,int8 param_3,char param_4,char param_5) { int4 uVar1; char cVar2; long lVar3; uint uVar4; ulong uVar5; long in_FS_OFFSET; int1 local_b8 [32]; int8 local_98; long local_90; int local_6c; long local_68; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int4 local_55; int1 auStack_51 [3]; int4 auStack_4e [5]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = *(int4 *)(param_1 + 0x760); local_68 = param_2; if (param_2 == 0) { local_98 = *(int8 *)(param_1 + 0x5e0); local_90 = *(long *)(param_1 + 0x5e8) + 1; cVar2 = translog_write_record(&local_68,0x29,dummy_transaction_object,0,local_90,3,local_b8,0,0) ; if (cVar2 != '\0') { uVar4 = (uint)cVar2; goto LAB_001619f9; } } uVar5 = 0xfffffffffffffff9; do { auStack_51[uVar5] = (char)((ulong)local_68 >> 0x20); auStack_51[uVar5 + 1] = (char)((ulong)local_68 >> 0x28); auStack_51[uVar5 + 2] = (char)((ulong)local_68 >> 0x30); *(int *)(auStack_51 + uVar5 + 3) = (int)local_68; uVar5 = uVar5 + 7; } while (uVar5 < 0xe); *(long *)(param_1 + 0x180) = local_68; *(long *)(param_1 + 0x188) = local_68; *(int8 *)(param_1 + 0xe0) = param_3; local_5d = (int1)((ulong)param_3 >> 0x20); local_5e = (int1)((ulong)param_3 >> 0x28); local_5f = (int1)((ulong)param_3 >> 0x30); local_60 = (int1)((ulong)param_3 >> 0x38); local_59 = (int1)param_3; local_5a = (int1)((ulong)param_3 >> 8); local_5b = (int1)((ulong)param_3 >> 0x10); local_5c = (int1)((ulong)param_3 >> 0x18); if ((param_5 == '\0') && (lVar3 = *(long *)(param_1 + 0x178), local_68 == 0 || lVar3 <= local_68)) { local_58 = (int1)((ulong)lVar3 >> 0x20); local_57 = (int1)((ulong)lVar3 >> 0x28); local_56 = (int1)((ulong)lVar3 >> 0x30); local_55 = (int4)lVar3; } else { *(long *)(param_1 + 0x178) = local_68; if (*(short *)(param_1 + 0x620) != 0) { translog_deassign_id_from_share(param_1); } } lVar3 = my_pwrite(uVar1,&local_58,0x15,0x1c,4); uVar4 = 1; if ((lVar3 == 0) && (lVar3 = my_pwrite(uVar1,&local_60,8,0x89,4), lVar3 == 0)) { if (param_4 == '\0') { uVar4 = 0; } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,uVar1,0x10); if (lVar3 == 0) { local_6c = my_sync(uVar1,0); } else { _ma_update_state_lsns_sub_cold_1(lVar3,uVar1,&local_6c); } uVar4 = (uint)(local_6c != 0); } } LAB_001619f9: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
39,629
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const
monkey531[P]llama/common/json.hpp
const typename object_t::key_type& key() const { JSON_ASSERT(m_object != nullptr); if (JSON_HEDLEY_LIKELY(m_object->is_object())) { return m_it.object_iterator->first; } JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq (%rdi), %rax testq %rax, %rax je 0x4977e movq %rdi, %r14 cmpb $0x1, (%rax) jne 0x4972d movq 0x8(%r14), %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x20380 movq %rax, %rbx leaq 0x46696(%rip), %rsi # 0x8fdd5 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x22836 movq (%r14), %rcx movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0xcf, %esi callq 0x49d80 xorl %ebp, %ebp leaq 0x83c91(%rip), %rsi # 0xcd400 leaq -0x1738(%rip), %rdx # 0x4803e movq %rbx, %rdi callq 0x20b30 leaq 0x44e82(%rip), %rdi # 0x8e607 leaq 0x43635(%rip), %rdx # 0x8cdc1 leaq 0x47601(%rip), %rcx # 0x90d94 movl $0x3519, %esi # imm = 0x3519 xorl %eax, %eax callq 0x20af0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x497b6 jmp 0x497be movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20ba0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rax, [rdi] test rax, rax jz short loc_4977E mov r14, rdi cmp byte ptr [rax], 1 jnz short loc_4972D mov rax, [r14+8] add rsp, 30h pop rbx pop r14 pop rbp retn loc_4972D: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"... lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 0CFh; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_4977E: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3519h xor eax, eax call _ggml_abort mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_497B6 jmp short loc_497BE mov r14, rax loc_497B6: mov rdi, rbx; void * call ___cxa_free_exception loc_497BE: mov rdi, r14 call __Unwind_Resume
key: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0014977e MOV R14,RDI CMP byte ptr [RAX],0x1 JNZ 0x0014972d MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0014972d: PUSH 0x20 POP RDI CALL 0x00120380 MOV RBX,RAX LAB_00149738: LEA RSI,[0x18fdd5] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00122836 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_00149754: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0xcf CALL 0x00149d80 XOR EBP,EBP LEA RSI,[0x1cd400] LEA RDX,[0x14803e] MOV RDI,RBX CALL 0x00120b30 LAB_0014977e: LEA RDI,[0x18e607] LEA RDX,[0x18cdc1] LEA RCX,[0x190d94] MOV ESI,0x3519 XOR EAX,EAX CALL 0x00120af0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::key() const */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { int8 uVar1; allocator local_39; string local_38 [32]; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519, "GGML_ASSERT(%s) failed","m_object != nullptr"); } if (**(char **)this == '\x01') { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); /* try { // try from 00149738 to 0014974d has its CatchHandler @ 001497b3 */ std::__cxx11::string::string<std::allocator<char>> (local_38,"cannot use key() for non-object iterators",&local_39); /* try { // try from 00149754 to 0014977d has its CatchHandler @ 0014979f */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0xcf,local_38,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception); }
39,630
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const
monkey531[P]llama/common/json.hpp
const typename object_t::key_type& key() const { JSON_ASSERT(m_object != nullptr); if (JSON_HEDLEY_LIKELY(m_object->is_object())) { return m_it.object_iterator->first; } JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rax testq %rax, %rax je 0x4d249 movq %rdi, %r14 cmpb $0x1, (%rax) jne 0x4d1eb movq 0x8(%r14), %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18350 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x5dbfe(%rip), %rsi # 0xaae06 leaq 0x5dc20(%rip), %rdx # 0xaae2f leaq 0x8(%rsp), %rdi callq 0x1c7c8 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcf, %esi callq 0x4d82e xorl %ebp, %ebp leaq 0x8d1b6(%rip), %rsi # 0xda3f0 leaq -0x1a4b(%rip), %rdx # 0x4b7f6 movq %rbx, %rdi callq 0x18b30 leaq 0x5c3f7(%rip), %rdi # 0xa9647 leaq 0x5abaa(%rip), %rdx # 0xa7e01 leaq 0x5eb67(%rip), %rcx # 0xabdc5 movl $0x3519, %esi # imm = 0x3519 xorl %eax, %eax callq 0x18ad0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x4d284 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x4d28e jmp 0x4d296 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18ba0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rax, [rdi] test rax, rax jz short loc_4D249 mov r14, rdi cmp byte ptr [rax], 1 jnz short loc_4D1EB mov rax, [r14+8] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_4D1EB: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"... lea rdx, aCannotUseKeyFo+29h; "" lea rdi, [rsp+48h+var_40] 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 rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0CFh; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_4D249: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3519h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_4D284 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4D284: test bpl, bpl jnz short loc_4D28E jmp short loc_4D296 mov r14, rax loc_4D28E: mov rdi, rbx; void * call ___cxa_free_exception loc_4D296: mov rdi, r14 call __Unwind_Resume
key: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0014d249 MOV R14,RDI CMP byte ptr [RAX],0x1 JNZ 0x0014d1eb MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0014d1eb: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0014d201: LEA RSI,[0x1aae06] LEA RDX,[0x1aae2f] LEA RDI,[RSP + 0x8] CALL 0x0011c7c8 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0014d21f: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcf CALL 0x0014d82e XOR EBP,EBP LEA RSI,[0x1da3f0] LEA RDX,[0x14b7f6] MOV RDI,RBX CALL 0x00118b30 LAB_0014d249: LEA RDI,[0x1a9647] LEA RDX,[0x1a7e01] LEA RCX,[0x1abdc5] MOV ESI,0x3519 XOR EAX,EAX CALL 0x00118ad0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::key() const */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { int8 uVar1; int1 *local_40 [2]; int1 local_30 [16]; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519, "GGML_ASSERT(%s) failed","m_object != nullptr"); } if (**(char **)this == '\x01') { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0014d201 to 0014d218 has its CatchHandler @ 0014d28b */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot use key() for non-object iterators",""); /* try { // try from 0014d21f to 0014d248 has its CatchHandler @ 0014d26a */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0xcf,local_40,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception); }
39,631
google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::FormatComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
std::string FormatComment(const std::string& comment_text) { std::string stripped_comment = comment_text; StripWhitespace(&stripped_comment); std::vector<std::string> lines = Split(stripped_comment, "\n"); std::string output; for (const std::string& line : lines) { strings::SubstituteAndAppend(&output, "$0// $1\n", prefix_, line); } return output; }
O0
cpp
google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::FormatComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x2c8, %rsp # imm = 0x2C8 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x2c0(%rsp) movq %rsi, 0x2b8(%rsp) movq %rdx, 0x2b0(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x2b0(%rsp), %rsi leaq 0x290(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0x131a0 movq 0x48(%rsp), %rdi callq 0x26740 jmp 0x63c1f leaq 0x258(%rsp), %rdi leaq 0x290(%rsp), %rsi callq 0x30550 jmp 0x63c36 movq 0x258(%rsp), %rsi movq 0x260(%rsp), %rdx leaq 0x189cdb(%rip), %rcx # 0x1ed928 leaq 0x268(%rsp), %rdi movl $0x1, %r8d callq 0x81db0 jmp 0x63c62 movq 0x30(%rsp), %rdi movb $0x0, 0x257(%rsp) callq 0x13620 leaq 0x268(%rsp), %rax movq %rax, 0x248(%rsp) movq 0x248(%rsp), %rdi callq 0x19110 movq %rax, 0x240(%rsp) movq 0x248(%rsp), %rdi callq 0x19140 movq %rax, 0x238(%rsp) leaq 0x240(%rsp), %rdi leaq 0x238(%rsp), %rsi callq 0x81d70 testb $0x1, %al jne 0x63ccc jmp 0x63e56 leaq 0x240(%rsp), %rdi callq 0x191b0 movq 0x40(%rsp), %rsi movq %rax, 0x230(%rsp) addq $0x78, %rsi leaq 0x200(%rsp), %rdi callq 0x769e0 jmp 0x63cf9 movq 0x230(%rsp), %rsi leaq 0x1d0(%rsp), %rdi callq 0x769e0 jmp 0x63d10 leaq 0x1a0(%rsp), %rdi callq 0x76920 jmp 0x63d1f leaq 0x170(%rsp), %rdi callq 0x76920 jmp 0x63d2e leaq 0x140(%rsp), %rdi callq 0x76920 jmp 0x63d3d leaq 0x110(%rsp), %rdi callq 0x76920 jmp 0x63d4c leaq 0xe0(%rsp), %rdi callq 0x76920 jmp 0x63d5b leaq 0xb0(%rsp), %rdi callq 0x76920 jmp 0x63d6a leaq 0x80(%rsp), %rdi callq 0x76920 jmp 0x63d79 leaq 0x50(%rsp), %rdi callq 0x76920 jmp 0x63d85 movq 0x30(%rsp), %rdi movq %rsp, %rax leaq 0x50(%rsp), %rcx movq %rcx, 0x28(%rax) leaq 0x80(%rsp), %rcx movq %rcx, 0x20(%rax) leaq 0xb0(%rsp), %rcx movq %rcx, 0x18(%rax) leaq 0xe0(%rsp), %rcx movq %rcx, 0x10(%rax) leaq 0x110(%rsp), %rcx movq %rcx, 0x8(%rax) leaq 0x140(%rsp), %rcx movq %rcx, (%rax) leaq 0x18c113(%rip), %rsi # 0x1efeeb leaq 0x200(%rsp), %rdx leaq 0x1d0(%rsp), %rcx leaq 0x1a0(%rsp), %r8 leaq 0x170(%rsp), %r9 callq 0x144ce0 jmp 0x63dff jmp 0x63e01 leaq 0x240(%rsp), %rdi callq 0x19370 jmp 0x63cae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) jmp 0x63e99 movq 0x30(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) callq 0x13290 leaq 0x268(%rsp), %rdi callq 0x14940 jmp 0x63e99 movb $0x1, 0x257(%rsp) testb $0x1, 0x257(%rsp) jne 0x63e72 movq 0x30(%rsp), %rdi callq 0x13290 leaq 0x268(%rsp), %rdi callq 0x14940 leaq 0x290(%rsp), %rdi callq 0x13290 movq 0x38(%rsp), %rax addq $0x2c8, %rsp # imm = 0x2C8 retq leaq 0x290(%rsp), %rdi callq 0x13290 movq 0x288(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax)
_ZN6google8protobuf12_GLOBAL__N_128SourceLocationCommentPrinter13FormatCommentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 2C8h mov [rsp+2C8h+var_298], rdi mov rax, rdi mov [rsp+2C8h+var_290], rax mov [rsp+2C8h+var_8], rdi mov [rsp+2C8h+var_10], rsi mov [rsp+2C8h+var_18], rdx mov rax, [rsp+2C8h+var_10] mov [rsp+2C8h+var_288], rax mov rsi, [rsp+2C8h+var_18] lea rdi, [rsp+2C8h+var_38] mov [rsp+2C8h+var_280], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rdi, [rsp+2C8h+var_280] call _ZN6google8protobuf15StripWhitespaceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::StripWhitespace(std::string *) jmp short $+2 loc_63C1F: lea rdi, [rsp+2C8h+var_70] lea rsi, [rsp+2C8h+var_38] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_63C36: mov rsi, [rsp+2C8h+var_70] mov rdx, [rsp+2C8h+var_68] lea rcx, aSyntax0+0Fh; "\n" lea rdi, [rsp+2C8h+var_60] mov r8d, 1 call _ZN6google8protobuf5SplitB5cxx11ENS0_20stringpiece_internal11StringPieceEPKcb; google::protobuf::Split(google::protobuf::stringpiece_internal::StringPiece,char const*,bool) jmp short $+2 loc_63C62: mov rdi, [rsp+2C8h+var_298] mov [rsp+2C8h+var_71], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) lea rax, [rsp+2C8h+var_60] mov [rsp+2C8h+var_80], rax mov rdi, [rsp+2C8h+var_80] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+2C8h+var_88], rax mov rdi, [rsp+2C8h+var_80] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+2C8h+var_90], rax loc_63CAE: lea rdi, [rsp+2C8h+var_88] lea rsi, [rsp+2C8h+var_90] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_63CCC jmp loc_63E56 loc_63CCC: lea rdi, [rsp+2C8h+var_88] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov rsi, [rsp+2C8h+var_288] mov [rsp+2C8h+var_98], rax add rsi, 78h ; 'x' lea rdi, [rsp+2C8h+var_C8] call _ZN6google8protobuf7strings8internal13SubstituteArgC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(std::string const&) jmp short $+2 loc_63CF9: mov rsi, [rsp+2C8h+var_98] lea rdi, [rsp+2C8h+var_F8] call _ZN6google8protobuf7strings8internal13SubstituteArgC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(std::string const&) jmp short $+2 loc_63D10: lea rdi, [rsp+2C8h+var_128]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D1F: lea rdi, [rsp+2C8h+var_158]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D2E: lea rdi, [rsp+2C8h+var_188]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D3D: lea rdi, [rsp+2C8h+var_1B8]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D4C: lea rdi, [rsp+2C8h+var_1E8]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D5B: lea rdi, [rsp+2C8h+var_218]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D6A: lea rdi, [rsp+2C8h+var_248]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D79: lea rdi, [rsp+2C8h+var_278]; this call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void) jmp short $+2 loc_63D85: mov rdi, [rsp+2C8h+var_298] mov rax, rsp lea rcx, [rsp+2C8h+var_278] mov [rax+28h], rcx lea rcx, [rsp+2C8h+var_248] mov [rax+20h], rcx lea rcx, [rsp+2C8h+var_218] mov [rax+18h], rcx lea rcx, [rsp+2C8h+var_1E8] mov [rax+10h], rcx lea rcx, [rsp+2C8h+var_1B8] mov [rax+8], rcx lea rcx, [rsp+2C8h+var_188] mov [rax], rcx lea rsi, a01_0; "$0// $1\n" lea rdx, [rsp+2C8h+var_C8] lea rcx, [rsp+2C8h+var_F8] lea r8, [rsp+2C8h+var_128] lea r9, [rsp+2C8h+var_158] call _ZN6google8protobuf7strings19SubstituteAndAppendEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKNS1_8internal13SubstituteArgESE_SE_SE_SE_SE_SE_SE_SE_SE_; google::protobuf::strings::SubstituteAndAppend(std::string *,char const*,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&) jmp short $+2 loc_63DFF: jmp short $+2 loc_63E01: lea rdi, [rsp+2C8h+var_88] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_63CAE mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax jmp short loc_63E99 mov rdi, [rsp+arg_28] mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+arg_260] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_63E99 loc_63E56: mov [rsp+2C8h+var_71], 1 test [rsp+2C8h+var_71], 1 jnz short loc_63E72 mov rdi, [rsp+2C8h+var_298] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_63E72: lea rdi, [rsp+2C8h+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+2C8h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_290] add rsp, 2C8h retn loc_63E99: lea rdi, [rsp+arg_288] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_280] call __Unwind_Resume
long long google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::FormatComment( long long a1, long long a2, long long a3) { int v3; // r9d _BYTE v5[48]; // [rsp+50h] [rbp-278h] BYREF _BYTE v6[48]; // [rsp+80h] [rbp-248h] BYREF _BYTE v7[48]; // [rsp+B0h] [rbp-218h] BYREF _BYTE v8[48]; // [rsp+E0h] [rbp-1E8h] BYREF _BYTE v9[48]; // [rsp+110h] [rbp-1B8h] BYREF _BYTE v10[48]; // [rsp+140h] [rbp-188h] BYREF _BYTE v11[48]; // [rsp+170h] [rbp-158h] BYREF _BYTE v12[48]; // [rsp+1A0h] [rbp-128h] BYREF _BYTE v13[48]; // [rsp+1D0h] [rbp-F8h] BYREF _BYTE v14[48]; // [rsp+200h] [rbp-C8h] BYREF long long v15; // [rsp+230h] [rbp-98h] long long v16; // [rsp+238h] [rbp-90h] BYREF _QWORD v17[2]; // [rsp+240h] [rbp-88h] BYREF char v18; // [rsp+257h] [rbp-71h] long long v19; // [rsp+258h] [rbp-70h] BYREF long long v20; // [rsp+260h] [rbp-68h] long long v21[5]; // [rsp+268h] [rbp-60h] BYREF _BYTE v22[32]; // [rsp+290h] [rbp-38h] BYREF long long v23; // [rsp+2B0h] [rbp-18h] long long v24; // [rsp+2B8h] [rbp-10h] long long v25; // [rsp+2C0h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; std::string::basic_string(v22, a3); google::protobuf::StripWhitespace((long long)v22); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(&v19, (long long)v22); google::protobuf::Split[abi:cxx11]((unsigned int)v21, v19, v20, (unsigned int)"\n", 1, v3); v18 = 0; std::string::basic_string(a1); v17[1] = v21; v17[0] = std::vector<std::string>::begin((long long)v21); v16 = std::vector<std::string>::end((long long)v21); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v17, &v16) & 1) != 0 ) { v15 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)v17); google::protobuf::strings::internal::SubstituteArg::SubstituteArg(v14, a2 + 120); google::protobuf::strings::internal::SubstituteArg::SubstituteArg(v13, v15); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v12); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v11); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v10); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v9); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v8); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v7); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v6); google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v5); google::protobuf::strings::SubstituteAndAppend(a1, "$0// $1\n", v14, v13, v12, v11); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v17); } v18 = 1; std::vector<std::string>::~vector(v21); std::string::~string(v22); return a1; }
FormatComment: SUB RSP,0x2c8 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x2c0],RDI MOV qword ptr [RSP + 0x2b8],RSI MOV qword ptr [RSP + 0x2b0],RDX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x40],RAX MOV RSI,qword ptr [RSP + 0x2b0] LEA RDI,[RSP + 0x290] MOV qword ptr [RSP + 0x48],RDI CALL 0x001131a0 MOV RDI,qword ptr [RSP + 0x48] LAB_00163c18: CALL 0x00126740 JMP 0x00163c1f LAB_00163c1f: LEA RDI,[RSP + 0x258] LEA RSI,[RSP + 0x290] CALL 0x00130550 JMP 0x00163c36 LAB_00163c36: MOV RSI,qword ptr [RSP + 0x258] MOV RDX,qword ptr [RSP + 0x260] LEA RCX,[0x2ed928] LEA RDI,[RSP + 0x268] MOV R8D,0x1 CALL 0x00181db0 JMP 0x00163c62 LAB_00163c62: MOV RDI,qword ptr [RSP + 0x30] MOV byte ptr [RSP + 0x257],0x0 CALL 0x00113620 LEA RAX,[RSP + 0x268] MOV qword ptr [RSP + 0x248],RAX MOV RDI,qword ptr [RSP + 0x248] CALL 0x00119110 MOV qword ptr [RSP + 0x240],RAX MOV RDI,qword ptr [RSP + 0x248] CALL 0x00119140 MOV qword ptr [RSP + 0x238],RAX LAB_00163cae: LEA RDI,[RSP + 0x240] LEA RSI,[RSP + 0x238] CALL 0x00181d70 TEST AL,0x1 JNZ 0x00163ccc JMP 0x00163e56 LAB_00163ccc: LEA RDI,[RSP + 0x240] CALL 0x001191b0 MOV RSI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x230],RAX ADD RSI,0x78 LAB_00163cea: LEA RDI,[RSP + 0x200] CALL 0x001769e0 JMP 0x00163cf9 LAB_00163cf9: MOV RSI,qword ptr [RSP + 0x230] LEA RDI,[RSP + 0x1d0] CALL 0x001769e0 JMP 0x00163d10 LAB_00163d10: LEA RDI,[RSP + 0x1a0] CALL 0x00176920 JMP 0x00163d1f LAB_00163d1f: LEA RDI,[RSP + 0x170] CALL 0x00176920 JMP 0x00163d2e LAB_00163d2e: LEA RDI,[RSP + 0x140] CALL 0x00176920 JMP 0x00163d3d LAB_00163d3d: LEA RDI,[RSP + 0x110] CALL 0x00176920 JMP 0x00163d4c LAB_00163d4c: LEA RDI,[RSP + 0xe0] CALL 0x00176920 JMP 0x00163d5b LAB_00163d5b: LEA RDI,[RSP + 0xb0] CALL 0x00176920 JMP 0x00163d6a LAB_00163d6a: LEA RDI,[RSP + 0x80] CALL 0x00176920 JMP 0x00163d79 LAB_00163d79: LEA RDI,[RSP + 0x50] CALL 0x00176920 JMP 0x00163d85 LAB_00163d85: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,RSP LEA RCX,[RSP + 0x50] MOV qword ptr [RAX + 0x28],RCX LEA RCX,[RSP + 0x80] MOV qword ptr [RAX + 0x20],RCX LEA RCX,[RSP + 0xb0] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[RSP + 0xe0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RSP + 0x110] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[RSP + 0x140] MOV qword ptr [RAX],RCX LEA RSI,[0x2efeeb] LEA RDX,[RSP + 0x200] LEA RCX,[RSP + 0x1d0] LEA R8,[RSP + 0x1a0] LEA R9,[RSP + 0x170] CALL 0x00244ce0 LAB_00163dfd: JMP 0x00163dff LAB_00163dff: JMP 0x00163e01 LAB_00163e01: LEA RDI,[RSP + 0x240] CALL 0x00119370 JMP 0x00163cae LAB_00163e56: MOV byte ptr [RSP + 0x257],0x1 TEST byte ptr [RSP + 0x257],0x1 JNZ 0x00163e72 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00113290 LAB_00163e72: LEA RDI,[RSP + 0x268] CALL 0x00114940 LEA RDI,[RSP + 0x290] CALL 0x00113290 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x2c8 RET
/* WARNING: Removing unreachable block (ram,0x00163e68) */ /* google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::FormatComment(std::__cxx11::string const&) */ string * google::protobuf::(anonymous_namespace)::SourceLocationCommentPrinter::FormatComment (string *param_1) { bool bVar1; string *in_RDX; long in_RSI; SubstituteArg local_278 [48]; SubstituteArg local_248 [48]; SubstituteArg local_218 [48]; SubstituteArg local_1e8 [48]; SubstituteArg local_1b8 [48]; SubstituteArg local_188 [48]; SubstituteArg local_158 [48]; SubstituteArg local_128 [48]; SubstituteArg local_f8 [48]; SubstituteArg local_c8 [48]; string *local_98; int8 local_90; int8 local_88; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_80; int1 local_71; int8 local_70; int8 local_68; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_60 [40]; string local_38 [48]; string *local_8; local_8 = param_1; std::__cxx11::string::string(local_38,in_RDX); /* try { // try from 00163c18 to 00163c5f has its CatchHandler @ 00163e13 */ StripWhitespace(local_38); stringpiece_internal::StringPiece::StringPiece<std::allocator<char>> ((StringPiece *)&local_70,local_38); Split_abi_cxx11_(local_60,local_70,local_68,"\n",1); local_71 = 0; std::__cxx11::string::string(param_1); local_80 = local_60; local_88 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_80) ; local_90 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_80); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_88,(__normal_iterator *)&local_90), bVar1) { local_98 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_88); /* try { // try from 00163cea to 00163dfc has its CatchHandler @ 00163e29 */ strings::internal::SubstituteArg::SubstituteArg(local_c8,(string *)(in_RSI + 0x78)); strings::internal::SubstituteArg::SubstituteArg(local_f8,local_98); strings::internal::SubstituteArg::SubstituteArg(local_128); strings::internal::SubstituteArg::SubstituteArg(local_158); strings::internal::SubstituteArg::SubstituteArg(local_188); strings::internal::SubstituteArg::SubstituteArg(local_1b8); strings::internal::SubstituteArg::SubstituteArg(local_1e8); strings::internal::SubstituteArg::SubstituteArg(local_218); strings::internal::SubstituteArg::SubstituteArg(local_248); strings::internal::SubstituteArg::SubstituteArg(local_278); strings::SubstituteAndAppend (param_1,"$0// $1\n",local_c8,local_f8,local_128,local_158,local_188,local_1b8, local_1e8,local_218,local_248,local_278); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_88); } local_71 = 1; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_60); std::__cxx11::string::~string(local_38); return param_1; }
39,632
cs_enter
eloqsql/strings/ctype.c
static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; switch (state) { case 0: i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr); break; case _CS_CHARSET: my_charset_file_reset_charset(i); break; case _CS_COLLATION: my_charset_file_reset_collation(i); break; case _CS_RESET: return tailoring_append(st, " &", 0, NULL); default: break; } return MY_XML_OK; }
O0
c
cs_enter: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x70640 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x6ebd6 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) jmp 0x6ebdd xorl %eax, %eax movl %eax, -0x38(%rbp) jmp 0x6ebdd movl -0x38(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x3c(%rbp) testl %eax, %eax je 0x6ec0f jmp 0x6ebef movl -0x3c(%rbp), %eax subl $0x8, %eax je 0x6ec3c jmp 0x6ebf9 movl -0x3c(%rbp), %eax subl $0x9, %eax je 0x6ec47 jmp 0x6ec03 movl -0x3c(%rbp), %eax subl $0x12d, %eax # imm = 0x12D je 0x6ec52 jmp 0x6ec6e movq -0x28(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa0(%rax), %r8 movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rcx movl $0x1, %edi leaq 0x10607(%rip), %rsi # 0x7f23c movb $0x0, %al callq *%r8 jmp 0x6ec70 movq -0x28(%rbp), %rdi callq 0x705e0 jmp 0x6ec70 movq -0x28(%rbp), %rdi callq 0x70610 jmp 0x6ec70 movq -0x10(%rbp), %rdi leaq 0x105f8(%rip), %rsi # 0x7f255 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x706d0 movl %eax, -0x4(%rbp) jmp 0x6ec77 jmp 0x6ec70 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
cs_enter: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call cs_file_sec mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_6EBD6 mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_38], eax jmp short loc_6EBDD loc_6EBD6: xor eax, eax mov [rbp+var_38], eax jmp short $+2 loc_6EBDD: mov eax, [rbp+var_38] mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_3C], eax test eax, eax jz short loc_6EC0F jmp short $+2 loc_6EBEF: mov eax, [rbp+var_3C] sub eax, 8 jz short loc_6EC3C jmp short $+2 loc_6EBF9: mov eax, [rbp+var_3C] sub eax, 9 jz short loc_6EC47 jmp short $+2 loc_6EC03: mov eax, [rbp+var_3C] sub eax, 12Dh jz short loc_6EC52 jmp short loc_6EC6E loc_6EC0F: mov rax, [rbp+var_28] mov rax, [rax+7A8h] mov r8, [rax+0A0h] mov rdx, [rbp+var_20] mov rcx, [rbp+var_18] mov edi, 1 lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'" mov al, 0 call r8 jmp short loc_6EC70 loc_6EC3C: mov rdi, [rbp+var_28] call my_charset_file_reset_charset jmp short loc_6EC70 loc_6EC47: mov rdi, [rbp+var_28] call my_charset_file_reset_collation jmp short loc_6EC70 loc_6EC52: mov rdi, [rbp+var_10] lea rsi, asc_7F255; " &" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_4], eax jmp short loc_6EC77 loc_6EC6E: jmp short $+2 loc_6EC70: mov [rbp+var_4], 0 loc_6EC77: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cs_enter(long long a1, const char *a2, long long a3) { int v4; // [rsp+8h] [rbp-38h] int *v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] int v7; // [rsp+20h] [rbp-20h] v7 = a3; v6 = *(_QWORD *)(a1 + 320); v5 = (int *)cs_file_sec(a2, a3); if ( v5 ) v4 = *v5; else v4 = 0; switch ( v4 ) { case 0: (*(void (**)(long long, const char *, ...))(*(_QWORD *)(v6 + 1960) + 160LL))( 1LL, "Unknown LDML tag: '%.*s'", v7, a2); return 0; case 8: my_charset_file_reset_charset(v6); return 0; case 9: my_charset_file_reset_collation(v6); return 0; } if ( v4 != 301 ) return 0; return (unsigned int)tailoring_append(a1, " &", 0LL); }
cs_enter: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00170640 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0016ebd6 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX JMP 0x0016ebdd LAB_0016ebd6: XOR EAX,EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x0016ebdd LAB_0016ebdd: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x3c],EAX TEST EAX,EAX JZ 0x0016ec0f JMP 0x0016ebef LAB_0016ebef: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x8 JZ 0x0016ec3c JMP 0x0016ebf9 LAB_0016ebf9: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x9 JZ 0x0016ec47 JMP 0x0016ec03 LAB_0016ec03: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x12d JZ 0x0016ec52 JMP 0x0016ec6e LAB_0016ec0f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x7a8] MOV R8,qword ptr [RAX + 0xa0] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV EDI,0x1 LEA RSI,[0x17f23c] MOV AL,0x0 CALL R8 JMP 0x0016ec70 LAB_0016ec3c: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001705e0 JMP 0x0016ec70 LAB_0016ec47: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00170610 JMP 0x0016ec70 LAB_0016ec52: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x17f255] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001706d0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016ec77 LAB_0016ec6e: JMP 0x0016ec70 LAB_0016ec70: MOV dword ptr [RBP + -0x4],0x0 LAB_0016ec77: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cs_enter(long param_1,int8 param_2,int8 param_3) { long lVar1; int4 uVar2; int *piVar3; int local_40; lVar1 = *(long *)(param_1 + 0x140); piVar3 = (int *)cs_file_sec(param_2,param_3); if (piVar3 == (int *)0x0) { local_40 = 0; } else { local_40 = *piVar3; } if (local_40 == 0) { (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2); } else if (local_40 == 8) { my_charset_file_reset_charset(lVar1); } else if (local_40 == 9) { my_charset_file_reset_collation(lVar1); } else if (local_40 == 0x12d) { uVar2 = tailoring_append(param_1,&DAT_0017f255,0); return uVar2; } return 0; }
39,633
maria_lock_database
eloqsql/storage/maria/ma_locking.c
int maria_lock_database(MARIA_HA *info, int lock_type) { int error; uint count; MARIA_SHARE *share= info->s; DBUG_ENTER("maria_lock_database"); DBUG_PRINT("enter",("lock_type: %d old lock %d r_locks: %u w_locks: %u " "global_changed: %d open_count: %u name: '%s'", lock_type, info->lock_type, share->r_locks, share->w_locks, share->global_changed, share->state.open_count, share->index_file_name.str)); if (share->options & HA_OPTION_READ_ONLY_DATA || info->lock_type == lock_type) DBUG_RETURN(0); if (lock_type == F_EXTRA_LCK) /* Used by TMP tables */ { ++share->w_locks; ++share->tot_locks; info->lock_type= lock_type; DBUG_RETURN(0); } error=0; if (!info->intern_lock_locked) mysql_mutex_lock(&share->intern_lock); if (share->kfile.file >= 0) /* May only be false on windows */ { switch (lock_type) { case F_UNLCK: maria_ftparser_call_deinitializer(info); if (info->lock_type == F_RDLCK) { count= --share->r_locks; if (share->lock_restore_status) (*share->lock_restore_status)(info); } else { count= --share->w_locks; if (share->lock.update_status) _ma_update_status_with_lock(info); } --share->tot_locks; if (info->lock_type == F_WRLCK && !share->w_locks) { /* pages of transactional tables get flushed at Checkpoint */ if (!share->base.born_transactional && !share->temporary && _ma_flush_table_files(info, share->delay_key_write ? MARIA_FLUSH_DATA : MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX, FLUSH_KEEP, FLUSH_KEEP)) error= my_errno; } if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { if (end_io_cache(&info->rec_cache)) { error= my_errno; _ma_set_fatal_error(info, error); } } if (!count) { DBUG_PRINT("info",("changed: %u w_locks: %u", (uint) share->changed, share->w_locks)); if (share->changed && !share->w_locks) { #ifdef HAVE_MMAP if ((share->mmaped_length != share->state.state.data_file_length) && (share->nonmmaped_inserts > MAX_NONMAPPED_INSERTS)) { if (share->lock_key_trees) mysql_rwlock_wrlock(&share->mmap_lock); _ma_remap_file(info, share->state.state.data_file_length); share->nonmmaped_inserts= 0; if (share->lock_key_trees) mysql_rwlock_unlock(&share->mmap_lock); } #endif #ifdef MARIA_EXTERNAL_LOCKING share->state.process= share->last_process=share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; #endif /* transactional tables rather flush their state at Checkpoint */ if (!share->base.born_transactional) { if (_ma_state_info_write_sub(share->kfile.file, &share->state, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)) error= my_errno; else { /* A value of 0 means below means "state flushed" */ share->changed= 0; } } if (maria_flush) { if (_ma_sync_table_files(info)) error= my_errno; } else share->not_flushed=1; if (error) _ma_set_fatal_error(info, error); } } info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); info->lock_type= F_UNLCK; break; case F_RDLCK: if (info->lock_type == F_WRLCK) { /* Change RW to READONLY mysqld does not turn write locks to read locks, so we're never here in mysqld. */ share->w_locks--; share->r_locks++; info->lock_type=lock_type; break; } #ifdef MARIA_EXTERNAL_LOCKING if (!share->r_locks && !share->w_locks) { /* note that a transactional table should not do this */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { error=my_errno; break; } } #endif _ma_test_if_changed(info); share->r_locks++; share->tot_locks++; info->lock_type=lock_type; break; case F_WRLCK: if (info->lock_type == F_RDLCK) { /* Change READONLY to RW */ if (share->r_locks == 1) { share->r_locks--; share->w_locks++; info->lock_type=lock_type; break; } } #ifdef MARIA_EXTERNAL_LOCKING if (!(share->options & HA_OPTION_READ_ONLY_DATA)) { if (!share->w_locks) { if (!share->r_locks) { /* Note that transactional tables should not do this. If we enabled this code, we should make sure to skip it if born_transactional is true. We should not test now_transactional to decide if we can call _ma_state_info_read_dsk(), because it can temporarily be 0 (TRUNCATE on a partitioned table) and thus it would make a state modification below without mutex, confusing a concurrent checkpoint running. Even if this code was enabled only for non-transactional tables: in scenario LOCK TABLE t1 WRITE; INSERT INTO t1; DELETE FROM t1; state on disk read by DELETE is obsolete as it was not flushed at the end of INSERT. MyISAM same. It however causes no issue as maria_delete_all_rows() calls _ma_reset_status() thus is not influenced by the obsolete read values. */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { error=my_errno; break; } } } } #endif /* defined(MARIA_EXTERNAL_LOCKING) */ _ma_test_if_changed(info); info->lock_type=lock_type; info->invalidator=share->invalidator; share->w_locks++; share->tot_locks++; break; default: DBUG_ASSERT(0); break; /* Impossible */ } } #ifdef _WIN32 else { /* Check for bad file descriptors if this table is part of a merge union. Failing to capture this may cause a crash on windows if the table is renamed and later on referenced by the merge table. */ if( info->owned_by_merge && (info->s)->kfile.file < 0 ) { error = HA_ERR_NO_SUCH_TABLE; } } #endif if (!info->intern_lock_locked) mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(error); }
O3
c
maria_lock_database: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq (%rdi), %rbx xorl %r15d, %r15d testb $0x1, 0x722(%rbx) jne 0x4264a movl %esi, %r12d movq %rdi, %r14 cmpl %esi, 0x664(%rdi) je 0x4264a cmpl $-0x1, %r12d je 0x42499 cmpb $0x0, 0x680(%r14) jne 0x4242e leaq 0x8f0(%rbx), %rdi cmpq $0x0, 0x930(%rbx) jne 0x4274b callq 0x29200 xorl %r15d, %r15d cmpl $0x0, 0x760(%rbx) js 0x42621 testl %r12d, %r12d je 0x424e8 cmpl $0x1, %r12d je 0x424b5 cmpl $0x2, %r12d jne 0x42621 movq %r14, %rdi callq 0x5f969 cmpl $0x0, 0x664(%r14) je 0x4255e movl 0x7b0(%rbx), %r12d decl %r12d movl %r12d, 0x7b0(%rbx) cmpq $0x0, 0x8b0(%rbx) je 0x42580 movq %r14, %rdi callq 0x43112 jmp 0x42580 incl 0x7b0(%rbx) incl 0x7b8(%rbx) movl $0xffffffff, 0x664(%r14) # imm = 0xFFFFFFFF jmp 0x4264a cmpl $0x0, 0x664(%r14) jne 0x4250c cmpl $0x1, 0x7b4(%rbx) jne 0x4250c movl $0x0, 0x7b4(%rbx) incl 0x7b0(%rbx) movl $0x1, 0x664(%r14) jmp 0x42621 cmpl $0x1, 0x664(%r14) jne 0x42536 movq 0x7b0(%rbx), %xmm0 paddd 0x9e4be(%rip), %xmm0 # 0xe09c0 movq %xmm0, 0x7b0(%rbx) jmp 0x4254e movl $0x1, 0x664(%r14) movq 0x6f0(%rbx), %rax movq %rax, 0x3e0(%r14) incl 0x7b0(%rbx) incl 0x7b8(%rbx) jmp 0x42621 movq 0x7b4(%rbx), %xmm0 pcmpeqd %xmm1, %xmm1 psubd %xmm1, %xmm0 movq %xmm0, 0x7b4(%rbx) movl $0x0, 0x664(%r14) jmp 0x42621 movl 0x7b4(%rbx), %r12d decl %r12d movl %r12d, 0x7b4(%rbx) movq 0x8e8(%rbx), %rax testq %rax, %rax je 0x42580 movq %r14, %rdi callq *%rax decl 0x7b8(%rbx) xorl %r15d, %r15d cmpl $0x1, 0x664(%r14) jne 0x425dc cmpl $0x0, 0x7b0(%rbx) jne 0x425dc cmpb $0x0, 0x44c(%rbx) jne 0x425dc cmpb $0x0, 0x7d9(%rbx) jne 0x425dc xorl %eax, %eax cmpb $0x0, 0x7e5(%rbx) sete %al leal 0x1(,%rax,2), %esi xorl %r15d, %r15d movq %r14, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x3f4cc testl %eax, %eax je 0x425dc callq 0xa1b26 movl (%rax), %r15d testb $0x12, 0x61c(%r14) je 0x42609 leaq 0x4b8(%r14), %rdi callq 0x96367 testl %eax, %eax je 0x42609 callq 0xa1b26 movl (%rax), %r15d movq %r14, %rdi movl %r15d, %esi callq 0x3fcb8 testl %r12d, %r12d je 0x42656 andb $-0x13, 0x61c(%r14) movl $0x2, 0x664(%r14) cmpb $0x0, 0x680(%r14) jne 0x4264a movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x42761 movq %rbx, %rdi callq 0x291c0 movl %r15d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpb $0x0, 0x7de(%rbx) je 0x4260e cmpl $0x0, 0x7b0(%rbx) jne 0x4260e movq 0x40(%rbx), %rsi cmpq %rsi, 0xa00(%rbx) je 0x426d4 cmpl $0x3e9, 0xa08(%rbx) # imm = 0x3E9 jb 0x426d4 cmpb $0x0, 0x7e3(%rbx) je 0x4269a leaq 0xb78(%rbx), %rdi callq 0x4278b movq 0x40(%rbx), %rsi movq %r14, %rdi callq 0x46b59 movl $0x0, 0xa08(%rbx) cmpb $0x0, 0x7e3(%rbx) je 0x426d4 leaq 0xb78(%rbx), %r12 movq 0xc08(%rbx), %rdi testq %rdi, %rdi jne 0x42776 movq %r12, %rdi callq 0xa44ea cmpb $0x0, 0x44c(%rbx) jne 0x42705 movl 0x760(%rbx), %edi movq %rbx, %rsi movl $0x1, %edx callq 0x6b2ba testl %eax, %eax je 0x426fe callq 0xa1b26 movl (%rax), %r15d jmp 0x42705 movb $0x0, 0x7de(%rbx) leaq 0x3b9eac(%rip), %rax # 0x3fc5b8 cmpb $0x0, (%rax) je 0x42727 movq %r14, %rdi callq 0x3f6e6 testl %eax, %eax je 0x4272e callq 0xa1b26 movl (%rax), %r15d jmp 0x4272e movb $0x1, 0x7e0(%rbx) testl %r15d, %r15d je 0x42743 movq %r14, %rdi movl %r15d, %esi callq 0x3fcb8 jmp 0x4260e xorl %r15d, %r15d jmp 0x4260e leaq 0x97b98(%rip), %rsi # 0xda2ea movl $0x33, %edx callq 0x2eb6f jmp 0x4242e leaq 0x3438a8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x42642 leaq 0x343893(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x426cc
maria_lock_database: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, [rdi] xor r15d, r15d test byte ptr [rbx+722h], 1 jnz loc_4264A mov r12d, esi mov r14, rdi cmp [rdi+664h], esi jz loc_4264A cmp r12d, 0FFFFFFFFh jz loc_42499 cmp byte ptr [r14+680h], 0 jnz short loc_4242E lea rdi, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz loc_4274B call _pthread_mutex_lock loc_4242E: xor r15d, r15d cmp dword ptr [rbx+760h], 0 js loc_42621 test r12d, r12d jz loc_424E8 cmp r12d, 1 jz short loc_424B5 cmp r12d, 2 jnz loc_42621 mov rdi, r14 call maria_ftparser_call_deinitializer cmp dword ptr [r14+664h], 0 jz loc_4255E mov r12d, [rbx+7B0h] dec r12d mov [rbx+7B0h], r12d cmp qword ptr [rbx+8B0h], 0 jz loc_42580 mov rdi, r14 call _ma_update_status_with_lock jmp loc_42580 loc_42499: inc dword ptr [rbx+7B0h] inc dword ptr [rbx+7B8h] mov dword ptr [r14+664h], 0FFFFFFFFh jmp loc_4264A loc_424B5: cmp dword ptr [r14+664h], 0 jnz short loc_4250C cmp dword ptr [rbx+7B4h], 1 jnz short loc_4250C mov dword ptr [rbx+7B4h], 0 inc dword ptr [rbx+7B0h] mov dword ptr [r14+664h], 1 jmp loc_42621 loc_424E8: cmp dword ptr [r14+664h], 1 jnz short loc_42536 movq xmm0, qword ptr [rbx+7B0h] paddd xmm0, cs:xmmword_E09C0 movq qword ptr [rbx+7B0h], xmm0 jmp short loc_4254E loc_4250C: mov dword ptr [r14+664h], 1 mov rax, [rbx+6F0h] mov [r14+3E0h], rax inc dword ptr [rbx+7B0h] inc dword ptr [rbx+7B8h] jmp loc_42621 loc_42536: movq xmm0, qword ptr [rbx+7B4h] pcmpeqd xmm1, xmm1 psubd xmm0, xmm1 movq qword ptr [rbx+7B4h], xmm0 loc_4254E: mov dword ptr [r14+664h], 0 jmp loc_42621 loc_4255E: mov r12d, [rbx+7B4h] dec r12d mov [rbx+7B4h], r12d mov rax, [rbx+8E8h] test rax, rax jz short loc_42580 mov rdi, r14 call rax loc_42580: dec dword ptr [rbx+7B8h] xor r15d, r15d cmp dword ptr [r14+664h], 1 jnz short loc_425DC cmp dword ptr [rbx+7B0h], 0 jnz short loc_425DC cmp byte ptr [rbx+44Ch], 0 jnz short loc_425DC cmp byte ptr [rbx+7D9h], 0 jnz short loc_425DC xor eax, eax cmp byte ptr [rbx+7E5h], 0 setz al lea esi, ds:1[rax*2] xor r15d, r15d mov rdi, r14 xor edx, edx xor ecx, ecx call _ma_flush_table_files test eax, eax jz short loc_425DC call _my_thread_var mov r15d, [rax] loc_425DC: test byte ptr [r14+61Ch], 12h jz short loc_42609 lea rdi, [r14+4B8h] call end_io_cache test eax, eax jz short loc_42609 call _my_thread_var mov r15d, [rax] mov rdi, r14 mov esi, r15d call _ma_set_fatal_error loc_42609: test r12d, r12d jz short loc_42656 loc_4260E: and byte ptr [r14+61Ch], 0EDh mov dword ptr [r14+664h], 2 loc_42621: cmp byte ptr [r14+680h], 0 jnz short loc_4264A mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz loc_42761 loc_42642: mov rdi, rbx call _pthread_mutex_unlock loc_4264A: mov eax, r15d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_42656: cmp byte ptr [rbx+7DEh], 0 jz short loc_4260E cmp dword ptr [rbx+7B0h], 0 jnz short loc_4260E mov rsi, [rbx+40h] cmp [rbx+0A00h], rsi jz short loc_426D4 cmp dword ptr [rbx+0A08h], 3E9h jb short loc_426D4 cmp byte ptr [rbx+7E3h], 0 jz short loc_4269A lea rdi, [rbx+0B78h] call inline_mysql_rwlock_wrlock_0 mov rsi, [rbx+40h] loc_4269A: mov rdi, r14 call _ma_remap_file mov dword ptr [rbx+0A08h], 0 cmp byte ptr [rbx+7E3h], 0 jz short loc_426D4 lea r12, [rbx+0B78h] mov rdi, [rbx+0C08h] test rdi, rdi jnz loc_42776 loc_426CC: mov rdi, r12 call my_rw_unlock loc_426D4: cmp byte ptr [rbx+44Ch], 0 jnz short loc_42705 mov edi, [rbx+760h] mov rsi, rbx mov edx, 1 call _ma_state_info_write_sub test eax, eax jz short loc_426FE call _my_thread_var mov r15d, [rax] jmp short loc_42705 loc_426FE: mov byte ptr [rbx+7DEh], 0 loc_42705: lea rax, maria_flush cmp byte ptr [rax], 0 jz short loc_42727 mov rdi, r14 call _ma_sync_table_files test eax, eax jz short loc_4272E call _my_thread_var mov r15d, [rax] jmp short loc_4272E loc_42727: mov byte ptr [rbx+7E0h], 1 loc_4272E: test r15d, r15d jz short loc_42743 mov rdi, r14 mov esi, r15d call _ma_set_fatal_error jmp loc_4260E loc_42743: xor r15d, r15d jmp loc_4260E loc_4274B: lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 33h ; '3' call psi_mutex_lock jmp loc_4242E loc_42761: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_42642 loc_42776: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_426CC
long long maria_lock_database(long long a1, int a2) { long long v2; // rbx unsigned int v3; // r15d long long v5; // rdi long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d int v10; // r12d void ( *v11)(long long); // rax long long v12; // rdx long long v13; // rcx long long v14; // r8 int v15; // r9d long long v16; // rdi long long v17; // rbx long long v19; // rsi long long v20; // rdi v2 = *(_QWORD *)a1; v3 = 0; if ( (*(_BYTE *)(*(_QWORD *)a1 + 1826LL) & 1) == 0 && *(_DWORD *)(a1 + 1636) != a2 ) { if ( a2 == -1 ) { ++*(_DWORD *)(v2 + 1968); ++*(_DWORD *)(v2 + 1976); *(_DWORD *)(a1 + 1636) = -1; } else { if ( !*(_BYTE *)(a1 + 1664) ) { v5 = v2 + 2288; if ( *(_QWORD *)(v2 + 2352) ) psi_mutex_lock(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x33u); else pthread_mutex_lock(v5); } v3 = 0; if ( *(int *)(v2 + 1888) >= 0 ) { if ( a2 ) { if ( a2 == 1 ) { if ( *(_DWORD *)(a1 + 1636) || *(_DWORD *)(v2 + 1972) != 1 ) { *(_DWORD *)(a1 + 1636) = 1; *(_QWORD *)(a1 + 992) = *(_QWORD *)(v2 + 1776); ++*(_DWORD *)(v2 + 1968); ++*(_DWORD *)(v2 + 1976); } else { *(_DWORD *)(v2 + 1972) = 0; ++*(_DWORD *)(v2 + 1968); *(_DWORD *)(a1 + 1636) = 1; } } else if ( a2 == 2 ) { maria_ftparser_call_deinitializer(a1); if ( *(_DWORD *)(a1 + 1636) ) { v10 = *(_DWORD *)(v2 + 1968) - 1; *(_DWORD *)(v2 + 1968) = v10; if ( *(_QWORD *)(v2 + 2224) ) ma_update_status_with_lock(a1); } else { v10 = *(_DWORD *)(v2 + 1972) - 1; *(_DWORD *)(v2 + 1972) = v10; v11 = *(void ( **)(long long))(v2 + 2280); if ( v11 ) v11(a1); } --*(_DWORD *)(v2 + 1976); v3 = 0; if ( *(_DWORD *)(a1 + 1636) == 1 && !*(_DWORD *)(v2 + 1968) && !*(_BYTE *)(v2 + 1100) && !*(_BYTE *)(v2 + 2009) ) { v3 = 0; if ( (unsigned int)ma_flush_table_files((long long *)a1, 2 * (*(_BYTE *)(v2 + 2021) == 0) + 1, 0, 0) ) v3 = *(_DWORD *)my_thread_var(a1); } if ( (*(_BYTE *)(a1 + 1564) & 0x12) != 0 && (unsigned int)end_io_cache(a1 + 1208) ) { v3 = *(_DWORD *)my_thread_var(a1 + 1208); ma_set_fatal_error((_DWORD *)a1, v3, v12, v13, v14, v15); } if ( !v10 && *(_BYTE *)(v2 + 2014) && !*(_DWORD *)(v2 + 1968) ) { v19 = *(_QWORD *)(v2 + 64); if ( *(_QWORD *)(v2 + 2560) != v19 && *(_DWORD *)(v2 + 2568) >= 0x3E9u ) { if ( *(_BYTE *)(v2 + 2019) ) { inline_mysql_rwlock_wrlock_0(v2 + 2936); v19 = *(_QWORD *)(v2 + 64); } ma_remap_file(a1, v19); *(_DWORD *)(v2 + 2568) = 0; if ( *(_BYTE *)(v2 + 2019) ) { if ( *(_QWORD *)(v2 + 3080) ) PSI_server[45](); my_rw_unlock(v2 + 2936); } } if ( !*(_BYTE *)(v2 + 1100) ) { v20 = *(unsigned int *)(v2 + 1888); if ( (unsigned int)ma_state_info_write_sub(v20, v2, 1LL) ) v3 = *(_DWORD *)my_thread_var(v20); else *(_BYTE *)(v2 + 2014) = 0; } if ( maria_flush ) { if ( ma_sync_table_files((_DWORD *)a1) ) v3 = *(_DWORD *)my_thread_var(a1); } else { *(_BYTE *)(v2 + 2016) = 1; } if ( v3 ) ma_set_fatal_error((_DWORD *)a1, v3, v6, v7, v8, v9); else v3 = 0; } *(_BYTE *)(a1 + 1564) &= 0xEDu; *(_DWORD *)(a1 + 1636) = 2; } } else { if ( *(_DWORD *)(a1 + 1636) == 1 ) *(_QWORD *)(v2 + 1968) = _mm_add_epi32( _mm_loadl_epi64((const __m128i *)(v2 + 1968)), (__m128i)xmmword_E09C0).m128i_u64[0]; else *(_QWORD *)(v2 + 1972) = _mm_sub_epi32(_mm_loadl_epi64((const __m128i *)(v2 + 1972)), (__m128i)-1LL).m128i_u64[0]; *(_DWORD *)(a1 + 1636) = 0; } } if ( !*(_BYTE *)(a1 + 1664) ) { v16 = *(_QWORD *)(v2 + 2352); v17 = v2 + 2288; if ( v16 ) PSI_server[44](); pthread_mutex_unlock(v17); } } } return v3; }
maria_lock_database: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,qword ptr [RDI] XOR R15D,R15D TEST byte ptr [RBX + 0x722],0x1 JNZ 0x0014264a MOV R12D,ESI MOV R14,RDI CMP dword ptr [RDI + 0x664],ESI JZ 0x0014264a CMP R12D,-0x1 JZ 0x00142499 CMP byte ptr [R14 + 0x680],0x0 JNZ 0x0014242e LEA RDI,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x0014274b CALL 0x00129200 LAB_0014242e: XOR R15D,R15D CMP dword ptr [RBX + 0x760],0x0 JS 0x00142621 TEST R12D,R12D JZ 0x001424e8 CMP R12D,0x1 JZ 0x001424b5 CMP R12D,0x2 JNZ 0x00142621 MOV RDI,R14 CALL 0x0015f969 CMP dword ptr [R14 + 0x664],0x0 JZ 0x0014255e MOV R12D,dword ptr [RBX + 0x7b0] DEC R12D MOV dword ptr [RBX + 0x7b0],R12D CMP qword ptr [RBX + 0x8b0],0x0 JZ 0x00142580 MOV RDI,R14 CALL 0x00143112 JMP 0x00142580 LAB_00142499: INC dword ptr [RBX + 0x7b0] INC dword ptr [RBX + 0x7b8] MOV dword ptr [R14 + 0x664],0xffffffff JMP 0x0014264a LAB_001424b5: CMP dword ptr [R14 + 0x664],0x0 JNZ 0x0014250c CMP dword ptr [RBX + 0x7b4],0x1 JNZ 0x0014250c MOV dword ptr [RBX + 0x7b4],0x0 INC dword ptr [RBX + 0x7b0] MOV dword ptr [R14 + 0x664],0x1 JMP 0x00142621 LAB_001424e8: CMP dword ptr [R14 + 0x664],0x1 JNZ 0x00142536 MOVQ XMM0,qword ptr [RBX + 0x7b0] PADDD XMM0,xmmword ptr [0x001e09c0] MOVQ qword ptr [RBX + 0x7b0],XMM0 JMP 0x0014254e LAB_0014250c: MOV dword ptr [R14 + 0x664],0x1 MOV RAX,qword ptr [RBX + 0x6f0] MOV qword ptr [R14 + 0x3e0],RAX INC dword ptr [RBX + 0x7b0] INC dword ptr [RBX + 0x7b8] JMP 0x00142621 LAB_00142536: MOVQ XMM0,qword ptr [RBX + 0x7b4] PCMPEQD XMM1,XMM1 PSUBD XMM0,XMM1 MOVQ qword ptr [RBX + 0x7b4],XMM0 LAB_0014254e: MOV dword ptr [R14 + 0x664],0x0 JMP 0x00142621 LAB_0014255e: MOV R12D,dword ptr [RBX + 0x7b4] DEC R12D MOV dword ptr [RBX + 0x7b4],R12D MOV RAX,qword ptr [RBX + 0x8e8] TEST RAX,RAX JZ 0x00142580 MOV RDI,R14 CALL RAX LAB_00142580: DEC dword ptr [RBX + 0x7b8] XOR R15D,R15D CMP dword ptr [R14 + 0x664],0x1 JNZ 0x001425dc CMP dword ptr [RBX + 0x7b0],0x0 JNZ 0x001425dc CMP byte ptr [RBX + 0x44c],0x0 JNZ 0x001425dc CMP byte ptr [RBX + 0x7d9],0x0 JNZ 0x001425dc XOR EAX,EAX CMP byte ptr [RBX + 0x7e5],0x0 SETZ AL LEA ESI,[0x1 + RAX*0x2] XOR R15D,R15D MOV RDI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x0013f4cc TEST EAX,EAX JZ 0x001425dc CALL 0x001a1b26 MOV R15D,dword ptr [RAX] LAB_001425dc: TEST byte ptr [R14 + 0x61c],0x12 JZ 0x00142609 LEA RDI,[R14 + 0x4b8] CALL 0x00196367 TEST EAX,EAX JZ 0x00142609 CALL 0x001a1b26 MOV R15D,dword ptr [RAX] MOV RDI,R14 MOV ESI,R15D CALL 0x0013fcb8 LAB_00142609: TEST R12D,R12D JZ 0x00142656 LAB_0014260e: AND byte ptr [R14 + 0x61c],0xed MOV dword ptr [R14 + 0x664],0x2 LAB_00142621: CMP byte ptr [R14 + 0x680],0x0 JNZ 0x0014264a MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x00142761 LAB_00142642: MOV RDI,RBX CALL 0x001291c0 LAB_0014264a: MOV EAX,R15D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00142656: CMP byte ptr [RBX + 0x7de],0x0 JZ 0x0014260e CMP dword ptr [RBX + 0x7b0],0x0 JNZ 0x0014260e MOV RSI,qword ptr [RBX + 0x40] CMP qword ptr [RBX + 0xa00],RSI JZ 0x001426d4 CMP dword ptr [RBX + 0xa08],0x3e9 JC 0x001426d4 CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x0014269a LEA RDI,[RBX + 0xb78] CALL 0x0014278b MOV RSI,qword ptr [RBX + 0x40] LAB_0014269a: MOV RDI,R14 CALL 0x00146b59 MOV dword ptr [RBX + 0xa08],0x0 CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x001426d4 LEA R12,[RBX + 0xb78] MOV RDI,qword ptr [RBX + 0xc08] TEST RDI,RDI JNZ 0x00142776 LAB_001426cc: MOV RDI,R12 CALL 0x001a44ea LAB_001426d4: CMP byte ptr [RBX + 0x44c],0x0 JNZ 0x00142705 MOV EDI,dword ptr [RBX + 0x760] MOV RSI,RBX MOV EDX,0x1 CALL 0x0016b2ba TEST EAX,EAX JZ 0x001426fe CALL 0x001a1b26 MOV R15D,dword ptr [RAX] JMP 0x00142705 LAB_001426fe: MOV byte ptr [RBX + 0x7de],0x0 LAB_00142705: LEA RAX,[0x4fc5b8] CMP byte ptr [RAX],0x0 JZ 0x00142727 MOV RDI,R14 CALL 0x0013f6e6 TEST EAX,EAX JZ 0x0014272e CALL 0x001a1b26 MOV R15D,dword ptr [RAX] JMP 0x0014272e LAB_00142727: MOV byte ptr [RBX + 0x7e0],0x1 LAB_0014272e: TEST R15D,R15D JZ 0x00142743 MOV RDI,R14 MOV ESI,R15D CALL 0x0013fcb8 JMP 0x0014260e LAB_00142743: XOR R15D,R15D JMP 0x0014260e LAB_0014274b: LEA RSI,[0x1da2ea] MOV EDX,0x33 CALL 0x0012eb6f JMP 0x0014242e LAB_00142761: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00142642 LAB_00142776: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001426cc
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int maria_lock_database(long *param_1,int param_2) { long lVar1; int iVar2; int *piVar3; long lVar4; int iVar5; int iVar6; lVar1 = *param_1; iVar6 = 0; if (((*(byte *)(lVar1 + 0x722) & 1) == 0) && (iVar6 = 0, *(int *)((long)param_1 + 0x664) != param_2)) { if (param_2 == -1) { *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1; *(int4 *)((long)param_1 + 0x664) = 0xffffffff; } else { if ((char)param_1[0xd0] == '\0') { if (*(long *)(lVar1 + 0x930) == 0) { pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0)); } else { psi_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",0x33) ; } } iVar5 = 0; iVar6 = 0; if (-1 < *(int *)(lVar1 + 0x760)) { iVar6 = iVar5; if (param_2 == 0) { if (*(int *)((long)param_1 + 0x664) == 1) { *(ulong *)(lVar1 + 0x7b0) = CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b0) >> 0x20) + _UNK_001e09c4, (int)*(int8 *)(lVar1 + 0x7b0) + _DAT_001e09c0); } else { *(ulong *)(lVar1 + 0x7b4) = CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b4) >> 0x20) + 1, (int)*(int8 *)(lVar1 + 0x7b4) + 1); } *(int4 *)((long)param_1 + 0x664) = 0; } else if (param_2 == 1) { if ((*(int *)((long)param_1 + 0x664) == 0) && (*(int *)(lVar1 + 0x7b4) == 1)) { *(int4 *)(lVar1 + 0x7b4) = 0; *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int4 *)((long)param_1 + 0x664) = 1; } else { *(int4 *)((long)param_1 + 0x664) = 1; param_1[0x7c] = *(long *)(lVar1 + 0x6f0); *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1; } } else if (param_2 == 2) { maria_ftparser_call_deinitializer(param_1); if (*(int *)((long)param_1 + 0x664) == 0) { iVar5 = *(int *)(lVar1 + 0x7b4) + -1; *(int *)(lVar1 + 0x7b4) = iVar5; if (*(code **)(lVar1 + 0x8e8) != (code *)0x0) { (**(code **)(lVar1 + 0x8e8))(param_1); } } else { iVar5 = *(int *)(lVar1 + 0x7b0) + -1; *(int *)(lVar1 + 0x7b0) = iVar5; if (*(long *)(lVar1 + 0x8b0) != 0) { _ma_update_status_with_lock(param_1); } } *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + -1; iVar2 = 0; iVar6 = 0; if ((((*(int *)((long)param_1 + 0x664) == 1) && (iVar6 = iVar2, *(int *)(lVar1 + 0x7b0) == 0)) && (*(char *)(lVar1 + 0x44c) == '\0')) && (*(char *)(lVar1 + 0x7d9) == '\0')) { iVar6 = 0; iVar2 = _ma_flush_table_files (param_1,(*(char *)(lVar1 + 0x7e5) == '\0') * '\x02' + '\x01',0,0); if (iVar2 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if ((*(byte *)((long)param_1 + 0x61c) & 0x12) != 0) { iVar2 = end_io_cache(param_1 + 0x97); if (iVar2 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; _ma_set_fatal_error(param_1,iVar6); } } if (((iVar5 == 0) && (*(char *)(lVar1 + 0x7de) != '\0')) && (*(int *)(lVar1 + 0x7b0) == 0) ) { lVar4 = *(long *)(lVar1 + 0x40); if ((*(long *)(lVar1 + 0xa00) != lVar4) && (1000 < *(uint *)(lVar1 + 0xa08))) { if (*(char *)(lVar1 + 0x7e3) != '\0') { inline_mysql_rwlock_wrlock(lVar1 + 0xb78); lVar4 = *(long *)(lVar1 + 0x40); } _ma_remap_file(param_1,lVar4); *(int4 *)(lVar1 + 0xa08) = 0; if (*(char *)(lVar1 + 0x7e3) != '\0') { if (*(long *)(lVar1 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar1 + 0xb78); } } if (*(char *)(lVar1 + 0x44c) == '\0') { iVar5 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1); if (iVar5 == 0) { *(int1 *)(lVar1 + 0x7de) = 0; } else { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if (maria_flush == '\0') { *(int1 *)(lVar1 + 0x7e0) = 1; } else { iVar5 = _ma_sync_table_files(param_1); if (iVar5 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if (iVar6 == 0) { iVar6 = 0; } else { _ma_set_fatal_error(param_1,iVar6); } } *(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) & 0xed; *(int4 *)((long)param_1 + 0x664) = 2; } } if ((char)param_1[0xd0] == '\0') { if (*(long *)(lVar1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x8f0)); } } } return iVar6; }
39,634
bitmap_exists_intersection
eloqsql/mysys/my_bitmap.c
my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array, uint bitmap_count, uint start_bit, uint end_bit) { uint i, j, start_idx, end_idx; my_bitmap_map cur_res; DBUG_ASSERT(bitmap_count); DBUG_ASSERT(end_bit >= start_bit); for (j= 0; j < bitmap_count; j++) DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits); start_idx= start_bit/8/sizeof(my_bitmap_map); end_idx= end_bit/8/sizeof(my_bitmap_map); for (i= start_idx; i < end_idx; i++) { cur_res= ~0; for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[i]; if (cur_res) return TRUE; } cur_res= ~last_word_mask(end_bit); for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[end_idx]; return cur_res != 0; }
O0
c
bitmap_exists_intersection: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) jmp 0xefd37 jmp 0xefd39 jmp 0xefd3b movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xefd5b jmp 0xefd4c jmp 0xefd4e jmp 0xefd50 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xefd42 movl -0x18(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x28(%rbp) movl -0x1c(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x2c(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x2c(%rbp), %eax jae 0xefdf3 movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x31(%rbp) je 0xefdac movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al testb $0x1, %al jne 0xefdb5 jmp 0xefdda movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xefd95 cmpl $0x0, -0x30(%rbp) je 0xefde6 movb $0x1, -0x1(%rbp) jmp 0xefe5c jmp 0xefde8 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0xefd7f movl -0x1c(%rbp), %edi callq 0xefe70 xorl $-0x1, %eax movl %eax, -0x30(%rbp) movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x32(%rbp) je 0xefe1f movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x32(%rbp) movb -0x32(%rbp), %al testb $0x1, %al jne 0xefe28 jmp 0xefe4d movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xefe08 cmpl $0x0, -0x30(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_exists_intersection: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx jmp short $+2 loc_EFD37: jmp short $+2 loc_EFD39: jmp short $+2 loc_EFD3B: mov [rbp+var_24], 0 loc_EFD42: mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_EFD5B jmp short $+2 loc_EFD4C: jmp short $+2 loc_EFD4E: jmp short $+2 loc_EFD50: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EFD42 loc_EFD5B: mov eax, [rbp+var_18] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_28], eax mov eax, [rbp+var_1C] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_2C], eax mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_EFD7F: mov eax, [rbp+var_20] cmp eax, [rbp+var_2C] jnb short loc_EFDF3 mov [rbp+var_30], 0FFFFFFFFh mov [rbp+var_24], 0 loc_EFD95: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_31], al jz short loc_EFDAC mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_31], al loc_EFDAC: mov al, [rbp+var_31] test al, 1 jnz short loc_EFDB5 jmp short loc_EFDDA loc_EFDB5: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_20] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EFD95 loc_EFDDA: cmp [rbp+var_30], 0 jz short loc_EFDE6 mov [rbp+var_1], 1 jmp short loc_EFE5C loc_EFDE6: jmp short $+2 loc_EFDE8: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_EFD7F loc_EFDF3: mov edi, [rbp+var_1C] call last_word_mask xor eax, 0FFFFFFFFh mov [rbp+var_30], eax mov [rbp+var_24], 0 loc_EFE08: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_32], al jz short loc_EFE1F mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_32], al loc_EFE1F: mov al, [rbp+var_32] test al, 1 jnz short loc_EFE28 jmp short loc_EFE4D loc_EFE28: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_2C] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EFE08 loc_EFE4D: cmp [rbp+var_30], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_EFE5C: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4) { bool v5; // [rsp+Eh] [rbp-32h] bool v6; // [rsp+Fh] [rbp-31h] int v7; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+10h] [rbp-30h] unsigned int v9; // [rsp+14h] [rbp-2Ch] unsigned int i; // [rsp+1Ch] [rbp-24h] unsigned int k; // [rsp+1Ch] [rbp-24h] unsigned int m; // [rsp+1Ch] [rbp-24h] unsigned int j; // [rsp+20h] [rbp-20h] for ( i = 0; i < a2; ++i ) ; v9 = a4 >> 5; for ( j = a3 >> 5; j < v9; ++j ) { v7 = -1; for ( k = 0; ; ++k ) { v6 = 0; if ( v7 ) v6 = k < a2; if ( !v6 ) break; v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * k) + 4LL * j); } if ( v7 ) return 1; } v8 = ~(unsigned int)last_word_mask(a4); for ( m = 0; ; ++m ) { v5 = 0; if ( v8 ) v5 = m < a2; if ( !v5 ) break; v8 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * m) + 4LL * v9); } return v8 != 0; }
bitmap_exists_intersection: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX JMP 0x001efd37 LAB_001efd37: JMP 0x001efd39 LAB_001efd39: JMP 0x001efd3b LAB_001efd3b: MOV dword ptr [RBP + -0x24],0x0 LAB_001efd42: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001efd5b JMP 0x001efd4c LAB_001efd4c: JMP 0x001efd4e LAB_001efd4e: JMP 0x001efd50 LAB_001efd50: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001efd42 LAB_001efd5b: MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001efd7f: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x2c] JNC 0x001efdf3 MOV dword ptr [RBP + -0x30],0xffffffff MOV dword ptr [RBP + -0x24],0x0 LAB_001efd95: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x31],AL JZ 0x001efdac MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x31],AL LAB_001efdac: MOV AL,byte ptr [RBP + -0x31] TEST AL,0x1 JNZ 0x001efdb5 JMP 0x001efdda LAB_001efdb5: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001efd95 LAB_001efdda: CMP dword ptr [RBP + -0x30],0x0 JZ 0x001efde6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001efe5c LAB_001efde6: JMP 0x001efde8 LAB_001efde8: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001efd7f LAB_001efdf3: MOV EDI,dword ptr [RBP + -0x1c] CALL 0x001efe70 XOR EAX,0xffffffff MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x24],0x0 LAB_001efe08: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x32],AL JZ 0x001efe1f MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x32],AL LAB_001efe1f: MOV AL,byte ptr [RBP + -0x32] TEST AL,0x1 JNZ 0x001efe28 JMP 0x001efe4d LAB_001efe28: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001efe08 LAB_001efe4d: CMP dword ptr [RBP + -0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001efe5c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int8 bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4) { uint3 uVar1; uint7 uVar2; ulong uVar3; uint local_38; uint local_2c; uint local_28; bool local_9; for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) { } local_28 = param_3 >> 5; do { if (param_4 >> 5 <= local_28) { local_38 = last_word_mask(param_4); local_2c = 0; for (local_38 = local_38 ^ 0xffffffff; local_38 != 0 && local_2c < param_2; local_38 = *(uint *)(**(long **)(param_1 + uVar3 * 8) + (ulong)(param_4 >> 5) * 4) & local_38) { uVar3 = (ulong)local_2c; local_2c = local_2c + 1; } local_9 = local_38 != 0; uVar2 = 0; LAB_001efe5c: return CONCAT71(uVar2,local_9); } local_38 = 0xffffffff; local_2c = 0; while( true ) { uVar1 = 0; if (local_38 != 0) { uVar1 = (uint3)(local_2c >> 8); } uVar2 = (uint7)uVar1; if (local_38 == 0 || param_2 <= local_2c) break; local_38 = *(uint *)(**(long **)(param_1 + (ulong)local_2c * 8) + (ulong)local_28 * 4) & local_38; local_2c = local_2c + 1; } if (local_38 != 0) { local_9 = true; goto LAB_001efe5c; } local_28 = local_28 + 1; } while( true ); }
39,635
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++()
llama.cpp/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0xbdc2b movzbl (%rax), %eax cmpl $0x2, %eax je 0xbdc1c cmpl $0x1, %eax jne 0xbdc23 addq $0x30, 0x8(%rdi) jmp 0xbdc27 addq $0x10, 0x10(%rdi) jmp 0xbdc27 incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x69ce6(%rip), %rdi # 0x127919 leaq 0x61f1e(%rip), %rdx # 0x11fb58 leaq 0x6ffcf(%rip), %rcx # 0x12dc10 movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x21ef0
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_BDC2B movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_BDC1C cmp eax, 1 jnz short loc_BDC23 add qword ptr [rdi+8], 30h ; '0' jmp short loc_BDC27 loc_BDC1C: add qword ptr [rdi+10h], 10h jmp short loc_BDC27 loc_BDC23: inc qword ptr [rdi+18h] loc_BDC27: mov rax, rdi retn loc_BDC2B: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++( unsigned __int8 **a1) { int v1; // eax long long v3; // rdx if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return std::operator+<char>("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 13248LL, v3); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001bdc2b MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001bdc1c CMP EAX,0x1 JNZ 0x001bdc23 ADD qword ptr [RDI + 0x8],0x30 JMP 0x001bdc27 LAB_001bdc1c: ADD qword ptr [RDI + 0x10],0x10 JMP 0x001bdc27 LAB_001bdc23: INC qword ptr [RDI + 0x18] LAB_001bdc27: MOV RAX,RDI RET LAB_001bdc2b: PUSH RAX LEA RDI,[0x227919] LEA RDX,[0x21fb58] LEA RCX,[0x22dc10] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x00121ef0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
39,636
psi_rwlock_tryrdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_TRYREADLOCK, file, line); int result= rw_tryrdlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O0
c
psi_rwlock_tryrdlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1ac55e(%rip), %rax # 0x1d57e8 movq (%rax), %rax movq 0x1a0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x2, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x29880 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x292e3 leaq 0x1ac518(%rip), %rax # 0x1d57e8 movq (%rax), %rax movq 0x1a8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_tryrdlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 2 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_tryrdlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_292E3 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_292E3: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_tryrdlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server + 52))( v6, *(_QWORD *)(a1 + 144), 2LL, a2, a3); v4 = my_rw_tryrdlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server + 53))(v5, v4); return v4; }
psi_rwlock_tryrdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2d57e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x2 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00129880 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001292e3 LEA RAX,[0x2d57e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_001292e3: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_tryrdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x90),2,param_2,param_3); uVar1 = my_rw_tryrdlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
39,637
ImPlot::GetColormapSize(int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
int GetColormapSize(ImPlotColormap cmap) { ImPlotContext& gp = *GImPlot; cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); return gp.ColormapData.GetKeyCount(cmap); }
O1
cpp
ImPlot::GetColormapSize(int): pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx movq 0x2731f0(%rip), %r14 # 0x336ca0 cmpl $-0x1, %edi jne 0xc3abc movl 0x300(%r14), %ebx testl %ebx, %ebx js 0xc3ac9 cmpl 0x3c8(%r14), %ebx jl 0xc3ad5 leaq 0x1d1bb7(%rip), %rdi # 0x295687 callq 0x2161f4 movq 0x340(%r14), %rax movslq %ebx, %rcx movl (%rax,%rcx,4), %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN6ImPlot15GetColormapSizeEi: push r14 push rbx push rax mov ebx, edi mov r14, cs:GImPlot cmp edi, 0FFFFFFFFh jnz short loc_C3ABC mov ebx, [r14+300h] loc_C3ABC: test ebx, ebx js short loc_C3AC9 cmp ebx, [r14+3C8h] jl short loc_C3AD5 loc_C3AC9: lea rdi, aInvalidColorma; "Invalid colormap index!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_C3AD5: mov rax, [r14+340h] movsxd rcx, ebx mov eax, [rax+rcx*4] add rsp, 8 pop rbx pop r14 retn
long long ImPlot::GetColormapSize(ImPlot *this, const char *a2) { int v2; // ebx ImGui *v3; // r14 v2 = (int)this; v3 = GImPlot; if ( (_DWORD)this == -1 ) v2 = *((_DWORD *)GImPlot + 192); if ( v2 < 0 || v2 >= *((_DWORD *)GImPlot + 242) ) ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a2); return *(unsigned int *)(*((_QWORD *)v3 + 104) + 4LL * v2); }
GetColormapSize: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI MOV R14,qword ptr [0x00436ca0] CMP EDI,-0x1 JNZ 0x001c3abc MOV EBX,dword ptr [R14 + 0x300] LAB_001c3abc: TEST EBX,EBX JS 0x001c3ac9 CMP EBX,dword ptr [R14 + 0x3c8] JL 0x001c3ad5 LAB_001c3ac9: LEA RDI,[0x395687] CALL 0x003161f4 LAB_001c3ad5: MOV RAX,qword ptr [R14 + 0x340] MOVSXD RCX,EBX MOV EAX,dword ptr [RAX + RCX*0x4] ADD RSP,0x8 POP RBX POP R14 RET
/* ImPlot::GetColormapSize(int) */ int4 ImPlot::GetColormapSize(int param_1) { long lVar1; lVar1 = GImPlot; if (param_1 == -1) { param_1 = *(int *)(GImPlot + 0x300); } if ((param_1 < 0) || (*(int *)(GImPlot + 0x3c8) <= param_1)) { ImGui::ErrorLog("Invalid colormap index!"); } return *(int4 *)(*(long *)(lVar1 + 0x340) + (long)param_1 * 4); }
39,638
LefDefParser::lefwAntennaOutputDiffArea(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwAntennaOutputDiffArea(double outputDiffArea) { lefw54Num = LEFW_ANTENNAOUTPUTDIFFAREA; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_ANTENNAOUTPUTDIFFAREA]) return LEFW_ALREADY_DEFINED; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "ANTENNAOUTPUTDIFFAREA %.11g ;\n", outputDiffArea); else fprintf(lefwFile, "ANTENNAOUTPUTDIFFAREA %.11g ;\n", outputDiffArea); lefwLines++; lefwSynArray[LEFW_ANTENNAOUTPUTDIFFAREA] = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwAntennaOutputDiffArea(double): pushq %rbx movl $0x63, 0xc784(%rip) # 0x24d4c leaq 0xc831(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0x18646 leaq 0xca76(%rip), %rcx # 0x25054 movl $0x2, %eax cmpl $0x0, (%rcx) je 0x1864b leaq 0xca61(%rip), %rcx # 0x25050 movl (%rcx), %ecx cmpl $0x1, %ecx setne %dl cmpl $0x4f, %ecx setl %cl testb %cl, %dl jne 0x1864b leaq 0xc808(%rip), %rbx # 0x24e10 movl $0x4, %eax cmpl $0x0, 0x18c(%rbx) jne 0x1864b movl $0x5, %eax movsd 0xaf5(%rip), %xmm1 # 0x19118 ucomisd 0xc715(%rip), %xmm1 # 0x24d40 ja 0x1864b cmpb $0x1, 0xcab8(%rip) # 0x250ec jne 0x1864d leaq 0x3d45(%rip), %rsi # 0x1c382 movb $0x1, %al callq 0x18c35 jmp 0x1865b movl $0x1, %eax popq %rbx retq leaq 0x3d2e(%rip), %rsi # 0x1c382 movb $0x1, %al callq 0x10f0 leaq 0xc9ea(%rip), %rax # 0x2504c incl (%rax) movl $0x1, 0x18c(%rbx) xorl %eax, %eax jmp 0x1864b
_ZN12LefDefParser25lefwAntennaOutputDiffAreaEd: push rbx mov cs:_ZN12LefDefParserL9lefw54NumE, 63h ; 'c'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_18646 lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov eax, 2 cmp dword ptr [rcx], 0 jz short loc_1864B lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rcx] cmp ecx, 1 setnz dl cmp ecx, 4Fh ; 'O' setl cl test dl, cl jnz short loc_1864B lea rbx, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov eax, 4 cmp dword ptr [rbx+18Ch], 0 jnz short loc_1864B mov eax, 5 movsd xmm1, cs:dbl_19118 ucomisd xmm1, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short loc_1864B cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_1864D lea rsi, aAntennaoutputd; "ANTENNAOUTPUTDIFFAREA %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1865B loc_18646: mov eax, 1 loc_1864B: pop rbx retn loc_1864D: lea rsi, aAntennaoutputd; "ANTENNAOUTPUTDIFFAREA %.11g ;\n" mov al, 1 call _fprintf loc_1865B: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx+18Ch], 1 xor eax, eax jmp short loc_1864B
long long LefDefParser::lefwAntennaOutputDiffArea( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { long long result; // rax unsigned int v8; // ecx LefDefParser::lefw54Num = 99; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit ) { v8 = LefDefParser::lefwState; if ( (int)LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1 ) { result = 4LL; if ( !LefDefParser::lefwSynArray[99] ) { result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LOBYTE(v8) = (int)LefDefParser::lefwState < 79; LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"ANTENNAOUTPUTDIFFAREA %.11g ;\n", LefDefParser::lefwState != 1, v8, a6, a7); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "ANTENNAOUTPUTDIFFAREA %.11g ;\n", a2); } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[99] = 1; return 0LL; } } } } return result; }
lefwAntennaOutputDiffArea: PUSH RBX MOV dword ptr [0x00124d4c],0x63 LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00118646 LEA RCX,[0x125054] MOV EAX,0x2 CMP dword ptr [RCX],0x0 JZ 0x0011864b LEA RCX,[0x125050] MOV ECX,dword ptr [RCX] CMP ECX,0x1 SETNZ DL CMP ECX,0x4f SETL CL TEST DL,CL JNZ 0x0011864b LEA RBX,[0x124e10] MOV EAX,0x4 CMP dword ptr [RBX + 0x18c],0x0 JNZ 0x0011864b MOV EAX,0x5 MOVSD XMM1,qword ptr [0x00119118] UCOMISD XMM1,qword ptr [0x00124d40] JA 0x0011864b CMP byte ptr [0x001250ec],0x1 JNZ 0x0011864d LEA RSI,[0x11c382] MOV AL,0x1 CALL 0x00118c35 JMP 0x0011865b LAB_00118646: MOV EAX,0x1 LAB_0011864b: POP RBX RET LAB_0011864d: LEA RSI,[0x11c382] MOV AL,0x1 CALL 0x001010f0 LAB_0011865b: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX + 0x18c],0x1 XOR EAX,EAX JMP 0x0011864b
/* LefDefParser::lefwAntennaOutputDiffArea(double) */ int8 LefDefParser::lefwAntennaOutputDiffArea(double param_1) { int8 uVar1; lefw54Num = 99; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (lefwDidInit != 0) { if ((lefwState == 1 || 0x4e < lefwState) && (uVar1 = 4, lefwSynArray._396_4_ == 0)) { uVar1 = 5; if (DAT_00119118 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"ANTENNAOUTPUTDIFFAREA %.11g ;\n"); } else { fprintf(lefwFile,"ANTENNAOUTPUTDIFFAREA %.11g ;\n"); } lefwLines = lefwLines + 1; lefwSynArray._396_4_ = 1; uVar1 = 0; } } } } return uVar1; }
39,639
my_strnncoll_latin1_de
eloqsql/strings/ctype-latin1.c
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) { const uchar *a_end= a + a_length; const uchar *b_end= b + b_length; uchar a_char, a_extend= 0, b_char, b_extend= 0; while ((a < a_end || a_extend) && (b < b_end || b_extend)) { if (a_extend) { a_char=a_extend; a_extend=0; } else { a_extend=combo2map[*a]; a_char=combo1map[*a++]; } if (b_extend) { b_char=b_extend; b_extend=0; } else { b_extend=combo2map[*b]; b_char=combo1map[*b++]; } if (a_char != b_char) return (int) a_char - (int) b_char; } /* A simple test of string lengths won't work -- we test to see which string ran out first */ return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : (b < b_end || b_extend) ? -1 : 0); }
O0
c
my_strnncoll_latin1_de: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movb $0x0, -0x4a(%rbp) movb $0x0, -0x4c(%rbp) movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jb 0x373a6 movzbl -0x4a(%rbp), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x4d(%rbp) je 0x373c8 movq -0x28(%rbp), %rcx movb $0x1, %al cmpq -0x48(%rbp), %rcx movb %al, -0x4e(%rbp) jb 0x373c2 movzbl -0x4c(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x4e(%rbp) movb -0x4e(%rbp), %al movb %al, -0x4d(%rbp) movb -0x4d(%rbp), %al testb $0x1, %al jne 0x373d4 jmp 0x37486 cmpb $0x0, -0x4a(%rbp) je 0x373e6 movb -0x4a(%rbp), %al movb %al, -0x49(%rbp) movb $0x0, -0x4a(%rbp) jmp 0x3741d movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x1032ea(%rip), %rax # 0x13a6e0 movb (%rax,%rcx), %al movb %al, -0x4a(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0x1031c9(%rip), %rax # 0x13a5e0 movb (%rax,%rcx), %al movb %al, -0x49(%rbp) cmpb $0x0, -0x4c(%rbp) je 0x3742f movb -0x4c(%rbp), %al movb %al, -0x4b(%rbp) movb $0x0, -0x4c(%rbp) jmp 0x37466 movq -0x28(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x1032a1(%rip), %rax # 0x13a6e0 movb (%rax,%rcx), %al movb %al, -0x4c(%rbp) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0x103180(%rip), %rax # 0x13a5e0 movb (%rax,%rcx), %al movb %al, -0x4b(%rbp) movzbl -0x49(%rbp), %eax movzbl -0x4b(%rbp), %ecx cmpl %ecx, %eax je 0x37481 movzbl -0x49(%rbp), %eax movzbl -0x4b(%rbp), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x374e4 jmp 0x3738e movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jb 0x37499 movzbl -0x4a(%rbp), %eax cmpl $0x0, %eax je 0x374af movsbl -0x31(%rbp), %edx movl $0x1, %eax xorl %ecx, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x54(%rbp) jmp 0x374de movq -0x28(%rbp), %rcx movb $0x1, %al cmpq -0x48(%rbp), %rcx movb %al, -0x55(%rbp) jb 0x374cb movzbl -0x4c(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x55(%rbp) movb -0x55(%rbp), %dl xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_strnncoll_latin1_de: push rbp mov rbp, rsp mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_48], rax mov [rbp+var_4A], 0 mov [rbp+var_4C], 0 loc_3738E: mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jb short loc_373A6 movzx ecx, [rbp+var_4A] xor eax, eax cmp ecx, 0 mov [rbp+var_4D], al jz short loc_373C8 loc_373A6: mov rcx, [rbp+var_28] mov al, 1 cmp rcx, [rbp+var_48] mov [rbp+var_4E], al jb short loc_373C2 movzx eax, [rbp+var_4C] cmp eax, 0 setnz al mov [rbp+var_4E], al loc_373C2: mov al, [rbp+var_4E] mov [rbp+var_4D], al loc_373C8: mov al, [rbp+var_4D] test al, 1 jnz short loc_373D4 jmp loc_37486 loc_373D4: cmp [rbp+var_4A], 0 jz short loc_373E6 mov al, [rbp+var_4A] mov [rbp+var_49], al mov [rbp+var_4A], 0 jmp short loc_3741D loc_373E6: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_4A], al mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_49], al loc_3741D: cmp [rbp+var_4C], 0 jz short loc_3742F mov al, [rbp+var_4C] mov [rbp+var_4B], al mov [rbp+var_4C], 0 jmp short loc_37466 loc_3742F: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_4C], al mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_4B], al loc_37466: movzx eax, [rbp+var_49] movzx ecx, [rbp+var_4B] cmp eax, ecx jz short loc_37481 movzx eax, [rbp+var_49] movzx ecx, [rbp+var_4B] sub eax, ecx mov [rbp+var_4], eax jmp short loc_374E4 loc_37481: jmp loc_3738E loc_37486: mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jb short loc_37499 movzx eax, [rbp+var_4A] cmp eax, 0 jz short loc_374AF loc_37499: movsx edx, [rbp+var_31] mov eax, 1 xor ecx, ecx cmp edx, 0 cmovnz eax, ecx mov [rbp+var_54], eax jmp short loc_374DE loc_374AF: mov rcx, [rbp+var_28] mov al, 1 cmp rcx, [rbp+var_48] mov [rbp+var_55], al jb short loc_374CB movzx eax, [rbp+var_4C] cmp eax, 0 setnz al mov [rbp+var_55], al loc_374CB: mov dl, [rbp+var_55] xor eax, eax mov ecx, 0FFFFFFFFh test dl, 1 cmovnz eax, ecx mov [rbp+var_54], eax loc_374DE: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_374E4: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_latin1_de( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, char a6) { unsigned __int8 *v6; // rax unsigned __int8 *v7; // rax unsigned int v8; // eax bool v10; // [rsp+1h] [rbp-55h] bool v12; // [rsp+8h] [rbp-4Eh] bool v13; // [rsp+9h] [rbp-4Dh] unsigned __int8 v14; // [rsp+Ah] [rbp-4Ch] unsigned __int8 v15; // [rsp+Bh] [rbp-4Bh] unsigned __int8 v16; // [rsp+Ch] [rbp-4Ah] unsigned __int8 v17; // [rsp+Dh] [rbp-49h] unsigned long long v18; // [rsp+Eh] [rbp-48h] unsigned long long v19; // [rsp+16h] [rbp-40h] unsigned __int8 *v20; // [rsp+2Eh] [rbp-28h] unsigned __int8 *v21; // [rsp+3Eh] [rbp-18h] v21 = a2; v20 = a4; v19 = (unsigned long long)&a2[a3]; v18 = (unsigned long long)&a4[a5]; v16 = 0; v14 = 0; while ( 1 ) { if ( (unsigned long long)v21 < v19 || (v13 = 0, v16) ) { v12 = 1; if ( (unsigned long long)v20 >= v18 ) v12 = v14 != 0; v13 = v12; } if ( !v13 ) break; if ( v16 ) { v17 = v16; v16 = 0; } else { v16 = combo2map[*v21]; v6 = v21++; v17 = combo1map[*v6]; } if ( v14 ) { v15 = v14; v14 = 0; } else { v14 = combo2map[*v20]; v7 = v20++; v15 = combo1map[*v7]; } if ( v17 != v15 ) return (unsigned int)(v17 - v15); } if ( (unsigned long long)v21 < v19 || v16 ) { return a6 == 0; } else { v10 = 1; if ( (unsigned long long)v20 >= v18 ) v10 = v14 != 0; v8 = 0; if ( v10 ) v8 = -1; return v8; } }
my_strnncoll_latin1_de: PUSH RBP MOV RBP,RSP MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV byte ptr [RBP + -0x4a],0x0 MOV byte ptr [RBP + -0x4c],0x0 LAB_0013738e: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JC 0x001373a6 MOVZX ECX,byte ptr [RBP + -0x4a] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x4d],AL JZ 0x001373c8 LAB_001373a6: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x4e],AL JC 0x001373c2 MOVZX EAX,byte ptr [RBP + -0x4c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x4e],AL LAB_001373c2: MOV AL,byte ptr [RBP + -0x4e] MOV byte ptr [RBP + -0x4d],AL LAB_001373c8: MOV AL,byte ptr [RBP + -0x4d] TEST AL,0x1 JNZ 0x001373d4 JMP 0x00137486 LAB_001373d4: CMP byte ptr [RBP + -0x4a],0x0 JZ 0x001373e6 MOV AL,byte ptr [RBP + -0x4a] MOV byte ptr [RBP + -0x49],AL MOV byte ptr [RBP + -0x4a],0x0 JMP 0x0013741d LAB_001373e6: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23a6e0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4a],AL MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23a5e0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x49],AL LAB_0013741d: CMP byte ptr [RBP + -0x4c],0x0 JZ 0x0013742f MOV AL,byte ptr [RBP + -0x4c] MOV byte ptr [RBP + -0x4b],AL MOV byte ptr [RBP + -0x4c],0x0 JMP 0x00137466 LAB_0013742f: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23a6e0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4c],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23a5e0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4b],AL LAB_00137466: MOVZX EAX,byte ptr [RBP + -0x49] MOVZX ECX,byte ptr [RBP + -0x4b] CMP EAX,ECX JZ 0x00137481 MOVZX EAX,byte ptr [RBP + -0x49] MOVZX ECX,byte ptr [RBP + -0x4b] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001374e4 LAB_00137481: JMP 0x0013738e LAB_00137486: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JC 0x00137499 MOVZX EAX,byte ptr [RBP + -0x4a] CMP EAX,0x0 JZ 0x001374af LAB_00137499: MOVSX EDX,byte ptr [RBP + -0x31] MOV EAX,0x1 XOR ECX,ECX CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX JMP 0x001374de LAB_001374af: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x55],AL JC 0x001374cb MOVZX EAX,byte ptr [RBP + -0x4c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x55],AL LAB_001374cb: MOV DL,byte ptr [RBP + -0x55] XOR EAX,EAX MOV ECX,0xffffffff TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX LAB_001374de: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_001374e4: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_strnncoll_latin1_de (int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5, char param_6) { uint local_5c; bool local_56; byte local_54; byte local_53; byte local_52; byte local_51; byte *local_30; byte *local_20; local_52 = 0; local_54 = 0; local_30 = param_4; local_20 = param_2; do { if ((local_20 < param_2 + param_3) || (local_56 = false, local_52 != 0)) { local_56 = local_30 < param_4 + param_5 || local_54 != 0; } if (!local_56) { if ((local_20 < param_2 + param_3) || (local_52 != 0)) { local_5c = (uint)(param_6 == '\0'); } else { local_5c = 0; if (local_30 < param_4 + param_5 || local_54 != 0) { local_5c = 0xffffffff; } } return local_5c; } if (local_52 == 0) { local_52 = combo2map[*local_20]; local_51 = combo1map[*local_20]; local_20 = local_20 + 1; } else { local_51 = local_52; local_52 = 0; } if (local_54 == 0) { local_54 = combo2map[*local_30]; local_53 = combo1map[*local_30]; local_30 = local_30 + 1; } else { local_53 = local_54; local_54 = 0; } } while (local_51 == local_53); return (uint)local_51 - (uint)local_53; }
39,640
ma_multi_malloc
eloqsql/libmariadb/libmariadb/ma_alloc.c
void *ma_multi_malloc(myf myFlags, ...) { va_list args; char **ptr,*start,*res; size_t tot_length,length; va_start(args,myFlags); tot_length=0; while ((ptr=va_arg(args, char **))) { length=va_arg(args, size_t); tot_length+=ALIGN_SIZE(length); } va_end(args); if (!(start=(char *)malloc(tot_length))) return 0; va_start(args,myFlags); res=start; while ((ptr=va_arg(args, char **))) { *ptr=res; length=va_arg(args,size_t); res+=ALIGN_SIZE(length); } va_end(args); return start; }
O3
c
ma_multi_malloc: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0xd0, %rsp leaq -0xe0(%rbp), %rbx movq %rsi, 0x8(%rbx) movq %rdx, 0x10(%rbx) movq %rcx, 0x18(%rbx) movq %r8, 0x20(%rbx) movq %r9, 0x28(%rbx) testb %al, %al je 0x1e97e movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq %rbx, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movabsq $0x3000000008, %r14 # imm = 0x3000000008 movq %r14, -0x30(%rbp) movl $0x8, %eax xorl %edi, %edi cmpl $0x28, %eax ja 0x1e9b4 movq %rcx, %rdx movl %eax, %ecx addq %rbx, %rcx addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0x1e9bc leaq 0x8(%rcx), %rdx movq %rdx, -0x28(%rbp) cmpq $0x0, (%rcx) je 0x1e9ef cmpl $0x28, %eax ja 0x1e9d7 movq %rdx, %rcx movl %eax, %edx addq %rbx, %rdx addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0x1e9df leaq 0x8(%rdx), %rcx movq %rcx, -0x28(%rbp) movq (%rdx), %rdx addq $0x7, %rdx andq $-0x8, %rdx addq %rdx, %rdi jmp 0x1e99f callq 0x13600 testq %rax, %rax je 0x1ea6f movq %rbx, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movq %r14, -0x30(%rbp) movl $0x8, %edx movq %rax, %rcx cmpl $0x28, %edx ja 0x1ea24 movl %edx, %esi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0x1ea30 movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdx movq %rdx, -0x28(%rbp) movq (%rsi), %rdx testq %rdx, %rdx je 0x1ea6f movq %rcx, (%rdx) movl -0x30(%rbp), %edx cmpq $0x28, %rdx ja 0x1ea53 movq %rdx, %rsi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0x1ea5f movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdi movq %rdi, -0x28(%rbp) movq (%rsi), %rsi addq $0x7, %rsi andq $-0x8, %rsi addq %rsi, %rcx jmp 0x1ea11 addq $0xd0, %rsp popq %rbx popq %r14 popq %rbp retq nop
ma_multi_malloc: push rbp mov rbp, rsp push r14 push rbx sub rsp, 0D0h lea rbx, [rbp+var_E0] mov [rbx+8], rsi mov [rbx+10h], rdx mov [rbx+18h], rcx mov [rbx+20h], r8 mov [rbx+28h], r9 test al, al jz short loc_1E97E movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_1E97E: mov [rbp+var_20], rbx lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov r14, 3000000008h mov [rbp+var_30], r14 mov eax, 8 xor edi, edi loc_1E99F: cmp eax, 28h ; '(' ja short loc_1E9B4 mov rdx, rcx mov ecx, eax add rcx, rbx add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_1E9BC loc_1E9B4: lea rdx, [rcx+8] mov [rbp+var_28], rdx loc_1E9BC: cmp qword ptr [rcx], 0 jz short loc_1E9EF cmp eax, 28h ; '(' ja short loc_1E9D7 mov rcx, rdx mov edx, eax add rdx, rbx add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_1E9DF loc_1E9D7: lea rcx, [rdx+8] mov [rbp+var_28], rcx loc_1E9DF: mov rdx, [rdx] add rdx, 7 and rdx, 0FFFFFFFFFFFFFFF8h add rdi, rdx jmp short loc_1E99F loc_1E9EF: call _malloc test rax, rax jz short loc_1EA6F mov [rbp+var_20], rbx lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov [rbp+var_30], r14 mov edx, 8 mov rcx, rax loc_1EA11: cmp edx, 28h ; '(' ja short loc_1EA24 mov esi, edx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_1EA30 loc_1EA24: mov rsi, [rbp+var_28] lea rdx, [rsi+8] mov [rbp+var_28], rdx loc_1EA30: mov rdx, [rsi] test rdx, rdx jz short loc_1EA6F mov [rdx], rcx mov edx, dword ptr [rbp+var_30] cmp rdx, 28h ; '(' ja short loc_1EA53 mov rsi, rdx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_1EA5F loc_1EA53: mov rsi, [rbp+var_28] lea rdi, [rsi+8] mov [rbp+var_28], rdi loc_1EA5F: mov rsi, [rsi] add rsi, 7 and rsi, 0FFFFFFFFFFFFFFF8h add rcx, rsi jmp short loc_1EA11 loc_1EA6F: add rsp, 0D0h pop rbx pop r14 pop rbp retn
long long ma_multi_malloc( _DWORD a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char *v15; // rcx unsigned int v16; // eax long long i; // rdi char *v18; // rdx long long result; // rax unsigned int v20; // edx long long j; // rcx char *v22; // rsi char *v23; // rsi _BYTE v24[8]; // [rsp+0h] [rbp-E0h] BYREF long long v25; // [rsp+8h] [rbp-D8h] long long v26; // [rsp+10h] [rbp-D0h] long long v27; // [rsp+18h] [rbp-C8h] long long v28; // [rsp+20h] [rbp-C0h] long long v29; // [rsp+28h] [rbp-B8h] __m128 v30; // [rsp+30h] [rbp-B0h] __m128 v31; // [rsp+40h] [rbp-A0h] __m128 v32; // [rsp+50h] [rbp-90h] __m128 v33; // [rsp+60h] [rbp-80h] __m128 v34; // [rsp+70h] [rbp-70h] __m128 v35; // [rsp+80h] [rbp-60h] __m128 v36; // [rsp+90h] [rbp-50h] __m128 v37; // [rsp+A0h] [rbp-40h] long long v38; // [rsp+B0h] [rbp-30h] char *v39; // [rsp+B8h] [rbp-28h] _BYTE *v40; // [rsp+C0h] [rbp-20h] v30 = a7; v31 = a8; v32 = a9; v33 = a10; v34 = a11; v35 = a12; v36 = a13; v37 = a14; v25 = a2; v26 = a3; v27 = a4; v28 = a5; v29 = a6; v40 = v24; v15 = &a15; v39 = &a15; v38 = 0x3000000008LL; v16 = 8; for ( i = 0LL; ; i += (*(_QWORD *)v18 + 7LL) & 0xFFFFFFFFFFFFFFF8LL ) { if ( v16 > 0x28 ) { v18 = v15 + 8; v39 = v15 + 8; } else { v18 = v15; v15 = &v24[v16]; v16 += 8; LODWORD(v38) = v16; } if ( !*(_QWORD *)v15 ) break; if ( v16 > 0x28 ) { v15 = v18 + 8; v39 = v18 + 8; } else { v15 = v18; v18 = &v24[v16]; v16 += 8; LODWORD(v38) = v16; } } result = malloc(i); if ( result ) { v40 = v24; v39 = &a15; v38 = 0x3000000008LL; v20 = 8; for ( j = result; ; j += (*(_QWORD *)v23 + 7LL) & 0xFFFFFFFFFFFFFFF8LL ) { if ( v20 > 0x28 ) { v22 = v39; v39 += 8; } else { v22 = &v40[v20]; LODWORD(v38) = v20 + 8; } if ( !*(_QWORD *)v22 ) break; **(_QWORD **)v22 = j; v20 = v38; if ( (unsigned int)v38 > 0x28uLL ) { v23 = v39; v39 += 8; } else { v23 = &v40[(unsigned int)v38]; v20 = v38 + 8; LODWORD(v38) = v38 + 8; } } } return result; }
ma_multi_malloc: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0xd0 LEA RBX,[RBP + -0xe0] MOV qword ptr [RBX + 0x8],RSI MOV qword ptr [RBX + 0x10],RDX MOV qword ptr [RBX + 0x18],RCX MOV qword ptr [RBX + 0x20],R8 MOV qword ptr [RBX + 0x28],R9 TEST AL,AL JZ 0x0011e97e MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_0011e97e: MOV qword ptr [RBP + -0x20],RBX LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV R14,0x3000000008 MOV qword ptr [RBP + -0x30],R14 MOV EAX,0x8 XOR EDI,EDI LAB_0011e99f: CMP EAX,0x28 JA 0x0011e9b4 MOV RDX,RCX MOV ECX,EAX ADD RCX,RBX ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x0011e9bc LAB_0011e9b4: LEA RDX,[RCX + 0x8] MOV qword ptr [RBP + -0x28],RDX LAB_0011e9bc: CMP qword ptr [RCX],0x0 JZ 0x0011e9ef CMP EAX,0x28 JA 0x0011e9d7 MOV RCX,RDX MOV EDX,EAX ADD RDX,RBX ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x0011e9df LAB_0011e9d7: LEA RCX,[RDX + 0x8] MOV qword ptr [RBP + -0x28],RCX LAB_0011e9df: MOV RDX,qword ptr [RDX] ADD RDX,0x7 AND RDX,-0x8 ADD RDI,RDX JMP 0x0011e99f LAB_0011e9ef: CALL 0x00113600 TEST RAX,RAX JZ 0x0011ea6f MOV qword ptr [RBP + -0x20],RBX LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R14 MOV EDX,0x8 MOV RCX,RAX LAB_0011ea11: CMP EDX,0x28 JA 0x0011ea24 MOV ESI,EDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x0011ea30 LAB_0011ea24: MOV RSI,qword ptr [RBP + -0x28] LEA RDX,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDX LAB_0011ea30: MOV RDX,qword ptr [RSI] TEST RDX,RDX JZ 0x0011ea6f MOV qword ptr [RDX],RCX MOV EDX,dword ptr [RBP + -0x30] CMP RDX,0x28 JA 0x0011ea53 MOV RSI,RDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x0011ea5f LAB_0011ea53: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDI LAB_0011ea5f: MOV RSI,qword ptr [RSI] ADD RSI,0x7 AND RSI,-0x8 ADD RCX,RSI JMP 0x0011ea11 LAB_0011ea6f: ADD RSP,0xd0 POP RBX POP R14 POP RBP RET
void ma_multi_malloc(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; uint uVar1; void *pvVar2; long *plVar3; long *plVar4; ulong uVar5; long *plVar6; size_t __size; long local_e8 [4]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; uint local_38; int4 uStack_34; long *local_30; long *local_28; local_e8[1] = param_10; local_e8[2] = param_11; local_e8[3] = param_12; local_c8 = param_13; local_c0 = param_14; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; plVar6 = (long *)&stack0x00000008; local_30 = plVar6; local_38 = 8; uStack_34 = 0x30; uVar1 = 8; __size = 0; while( true ) { if (uVar1 < 0x29) { uVar5 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; plVar3 = (long *)((long)local_e8 + uVar5); plVar4 = plVar6; } else { plVar4 = plVar6 + 1; local_30 = plVar4; plVar3 = plVar6; } if (*plVar3 == 0) break; if (uVar1 < 0x29) { uVar5 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; plVar6 = plVar4; plVar4 = (long *)((long)local_e8 + uVar5); } else { plVar6 = plVar4 + 1; local_30 = plVar6; } __size = __size + (*plVar4 + 7U & 0xfffffffffffffff8); } pvVar2 = malloc(__size); if (pvVar2 != (void *)0x0) { local_30 = (long *)&stack0x00000008; uVar1 = 8; uVar5 = 8; while( true ) { if ((uint)uVar5 < 0x29) { uVar1 = (uint)uVar5 + 8; plVar6 = (long *)((long)local_e8 + uVar5); } else { plVar6 = local_30; local_30 = local_30 + 1; } if ((int8 *)*plVar6 == (int8 *)0x0) break; *(int8 *)*plVar6 = pvVar2; uVar5 = (ulong)uVar1; if (uVar5 < 0x29) { plVar6 = (long *)((long)local_e8 + uVar5); uVar1 = uVar1 + 8; uVar5 = (ulong)uVar1; } else { plVar6 = local_30; local_30 = local_30 + 1; } pvVar2 = (void *)((long)pvVar2 + (*plVar6 + 7U & 0xfffffffffffffff8)); } } return; }
39,641
uf_prespace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_prespace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); }
O3
c
uf_prespace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r8 movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x373a8 movl (%r14), %ebx decl %eax movl %eax, 0x4(%r14) btl %eax, %ebx jb 0x373db jmp 0x373c5 movq %r14, %rdi movq %r8, %rbx callq 0x36858 movq %rbx, %r8 movl $0x1f, 0x4(%r14) movl (%r14), %ebx testl %ebx, %ebx js 0x373d6 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %r8, %rcx jmp 0x3747b movl $0x1f, %eax movl 0x24(%r15), %r13d movl %eax, %ecx subl %r13d, %ecx jae 0x37431 subl %eax, %r13d movl %eax, %eax leaq 0xa888e(%rip), %rcx # 0xdfc80 andl (%rcx,%rax,4), %ebx movl %r13d, %ecx shll %cl, %ebx movq %r14, %rdi movq %r15, -0x30(%rbp) movq %r12, %r15 movq %r8, %r12 callq 0x36858 movq %r12, %r8 movq %r15, %r12 movq -0x30(%rbp), %r15 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %ebx jmp 0x37445 movl %ecx, 0x4(%r14) shrl %cl, %ebx movl 0x24(%r15), %eax leaq 0xa883e(%rip), %rcx # 0xdfc80 andl (%rcx,%rax,4), %ebx movl %ebx, %edx leaq (%r12,%rdx), %r13 cmpq %r8, %r13 jbe 0x3745a movl $0x1, 0x28(%r14) jmp 0x3748e movq %r12, %rdi movl $0x20, %esi movq %r8, %rbx callq 0x292b0 cmpq %rbx, %r13 je 0x3748e movq %rbx, %rcx movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x36a15 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_prespace_selected: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r8, rcx mov r12, rdx mov r14, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_373A8 mov ebx, [r14] dec eax mov [r14+4], eax bt ebx, eax jb short loc_373DB jmp short loc_373C5 loc_373A8: mov rdi, r14 mov rbx, r8 call fill_buffer mov r8, rbx mov dword ptr [r14+4], 1Fh mov ebx, [r14] test ebx, ebx js short loc_373D6 loc_373C5: mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, r8 jmp loc_3747B loc_373D6: mov eax, 1Fh loc_373DB: mov r13d, [r15+24h] mov ecx, eax sub ecx, r13d jnb short loc_37431 sub r13d, eax mov eax, eax lea rcx, mask and ebx, [rcx+rax*4] mov ecx, r13d shl ebx, cl mov rdi, r14 mov [rbp+var_30], r15 mov r15, r12 mov r12, r8 call fill_buffer mov r8, r12 mov r12, r15 mov r15, [rbp+var_30] mov eax, 20h ; ' ' sub eax, r13d mov [r14+4], eax mov eax, [r14] neg r13d mov ecx, r13d shr eax, cl add ebx, eax jmp short loc_37445 loc_37431: mov [r14+4], ecx shr ebx, cl mov eax, [r15+24h] lea rcx, mask and ebx, [rcx+rax*4] loc_37445: mov edx, ebx lea r13, [r12+rdx] cmp r13, r8 jbe short loc_3745A mov dword ptr [r14+28h], 1 jmp short loc_3748E loc_3745A: mov rdi, r12 mov esi, 20h ; ' ' mov rbx, r8 call _memset cmp r13, rbx jz short loc_3748E mov rcx, rbx mov rdi, r15 mov rsi, r14 mov rdx, r13 loc_3747B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes loc_3748E: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_prespace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { _BYTE *v4; // r8 long long v6; // r15 unsigned int v7; // eax unsigned int v8; // ebx unsigned int v9; // eax _BYTE *v11; // rdx _BYTE *v12; // rcx unsigned int v13; // r13d unsigned int v14; // ecx int v15; // r13d int v16; // ebx _BYTE *v17; // r15 _BYTE *v18; // r12 long long result; // rax unsigned int v20; // ebx long long v21; // rdx _BYTE *v22; // r13 _BYTE *v23; // rbx v4 = a4; v6 = a1; v7 = a2[1]; if ( v7 ) { v8 = *a2; v9 = v7 - 1; a2[1] = v9; if ( !_bittest((const int *)&v8, v9) ) goto LABEL_5; } else { fill_buffer((long long)a2); v4 = a4; a2[1] = 31; v8 = *a2; if ( (*a2 & 0x80000000) == 0 ) { LABEL_5: v11 = a3; v12 = v4; return (long long)decode_bytes(a1, (long long)a2, v11, v12); } v9 = 31; } v13 = *(_DWORD *)(a1 + 36); v14 = v9 - v13; if ( v9 >= v13 ) { a2[1] = v14; result = *(unsigned int *)(a1 + 36); v20 = mask[result] & (v8 >> v14); } else { v15 = v13 - v9; v16 = (mask[v9] & v8) << v15; v17 = a3; v18 = v4; fill_buffer((long long)a2); v4 = v18; a3 = v17; v6 = a1; a2[1] = 32 - v15; result = *a2 >> -(char)v15; v20 = result + v16; } v21 = v20; v22 = &a3[v20]; if ( v22 > v4 ) { a2[10] = 1; return result; } v23 = v4; result = memset(a3, 32LL, v21); if ( v22 != v23 ) { v12 = v23; a1 = v6; v11 = v22; return (long long)decode_bytes(a1, (long long)a2, v11, v12); } return result; }
uf_prespace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R8,RCX MOV R12,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x001373a8 MOV EBX,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT EBX,EAX JC 0x001373db JMP 0x001373c5 LAB_001373a8: MOV RDI,R14 MOV RBX,R8 CALL 0x00136858 MOV R8,RBX MOV dword ptr [R14 + 0x4],0x1f MOV EBX,dword ptr [R14] TEST EBX,EBX JS 0x001373d6 LAB_001373c5: MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,R8 JMP 0x0013747b LAB_001373d6: MOV EAX,0x1f LAB_001373db: MOV R13D,dword ptr [R15 + 0x24] MOV ECX,EAX SUB ECX,R13D JNC 0x00137431 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1dfc80] AND EBX,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL EBX,CL MOV RDI,R14 MOV qword ptr [RBP + -0x30],R15 MOV R15,R12 MOV R12,R8 CALL 0x00136858 MOV R8,R12 MOV R12,R15 MOV R15,qword ptr [RBP + -0x30] MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R13D MOV ECX,R13D SHR EAX,CL ADD EBX,EAX JMP 0x00137445 LAB_00137431: MOV dword ptr [R14 + 0x4],ECX SHR EBX,CL MOV EAX,dword ptr [R15 + 0x24] LEA RCX,[0x1dfc80] AND EBX,dword ptr [RCX + RAX*0x4] LAB_00137445: MOV EDX,EBX LEA R13,[R12 + RDX*0x1] CMP R13,R8 JBE 0x0013745a MOV dword ptr [R14 + 0x28],0x1 JMP 0x0013748e LAB_0013745a: MOV RDI,R12 MOV ESI,0x20 MOV RBX,R8 CALL 0x001292b0 CMP R13,RBX JZ 0x0013748e MOV RCX,RBX MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 LAB_0013747b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00136a15 LAB_0013748e: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_prespace_selected(long param_1,uint *param_2,void *param_3,void *param_4) { void *pvVar1; uint uVar2; uint uVar3; uint uVar4; byte bVar5; uint uVar6; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar6 = *param_2; if (-1 < (int)uVar6) goto LAB_0013747b; uVar4 = 0x1f; } else { uVar6 = *param_2; uVar4 = param_2[1] - 1; param_2[1] = uVar4; if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) goto LAB_0013747b; } uVar2 = *(uint *)(param_1 + 0x24); if (uVar4 < uVar2) { uVar3 = (&mask)[uVar4]; bVar5 = (byte)(uVar2 - uVar4); fill_buffer(param_2); param_2[1] = 0x20 - (uVar2 - uVar4); uVar6 = ((uVar6 & uVar3) << (bVar5 & 0x1f)) + (*param_2 >> (-bVar5 & 0x1f)); } else { param_2[1] = uVar4 - uVar2; uVar6 = uVar6 >> ((byte)(uVar4 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } pvVar1 = (void *)((long)param_3 + (ulong)uVar6); if (param_4 < pvVar1) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar6); param_3 = pvVar1; if (pvVar1 != param_4) { LAB_0013747b: decode_bytes(param_1,param_2,param_3,param_4); return; } } return; }
39,642
char const* google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)>(char const*, char const*, char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long))
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
const char* ReadPackedVarintArray(const char* ptr, const char* end, Add add) { while (ptr < end) { uint64_t varint; ptr = VarintParse(ptr, &varint); if (ptr == nullptr) return nullptr; add(varint); } return ptr; }
O0
c
char const* google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)>(char const*, char const*, char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)): subq $0x28, %rsp movq %rdx, 0x18(%rsp) movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax cmpq 0x8(%rsp), %rax jae 0x1b8534 movq 0x10(%rsp), %rdi movq %rsp, %rsi callq 0xde980 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x1b8524 movq $0x0, 0x20(%rsp) jmp 0x1b853e movq (%rsp), %rsi leaq 0x18(%rsp), %rdi callq 0x1b8550 jmp 0x1b84f3 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb1EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_: sub rsp, 28h mov [rsp+28h+var_10], rdx mov [rsp+28h+var_18], rdi mov [rsp+28h+var_20], rsi loc_1B84F3: mov rax, [rsp+28h+var_18] cmp rax, [rsp+28h+var_20] jnb short loc_1B8534 mov rdi, [rsp+28h+var_18] mov rsi, rsp call _ZN6google8protobuf8internal11VarintParseImEEPKcS4_PT_; google::protobuf::internal::VarintParse<ulong>(char const*,ulong *) mov [rsp+28h+var_18], rax cmp [rsp+28h+var_18], 0 jnz short loc_1B8524 mov [rsp+28h+var_8], 0 jmp short loc_1B853E loc_1B8524: mov rsi, [rsp+28h+var_28] lea rdi, [rsp+28h+var_10] call _ZZN6google8protobuf8internal12VarintParserIlLb1EEEPKcPvS4_PNS1_12ParseContextEENKUlmE_clEm; google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}::operator()(ulong) jmp short loc_1B84F3 loc_1B8534: mov rax, [rsp+28h+var_18] mov [rsp+28h+var_8], rax loc_1B853E: mov rax, [rsp+28h+var_8] add rsp, 28h retn
unsigned __int8 * google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( unsigned __int8 *a1, unsigned long long a2, long long a3, unsigned long long *a4) { long long v5; // [rsp+0h] [rbp-28h] BYREF unsigned long long v6; // [rsp+8h] [rbp-20h] unsigned __int8 *v7; // [rsp+10h] [rbp-18h] long long v8; // [rsp+18h] [rbp-10h] BYREF v8 = a3; v7 = a1; v6 = a2; while ( (unsigned long long)v7 < v6 ) { v7 = (unsigned __int8 *)google::protobuf::internal::VarintParse<unsigned long>(v7, &v5, a3, a4); if ( !v7 ) return 0LL; google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}::operator()( &v8, v5); } return v7; }
39,643
char const* google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)>(char const*, char const*, char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long))
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
const char* ReadPackedVarintArray(const char* ptr, const char* end, Add add) { while (ptr < end) { uint64_t varint; ptr = VarintParse(ptr, &varint); if (ptr == nullptr) return nullptr; add(varint); } return ptr; }
O3
c
char const* google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)>(char const*, char const*, char const* google::protobuf::internal::VarintParser<int, true>(void*, char const*, google::protobuf::internal::ParseContext*)::'lambda'(unsigned long)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpq %rsi, %rdi jae 0x9fdfe movq %rdx, %r14 movq %rsi, %r15 movq %rbx, %rdi movq %rsp, %rsi callq 0x8f95f testq %rax, %rax je 0x9fdfc movq %rax, %rbx movq (%rsp), %r12 movl (%r14), %r13d cmpl 0x4(%r14), %r13d jne 0x9fde6 leal 0x1(%r13), %ebp movq %r14, %rdi movl %ebp, %esi callq 0xa2f3c movq 0x8(%r14), %rax movq %r12, (%rax,%r13,8) jmp 0x9fdf2 movq 0x8(%r14), %rax movq %r12, (%rax,%r13,8) leal 0x1(%r13), %ebp movl %ebp, (%r14) cmpq %r15, %rbx jb 0x9fdae jmp 0x9fdfe xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb0EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp rdi, rsi jnb short loc_9FDFE mov r14, rdx mov r15, rsi loc_9FDAE: mov rdi, rbx; this mov rsi, rsp call _ZN6google8protobuf8internal11VarintParseImEEPKcS4_PT_; google::protobuf::internal::VarintParse<ulong>(char const*,ulong *) test rax, rax jz short loc_9FDFC mov rbx, rax mov r12, [rsp+38h+var_38] mov r13d, [r14] cmp r13d, [r14+4] jnz short loc_9FDE6 lea ebp, [r13+1] mov rdi, r14 mov esi, ebp call _ZN6google8protobuf13RepeatedFieldIlE7ReserveEi; google::protobuf::RepeatedField<long>::Reserve(int) mov rax, [r14+8] mov [rax+r13*8], r12 jmp short loc_9FDF2 loc_9FDE6: mov rax, [r14+8] mov [rax+r13*8], r12 lea ebp, [r13+1] loc_9FDF2: mov [r14], ebp cmp rbx, r15 jb short loc_9FDAE jmp short loc_9FDFE loc_9FDFC: xor ebx, ebx loc_9FDFE: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
google::protobuf::internal * google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( google::protobuf::internal *this, unsigned long long a2, unsigned int *a3) { long long v3; // rax google::protobuf::internal *v4; // rbx long long v6; // rax long long v7; // r12 long long v8; // r13 unsigned int v9; // ebp long long v11[7]; // [rsp+0h] [rbp-38h] BYREF v11[0] = v3; v4 = this; if ( (unsigned long long)this < a2 ) { while ( 1 ) { v6 = google::protobuf::internal::VarintParse<unsigned long>(v4, v11); if ( !v6 ) break; v4 = (google::protobuf::internal *)v6; v7 = v11[0]; v8 = *a3; if ( (_DWORD)v8 == a3[1] ) { v9 = v8 + 1; google::protobuf::RepeatedField<long>::Reserve(a3, (unsigned int)(v8 + 1)); *(_QWORD *)(*((_QWORD *)a3 + 1) + 8 * v8) = v7; } else { *(_QWORD *)(*((_QWORD *)a3 + 1) + 8 * v8) = v11[0]; v9 = v8 + 1; } *a3 = v9; if ( (unsigned long long)v4 >= a2 ) return v4; } return 0LL; } return v4; }
ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::{lambda(unsigned_long)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP RDI,RSI JNC 0x0019fdfe MOV R14,RDX MOV R15,RSI LAB_0019fdae: MOV RDI,RBX MOV RSI,RSP CALL 0x0018f95f TEST RAX,RAX JZ 0x0019fdfc MOV RBX,RAX MOV R12,qword ptr [RSP] MOV R13D,dword ptr [R14] CMP R13D,dword ptr [R14 + 0x4] JNZ 0x0019fde6 LEA EBP,[R13 + 0x1] MOV RDI,R14 MOV ESI,EBP CALL 0x001a2f3c MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RAX + R13*0x8],R12 JMP 0x0019fdf2 LAB_0019fde6: MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RAX + R13*0x8],R12 LEA EBP,[R13 + 0x1] LAB_0019fdf2: MOV dword ptr [R14],EBP CMP RBX,R15 JC 0x0019fdae JMP 0x0019fdfe LAB_0019fdfc: XOR EBX,EBX LAB_0019fdfe: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* char const* google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long, false>(void*, char const*, google::protobuf::internal::ParseContext*)::{lambda(unsigned long)#1}>(char const*, char const*, google::protobuf::internal::VarintParser<long, false>(void*, char const*, google::protobuf::internal::ParseContext*)::{lambda(unsigned long)#1}) */ char * google::protobuf::internal:: ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::_lambda(unsigned_long)_1_> (char *param_1,char *param_2,RepeatedField<long> *param_3) { uint uVar1; ulong uVar2; ulong in_RAX; ulong local_38; local_38 = in_RAX; if (param_1 < param_2) { do { param_1 = VarintParse<unsigned_long>(param_1,&local_38); uVar2 = local_38; if (param_1 == (char *)0x0) { return (char *)0x0; } uVar1 = *(uint *)param_3; if (uVar1 == *(uint *)(param_3 + 4)) { RepeatedField<long>::Reserve(param_3,uVar1 + 1); *(ulong *)(*(long *)(param_3 + 8) + (ulong)uVar1 * 8) = uVar2; } else { *(ulong *)(*(long *)(param_3 + 8) + (ulong)uVar1 * 8) = local_38; } *(uint *)param_3 = uVar1 + 1; } while (param_1 < param_2); } return param_1; }
39,644
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
monkey531[P]llama/common/json.hpp
void push_back(basic_json&& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (move semantics) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(std::move(val)); set_parent(m_data.m_value.array->back(), old_capacity); // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor }
O0
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>::push_back(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>&&): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq 0x70(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xa1c50 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x1f(%rsp) jne 0x145e88 movq 0x10(%rsp), %rdi callq 0xa2940 movb %al, 0x1f(%rsp) movb 0x1f(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x145e9b jmp 0x145f53 movb $0x1, 0x33(%rsp) movl $0x20, %edi callq 0x4f580 movq 0x10(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xa04a0 movq %rax, 0x40(%rsp) leaq 0x740be(%rip), %rsi # 0x1b9f83 leaq 0x48(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0xa03f0 jmp 0x145ed6 movq 0x10(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x134, %esi # imm = 0x134 leaq 0x48(%rsp), %rdx callq 0xbb8a0 jmp 0x145ef1 movq 0x8(%rsp), %rdi movb $0x0, 0x33(%rsp) leaq 0xee206(%rip), %rsi # 0x234108 leaq -0xa59b9(%rip), %rdx # 0xa0550 callq 0x4f940 jmp 0x145fea movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) jmp 0x145f3b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x48(%rsp), %rdi callq 0x50100 testb $0x1, 0x33(%rsp) jne 0x145f44 jmp 0x145f4e movq 0x8(%rsp), %rdi callq 0x4fc70 jmp 0x145fe0 movq 0x10(%rsp), %rdi callq 0xa1c50 testb $0x1, %al jne 0x145f63 jmp 0x145f92 movq 0x10(%rsp), %rax movb $0x2, (%rax) leaq 0x28(%rsp), %rdi movl $0x2, %esi callq 0xc12b0 movq 0x10(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, 0x8(%rdi) movl $0x1, %esi callq 0x9f9d0 movq 0x10(%rsp), %rax movq 0x8(%rax), %rdi callq 0xa2c40 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x20(%rsp) movq 0x8(%rax), %rdi movq 0x68(%rsp), %rsi callq 0xa2840 movq 0x10(%rsp), %rax movq 0x8(%rax), %rdi callq 0xa28e0 movq 0x10(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x11ad10 addq $0x78, %rsp retq movq 0x38(%rsp), %rdi callq 0x4f990 nopw (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_: sub rsp, 78h mov qword ptr [rsp+78h+var_8], rdi; char mov qword ptr [rsp+78h+var_10], rsi; int mov rdi, qword ptr [rsp+78h+var_8] mov qword ptr [rsp+78h+var_68], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_null(void) mov cl, al mov al, 1 test cl, 1 mov [rsp+78h+var_59], al jnz short loc_145E88 mov rdi, qword ptr [rsp+78h+var_68] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void) mov [rsp+78h+var_59], al loc_145E88: mov al, [rsp+78h+var_59] xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_145E9B jmp loc_145F53 loc_145E9B: mov [rsp+78h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, qword ptr [rsp+78h+var_68] mov [rsp+78h+var_70], rax; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov [rsp+78h+var_38], rax; __int64 lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+78h+var_30] lea rdx, [rsp+78h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) jmp short $+2 loc_145ED6: mov rcx, qword ptr [rsp+78h+var_68] mov rdi, [rsp+78h+var_70]; int mov esi, 134h lea rdx, [rsp+78h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_145EF1: mov rdi, [rsp+78h+var_70]; void * mov [rsp+78h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_145FEA mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax jmp short loc_145F3B mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_145F3B: test [rsp+arg_2B], 1 jnz short loc_145F44 jmp short loc_145F4E loc_145F44: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_145F4E: jmp loc_145FE0 loc_145F53: mov rdi, qword ptr [rsp+78h+var_68] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_null(void) test al, 1 jnz short loc_145F63 jmp short loc_145F92 loc_145F63: mov rax, qword ptr [rsp+78h+var_68] mov byte ptr [rax], 2 lea rdi, [rsp+78h+var_50]; int mov esi, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) mov rdi, qword ptr [rsp+78h+var_68] mov rax, qword ptr [rsp+78h+var_50] mov [rdi+8], rax mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_145F92: mov rax, qword ptr [rsp+78h+var_68] mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8capacityEv; 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>>::capacity(void) mov rcx, rax mov rax, qword ptr [rsp+78h+var_68] mov [rsp+78h+var_58], rcx mov rdi, [rax+8] mov rsi, qword ptr [rsp+78h+var_10] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backEOSD_; 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>>::push_back(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 rax, qword ptr [rsp+78h+var_68] mov rdi, [rax+8] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::back(void) mov rdi, qword ptr [rsp+78h+var_68] mov rsi, rax mov rdx, [rsp+78h+var_58] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parent(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>&,ulong) add rsp, 78h retn loc_145FE0: mov rdi, [rsp+arg_30] call __Unwind_Resume loc_145FEA: nop word ptr [rax+rax+00h]
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>::push_back( _BYTE *a1, long long a2) { long long v2; // rax int v4; // [rsp+0h] [rbp-78h] int v5; // [rsp+8h] [rbp-70h] nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-70h] long long v7; // [rsp+10h] [rbp-68h] __int16 v8; // [rsp+18h] [rbp-60h] bool is_array; // [rsp+1Fh] [rbp-59h] long long v10; // [rsp+20h] [rbp-58h] int v11[2]; // [rsp+28h] [rbp-50h] BYREF char v12; // [rsp+30h] [rbp-48h] char v13; // [rsp+33h] [rbp-45h] long long v14; // [rsp+40h] [rbp-38h] BYREF _BYTE v15[32]; // [rsp+48h] [rbp-30h] BYREF int v16[2]; // [rsp+68h] [rbp-10h] char v17[8]; // [rsp+70h] [rbp-8h] *(_QWORD *)v17 = a1; *(_QWORD *)v16 = a2; v7 = (long long)a1; is_array = 1; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_null(a1) ) is_array = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(a1); if ( !is_array ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v14 = (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>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v15, (long long)"cannot use push_back() with ", (long long)&v14); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v15, (long long)a1); v13 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } if ( nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_null(a1) ) { *a1 = 2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::json_value( (int)v11, v4, v5, (int)a1, v8, v10, v11[0], v12); *(_QWORD *)(v7 + 8) = *(_QWORD *)v11; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v7); } 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>>::capacity(*(_QWORD **)(v7 + 8)); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::push_back( *(_QWORD *)(v7 + 8), *(long long *)v16); v2 = 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>>::back(*(_QWORD *)(v7 + 8)); 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>::set_parent( v7, v2); }
39,645
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
monkey531[P]llama/common/json.hpp
void push_back(basic_json&& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (move semantics) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(std::move(val)); set_parent(m_data.m_value.array->back(), old_capacity); // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor }
O2
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x6dcdb movb $0x2, (%r14) callq 0x4863e movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3ccfc jmp 0x6dce0 cmpl $0x2, %eax jne 0x6dcf4 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x3df72 pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3d1f2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x24744(%rip), %rsi # 0x9245a leaq 0x10(%rsp), %rdi callq 0x3d193 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x46780 xorl %ebp, %ebp leaq 0x61587(%rip), %rsi # 0xcf2c8 leaq -0x255f4(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x6dd67 jmp 0x6dd6f movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_6DCDB mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::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>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 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) jmp short loc_6DCE0 loc_6DCDB: cmp eax, 2 jnz short loc_6DCF4 loc_6DCE0: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) loc_6DCF4: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6DD67 jmp short loc_6DD6F mov r14, rax loc_6DD67: mov rdi, rbx; void * call ___cxa_free_exception loc_6DD6F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", (long long)&v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<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>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>::emplace_back<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>>( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0016dcdb MOV byte ptr [R14],0x2 CALL 0x0014863e MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013ccfc JMP 0x0016dce0 LAB_0016dcdb: CMP EAX,0x2 JNZ 0x0016dcf4 LAB_0016dce0: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0013df72 LAB_0016dcf4: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX MOV RDI,R14 CALL 0x0013d1f2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016dd0f: LEA RSI,[0x19245a] LEA RDI,[RSP + 0x10] CALL 0x0013d193 MOV BPL,0x1 LAB_0016dd23: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00146780 XOR EBP,EBP LEA RSI,[0x1cf2c8] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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>&&) */ void __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> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector *pvVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; pvVar1 = create<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 **)(this + 8) = pvVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0016dd0f to 0016dd1f has its CatchHandler @ 0016dd64 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0016dd23 to 0016dd4f has its CatchHandler @ 0016dd50 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> :: emplace_back<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<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),param_1); return; }
39,646
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
monkey531[P]llama/common/json.hpp
void push_back(basic_json&& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (move semantics) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(std::move(val)); set_parent(m_data.m_value.array->back(), old_capacity); // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor }
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x7c562 movb $0x2, (%r14) movl $0x18, %edi callq 0x18690 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x3d7c0 jmp 0x7c567 cmpl $0x2, %eax jne 0x7c57b movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x3ee4c movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3deb4 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2fedc(%rip), %rsi # 0xac47b leaq 0x10(%rsp), %rdi callq 0x3de2b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x49ade xorl %ebp, %ebp leaq 0x5ecee(%rip), %rsi # 0xdb2b8 leaq -0x30457(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7c5f7 movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x7c601 jmp 0x7c609 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_7C562 mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7C567 loc_7C562: cmp eax, 2 jnz short loc_7C57B loc_7C567: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) loc_7C57B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7C5F7 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C5F7: test bpl, bpl jnz short loc_7C601 jmp short loc_7C609 mov r14, rax loc_7C601: mov rdi, rbx; void * call ___cxa_free_exception loc_7C609: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; v2 = operator new(0x18uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1); } return 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>>::emplace_back<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>>( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0017c562 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00118690 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d7c0 JMP 0x0017c567 LAB_0017c562: CMP EAX,0x2 JNZ 0x0017c57b LAB_0017c567: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0013ee4c LAB_0017c57b: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013deb4 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017c598: LEA RSI,[0x1ac47b] LEA RDI,[RSP + 0x10] CALL 0x0013de2b MOV BPL,0x1 LAB_0017c5ac: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00149ade XOR EBP,EBP LEA RSI,[0x1db2b8] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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>&&) */ void __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> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar1 = (int8 *)operator_new(0x18); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017c598 to 0017c5a8 has its CatchHandler @ 0017c5fe */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0017c5ac to 0017c5d8 has its CatchHandler @ 0017c5d9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> :: emplace_back<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<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),param_1); return; }
39,647
my_fill_utf8mb3_mb
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill) { char *end= str + length; char buf[10]; char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); for ( ; str + buflen <= end ; ) { memcpy(str, buf, buflen); str+= buflen; } for ( ; str < end; ) *str++= ' '; }
O0
c
my_fill_utf8mb3_mb: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0xd8(%rax), %rax movq -0x20(%rbp), %rdi movslq -0x34(%rbp), %rsi leaq -0x12(%rbp), %rdx leaq -0x12(%rbp), %rcx addq $0xa, %rcx callq *%rax movb %al, -0x41(%rbp) jmp 0x65b4d jmp 0x65b4f movq -0x28(%rbp), %rax movsbl -0x41(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax cmpq -0x40(%rbp), %rax ja 0x65b89 movq -0x28(%rbp), %rdi leaq -0x12(%rbp), %rsi movsbq -0x41(%rbp), %rdx callq 0x24230 movsbl -0x41(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x65b4f jmp 0x65b8b movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x65ba9 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x20, (%rax) jmp 0x65b8b movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x65bc1 addq $0x50, %rsp popq %rbp retq callq 0x242f0 nopw %cs:(%rax,%rax)
my_fill_utf8mb3_mb: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rax, [rax+0D8h] mov rdi, [rbp+var_20] movsxd rsi, [rbp+var_34] lea rdx, [rbp+var_12] lea rcx, [rbp+var_12] add rcx, 0Ah call rax mov [rbp+var_41], al jmp short $+2 loc_65B4D: jmp short $+2 loc_65B4F: mov rax, [rbp+var_28] movsx ecx, [rbp+var_41] movsxd rcx, ecx add rax, rcx cmp rax, [rbp+var_40] ja short loc_65B89 mov rdi, [rbp+var_28] lea rsi, [rbp+var_12] movsx rdx, [rbp+var_41] call _memcpy movsx ecx, [rbp+var_41] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp short loc_65B4F loc_65B89: jmp short $+2 loc_65B8B: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] jnb short loc_65BA9 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_65B8B loc_65BA9: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_65BC1 add rsp, 50h pop rbp retn loc_65BC1: call ___stack_chk_fail
unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4) { _BYTE *v4; // rax char i; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] _BYTE *v8; // [rsp+28h] [rbp-28h] _BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF v10 = __readfsqword(0x28u); v8 = a2; v7 = (unsigned long long)&a2[a3]; for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, a4, v9, &v10); (unsigned long long)&v8[i] <= v7; v8 += i ) memcpy(v8, v9, i); while ( (unsigned long long)v8 < v7 ) { v4 = v8++; *v4 = 32; } return __readfsqword(0x28u); }
my_fill_utf8mb3_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0xd8] MOV RDI,qword ptr [RBP + -0x20] MOVSXD RSI,dword ptr [RBP + -0x34] LEA RDX,[RBP + -0x12] LEA RCX,[RBP + -0x12] ADD RCX,0xa CALL RAX MOV byte ptr [RBP + -0x41],AL JMP 0x00165b4d LAB_00165b4d: JMP 0x00165b4f LAB_00165b4f: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RBP + -0x41] MOVSXD RCX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x40] JA 0x00165b89 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x12] MOVSX RDX,byte ptr [RBP + -0x41] CALL 0x00124230 MOVSX ECX,byte ptr [RBP + -0x41] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00165b4f LAB_00165b89: JMP 0x00165b8b LAB_00165b8b: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00165ba9 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x20 JMP 0x00165b8b LAB_00165ba9: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00165bc1 ADD RSP,0x50 POP RBP RET LAB_00165bc1: CALL 0x001242f0
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4) { char cVar1; long in_FS_OFFSET; int1 *local_30; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10); for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3; local_30 = local_30 + (int)cVar1) { memcpy(local_30,local_1a,(long)cVar1); } while (local_30 < param_2 + param_3) { *local_30 = 0x20; local_30 = local_30 + 1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
39,648
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x8073a movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x80728 cmpl $0x2, %eax jne 0x80731 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x80722 leaq 0x30(%rbx), %rdi callq 0x807db movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x80735 movq %rbx, %rdi popq %rbx jmp 0x8080e addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x2f82b(%rip), %rdi # 0xaff6c leaq 0x29aa4(%rip), %rdx # 0xaa1ec leaq 0x34ae2(%rip), %rcx # 0xb5231 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x23ec0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_8073A mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_80728 cmp eax, 2 jnz short loc_80731 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_80722 lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_80722: add rbx, 30h ; '0' jmp short loc_80735 loc_80728: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) loc_80731: add rbx, 50h ; 'P' loc_80735: mov rax, rbx pop rbx retn loc_8073A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0018073a MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00180728 CMP EAX,0x2 JNZ 0x00180731 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x00180722 LEA RDI,[RBX + 0x30] CALL 0x001807db MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_00180722: ADD RBX,0x30 JMP 0x00180735 LAB_00180728: MOV RDI,RBX POP RBX JMP 0x0018080e LAB_00180731: ADD RBX,0x50 LAB_00180735: MOV RAX,RBX POP RBX RET LAB_0018073a: LEA RDI,[0x1aff6c] LEA RDX,[0x1aa1ec] LEA RCX,[0x1b5231] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00123ec0
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)this); return piVar2; }
39,649
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0xadb02 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xadaf0 cmpl $0x2, %eax jne 0xadaf9 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xadaea leaq 0x30(%rbx), %rdi callq 0xadbb7 movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xadafd movq %rbx, %rdi popq %rbx jmp 0xadc78 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x3e480(%rip), %rdi # 0xebf89 leaq 0x3870c(%rip), %rdx # 0xe621c leaq 0x4371a(%rip), %rcx # 0xf1231 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1aea0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_ADB02 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_ADAF0 cmp eax, 2 jnz short loc_ADAF9 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_ADAEA lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_ADAEA: add rbx, 30h ; '0' jmp short loc_ADAFD loc_ADAF0: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) loc_ADAF9: add rbx, 50h ; 'P' loc_ADAFD: mov rax, rbx pop rbx retn loc_ADB02: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001adb02 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001adaf0 CMP EAX,0x2 JNZ 0x001adaf9 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001adaea LEA RDI,[RBX + 0x30] CALL 0x001adbb7 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001adaea: ADD RBX,0x30 JMP 0x001adafd LAB_001adaf0: MOV RDI,RBX POP RBX JMP 0x001adc78 LAB_001adaf9: ADD RBX,0x50 LAB_001adafd: MOV RAX,RBX POP RBX RET LAB_001adb02: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f1231] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011aea0
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)this); return piVar2; }
39,650
rlGetShaderBufferSize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlGetShaderBufferSize(unsigned int id) { #if defined(GRAPHICS_API_OPENGL_43) GLint64 size = 0; glBindBuffer(GL_SHADER_STORAGE_BUFFER, id); glGetBufferParameteri64v(GL_SHADER_STORAGE_BUFFER, GL_BUFFER_SIZE, &size); return (size > 0)? (unsigned int)size : 0; #else return 0; #endif }
O0
c
rlGetShaderBufferSize: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) xorl %eax, %eax popq %rbp retq nopl (%rax,%rax)
rlGetShaderBufferSize: push rbp mov rbp, rsp mov [rbp+var_4], edi xor eax, eax pop rbp retn
long long rlGetShaderBufferSize() { return 0LL; }
rlGetShaderBufferSize: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI XOR EAX,EAX POP RBP RET
int8 rlGetShaderBufferSize(void) { return 0; }
39,651
rlGetShaderBufferSize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlGetShaderBufferSize(unsigned int id) { #if defined(GRAPHICS_API_OPENGL_43) GLint64 size = 0; glBindBuffer(GL_SHADER_STORAGE_BUFFER, id); glGetBufferParameteri64v(GL_SHADER_STORAGE_BUFFER, GL_BUFFER_SIZE, &size); return (size > 0)? (unsigned int)size : 0; #else return 0; #endif }
O1
c
rlGetShaderBufferSize: xorl %eax, %eax retq
rlGetShaderBufferSize: xor eax, eax retn
long long rlGetShaderBufferSize() { return 0LL; }
rlGetShaderBufferSize: XOR EAX,EAX RET
int8 rlGetShaderBufferSize(void) { return 0; }
39,652
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces(int, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp
bool SurfaceFactory::initSurfaces(Index faceIndex, internal::SurfaceData * vtxSurface, internal::SurfaceData * varSurface, internal::SurfaceData * fvarSurfaces, int fvarCount, FVarID const fvarIDs[]) const { // Note the SurfaceData for the first FVar Surface is assumed below // to be the head of an array of SurfaceData, which will not be true // if additional members are added to Surface<REAL> in future: assert(sizeof(internal::SurfaceData) == sizeof(Surface<float>)); SurfaceSet surfaces; surfaces.vtxSurf = vtxSurface; surfaces.varSurf = varSurface; surfaces.fvarSurfs = fvarSurfaces; surfaces.fvarIDs = fvarIDs; surfaces.numFVarSurfs = fvarCount; surfaces.numSurfs = fvarCount + (vtxSurface != 0) + (varSurface != 0); return populateAllSurfaces(faceIndex, &surfaces); }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces(int, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x68(%rbp) leaq -0x60(%rbp), %rdi callq 0xcd920 movq -0x68(%rbp), %rdi movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x5c(%rbp) movl -0x2c(%rbp), %eax cmpq $0x0, -0x18(%rbp) setne %cl andb $0x1, %cl movzbl %cl, %ecx addl %ecx, %eax cmpq $0x0, -0x20(%rbp) setne %cl andb $0x1, %cl movzbl %cl, %ecx addl %ecx, %eax movl %eax, -0x60(%rbp) movl -0xc(%rbp), %esi leaq -0x60(%rbp), %rdx callq 0xd2f40 andb $0x1, %al addq $0x70, %rsp popq %rbp retq nopl (%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory12initSurfacesEiPNS1_8internal11SurfaceDataES5_S5_iPKl: push rbp mov rbp, rsp sub rsp, 70h mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov rax, [rbp+var_8] mov [rbp+var_68], rax lea rdi, [rbp+var_60]; this call __ZN10OpenSubdiv6v3_6_03Bfr14SurfaceFactory10SurfaceSetC2Ev; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet::SurfaceSet(void) mov rdi, [rbp+var_68]; this mov rax, [rbp+var_18] mov [rbp+var_58], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+arg_0] mov [rbp+var_38], rax mov eax, [rbp+var_2C] mov [rbp+var_5C], eax mov eax, [rbp+var_2C] cmp [rbp+var_18], 0 setnz cl and cl, 1 movzx ecx, cl add eax, ecx cmp [rbp+var_20], 0 setnz cl and cl, 1 movzx ecx, cl add eax, ecx mov [rbp+var_60], eax mov esi, [rbp+var_C]; int lea rdx, [rbp+var_60]; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet * call __ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19populateAllSurfacesEiPNS2_10SurfaceSetE; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::populateAllSurfaces(int,OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet *) and al, 1 add rsp, 70h pop rbp retn
char OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces( OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this, int a2, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a3, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a4, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a5, int a6, const long long *a7) { _DWORD v8[2]; // [rsp+10h] [rbp-60h] BYREF OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v9; // [rsp+18h] [rbp-58h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v10; // [rsp+20h] [rbp-50h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v11; // [rsp+28h] [rbp-48h] const long long *v12; // [rsp+38h] [rbp-38h] int v13; // [rsp+44h] [rbp-2Ch] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v14; // [rsp+48h] [rbp-28h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v15; // [rsp+50h] [rbp-20h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v16; // [rsp+58h] [rbp-18h] int v17; // [rsp+64h] [rbp-Ch] OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *v18; // [rsp+68h] [rbp-8h] v18 = this; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet::SurfaceSet((OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet *)v8); v9 = v16; v10 = v15; v11 = v14; v12 = a7; v8[1] = v13; v8[0] = (v15 != 0LL) + (v16 != 0LL) + v13; return OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::populateAllSurfaces( this, v17, (OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet *)v8) & 1; }
39,653
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces(int, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp
bool SurfaceFactory::initSurfaces(Index faceIndex, internal::SurfaceData * vtxSurface, internal::SurfaceData * varSurface, internal::SurfaceData * fvarSurfaces, int fvarCount, FVarID const fvarIDs[]) const { // Note the SurfaceData for the first FVar Surface is assumed below // to be the head of an array of SurfaceData, which will not be true // if additional members are added to Surface<REAL> in future: assert(sizeof(internal::SurfaceData) == sizeof(Surface<float>)); SurfaceSet surfaces; surfaces.vtxSurf = vtxSurface; surfaces.varSurf = varSurface; surfaces.fvarSurfs = fvarSurfaces; surfaces.fvarIDs = fvarIDs; surfaces.numFVarSurfs = fvarCount; surfaces.numSurfs = fvarCount + (vtxSurface != 0) + (varSurface != 0); return populateAllSurfaces(faceIndex, &surfaces); }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces(int, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const: subq $0x38, %rsp movq 0x40(%rsp), %r10 xorps %xmm0, %xmm0 movq %rsp, %rax movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movq %rdx, 0x8(%rax) movq %rcx, 0x10(%rax) movq %r8, 0x18(%rax) movq %r10, 0x28(%rax) movl %r9d, 0x4(%rax) cmpq $0x1, %rdx sbbl $-0x1, %r9d cmpq $0x1, %rcx sbbl $-0x1, %r9d movl %r9d, (%rax) movq %rax, %rdx callq 0x3b440 addq $0x38, %rsp retq
_ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory12initSurfacesEiPNS1_8internal11SurfaceDataES5_S5_iPKl: sub rsp, 38h mov r10, [rsp+38h+arg_0] xorps xmm0, xmm0 mov rax, rsp movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 mov [rax+8], rdx mov [rax+10h], rcx mov [rax+18h], r8 mov [rax+28h], r10 mov [rax+4], r9d cmp rdx, 1 sbb r9d, 0FFFFFFFFh cmp rcx, 1 sbb r9d, 0FFFFFFFFh mov [rax], r9d mov rdx, rax; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet * call __ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19populateAllSurfacesEiPNS2_10SurfaceSetE; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::populateAllSurfaces(int,OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet *) add rsp, 38h retn
long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces( OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this, int a2, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a3, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a4, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a5, int a6, const long long *a7) { _DWORD v8[2]; // [rsp+0h] [rbp-38h] BYREF OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v9; // [rsp+8h] [rbp-30h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v10; // [rsp+10h] [rbp-28h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v11; // [rsp+18h] [rbp-20h] long long v12; // [rsp+20h] [rbp-18h] const long long *v13; // [rsp+28h] [rbp-10h] v12 = 0LL; v9 = a3; v10 = a4; v11 = a5; v13 = a7; v8[1] = a6; v8[0] = a6 - ((a3 == 0LL) - 1) - ((a4 == 0LL) - 1); return OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::populateAllSurfaces( this, a2, (OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::SurfaceSet *)v8); }
initSurfaces: SUB RSP,0x38 MOV R10,qword ptr [RSP + 0x40] XORPS XMM0,XMM0 MOV RAX,RSP MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],R8 MOV qword ptr [RAX + 0x28],R10 MOV dword ptr [RAX + 0x4],R9D CMP RDX,0x1 SBB R9D,-0x1 CMP RCX,0x1 SBB R9D,-0x1 MOV dword ptr [RAX],R9D MOV RDX,RAX CALL 0x0013b440 ADD RSP,0x38 RET
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces(int, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initSurfaces (SurfaceFactory *this,int param_1,SurfaceData *param_2,SurfaceData *param_3, SurfaceData *param_4,int param_5,long *param_6) { int local_38; int iStack_34; SurfaceData *pSStack_30; SurfaceData *local_28; SurfaceData *pSStack_20; int8 local_18; long *plStack_10; local_18 = 0; plStack_10 = param_6; _local_38 = CONCAT44(param_5,((param_5 - (uint)(param_2 == (SurfaceData *)0x0)) + 2) - (uint)(param_3 == (SurfaceData *)0x0)); pSStack_30 = param_2; local_28 = param_3; pSStack_20 = param_4; populateAllSurfaces(this,param_1,(SurfaceSet *)&local_38); return; }
39,654
translog_interpret_file_header
eloqsql/storage/maria/ma_loghandler.c
void translog_interpret_file_header(LOGHANDLER_FILE_INFO *desc, uchar *page_buff) { uchar *ptr; ptr= page_buff + sizeof(maria_trans_file_magic); desc->timestamp= uint8korr(ptr); ptr+= 8; desc->maria_version= uint4korr(ptr); ptr+= 4; desc->mysql_version= uint4korr(ptr); ptr+= 4; desc->server_id= uint4korr(ptr); ptr+= 4; desc->page_size= uint2korr(ptr) + 1; ptr+= 2; desc->file_number= uint3korr(ptr); ptr+= 3; desc->max_lsn= lsn_korr(ptr); }
O3
c
translog_interpret_file_header: pushq %rbp movq %rsp, %rbp movq 0xc(%rsi), %rax movq %rax, 0x8(%rdi) movl 0x14(%rsi), %eax movq %rax, 0x10(%rdi) movl 0x18(%rsi), %eax movq %rax, 0x18(%rdi) movl 0x1c(%rsi), %eax movq %rax, 0x20(%rdi) movzwl 0x20(%rsi), %eax incq %rax movq %rax, 0x28(%rdi) movzwl 0x22(%rsi), %eax movzbl 0x24(%rsi), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x30(%rdi) movzwl 0x25(%rsi), %eax shlq $0x20, %rax movzbl 0x27(%rsi), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x28(%rsi), %eax orq %rcx, %rax movq %rax, (%rdi) popq %rbp retq
translog_interpret_file_header: push rbp mov rbp, rsp mov rax, [rsi+0Ch] mov [rdi+8], rax mov eax, [rsi+14h] mov [rdi+10h], rax mov eax, [rsi+18h] mov [rdi+18h], rax mov eax, [rsi+1Ch] mov [rdi+20h], rax movzx eax, word ptr [rsi+20h] inc rax mov [rdi+28h], rax movzx eax, word ptr [rsi+22h] movzx ecx, byte ptr [rsi+24h] shl ecx, 10h or rcx, rax mov [rdi+30h], rcx movzx eax, word ptr [rsi+25h] shl rax, 20h movzx ecx, byte ptr [rsi+27h] shl rcx, 30h or rcx, rax mov eax, [rsi+28h] or rax, rcx mov [rdi], rax pop rbp retn
unsigned long long translog_interpret_file_header(unsigned long long *a1, long long a2) { unsigned long long result; // rax a1[1] = *(_QWORD *)(a2 + 12); a1[2] = *(unsigned int *)(a2 + 20); a1[3] = *(unsigned int *)(a2 + 24); a1[4] = *(unsigned int *)(a2 + 28); a1[5] = *(unsigned __int16 *)(a2 + 32) + 1LL; a1[6] = *(unsigned __int16 *)(a2 + 34) | (unsigned long long)(*(unsigned __int8 *)(a2 + 36) << 16); result = ((unsigned long long)*(unsigned __int16 *)(a2 + 37) << 32) | ((unsigned long long)*(unsigned __int8 *)(a2 + 39) << 48) | *(unsigned int *)(a2 + 40); *a1 = result; return result; }
translog_interpret_file_header: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0xc] MOV qword ptr [RDI + 0x8],RAX MOV EAX,dword ptr [RSI + 0x14] MOV qword ptr [RDI + 0x10],RAX MOV EAX,dword ptr [RSI + 0x18] MOV qword ptr [RDI + 0x18],RAX MOV EAX,dword ptr [RSI + 0x1c] MOV qword ptr [RDI + 0x20],RAX MOVZX EAX,word ptr [RSI + 0x20] INC RAX MOV qword ptr [RDI + 0x28],RAX MOVZX EAX,word ptr [RSI + 0x22] MOVZX ECX,byte ptr [RSI + 0x24] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RDI + 0x30],RCX MOVZX EAX,word ptr [RSI + 0x25] SHL RAX,0x20 MOVZX ECX,byte ptr [RSI + 0x27] SHL RCX,0x30 OR RCX,RAX MOV EAX,dword ptr [RSI + 0x28] OR RAX,RCX MOV qword ptr [RDI],RAX POP RBP RET
void translog_interpret_file_header(ulong *param_1,long param_2) { param_1[1] = *(ulong *)(param_2 + 0xc); param_1[2] = (ulong)*(uint *)(param_2 + 0x14); param_1[3] = (ulong)*(uint *)(param_2 + 0x18); param_1[4] = (ulong)*(uint *)(param_2 + 0x1c); param_1[5] = (ulong)*(ushort *)(param_2 + 0x20) + 1; param_1[6] = (ulong)*(uint3 *)(param_2 + 0x22); *param_1 = (ulong)*(uint *)(param_2 + 0x28) | (ulong)*(byte *)(param_2 + 0x27) << 0x30 | (ulong)*(ushort *)(param_2 + 0x25) << 0x20; return; }
39,655
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string append_query_params(const std::string &path, const Params &params) { std::string path_with_query = path; const static std::regex re("[^?]+\\?.*"); auto delm = std::regex_match(path, re) ? '&' : '?'; path_with_query += delm + detail::params_to_query_str(params); return path_with_query; }
O1
c
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq (%rsi), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0xbbf2 movb 0x4004b(%rip), %al # 0x5d9f8 testb %al, %al je 0x1dab8 movq (%r15), %rdi movq 0x8(%r15), %rsi addq %rdi, %rsi xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x40005(%rip), %rcx # 0x5d9d8 xorl %r8d, %r8d callq 0x29342 movl %eax, %ebp movq (%rsp), %rdi testq %rdi, %rdi je 0x1d9f3 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x8580 leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x1e0b7 testb %bpl, %bpl movl $0x26, %eax movl $0x3f, %ecx cmovnel %eax, %ecx leaq 0x20(%rsp), %rdi movl $0x1, %edx xorl %esi, %esi callq 0x8a60 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x1da47 movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) jmp 0x1da4e movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x8150 movq (%rsp), %rdi cmpq %r15, %rdi je 0x1da8d movq 0x10(%rsp), %rsi incq %rsi callq 0x8580 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1daa8 movq 0x30(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x3ff39(%rip), %rdi # 0x5d9f8 callq 0x8990 testl %eax, %eax je 0x1d9b5 leaq 0x3ff05(%rip), %rdi # 0x5d9d8 leaq 0x2656f(%rip), %rsi # 0x44049 movl $0x10, %edx callq 0x1e030 leaq 0x5ad(%rip), %rdi # 0x1e098 leaq 0x3fee6(%rip), %rsi # 0x5d9d8 leaq 0x3fa5f(%rip), %rdx # 0x5d558 callq 0x84c0 leaq 0x3fef3(%rip), %rdi # 0x5d9f8 callq 0x8370 jmp 0x1d9b5 movq %rax, %r14 leaq 0x3fedf(%rip), %rdi # 0x5d9f8 callq 0x8360 jmp 0x1db74 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x1db3e movq 0x10(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x1db3e movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1db74 movq 0x30(%rsp), %rsi incq %rsi jmp 0x1db6f movq %rax, %r14 jmp 0x1db74 movq %rax, %r14 movq (%rsp), %rdi testq %rdi, %rdi je 0x1db74 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x8580 movq (%rbx), %rdi cmpq %r12, %rdi je 0x1db88 movq (%r12), %rsi incq %rsi callq 0x8580 movq %r14, %rdi callq 0x8960
_ZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov rsi, [rsi] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov al, cs:_ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; `guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re test al, al jz loc_1DAB8 loc_1D9B5: mov rdi, [r15] mov rsi, [r15+8] add rsi, rdi xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rcx, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov ebp, eax mov rdi, [rsp+68h+var_68]; void * test rdi, rdi jz short loc_1D9F3 mov rsi, [rsp+68h+var_58] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D9F3: lea rdi, [rsp+68h+var_48] mov rsi, r14 call _ZN7httplib6detail19params_to_query_strERKSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_St4lessIS7_ESaISt4pairIKS7_S7_EEE; httplib::detail::params_to_query_str(std::multimap<std::string,std::string> const&) test bpl, bpl mov eax, 26h ; '&' mov ecx, 3Fh ; '?' cmovnz ecx, eax lea rdi, [rsp+68h+var_48] mov edx, 1 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmmc; std::string::insert(ulong,ulong,char) lea r15, [rsp+68h+var_58] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_1DA47 mov [rsp+68h+var_68], rdx mov rdx, [rcx] mov [rsp+68h+var_58], rdx jmp short loc_1DA4E loc_1DA47: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_1DA4E: mov rdx, [rax+8] mov [rsp+68h+var_60], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [rsp+68h+var_68] mov rdx, [rsp+68h+var_60] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r15 jz short loc_1DA8D mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DA8D: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1DAA8 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DAA8: mov rax, rbx add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1DAB8: lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_1D9B5 lea rdi, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re lea rsi, asc_44049; "[^?]+\\?.*" 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, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_release jmp loc_1D9B5 mov r14, rax lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_1DB74 mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_1DB3E mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1DB3E mov r14, rax loc_1DB3E: lea rax, [rsp+arg_28] mov rdi, [rax-10h] cmp rdi, rax jz short loc_1DB74 mov rsi, [rsp+arg_28] inc rsi jmp short loc_1DB6F mov r14, rax jmp short loc_1DB74 mov r14, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_1DB74 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 loc_1DB6F: call __ZdlPvm; operator delete(void *,ulong) loc_1DB74: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_1DB88 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DB88: mov rdi, r14 call __Unwind_Resume
_QWORD * httplib::append_query_params(_QWORD *a1, long long *a2, int a3) { _BYTE *v5; // rdi long long v6; // rsi int v7; // edx int v8; // ecx char v9; // bp int v10; // r8d int v11; // r9d long long v12; // rcx long long v13; // rax __int128 *v14; // rcx __int128 v16; // [rsp+0h] [rbp-68h] BYREF __int128 v17; // [rsp+10h] [rbp-58h] BYREF void *v18[2]; // [rsp+20h] [rbp-48h] BYREF long long v19; // [rsp+30h] [rbp-38h] BYREF *a1 = a1 + 2; std::string::_M_construct<char *>(a1, (_BYTE *)*a2, *a2 + a2[1]); if ( !(_BYTE)`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], "[^?]+\\?.*", 16LL); __cxa_atexit( std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]); } v5 = (_BYTE *)*a2; v6 = *a2 + a2[1]; v17 = 0LL; v16 = 0LL; v9 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>( v5, v6, &v16, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], 0LL); if ( (_QWORD)v16 ) operator delete((void *)v16, v17 - v16); httplib::detail::params_to_query_str( (unsigned int)v18, a3, v7, v8, v10, v11, v16, *((long long *)&v16 + 1), v17, *((long long *)&v17 + 1)); v12 = 63LL; if ( v9 ) v12 = 38LL; v13 = std::string::insert(v18, 0LL, 1LL, v12); *(_QWORD *)&v16 = &v17; v14 = (__int128 *)(v13 + 16); if ( *(_QWORD *)v13 == v13 + 16 ) { v17 = *v14; } else { *(_QWORD *)&v16 = *(_QWORD *)v13; *(_QWORD *)&v17 = *(_QWORD *)v14; } *((_QWORD *)&v16 + 1) = *(_QWORD *)(v13 + 8); *(_QWORD *)v13 = v14; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; std::string::_M_append(a1, v16, *((_QWORD *)&v16 + 1)); if ( (__int128 *)v16 != &v17 ) operator delete((void *)v16, v17 + 1); if ( v18[0] != &v19 ) operator delete(v18[0], v19 + 1); return a1; }
append_query_params: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV RSI,qword ptr [RSI] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI CALL 0x0010bbf2 MOV AL,byte ptr [0x0015d9f8] TEST AL,AL JZ 0x0011dab8 LAB_0011d9b5: MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] ADD RSI,RDI XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_0011d9cc: LEA RCX,[0x15d9d8] XOR R8D,R8D CALL 0x00129342 MOV EBP,EAX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0011d9f3 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x00108580 LAB_0011d9f3: LEA RDI,[RSP + 0x20] MOV RSI,R14 CALL 0x0011e0b7 TEST BPL,BPL MOV EAX,0x26 MOV ECX,0x3f CMOVNZ ECX,EAX LAB_0011da10: LEA RDI,[RSP + 0x20] MOV EDX,0x1 XOR ESI,ESI CALL 0x00108a60 LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0011da47 MOV qword ptr [RSP],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX JMP 0x0011da4e LAB_0011da47: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_0011da4e: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_0011da6f: MOV RDI,RBX CALL 0x00108150 MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x0011da8d MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00108580 LAB_0011da8d: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011daa8 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00108580 LAB_0011daa8: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011dab8: LEA RDI,[0x15d9f8] CALL 0x00108990 TEST EAX,EAX JZ 0x0011d9b5 LAB_0011dacc: LEA RDI,[0x15d9d8] LEA RSI,[0x144049] MOV EDX,0x10 CALL 0x0011e030 LAB_0011dae4: LEA RDI,[0x11e098] LEA RSI,[0x15d9d8] LEA RDX,[0x15d558] CALL 0x001084c0 LEA RDI,[0x15d9f8] CALL 0x00108370 JMP 0x0011d9b5
/* httplib::append_query_params(std::__cxx11::string const&, std::multimap<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) */ httplib * __thiscall httplib::append_query_params(httplib *this,string *param_1,multimap *param_2) { int iVar1; long *plVar2; long *plVar3; long *local_68; long lStack_60; long local_58; long lStack_50; long *local_48 [2]; long local_38 [2]; *(httplib **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); if ((append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_), iVar1 != 0)) { /* try { // try from 0011dacc to 0011dae3 has its CatchHandler @ 0011db0f */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,"[^?]+\\?.*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_); } local_58 = 0; lStack_50 = 0; local_68 = (long *)0x0; lStack_60 = 0; /* try { // try from 0011d9cc to 0011d9da has its CatchHandler @ 0011db5b */ std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true> (*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1,&local_68, append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,0); if (local_68 != (long *)0x0) { operator_delete(local_68,local_58 - (long)local_68); } /* try { // try from 0011d9f3 to 0011d9ff has its CatchHandler @ 0011db56 */ detail::params_to_query_str((detail *)local_48,param_2); /* try { // try from 0011da10 to 0011da20 has its CatchHandler @ 0011db3b */ plVar2 = (long *)std::__cxx11::string::insert((ulong)local_48,0,'\x01'); plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { local_58 = *plVar3; lStack_50 = plVar2[3]; local_68 = &local_58; } else { local_58 = *plVar3; local_68 = (long *)*plVar2; } lStack_60 = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; /* try { // try from 0011da6f to 0011da76 has its CatchHandler @ 0011db20 */ std::__cxx11::string::_M_append((char *)this,(ulong)local_68); if (local_68 != &local_58) { operator_delete(local_68,local_58 + 1); } if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } return this; }
39,656
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string append_query_params(const std::string &path, const Params &params) { std::string path_with_query = path; const static std::regex re("[^?]+\\?.*"); auto delm = std::regex_match(path, re) ? '&' : '?'; path_with_query += delm + detail::params_to_query_str(params); return path_with_query; }
O2
c
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x87f0 movb 0x4316b(%rip), %al # 0x5ba38 testb %al, %al je 0x1893b leaq 0x43140(%rip), %rsi # 0x5ba18 movq %r15, %rdi xorl %edx, %edx callq 0x18f68 movl %eax, %ebp leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x18fa5 testb %bpl, %bpl pushq $0x26 popq %rax pushq $0x3f popq %rsi cmovnel %eax, %esi leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x18f7f leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x8aa0 leaq 0x28(%rsp), %rdi callq 0x8b18 leaq 0x8(%rsp), %rdi callq 0x8b18 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x430f6(%rip), %rdi # 0x5ba38 callq 0x89f0 testl %eax, %eax je 0x188d1 leaq 0x430c6(%rip), %rdi # 0x5ba18 leaq 0x216a8(%rip), %rsi # 0x3a001 pushq $0x10 popq %rdx callq 0x18ee8 leaq 0x5e6(%rip), %rdi # 0x18f4e leaq 0x430a9(%rip), %rsi # 0x5ba18 leaq 0x42c22(%rip), %rdx # 0x5b598 callq 0x8520 leaq 0x430b6(%rip), %rdi # 0x5ba38 callq 0x83e0 jmp 0x188d1 movq %rax, %r14 leaq 0x430a2(%rip), %rdi # 0x5ba38 callq 0x83d0 jmp 0x189c0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x8b18 jmp 0x189af movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x8b18 jmp 0x189c0 jmp 0x189bd movq %rax, %r14 movq %rbx, %rdi callq 0x8b18 movq %r14, %rdi callq 0x89c0
_ZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rdx mov r15, rsi mov rbx, rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov al, cs:_ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; `guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re test al, al jz short loc_1893B loc_188D1: lea rsi, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re mov rdi, r15 xor edx, edx call _ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov ebp, eax lea rdi, [rsp+68h+var_60] mov rsi, r14 call _ZN7httplib6detail19params_to_query_strERKSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_St4lessIS7_ESaISt4pairIKS7_S7_EEE; httplib::detail::params_to_query_str(std::multimap<std::string,std::string> const&) test bpl, bpl push 26h ; '&' pop rax push 3Fh ; '?' pop rsi cmovnz esi, eax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_OS8_; std::operator+<char>(char,std::string&&) lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_1893B: lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_188D1 lea rdi, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re lea rsi, asc_3A001; "[^?]+\\?.*" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_release jmp loc_188D1 mov r14, rax lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_189C0 mov r14, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_189AF mov r14, rax loc_189AF: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_189C0 jmp short $+2 loc_189BD: mov r14, rax loc_189C0: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long httplib::append_query_params(long long a1, long long a2, int a3) { char v4; // bp int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rsi _BYTE v11[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v12[64]; // [rsp+28h] [rbp-40h] BYREF std::string::basic_string(a1); if ( !(_BYTE)`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], "[^?]+\\?.*", 16LL); __cxa_atexit( std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]); } v4 = std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>( a2, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], 0LL); httplib::detail::params_to_query_str((unsigned int)v11, a3, v5, v6, v7, v8); v9 = 63LL; if ( v4 ) v9 = 38LL; std::operator+<char>(v12, v9, v11); std::string::append(a1); std::string::~string(v12); std::string::~string(v11); return a1; }
append_query_params: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x001087f0 MOV AL,byte ptr [0x0015ba38] TEST AL,AL JZ 0x0011893b LAB_001188d1: LEA RSI,[0x15ba18] MOV RDI,R15 XOR EDX,EDX CALL 0x00118f68 LAB_001188e2: MOV EBP,EAX LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00118fa5 TEST BPL,BPL PUSH 0x26 POP RAX PUSH 0x3f POP RSI CMOVNZ ESI,EAX LAB_001188fd: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00118f7f LAB_0011890c: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00108aa0 LEA RDI,[RSP + 0x28] CALL 0x00108b18 LEA RDI,[RSP + 0x8] CALL 0x00108b18 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0011893b: LEA RDI,[0x15ba38] CALL 0x001089f0 TEST EAX,EAX JZ 0x001188d1 LAB_0011894b: LEA RDI,[0x15ba18] LEA RSI,[0x13a001] PUSH 0x10 POP RDX CALL 0x00118ee8 LAB_00118961: LEA RDI,[0x118f4e] LEA RSI,[0x15ba18] LEA RDX,[0x15b598] CALL 0x00108520 LEA RDI,[0x15ba38] CALL 0x001083e0 JMP 0x001188d1
/* httplib::append_query_params(std::__cxx11::string const&, std::multimap<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) */ httplib * __thiscall httplib::append_query_params(httplib *this,string *param_1,multimap *param_2) { string *psVar1; bool bVar2; int iVar3; detail local_60 [32]; string local_40 [32]; std::__cxx11::string::string((string *)this,param_1); if (append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0011894b to 00118960 has its CatchHandler @ 0011898c */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,"[^?]+\\?.*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_); } } /* try { // try from 001188d1 to 001188e1 has its CatchHandler @ 001189bd */ bVar2 = std:: regex_match<std::char_traits<char>,std::allocator<char>,char,std::__cxx11::regex_traits<char>> (param_1,append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,0); /* try { // try from 001188e2 to 001188f0 has its CatchHandler @ 001189bb */ detail::params_to_query_str(local_60,param_2); psVar1 = (string *)0x3f; if (bVar2) { psVar1 = (string *)0x26; } /* try { // try from 001188fd to 0011890b has its CatchHandler @ 001189ac */ std::operator+((char)local_40,psVar1); /* try { // try from 0011890c to 00118918 has its CatchHandler @ 0011899d */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_40); std::__cxx11::string::~string((string *)local_60); return this; }
39,657
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string append_query_params(const std::string &path, const Params &params) { std::string path_with_query = path; const static std::regex re("[^?]+\\?.*"); auto delm = std::regex_match(path, re) ? '&' : '?'; path_with_query += delm + detail::params_to_query_str(params); return path_with_query; }
O3
c
httplib::append_query_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq (%rsi), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0xb9c0 movb 0x406df(%rip), %al # 0x5d9f8 testb %al, %al je 0x1d41e movq (%r15), %rdi movq 0x8(%r15), %rsi addq %rdi, %rsi xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x40699(%rip), %rcx # 0x5d9d8 xorl %r8d, %r8d callq 0x28d77 movl %eax, %ebp movq (%rsp), %rdi testq %rdi, %rdi je 0x1d35f movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x8580 leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x1da6f testb %bpl, %bpl movl $0x26, %eax movl $0x3f, %ecx cmovnel %eax, %ecx leaq 0x20(%rsp), %rdi movl $0x1, %edx xorl %esi, %esi callq 0x8a60 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x1d3b3 movq %rsi, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) jmp 0x1d3bd movups (%rcx), %xmm0 movups %xmm0, (%r15) movq %r15, %rsi movq 0x8(%rax), %rdx movq %rdx, 0x8(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi callq 0x8150 movq (%rsp), %rdi cmpq %r15, %rdi je 0x1d3f3 movq 0x10(%rsp), %rsi incq %rsi callq 0x8580 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d40e movq 0x30(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x405d3(%rip), %rdi # 0x5d9f8 callq 0x8990 testl %eax, %eax je 0x1d321 leaq 0x4059f(%rip), %rdi # 0x5d9d8 leaq 0x26bc9(%rip), %rsi # 0x44009 movl $0x10, %edx callq 0x1d9e8 leaq 0x5ff(%rip), %rdi # 0x1da50 leaq 0x40580(%rip), %rsi # 0x5d9d8 leaq 0x400f9(%rip), %rdx # 0x5d558 callq 0x84c0 leaq 0x4058d(%rip), %rdi # 0x5d9f8 callq 0x8370 jmp 0x1d321 movq %rax, %r14 leaq 0x40579(%rip), %rdi # 0x5d9f8 callq 0x8360 jmp 0x1d4da movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x1d4a4 movq 0x10(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x1d4a4 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d4da movq 0x30(%rsp), %rsi incq %rsi jmp 0x1d4d5 movq %rax, %r14 jmp 0x1d4da movq %rax, %r14 movq (%rsp), %rdi testq %rdi, %rdi je 0x1d4da movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x8580 movq (%rbx), %rdi cmpq %r12, %rdi je 0x1d4ee movq (%r12), %rsi incq %rsi callq 0x8580 movq %r14, %rdi callq 0x8960
_ZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov rsi, [rsi] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov al, cs:_ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; `guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re test al, al jz loc_1D41E loc_1D321: mov rdi, [r15] mov rsi, [r15+8] add rsi, rdi xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rcx, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov ebp, eax mov rdi, [rsp+68h+var_68]; void * test rdi, rdi jz short loc_1D35F mov rsi, [rsp+68h+var_58] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D35F: lea rdi, [rsp+68h+var_48] mov rsi, r14 call _ZN7httplib6detail19params_to_query_strERKSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_St4lessIS7_ESaISt4pairIKS7_S7_EEE; httplib::detail::params_to_query_str(std::multimap<std::string,std::string> const&) test bpl, bpl mov eax, 26h ; '&' mov ecx, 3Fh ; '?' cmovnz ecx, eax lea rdi, [rsp+68h+var_48] mov edx, 1 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmmc; std::string::insert(ulong,ulong,char) lea r15, [rsp+68h+var_58] mov [r15-10h], r15 mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_1D3B3 mov [rsp+68h+var_68], rsi mov rdx, [rcx] mov [rsp+68h+var_58], rdx jmp short loc_1D3BD loc_1D3B3: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 mov rsi, r15 loc_1D3BD: mov rdx, [rax+8] mov [rsp+68h+var_60], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r15 jz short loc_1D3F3 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D3F3: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1D40E mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D40E: mov rax, rbx add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1D41E: lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_1D321 lea rdi, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re lea rsi, asc_44009; "[^?]+\\?.*" 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, _ZZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_release jmp loc_1D321 mov r14, rax lea rdi, _ZGVZN7httplib19append_query_paramsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8multimapIS5_S5_St4lessIS5_ESaISt4pairIS6_S5_EEEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_1D4DA mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_1D4A4 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1D4A4 mov r14, rax loc_1D4A4: lea rax, [rsp+arg_28] mov rdi, [rax-10h] cmp rdi, rax jz short loc_1D4DA mov rsi, [rsp+arg_28] inc rsi jmp short loc_1D4D5 mov r14, rax jmp short loc_1D4DA mov r14, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_1D4DA mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 loc_1D4D5: call __ZdlPvm; operator delete(void *,ulong) loc_1D4DA: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_1D4EE mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D4EE: mov rdi, r14 call __Unwind_Resume
_QWORD * httplib::append_query_params(_QWORD *a1, long long *a2, int a3) { _BYTE *v5; // rdi long long v6; // rsi int v7; // edx int v8; // ecx char v9; // bp int v10; // r8d int v11; // r9d long long v12; // rcx long long v13; // rax __int128 *v14; // rsi __int128 *v15; // rcx long long v16; // rdx __int128 v18; // [rsp+0h] [rbp-68h] BYREF __int128 v19; // [rsp+10h] [rbp-58h] BYREF void *v20[2]; // [rsp+20h] [rbp-48h] BYREF long long v21; // [rsp+30h] [rbp-38h] BYREF *a1 = a1 + 2; std::string::_M_construct<char *>((long long)a1, (_BYTE *)*a2, *a2 + a2[1]); if ( !(_BYTE)`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], "[^?]+\\?.*", 16LL); __cxa_atexit( std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11]); } v5 = (_BYTE *)*a2; v6 = *a2 + a2[1]; v19 = 0LL; v18 = 0LL; v9 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>( v5, v6, &v18, &httplib::append_query_params(std::string const&,std::multimap<std::string,std::string> const&)::re[abi:cxx11], 0LL); if ( (_QWORD)v18 ) operator delete((void *)v18, v19 - v18); httplib::detail::params_to_query_str( (unsigned int)v20, a3, v7, v8, v10, v11, v18, *((long long *)&v18 + 1), v19, *((long long *)&v19 + 1)); v12 = 63LL; if ( v9 ) v12 = 38LL; v13 = std::string::insert(v20, 0LL, 1LL, v12); *(_QWORD *)&v18 = &v19; v14 = *(__int128 **)v13; v15 = (__int128 *)(v13 + 16); if ( *(_QWORD *)v13 == v13 + 16 ) { v19 = *v15; v14 = &v19; } else { *(_QWORD *)&v18 = *(_QWORD *)v13; *(_QWORD *)&v19 = *(_QWORD *)v15; } *((_QWORD *)&v18 + 1) = *(_QWORD *)(v13 + 8); v16 = *((_QWORD *)&v18 + 1); *(_QWORD *)v13 = v15; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; std::string::_M_append(a1, v14, v16); if ( (__int128 *)v18 != &v19 ) operator delete((void *)v18, v19 + 1); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); return a1; }
append_query_params: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV RSI,qword ptr [RSI] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI CALL 0x0010b9c0 MOV AL,byte ptr [0x0015d9f8] TEST AL,AL JZ 0x0011d41e LAB_0011d321: MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] ADD RSI,RDI XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_0011d338: LEA RCX,[0x15d9d8] XOR R8D,R8D CALL 0x00128d77 MOV EBP,EAX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0011d35f MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x00108580 LAB_0011d35f: LEA RDI,[RSP + 0x20] MOV RSI,R14 CALL 0x0011da6f TEST BPL,BPL MOV EAX,0x26 MOV ECX,0x3f CMOVNZ ECX,EAX LAB_0011d37c: LEA RDI,[RSP + 0x20] MOV EDX,0x1 XOR ESI,ESI CALL 0x00108a60 LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x0011d3b3 MOV qword ptr [RSP],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX JMP 0x0011d3bd LAB_0011d3b3: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 MOV RSI,R15 LAB_0011d3bd: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0011d3d5: MOV RDI,RBX CALL 0x00108150 MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x0011d3f3 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00108580 LAB_0011d3f3: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011d40e MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00108580 LAB_0011d40e: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011d41e: LEA RDI,[0x15d9f8] CALL 0x00108990 TEST EAX,EAX JZ 0x0011d321 LAB_0011d432: LEA RDI,[0x15d9d8] LEA RSI,[0x144009] MOV EDX,0x10 CALL 0x0011d9e8 LAB_0011d44a: LEA RDI,[0x11da50] LEA RSI,[0x15d9d8] LEA RDX,[0x15d558] CALL 0x001084c0 LEA RDI,[0x15d9f8] CALL 0x00108370 JMP 0x0011d321
/* httplib::append_query_params(std::__cxx11::string const&, std::multimap<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) */ httplib * __thiscall httplib::append_query_params(httplib *this,string *param_1,multimap *param_2) { int iVar1; long *plVar2; long *plVar3; long *local_68; long lStack_60; long local_58; long lStack_50; long *local_48 [2]; long local_38 [2]; *(httplib **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); if ((append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_), iVar1 != 0)) { /* try { // try from 0011d432 to 0011d449 has its CatchHandler @ 0011d475 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,"[^?]+\\?.*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_); } local_58 = 0; lStack_50 = 0; local_68 = (long *)0x0; lStack_60 = 0; /* try { // try from 0011d338 to 0011d346 has its CatchHandler @ 0011d4c1 */ std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true> (*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1,&local_68, append_query_params(std::__cxx11::string_const&,std::multimap<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>const&) ::re_abi_cxx11_,0); if (local_68 != (long *)0x0) { operator_delete(local_68,local_58 - (long)local_68); } /* try { // try from 0011d35f to 0011d36b has its CatchHandler @ 0011d4bc */ detail::params_to_query_str((detail *)local_48,param_2); /* try { // try from 0011d37c to 0011d38c has its CatchHandler @ 0011d4a1 */ plVar2 = (long *)std::__cxx11::string::insert((ulong)local_48,0,'\x01'); plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { local_58 = *plVar3; lStack_50 = plVar2[3]; local_68 = &local_58; } else { local_58 = *plVar3; local_68 = (long *)*plVar2; } lStack_60 = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; /* try { // try from 0011d3d5 to 0011d3dc has its CatchHandler @ 0011d486 */ std::__cxx11::string::_M_append((char *)this,(ulong)local_68); if (local_68 != &local_58) { operator_delete(local_68,local_58 + 1); } if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } return this; }
39,658
ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/input.cpp
void MoveCursorColumn(int columns) { while (columns > 0) { if (cursor_position() == (int)content().size() || content()[cursor_position()] == '\n') { return; } columns -= GlyphWidth(content(), cursor_position()); cursor_position() = GlyphNext(content(), cursor_position()); } }
O1
cpp
ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int): testl %esi, %esi jle 0x2c5e8 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x28(%rdi), %r15 addq $0xf8, %r14 movq %r14, %rdi callq 0x2cdc2 movl (%rax), %ebp movq %r15, %rdi callq 0x2c944 cmpl 0x8(%rax), %ebp je 0x2c5da movq %r15, %rdi callq 0x2c944 movq %rax, %r12 movq %r14, %rdi callq 0x2cdc2 movslq (%rax), %rax movq (%r12), %rcx cmpb $0xa, (%rcx,%rax) je 0x2c5da movq %r15, %rdi callq 0x2c944 movq %rax, %r12 movq %r14, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r12, %rdi callq 0x2c481 movq %rax, %r12 movq %r15, %rdi callq 0x2c944 movq %rax, %r13 movq %r14, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r13, %rdi callq 0x3b991 movq %rax, %r13 movq %r14, %rdi callq 0x2cdc2 movl %r13d, (%rax) subl %r12d, %ebx jg 0x2c54d addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5ftxui12_GLOBAL__N_19InputBase16MoveCursorColumnEi: test esi, esi jle locret_2C5E8 push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi lea r15, [rdi+28h] add r14, 0F8h loc_2C54D: mov rdi, r14 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov ebp, [rax] mov rdi, r15 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) cmp ebp, [rax+8] jz short loc_2C5DA mov rdi, r15 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r12, rax mov rdi, r14 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rax, dword ptr [rax] mov rcx, [r12] cmp byte ptr [rcx+rax], 0Ah jz short loc_2C5DA mov rdi, r15 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r12, rax mov rdi, r14 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r12 call _ZN5ftxui12_GLOBAL__N_110GlyphWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::`anonymous namespace'::GlyphWidth(std::string const&,ulong) mov r12, rax mov rdi, r15 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r13, rax mov rdi, r14 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r13 call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong) mov r13, rax mov rdi, r14 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov [rax], r13d sub ebx, r12d jg loc_2C54D loc_2C5DA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_2C5E8: retn
long long ftxui::`anonymous namespace'::InputBase::MoveCursorColumn( ftxui::_anonymous_namespace_::InputBase *this, int a2) { int v2; // ebx char *v3; // r15 char *v4; // r14 int v5; // ebp long long result; // rax _QWORD *v7; // r12 long long v8; // r12 int *v9; // rax long long v10; // r13 int *v11; // rax bool v12; // cc if ( a2 > 0 ) { v2 = a2; v3 = (char *)this + 40; v4 = (char *)this + 248; do { v5 = *(_DWORD *)ftxui::Ref<int>::Address(v4); result = ftxui::Ref<std::string>::Address(v3); if ( v5 == *(_DWORD *)(result + 8) ) break; v7 = (_QWORD *)ftxui::Ref<std::string>::Address(v3); result = *(int *)ftxui::Ref<int>::Address(v4); if ( *(_BYTE *)(*v7 + result) == 10 ) break; v8 = ftxui::Ref<std::string>::Address(v3); v9 = (int *)ftxui::Ref<int>::Address(v4); LODWORD(v8) = ftxui::`anonymous namespace'::GlyphWidth(v8, *v9); v10 = ftxui::Ref<std::string>::Address(v3); v11 = (int *)ftxui::Ref<int>::Address(v4); LODWORD(v10) = ftxui::GlyphNext(v10, *v11); result = ftxui::Ref<int>::Address(v4); *(_DWORD *)result = v10; v12 = v2 <= (int)v8; v2 -= v8; } while ( !v12 ); } return result; }
MoveCursorColumn: TEST ESI,ESI JLE 0x0012c5e8 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA R15,[RDI + 0x28] ADD R14,0xf8 LAB_0012c54d: MOV RDI,R14 CALL 0x0012cdc2 MOV EBP,dword ptr [RAX] MOV RDI,R15 CALL 0x0012c944 CMP EBP,dword ptr [RAX + 0x8] JZ 0x0012c5da MOV RDI,R15 CALL 0x0012c944 MOV R12,RAX MOV RDI,R14 CALL 0x0012cdc2 MOVSXD RAX,dword ptr [RAX] MOV RCX,qword ptr [R12] CMP byte ptr [RCX + RAX*0x1],0xa JZ 0x0012c5da MOV RDI,R15 CALL 0x0012c944 MOV R12,RAX MOV RDI,R14 CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R12 CALL 0x0012c481 MOV R12,RAX MOV RDI,R15 CALL 0x0012c944 MOV R13,RAX MOV RDI,R14 CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R13 CALL 0x0013b991 MOV R13,RAX MOV RDI,R14 CALL 0x0012cdc2 MOV dword ptr [RAX],R13D SUB EBX,R12D JG 0x0012c54d LAB_0012c5da: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0012c5e8: RET
/* ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int) */ void __thiscall ftxui::(anonymous_namespace)::InputBase::MoveCursorColumn(InputBase *this,int param_1) { Ref<std::__cxx11::string> *this_00; bool bVar1; int iVar2; int4 uVar3; int *piVar4; long lVar5; long *plVar6; string *psVar7; int4 *puVar8; int iVar9; Ref<int> *this_01; if (0 < param_1) { this_00 = (Ref<std::__cxx11::string> *)(this + 0x28); this_01 = (Ref<int> *)(this + 0xf8); do { piVar4 = (int *)Ref<int>::Address(this_01); iVar2 = *piVar4; lVar5 = Ref<std::__cxx11::string>::Address(this_00); if (iVar2 == *(int *)(lVar5 + 8)) { return; } plVar6 = (long *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); if (*(char *)(*plVar6 + (long)*piVar4) == '\n') { return; } psVar7 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); iVar2 = GlyphWidth(psVar7,(long)*piVar4); psVar7 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); uVar3 = GlyphNext(psVar7,(long)*piVar4); puVar8 = (int4 *)Ref<int>::Address(this_01); *puVar8 = uVar3; iVar9 = param_1 - iVar2; bVar1 = iVar2 <= param_1; param_1 = iVar9; } while (iVar9 != 0 && bVar1); } return; }
39,659
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
7CodeWizard[P]stablediffusion/vae.hpp
void map_by_name(std::map<std::string, struct ggml_tensor*>& tensors, const std::string prefix) { tensors[prefix + "norm.weight"] = norm_w; tensors[prefix + "norm.bias"] = norm_b; tensors[prefix + "q.weight"] = q_w; tensors[prefix + "q.bias"] = q_b; tensors[prefix + "k.weight"] = k_w; tensors[prefix + "k.bias"] = k_b; tensors[prefix + "v.weight"] = v_w; tensors[prefix + "v.bias"] = v_b; tensors[prefix + "proj_out.weight"] = proj_out_w; tensors[prefix + "proj_out.bias"] = proj_out_b; }
O0
cpp
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): subq $0x2c8, %rsp # imm = 0x2C8 movq %rdx, 0x128(%rsp) movq %rsi, %rax movq 0x128(%rsp), %rsi movq %rsi, 0x130(%rsp) movq %rdi, 0x2c0(%rsp) movq %rax, 0x2b8(%rsp) movq %rsi, 0x2b0(%rsp) movq 0x2c0(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x8(%rax), %rax movq %rax, 0x140(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x148(%rsp) leaq 0x11fe88(%rip), %rdx # 0x1832b5 leaq 0x290(%rsp), %rdi movq %rdi, 0x150(%rsp) callq 0x303b0 movq 0x148(%rsp), %rdi movq 0x150(%rsp), %rsi callq 0x55460 movq %rax, 0x158(%rsp) jmp 0x63461 movq 0x158(%rsp), %rax movq 0x140(%rsp), %rcx movq %rcx, (%rax) leaq 0x290(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x10(%rax), %rax movq %rax, 0x108(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x110(%rsp) leaq 0x11fdbe(%rip), %rdx # 0x183272 leaq 0x260(%rsp), %rdi movq %rdi, 0x118(%rsp) callq 0x303b0 movq 0x110(%rsp), %rdi movq 0x118(%rsp), %rsi callq 0x55460 movq %rax, 0x120(%rsp) jmp 0x634e8 movq 0x120(%rsp), %rax movq 0x108(%rsp), %rcx movq %rcx, (%rax) leaq 0x260(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x18(%rax), %rax movq %rax, 0xe8(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0xf0(%rsp) leaq 0x1200ab(%rip), %rdx # 0x1835e6 leaq 0x240(%rsp), %rdi movq %rdi, 0xf8(%rsp) callq 0x303b0 movq 0xf0(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x55460 movq %rax, 0x100(%rsp) jmp 0x6356f movq 0x100(%rsp), %rax movq 0xe8(%rsp), %rcx movq %rcx, (%rax) leaq 0x240(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x20(%rax), %rax movq %rax, 0xc8(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0xd0(%rsp) leaq 0x11ffc7(%rip), %rdx # 0x183589 leaq 0x220(%rsp), %rdi movq %rdi, 0xd8(%rsp) callq 0x303b0 movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x55460 movq %rax, 0xe0(%rsp) jmp 0x635f6 movq 0xe0(%rsp), %rax movq 0xc8(%rsp), %rcx movq %rcx, (%rax) leaq 0x220(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x28(%rax), %rax movq %rax, 0xa8(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0xb0(%rsp) leaq 0x11fe13(%rip), %rdx # 0x18345c leaq 0x200(%rsp), %rdi movq %rdi, 0xb8(%rsp) callq 0x303b0 movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x55460 movq %rax, 0xc0(%rsp) jmp 0x6367d movq 0xc0(%rsp), %rax movq 0xa8(%rsp), %rcx movq %rcx, (%rax) leaq 0x200(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x30(%rax), %rax movq %rax, 0x88(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x90(%rsp) leaq 0x11fd2f(%rip), %rdx # 0x1833ff leaq 0x1e0(%rsp), %rdi movq %rdi, 0x98(%rsp) callq 0x303b0 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x55460 movq %rax, 0xa0(%rsp) jmp 0x63704 movq 0xa0(%rsp), %rax movq 0x88(%rsp), %rcx movq %rcx, (%rax) leaq 0x1e0(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x38(%rax), %rax movq %rax, 0x68(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x70(%rsp) leaq 0x11ff4f(%rip), %rdx # 0x1836a0 leaq 0x1c0(%rsp), %rdi movq %rdi, 0x78(%rsp) callq 0x303b0 movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x55460 movq %rax, 0x80(%rsp) jmp 0x6377c movq 0x80(%rsp), %rax movq 0x68(%rsp), %rcx movq %rcx, (%rax) leaq 0x1c0(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x40(%rax), %rax movq %rax, 0x48(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x11fe7d(%rip), %rdx # 0x183643 leaq 0x1a0(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0x303b0 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x55460 movq %rax, 0x60(%rsp) jmp 0x637ee movq 0x60(%rsp), %rax movq 0x48(%rsp), %rcx movq %rcx, (%rax) leaq 0x1a0(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x48(%rax), %rax movq %rax, 0x28(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0x11fcf0(%rip), %rdx # 0x183525 leaq 0x180(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x303b0 movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x55460 movq %rax, 0x40(%rsp) jmp 0x6385d movq 0x40(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, (%rax) leaq 0x180(%rsp), %rdi callq 0xbf00 movq 0x138(%rsp), %rax movq 0x130(%rsp), %rsi movq 0x50(%rax), %rax movq %rax, 0x8(%rsp) movq 0x2b8(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x11fc19(%rip), %rdx # 0x1834bd leaq 0x160(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x303b0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x55460 movq %rax, 0x20(%rsp) jmp 0x638cc movq 0x20(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, (%rax) leaq 0x160(%rsp), %rdi callq 0xbf00 addq $0x2c8, %rsp # imm = 0x2C8 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x290(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x260(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x240(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x220(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x200(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x1e0(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x1c0(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x1a0(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x180(%rsp), %rdi callq 0xbf00 jmp 0x63a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x288(%rsp) movl %eax, 0x284(%rsp) leaq 0x160(%rsp), %rdi callq 0xbf00 movq 0x288(%rsp), %rdi callq 0xbd30 nopl (%rax)
_ZN9AttnBlock11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEES6_: sub rsp, 2C8h mov qword ptr [rsp+2C8h+var_1A0], rdx mov rax, rsi mov rsi, qword ptr [rsp+2C8h+var_1A0]; int mov qword ptr [rsp+2C8h+var_198], rsi mov [rsp+2C8h+var_8], rdi mov qword ptr [rsp+2C8h+var_10], rax mov [rsp+2C8h+var_18], rsi mov rax, [rsp+2C8h+var_8] mov [rsp+2C8h+var_190], rax mov rax, [rax+8] mov [rsp+2C8h+var_188], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_180], rax lea rdx, aTransformerTex_0+23h; int lea rdi, [rsp+2C8h+var_38]; int mov [rsp+2C8h+var_178], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_180] mov rsi, [rsp+2C8h+var_178] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_170], rax jmp short $+2 loc_63461: mov rax, [rsp+2C8h+var_170] mov rcx, [rsp+2C8h+var_188] mov [rax], rcx lea rdi, [rsp+2C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+10h] mov [rsp+2C8h+var_1C0], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_1B8], rax lea rdx, aTransformerTex+23h; int lea rdi, [rsp+2C8h+var_68]; int mov [rsp+2C8h+var_1B0], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_1B8] mov rsi, [rsp+2C8h+var_1B0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_1A8], rax jmp short $+2 loc_634E8: mov rax, [rsp+2C8h+var_1A8] mov rcx, [rsp+2C8h+var_1C0] mov [rax], rcx lea rdi, [rsp+2C8h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+18h] mov [rsp+2C8h+var_1E0], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_1D8], rax lea rdx, aFirstStageMode_10+25h; int lea rdi, [rsp+2C8h+var_88]; int mov [rsp+2C8h+var_1D0], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_1D8] mov rsi, [rsp+2C8h+var_1D0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_1C8], rax jmp short $+2 loc_6356F: mov rax, [rsp+2C8h+var_1C8] mov rcx, [rsp+2C8h+var_1E0] mov [rax], rcx lea rdi, [rsp+2C8h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+20h] mov [rsp+2C8h+var_200], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_1F8], rax lea rdx, aFirstStageMode_8+25h; int lea rdi, [rsp+2C8h+var_A8]; int mov [rsp+2C8h+var_1F0], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_1F8] mov rsi, [rsp+2C8h+var_1F0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_1E8], rax jmp short $+2 loc_635F6: mov rax, [rsp+2C8h+var_1E8] mov rcx, [rsp+2C8h+var_200] mov [rax], rcx lea rdi, [rsp+2C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+28h] mov [rsp+2C8h+var_220], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_218], rax lea rdx, aFirstStageMode_2+25h; int lea rdi, [rsp+2C8h+var_C8]; int mov [rsp+2C8h+var_210], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_218] mov rsi, [rsp+2C8h+var_210] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_208], rax jmp short $+2 loc_6367D: mov rax, [rsp+2C8h+var_208] mov rcx, [rsp+2C8h+var_220] mov [rax], rcx lea rdi, [rsp+2C8h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+30h] mov [rsp+2C8h+var_240], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_238], rax lea rdx, aFirstStageMode_0+25h; int lea rdi, [rsp+2C8h+var_E8]; int mov [rsp+2C8h+var_230], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_238] mov rsi, [rsp+2C8h+var_230] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_228], rax jmp short $+2 loc_63704: mov rax, [rsp+2C8h+var_228] mov rcx, [rsp+2C8h+var_240] mov [rax], rcx lea rdi, [rsp+2C8h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+38h] mov [rsp+2C8h+var_260], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_258], rax lea rdx, aFirstStageMode_14+25h; int lea rdi, [rsp+2C8h+var_108]; int mov [rsp+2C8h+var_250], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_258] mov rsi, [rsp+2C8h+var_250] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_248], rax jmp short $+2 loc_6377C: mov rax, [rsp+2C8h+var_248] mov rcx, [rsp+2C8h+var_260] mov [rax], rcx lea rdi, [rsp+2C8h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+40h] mov [rsp+2C8h+var_280], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_278], rax lea rdx, aFirstStageMode_12+25h; int lea rdi, [rsp+2C8h+var_128]; int mov [rsp+2C8h+var_270], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_278] mov rsi, [rsp+2C8h+var_270] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_268], rax jmp short $+2 loc_637EE: mov rax, [rsp+2C8h+var_268] mov rcx, [rsp+2C8h+var_280] mov [rax], rcx lea rdi, [rsp+2C8h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+48h] mov [rsp+2C8h+var_2A0], rax mov rax, qword ptr [rsp+2C8h+var_10] mov [rsp+2C8h+var_298], rax lea rdx, aFirstStageMode_6+25h; int lea rdi, [rsp+2C8h+var_148]; int mov [rsp+2C8h+var_290], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+2C8h+var_298] mov rsi, [rsp+2C8h+var_290] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_288], rax jmp short $+2 loc_6385D: mov rax, [rsp+2C8h+var_288] mov rcx, [rsp+2C8h+var_2A0] mov [rax], rcx lea rdi, [rsp+2C8h+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+2C8h+var_190] mov rsi, qword ptr [rsp+2C8h+var_198]; int mov rax, [rax+50h] mov [rsp+2C8h+var_2C0], rax; void * mov rax, qword ptr [rsp+2C8h+var_10] mov qword ptr [rsp+2C8h+var_2B8], rax; int lea rdx, aFirstStageMode_4+25h; int lea rdi, [rsp+2C8h+var_168]; int mov [rsp+2C8h+var_2B0], rdi; __int64 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, qword ptr [rsp+2C8h+var_2B8] mov rsi, [rsp+2C8h+var_2B0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+2C8h+var_2A8], rax jmp short $+2 loc_638CC: mov rax, [rsp+2C8h+var_2A8] mov rcx, [rsp+2C8h+var_2C0] mov [rax], rcx lea rdi, [rsp+2C8h+var_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 2C8h retn mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_288]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_258]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_218]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_1F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_1D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_198]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_178]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_63A5C mov rcx, rax mov eax, edx mov [rsp+arg_280], rcx mov [rsp+arg_27C], eax lea rdi, [rsp+arg_158]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_63A5C: mov rdi, [rsp+arg_280] call __Unwind_Resume
void AttnBlock::map_by_name(_QWORD *a1, long long a2, long long a3) { void *v3; // [rsp+8h] [rbp-2C0h] long long v4; // [rsp+10h] [rbp-2B8h] long long v5; // [rsp+28h] [rbp-2A0h] long long v6; // [rsp+30h] [rbp-298h] long long v7; // [rsp+48h] [rbp-280h] long long v8; // [rsp+50h] [rbp-278h] long long v9; // [rsp+68h] [rbp-260h] long long v10; // [rsp+70h] [rbp-258h] long long v11; // [rsp+88h] [rbp-240h] long long v12; // [rsp+90h] [rbp-238h] long long v13; // [rsp+A8h] [rbp-220h] long long v14; // [rsp+B0h] [rbp-218h] long long v15; // [rsp+C8h] [rbp-200h] long long v16; // [rsp+D0h] [rbp-1F8h] long long v17; // [rsp+E8h] [rbp-1E0h] long long v18; // [rsp+F0h] [rbp-1D8h] long long v19; // [rsp+108h] [rbp-1C0h] long long v20; // [rsp+110h] [rbp-1B8h] long long v22; // [rsp+140h] [rbp-188h] long long v23[4]; // [rsp+160h] [rbp-168h] BYREF int v24[8]; // [rsp+180h] [rbp-148h] BYREF int v25[8]; // [rsp+1A0h] [rbp-128h] BYREF int v26[8]; // [rsp+1C0h] [rbp-108h] BYREF int v27[8]; // [rsp+1E0h] [rbp-E8h] BYREF int v28[8]; // [rsp+200h] [rbp-C8h] BYREF int v29[8]; // [rsp+220h] [rbp-A8h] BYREF int v30[8]; // [rsp+240h] [rbp-88h] BYREF int v31[12]; // [rsp+260h] [rbp-68h] BYREF int v32[8]; // [rsp+290h] [rbp-38h] BYREF long long v33; // [rsp+2B0h] [rbp-18h] int v34[2]; // [rsp+2B8h] [rbp-10h] _QWORD *v35; // [rsp+2C0h] [rbp-8h] v35 = a1; *(_QWORD *)v34 = a2; v33 = a3; v22 = a1[1]; std::operator+<char>((long long)v32, a3, (long long)"norm.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v32) = v22; std::string::~string(v32); v19 = a1[2]; v20 = *(_QWORD *)v34; std::operator+<char>((long long)v31, a3, (long long)"norm.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v20, (long long)v31) = v19; std::string::~string(v31); v17 = a1[3]; v18 = *(_QWORD *)v34; std::operator+<char>((long long)v30, a3, (long long)"q.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v18, (long long)v30) = v17; std::string::~string(v30); v15 = a1[4]; v16 = *(_QWORD *)v34; std::operator+<char>((long long)v29, a3, (long long)"q.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v16, (long long)v29) = v15; std::string::~string(v29); v13 = a1[5]; v14 = *(_QWORD *)v34; std::operator+<char>((long long)v28, a3, (long long)"k.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v14, (long long)v28) = v13; std::string::~string(v28); v11 = a1[6]; v12 = *(_QWORD *)v34; std::operator+<char>((long long)v27, a3, (long long)"k.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v12, (long long)v27) = v11; std::string::~string(v27); v9 = a1[7]; v10 = *(_QWORD *)v34; std::operator+<char>((long long)v26, a3, (long long)"v.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v10, (long long)v26) = v9; std::string::~string(v26); v7 = a1[8]; v8 = *(_QWORD *)v34; std::operator+<char>((long long)v25, a3, (long long)"v.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v8, (long long)v25) = v7; std::string::~string(v25); v5 = a1[9]; v6 = *(_QWORD *)v34; std::operator+<char>((long long)v24, a3, (long long)"proj_out.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v6, (long long)v24) = v5; std::string::~string(v24); v3 = (void *)a1[10]; v4 = *(_QWORD *)v34; std::operator+<char>((long long)v23, a3, (long long)"proj_out.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v4, (long long)v23) = v3; std::string::~string(v23); }
map_by_name: SUB RSP,0x2c8 MOV qword ptr [RSP + 0x128],RDX MOV RAX,RSI MOV RSI,qword ptr [RSP + 0x128] MOV qword ptr [RSP + 0x130],RSI MOV qword ptr [RSP + 0x2c0],RDI MOV qword ptr [RSP + 0x2b8],RAX MOV qword ptr [RSP + 0x2b0],RSI MOV RAX,qword ptr [RSP + 0x2c0] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x140],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x148],RAX LEA RDX,[0x2832b5] LEA RDI,[RSP + 0x290] MOV qword ptr [RSP + 0x150],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x148] MOV RSI,qword ptr [RSP + 0x150] LAB_00163452: CALL 0x00155460 LAB_00163457: MOV qword ptr [RSP + 0x158],RAX JMP 0x00163461 LAB_00163461: MOV RAX,qword ptr [RSP + 0x158] MOV RCX,qword ptr [RSP + 0x140] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x290] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x110],RAX LEA RDX,[0x283272] LEA RDI,[RSP + 0x260] MOV qword ptr [RSP + 0x118],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x110] MOV RSI,qword ptr [RSP + 0x118] LAB_001634d9: CALL 0x00155460 LAB_001634de: MOV qword ptr [RSP + 0x120],RAX JMP 0x001634e8 LAB_001634e8: MOV RAX,qword ptr [RSP + 0x120] MOV RCX,qword ptr [RSP + 0x108] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x260] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0xf0],RAX LEA RDX,[0x2835e6] LEA RDI,[RSP + 0x240] MOV qword ptr [RSP + 0xf8],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xf8] LAB_00163560: CALL 0x00155460 LAB_00163565: MOV qword ptr [RSP + 0x100],RAX JMP 0x0016356f LAB_0016356f: MOV RAX,qword ptr [RSP + 0x100] MOV RCX,qword ptr [RSP + 0xe8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x240] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0xd0],RAX LEA RDX,[0x283589] LEA RDI,[RSP + 0x220] MOV qword ptr [RSP + 0xd8],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] LAB_001635e7: CALL 0x00155460 LAB_001635ec: MOV qword ptr [RSP + 0xe0],RAX JMP 0x001635f6 LAB_001635f6: MOV RAX,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0xc8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x220] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0xb0],RAX LEA RDX,[0x28345c] LEA RDI,[RSP + 0x200] MOV qword ptr [RSP + 0xb8],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] LAB_0016366e: CALL 0x00155460 LAB_00163673: MOV qword ptr [RSP + 0xc0],RAX JMP 0x0016367d LAB_0016367d: MOV RAX,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x200] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x90],RAX LEA RDX,[0x2833ff] LEA RDI,[RSP + 0x1e0] MOV qword ptr [RSP + 0x98],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] LAB_001636f5: CALL 0x00155460 LAB_001636fa: MOV qword ptr [RSP + 0xa0],RAX JMP 0x00163704 LAB_00163704: MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0x88] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x1e0] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x70],RAX LEA RDX,[0x2836a0] LEA RDI,[RSP + 0x1c0] MOV qword ptr [RSP + 0x78],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] LAB_0016376d: CALL 0x00155460 LAB_00163772: MOV qword ptr [RSP + 0x80],RAX JMP 0x0016377c LAB_0016377c: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x68] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x1c0] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x50],RAX LEA RDX,[0x283643] LEA RDI,[RSP + 0x1a0] MOV qword ptr [RSP + 0x58],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] LAB_001637e2: CALL 0x00155460 LAB_001637e7: MOV qword ptr [RSP + 0x60],RAX JMP 0x001637ee LAB_001637ee: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x1a0] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x30],RAX LEA RDX,[0x283525] LEA RDI,[RSP + 0x180] MOV qword ptr [RSP + 0x38],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] LAB_00163851: CALL 0x00155460 LAB_00163856: MOV qword ptr [RSP + 0x40],RAX JMP 0x0016385d LAB_0016385d: MOV RAX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x180] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x138] MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x2b8] MOV qword ptr [RSP + 0x10],RAX LEA RDX,[0x2834bd] LEA RDI,[RSP + 0x160] MOV qword ptr [RSP + 0x18],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_001638c0: CALL 0x00155460 LAB_001638c5: MOV qword ptr [RSP + 0x20],RAX JMP 0x001638cc LAB_001638cc: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x160] CALL 0x0010bf00 ADD RSP,0x2c8 RET
/* AttnBlock::map_by_name(std::map<std::__cxx11::string, ggml_tensor*, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, ggml_tensor*> > >&, std::__cxx11::string) */ void __thiscall AttnBlock::map_by_name (AttnBlock *this, map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *param_1,char *param_3) { int8 uVar1; map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *pmVar2; int8 *puVar3; string local_168 [32]; string local_148 [32]; string local_128 [32]; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; string local_68 [48]; string local_38 [32]; char *local_18; map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *local_10; AttnBlock *local_8; uVar1 = *(int8 *)(this + 8); local_18 = param_3; local_10 = param_1; local_8 = this; std::operator+(local_38,param_3); /* try { // try from 00163452 to 00163456 has its CatchHandler @ 001638ee */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](param_1,local_38); *puVar3 = uVar1; std::__cxx11::string::~string(local_38); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x10); std::operator+(local_68,param_3); /* try { // try from 001634d9 to 001634dd has its CatchHandler @ 00163914 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_68); *puVar3 = uVar1; std::__cxx11::string::~string(local_68); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x18); std::operator+(local_88,param_3); /* try { // try from 00163560 to 00163564 has its CatchHandler @ 0016393a */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_88); *puVar3 = uVar1; std::__cxx11::string::~string(local_88); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x20); std::operator+(local_a8,param_3); /* try { // try from 001635e7 to 001635eb has its CatchHandler @ 00163960 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_a8); *puVar3 = uVar1; std::__cxx11::string::~string(local_a8); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x28); std::operator+(local_c8,param_3); /* try { // try from 0016366e to 00163672 has its CatchHandler @ 00163986 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_c8); *puVar3 = uVar1; std::__cxx11::string::~string(local_c8); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x30); std::operator+(local_e8,param_3); /* try { // try from 001636f5 to 001636f9 has its CatchHandler @ 001639ac */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_e8); *puVar3 = uVar1; std::__cxx11::string::~string(local_e8); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x38); std::operator+(local_108,param_3); /* try { // try from 0016376d to 00163771 has its CatchHandler @ 001639d2 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_108); *puVar3 = uVar1; std::__cxx11::string::~string(local_108); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x40); std::operator+(local_128,param_3); /* try { // try from 001637e2 to 001637e6 has its CatchHandler @ 001639f5 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_128); *puVar3 = uVar1; std::__cxx11::string::~string(local_128); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x48); std::operator+(local_148,param_3); /* try { // try from 00163851 to 00163855 has its CatchHandler @ 00163a18 */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_148); *puVar3 = uVar1; std::__cxx11::string::~string(local_148); pmVar2 = local_10; uVar1 = *(int8 *)(this + 0x50); std::operator+(local_168,param_3); /* try { // try from 001638c0 to 001638c4 has its CatchHandler @ 00163a3b */ puVar3 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](pmVar2,local_168); *puVar3 = uVar1; std::__cxx11::string::~string(local_168); return; }
39,660
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
7CodeWizard[P]stablediffusion/vae.hpp
void map_by_name(std::map<std::string, struct ggml_tensor*>& tensors, const std::string prefix) { tensors[prefix + "norm.weight"] = norm_w; tensors[prefix + "norm.bias"] = norm_b; tensors[prefix + "q.weight"] = q_w; tensors[prefix + "q.bias"] = q_b; tensors[prefix + "k.weight"] = k_w; tensors[prefix + "k.bias"] = k_b; tensors[prefix + "v.weight"] = v_w; tensors[prefix + "v.bias"] = v_b; tensors[prefix + "proj_out.weight"] = proj_out_w; tensors[prefix + "proj_out.bias"] = proj_out_b; }
O1
cpp
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, 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 $0x28, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq 0x8(%rdi), %rbp leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x2f990 leaq 0x7a5ab(%rip), %rsi # 0xc1225 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46ca9 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x10(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a513(%rip), %rsi # 0xc11e2 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46cfe movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x18(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a832(%rip), %rsi # 0xc1556 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46d53 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x20(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a780(%rip), %rsi # 0xc14f9 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46da8 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x28(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a5fe(%rip), %rsi # 0xc13cc movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46dfd movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x30(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a54c(%rip), %rsi # 0xc136f movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46e52 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x38(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a798(%rip), %rsi # 0xc1610 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46ea7 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x40(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a6e6(%rip), %rsi # 0xc15b3 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46efc movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x48(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2f990 leaq 0x7a573(%rip), %rsi # 0xc1495 movq %r12, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46f51 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x50(%r15), %r12 leaq 0x8(%rsp), %r15 movq %r13, (%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r15, %rdi callq 0x2f990 leaq 0x7a4b7(%rip), %rsi # 0xc142d movq %r15, %rdi callq 0xabf0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3fe0e movq %r12, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46fa5 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda jmp 0x46fda movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46ff4 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 movq %rbx, %rdi callq 0xaae0
_ZN9AttnBlock11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdx mov rbx, rsi mov r15, rdi mov rbp, [rdi+8] lea r13, [rsp+58h+var_40] mov [r13-10h], r13 mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi lea r12, [rsp+58h+var_50] mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aTransformerTex_0+23h; "norm.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46CA9 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46CA9: mov rbp, [r15+10h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aTransformerTex+23h; "norm.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46CFE mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46CFE: mov rbp, [r15+18h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_10+25h; "q.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46D53 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46D53: mov rbp, [r15+20h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_8+25h; "q.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46DA8 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46DA8: mov rbp, [r15+28h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_2+25h; "k.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46DFD mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46DFD: mov rbp, [r15+30h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_0+25h; "k.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46E52 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46E52: mov rbp, [r15+38h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_14+25h; "v.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46EA7 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46EA7: mov rbp, [r15+40h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_12+25h; "v.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46EFC mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46EFC: mov rbp, [r15+48h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_6+25h; "proj_out.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46F51 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46F51: mov r12, [r15+50h] lea r15, [rsp+58h+var_50] mov [r15], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_4+25h; "proj_out.bias" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], r12 mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46FA5 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46FA5: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short loc_46FDA jmp short $+2 loc_46FDA: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_46FF4 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46FF4: mov rdi, rbx call __Unwind_Resume
void AttnBlock::map_by_name(_QWORD *a1, long long a2, _BYTE **a3) { long long v4; // rbp long long v5; // rbp long long v6; // rbp long long v7; // rbp long long v8; // rbp long long v9; // rbp long long v10; // rbp long long v11; // rbp long long v12; // rbp long long v13; // r12 void *v14[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF v4 = a1[1]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "norm.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v4; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v5 = a1[2]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "norm.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v5; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v6 = a1[3]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "q.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v6; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v7 = a1[4]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "q.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v7; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v8 = a1[5]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "k.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v8; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v9 = a1[6]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "k.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v9; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v10 = a1[7]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "v.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v10; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v11 = a1[8]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "v.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v11; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v12 = a1[9]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "proj_out.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v12; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v13 = a1[10]; v14[0] = v15; std::string::_M_construct<char *>(v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "proj_out.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v13; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); }
39,661
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
7CodeWizard[P]stablediffusion/vae.hpp
void map_by_name(std::map<std::string, struct ggml_tensor*>& tensors, const std::string prefix) { tensors[prefix + "norm.weight"] = norm_w; tensors[prefix + "norm.bias"] = norm_b; tensors[prefix + "q.weight"] = q_w; tensors[prefix + "q.bias"] = q_b; tensors[prefix + "k.weight"] = k_w; tensors[prefix + "k.bias"] = k_b; tensors[prefix + "v.weight"] = v_w; tensors[prefix + "v.bias"] = v_b; tensors[prefix + "proj_out.weight"] = proj_out_w; tensors[prefix + "proj_out.bias"] = proj_out_b; }
O3
cpp
AttnBlock::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, 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 $0x28, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq 0x8(%rdi), %rbp leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x2ebc4 leaq 0x7a057(%rip), %rsi # 0xc0235 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x4620d movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x10(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x79fbf(%rip), %rsi # 0xc01f2 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46262 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x18(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a2de(%rip), %rsi # 0xc0566 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x462b7 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x20(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a22c(%rip), %rsi # 0xc0509 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x4630c movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x28(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a0aa(%rip), %rsi # 0xc03dc movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46361 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x30(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x79ff8(%rip), %rsi # 0xc037f movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x463b6 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x38(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a244(%rip), %rsi # 0xc0620 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x4640b movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x40(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a192(%rip), %rsi # 0xc05c3 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46460 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x48(%r15), %rbp leaq 0x8(%rsp), %r12 movq %r13, (%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2ebc4 leaq 0x7a01f(%rip), %rsi # 0xc04a5 movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x464b5 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x50(%r15), %r12 leaq 0x8(%rsp), %r15 movq %r13, (%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r15, %rdi callq 0x2ebc4 leaq 0x79f63(%rip), %rsi # 0xc043d movq %r15, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %r12, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46509 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e jmp 0x4653e movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x46558 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq %rbx, %rdi callq 0xaad0
_ZN9AttnBlock11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdx mov rbx, rsi mov r15, rdi mov rbp, [rdi+8] lea r13, [rsp+58h+var_40] mov [r13-10h], r13 mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi lea r12, [rsp+58h+var_50] mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aTransformerTex_0+23h; "norm.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_4620D mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4620D: mov rbp, [r15+10h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aTransformerTex+23h; "norm.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46262 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46262: mov rbp, [r15+18h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_10+25h; "q.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_462B7 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_462B7: mov rbp, [r15+20h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_8+25h; "q.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_4630C mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4630C: mov rbp, [r15+28h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_2+25h; "k.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46361 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46361: mov rbp, [r15+30h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_0+25h; "k.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_463B6 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_463B6: mov rbp, [r15+38h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_14+25h; "v.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_4640B mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4640B: mov rbp, [r15+40h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_12+25h; "v.bias" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46460 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46460: mov rbp, [r15+48h] lea r12, [rsp+58h+var_50] mov [r12], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_6+25h; "proj_out.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_464B5 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_464B5: mov r12, [r15+50h] lea r15, [rsp+58h+var_50] mov [r15], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aFirstStageMode_4+25h; "proj_out.bias" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], r12 mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_46509 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46509: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short loc_4653E jmp short $+2 loc_4653E: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_46558 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46558: mov rdi, rbx call __Unwind_Resume
void AttnBlock::map_by_name(_QWORD *a1, long long a2, _BYTE **a3) { long long v4; // rbp long long v5; // rbp long long v6; // rbp long long v7; // rbp long long v8; // rbp long long v9; // rbp long long v10; // rbp long long v11; // rbp long long v12; // rbp long long v13; // r12 void *v14[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF v4 = a1[1]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "norm.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v4; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v5 = a1[2]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "norm.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v5; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v6 = a1[3]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "q.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v6; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v7 = a1[4]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "q.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v7; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v8 = a1[5]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "k.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v8; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v9 = a1[6]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "k.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v9; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v10 = a1[7]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "v.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v10; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v11 = a1[8]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "v.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v11; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v12 = a1[9]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "proj_out.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v12; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); v13 = a1[10]; v14[0] = v15; std::string::_M_construct<char *>((long long)v14, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v14, "proj_out.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v14) = v13; if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); }
39,662
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O3
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x936f2 testb %al, %al je 0x9ce22 movq %r12, %rdi movq %r14, %rsi callq 0x934e0 movq %rbx, %rdi movq %rax, %rsi callq 0x8db2c jmp 0x9ce75 movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x9ce39 movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x9ce75 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x58a58 movq %r14, %rdi movl $0x1, %esi callq 0x58a58 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9CE22 mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_9CE75 loc_9CE22: mov rsi, [r15+68h] test rsi, rsi jz short loc_9CE39 mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_9CE75 loc_9CE39: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_9CE75: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 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 *)this + 64); 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 *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x001936f2 TEST AL,AL JZ 0x0019ce22 MOV RDI,R12 MOV RSI,R14 CALL 0x001934e0 MOV RDI,RBX MOV RSI,RAX CALL 0x0018db2c JMP 0x0019ce75 LAB_0019ce22: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x0019ce39 MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x0019ce75 LAB_0019ce39: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00158a58 MOV RDI,R14 MOV ESI,0x1 CALL 0x00158a58 LAB_0019ce75: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); 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(bVar3); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX); Value::Value(param_1,pVVar2); } return param_1; }
39,663
ma_insert_dynamic
eloqsql/libmariadb/libmariadb/ma_array.c
my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=ma_alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O0
c
ma_insert_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x42bdb movq -0x10(%rbp), %rdi callq 0x42c30 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x42bd9 movb $0x1, -0x1(%rbp) jmp 0x42c21 jmp 0x42c07 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x13360 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ma_insert_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_42BDB mov rdi, [rbp+var_10] call ma_alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_42BD9 mov [rbp+var_1], 1 jmp short loc_42C21 loc_42BD9: jmp short loc_42C07 loc_42BDB: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+8] mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx loc_42C07: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_42C21: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_insert_dynamic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) ) { v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1; LABEL_6: memcpy(v3, a2, *(unsigned int *)(a1 + 20)); return 0; } v3 = ma_alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
ma_insert_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x00142bdb MOV RDI,qword ptr [RBP + -0x10] CALL 0x00142c30 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00142bd9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00142c21 LAB_00142bd9: JMP 0x00142c07 LAB_00142bdb: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX LAB_00142c07: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00113360 MOV byte ptr [RBP + -0x1],0x0 LAB_00142c21: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 ma_insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)ma_alloc_dynamic(param_1); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); *(int *)(param_1 + 1) = (int)param_1[1] + 1; } memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
39,664
ma_cmp_dynamic_unique
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_cmp_dynamic_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def, const uchar *record, MARIA_RECORD_POS pos) { uchar *old_rec_buff,*old_record; size_t old_rec_buff_size; my_bool error, buff_alloced; DBUG_ENTER("_ma_cmp_dynamic_unique"); alloc_on_stack(*info->stack_end_ptr, old_record, buff_alloced, info->s->base.reclength); if (!old_record) DBUG_RETURN(1); /* Don't let the compare destroy blobs that may be in use */ old_rec_buff= info->rec_buff; old_rec_buff_size= info->rec_buff_size; if (info->s->base.blobs) { info->rec_buff= 0; info->rec_buff_size= 0; } error= _ma_read_dynamic_record(info, old_record, pos) != 0; if (!error) error=_ma_unique_comp(def, record, old_record, def->null_are_equal) != 0; if (info->s->base.blobs) { my_free(info->rec_buff); info->rec_buff= old_rec_buff; info->rec_buff_size= old_rec_buff_size; } stack_alloc_free(old_record, buff_alloced); DBUG_RETURN(error); }
O3
c
ma_cmp_dynamic_unique: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x398(%rax), %rsi leaq -0x50(%rbp), %rdx movq %rsi, (%rdx) movq 0x78(%rdi), %rcx movq (%rcx), %rcx subq %rdx, %rcx subq %rsi, %rcx jbe 0x49663 cmpq $0x10000, %rcx # imm = 0x10000 ja 0x49643 cmpq $0x1000, %rsi # imm = 0x1000 jb 0x49663 cmpq $0x8001, %rcx # imm = 0x8001 jb 0x49663 movq %r15, -0x40(%rbp) movq %r14, -0x48(%rbp) movq %rsp, %r13 addq $0xf, %rsi andq $-0x10, %rsi subq %rsi, %r13 movq %r13, %rsp movb $0x1, %cl movl %ecx, -0x34(%rbp) jmp 0x4968d movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0x9ff21 testq %rax, %rax je 0x49719 movq %rax, %r13 movq %r15, -0x40(%rbp) movq %r14, -0x48(%rbp) movq (%rbx), %rax movl $0x0, -0x34(%rbp) movq 0x3a0(%rbx), %r15 movq 0x460(%rbx), %r14 cmpl $0x0, 0x3f0(%rax) je 0x496b4 xorl %eax, %eax movq %rax, 0x3a0(%rbx) movq %rax, 0x460(%rbx) movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x492af movb $0x1, %r12b testl %eax, %eax jne 0x496e3 movq -0x40(%rbp), %rdi movsbl 0x3(%rdi), %ecx movq -0x48(%rbp), %rsi movq %r13, %rdx callq 0x58c0d testb %al, %al setne %r12b movq (%rbx), %rax cmpl $0x0, 0x3f0(%rax) je 0x49709 movq 0x3a0(%rbx), %rdi callq 0xa014e movq %r15, 0x3a0(%rbx) movq %r14, 0x460(%rbx) cmpb $0x0, -0x34(%rbp) jne 0x4971c movq %r13, %rdi callq 0xa014e jmp 0x4971c movb $0x1, %r12b movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4973d movl %r12d, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
_ma_cmp_dynamic_unique: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rcx mov r14, rdx mov r15, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov rsi, [rax+398h] lea rdx, [rbp+var_50] mov [rdx], rsi mov rcx, [rdi+78h] mov rcx, [rcx] sub rcx, rdx sub rcx, rsi jbe short loc_49663 cmp rcx, 10000h ja short loc_49643 cmp rsi, 1000h jb short loc_49663 cmp rcx, 8001h jb short loc_49663 loc_49643: mov [rbp+var_40], r15 mov [rbp+var_48], r14 mov r13, rsp add rsi, 0Fh and rsi, 0FFFFFFFFFFFFFFF0h sub r13, rsi mov rsp, r13 mov cl, 1 mov [rbp+var_34], ecx jmp short loc_4968D loc_49663: mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz loc_49719 mov r13, rax mov [rbp+var_40], r15 mov [rbp+var_48], r14 mov rax, [rbx] mov [rbp+var_34], 0 loc_4968D: mov r15, [rbx+3A0h] mov r14, [rbx+460h] cmp dword ptr [rax+3F0h], 0 jz short loc_496B4 xor eax, eax mov [rbx+3A0h], rax mov [rbx+460h], rax loc_496B4: mov rdi, rbx mov rsi, r13 mov rdx, r12 call _ma_read_dynamic_record mov r12b, 1 test eax, eax jnz short loc_496E3 mov rdi, [rbp+var_40] movsx ecx, byte ptr [rdi+3] mov rsi, [rbp+var_48] mov rdx, r13 call _ma_unique_comp test al, al setnz r12b loc_496E3: mov rax, [rbx] cmp dword ptr [rax+3F0h], 0 jz short loc_49709 mov rdi, [rbx+3A0h] call my_free mov [rbx+3A0h], r15 mov [rbx+460h], r14 loc_49709: cmp byte ptr [rbp+var_34], 0 jnz short loc_4971C mov rdi, r13 call my_free jmp short loc_4971C loc_49719: mov r12b, 1 loc_4971C: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4973D mov eax, r12d lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4973D: call ___stack_chk_fail
long long ma_cmp_dynamic_unique(long long *a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { long long v9; // rax unsigned long long v10; // rsi unsigned long long v11; // rcx bool v12; // cc unsigned long long v13; // rcx _WORD *v14; // r13 long long v15; // rax long long v16; // r15 long long v17; // r14 int dynamic_record; // eax unsigned long long v20; // [rsp+0h] [rbp-50h] BYREF long long v21; // [rsp+8h] [rbp-48h] long long v22; // [rsp+10h] [rbp-40h] int v23; // [rsp+1Ch] [rbp-34h] unsigned long long v24; // [rsp+20h] [rbp-30h] v24 = __readfsqword(0x28u); v9 = *a1; v10 = *(_QWORD *)(*a1 + 920); v20 = v10; v11 = *(_QWORD *)a1[15] - (_QWORD)&v20; v12 = v11 <= v10; v13 = v11 - v10; if ( v12 || v13 <= 0x10000 && (v10 < 0x1000 || v13 < 0x8001) ) { v15 = my_malloc(0LL, v10, 65552LL); if ( !v15 ) { LOBYTE(a4) = 1; return (unsigned int)a4; } v14 = (_WORD *)v15; v22 = a2; v21 = a3; v9 = *a1; v23 = 0; } else { v22 = a2; v21 = a3; v14 = (_WORD *)((char *)&v20 - ((v10 + 15) & 0xFFFFFFFFFFFFFFF0LL)); LOBYTE(v13) = 1; v23 = v13; } v16 = a1[116]; v17 = a1[140]; if ( *(_DWORD *)(v9 + 1008) ) { a1[116] = 0LL; a1[140] = 0LL; } dynamic_record = ma_read_dynamic_record(a1, v14, a4, v13, a5, a6); LOBYTE(a4) = 1; if ( !dynamic_record ) LOBYTE(a4) = (unsigned __int8)ma_unique_comp(v22, v21, v14, (unsigned int)*(char *)(v22 + 3)) != 0; if ( *(_DWORD *)(*a1 + 1008) ) { my_free(a1[116]); a1[116] = v16; a1[140] = v17; } if ( !(_BYTE)v23 ) my_free(v14); return (unsigned int)a4; }
_ma_cmp_dynamic_unique: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RCX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RAX + 0x398] LEA RDX,[RBP + -0x50] MOV qword ptr [RDX],RSI MOV RCX,qword ptr [RDI + 0x78] MOV RCX,qword ptr [RCX] SUB RCX,RDX SUB RCX,RSI JBE 0x00149663 CMP RCX,0x10000 JA 0x00149643 CMP RSI,0x1000 JC 0x00149663 CMP RCX,0x8001 JC 0x00149663 LAB_00149643: MOV qword ptr [RBP + -0x40],R15 MOV qword ptr [RBP + -0x48],R14 MOV R13,RSP ADD RSI,0xf AND RSI,-0x10 SUB R13,RSI MOV RSP,R13 MOV CL,0x1 MOV dword ptr [RBP + -0x34],ECX JMP 0x0014968d LAB_00149663: MOV EDX,0x10010 XOR EDI,EDI CALL 0x0019ff21 TEST RAX,RAX JZ 0x00149719 MOV R13,RAX MOV qword ptr [RBP + -0x40],R15 MOV qword ptr [RBP + -0x48],R14 MOV RAX,qword ptr [RBX] MOV dword ptr [RBP + -0x34],0x0 LAB_0014968d: MOV R15,qword ptr [RBX + 0x3a0] MOV R14,qword ptr [RBX + 0x460] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x001496b4 XOR EAX,EAX MOV qword ptr [RBX + 0x3a0],RAX MOV qword ptr [RBX + 0x460],RAX LAB_001496b4: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x001492af MOV R12B,0x1 TEST EAX,EAX JNZ 0x001496e3 MOV RDI,qword ptr [RBP + -0x40] MOVSX ECX,byte ptr [RDI + 0x3] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,R13 CALL 0x00158c0d TEST AL,AL SETNZ R12B LAB_001496e3: MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x00149709 MOV RDI,qword ptr [RBX + 0x3a0] CALL 0x001a014e MOV qword ptr [RBX + 0x3a0],R15 MOV qword ptr [RBX + 0x460],R14 LAB_00149709: CMP byte ptr [RBP + -0x34],0x0 JNZ 0x0014971c MOV RDI,R13 CALL 0x001a014e JMP 0x0014971c LAB_00149719: MOV R12B,0x1 LAB_0014971c: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014973d MOV EAX,R12D LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014973d: CALL 0x00129260
ulong _ma_cmp_dynamic_unique(long *param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; long lVar2; int8 uVar3; char cVar4; int iVar5; int1 *puVar6; long lVar7; ulong uVar8; ulong *puVar9; int7 uVar10; long in_FS_OFFSET; ulong local_58; int8 local_50; long local_48; int4 local_3c; long local_38; puVar9 = &local_58; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar7 = *param_1; local_58 = *(ulong *)(lVar7 + 0x398); uVar8 = (*(long *)param_1[0xf] - (long)&local_58) - local_58; uVar10 = (int7)((ulong)param_4 >> 8); if (((ulong)(*(long *)param_1[0xf] - (long)&local_58) < local_58 || uVar8 == 0) || ((uVar8 < 0x10001 && ((local_58 < 0x1000 || (uVar8 < 0x8001)))))) { puVar6 = (int1 *)my_malloc(0,local_58,0x10010); if (puVar6 == (int1 *)0x0) { uVar8 = CONCAT71(uVar10,1); goto LAB_0014971c; } lVar7 = *param_1; local_3c = 0; puVar9 = &local_58; } else { puVar6 = (int1 *)((long)&local_58 - (local_58 + 0xf & 0xfffffffffffffff0)); local_3c = (int4)CONCAT71((int7)(uVar8 >> 8),1); puVar9 = (ulong *)puVar6; } lVar1 = param_1[0x74]; lVar2 = param_1[0x8c]; if (*(int *)(lVar7 + 0x3f0) != 0) { param_1[0x74] = 0; param_1[0x8c] = 0; } local_50 = param_3; local_48 = param_2; *(int8 *)((long)puVar9 + -8) = 0x1496c2; iVar5 = _ma_read_dynamic_record(param_1,puVar6,param_4); lVar7 = local_48; uVar3 = local_50; uVar8 = CONCAT71(uVar10,1); if (iVar5 == 0) { cVar4 = *(char *)(local_48 + 3); *(int8 *)((long)puVar9 + -8) = 0x1496dd; cVar4 = _ma_unique_comp(lVar7,uVar3,puVar6,(int)cVar4); uVar8 = CONCAT71(uVar10,cVar4 != '\0'); } if (*(int *)(*param_1 + 0x3f0) != 0) { lVar7 = param_1[0x74]; *(int8 *)((long)puVar9 + -8) = 0x1496fb; my_free(lVar7); param_1[0x74] = lVar1; param_1[0x8c] = lVar2; } if ((char)local_3c == '\0') { *(int8 *)((long)puVar9 + -8) = 0x149717; my_free(puVar6); } LAB_0014971c: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar8 & 0xffffffff; } /* WARNING: Subroutine does not return */ *(code **)((long)puVar9 + -8) = _ma_cmp_dynamic_record; __stack_chk_fail(); }
39,665
simple_key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length __attribute__((unused)), int return_buffer __attribute__((unused))) { my_bool locked_and_incremented= FALSE; int error=0; uchar *start= buff; DBUG_ENTER("simple_key_cache_read"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file, (ulong) filepos, length)); if (keycache->key_cache_inited) { /* Key cache is used */ reg1 BLOCK_LINK *block; uint read_length; uint offset; int page_st; if (MYSQL_KEYCACHE_READ_START_ENABLED()) { MYSQL_KEYCACHE_READ_START(my_filename(file), length, (ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } /* When the key cache is once initialized, we use the cache_lock to reliably distinguish the cases of normal operation, resizing, and disabled cache. We always increment and decrement 'cnt_for_resize_op' so that a resizer can wait for pending I/O. */ keycache_pthread_mutex_lock(&keycache->cache_lock); /* Cache resizing has two phases: Flushing and re-initializing. In the flush phase read requests are allowed to bypass the cache for blocks not in the cache. find_key_block() returns NULL in this case. After the flush phase new I/O requests must wait until the re-initialization is done. The re-initialization can be done only if no I/O request is in progress. The reason is that key_cache_block_size can change. With enabled cache, I/O is done in chunks of key_cache_block_size. Every chunk tries to use a cache block first. If the block size changes in the middle, a block could be missed and old data could be read. */ while (keycache->in_resize && !keycache->resize_in_flush) wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); /* Register the I/O for the next resize. */ inc_counter_for_resize_op(keycache); locked_and_incremented= TRUE; /* Requested data may not always be aligned to cache blocks. */ offset= (uint) (filepos % keycache->key_cache_block_size); /* Read data in key_cache_block_size increments */ do { /* Cache could be disabled in a later iteration. */ if (!keycache->can_be_used) { KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used")); goto no_key_cache; } /* Start reading at the beginning of the cache block. */ filepos-= offset; /* Do not read beyond the end of the cache block. */ read_length= length; set_if_smaller(read_length, keycache->key_cache_block_size-offset); KEYCACHE_DBUG_ASSERT(read_length > 0); /* Request the cache block that matches file/pos. */ keycache->global_cache_r_requests++; MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size); block=find_key_block(keycache, file, filepos, level, 0, &page_st); if (!block) { /* This happens only for requests submitted during key cache resize. The block is not in the cache and shall not go in. Read directly from file. */ keycache->global_cache_read++; keycache_pthread_mutex_unlock(&keycache->cache_lock); error= (my_pread(file, (uchar*) buff, read_length, filepos + offset, MYF(MY_NABP)) != 0); keycache_pthread_mutex_lock(&keycache->cache_lock); goto next_block; } if (!(block->status & BLOCK_ERROR)) { if (page_st == PAGE_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); read_block_primary(keycache, block, keycache->key_cache_block_size, read_length+offset); } else if (page_st == PAGE_WAIT_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); /* The requested page is to be read into the block buffer */ read_block_secondary(keycache, block); /* A secondary request must now have the block assigned to the requested file block. */ DBUG_ASSERT(block->hash_link->file == file); DBUG_ASSERT(block->hash_link->diskpos == filepos); } else if (block->length < read_length + offset) { /* Impossible if nothing goes wrong: this could only happen if we are using a file with small key blocks and are trying to read outside the file */ my_errno= -1; block->status|= BLOCK_ERROR; } else { MYSQL_KEYCACHE_READ_HIT(); } } /* block status may have added BLOCK_ERROR in the above 'if'. */ if (!(block->status & BLOCK_ERROR)) { { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_unlock(&keycache->cache_lock); #endif /* Copy data from the cache buffer */ memcpy(buff, block->buffer+offset, (size_t) read_length); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_lock(&keycache->cache_lock); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #endif } } remove_reader(block); /* Error injection for coverage testing. */ DBUG_EXECUTE_IF("key_cache_read_block_error", block->status|= BLOCK_ERROR;); /* Do not link erroneous blocks into the LRU ring, but free them. */ if (!(block->status & BLOCK_ERROR)) { /* Link the block into the LRU ring if it's the last submitted request for the block. This enables eviction for the block. */ unreg_request(keycache, block, 1); } else { free_block(keycache, block); error= 1; break; } next_block: buff+= read_length; filepos+= read_length+offset; offset= 0; } while ((length-= read_length)); if (MYSQL_KEYCACHE_READ_DONE_ENABLED()) { MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } goto end; } KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized")); no_key_cache: /* Key cache is not used */ keycache->global_cache_r_requests++; keycache->global_cache_read++; if (locked_and_incremented) keycache_pthread_mutex_unlock(&keycache->cache_lock); if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) error= 1; if (locked_and_incremented) keycache_pthread_mutex_lock(&keycache->cache_lock); end: if (locked_and_incremented) { dec_counter_for_resize_op(keycache); keycache_pthread_mutex_unlock(&keycache->cache_lock); } DBUG_PRINT("exit", ("error: %d", error )); DBUG_RETURN(error ? (uchar*) 0 : start); }
O3
c
simple_key_cache_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r14 movl %ecx, -0x6c(%rbp) movq %rdx, %rcx movq %rdi, %r13 cmpb $0x0, (%rdi) je 0xb3bc0 movq %rcx, %r12 movl %r9d, -0x38(%rbp) leaq 0xc0(%r13), %r15 cmpq $0x0, 0x100(%r13) movl %esi, -0x34(%rbp) jne 0xb3cd7 movq %r15, %rdi callq 0x2a230 movq %r14, -0x58(%rbp) cmpb $0x0, 0x1(%r13) je 0xb3974 leaq 0x108(%r13), %rbx cmpb $0x0, 0x2(%r13) jne 0xb3974 movq %rbx, %rdi movq %r15, %rsi callq 0xb3d50 cmpb $0x0, 0x1(%r13) jne 0xb395b movq %r15, -0x30(%rbp) incq 0x70(%r13) movl 0x18(%r13), %ecx movq $0x0, -0x40(%rbp) movq %r12, %r15 movq %r12, %rax xorl %edx, %edx divq %rcx movq %rdx, %r12 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x38(%rbp), %eax movq %r13, -0x48(%rbp) cmpb $0x0, 0x3(%r13) je 0xb3bfa movl %r12d, %ecx movq %r15, %r14 movq %rcx, -0x60(%rbp) subq %rcx, %r14 movl 0x18(%r13), %ebx subl %r12d, %ebx cmpl %ebx, %eax movl %eax, -0x38(%rbp) cmovbl %eax, %ebx incq 0x150(%r13) movq %r13, %rdi movl -0x34(%rbp), %esi movq %r14, %rdx movl -0x6c(%rbp), %ecx xorl %r8d, %r8d leaq -0x70(%rbp), %r9 callq 0xb3de1 movq %r13, %rcx movq %rax, %r13 movl %ebx, %eax movq %rax, -0x68(%rbp) testq %r13, %r13 je 0xb3a34 testb $0x1, 0x50(%r13) jne 0xb3acb movl -0x70(%rbp), %eax cmpl $0x2, %eax je 0xb3a9f cmpl $0x1, %eax jne 0xb3ab1 movq -0x48(%rbp), %rdi movl 0x18(%rdi), %edx leal (%rbx,%r12), %ecx movq %r13, %rsi callq 0xb45e2 jmp 0xb3acb movq %r15, -0x60(%rbp) incq 0x158(%rcx) movq 0x100(%rcx), %rdi testq %rdi, %rdi movq %rcx, %r13 jne 0xb3b66 movq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x2a1f0 movl $0x4, %r8d movl -0x34(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x60(%rbp), %rcx callq 0xbfbd0 xorl %ecx, %ecx testq %rax, %rax setne %cl movq %rcx, -0x40(%rbp) cmpq $0x0, 0x100(%r13) jne 0xb3b7b movq %r15, %rdi callq 0x2a230 jmp 0xb3b42 movq %r13, %rdi addq $0x28, %rdi movq -0x30(%rbp), %rsi callq 0xb3d50 jmp 0xb3acb leal (%rbx,%r12), %eax cmpl %eax, 0x4c(%r13) jae 0xb3acb callq 0xc14ee movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF orb $0x1, 0x50(%r13) testb $0x1, 0x50(%r13) jne 0xb3b1b movq -0x48(%rbp), %r15 movq 0x100(%r15), %rdi testq %rdi, %rdi jne 0xb3b91 movq -0x30(%rbp), %rdi callq 0x2a1f0 movq -0x60(%rbp), %rsi addq 0x40(%r13), %rsi movq -0x50(%rbp), %rdi movq -0x68(%rbp), %rdx callq 0x2a0b0 cmpq $0x0, 0x100(%r15) jne 0xb3ba6 movq -0x30(%rbp), %rdi callq 0x2a230 movq %r13, %rdi callq 0xb46b0 testb $0x1, 0x50(%r13) jne 0xb3c74 movq -0x48(%rbp), %rdi movq %r13, %rsi movq %rdi, %r13 movl $0x1, %edx callq 0xb46f8 movq -0x68(%rbp), %rax addq %rax, -0x50(%rbp) addl %ebx, %r12d addq %r12, %r14 xorl %r12d, %r12d movq %r14, %r15 movl -0x38(%rbp), %eax subl %ebx, %eax jne 0xb39a5 jmp 0xb3c8c leaq 0x2faeab(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0xb3a52 movq %r15, %rdi leaq 0x4c0ee(%rip), %rsi # 0xffc73 movl $0xb29, %edx # imm = 0xB29 callq 0x312ea jmp 0xb3b42 leaq 0x2fae80(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0xb3ae6 movq -0x30(%rbp), %rdi leaq 0x4c0c2(%rip), %rsi # 0xffc73 movl $0xb5e, %edx # imm = 0xB5E callq 0x312ea jmp 0xb3b1b movdqu 0x150(%r13), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x150(%r13) movl %r9d, %edx movl $0x4, %r8d movl %esi, %edi movq %r14, %rsi callq 0xbfbd0 xorl %ebx, %ebx testq %rax, %rax setne %bl jmp 0xb3cc0 movq %r15, %r14 movl %eax, %ebx movdqu 0x150(%r13), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x150(%r13) movq 0x100(%r13), %rdi testq %rdi, %rdi jne 0xb3d02 movq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x2a1f0 movl %ebx, %edx movl $0x4, %r8d movl -0x34(%rbp), %edi movq -0x50(%rbp), %rsi movq %r14, %rcx callq 0xbfbd0 testq %rax, %rax movl $0x1, %ebx cmovel -0x40(%rbp), %ebx cmpq $0x0, 0x100(%r13) movq -0x58(%rbp), %r14 jne 0xb3d17 movq %r15, %rdi callq 0x2a230 jmp 0xb3c9a movq -0x48(%rbp), %rdi movq %r13, %rsi movq %rdi, %r13 callq 0xb4800 movl $0x1, %eax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl %eax, %ebx movq -0x58(%rbp), %r14 movq -0x30(%rbp), %r15 decq 0x70(%r13) jne 0xb3cac leaq 0x110(%r13), %rdi callq 0xb5005 movq 0x100(%r13), %rdi testq %rdi, %rdi jne 0xb3cf0 movq %r15, %rdi callq 0x2a1f0 xorl %eax, %eax testl %ebx, %ebx cmoveq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4bf95(%rip), %rsi # 0xffc73 movq %r15, %rdi movl $0xaf2, %edx # imm = 0xAF2 callq 0x312ea jmp 0xb3949 leaq 0x2fad21(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0xb3cb8 leaq 0x2fad0f(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0xb3c29 leaq 0x4bf55(%rip), %rsi # 0xffc73 movq %r15, %rdi movl $0xb96, %edx # imm = 0xB96 callq 0x312ea jmp 0xb3c9a
simple_key_cache_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, r8 mov [rbp+var_6C], ecx mov rcx, rdx mov r13, rdi cmp byte ptr [rdi], 0 jz loc_B3BC0 mov r12, rcx mov [rbp+var_38], r9d lea r15, [r13+0C0h] cmp qword ptr [r13+100h], 0 mov [rbp+var_34], esi jnz loc_B3CD7 mov rdi, r15 call _pthread_mutex_lock loc_B3949: mov [rbp+var_58], r14 cmp byte ptr [r13+1], 0 jz short loc_B3974 lea rbx, [r13+108h] loc_B395B: cmp byte ptr [r13+2], 0 jnz short loc_B3974 mov rdi, rbx mov rsi, r15 call wait_on_queue cmp byte ptr [r13+1], 0 jnz short loc_B395B loc_B3974: mov [rbp+var_30], r15 inc qword ptr [r13+70h] mov ecx, [r13+18h] mov [rbp+var_40], 0 mov r15, r12 mov rax, r12 xor edx, edx div rcx mov r12, rdx mov rax, [rbp+var_58] mov [rbp+var_50], rax mov eax, [rbp+var_38] mov [rbp+var_48], r13 loc_B39A5: cmp byte ptr [r13+3], 0 jz loc_B3BFA mov ecx, r12d mov r14, r15 mov [rbp+var_60], rcx sub r14, rcx mov ebx, [r13+18h] sub ebx, r12d cmp eax, ebx mov [rbp+var_38], eax cmovb ebx, eax inc qword ptr [r13+150h] mov rdi, r13 mov esi, [rbp+var_34] mov rdx, r14 mov ecx, [rbp+var_6C] xor r8d, r8d lea r9, [rbp+var_70] call find_key_block mov rcx, r13 mov r13, rax mov eax, ebx mov [rbp+var_68], rax test r13, r13 jz short loc_B3A34 test byte ptr [r13+50h], 1 jnz loc_B3ACB mov eax, [rbp+var_70] cmp eax, 2 jz loc_B3A9F cmp eax, 1 jnz loc_B3AB1 mov rdi, [rbp+var_48] mov edx, [rdi+18h] lea ecx, [rbx+r12] mov rsi, r13 call read_block_primary jmp loc_B3ACB loc_B3A34: mov [rbp+var_60], r15 inc qword ptr [rcx+158h] mov rdi, [rcx+100h] test rdi, rdi mov r13, rcx jnz loc_B3B66 loc_B3A52: mov r15, [rbp+var_30] mov rdi, r15 call _pthread_mutex_unlock mov r8d, 4 mov edi, [rbp+var_34] mov rsi, [rbp+var_50] mov rdx, [rbp+var_68] mov rcx, [rbp+var_60] call my_pread xor ecx, ecx test rax, rax setnz cl mov [rbp+var_40], rcx cmp qword ptr [r13+100h], 0 jnz loc_B3B7B mov rdi, r15 call _pthread_mutex_lock jmp loc_B3B42 loc_B3A9F: mov rdi, r13 add rdi, 28h ; '(' mov rsi, [rbp+var_30] call wait_on_queue jmp short loc_B3ACB loc_B3AB1: lea eax, [rbx+r12] cmp [r13+4Ch], eax jnb short loc_B3ACB call _my_thread_var mov dword ptr [rax], 0FFFFFFFFh or byte ptr [r13+50h], 1 loc_B3ACB: test byte ptr [r13+50h], 1 jnz short loc_B3B1B mov r15, [rbp+var_48] mov rdi, [r15+100h] test rdi, rdi jnz loc_B3B91 loc_B3AE6: mov rdi, [rbp+var_30] call _pthread_mutex_unlock mov rsi, [rbp+var_60] add rsi, [r13+40h] mov rdi, [rbp+var_50] mov rdx, [rbp+var_68] call _memcpy cmp qword ptr [r15+100h], 0 jnz loc_B3BA6 mov rdi, [rbp+var_30] call _pthread_mutex_lock loc_B3B1B: mov rdi, r13 call remove_reader test byte ptr [r13+50h], 1 jnz loc_B3C74 mov rdi, [rbp+var_48] mov rsi, r13 mov r13, rdi mov edx, 1 call unreg_request_0 loc_B3B42: mov rax, [rbp+var_68] add [rbp+var_50], rax add r12d, ebx add r14, r12 xor r12d, r12d mov r15, r14 mov eax, [rbp+var_38] sub eax, ebx jnz loc_B39A5 jmp loc_B3C8C loc_B3B66: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_B3A52 loc_B3B7B: mov rdi, r15 lea rsi, aWorkspaceLlm4b_50; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B29h call psi_mutex_lock jmp short loc_B3B42 loc_B3B91: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_B3AE6 loc_B3BA6: mov rdi, [rbp+var_30] lea rsi, aWorkspaceLlm4b_50; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B5Eh call psi_mutex_lock jmp loc_B3B1B loc_B3BC0: movdqu xmm0, xmmword ptr [r13+150h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [r13+150h], xmm0 mov edx, r9d mov r8d, 4 mov edi, esi mov rsi, r14 call my_pread xor ebx, ebx test rax, rax setnz bl jmp loc_B3CC0 loc_B3BFA: mov r14, r15 mov ebx, eax movdqu xmm0, xmmword ptr [r13+150h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [r13+150h], xmm0 mov rdi, [r13+100h] test rdi, rdi jnz loc_B3D02 loc_B3C29: mov r15, [rbp+var_30] mov rdi, r15 call _pthread_mutex_unlock mov edx, ebx mov r8d, 4 mov edi, [rbp+var_34] mov rsi, [rbp+var_50] mov rcx, r14 call my_pread test rax, rax mov ebx, 1 cmovz ebx, dword ptr [rbp+var_40] cmp qword ptr [r13+100h], 0 mov r14, [rbp+var_58] jnz loc_B3D17 mov rdi, r15 call _pthread_mutex_lock jmp short loc_B3C9A loc_B3C74: mov rdi, [rbp+var_48] mov rsi, r13 mov r13, rdi call free_block_0 mov eax, 1 mov [rbp+var_40], rax loc_B3C8C: mov rax, [rbp+var_40] mov ebx, eax mov r14, [rbp+var_58] mov r15, [rbp+var_30] loc_B3C9A: dec qword ptr [r13+70h] jnz short loc_B3CAC lea rdi, [r13+110h] call release_whole_queue loc_B3CAC: mov rdi, [r13+100h] test rdi, rdi jnz short loc_B3CF0 loc_B3CB8: mov rdi, r15 call _pthread_mutex_unlock loc_B3CC0: xor eax, eax test ebx, ebx cmovz rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B3CD7: lea rsi, aWorkspaceLlm4b_50; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0AF2h call psi_mutex_lock jmp loc_B3949 loc_B3CF0: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_B3CB8 loc_B3D02: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_B3C29 loc_B3D17: lea rsi, aWorkspaceLlm4b_50; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0B96h call psi_mutex_lock jmp loc_B3C9A
long long simple_key_cache_read( const __m128i *a1, unsigned int a2, unsigned long long a3, unsigned int a4, long long a5, unsigned int a6) { long long v6; // r14 const __m128i *v7; // r13 bool v9; // zf unsigned long long v10; // rcx long long v11; // r15 unsigned long long v12; // r12 unsigned int v13; // eax long long v14; // r14 unsigned int v15; // ebx const __m128i *v16; // rdi long long v17; // rsi long long key_block; // rax long long v19; // rdx const __m128i *v20; // rcx long long v21; // r13 long long v22; // r15 const __m128i *v23; // r15 long long v24; // rdi long long v25; // rsi long long v26; // r14 BOOL v27; // ebx long long v28; // r14 unsigned int v29; // ebx long long v30; // r15 long long v31; // rax long long v32; // rsi long long result; // rax int v34; // [rsp+0h] [rbp-70h] BYREF unsigned int v35; // [rsp+4h] [rbp-6Ch] long long v36; // [rsp+8h] [rbp-68h] long long v37; // [rsp+10h] [rbp-60h] long long v38; // [rsp+18h] [rbp-58h] long long v39; // [rsp+20h] [rbp-50h] const __m128i *v40; // [rsp+28h] [rbp-48h] _BOOL8 v41; // [rsp+30h] [rbp-40h] unsigned int v42; // [rsp+38h] [rbp-38h] unsigned int v43; // [rsp+3Ch] [rbp-34h] const __m128i *v44; // [rsp+40h] [rbp-30h] v6 = a5; v35 = a4; v7 = a1; if ( a1->m128i_i8[0] ) { v42 = a6; v9 = a1[16].m128i_i64[0] == 0; v43 = a2; if ( v9 ) pthread_mutex_lock(&a1[12]); else psi_mutex_lock( (long long)a1[12].m128i_i64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xAF2u); v38 = v6; while ( a1->m128i_i8[1] ) { if ( a1->m128i_i8[2] ) break; wait_on_queue(&a1[16].m128i_u64[1], &a1[12]); } v44 = a1 + 12; ++a1[7].m128i_i64[0]; v10 = a1[1].m128i_u32[2]; v41 = 0LL; v11 = a3; v12 = a3 % v10; v39 = v38; v13 = v42; v40 = a1; while ( v7->m128i_i8[3] ) { v37 = (unsigned int)v12; v14 = v11 - (unsigned int)v12; v15 = v7[1].m128i_i32[2] - v12; v42 = v13; if ( v13 < v15 ) v15 = v13; ++v7[21].m128i_i64[0]; v16 = v7; v17 = v43; key_block = find_key_block(v7, v43, v11 - (unsigned int)v12, v35, 0LL, &v34); v20 = v7; v21 = key_block; v36 = v15; if ( key_block ) { if ( (*(_BYTE *)(key_block + 80) & 1) == 0 ) { if ( v34 == 2 ) { v17 = (long long)v44; wait_on_queue(key_block + 40, v44); } else if ( v34 == 1 ) { v17 = key_block; read_block_primary(v40, key_block, v40[1].m128i_u32[2], v15 + (unsigned int)v12); } else if ( *(_DWORD *)(key_block + 76) < v15 + (unsigned int)v12 ) { *(_DWORD *)my_thread_var(v16) = -1; *(_BYTE *)(v21 + 80) |= 1u; } } if ( (*(_BYTE *)(v21 + 80) & 1) == 0 ) { v23 = v40; v24 = v40[16].m128i_i64[0]; if ( v24 ) ((void ( *)(long long, long long, long long, const __m128i *))PSI_server[44])(v24, v17, v19, v20); pthread_mutex_unlock(v44); v17 = *(_QWORD *)(v21 + 64) + v37; memcpy(v39, v17, v36); if ( v23[16].m128i_i64[0] ) { v17 = (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c"; psi_mutex_lock( (long long)v44, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB5Eu); } else { pthread_mutex_lock(v44); } } remove_reader(v21, v17, v19, v20); if ( (*(_BYTE *)(v21 + 80) & 1) != 0 ) { v32 = v21; v7 = v40; free_block_0(v40, v32); v41 = 1LL; LABEL_42: v27 = v41; v6 = v38; v30 = (long long)v44; goto LABEL_43; } v25 = v21; v7 = v40; unreg_request_0(v40, v25, 1LL); } else { v37 = v11; ++v20[21].m128i_i64[1]; v7 = v20; if ( v20[16].m128i_i64[0] ) PSI_server[44](); v22 = (long long)v44; pthread_mutex_unlock(v44); v41 = my_pread(v43, v39, v36, v37, 4LL) != 0; if ( v7[16].m128i_i64[0] ) psi_mutex_lock(v22, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB29u); else pthread_mutex_lock(v22); } v39 += v36; v26 = v15 + (unsigned int)v12 + v14; LODWORD(v12) = 0; v11 = v26; v13 = v42 - v15; if ( v42 == v15 ) goto LABEL_42; } v28 = v11; v29 = v13; v7[21] = _mm_sub_epi64(_mm_loadu_si128(v7 + 21), (__m128i)-1LL); if ( v7[16].m128i_i64[0] ) PSI_server[44](); v30 = (long long)v44; pthread_mutex_unlock(v44); v31 = my_pread(v43, v39, v29, v28, 4LL); v27 = 1; if ( !v31 ) v27 = v41; v6 = v38; if ( v7[16].m128i_i64[0] ) psi_mutex_lock(v30, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB96u); else pthread_mutex_lock(v30); LABEL_43: v9 = v7[7].m128i_i64[0]-- == 1; if ( v9 ) release_whole_queue(&v7[17]); if ( v7[16].m128i_i64[0] ) PSI_server[44](); pthread_mutex_unlock(v30); } else { a1[21] = _mm_sub_epi64(_mm_loadu_si128(a1 + 21), (__m128i)-1LL); v27 = my_pread(a2, a5, a6, a3, 4LL) != 0; } result = 0LL; if ( !v27 ) return v6; return result; }
simple_key_cache_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,R8 MOV dword ptr [RBP + -0x6c],ECX MOV RCX,RDX MOV R13,RDI CMP byte ptr [RDI],0x0 JZ 0x001b3bc0 MOV R12,RCX MOV dword ptr [RBP + -0x38],R9D LEA R15,[R13 + 0xc0] CMP qword ptr [R13 + 0x100],0x0 MOV dword ptr [RBP + -0x34],ESI JNZ 0x001b3cd7 MOV RDI,R15 CALL 0x0012a230 LAB_001b3949: MOV qword ptr [RBP + -0x58],R14 CMP byte ptr [R13 + 0x1],0x0 JZ 0x001b3974 LEA RBX,[R13 + 0x108] LAB_001b395b: CMP byte ptr [R13 + 0x2],0x0 JNZ 0x001b3974 MOV RDI,RBX MOV RSI,R15 CALL 0x001b3d50 CMP byte ptr [R13 + 0x1],0x0 JNZ 0x001b395b LAB_001b3974: MOV qword ptr [RBP + -0x30],R15 INC qword ptr [R13 + 0x70] MOV ECX,dword ptr [R13 + 0x18] MOV qword ptr [RBP + -0x40],0x0 MOV R15,R12 MOV RAX,R12 XOR EDX,EDX DIV RCX MOV R12,RDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],R13 LAB_001b39a5: CMP byte ptr [R13 + 0x3],0x0 JZ 0x001b3bfa MOV ECX,R12D MOV R14,R15 MOV qword ptr [RBP + -0x60],RCX SUB R14,RCX MOV EBX,dword ptr [R13 + 0x18] SUB EBX,R12D CMP EAX,EBX MOV dword ptr [RBP + -0x38],EAX CMOVC EBX,EAX INC qword ptr [R13 + 0x150] MOV RDI,R13 MOV ESI,dword ptr [RBP + -0x34] MOV RDX,R14 MOV ECX,dword ptr [RBP + -0x6c] XOR R8D,R8D LEA R9,[RBP + -0x70] CALL 0x001b3de1 MOV RCX,R13 MOV R13,RAX MOV EAX,EBX MOV qword ptr [RBP + -0x68],RAX TEST R13,R13 JZ 0x001b3a34 TEST byte ptr [R13 + 0x50],0x1 JNZ 0x001b3acb MOV EAX,dword ptr [RBP + -0x70] CMP EAX,0x2 JZ 0x001b3a9f CMP EAX,0x1 JNZ 0x001b3ab1 MOV RDI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RDI + 0x18] LEA ECX,[RBX + R12*0x1] MOV RSI,R13 CALL 0x001b45e2 JMP 0x001b3acb LAB_001b3a34: MOV qword ptr [RBP + -0x60],R15 INC qword ptr [RCX + 0x158] MOV RDI,qword ptr [RCX + 0x100] TEST RDI,RDI MOV R13,RCX JNZ 0x001b3b66 LAB_001b3a52: MOV R15,qword ptr [RBP + -0x30] MOV RDI,R15 CALL 0x0012a1f0 MOV R8D,0x4 MOV EDI,dword ptr [RBP + -0x34] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] CALL 0x001bfbd0 XOR ECX,ECX TEST RAX,RAX SETNZ CL MOV qword ptr [RBP + -0x40],RCX CMP qword ptr [R13 + 0x100],0x0 JNZ 0x001b3b7b MOV RDI,R15 CALL 0x0012a230 JMP 0x001b3b42 LAB_001b3a9f: MOV RDI,R13 ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x30] CALL 0x001b3d50 JMP 0x001b3acb LAB_001b3ab1: LEA EAX,[RBX + R12*0x1] CMP dword ptr [R13 + 0x4c],EAX JNC 0x001b3acb CALL 0x001c14ee MOV dword ptr [RAX],0xffffffff OR byte ptr [R13 + 0x50],0x1 LAB_001b3acb: TEST byte ptr [R13 + 0x50],0x1 JNZ 0x001b3b1b MOV R15,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R15 + 0x100] TEST RDI,RDI JNZ 0x001b3b91 LAB_001b3ae6: MOV RDI,qword ptr [RBP + -0x30] CALL 0x0012a1f0 MOV RSI,qword ptr [RBP + -0x60] ADD RSI,qword ptr [R13 + 0x40] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x68] CALL 0x0012a0b0 CMP qword ptr [R15 + 0x100],0x0 JNZ 0x001b3ba6 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0012a230 LAB_001b3b1b: MOV RDI,R13 CALL 0x001b46b0 TEST byte ptr [R13 + 0x50],0x1 JNZ 0x001b3c74 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,R13 MOV R13,RDI MOV EDX,0x1 CALL 0x001b46f8 LAB_001b3b42: MOV RAX,qword ptr [RBP + -0x68] ADD qword ptr [RBP + -0x50],RAX ADD R12D,EBX ADD R14,R12 XOR R12D,R12D MOV R15,R14 MOV EAX,dword ptr [RBP + -0x38] SUB EAX,EBX JNZ 0x001b39a5 JMP 0x001b3c8c LAB_001b3b66: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001b3a52 LAB_001b3b7b: MOV RDI,R15 LEA RSI,[0x1ffc73] MOV EDX,0xb29 CALL 0x001312ea JMP 0x001b3b42 LAB_001b3b91: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001b3ae6 LAB_001b3ba6: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1ffc73] MOV EDX,0xb5e CALL 0x001312ea JMP 0x001b3b1b LAB_001b3bc0: MOVDQU XMM0,xmmword ptr [R13 + 0x150] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x150],XMM0 MOV EDX,R9D MOV R8D,0x4 MOV EDI,ESI MOV RSI,R14 CALL 0x001bfbd0 XOR EBX,EBX TEST RAX,RAX SETNZ BL JMP 0x001b3cc0 LAB_001b3bfa: MOV R14,R15 MOV EBX,EAX MOVDQU XMM0,xmmword ptr [R13 + 0x150] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x150],XMM0 MOV RDI,qword ptr [R13 + 0x100] TEST RDI,RDI JNZ 0x001b3d02 LAB_001b3c29: MOV R15,qword ptr [RBP + -0x30] MOV RDI,R15 CALL 0x0012a1f0 MOV EDX,EBX MOV R8D,0x4 MOV EDI,dword ptr [RBP + -0x34] MOV RSI,qword ptr [RBP + -0x50] MOV RCX,R14 CALL 0x001bfbd0 TEST RAX,RAX MOV EBX,0x1 CMOVZ EBX,dword ptr [RBP + -0x40] CMP qword ptr [R13 + 0x100],0x0 MOV R14,qword ptr [RBP + -0x58] JNZ 0x001b3d17 MOV RDI,R15 CALL 0x0012a230 JMP 0x001b3c9a LAB_001b3c74: MOV RDI,qword ptr [RBP + -0x48] MOV RSI,R13 MOV R13,RDI CALL 0x001b4800 MOV EAX,0x1 MOV qword ptr [RBP + -0x40],RAX LAB_001b3c8c: MOV RAX,qword ptr [RBP + -0x40] MOV EBX,EAX MOV R14,qword ptr [RBP + -0x58] MOV R15,qword ptr [RBP + -0x30] LAB_001b3c9a: DEC qword ptr [R13 + 0x70] JNZ 0x001b3cac LEA RDI,[R13 + 0x110] CALL 0x001b5005 LAB_001b3cac: MOV RDI,qword ptr [R13 + 0x100] TEST RDI,RDI JNZ 0x001b3cf0 LAB_001b3cb8: MOV RDI,R15 CALL 0x0012a1f0 LAB_001b3cc0: XOR EAX,EAX TEST EBX,EBX CMOVZ RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b3cd7: LEA RSI,[0x1ffc73] MOV RDI,R15 MOV EDX,0xaf2 CALL 0x001312ea JMP 0x001b3949 LAB_001b3cf0: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001b3cb8 LAB_001b3d02: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001b3c29 LAB_001b3d17: LEA RSI,[0x1ffc73] MOV RDI,R15 MOV EDX,0xb96 CALL 0x001312ea JMP 0x001b3c9a
void * simple_key_cache_read (char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5, uint param_6) { long *plVar1; uint uVar2; char *pcVar3; uint uVar4; long lVar5; int4 *puVar6; void *pvVar7; ulong uVar8; ulong uVar9; int iVar10; pthread_mutex_t *ppVar11; int local_78; int4 local_74; ulong local_70; ulong local_68; void *local_60; void *local_58; char *local_50; ulong local_48; uint local_40; int4 local_3c; pthread_mutex_t *local_38; local_74 = param_4; if (*param_1 == '\0') { *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; lVar5 = my_pread(param_2,param_5,param_6,param_3,4); uVar4 = (uint)(lVar5 != 0); } else { ppVar11 = (pthread_mutex_t *)(param_1 + 0xc0); local_40 = param_6; local_3c = param_2; if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2); } local_60 = param_5; if (param_1[1] != '\0') { do { if (param_1[2] != '\0') break; wait_on_queue(param_1 + 0x108,ppVar11); } while (param_1[1] != '\0'); } *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1; local_48 = 0; uVar8 = param_3 % (ulong)*(uint *)(param_1 + 0x18); local_58 = local_60; uVar4 = local_40; local_50 = param_1; local_38 = ppVar11; do { if (param_1[3] == '\0') { *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } ppVar11 = local_38; pthread_mutex_unlock(local_38); lVar5 = my_pread(local_3c,local_58,uVar4,param_3,4); param_5 = local_60; uVar4 = 1; if (lVar5 == 0) { uVar4 = (uint)local_48; } if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb96); } goto LAB_001b3c9a; } iVar10 = (int)uVar8; uVar2 = *(int *)(param_1 + 0x18) - iVar10; if (uVar4 < (uint)(*(int *)(param_1 + 0x18) - iVar10)) { uVar2 = uVar4; } uVar9 = (ulong)uVar2; *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; local_68 = uVar8; local_40 = uVar4; lVar5 = find_key_block(param_1,local_3c,param_3 - uVar8,local_74,0,&local_78); local_70 = uVar9; if (lVar5 == 0) { *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; local_68 = param_3; if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } ppVar11 = local_38; pthread_mutex_unlock(local_38); lVar5 = my_pread(local_3c,local_58,local_70,local_68); local_48 = (ulong)(lVar5 != 0); if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb29); } } else { if ((*(byte *)(lVar5 + 0x50) & 1) == 0) { if (local_78 == 2) { wait_on_queue(lVar5 + 0x28,local_38); } else if (local_78 == 1) { read_block_primary(local_50,lVar5,*(int4 *)(local_50 + 0x18),uVar2 + iVar10); } else if (*(uint *)(lVar5 + 0x4c) < uVar2 + iVar10) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0xffffffff; *(byte *)(lVar5 + 0x50) = *(byte *)(lVar5 + 0x50) | 1; } } pcVar3 = local_50; if ((*(byte *)(lVar5 + 0x50) & 1) == 0) { if (*(long *)(local_50 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_38); memcpy(local_58,(void *)(local_68 + *(long *)(lVar5 + 0x40)),local_70); if (*(long *)(pcVar3 + 0x100) == 0) { pthread_mutex_lock(local_38); } else { psi_mutex_lock(local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb5e); } } remove_reader(lVar5); param_1 = local_50; if ((*(byte *)(lVar5 + 0x50) & 1) != 0) { free_block(local_50,lVar5); local_48 = 1; break; } unreg_request(local_50,lVar5,1); } local_58 = (void *)((long)local_58 + local_70); param_3 = (param_3 - uVar8) + (ulong)(iVar10 + uVar2); uVar8 = 0; uVar4 = local_40 - uVar2; } while (uVar4 != 0); uVar4 = (uint)local_48; param_5 = local_60; ppVar11 = local_38; LAB_001b3c9a: plVar1 = (long *)(param_1 + 0x70); *plVar1 = *plVar1 + -1; if (*plVar1 == 0) { release_whole_queue(param_1 + 0x110); } if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar11); } pvVar7 = (void *)0x0; if (uVar4 == 0) { pvVar7 = param_5; } return pvVar7; }
39,666
change_simple_key_cache_param
eloqsql/mysys/mf_keycache.c
static void change_simple_key_cache_param(SIMPLE_KEY_CACHE_CB *keycache, uint division_limit, uint age_threshold) { DBUG_ENTER("change_simple_key_cache_param"); keycache_pthread_mutex_lock(&keycache->cache_lock); if (division_limit) keycache->min_warm_blocks= (keycache->disk_blocks * division_limit / 100 + 1); if (age_threshold) keycache->age_threshold= (keycache->disk_blocks * age_threshold / 100); keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_VOID_RETURN; }
O3
c
change_simple_key_cache_param: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r15d movl %esi, %r12d movq %rdi, %r14 leaq 0xc0(%rdi), %rbx cmpq $0x0, 0x100(%rdi) jne 0x991fb movq %rbx, %rdi callq 0x29220 testl %r12d, %r12d je 0x991c6 imull 0x48(%r14), %r12d imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F shrq $0x25, %rax incl %eax movq %rax, 0x20(%r14) testl %r15d, %r15d je 0x991df imull 0x48(%r14), %r15d imulq $0x51eb851f, %r15, %rax # imm = 0x51EB851F shrq $0x25, %rax movq %rax, 0x28(%r14) movq 0x100(%r14), %rdi testq %rdi, %rdi jne 0x99211 movq %rbx, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x291e0 leaq 0x43169(%rip), %rsi # 0xdc36b movq %rbx, %rdi movl $0x399, %edx # imm = 0x399 callq 0x2eb8f jmp 0x991ab leaq 0x2ecdf8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x991eb
change_simple_key_cache_param: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r15d, edx mov r12d, esi mov r14, rdi lea rbx, [rdi+0C0h] cmp qword ptr [rdi+100h], 0 jnz short loc_991FB mov rdi, rbx call _pthread_mutex_lock loc_991AB: test r12d, r12d jz short loc_991C6 imul r12d, [r14+48h] imul rax, r12, 51EB851Fh shr rax, 25h inc eax mov [r14+20h], rax loc_991C6: test r15d, r15d jz short loc_991DF imul r15d, [r14+48h] imul rax, r15, 51EB851Fh shr rax, 25h mov [r14+28h], rax loc_991DF: mov rdi, [r14+100h] test rdi, rdi jnz short loc_99211 loc_991EB: mov rdi, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_991FB: lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 399h call psi_mutex_lock jmp short loc_991AB loc_99211: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_991EB
long long change_simple_key_cache_param(long long a1, int a2, int a3) { if ( *(_QWORD *)(a1 + 256) ) psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x399u); else pthread_mutex_lock(a1 + 192); if ( a2 ) *(_QWORD *)(a1 + 32) = *(_DWORD *)(a1 + 72) * a2 / 0x64u + 1; if ( a3 ) *(_QWORD *)(a1 + 40) = (unsigned int)(*(_DWORD *)(a1 + 72) * a3) / 0x64uLL; if ( *(_QWORD *)(a1 + 256) ) PSI_server[44](); return pthread_mutex_unlock(a1 + 192); }
change_simple_key_cache_param: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15D,EDX MOV R12D,ESI MOV R14,RDI LEA RBX,[RDI + 0xc0] CMP qword ptr [RDI + 0x100],0x0 JNZ 0x001991fb MOV RDI,RBX CALL 0x00129220 LAB_001991ab: TEST R12D,R12D JZ 0x001991c6 IMUL R12D,dword ptr [R14 + 0x48] IMUL RAX,R12,0x51eb851f SHR RAX,0x25 INC EAX MOV qword ptr [R14 + 0x20],RAX LAB_001991c6: TEST R15D,R15D JZ 0x001991df IMUL R15D,dword ptr [R14 + 0x48] IMUL RAX,R15,0x51eb851f SHR RAX,0x25 MOV qword ptr [R14 + 0x28],RAX LAB_001991df: MOV RDI,qword ptr [R14 + 0x100] TEST RDI,RDI JNZ 0x00199211 LAB_001991eb: MOV RDI,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001291e0 LAB_001991fb: LEA RSI,[0x1dc36b] MOV RDI,RBX MOV EDX,0x399 CALL 0x0012eb8f JMP 0x001991ab LAB_00199211: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001991eb
void change_simple_key_cache_param(long param_1,int param_2,int param_3) { pthread_mutex_t *__mutex; __mutex = (pthread_mutex_t *)(param_1 + 0xc0); if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x399); } if (param_2 != 0) { *(ulong *)(param_1 + 0x20) = (ulong)((uint)(param_2 * *(int *)(param_1 + 0x48)) / 100 + 1); } if (param_3 != 0) { *(ulong *)(param_1 + 0x28) = (ulong)(uint)(param_3 * *(int *)(param_1 + 0x48)) / 100; } if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return; }
39,667
ma_net_read
eloqsql/libmariadb/libmariadb/ma_net.c
ulong ma_net_read(NET *net) { size_t len,complen; #ifdef HAVE_COMPRESS if (!net->compress) { #endif len = ma_real_read (net,(size_t *)&complen); if (len == MAX_PACKET_LENGTH) { /* multi packet read */ size_t length= 0; ulong last_pos= net->where_b; do { length+= len; net->where_b+= (unsigned long)len; len= ma_real_read(net, &complen); } while (len == MAX_PACKET_LENGTH); net->where_b= last_pos; if (len != packet_error) len+= length; } net->read_pos = net->buff + net->where_b; if (len != packet_error) net->read_pos[len]=0; /* Safeguard for mysql_use_result */ return (ulong)len; #ifdef HAVE_COMPRESS } else { /* compressed protocol: -------------------------------------- packet_length 3 sequence_id 1 uncompressed_length 3 -------------------------------------- compressed data packet_length - 7 -------------------------------------- Another packet will follow if: packet_length == MAX_PACKET_LENGTH Last package will be identified by - packet_length is zero (special case) - packet_length < MAX_PACKET_LENGTH */ size_t packet_length, buffer_length; size_t current= 0, start= 0; my_bool is_multi_packet= 0; /* check if buffer is empty */ if (!net->remain_in_buf) { buffer_length= 0; } else { /* save position and restore \0 character */ buffer_length= net->buf_length; current= net->buf_length - net->remain_in_buf; start= current; net->buff[net->buf_length - net->remain_in_buf]=net->save_char; } for (;;) { if (buffer_length - current >= 4) { uchar *pos= net->buff + current; packet_length= uint3korr(pos); /* check if we have last package (special case: zero length) */ if (!packet_length) { current+= 4; /* length + sequence_id, no more data will follow */ break; } if (packet_length + 4 <= buffer_length - current) { if (!is_multi_packet) { current= current + packet_length + 4; } else { /* remove packet_header */ memmove(net->buff + current, net->buff + current + 4, buffer_length - current); buffer_length-= 4; current+= packet_length; } /* do we have last packet ? */ if (packet_length != MAX_PACKET_LENGTH) { is_multi_packet= 0; break; } else is_multi_packet= 1; if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen*/ buffer_length-= start; start= 0; } continue; } } if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen and current */ current -= start; buffer_length-= start; start= 0; } net->where_b=(unsigned long)buffer_length; if ((packet_length = ma_real_read(net,(size_t *)&complen)) == packet_error) return packet_error; if (_mariadb_uncompress(net, (unsigned char*) net->buff + net->where_b, &packet_length, &complen)) { net->error=2; /* caller will close socket */ net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_UNCOMPRESS, SQLSTATE_UNKNOWN, 0); return packet_error; } buffer_length+= complen; } /* set values */ net->buf_length= (unsigned long)buffer_length; net->remain_in_buf= (unsigned long)(buffer_length - current); net->read_pos= net->buff + start + 4; len= current - start - 4; if (is_multi_packet) len-= 4; net->save_char= net->read_pos[len]; /* Must be saved */ net->read_pos[len]=0; /* Safeguard for mysql_use_result */ } #endif return (ulong)len; }
O3
c
ma_net_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpb $0x0, 0x84(%rdi) je 0x32170 movq 0x30(%rbx), %rax testq %rax, %rax je 0x321d0 movq 0x8(%rbx), %rcx movq 0x40(%rbx), %r15 movq %r15, %r14 subq %rax, %r14 movb 0x81(%rbx), %al movb %al, (%rcx,%r14) jmp 0x321d6 leaq -0x38(%rbp), %rsi movq %rbx, %rdi callq 0x32382 movq 0x48(%rbx), %r15 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x32348 xorl %r12d, %r12d movl $0xffffff, %r13d # imm = 0xFFFFFF leaq -0x38(%rbp), %r14 addq %r13, %r12 addq %r13, 0x48(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x32382 cmpq %r13, %rax je 0x32199 movq %r15, 0x48(%rbx) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax jne 0x32345 addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) jmp 0x32363 xorl %r15d, %r15d xorl %r14d, %r14d movb $0x1, %cl leaq -0x38(%rbp), %r12 movq %r14, %rax movq %rcx, -0x40(%rbp) movq %rax, %r13 movq %r15, %rdx subq %r14, %rdx cmpq $0x4, %rdx jb 0x3221a movq 0x8(%rbx), %rdi movzwl (%rdi,%r14), %ecx movzbl 0x2(%rdi,%r14), %eax shll $0x10, %eax orq %rcx, %rax movq %rax, -0x30(%rbp) je 0x32308 leaq 0x4(%rax), %rcx cmpq %rdx, %rcx jbe 0x3227d testq %r13, %r13 je 0x32235 movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13720 subq %r13, %r14 movq %r15, 0x48(%rbx) movq %rbx, %rdi movq %r12, %rsi callq 0x32382 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x32300 movq 0x8(%rbx), %rsi addq 0x48(%rbx), %rsi movq %rbx, %rdi leaq -0x30(%rbp), %rdx movq %r12, %rcx callq 0x1ebad testb %al, %al jne 0x322db addq -0x38(%rbp), %r15 xorl %r13d, %r13d jmp 0x321e6 testb $0x1, -0x40(%rbp) je 0x3228c addq %rax, %r14 addq $0x4, %r14 jmp 0x322a3 addq %r14, %rdi leaq 0x4(%rdi), %rsi callq 0x13720 addq $-0x4, %r15 movq -0x30(%rbp), %rax addq %rax, %r14 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x32375 xorl %eax, %eax movl $0x0, %ecx testq %r13, %r13 je 0x321df movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13720 xorl %eax, %eax xorl %ecx, %ecx jmp 0x321df movb $0x2, 0x94(%rbx) movq (%rbx), %r8 movq 0x40(%r8), %rdi leaq 0x18830(%rip), %rax # 0x4ab20 movq (%rax), %rdx movl $0x1397, %esi # imm = 0x1397 xorl %ecx, %ecx xorl %eax, %eax callq *0x50(%r8) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x32363 addq $0x4, %r14 movzbl -0x40(%rbp), %eax shll $0x2, %eax orq $-0x8, %rax movq %r15, 0x40(%rbx) subq %r14, %r15 movq %r15, 0x30(%rbx) leaq (%rdi,%r13), %rcx addq $0x4, %rcx movq %rcx, 0x20(%rbx) subq %r13, %r14 addq %rax, %r14 movb (%rcx,%r14), %al movb %al, 0x81(%rbx) movb $0x0, (%rcx,%r14) jmp 0x32363 addq %r12, %rax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) cmpq %r14, %rax je 0x32363 movb $0x0, (%r15,%rax) movq %rax, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rbx), %rdi movq $-0x4, %rax jmp 0x32317
ma_net_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi cmp byte ptr [rdi+84h], 0 jz short loc_32170 mov rax, [rbx+30h] test rax, rax jz short loc_321D0 mov rcx, [rbx+8] mov r15, [rbx+40h] mov r14, r15 sub r14, rax mov al, [rbx+81h] mov [rcx+r14], al jmp short loc_321D6 loc_32170: lea rsi, [rbp+var_38] mov rdi, rbx call ma_real_read mov r15, [rbx+48h] cmp rax, 0FFFFFFh jnz loc_32348 xor r12d, r12d mov r13d, 0FFFFFFh lea r14, [rbp+var_38] loc_32199: add r12, r13 add [rbx+48h], r13 mov rdi, rbx mov rsi, r14 call ma_real_read cmp rax, r13 jz short loc_32199 mov [rbx+48h], r15 mov r14d, 0FFFFFFFFh cmp rax, r14 jnz loc_32345 add r15, [rbx+8] mov [rbx+20h], r15 jmp loc_32363 loc_321D0: xor r15d, r15d xor r14d, r14d loc_321D6: mov cl, 1 lea r12, [rbp+var_38] mov rax, r14 loc_321DF: mov [rbp+var_40], rcx mov r13, rax loc_321E6: mov rdx, r15 sub rdx, r14 cmp rdx, 4 jb short loc_3221A mov rdi, [rbx+8] movzx ecx, word ptr [rdi+r14] movzx eax, byte ptr [rdi+r14+2] shl eax, 10h or rax, rcx mov [rbp+var_30], rax jz loc_32308 lea rcx, [rax+4] cmp rcx, rdx jbe short loc_3227D loc_3221A: test r13, r13 jz short loc_32235 mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove sub r14, r13 loc_32235: mov [rbx+48h], r15 mov rdi, rbx mov rsi, r12 call ma_real_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_32300 mov rsi, [rbx+8] add rsi, [rbx+48h] mov rdi, rbx lea rdx, [rbp+var_30] mov rcx, r12 call _mariadb_uncompress test al, al jnz short loc_322DB add r15, [rbp+var_38] xor r13d, r13d jmp loc_321E6 loc_3227D: test byte ptr [rbp+var_40], 1 jz short loc_3228C add r14, rax add r14, 4 jmp short loc_322A3 loc_3228C: add rdi, r14 lea rsi, [rdi+4] call _memmove add r15, 0FFFFFFFFFFFFFFFCh mov rax, [rbp+var_30] add r14, rax loc_322A3: cmp rax, 0FFFFFFh jnz loc_32375 xor eax, eax mov ecx, 0 test r13, r13 jz loc_321DF mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove xor eax, eax xor ecx, ecx jmp loc_321DF loc_322DB: mov byte ptr [rbx+94h], 2 mov r8, [rbx] mov rdi, [r8+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 1397h xor ecx, ecx xor eax, eax call qword ptr [r8+50h] loc_32300: mov r14d, 0FFFFFFFFh jmp short loc_32363 loc_32308: add r14, 4 movzx eax, byte ptr [rbp+var_40] shl eax, 2 or rax, 0FFFFFFFFFFFFFFF8h loc_32317: mov [rbx+40h], r15 sub r15, r14 mov [rbx+30h], r15 lea rcx, [rdi+r13] add rcx, 4 mov [rbx+20h], rcx sub r14, r13 add r14, rax mov al, [rcx+r14] mov [rbx+81h], al mov byte ptr [rcx+r14], 0 jmp short loc_32363 loc_32345: add rax, r12 loc_32348: mov r14d, 0FFFFFFFFh add r15, [rbx+8] mov [rbx+20h], r15 cmp rax, r14 jz short loc_32363 mov byte ptr [r15+rax], 0 mov r14, rax loc_32363: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_32375: mov rdi, [rbx+8] mov rax, 0FFFFFFFFFFFFFFFCh jmp short loc_32317
long long ma_net_read(long long a1) { long long v2; // rax long long v3; // r15 long long v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // r12 long long v8; // rax long long v9; // r14 char v10; // cl long long v11; // rax long long i; // r13 unsigned long long v13; // rdx long long v14; // rdi unsigned long long v15; // rax unsigned long long v16; // rax long long v17; // rcx long long v18; // r15 char v20; // [rsp+0h] [rbp-40h] long long v21; // [rsp+8h] [rbp-38h] BYREF long long v22[6]; // [rsp+10h] [rbp-30h] BYREF if ( *(_BYTE *)(a1 + 132) ) { v2 = *(_QWORD *)(a1 + 48); if ( v2 ) { v3 = *(_QWORD *)(a1 + 64); v4 = v3 - v2; *(_BYTE *)(*(_QWORD *)(a1 + 8) + v3 - v2) = *(_BYTE *)(a1 + 129); } else { v3 = 0LL; v4 = 0LL; } v10 = 1; v11 = v4; while ( 1 ) { v20 = v10; for ( i = v11; ; i = 0LL ) { v13 = v3 - v4; if ( (unsigned long long)(v3 - v4) >= 4 ) { v14 = *(_QWORD *)(a1 + 8); v15 = *(unsigned __int16 *)(v14 + v4) | (unsigned long long)(*(unsigned __int8 *)(v14 + v4 + 2) << 16); v22[0] = v15; if ( !v15 ) { v4 += 4LL; v16 = (4 * v20) | 0xFFFFFFFFFFFFFFF8LL; goto LABEL_29; } if ( v15 + 4 <= v13 ) break; } if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v4 -= i; } *(_QWORD *)(a1 + 72) = v3; v22[0] = ma_real_read(a1, &v21); if ( v22[0] == 0xFFFFFFFFLL ) return 0xFFFFFFFFLL; if ( (unsigned __int8)mariadb_uncompress(a1, *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8), v22, &v21) ) { *(_BYTE *)(a1 + 148) = 2; (*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))( *(_QWORD *)(*(_QWORD *)a1 + 64LL), 5015LL, SQLSTATE_UNKNOWN, 0LL); return 0xFFFFFFFFLL; } v3 += v21; } if ( (v20 & 1) != 0 ) { v4 += v15 + 4; } else { memmove(v4 + v14, v4 + v14 + 4, v13); v3 -= 4LL; v15 = v22[0]; v4 += v22[0]; } if ( v15 != 0xFFFFFF ) break; v11 = 0LL; v10 = 0; if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v11 = 0LL; v10 = 0; } } v14 = *(_QWORD *)(a1 + 8); v16 = -4LL; LABEL_29: *(_QWORD *)(a1 + 64) = v3; *(_QWORD *)(a1 + 48) = v3 - v4; v17 = v14 + i + 4; *(_QWORD *)(a1 + 32) = v17; v9 = v16 + v4 - i; *(_BYTE *)(a1 + 129) = *(_BYTE *)(v17 + v9); *(_BYTE *)(v17 + v9) = 0; } else { v5 = ma_real_read(a1, &v21); v6 = *(_QWORD *)(a1 + 72); if ( v5 == 0xFFFFFF ) { v7 = 0LL; do { v7 += 0xFFFFFFLL; *(_QWORD *)(a1 + 72) += 0xFFFFFFLL; v8 = ma_real_read(a1, &v21); } while ( v8 == 0xFFFFFF ); *(_QWORD *)(a1 + 72) = v6; v9 = 0xFFFFFFFFLL; if ( v8 == 0xFFFFFFFFLL ) { *(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 8) + v6; return v9; } v5 = v7 + v8; } v9 = 0xFFFFFFFFLL; v18 = *(_QWORD *)(a1 + 8) + v6; *(_QWORD *)(a1 + 32) = v18; if ( v5 != 0xFFFFFFFFLL ) { *(_BYTE *)(v18 + v5) = 0; return v5; } } return v9; }
ma_net_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP byte ptr [RDI + 0x84],0x0 JZ 0x00132170 MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x001321d0 MOV RCX,qword ptr [RBX + 0x8] MOV R15,qword ptr [RBX + 0x40] MOV R14,R15 SUB R14,RAX MOV AL,byte ptr [RBX + 0x81] MOV byte ptr [RCX + R14*0x1],AL JMP 0x001321d6 LAB_00132170: LEA RSI,[RBP + -0x38] MOV RDI,RBX CALL 0x00132382 MOV R15,qword ptr [RBX + 0x48] CMP RAX,0xffffff JNZ 0x00132348 XOR R12D,R12D MOV R13D,0xffffff LEA R14,[RBP + -0x38] LAB_00132199: ADD R12,R13 ADD qword ptr [RBX + 0x48],R13 MOV RDI,RBX MOV RSI,R14 CALL 0x00132382 CMP RAX,R13 JZ 0x00132199 MOV qword ptr [RBX + 0x48],R15 MOV R14D,0xffffffff CMP RAX,R14 JNZ 0x00132345 ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 JMP 0x00132363 LAB_001321d0: XOR R15D,R15D XOR R14D,R14D LAB_001321d6: MOV CL,0x1 LEA R12,[RBP + -0x38] MOV RAX,R14 LAB_001321df: MOV qword ptr [RBP + -0x40],RCX MOV R13,RAX LAB_001321e6: MOV RDX,R15 SUB RDX,R14 CMP RDX,0x4 JC 0x0013221a MOV RDI,qword ptr [RBX + 0x8] MOVZX ECX,word ptr [RDI + R14*0x1] MOVZX EAX,byte ptr [RDI + R14*0x1 + 0x2] SHL EAX,0x10 OR RAX,RCX MOV qword ptr [RBP + -0x30],RAX JZ 0x00132308 LEA RCX,[RAX + 0x4] CMP RCX,RDX JBE 0x0013227d LAB_0013221a: TEST R13,R13 JZ 0x00132235 MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113720 SUB R14,R13 LAB_00132235: MOV qword ptr [RBX + 0x48],R15 MOV RDI,RBX MOV RSI,R12 CALL 0x00132382 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JZ 0x00132300 MOV RSI,qword ptr [RBX + 0x8] ADD RSI,qword ptr [RBX + 0x48] MOV RDI,RBX LEA RDX,[RBP + -0x30] MOV RCX,R12 CALL 0x0011ebad TEST AL,AL JNZ 0x001322db ADD R15,qword ptr [RBP + -0x38] XOR R13D,R13D JMP 0x001321e6 LAB_0013227d: TEST byte ptr [RBP + -0x40],0x1 JZ 0x0013228c ADD R14,RAX ADD R14,0x4 JMP 0x001322a3 LAB_0013228c: ADD RDI,R14 LEA RSI,[RDI + 0x4] CALL 0x00113720 ADD R15,-0x4 MOV RAX,qword ptr [RBP + -0x30] ADD R14,RAX LAB_001322a3: CMP RAX,0xffffff JNZ 0x00132375 XOR EAX,EAX MOV ECX,0x0 TEST R13,R13 JZ 0x001321df MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113720 XOR EAX,EAX XOR ECX,ECX JMP 0x001321df LAB_001322db: MOV byte ptr [RBX + 0x94],0x2 MOV R8,qword ptr [RBX] MOV RDI,qword ptr [R8 + 0x40] LEA RAX,[0x14ab20] MOV RDX,qword ptr [RAX] MOV ESI,0x1397 XOR ECX,ECX XOR EAX,EAX CALL qword ptr [R8 + 0x50] LAB_00132300: MOV R14D,0xffffffff JMP 0x00132363 LAB_00132308: ADD R14,0x4 MOVZX EAX,byte ptr [RBP + -0x40] SHL EAX,0x2 OR RAX,-0x8 LAB_00132317: MOV qword ptr [RBX + 0x40],R15 SUB R15,R14 MOV qword ptr [RBX + 0x30],R15 LEA RCX,[RDI + R13*0x1] ADD RCX,0x4 MOV qword ptr [RBX + 0x20],RCX SUB R14,R13 ADD R14,RAX MOV AL,byte ptr [RCX + R14*0x1] MOV byte ptr [RBX + 0x81],AL MOV byte ptr [RCX + R14*0x1],0x0 JMP 0x00132363 LAB_00132345: ADD RAX,R12 LAB_00132348: MOV R14D,0xffffffff ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 CMP RAX,R14 JZ 0x00132363 MOV byte ptr [R15 + RAX*0x1],0x0 MOV R14,RAX LAB_00132363: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00132375: MOV RDI,qword ptr [RBX + 0x8] MOV RAX,-0x4 JMP 0x00132317
long ma_net_read(long *param_1) { char cVar1; ulong uVar2; long lVar3; long lVar4; size_t __n; long lVar5; long lVar6; size_t __n_00; long local_40; ulong local_38; if (*(char *)((long)param_1 + 0x84) == '\0') { lVar4 = ma_real_read(param_1,&local_40); lVar6 = param_1[9]; if (lVar4 == 0xffffff) { lVar3 = 0; do { lVar3 = lVar3 + 0xffffff; param_1[9] = param_1[9] + 0xffffff; lVar4 = ma_real_read(param_1,&local_40); } while (lVar4 == 0xffffff); param_1[9] = lVar6; if (lVar4 == 0xffffffff) { param_1[4] = lVar6 + param_1[1]; return 0xffffffff; } lVar4 = lVar4 + lVar3; } param_1[4] = lVar6 + param_1[1]; lVar3 = 0xffffffff; if (lVar4 != 0xffffffff) { *(int1 *)(lVar6 + param_1[1] + lVar4) = 0; lVar3 = lVar4; } return lVar3; } if (param_1[6] == 0) { __n_00 = 0; lVar6 = 0; } else { __n_00 = param_1[8]; lVar6 = __n_00 - param_1[6]; *(int1 *)(param_1[1] + lVar6) = *(int1 *)((long)param_1 + 0x81); } lVar3 = 1; lVar4 = lVar6; LAB_001321e6: do { lVar5 = lVar4; __n = __n_00 - lVar6; if (3 < __n) { lVar4 = param_1[1]; local_38 = (ulong)CONCAT12(*(int1 *)(lVar4 + 2 + lVar6),*(int2 *)(lVar4 + lVar6)); if (local_38 == 0) { lVar6 = lVar6 + 4; uVar2 = lVar3 << 2 | 0xfffffffffffffff8; LAB_00132317: param_1[8] = __n_00; param_1[6] = __n_00 - lVar6; lVar4 = lVar4 + lVar5 + 4; param_1[4] = lVar4; lVar6 = (lVar6 - lVar5) + uVar2; *(int1 *)((long)param_1 + 0x81) = *(int1 *)(lVar4 + lVar6); *(int1 *)(lVar4 + lVar6) = 0; return lVar6; } if (local_38 + 4 <= __n) { if (lVar3 == 0) { memmove((void *)(lVar4 + lVar6),(void *)(lVar4 + lVar6 + 4),__n); __n_00 = __n_00 - 4; lVar6 = lVar6 + local_38; } else { lVar6 = lVar6 + local_38 + 4; } if (local_38 != 0xffffff) { lVar4 = param_1[1]; uVar2 = 0xfffffffffffffffc; goto LAB_00132317; } lVar3 = 0; lVar4 = 0; if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar3 = 0; lVar4 = 0; } goto LAB_001321e6; } } if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar6 = lVar6 - lVar5; } param_1[9] = __n_00; local_38 = ma_real_read(param_1,&local_40); if (local_38 == 0xffffffff) { return 0xffffffff; } cVar1 = _mariadb_uncompress(param_1,param_1[1] + param_1[9],&local_38,&local_40); if (cVar1 != '\0') { *(int1 *)((long)param_1 + 0x94) = 2; (**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x1397,SQLSTATE_UNKNOWN,0); return 0xffffffff; } __n_00 = __n_00 + local_40; lVar4 = 0; } while( true ); }
39,668
fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>&)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 void move(basic_memory_buffer& other) { alloc_ = std::move(other.alloc_); T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (data == other.store_) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); } else { this->set(data, capacity); // Set pointer to the inline array so that delete is not called // when deallocating. other.set(other.store_, 0); other.clear(); } this->resize(size); }
O1
c
fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rsi), %rcx movq 0x8(%rsi), %r14 movq 0x10(%rsi), %rdx leaq 0x20(%rsi), %rax cmpq %rax, %rcx je 0x44ee9 movq %rcx, (%rbx) movq %rdx, 0x10(%rbx) movq %rax, (%rsi) addq $0x8, %rsi xorps %xmm0, %xmm0 movups %xmm0, (%rsi) jmp 0x44f12 leaq 0x20(%rbx), %rcx movq %rcx, (%rbx) movq %rdx, 0x10(%rbx) testq %r14, %r14 je 0x44f12 leaq (,%r14,4), %rdx xorl %esi, %esi movl (%rax,%rsi), %edi movl %edi, (%rcx,%rsi) addq $0x4, %rsi cmpq %rsi, %rdx jne 0x44f03 cmpq %r14, 0x10(%rbx) jae 0x44f21 movq %rbx, %rdi movq %r14, %rsi callq *0x18(%rbx) movq 0x10(%rbx), %rax cmpq %rax, %r14 cmovbq %r14, %rax movq %rax, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN3fmt3v1119basic_memory_bufferIjLm32ENS0_6detail9allocatorIjEEE4moveERS5_: push r14 push rbx push rax mov rbx, rdi mov rcx, [rsi] mov r14, [rsi+8] mov rdx, [rsi+10h] lea rax, [rsi+20h] cmp rcx, rax jz short loc_44EE9 mov [rbx], rcx mov [rbx+10h], rdx mov [rsi], rax add rsi, 8 xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 jmp short loc_44F12 loc_44EE9: lea rcx, [rbx+20h] mov [rbx], rcx mov [rbx+10h], rdx test r14, r14 jz short loc_44F12 lea rdx, ds:0[r14*4] xor esi, esi loc_44F03: mov edi, [rax+rsi] mov [rcx+rsi], edi add rsi, 4 cmp rdx, rsi jnz short loc_44F03 loc_44F12: cmp [rbx+10h], r14 jnb short loc_44F21 mov rdi, rbx mov rsi, r14 call qword ptr [rbx+18h] loc_44F21: mov rax, [rbx+10h] cmp r14, rax cmovb rax, r14 mov [rbx+8], rax add rsp, 8 pop rbx pop r14 retn
unsigned long long fmt::v11::basic_memory_buffer<unsigned int,32ul,fmt::v11::detail::allocator<unsigned int>>::move( long long a1, _QWORD *a2) { unsigned long long v2; // r14 long long v3; // rdx _QWORD *v4; // rax long long v5; // rsi unsigned long long result; // rax v2 = a2[1]; v3 = a2[2]; v4 = a2 + 4; if ( (_QWORD *)*a2 == a2 + 4 ) { *(_QWORD *)a1 = a1 + 32; *(_QWORD *)(a1 + 16) = v3; if ( v2 ) { v5 = 0LL; do { *(_DWORD *)(a1 + 32 + v5) = *(_DWORD *)((char *)v4 + v5); v5 += 4LL; } while ( 4 * v2 != v5 ); } } else { *(_QWORD *)a1 = *a2; *(_QWORD *)(a1 + 16) = v3; *a2 = v4; *(_OWORD *)(a2 + 1) = 0LL; } if ( *(_QWORD *)(a1 + 16) < v2 ) (*(void ( **)(long long, unsigned long long))(a1 + 24))(a1, v2); result = *(_QWORD *)(a1 + 16); if ( v2 < result ) result = v2; *(_QWORD *)(a1 + 8) = result; return result; }
move: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RCX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI + 0x10] LEA RAX,[RSI + 0x20] CMP RCX,RAX JZ 0x00144ee9 MOV qword ptr [RBX],RCX MOV qword ptr [RBX + 0x10],RDX MOV qword ptr [RSI],RAX ADD RSI,0x8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 JMP 0x00144f12 LAB_00144ee9: LEA RCX,[RBX + 0x20] MOV qword ptr [RBX],RCX MOV qword ptr [RBX + 0x10],RDX TEST R14,R14 JZ 0x00144f12 LEA RDX,[R14*0x4] XOR ESI,ESI LAB_00144f03: MOV EDI,dword ptr [RAX + RSI*0x1] MOV dword ptr [RCX + RSI*0x1],EDI ADD RSI,0x4 CMP RDX,RSI JNZ 0x00144f03 LAB_00144f12: CMP qword ptr [RBX + 0x10],R14 JNC 0x00144f21 MOV RDI,RBX MOV RSI,R14 CALL qword ptr [RBX + 0x18] LAB_00144f21: MOV RAX,qword ptr [RBX + 0x10] CMP R14,RAX CMOVC RAX,R14 MOV qword ptr [RBX + 0x8],RAX ADD RSP,0x8 POP RBX POP R14 RET
/* fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int> >::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int> >&) */ void __thiscall fmt::v11::basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>>::move (basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>> *this, basic_memory_buffer *param_1) { basic_memory_buffer *pbVar1; ulong uVar2; int8 uVar3; ulong uVar4; long lVar5; uVar2 = *(ulong *)(param_1 + 8); uVar3 = *(int8 *)(param_1 + 0x10); pbVar1 = param_1 + 0x20; if (*(basic_memory_buffer **)param_1 == pbVar1) { *(basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>> **)this = this + 0x20; *(int8 *)(this + 0x10) = uVar3; if (uVar2 != 0) { lVar5 = 0; do { *(int4 *)(this + 0x20 + lVar5) = *(int4 *)(pbVar1 + lVar5); lVar5 = lVar5 + 4; } while (uVar2 * 4 - lVar5 != 0); } } else { *(basic_memory_buffer **)this = *(basic_memory_buffer **)param_1; *(int8 *)(this + 0x10) = uVar3; *(basic_memory_buffer **)param_1 = pbVar1; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; } if (*(ulong *)(this + 0x10) < uVar2) { (**(code **)(this + 0x18))(this,uVar2); } uVar4 = *(ulong *)(this + 0x10); if (uVar2 < *(ulong *)(this + 0x10)) { uVar4 = uVar2; } *(ulong *)(this + 8) = uVar4; return; }
39,669
evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)253>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp
[[release_inline]] inline Position invoke(const CostTable& cost_table, const uint256* stack_bottom, Position pos, int64_t& gas, ExecutionState& state) noexcept { if (const auto status = check_requirements<Op>(cost_table, gas, pos.stack_top, stack_bottom); status != EVMC_SUCCESS) { state.status = status; return {nullptr, pos.stack_top}; } const auto new_pos = invoke(instr::core::impl<Op>, pos, gas, state); const auto new_stack_top = pos.stack_top + instr::traits[Op].stack_height_change; return {new_pos, new_stack_top}; }
O3
cpp
evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)253>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx testw %di, %di js 0x22979 movq %rdx, %r15 addq $0x20, %rsi cmpq %rdx, %rsi jae 0x2297d movq %rcx, %r14 movzwl %di, %ecx movq (%r14), %rax subq %rcx, %rax movq %rax, (%r14) js 0x22981 movdqu -0x20(%r15), %xmm0 movdqu -0x10(%r15), %xmm1 por %xmm0, %xmm1 ptest %xmm1, %xmm1 je 0x2294b movq -0x10(%r15), %rcx orq -0x8(%r15), %rcx pushq $0x3 popq %rbp orq -0x18(%r15), %rcx jne 0x22968 movq -0x20(%r15), %rcx movq %rcx, %rdx shrq $0x20, %rdx jne 0x22968 movq 0x10(%r15), %rdx orq 0x18(%r15), %rdx orq 0x8(%r15), %rdx jne 0x22968 movq (%r15), %rdx movq %rdx, %rsi shrq $0x20, %rsi jne 0x22968 addq %rcx, %rdx cmpq 0x10(%rbx), %rdx jbe 0x22946 leaq 0x8(%rbx), %rsi movq %rax, %rdi callq 0x41c31 testq %rax, %rax js 0x22968 movq -0x20(%r15), %rcx movq %rcx, 0x88(%rbx) pushq $0x2 popq %rbp testq %rcx, %rcx je 0x22968 movq (%r15), %rcx movq %rcx, 0x80(%rbx) movq %rax, (%r14) movl %ebp, 0x78(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x5 jmp 0x22983 pushq $0x7 jmp 0x22983 pushq $0x3 popq %rbp jmp 0x2296b
_ZN6evmone8baseline12_GLOBAL__N_16invokeILNS_6OpcodeE253EEENS1_8PositionERKSt5arrayIsLm256EEPKN4intx4uintILj256EEES4_RlRNS_14ExecutionStateE: push rbp push r15 push r14 push rbx push rax mov rbx, r8 test di, di js loc_22979 mov r15, rdx add rsi, 20h ; ' ' cmp rsi, rdx jnb loc_2297D mov r14, rcx movzx ecx, di mov rax, [r14] sub rax, rcx mov [r14], rax js loc_22981 movdqu xmm0, xmmword ptr [r15-20h] movdqu xmm1, xmmword ptr [r15-10h] por xmm1, xmm0 ptest xmm1, xmm1 jz short loc_2294B mov rcx, [r15-10h] or rcx, [r15-8] push 3 pop rbp or rcx, [r15-18h] jnz short loc_22968 mov rcx, [r15-20h]; unsigned __int64 mov rdx, rcx shr rdx, 20h jnz short loc_22968 mov rdx, [r15+10h] or rdx, [r15+18h] or rdx, [r15+8] jnz short loc_22968 mov rdx, [r15] mov rsi, rdx shr rsi, 20h jnz short loc_22968 add rdx, rcx; evmone::Memory * cmp rdx, [rbx+10h] jbe short loc_22946 lea rsi, [rbx+8]; __int64 mov rdi, rax; this call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) loc_22946: test rax, rax js short loc_22968 loc_2294B: mov rcx, [r15-20h] mov [rbx+88h], rcx push 2 pop rbp test rcx, rcx jz short loc_22968 mov rcx, [r15] mov [rbx+80h], rcx loc_22968: mov [r14], rax loc_2296B: mov [rbx+78h], ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_22979: push 5 jmp short loc_22983 loc_2297D: push 7 jmp short loc_22983 loc_22981: push 3 loc_22983: pop rbp jmp short loc_2296B
evmone * evmone::baseline::`anonymous namespace'::invoke<(evmone::Opcode)253>( __int16 a1, long long a2, const __m128i *a3, evmone **a4, long long a5) { evmone *result; // rax __m128i v9; // xmm1 int v10; // ebp unsigned long long v11; // rcx evmone::Memory *v12; // rdx long long v13; // rcx int v14; // [rsp-10h] [rbp-30h] if ( a1 < 0 ) { v14 = 5; LABEL_19: v10 = v14; goto LABEL_15; } if ( a2 + 32 >= (unsigned long long)a3 ) { v14 = 7; goto LABEL_19; } result = (evmone *)((char *)*a4 - (unsigned __int16)a1); *a4 = result; if ( (long long)result < 0 ) { v14 = 3; goto LABEL_19; } v9 = _mm_or_si128(_mm_loadu_si128(a3 - 1), _mm_loadu_si128(a3 - 2)); if ( _mm_testz_si128(v9, v9) ) goto LABEL_12; v10 = 3; if ( !(a3[-2].m128i_i64[1] | a3[-1].m128i_i64[1] | a3[-1].m128i_i64[0]) ) { v11 = a3[-2].m128i_u64[0]; if ( !HIDWORD(v11) && !(a3->m128i_i64[1] | a3[1].m128i_i64[1] | a3[1].m128i_i64[0]) && !HIDWORD(a3->m128i_i64[0]) ) { v12 = (evmone::Memory *)(v11 + a3->m128i_i64[0]); if ( (unsigned long long)v12 > *(_QWORD *)(a5 + 16) ) result = (evmone *)evmone::grow_memory(result, a5 + 8, v12, v11); if ( (long long)result >= 0 ) { LABEL_12: v13 = a3[-2].m128i_i64[0]; *(_QWORD *)(a5 + 136) = v13; v10 = 2; if ( v13 ) *(_QWORD *)(a5 + 128) = a3->m128i_i64[0]; } } } *a4 = result; LABEL_15: *(_DWORD *)(a5 + 120) = v10; return result; }
invoke<(evmone::Opcode)253>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 TEST DI,DI JS 0x00122979 MOV R15,RDX ADD RSI,0x20 CMP RSI,RDX JNC 0x0012297d MOV R14,RCX MOVZX ECX,DI MOV RAX,qword ptr [R14] SUB RAX,RCX MOV qword ptr [R14],RAX JS 0x00122981 MOVDQU XMM0,xmmword ptr [R15 + -0x20] MOVDQU XMM1,xmmword ptr [R15 + -0x10] POR XMM1,XMM0 PTEST XMM1,XMM1 JZ 0x0012294b MOV RCX,qword ptr [R15 + -0x10] OR RCX,qword ptr [R15 + -0x8] PUSH 0x3 POP RBP OR RCX,qword ptr [R15 + -0x18] JNZ 0x00122968 MOV RCX,qword ptr [R15 + -0x20] MOV RDX,RCX SHR RDX,0x20 JNZ 0x00122968 MOV RDX,qword ptr [R15 + 0x10] OR RDX,qword ptr [R15 + 0x18] OR RDX,qword ptr [R15 + 0x8] JNZ 0x00122968 MOV RDX,qword ptr [R15] MOV RSI,RDX SHR RSI,0x20 JNZ 0x00122968 ADD RDX,RCX CMP RDX,qword ptr [RBX + 0x10] JBE 0x00122946 LEA RSI,[RBX + 0x8] MOV RDI,RAX CALL 0x00141c31 LAB_00122946: TEST RAX,RAX JS 0x00122968 LAB_0012294b: MOV RCX,qword ptr [R15 + -0x20] MOV qword ptr [RBX + 0x88],RCX PUSH 0x2 POP RBP TEST RCX,RCX JZ 0x00122968 MOV RCX,qword ptr [R15] MOV qword ptr [RBX + 0x80],RCX LAB_00122968: MOV qword ptr [R14],RAX LAB_0012296b: MOV dword ptr [RBX + 0x78],EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00122979: PUSH 0x5 JMP 0x00122983 LAB_0012297d: PUSH 0x7 JMP 0x00122983 LAB_00122981: PUSH 0x3 LAB_00122983: POP RBP JMP 0x0012296b
/* evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)253>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) */ void evmone::baseline::(anonymous_namespace)::invoke<(evmone::Opcode)253> (ushort param_1,long param_2,ulong *param_3,long *param_4,long param_5) { long lVar1; ulong uVar2; int4 uVar3; if ((short)param_1 < 0) { uVar3 = 5; goto LAB_0012296b; } if (param_3 <= (ulong *)(param_2 + 0x20)) { uVar3 = 7; goto LAB_0012296b; } lVar1 = *param_4 - (ulong)param_1; *param_4 = lVar1; if (lVar1 < 0) { uVar3 = 3; goto LAB_0012296b; } if (*(int1 (*) [16])(param_3 + -2) == (int1 [16])0x0 && *(int1 (*) [16])(param_3 + -4) == (int1 [16])0x0) { LAB_0012294b: uVar2 = param_3[-4]; *(ulong *)(param_5 + 0x88) = uVar2; uVar3 = 2; if (uVar2 != 0) { *(ulong *)(param_5 + 0x80) = *param_3; } } else { uVar3 = 3; if (((((param_3[-2] == 0 && param_3[-1] == 0) && param_3[-3] == 0) && (param_3[-4] >> 0x20 == 0) ) && ((param_3[2] == 0 && param_3[3] == 0) && param_3[1] == 0)) && (*param_3 >> 0x20 == 0)) { uVar2 = *param_3 + param_3[-4]; if (*(ulong *)(param_5 + 0x10) < uVar2) { lVar1 = grow_memory(lVar1,(Memory *)(param_5 + 8),uVar2); } if (-1 < lVar1) goto LAB_0012294b; } } *param_4 = lVar1; LAB_0012296b: *(int4 *)(param_5 + 0x78) = uVar3; return; }
39,670
my_long10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *e; long int new_val; uint sign=0; unsigned long int uval = (unsigned long int) val; e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval= (unsigned long int)0 - uval; *dst++= '-'; len--; sign= 1; } } new_val = (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } len= MY_MIN(len, (size_t) (e-p)); memcpy(dst, p, len); return len+sign; }
O3
c
my_long10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r10 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb $0x0, -0x1f(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0x4187b negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r10 movl $0x1, %r14d jmp 0x4187e xorl %r14d, %r14d leaq -0x1f(%rbp), %rbx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %r8, %rax mulq %rcx movq %rdx, %r9 shrq $0x3, %r9 imull $0xf6, %r9d, %eax addl %r8d, %eax addb $0x30, %al leaq -0x20(%rbp), %rsi movb %al, (%rsi) cmpq $0xa, %r8 jb 0x418d5 movq %r9, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r9d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi cmpq $0x9, %r9 movq %rdx, %r9 ja 0x418b1 subq %rsi, %rbx cmpq %rbx, %r10 cmovbq %r10, %rbx movq %rbx, %rdx callq 0x24290 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x41905 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x243e0
my_long10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r10, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax mov [rbp+var_1F], 0 test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_4187B neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r10 mov r14d, 1 jmp short loc_4187E loc_4187B: xor r14d, r14d loc_4187E: lea rbx, [rbp+var_1F] mov rcx, 0CCCCCCCCCCCCCCCDh mov rax, r8 mul rcx mov r9, rdx shr r9, 3 imul eax, r9d, 0F6h add eax, r8d add al, 30h ; '0' lea rsi, [rbp+var_20] mov [rsi], al cmp r8, 0Ah jb short loc_418D5 loc_418B1: mov rax, r9 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r9d add al, 30h ; '0' mov [rsi-1], al dec rsi cmp r9, 9 mov r9, rdx ja short loc_418B1 loc_418D5: sub rbx, rsi cmp r10, rbx cmovb rbx, r10 mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_41905 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_41905: call ___stack_chk_fail
_BYTE * my_long10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r10 _BYTE *v6; // rdi long long v7; // r14 unsigned long long v8; // r9 char *v9; // rsi bool v10; // cf bool v11; // zf _BYTE *v12; // rbx char v14; // [rsp+40h] [rbp-20h] BYREF _BYTE v15[7]; // [rsp+41h] [rbp-1Fh] BYREF unsigned long long v16; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v16 = __readfsqword(0x28u); v15[0] = 0; if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v7 = 1LL; } v8 = a5 / 0xA; v9 = &v14; v14 = a5 % 0xA + 48; if ( a5 >= 0xA ) { do { *--v9 = v8 % 0xA + 48; v10 = v8 < 9; v11 = v8 == 9; v8 /= 0xAuLL; } while ( !v10 && !v11 ); } v12 = (_BYTE *)(v15 - v9); if ( (unsigned long long)v5 < v15 - v9 ) v12 = v5; memcpy(v6, v9); return &v12[v7]; }
my_long10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R10,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1f],0x0 TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x0014187b NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R10 MOV R14D,0x1 JMP 0x0014187e LAB_0014187b: XOR R14D,R14D LAB_0014187e: LEA RBX,[RBP + -0x1f] MOV RCX,-0x3333333333333333 MOV RAX,R8 MUL RCX MOV R9,RDX SHR R9,0x3 IMUL EAX,R9D,0xf6 ADD EAX,R8D ADD AL,0x30 LEA RSI,[RBP + -0x20] MOV byte ptr [RSI],AL CMP R8,0xa JC 0x001418d5 LAB_001418b1: MOV RAX,R9 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R9D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI CMP R9,0x9 MOV R9,RDX JA 0x001418b1 LAB_001418d5: SUB RBX,RSI CMP R10,RBX CMOVC RBX,R10 MOV RDX,RBX CALL 0x00124290 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00141905 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_00141905: CALL 0x001243e0
char * my_long10_to_str_8bit (int8 param_1,int1 *param_2,char *param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; char *__n; char *__src; long in_FS_OFFSET; bool bVar3; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_29[2] = 0; bVar3 = (long)param_5 < 0; if (bVar3 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 + -1; } local_29[1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = local_29 + 1; uVar2 = param_5 / 10; while (uVar1 = uVar2, 9 < param_5) { __src[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; __src = __src + -1; uVar2 = uVar1 / 10; param_5 = uVar1; } __n = local_29 + (2 - (long)__src); if (param_3 < local_29 + (2 - (long)__src)) { __n = param_3; } memcpy(param_2,__src,(size_t)__n); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return __n + (bVar3 && param_4 < 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,671
testing::internal::edit_distance::(anonymous namespace)::Hunk::Hunk(unsigned long, unsigned long)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc
Hunk(size_t left_start, size_t right_start) : left_start_(left_start), right_start_(right_start), adds_(), removes_(), common_() {}
O0
cpp
testing::internal::edit_distance::(anonymous namespace)::Hunk::Hunk(unsigned long, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, (%rdi) movq -0x18(%rbp), %rax movq %rax, 0x8(%rdi) movq $0x0, 0x10(%rdi) movq $0x0, 0x18(%rdi) movq $0x0, 0x20(%rdi) addq $0x28, %rdi callq 0x561f0 movq -0x20(%rbp), %rdi addq $0x40, %rdi callq 0x561f0 movq -0x20(%rbp), %rdi addq $0x58, %rdi callq 0x561f0 addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZN7testing8internal13edit_distance12_GLOBAL__N_14HunkC2Emm: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov [rbp+var_20], rdi mov rax, [rbp+var_10] mov [rdi], rax mov rax, [rbp+var_18] mov [rdi+8], rax mov qword ptr [rdi+10h], 0 mov qword ptr [rdi+18h], 0 mov qword ptr [rdi+20h], 0 add rdi, 28h ; '(' call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EEC2Ev; std::list<std::pair<char,char const*>>::list(void) mov rdi, [rbp+var_20] add rdi, 40h ; '@' call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EEC2Ev; std::list<std::pair<char,char const*>>::list(void) mov rdi, [rbp+var_20] add rdi, 58h ; 'X' call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EEC2Ev; std::list<std::pair<char,char const*>>::list(void) add rsp, 20h pop rbp retn
long long testing::internal::edit_distance::`anonymous namespace'::Hunk::Hunk( testing::internal::edit_distance::_anonymous_namespace_::Hunk *this, long long a2, long long a3) { *(_QWORD *)this = a2; *((_QWORD *)this + 1) = a3; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 4) = 0LL; std::list<std::pair<char,char const*>>::list((char *)this + 40); std::list<std::pair<char,char const*>>::list((char *)this + 64); return std::list<std::pair<char,char const*>>::list((char *)this + 88); }
Hunk: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RDI + 0x8],RAX MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],0x0 MOV qword ptr [RDI + 0x20],0x0 ADD RDI,0x28 CALL 0x001561f0 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x40 CALL 0x001561f0 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x58 CALL 0x001561f0 ADD RSP,0x20 POP RBP RET
/* testing::internal::edit_distance::(anonymous namespace)::Hunk::Hunk(unsigned long, unsigned long) */ void __thiscall testing::internal::edit_distance::(anonymous_namespace)::Hunk::Hunk (Hunk *this,ulong param_1,ulong param_2) { *(ulong *)this = param_1; *(ulong *)(this + 8) = param_2; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::list ((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *) (this + 0x28)); std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::list ((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *) (this + 0x40)); std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::list ((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *) (this + 0x58)); return; }
39,672
plutovg_parse_number
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
static inline bool plutovg_parse_number(const char** begin, const char* end, float* number) { const char* it = *begin; float integer = 0; float fraction = 0; float exponent = 0; int sign = 1; int expsign = 1; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; sign = -1; } if(it >= end || (*it != '.' && !PLUTOVG_IS_NUM(*it))) return false; if(PLUTOVG_IS_NUM(*it)) { do { integer = 10.f * integer + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } if(it < end && *it == '.') { ++it; if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; float divisor = 1.f; do { fraction = 10.f * fraction + (*it++ - '0'); divisor *= 10.f; } while(it < end && PLUTOVG_IS_NUM(*it)); fraction /= divisor; } if(it < end && (*it == 'e' || *it == 'E')) { ++it; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; expsign = -1; } if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; do { exponent = 10 * exponent + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } *begin = it; *number = sign * (integer + fraction); if(exponent) *number *= powf(10.f, expsign * exponent); return *number >= -FLT_MAX && *number <= FLT_MAX; }
O0
c
plutovg_parse_number: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x2c(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x30(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x34(%rbp) movl $0x1, -0x38(%rbp) movl $0x1, -0x3c(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d6a9 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x5d6a9 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x5d6d4 movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d6d2 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x5d6d2 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF jmp 0x5d6d4 movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d702 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax je 0x5d70b movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x5d702 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x5d70b movb $0x0, -0x1(%rbp) jmp 0x5da4b movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x5d79b movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jg 0x5d79b jmp 0x5d729 movss -0x2c(%rbp), %xmm0 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movsbl (%rax), %eax subl $0x30, %eax cvtsi2ss %eax, %xmm1 movss 0x2f205(%rip), %xmm2 # 0x8c954 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x2c(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x5d792 movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x30, %ecx movb %al, -0x42(%rbp) jl 0x5d78c movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax setle %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x5d729 jmp 0x5d79b movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d896 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x5d896 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d7e7 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x5d7e7 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x5d7f0 movb $0x0, -0x1(%rbp) jmp 0x5da4b movss 0x2e8d0(%rip), %xmm0 # 0x8c0c8 movss %xmm0, -0x40(%rbp) movss -0x30(%rbp), %xmm0 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movsbl (%rax), %eax subl $0x30, %eax cvtsi2ss %eax, %xmm1 movss 0x2f131(%rip), %xmm2 # 0x8c954 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x30(%rbp) movss 0x2f11c(%rip), %xmm0 # 0x8c954 mulss -0x40(%rbp), %xmm0 movss %xmm0, -0x40(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x43(%rbp) jae 0x5d878 movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x30, %ecx movb %al, -0x44(%rbp) jl 0x5d872 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax setle %al movb %al, -0x44(%rbp) movb -0x44(%rbp), %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x5d7fd movss -0x40(%rbp), %xmm1 movss -0x30(%rbp), %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d9ba movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x65, %eax je 0x5d8c0 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x45, %eax jne 0x5d9ba movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d8f0 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x5d8f0 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x5d91b movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d919 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x5d919 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF jmp 0x5d91b movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x5d93d movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x5d93d movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x5d946 movb $0x0, -0x1(%rbp) jmp 0x5da4b jmp 0x5d948 movss -0x34(%rbp), %xmm0 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movsbl (%rax), %eax subl $0x30, %eax cvtsi2ss %eax, %xmm1 movss 0x2efe6(%rip), %xmm2 # 0x8c954 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x34(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x45(%rbp) jae 0x5d9b1 movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x30, %ecx movb %al, -0x46(%rbp) jl 0x5d9ab movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax setle %al movb %al, -0x46(%rbp) movb -0x46(%rbp), %al movb %al, -0x45(%rbp) movb -0x45(%rbp), %al testb $0x1, %al jne 0x5d948 jmp 0x5d9ba movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) cvtsi2ssl -0x38(%rbp), %xmm0 movss -0x2c(%rbp), %xmm1 addss -0x30(%rbp), %xmm1 mulss %xmm1, %xmm0 movq -0x20(%rbp), %rax movss %xmm0, (%rax) movss -0x34(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x5d9f1 jp 0x5d9f1 jmp 0x5da14 cvtsi2ssl -0x3c(%rbp), %xmm1 mulss -0x34(%rbp), %xmm1 movss 0x2ef51(%rip), %xmm0 # 0x8c954 callq 0xb600 movq -0x20(%rbp), %rax mulss (%rax), %xmm0 movss %xmm0, (%rax) movq -0x20(%rbp), %rax movss (%rax), %xmm0 xorl %eax, %eax movss 0x2ef32(%rip), %xmm1 # 0x8c958 ucomiss %xmm1, %xmm0 movb %al, -0x47(%rbp) jb 0x5da43 movq -0x20(%rbp), %rax movss 0x2ef16(%rip), %xmm0 # 0x8c950 ucomiss (%rax), %xmm0 setae %al movb %al, -0x47(%rbp) movb -0x47(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
plutovg_parse_number: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax xorps xmm0, xmm0 movss [rbp+var_2C], xmm0 xorps xmm0, xmm0 movss [rbp+var_30], xmm0 xorps xmm0, xmm0 movss [rbp+var_34], xmm0 mov [rbp+var_38], 1 mov [rbp+var_3C], 1 mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D6A9 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_5D6A9 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_5D6D4 loc_5D6A9: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D6D2 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_5D6D2 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_38], 0FFFFFFFFh loc_5D6D2: jmp short $+2 loc_5D6D4: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D702 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz short loc_5D70B mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_5D702 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_5D70B loc_5D702: mov [rbp+var_1], 0 jmp loc_5DA4B loc_5D70B: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl loc_5D79B mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jg short loc_5D79B jmp short $+2 loc_5D729: movss xmm0, [rbp+var_2C] mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movsx eax, byte ptr [rax] sub eax, 30h ; '0' cvtsi2ss xmm1, eax movss xmm2, cs:dword_8C954 mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_2C], xmm0 mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_41], al jnb short loc_5D792 mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 30h ; '0' mov [rbp+var_42], al jl short loc_5D78C mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' setle al mov [rbp+var_42], al loc_5D78C: mov al, [rbp+var_42] mov [rbp+var_41], al loc_5D792: mov al, [rbp+var_41] test al, 1 jnz short loc_5D729 jmp short $+2 loc_5D79B: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb loc_5D896 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_5D896 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D7E7 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_5D7E7 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_5D7F0 loc_5D7E7: mov [rbp+var_1], 0 jmp loc_5DA4B loc_5D7F0: movss xmm0, cs:flt_8C0C8 movss [rbp+var_40], xmm0 loc_5D7FD: movss xmm0, [rbp+var_30] mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movsx eax, byte ptr [rax] sub eax, 30h ; '0' cvtsi2ss xmm1, eax movss xmm2, cs:dword_8C954 mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_30], xmm0 movss xmm0, cs:dword_8C954 mulss xmm0, [rbp+var_40] movss [rbp+var_40], xmm0 mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_43], al jnb short loc_5D878 mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 30h ; '0' mov [rbp+var_44], al jl short loc_5D872 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' setle al mov [rbp+var_44], al loc_5D872: mov al, [rbp+var_44] mov [rbp+var_43], al loc_5D878: mov al, [rbp+var_43] test al, 1 jnz loc_5D7FD movss xmm1, [rbp+var_40] movss xmm0, [rbp+var_30] divss xmm0, xmm1 movss [rbp+var_30], xmm0 loc_5D896: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb loc_5D9BA mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 65h ; 'e' jz short loc_5D8C0 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 45h ; 'E' jnz loc_5D9BA loc_5D8C0: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D8F0 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_5D8F0 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_5D91B loc_5D8F0: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D919 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_5D919 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_3C], 0FFFFFFFFh loc_5D919: jmp short $+2 loc_5D91B: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_5D93D mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_5D93D mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_5D946 loc_5D93D: mov [rbp+var_1], 0 jmp loc_5DA4B loc_5D946: jmp short $+2 loc_5D948: movss xmm0, [rbp+var_34] mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movsx eax, byte ptr [rax] sub eax, 30h ; '0' cvtsi2ss xmm1, eax movss xmm2, cs:dword_8C954 mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_34], xmm0 mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_45], al jnb short loc_5D9B1 mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 30h ; '0' mov [rbp+var_46], al jl short loc_5D9AB mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' setle al mov [rbp+var_46], al loc_5D9AB: mov al, [rbp+var_46] mov [rbp+var_45], al loc_5D9B1: mov al, [rbp+var_45] test al, 1 jnz short loc_5D948 jmp short $+2 loc_5D9BA: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax], rcx cvtsi2ss xmm0, [rbp+var_38] movss xmm1, [rbp+var_2C] addss xmm1, [rbp+var_30] mulss xmm0, xmm1 mov rax, [rbp+var_20] movss dword ptr [rax], xmm0 movss xmm0, [rbp+var_34] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_5D9F1 jp short loc_5D9F1 jmp short loc_5DA14 loc_5D9F1: cvtsi2ss xmm1, [rbp+var_3C] mulss xmm1, [rbp+var_34] movss xmm0, cs:dword_8C954 call _powf mov rax, [rbp+var_20] mulss xmm0, dword ptr [rax] movss dword ptr [rax], xmm0 loc_5DA14: mov rax, [rbp+var_20] movss xmm0, dword ptr [rax] xor eax, eax movss xmm1, cs:dword_8C958 ucomiss xmm0, xmm1 mov [rbp+var_47], al jb short loc_5DA43 mov rax, [rbp+var_20] movss xmm0, cs:dword_8C950 ucomiss xmm0, dword ptr [rax] setnb al mov [rbp+var_47], al loc_5DA43: mov al, [rbp+var_47] and al, 1 mov [rbp+var_1], al loc_5DA4B: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
bool plutovg_parse_number(char **a1, unsigned long long a2, float *a3) { char *v3; // rax char *v4; // rax char *v5; // rax bool v7; // [rsp+9h] [rbp-47h] bool v8; // [rsp+Ah] [rbp-46h] bool v9; // [rsp+Bh] [rbp-45h] bool v10; // [rsp+Ch] [rbp-44h] bool v11; // [rsp+Dh] [rbp-43h] bool v12; // [rsp+Eh] [rbp-42h] bool v13; // [rsp+Fh] [rbp-41h] float v14; // [rsp+10h] [rbp-40h] int v15; // [rsp+14h] [rbp-3Ch] int v16; // [rsp+18h] [rbp-38h] float v17; // [rsp+1Ch] [rbp-34h] float v18; // [rsp+20h] [rbp-30h] float v19; // [rsp+24h] [rbp-2Ch] char *v20; // [rsp+28h] [rbp-28h] v20 = *a1; v19 = 0.0; v18 = 0.0; v17 = 0.0; v16 = 1; v15 = 1; if ( (unsigned long long)*a1 < a2 && *v20 == 43 ) { ++v20; } else if ( (unsigned long long)v20 < a2 && *v20 == 45 ) { ++v20; v16 = -1; } if ( (unsigned long long)v20 >= a2 || *v20 != 46 && (*v20 < 48 || *v20 > 57) ) return 0; if ( *v20 >= 48 && *v20 <= 57 ) { do { v3 = v20++; v19 = (float)(v19 * 10.0) + (float)(*v3 - 48); v13 = 0; if ( (unsigned long long)v20 < a2 ) { v12 = 0; if ( *v20 >= 48 ) v12 = *v20 <= 57; v13 = v12; } } while ( v13 ); } if ( (unsigned long long)v20 < a2 && *v20 == 46 ) { if ( (unsigned long long)++v20 >= a2 || *v20 < 48 || *v20 > 57 ) return 0; v14 = 1.0; do { v4 = v20++; v18 = (float)(v18 * 10.0) + (float)(*v4 - 48); v14 = 10.0 * v14; v11 = 0; if ( (unsigned long long)v20 < a2 ) { v10 = 0; if ( *v20 >= 48 ) v10 = *v20 <= 57; v11 = v10; } } while ( v11 ); v18 = v18 / v14; } if ( (unsigned long long)v20 < a2 && (*v20 == 101 || *v20 == 69) ) { if ( (unsigned long long)++v20 < a2 && *v20 == 43 ) { ++v20; } else if ( (unsigned long long)v20 < a2 && *v20 == 45 ) { ++v20; v15 = -1; } if ( (unsigned long long)v20 >= a2 || *v20 < 48 || *v20 > 57 ) return 0; do { v5 = v20++; v17 = (float)(v17 * 10.0) + (float)(*v5 - 48); v9 = 0; if ( (unsigned long long)v20 < a2 ) { v8 = 0; if ( *v20 >= 48 ) v8 = *v20 <= 57; v9 = v8; } } while ( v9 ); } *a1 = v20; *a3 = (float)v16 * (float)(v19 + v18); if ( v17 != 0.0 ) *a3 = powf(10.0, (float)v15 * v17) * *a3; v7 = 0; if ( *a3 >= -3.4028235e38 ) return *a3 <= 3.4028235e38; return v7; }
plutovg_parse_number: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x2c],XMM0 XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x30],XMM0 XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x34],XMM0 MOV dword ptr [RBP + -0x38],0x1 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d6a9 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0015d6a9 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0015d6d4 LAB_0015d6a9: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d6d2 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0015d6d2 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x38],0xffffffff LAB_0015d6d2: JMP 0x0015d6d4 LAB_0015d6d4: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d702 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x0015d70b MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0015d702 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x0015d70b LAB_0015d702: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015da4b LAB_0015d70b: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0015d79b MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JG 0x0015d79b JMP 0x0015d729 LAB_0015d729: MOVSS XMM0,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 CVTSI2SS XMM1,EAX MOVSS XMM2,dword ptr [0x0018c954] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x2c],XMM0 MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x41],AL JNC 0x0015d792 MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x30 MOV byte ptr [RBP + -0x42],AL JL 0x0015d78c MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 SETLE AL MOV byte ptr [RBP + -0x42],AL LAB_0015d78c: MOV AL,byte ptr [RBP + -0x42] MOV byte ptr [RBP + -0x41],AL LAB_0015d792: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0015d729 JMP 0x0015d79b LAB_0015d79b: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d896 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0015d896 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d7e7 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0015d7e7 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x0015d7f0 LAB_0015d7e7: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015da4b LAB_0015d7f0: MOVSS XMM0,dword ptr [0x0018c0c8] MOVSS dword ptr [RBP + -0x40],XMM0 LAB_0015d7fd: MOVSS XMM0,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 CVTSI2SS XMM1,EAX MOVSS XMM2,dword ptr [0x0018c954] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x30],XMM0 MOVSS XMM0,dword ptr [0x0018c954] MULSS XMM0,dword ptr [RBP + -0x40] MOVSS dword ptr [RBP + -0x40],XMM0 MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x43],AL JNC 0x0015d878 MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x30 MOV byte ptr [RBP + -0x44],AL JL 0x0015d872 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 SETLE AL MOV byte ptr [RBP + -0x44],AL LAB_0015d872: MOV AL,byte ptr [RBP + -0x44] MOV byte ptr [RBP + -0x43],AL LAB_0015d878: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x0015d7fd MOVSS XMM1,dword ptr [RBP + -0x40] MOVSS XMM0,dword ptr [RBP + -0x30] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x30],XMM0 LAB_0015d896: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d9ba MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x65 JZ 0x0015d8c0 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x45 JNZ 0x0015d9ba LAB_0015d8c0: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d8f0 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0015d8f0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0015d91b LAB_0015d8f0: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d919 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0015d919 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x3c],0xffffffff LAB_0015d919: JMP 0x0015d91b LAB_0015d91b: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0015d93d MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0015d93d MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x0015d946 LAB_0015d93d: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015da4b LAB_0015d946: JMP 0x0015d948 LAB_0015d948: MOVSS XMM0,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 CVTSI2SS XMM1,EAX MOVSS XMM2,dword ptr [0x0018c954] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x34],XMM0 MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x45],AL JNC 0x0015d9b1 MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x30 MOV byte ptr [RBP + -0x46],AL JL 0x0015d9ab MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 SETLE AL MOV byte ptr [RBP + -0x46],AL LAB_0015d9ab: MOV AL,byte ptr [RBP + -0x46] MOV byte ptr [RBP + -0x45],AL LAB_0015d9b1: MOV AL,byte ptr [RBP + -0x45] TEST AL,0x1 JNZ 0x0015d948 JMP 0x0015d9ba LAB_0015d9ba: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX CVTSI2SS XMM0,dword ptr [RBP + -0x38] MOVSS XMM1,dword ptr [RBP + -0x2c] ADDSS XMM1,dword ptr [RBP + -0x30] MULSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x20] MOVSS dword ptr [RAX],XMM0 MOVSS XMM0,dword ptr [RBP + -0x34] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x0015d9f1 JP 0x0015d9f1 JMP 0x0015da14 LAB_0015d9f1: CVTSI2SS XMM1,dword ptr [RBP + -0x3c] MULSS XMM1,dword ptr [RBP + -0x34] MOVSS XMM0,dword ptr [0x0018c954] CALL 0x0010b600 MOV RAX,qword ptr [RBP + -0x20] MULSS XMM0,dword ptr [RAX] MOVSS dword ptr [RAX],XMM0 LAB_0015da14: MOV RAX,qword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [RAX] XOR EAX,EAX MOVSS XMM1,dword ptr [0x0018c958] UCOMISS XMM0,XMM1 MOV byte ptr [RBP + -0x47],AL JC 0x0015da43 MOV RAX,qword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [0x0018c950] UCOMISS XMM0,dword ptr [RAX] SETNC AL MOV byte ptr [RBP + -0x47],AL LAB_0015da43: MOV AL,byte ptr [RBP + -0x47] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_0015da4b: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x50 POP RBP RET
int8 plutovg_parse_number(int8 *param_1,char *param_2,float *param_3) { bool bVar1; int7 uVar2; char *pcVar3; float fVar4; bool local_4f; float local_48; int local_44; int local_40; float local_3c; float local_38; float local_34; char *local_30; bool local_9; local_30 = (char *)*param_1; local_34 = 0.0; local_38 = 0.0; local_3c = 0.0; local_40 = 1; local_44 = 1; if ((local_30 < param_2) && (*local_30 == '+')) { local_30 = local_30 + 1; } else if ((local_30 < param_2) && (*local_30 == '-')) { local_30 = local_30 + 1; local_40 = -1; } pcVar3 = local_30; if ((local_30 < param_2) && ((*local_30 == '.' || ((pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x2f < *local_30 && (pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x3a)))))) { if (('/' < *local_30) && (*local_30 < ':')) { do { pcVar3 = local_30 + 1; local_34 = local_34 * DAT_0018c954 + (float)(*local_30 + -0x30); bVar1 = false; if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) { bVar1 = *pcVar3 < ':'; } local_30 = pcVar3; } while (bVar1); } if ((local_30 < param_2) && (*local_30 == '.')) { local_30 = local_30 + 1; pcVar3 = local_30; if ((param_2 <= local_30) || ((pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x30 || (pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x39 < *local_30)))) { local_9 = false; goto LAB_0015da4b; } local_48 = DAT_0018c0c8; do { pcVar3 = local_30 + 1; local_38 = local_38 * DAT_0018c954 + (float)(*local_30 + -0x30); local_48 = DAT_0018c954 * local_48; bVar1 = false; if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) { bVar1 = *pcVar3 < ':'; } local_30 = pcVar3; } while (bVar1); local_38 = local_38 / local_48; } if ((local_30 < param_2) && ((*local_30 == 'e' || (*local_30 == 'E')))) { pcVar3 = local_30 + 1; if ((pcVar3 < param_2) && (*pcVar3 == '+')) { pcVar3 = local_30 + 2; } else if ((pcVar3 < param_2) && (*pcVar3 == '-')) { local_44 = -1; pcVar3 = local_30 + 2; } local_30 = pcVar3; pcVar3 = local_30; if (((param_2 <= local_30) || (pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x30) ) || (pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x39 < *local_30)) { local_9 = false; goto LAB_0015da4b; } do { pcVar3 = local_30 + 1; local_3c = local_3c * DAT_0018c954 + (float)(*local_30 + -0x30); bVar1 = false; if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) { bVar1 = *pcVar3 < ':'; } local_30 = pcVar3; } while (bVar1); } *param_1 = local_30; *param_3 = (float)local_40 * (local_34 + local_38); if ((local_3c != 0.0) || (NAN(local_3c))) { fVar4 = powf(DAT_0018c954,(float)local_44 * local_3c); *param_3 = fVar4 * *param_3; } uVar2 = 0; local_4f = false; if (DAT_0018c958 <= *param_3) { local_4f = *param_3 <= DAT_0018c950; uVar2 = (int7)((ulong)param_3 >> 8); } pcVar3 = (char *)CONCAT71(uVar2,local_4f); local_9 = local_4f; } else { local_9 = false; } LAB_0015da4b: return CONCAT71((int7)((ulong)pcVar3 >> 8),local_9); }
39,673
plutovg_parse_number
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
static inline bool plutovg_parse_number(const char** begin, const char* end, float* number) { const char* it = *begin; float integer = 0; float fraction = 0; float exponent = 0; int sign = 1; int expsign = 1; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; sign = -1; } if(it >= end || (*it != '.' && !PLUTOVG_IS_NUM(*it))) return false; if(PLUTOVG_IS_NUM(*it)) { do { integer = 10.f * integer + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } if(it < end && *it == '.') { ++it; if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; float divisor = 1.f; do { fraction = 10.f * fraction + (*it++ - '0'); divisor *= 10.f; } while(it < end && PLUTOVG_IS_NUM(*it)); fraction /= divisor; } if(it < end && (*it == 'e' || *it == 'E')) { ++it; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; expsign = -1; } if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; do { exponent = 10 * exponent + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } *begin = it; *number = sign * (integer + fraction); if(exponent) *number *= powf(10.f, expsign * exponent); return *number >= -FLT_MAX && *number <= FLT_MAX; }
O1
c
plutovg_parse_number: pushq %rbx movq %rdx, %rbx movq (%rdi), %rax movss 0x19547(%rip), %xmm0 # 0x430f4 cmpq %rsi, %rax jae 0x29bcf movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x29bc4 cmpl $0x2b, %ecx jne 0x29bcf incq %rax jmp 0x29bcf incq %rax movss 0x19961(%rip), %xmm0 # 0x43530 cmpq %rsi, %rax jae 0x29db7 movb (%rax), %cl cmpb $0x2e, %cl setne %dl addb $-0x30, %cl cmpb $0xa, %cl setae %r8b testb %r8b, %dl jne 0x29db7 xorps %xmm3, %xmm3 cmpb $0x9, %cl ja 0x29c3c movq %rax, %rcx notq %rcx addq %rsi, %rcx xorps %xmm2, %xmm2 movss 0x19d4d(%rip), %xmm1 # 0x4395c movsbl (%rax), %edx addl $-0x30, %edx xorps %xmm4, %xmm4 cvtsi2ss %edx, %xmm4 mulss %xmm1, %xmm2 addss %xmm4, %xmm2 testq %rcx, %rcx je 0x29c41 movb 0x1(%rax), %dl incq %rax addb $-0x30, %dl decq %rcx cmpb $0xa, %dl jb 0x29c0f jmp 0x29c44 xorps %xmm2, %xmm2 jmp 0x29c44 movq %rsi, %rax cmpq %rsi, %rax jae 0x29cbf cmpb $0x2e, (%rax) jne 0x29cbf leaq 0x1(%rax), %rcx cmpq %rsi, %rcx jae 0x29db7 movb (%rcx), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x29db7 movq %rsi, %rdx subq %rax, %rdx addq $-0x2, %rdx movss 0x19479(%rip), %xmm1 # 0x430f4 xorps %xmm3, %xmm3 movss 0x19cd6(%rip), %xmm4 # 0x4395c movsbl (%rcx), %eax addl $-0x30, %eax xorps %xmm5, %xmm5 cvtsi2ss %eax, %xmm5 mulss %xmm4, %xmm3 addss %xmm5, %xmm3 mulss %xmm4, %xmm1 testq %rdx, %rdx je 0x29cb5 movb 0x1(%rcx), %al incq %rcx addb $-0x30, %al decq %rdx cmpb $0xa, %al jb 0x29c86 jmp 0x29cb8 movq %rsi, %rcx divss %xmm1, %xmm3 movq %rcx, %rax movss 0x1942d(%rip), %xmm5 # 0x430f4 xorps %xmm4, %xmm4 cmpq %rsi, %rax jae 0x29cfb movzbl (%rax), %ecx orl $0x20, %ecx cmpl $0x65, %ecx jne 0x29cfb leaq 0x1(%rax), %rcx movss 0x1940e(%rip), %xmm5 # 0x430f4 cmpq %rsi, %rcx jae 0x29d63 movb (%rcx), %dl addq $0x2, %rax cmpb $0x2b, %dl jne 0x29d48 movq %rax, %rcx jmp 0x29d63 xorps %xmm1, %xmm1 movq %rax, (%rdi) addss %xmm3, %xmm2 mulss %xmm2, %xmm0 movss %xmm0, (%rbx) ucomiss %xmm4, %xmm1 jne 0x29d14 jnp 0x29d2d mulss %xmm5, %xmm1 movss 0x19c3c(%rip), %xmm0 # 0x4395c callq 0xa500 mulss (%rbx), %xmm0 movss %xmm0, (%rbx) movss (%rbx), %xmm0 andps 0x19b38(%rip), %xmm0 # 0x43870 movss 0x19c20(%rip), %xmm1 # 0x43960 ucomiss %xmm0, %xmm1 setae %al jmp 0x29db9 xorl %r8d, %r8d cmpb $0x2d, %dl sete %r8b cmoveq %rax, %rcx leaq 0x1b373(%rip), %rax # 0x450d0 movss (%rax,%r8,4), %xmm5 cmpq %rsi, %rcx jae 0x29db7 movb (%rcx), %al addb $-0x30, %al cmpb $0x9, %al ja 0x29db7 movq %rcx, %rax notq %rax addq %rsi, %rax xorps %xmm1, %xmm1 movss 0x19bd8(%rip), %xmm6 # 0x4395c movsbl (%rcx), %edx addl $-0x30, %edx xorps %xmm7, %xmm7 cvtsi2ss %edx, %xmm7 mulss %xmm6, %xmm1 addss %xmm7, %xmm1 testq %rax, %rax je 0x29dbb movb 0x1(%rcx), %dl incq %rcx addb $-0x30, %dl decq %rax cmpb $0xa, %dl jb 0x29d84 movq %rcx, %rax jmp 0x29cfe xorl %eax, %eax popq %rbx retq movq %rsi, %rax jmp 0x29cfe
plutovg_parse_number: push rbx mov rbx, rdx mov rax, [rdi] movss xmm0, cs:flt_430F4 cmp rax, rsi jnb short loc_29BCF movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz short loc_29BC4 cmp ecx, 2Bh ; '+' jnz short loc_29BCF inc rax jmp short loc_29BCF loc_29BC4: inc rax movss xmm0, cs:dword_43530 loc_29BCF: cmp rax, rsi jnb loc_29DB7 mov cl, [rax] cmp cl, 2Eh ; '.' setnz dl add cl, 0D0h cmp cl, 0Ah setnb r8b test dl, r8b jnz loc_29DB7 xorps xmm3, xmm3 cmp cl, 9 ja short loc_29C3C mov rcx, rax not rcx add rcx, rsi xorps xmm2, xmm2 movss xmm1, cs:dword_4395C loc_29C0F: movsx edx, byte ptr [rax] add edx, 0FFFFFFD0h xorps xmm4, xmm4 cvtsi2ss xmm4, edx mulss xmm2, xmm1 addss xmm2, xmm4 test rcx, rcx jz short loc_29C41 mov dl, [rax+1] inc rax add dl, 0D0h dec rcx cmp dl, 0Ah jb short loc_29C0F jmp short loc_29C44 loc_29C3C: xorps xmm2, xmm2 jmp short loc_29C44 loc_29C41: mov rax, rsi loc_29C44: cmp rax, rsi jnb short loc_29CBF cmp byte ptr [rax], 2Eh ; '.' jnz short loc_29CBF lea rcx, [rax+1] cmp rcx, rsi jnb loc_29DB7 mov dl, [rcx] add dl, 0D0h cmp dl, 9 ja loc_29DB7 mov rdx, rsi sub rdx, rax add rdx, 0FFFFFFFFFFFFFFFEh movss xmm1, cs:flt_430F4 xorps xmm3, xmm3 movss xmm4, cs:dword_4395C loc_29C86: movsx eax, byte ptr [rcx] add eax, 0FFFFFFD0h xorps xmm5, xmm5 cvtsi2ss xmm5, eax mulss xmm3, xmm4 addss xmm3, xmm5 mulss xmm1, xmm4 test rdx, rdx jz short loc_29CB5 mov al, [rcx+1] inc rcx add al, 0D0h dec rdx cmp al, 0Ah jb short loc_29C86 jmp short loc_29CB8 loc_29CB5: mov rcx, rsi loc_29CB8: divss xmm3, xmm1 mov rax, rcx loc_29CBF: movss xmm5, cs:flt_430F4 xorps xmm4, xmm4 cmp rax, rsi jnb short loc_29CFB movzx ecx, byte ptr [rax] or ecx, 20h cmp ecx, 65h ; 'e' jnz short loc_29CFB lea rcx, [rax+1] movss xmm5, cs:flt_430F4 cmp rcx, rsi jnb short loc_29D63 mov dl, [rcx] add rax, 2 cmp dl, 2Bh ; '+' jnz short loc_29D48 mov rcx, rax jmp short loc_29D63 loc_29CFB: xorps xmm1, xmm1 loc_29CFE: mov [rdi], rax addss xmm2, xmm3 mulss xmm0, xmm2 movss dword ptr [rbx], xmm0 ucomiss xmm1, xmm4 jnz short loc_29D14 jnp short loc_29D2D loc_29D14: mulss xmm1, xmm5 movss xmm0, cs:dword_4395C call _powf mulss xmm0, dword ptr [rbx] movss dword ptr [rbx], xmm0 loc_29D2D: movss xmm0, dword ptr [rbx] andps xmm0, cs:xmmword_43870 movss xmm1, cs:dword_43960 ucomiss xmm1, xmm0 setnb al jmp short loc_29DB9 loc_29D48: xor r8d, r8d cmp dl, 2Dh ; '-' setz r8b cmovz rcx, rax lea rax, flt_450D0 movss xmm5, dword ptr [rax+r8*4] loc_29D63: cmp rcx, rsi jnb short loc_29DB7 mov al, [rcx] add al, 0D0h cmp al, 9 ja short loc_29DB7 mov rax, rcx not rax add rax, rsi xorps xmm1, xmm1 movss xmm6, cs:dword_4395C loc_29D84: movsx edx, byte ptr [rcx] add edx, 0FFFFFFD0h xorps xmm7, xmm7 cvtsi2ss xmm7, edx mulss xmm1, xmm6 addss xmm1, xmm7 test rax, rax jz short loc_29DBB mov dl, [rcx+1] inc rcx add dl, 0D0h dec rax cmp dl, 0Ah jb short loc_29D84 mov rax, rcx jmp loc_29CFE loc_29DB7: xor eax, eax loc_29DB9: pop rbx retn loc_29DBB: mov rax, rsi jmp loc_29CFE
bool plutovg_parse_number(unsigned long long *a1, unsigned long long a2, long long a3, unsigned long long a4) { float *v4; // rbx unsigned long long v5; // rax float v6; // xmm0_4 float v7; // xmm3_4 float v8; // xmm2_4 char v9; // dl float v10; // xmm1_4 float v11; // xmm3_4 char v12; // al float v13; // xmm5_4 char v14; // dl _BYTE *v15; // rax float v16; // xmm1_4 unsigned long long v18; // rax char v19; // dl v4 = (float *)a3; v5 = *a1; v6 = 1.0; if ( *a1 < a2 ) { a4 = *(unsigned __int8 *)v5; if ( (_DWORD)a4 == 45 ) { ++v5; v6 = -1.0; } else if ( (_DWORD)a4 == 43 ) { ++v5; } } if ( v5 >= a2 ) return 0; LOBYTE(a3) = *(_BYTE *)v5 != 46; LOBYTE(a4) = *(_BYTE *)v5 - 48; if ( (((unsigned __int8)a4 >= 0xAu) & (unsigned __int8)a3) != 0 ) return 0; v7 = 0.0; if ( (unsigned __int8)a4 > 9u ) { v8 = 0.0; } else { a4 = a2 + ~v5; v8 = 0.0; while ( 1 ) { a3 = (unsigned int)(*(char *)v5 - 48); v8 = (float)(v8 * 10.0) + (float)(int)a3; if ( !a4 ) break; v9 = *(_BYTE *)++v5; LOBYTE(a3) = v9 - 48; --a4; if ( (unsigned __int8)a3 >= 0xAu ) goto LABEL_15; } v5 = a2; } LABEL_15: if ( v5 < a2 && *(_BYTE *)v5 == 46 ) { a4 = v5 + 1; if ( v5 + 1 >= a2 || (unsigned __int8)(*(_BYTE *)a4 - 48) > 9u ) return 0; a3 = a2 - v5 - 2; v10 = 1.0; v11 = 0.0; while ( 1 ) { v11 = (float)(v11 * 10.0) + (float)(*(char *)a4 - 48); v10 = v10 * 10.0; if ( !a3 ) break; v12 = *(_BYTE *)++a4; --a3; if ( (unsigned __int8)(v12 - 48) >= 0xAu ) goto LABEL_24; } a4 = a2; LABEL_24: v7 = v11 / v10; v5 = a4; } v13 = 1.0; if ( v5 < a2 ) { a4 = *(unsigned __int8 *)v5 | 0x20u; if ( (_DWORD)a4 == 101 ) { a4 = v5 + 1; v13 = 1.0; if ( v5 + 1 < a2 ) { v14 = *(_BYTE *)a4; v15 = (_BYTE *)(v5 + 2); if ( *(_BYTE *)a4 == 43 ) { a4 = (unsigned long long)v15; } else { if ( v14 == 45 ) a4 = (unsigned long long)v15; v13 = flt_450D0[v14 == 45]; } } if ( a4 < a2 && (unsigned __int8)(*(_BYTE *)a4 - 48) <= 9u ) { v18 = a2 + ~a4; v16 = 0.0; while ( 1 ) { a3 = (unsigned int)(*(char *)a4 - 48); v16 = (float)(v16 * 10.0) + (float)(int)a3; if ( !v18 ) break; v19 = *(_BYTE *)++a4; LOBYTE(a3) = v19 - 48; --v18; if ( (unsigned __int8)a3 >= 0xAu ) { v5 = a4; goto LABEL_31; } } v5 = a2; goto LABEL_31; } return 0; } } v16 = 0.0; LABEL_31: *a1 = v5; *v4 = v6 * (float)(v8 + v7); if ( v16 != 0.0 ) *v4 = powf(a1, a2, a3, a4, COERCE_DOUBLE(1092616192LL), v16 * v13) * *v4; return fabs(*v4) <= 3.4028235e38; }
plutovg_parse_number: PUSH RBX MOV RBX,RDX MOV RAX,qword ptr [RDI] MOVSS XMM0,dword ptr [0x001430f4] CMP RAX,RSI JNC 0x00129bcf MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x00129bc4 CMP ECX,0x2b JNZ 0x00129bcf INC RAX JMP 0x00129bcf LAB_00129bc4: INC RAX MOVSS XMM0,dword ptr [0x00143530] LAB_00129bcf: CMP RAX,RSI JNC 0x00129db7 MOV CL,byte ptr [RAX] CMP CL,0x2e SETNZ DL ADD CL,0xd0 CMP CL,0xa SETNC R8B TEST DL,R8B JNZ 0x00129db7 XORPS XMM3,XMM3 CMP CL,0x9 JA 0x00129c3c MOV RCX,RAX NOT RCX ADD RCX,RSI XORPS XMM2,XMM2 MOVSS XMM1,dword ptr [0x0014395c] LAB_00129c0f: MOVSX EDX,byte ptr [RAX] ADD EDX,-0x30 XORPS XMM4,XMM4 CVTSI2SS XMM4,EDX MULSS XMM2,XMM1 ADDSS XMM2,XMM4 TEST RCX,RCX JZ 0x00129c41 MOV DL,byte ptr [RAX + 0x1] INC RAX ADD DL,0xd0 DEC RCX CMP DL,0xa JC 0x00129c0f JMP 0x00129c44 LAB_00129c3c: XORPS XMM2,XMM2 JMP 0x00129c44 LAB_00129c41: MOV RAX,RSI LAB_00129c44: CMP RAX,RSI JNC 0x00129cbf CMP byte ptr [RAX],0x2e JNZ 0x00129cbf LEA RCX,[RAX + 0x1] CMP RCX,RSI JNC 0x00129db7 MOV DL,byte ptr [RCX] ADD DL,0xd0 CMP DL,0x9 JA 0x00129db7 MOV RDX,RSI SUB RDX,RAX ADD RDX,-0x2 MOVSS XMM1,dword ptr [0x001430f4] XORPS XMM3,XMM3 MOVSS XMM4,dword ptr [0x0014395c] LAB_00129c86: MOVSX EAX,byte ptr [RCX] ADD EAX,-0x30 XORPS XMM5,XMM5 CVTSI2SS XMM5,EAX MULSS XMM3,XMM4 ADDSS XMM3,XMM5 MULSS XMM1,XMM4 TEST RDX,RDX JZ 0x00129cb5 MOV AL,byte ptr [RCX + 0x1] INC RCX ADD AL,0xd0 DEC RDX CMP AL,0xa JC 0x00129c86 JMP 0x00129cb8 LAB_00129cb5: MOV RCX,RSI LAB_00129cb8: DIVSS XMM3,XMM1 MOV RAX,RCX LAB_00129cbf: MOVSS XMM5,dword ptr [0x001430f4] XORPS XMM4,XMM4 CMP RAX,RSI JNC 0x00129cfb MOVZX ECX,byte ptr [RAX] OR ECX,0x20 CMP ECX,0x65 JNZ 0x00129cfb LEA RCX,[RAX + 0x1] MOVSS XMM5,dword ptr [0x001430f4] CMP RCX,RSI JNC 0x00129d63 MOV DL,byte ptr [RCX] ADD RAX,0x2 CMP DL,0x2b JNZ 0x00129d48 MOV RCX,RAX JMP 0x00129d63 LAB_00129cfb: XORPS XMM1,XMM1 LAB_00129cfe: MOV qword ptr [RDI],RAX ADDSS XMM2,XMM3 MULSS XMM0,XMM2 MOVSS dword ptr [RBX],XMM0 UCOMISS XMM1,XMM4 JNZ 0x00129d14 JNP 0x00129d2d LAB_00129d14: MULSS XMM1,XMM5 MOVSS XMM0,dword ptr [0x0014395c] CALL 0x0010a500 MULSS XMM0,dword ptr [RBX] MOVSS dword ptr [RBX],XMM0 LAB_00129d2d: MOVSS XMM0,dword ptr [RBX] ANDPS XMM0,xmmword ptr [0x00143870] MOVSS XMM1,dword ptr [0x00143960] UCOMISS XMM1,XMM0 SETNC AL JMP 0x00129db9 LAB_00129d48: XOR R8D,R8D CMP DL,0x2d SETZ R8B CMOVZ RCX,RAX LEA RAX,[0x1450d0] MOVSS XMM5,dword ptr [RAX + R8*0x4] LAB_00129d63: CMP RCX,RSI JNC 0x00129db7 MOV AL,byte ptr [RCX] ADD AL,0xd0 CMP AL,0x9 JA 0x00129db7 MOV RAX,RCX NOT RAX ADD RAX,RSI XORPS XMM1,XMM1 MOVSS XMM6,dword ptr [0x0014395c] LAB_00129d84: MOVSX EDX,byte ptr [RCX] ADD EDX,-0x30 XORPS XMM7,XMM7 CVTSI2SS XMM7,EDX MULSS XMM1,XMM6 ADDSS XMM1,XMM7 TEST RAX,RAX JZ 0x00129dbb MOV DL,byte ptr [RCX + 0x1] INC RCX ADD DL,0xd0 DEC RAX CMP DL,0xa JC 0x00129d84 MOV RAX,RCX JMP 0x00129cfe LAB_00129db7: XOR EAX,EAX LAB_00129db9: POP RBX RET LAB_00129dbb: MOV RAX,RSI JMP 0x00129cfe
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ bool plutovg_parse_number(int8 *param_1,byte *param_2,float *param_3) { byte *pbVar1; bool bVar2; byte *pbVar3; byte *pbVar4; byte bVar5; byte *pbVar6; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; pbVar3 = (byte *)*param_1; fVar7 = DAT_001430f4; if (pbVar3 < param_2) { if (*pbVar3 == 0x2d) { pbVar3 = pbVar3 + 1; fVar7 = DAT_00143530; } else if (*pbVar3 == 0x2b) { pbVar3 = pbVar3 + 1; } } if ((pbVar3 < param_2) && (bVar5 = *pbVar3 - 0x30, *pbVar3 == 0x2e || bVar5 < 10)) { fVar11 = 0.0; if (bVar5 < 10) { pbVar6 = param_2 + ~(ulong)pbVar3; fVar10 = 0.0; pbVar4 = pbVar3; do { fVar10 = fVar10 * DAT_0014395c + (float)((char)*pbVar4 + -0x30); pbVar3 = param_2; if (pbVar6 == (byte *)0x0) break; pbVar1 = pbVar4 + 1; pbVar3 = pbVar4 + 1; pbVar6 = pbVar6 + -1; pbVar4 = pbVar3; } while ((byte)(*pbVar1 - 0x30) < 10); } else { fVar10 = 0.0; } if ((pbVar3 < param_2) && (*pbVar3 == 0x2e)) { pbVar4 = pbVar3 + 1; if ((param_2 <= pbVar4) || (9 < (byte)(*pbVar4 - 0x30))) goto LAB_00129db7; pbVar6 = param_2 + (-2 - (long)pbVar3); fVar11 = 0.0; fVar8 = DAT_001430f4; do { fVar11 = fVar11 * DAT_0014395c + (float)((char)*pbVar4 + -0x30); fVar8 = fVar8 * DAT_0014395c; pbVar3 = param_2; if (pbVar6 == (byte *)0x0) break; pbVar1 = pbVar4 + 1; pbVar3 = pbVar4 + 1; pbVar6 = pbVar6 + -1; pbVar4 = pbVar3; } while ((byte)(*pbVar1 - 0x30) < 10); fVar11 = fVar11 / fVar8; } fVar8 = DAT_001430f4; if ((pbVar3 < param_2) && ((*pbVar3 | 0x20) == 0x65)) { pbVar4 = pbVar3 + 1; pbVar6 = pbVar4; if (pbVar4 < param_2) { bVar5 = *pbVar4; pbVar6 = pbVar3 + 2; if (bVar5 != 0x2b) { if (bVar5 == 0x2d) { pbVar4 = pbVar6; } pbVar6 = pbVar4; fVar8 = *(float *)(&DAT_001450d0 + (ulong)(bVar5 == 0x2d) * 4); } } if ((param_2 <= pbVar6) || (9 < (byte)(*pbVar6 - 0x30))) goto LAB_00129db7; pbVar4 = param_2 + ~(ulong)pbVar6; fVar9 = 0.0; do { fVar9 = fVar9 * DAT_0014395c + (float)((char)*pbVar6 + -0x30); pbVar3 = param_2; if (pbVar4 == (byte *)0x0) break; pbVar1 = pbVar6 + 1; pbVar3 = pbVar6 + 1; pbVar4 = pbVar4 + -1; pbVar6 = pbVar3; } while ((byte)(*pbVar1 - 0x30) < 10); } else { fVar9 = 0.0; } *param_1 = pbVar3; *param_3 = fVar7 * (fVar10 + fVar11); if ((fVar9 != 0.0) || (NAN(fVar9))) { fVar7 = powf(DAT_0014395c,fVar9 * fVar8); *param_3 = fVar7 * *param_3; } bVar2 = (float)((uint)*param_3 & _DAT_00143870) <= DAT_00143960; } else { LAB_00129db7: bVar2 = false; } return bVar2; }
39,674
plutovg_parse_number
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
static inline bool plutovg_parse_number(const char** begin, const char* end, float* number) { const char* it = *begin; float integer = 0; float fraction = 0; float exponent = 0; int sign = 1; int expsign = 1; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; sign = -1; } if(it >= end || (*it != '.' && !PLUTOVG_IS_NUM(*it))) return false; if(PLUTOVG_IS_NUM(*it)) { do { integer = 10.f * integer + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } if(it < end && *it == '.') { ++it; if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; float divisor = 1.f; do { fraction = 10.f * fraction + (*it++ - '0'); divisor *= 10.f; } while(it < end && PLUTOVG_IS_NUM(*it)); fraction /= divisor; } if(it < end && (*it == 'e' || *it == 'E')) { ++it; if(it < end && *it == '+') { ++it; } else if(it < end && *it == '-') { ++it; expsign = -1; } if(it >= end || !PLUTOVG_IS_NUM(*it)) return false; do { exponent = 10 * exponent + (*it++ - '0'); } while(it < end && PLUTOVG_IS_NUM(*it)); } *begin = it; *number = sign * (integer + fraction); if(exponent) *number *= powf(10.f, expsign * exponent); return *number >= -FLT_MAX && *number <= FLT_MAX; }
O2
c
plutovg_parse_number: pushq %rbx movq %rdx, %rbx movq (%rdi), %rax movss 0x151c8(%rip), %xmm0 # 0x3a0c8 cmpq %rsi, %rax jae 0x24f22 movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x24f17 cmpl $0x2b, %ecx jne 0x24f22 incq %rax jmp 0x24f22 incq %rax movss 0x15666(%rip), %xmm0 # 0x3a588 cmpq %rsi, %rax jae 0x250e7 movb (%rax), %cl xorps %xmm3, %xmm3 cmpb $0x2e, %cl jne 0x24f3a xorps %xmm2, %xmm2 jmp 0x24f80 leal -0x30(%rcx), %edx cmpb $0x9, %dl ja 0x250e7 incq %rax xorps %xmm2, %xmm2 movss 0x15abc(%rip), %xmm1 # 0x3aa10 movzbl %cl, %ecx addl $-0x30, %ecx cvtsi2ss %ecx, %xmm4 mulss %xmm1, %xmm2 addss %xmm4, %xmm2 cmpq %rsi, %rax jae 0x24f7d movb (%rax), %cl leal -0x30(%rcx), %edx incq %rax cmpb $0xa, %dl jb 0x24f54 decq %rax jmp 0x24f80 movq %rsi, %rax cmpq %rsi, %rax jae 0x24ffb cmpb $0x2e, (%rax) jne 0x24ffb leaq 0x1(%rax), %rcx cmpq %rsi, %rcx jae 0x250e7 movb (%rcx), %dl leal -0x30(%rdx), %ecx cmpb $0x9, %cl ja 0x250e7 movq %rsi, %rcx subq %rax, %rcx addq %rax, %rcx addq $0x2, %rax movss 0x1510e(%rip), %xmm1 # 0x3a0c8 xorps %xmm3, %xmm3 movss 0x15a4b(%rip), %xmm4 # 0x3aa10 movzbl %dl, %edx addl $-0x30, %edx cvtsi2ss %edx, %xmm5 mulss %xmm4, %xmm3 addss %xmm5, %xmm3 mulss %xmm4, %xmm1 cmpq %rsi, %rax jae 0x24ff4 movb (%rax), %dl leal -0x30(%rdx), %r8d incq %rax cmpb $0xa, %r8b jb 0x24fc5 decq %rax jmp 0x24ff7 movq %rcx, %rax divss %xmm1, %xmm3 movss 0x150c5(%rip), %xmm5 # 0x3a0c8 xorps %xmm4, %xmm4 cmpq %rsi, %rax jae 0x25037 movzbl (%rax), %ecx orl $0x20, %ecx cmpl $0x65, %ecx jne 0x25037 leaq 0x1(%rax), %rcx movss 0x150a6(%rip), %xmm5 # 0x3a0c8 cmpq %rsi, %rcx jae 0x2509b movb (%rcx), %dl addq $0x2, %rax cmpb $0x2b, %dl jne 0x25080 movq %rax, %rcx jmp 0x2509b xorps %xmm1, %xmm1 movq %rax, (%rdi) addss %xmm3, %xmm2 mulss %xmm2, %xmm0 movss %xmm0, (%rbx) ucomiss %xmm4, %xmm1 jne 0x25050 jnp 0x25069 mulss %xmm5, %xmm1 movss 0x159b4(%rip), %xmm0 # 0x3aa10 callq 0xa4d0 mulss (%rbx), %xmm0 movss %xmm0, (%rbx) andps 0x158a0(%rip), %xmm0 # 0x3a910 movss 0x1599c(%rip), %xmm1 # 0x3aa14 ucomiss %xmm0, %xmm1 setae %al jmp 0x250e9 xorl %r8d, %r8d cmpb $0x2d, %dl sete %r8b cmoveq %rax, %rcx leaq 0x170bf(%rip), %rax # 0x3c154 movss (%rax,%r8,4), %xmm5 cmpq %rsi, %rcx jae 0x250e7 movb (%rcx), %al leal -0x30(%rax), %edx cmpb $0x9, %dl ja 0x250e7 incq %rcx xorps %xmm1, %xmm1 movss 0x15958(%rip), %xmm6 # 0x3aa10 movzbl %al, %eax addl $-0x30, %eax cvtsi2ss %eax, %xmm7 mulss %xmm6, %xmm1 addss %xmm7, %xmm1 cmpq %rsi, %rcx jae 0x250eb movb (%rcx), %al leal -0x30(%rax), %edx incq %rcx cmpb $0xa, %dl jb 0x250b8 decq %rcx movq %rcx, %rax jmp 0x2503a xorl %eax, %eax popq %rbx retq movq %rsi, %rax jmp 0x2503a
plutovg_parse_number: push rbx mov rbx, rdx mov rax, [rdi] movss xmm0, cs:flt_3A0C8 cmp rax, rsi jnb short loc_24F22 movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz short loc_24F17 cmp ecx, 2Bh ; '+' jnz short loc_24F22 inc rax jmp short loc_24F22 loc_24F17: inc rax movss xmm0, cs:dword_3A588 loc_24F22: cmp rax, rsi jnb loc_250E7 mov cl, [rax] xorps xmm3, xmm3 cmp cl, 2Eh ; '.' jnz short loc_24F3A xorps xmm2, xmm2 jmp short loc_24F80 loc_24F3A: lea edx, [rcx-30h] cmp dl, 9 ja loc_250E7 inc rax xorps xmm2, xmm2 movss xmm1, cs:dword_3AA10 loc_24F54: movzx ecx, cl add ecx, 0FFFFFFD0h cvtsi2ss xmm4, ecx mulss xmm2, xmm1 addss xmm2, xmm4 cmp rax, rsi jnb short loc_24F7D mov cl, [rax] lea edx, [rcx-30h] inc rax cmp dl, 0Ah jb short loc_24F54 dec rax jmp short loc_24F80 loc_24F7D: mov rax, rsi loc_24F80: cmp rax, rsi jnb short loc_24FFB cmp byte ptr [rax], 2Eh ; '.' jnz short loc_24FFB lea rcx, [rax+1] cmp rcx, rsi jnb loc_250E7 mov dl, [rcx] lea ecx, [rdx-30h] cmp cl, 9 ja loc_250E7 mov rcx, rsi sub rcx, rax add rcx, rax add rax, 2 movss xmm1, cs:flt_3A0C8 xorps xmm3, xmm3 movss xmm4, cs:dword_3AA10 loc_24FC5: movzx edx, dl add edx, 0FFFFFFD0h cvtsi2ss xmm5, edx mulss xmm3, xmm4 addss xmm3, xmm5 mulss xmm1, xmm4 cmp rax, rsi jnb short loc_24FF4 mov dl, [rax] lea r8d, [rdx-30h] inc rax cmp r8b, 0Ah jb short loc_24FC5 dec rax jmp short loc_24FF7 loc_24FF4: mov rax, rcx loc_24FF7: divss xmm3, xmm1 loc_24FFB: movss xmm5, cs:flt_3A0C8 xorps xmm4, xmm4 cmp rax, rsi jnb short loc_25037 movzx ecx, byte ptr [rax] or ecx, 20h cmp ecx, 65h ; 'e' jnz short loc_25037 lea rcx, [rax+1] movss xmm5, cs:flt_3A0C8 cmp rcx, rsi jnb short loc_2509B mov dl, [rcx] add rax, 2 cmp dl, 2Bh ; '+' jnz short loc_25080 mov rcx, rax jmp short loc_2509B loc_25037: xorps xmm1, xmm1 loc_2503A: mov [rdi], rax addss xmm2, xmm3 mulss xmm0, xmm2 movss dword ptr [rbx], xmm0 ucomiss xmm1, xmm4 jnz short loc_25050 jnp short loc_25069 loc_25050: mulss xmm1, xmm5 movss xmm0, cs:dword_3AA10 call _powf mulss xmm0, dword ptr [rbx] movss dword ptr [rbx], xmm0 loc_25069: andps xmm0, cs:xmmword_3A910 movss xmm1, cs:dword_3AA14 ucomiss xmm1, xmm0 setnb al jmp short loc_250E9 loc_25080: xor r8d, r8d cmp dl, 2Dh ; '-' setz r8b cmovz rcx, rax lea rax, flt_3C154 movss xmm5, dword ptr [rax+r8*4] loc_2509B: cmp rcx, rsi jnb short loc_250E7 mov al, [rcx] lea edx, [rax-30h] cmp dl, 9 ja short loc_250E7 inc rcx xorps xmm1, xmm1 movss xmm6, cs:dword_3AA10 loc_250B8: movzx eax, al add eax, 0FFFFFFD0h cvtsi2ss xmm7, eax mulss xmm1, xmm6 addss xmm1, xmm7 cmp rcx, rsi jnb short loc_250EB mov al, [rcx] lea edx, [rax-30h] inc rcx cmp dl, 0Ah jb short loc_250B8 dec rcx mov rax, rcx jmp loc_2503A loc_250E7: xor eax, eax loc_250E9: pop rbx retn loc_250EB: mov rax, rsi jmp loc_2503A
bool plutovg_parse_number(unsigned long long *a1, unsigned long long a2, float *a3) { unsigned __int8 *v4; // rax float v5; // xmm0_4 int v6; // ecx unsigned __int8 v7; // cl float v8; // xmm3_4 float v9; // xmm2_4 unsigned __int8 *v10; // rax unsigned __int8 v11; // dl unsigned __int8 *v12; // rax float v13; // xmm1_4 float v14; // xmm3_4 float v15; // xmm5_4 unsigned __int8 *v16; // rcx unsigned __int8 v17; // dl unsigned __int8 *v18; // rax float v19; // xmm1_4 float v20; // xmm0_4 unsigned __int8 v22; // al unsigned __int8 *v23; // rcx v4 = (unsigned __int8 *)*a1; v5 = 1.0; if ( *a1 < a2 ) { v6 = *v4; if ( v6 == 45 ) { ++v4; v5 = -1.0; } else if ( v6 == 43 ) { ++v4; } } if ( (unsigned long long)v4 >= a2 ) return 0; v7 = *v4; v8 = 0.0; if ( *v4 == 46 ) { v9 = 0.0; } else { if ( (unsigned __int8)(v7 - 48) > 9u ) return 0; v10 = v4 + 1; v9 = 0.0; while ( 1 ) { v9 = (float)(v9 * 10.0) + (float)(v7 - 48); if ( (unsigned long long)v10 >= a2 ) break; v7 = *v10++; if ( (unsigned __int8)(v7 - 48) >= 0xAu ) { v4 = v10 - 1; goto LABEL_15; } } v4 = (unsigned __int8 *)a2; } LABEL_15: if ( (unsigned long long)v4 < a2 && *v4 == 46 ) { if ( (unsigned long long)(v4 + 1) >= a2 ) return 0; v11 = v4[1]; if ( (unsigned __int8)(v11 - 48) > 9u ) return 0; v12 = v4 + 2; v13 = 1.0; v14 = 0.0; while ( 1 ) { v14 = (float)(v14 * 10.0) + (float)(v11 - 48); v13 = v13 * 10.0; if ( (unsigned long long)v12 >= a2 ) break; v11 = *v12++; if ( (unsigned __int8)(v11 - 48) >= 0xAu ) { v4 = v12 - 1; goto LABEL_24; } } v4 = (unsigned __int8 *)a2; LABEL_24: v8 = v14 / v13; } v15 = 1.0; if ( (unsigned long long)v4 < a2 && (*v4 | 0x20) == 0x65 ) { v16 = v4 + 1; v15 = 1.0; if ( (unsigned long long)(v4 + 1) < a2 ) { v17 = *v16; v18 = v4 + 2; if ( *v16 == 43 ) { v16 = v18; } else { if ( v17 == 45 ) v16 = v18; v15 = flt_3C154[v17 == 45]; } } if ( (unsigned long long)v16 < a2 ) { v22 = *v16; if ( (unsigned __int8)(*v16 - 48) <= 9u ) { v23 = v16 + 1; v19 = 0.0; while ( 1 ) { v19 = (float)(v19 * 10.0) + (float)(v22 - 48); if ( (unsigned long long)v23 >= a2 ) break; v22 = *v23++; if ( (unsigned __int8)(v22 - 48) >= 0xAu ) { v4 = v23 - 1; goto LABEL_31; } } v4 = (unsigned __int8 *)a2; goto LABEL_31; } } return 0; } v19 = 0.0; LABEL_31: *a1 = (unsigned long long)v4; v20 = v5 * (float)(v9 + v8); *a3 = v20; if ( v19 != 0.0 ) { v20 = powf(COERCE_DOUBLE(1092616192LL), v19 * v15) * *a3; *a3 = v20; } return fabs(v20) <= 3.4028235e38; }
plutovg_parse_number: PUSH RBX MOV RBX,RDX MOV RAX,qword ptr [RDI] MOVSS XMM0,dword ptr [0x0013a0c8] CMP RAX,RSI JNC 0x00124f22 MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x00124f17 CMP ECX,0x2b JNZ 0x00124f22 INC RAX JMP 0x00124f22 LAB_00124f17: INC RAX MOVSS XMM0,dword ptr [0x0013a588] LAB_00124f22: CMP RAX,RSI JNC 0x001250e7 MOV CL,byte ptr [RAX] XORPS XMM3,XMM3 CMP CL,0x2e JNZ 0x00124f3a XORPS XMM2,XMM2 JMP 0x00124f80 LAB_00124f3a: LEA EDX,[RCX + -0x30] CMP DL,0x9 JA 0x001250e7 INC RAX XORPS XMM2,XMM2 MOVSS XMM1,dword ptr [0x0013aa10] LAB_00124f54: MOVZX ECX,CL ADD ECX,-0x30 CVTSI2SS XMM4,ECX MULSS XMM2,XMM1 ADDSS XMM2,XMM4 CMP RAX,RSI JNC 0x00124f7d MOV CL,byte ptr [RAX] LEA EDX,[RCX + -0x30] INC RAX CMP DL,0xa JC 0x00124f54 DEC RAX JMP 0x00124f80 LAB_00124f7d: MOV RAX,RSI LAB_00124f80: CMP RAX,RSI JNC 0x00124ffb CMP byte ptr [RAX],0x2e JNZ 0x00124ffb LEA RCX,[RAX + 0x1] CMP RCX,RSI JNC 0x001250e7 MOV DL,byte ptr [RCX] LEA ECX,[RDX + -0x30] CMP CL,0x9 JA 0x001250e7 MOV RCX,RSI SUB RCX,RAX ADD RCX,RAX ADD RAX,0x2 MOVSS XMM1,dword ptr [0x0013a0c8] XORPS XMM3,XMM3 MOVSS XMM4,dword ptr [0x0013aa10] LAB_00124fc5: MOVZX EDX,DL ADD EDX,-0x30 CVTSI2SS XMM5,EDX MULSS XMM3,XMM4 ADDSS XMM3,XMM5 MULSS XMM1,XMM4 CMP RAX,RSI JNC 0x00124ff4 MOV DL,byte ptr [RAX] LEA R8D,[RDX + -0x30] INC RAX CMP R8B,0xa JC 0x00124fc5 DEC RAX JMP 0x00124ff7 LAB_00124ff4: MOV RAX,RCX LAB_00124ff7: DIVSS XMM3,XMM1 LAB_00124ffb: MOVSS XMM5,dword ptr [0x0013a0c8] XORPS XMM4,XMM4 CMP RAX,RSI JNC 0x00125037 MOVZX ECX,byte ptr [RAX] OR ECX,0x20 CMP ECX,0x65 JNZ 0x00125037 LEA RCX,[RAX + 0x1] MOVSS XMM5,dword ptr [0x0013a0c8] CMP RCX,RSI JNC 0x0012509b MOV DL,byte ptr [RCX] ADD RAX,0x2 CMP DL,0x2b JNZ 0x00125080 MOV RCX,RAX JMP 0x0012509b LAB_00125037: XORPS XMM1,XMM1 LAB_0012503a: MOV qword ptr [RDI],RAX ADDSS XMM2,XMM3 MULSS XMM0,XMM2 MOVSS dword ptr [RBX],XMM0 UCOMISS XMM1,XMM4 JNZ 0x00125050 JNP 0x00125069 LAB_00125050: MULSS XMM1,XMM5 MOVSS XMM0,dword ptr [0x0013aa10] CALL 0x0010a4d0 MULSS XMM0,dword ptr [RBX] MOVSS dword ptr [RBX],XMM0 LAB_00125069: ANDPS XMM0,xmmword ptr [0x0013a910] MOVSS XMM1,dword ptr [0x0013aa14] UCOMISS XMM1,XMM0 SETNC AL JMP 0x001250e9 LAB_00125080: XOR R8D,R8D CMP DL,0x2d SETZ R8B CMOVZ RCX,RAX LEA RAX,[0x13c154] MOVSS XMM5,dword ptr [RAX + R8*0x4] LAB_0012509b: CMP RCX,RSI JNC 0x001250e7 MOV AL,byte ptr [RCX] LEA EDX,[RAX + -0x30] CMP DL,0x9 JA 0x001250e7 INC RCX XORPS XMM1,XMM1 MOVSS XMM6,dword ptr [0x0013aa10] LAB_001250b8: MOVZX EAX,AL ADD EAX,-0x30 CVTSI2SS XMM7,EAX MULSS XMM1,XMM6 ADDSS XMM1,XMM7 CMP RCX,RSI JNC 0x001250eb MOV AL,byte ptr [RCX] LEA EDX,[RAX + -0x30] INC RCX CMP DL,0xa JC 0x001250b8 DEC RCX MOV RAX,RCX JMP 0x0012503a LAB_001250e7: XOR EAX,EAX LAB_001250e9: POP RBX RET LAB_001250eb: MOV RAX,RSI JMP 0x0012503a
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ bool plutovg_parse_number(int8 *param_1,byte *param_2,float *param_3) { bool bVar1; byte *pbVar2; byte *pbVar3; byte *pbVar4; byte bVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; pbVar2 = (byte *)*param_1; fVar6 = DAT_0013a0c8; if (pbVar2 < param_2) { if (*pbVar2 == 0x2d) { pbVar2 = pbVar2 + 1; fVar6 = DAT_0013a588; } else if (*pbVar2 == 0x2b) { pbVar2 = pbVar2 + 1; } } if (pbVar2 < param_2) { bVar5 = *pbVar2; fVar10 = 0.0; if (bVar5 == 0x2e) { fVar9 = 0.0; pbVar4 = pbVar2; } else { if (9 < (byte)(bVar5 - 0x30)) goto LAB_001250e7; fVar9 = 0.0; do { pbVar2 = pbVar2 + 1; fVar9 = fVar9 * DAT_0013aa10 + (float)(int)(bVar5 - 0x30); pbVar4 = param_2; if (param_2 <= pbVar2) break; bVar5 = *pbVar2; pbVar4 = pbVar2; } while ((byte)(bVar5 - 0x30) < 10); } if ((pbVar4 < param_2) && (*pbVar4 == 0x2e)) { if ((param_2 <= pbVar4 + 1) || (bVar5 = pbVar4[1], 9 < (byte)(bVar5 - 0x30))) goto LAB_001250e7; fVar10 = 0.0; pbVar2 = pbVar4 + 2; fVar7 = DAT_0013a0c8; do { fVar10 = fVar10 * DAT_0013aa10 + (float)(int)(bVar5 - 0x30); fVar7 = fVar7 * DAT_0013aa10; pbVar4 = param_2; if (param_2 <= pbVar2) break; bVar5 = *pbVar2; pbVar4 = pbVar2; pbVar2 = pbVar2 + 1; } while ((byte)(bVar5 - 0x30) < 10); fVar10 = fVar10 / fVar7; } fVar7 = DAT_0013a0c8; if ((pbVar4 < param_2) && ((*pbVar4 | 0x20) == 0x65)) { pbVar2 = pbVar4 + 1; pbVar3 = pbVar2; if (pbVar2 < param_2) { bVar5 = *pbVar2; pbVar3 = pbVar4 + 2; if (bVar5 != 0x2b) { if (bVar5 == 0x2d) { pbVar2 = pbVar3; } pbVar3 = pbVar2; fVar7 = *(float *)(&DAT_0013c154 + (ulong)(bVar5 == 0x2d) * 4); } } if ((param_2 <= pbVar3) || (bVar5 = *pbVar3, 9 < (byte)(bVar5 - 0x30))) goto LAB_001250e7; fVar8 = 0.0; do { pbVar3 = pbVar3 + 1; fVar8 = fVar8 * DAT_0013aa10 + (float)(int)(bVar5 - 0x30); pbVar4 = param_2; if (param_2 <= pbVar3) break; bVar5 = *pbVar3; pbVar4 = pbVar3; } while ((byte)(bVar5 - 0x30) < 10); } else { fVar8 = 0.0; } *param_1 = pbVar4; fVar6 = fVar6 * (fVar9 + fVar10); *param_3 = fVar6; if ((fVar8 != 0.0) || (NAN(fVar8))) { fVar6 = powf(DAT_0013aa10,fVar8 * fVar7); fVar6 = fVar6 * *param_3; *param_3 = fVar6; } bVar1 = (float)((uint)fVar6 & _DAT_0013a910) <= DAT_0013aa14; } else { LAB_001250e7: bVar1 = false; } return bVar1; }
39,675
c4_state_get_pending_request
corpus-core[P]colibri-stateless/src/util/state.c
data_request_t* c4_state_get_pending_request(c4_state_t* state) { data_request_t* data_request = state->requests; while (data_request) { if (c4_state_is_pending(data_request)) return data_request; data_request = data_request->next; } return NULL; }
O0
c
c4_state_get_pending_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x224f5 movq -0x18(%rbp), %rdi callq 0x223d0 testb $0x1, %al jne 0x224dd jmp 0x224e7 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x224fd movq -0x18(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x224c7 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
c4_state_get_pending_request: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_224C7: cmp [rbp+var_18], 0 jz short loc_224F5 mov rdi, [rbp+var_18] call c4_state_is_pending test al, 1 jnz short loc_224DD jmp short loc_224E7 loc_224DD: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_224FD loc_224E7: mov rax, [rbp+var_18] mov rax, [rax+50h] mov [rbp+var_18], rax jmp short loc_224C7 loc_224F5: mov [rbp+var_8], 0 loc_224FD: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long c4_state_get_pending_request(long long *a1) { long long i; // [rsp+8h] [rbp-18h] for ( i = *a1; i; i = *(_QWORD *)(i + 80) ) { if ( (c4_state_is_pending(i) & 1) != 0 ) return i; } return 0LL; }
c4_state_get_pending_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001224c7: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001224f5 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001223d0 TEST AL,0x1 JNZ 0x001224dd JMP 0x001224e7 LAB_001224dd: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001224fd LAB_001224e7: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x18],RAX JMP 0x001224c7 LAB_001224f5: MOV qword ptr [RBP + -0x8],0x0 LAB_001224fd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long c4_state_get_pending_request(long *param_1) { ulong uVar1; long local_20; local_20 = *param_1; while( true ) { if (local_20 == 0) { return 0; } uVar1 = c4_state_is_pending(local_20); if ((uVar1 & 1) != 0) break; local_20 = *(long *)(local_20 + 0x50); } return local_20; }
39,676
ma_close
eloqsql/libmariadb/libmariadb/ma_io.c
int ma_close(MA_FILE *file) { int rc; if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: rc= fclose((FILE *)file->ptr); free(file); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: rc= rio_plugin->methods->mclose(file); break; #endif default: return -1; } return rc; }
O3
c
ma_close: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx testq %rdi, %rdi je 0x989d8 movq %rdi, %rbx movl (%rdi), %eax cmpl $0x2, %eax je 0x989e2 cmpl $0x1, %eax jne 0x989d8 movq 0x8(%rbx), %rdi callq 0x39430 movl %eax, %r14d movq %rbx, %rdi callq 0x39180 movl %r14d, %eax jmp 0x989dd movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r14 popq %rbp retq leaq 0x3864b7(%rip), %rax # 0x41eea0 movq (%rax), %rax movq 0x58(%rax), %rax movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmpq *0x8(%rax)
ma_close: push rbp mov rbp, rsp push r14 push rbx test rdi, rdi jz short loc_989D8 mov rbx, rdi mov eax, [rdi] cmp eax, 2 jz short loc_989E2 cmp eax, 1 jnz short loc_989D8 mov rdi, [rbx+8] call _fclose mov r14d, eax mov rdi, rbx call _free mov eax, r14d jmp short loc_989DD loc_989D8: mov eax, 0FFFFFFFFh loc_989DD: pop rbx pop r14 pop rbp retn loc_989E2: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rdi, rbx pop rbx pop r14 pop rbp jmp qword ptr [rax+8]
long long ma_close(long long a1) { unsigned int v1; // r14d if ( !a1 ) return 0xFFFFFFFFLL; if ( *(_DWORD *)a1 != 2 ) { if ( *(_DWORD *)a1 == 1 ) { v1 = fclose(*(_QWORD *)(a1 + 8)); free(a1); return v1; } return 0xFFFFFFFFLL; } return (*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1); }
ma_close: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x001989d8 MOV RBX,RDI MOV EAX,dword ptr [RDI] CMP EAX,0x2 JZ 0x001989e2 CMP EAX,0x1 JNZ 0x001989d8 MOV RDI,qword ptr [RBX + 0x8] CALL 0x00139430 MOV R14D,EAX MOV RDI,RBX CALL 0x00139180 MOV EAX,R14D JMP 0x001989dd LAB_001989d8: MOV EAX,0xffffffff LAB_001989dd: POP RBX POP R14 POP RBP RET LAB_001989e2: LEA RAX,[0x51eea0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,RBX POP RBX POP R14 POP RBP JMP qword ptr [RAX + 0x8]
ulong ma_close(int *param_1) { uint uVar1; ulong uVar2; if (param_1 != (int *)0x0) { if (*param_1 == 2) { /* WARNING: Could not recover jumptable at 0x001989f7. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar2 = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1); return uVar2; } if (*param_1 == 1) { uVar1 = fclose(*(FILE **)(param_1 + 2)); free(param_1); return (ulong)uVar1; } } return 0xffffffff; }
39,677
google::protobuf::(anonymous namespace)::IsMapFieldInApi(google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
bool IsMapFieldInApi(const FieldDescriptor* field) { return field->is_map(); }
O3
cpp
google::protobuf::(anonymous namespace)::IsMapFieldInApi(google::protobuf::FieldDescriptor const*): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x18(%rdi), %rdi testq %rdi, %rdi je 0x64575 leaq -0x29942(%rip), %rax # 0x3ac20 leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movq %rsp, %rdx movq %rbx, (%rdx) callq 0x3fc96 cmpb $0xb, 0x2(%rbx) jne 0x64585 movq %rbx, %rdi callq 0x1f720 jmp 0x64587 xorl %eax, %eax addq $0x10, %rsp popq %rbx retq nop
_ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE_0: push rbx sub rsp, 10h mov rbx, rdi mov rdi, [rdi+18h] test rdi, rdi jz short loc_64575 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+18h+var_10] mov [rsi], rax mov rdx, rsp mov [rdx], rbx call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_64575: cmp byte ptr [rbx+2], 0Bh jnz short loc_64585 mov rdi, rbx; this call _ZNK6google8protobuf15FieldDescriptor19is_map_message_typeEv; google::protobuf::FieldDescriptor::is_map_message_type(void) jmp short loc_64587 loc_64585: xor eax, eax loc_64587: add rsp, 10h pop rbx retn
char google::protobuf::`anonymous namespace'::IsMapFieldInApi( google::protobuf::_anonymous_namespace_ *this, const google::protobuf::FieldDescriptor *a2, long long a3, long long a4, long long a5, long long a6) { long long v7; // rdi google::protobuf::_anonymous_namespace_ *v9; // [rsp+0h] [rbp-18h] BYREF long long ( *v10[2])(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *); // [rsp+8h] [rbp-10h] BYREF v7 = *((_QWORD *)this + 3); if ( v7 ) { v10[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v9 = this; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v7, (long long)v10, (long long)&v9, a4, a5, a6); } if ( *((_BYTE *)this + 2) == 11 ) return google::protobuf::FieldDescriptor::is_map_message_type(this); else return 0; }
IsMapFieldInApi: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] TEST RDI,RDI JZ 0x00164575 LEA RAX,[0x13ac20] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX MOV RDX,RSP MOV qword ptr [RDX],RBX CALL 0x0013fc96 LAB_00164575: CMP byte ptr [RBX + 0x2],0xb JNZ 0x00164585 MOV RDI,RBX CALL 0x0011f720 JMP 0x00164587 LAB_00164585: XOR EAX,EAX LAB_00164587: ADD RSP,0x10 POP RBX RET
/* google::protobuf::(anonymous namespace)::IsMapFieldInApi(google::protobuf::FieldDescriptor const*) */ int8 google::protobuf::(anonymous_namespace)::IsMapFieldInApi(FieldDescriptor *param_1) { int8 uVar1; FieldDescriptor *local_18; code *local_10; if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_10 = FieldDescriptor::TypeOnceInit; local_18 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_10,&local_18 ); } if (param_1[2] == (FieldDescriptor)0xb) { uVar1 = FieldDescriptor::is_map_message_type(param_1); } else { uVar1 = 0; } return uVar1; }
39,678
r3d_shader_load_raster_depth_cube
r3d/src/r3d_state.c
void r3d_shader_load_raster_depth_cube(void) { R3D.shader.raster.depthCube.id = rlLoadShaderCode( VS_RASTER_DEPTH_CUBE, FS_RASTER_DEPTH_CUBE ); r3d_shader_get_location(raster.depthCube, uViewPosition); r3d_shader_get_location(raster.depthCube, uMatModel); r3d_shader_get_location(raster.depthCube, uMatMVP); r3d_shader_get_location(raster.depthCube, uFar); r3d_shader_get_location(raster.depthCube, uAlpha); r3d_shader_get_location(raster.depthCube, uTexAlbedo); r3d_shader_get_location(raster.depthCube, uAlphaScissorThreshold); }
O3
c
r3d_shader_load_raster_depth_cube: pushq %rbp movq %rsp, %rbp leaq 0x5b8f7(%rip), %rdi # 0x11dd00 leaq 0x5bf70(%rip), %rsi # 0x11e380 callq 0x1e60d movl %eax, 0xeec99(%rip) # 0x1b10b4 leaq 0x4ebf5(%rip), %rsi # 0x111017 movl %eax, %edi callq 0x1ea66 movl %eax, 0xeec95(%rip) # 0x1b10c4 movl 0xeec7f(%rip), %edi # 0x1b10b4 leaq 0x4ea6a(%rip), %rsi # 0x110ea6 callq 0x1ea66 movl %eax, 0xeec81(%rip) # 0x1b10c8 movl 0xeec67(%rip), %edi # 0x1b10b4 leaq 0x4ea5c(%rip), %rsi # 0x110eb0 callq 0x1ea66 movl %eax, 0xeec6d(%rip) # 0x1b10cc movl 0xeec4f(%rip), %edi # 0x1b10b4 leaq 0x4ed6e(%rip), %rsi # 0x1111da callq 0x1ea66 movl %eax, 0xeec5d(%rip) # 0x1b10d4 movl 0xeec37(%rip), %edi # 0x1b10b4 leaq 0x4ed4f(%rip), %rsi # 0x1111d3 callq 0x1ea66 movl %eax, 0xeec4d(%rip) # 0x1b10dc movl 0xeec1f(%rip), %edi # 0x1b10b4 leaq 0x4ea3b(%rip), %rsi # 0x110ed7 callq 0x1ea66 movl %eax, 0xeec3d(%rip) # 0x1b10e4 movl 0xeec07(%rip), %edi # 0x1b10b4 leaq 0x4eb39(%rip), %rsi # 0x110fed callq 0x1ea66 movl %eax, 0xeec2d(%rip) # 0x1b10ec popq %rbp retq
r3d_shader_load_raster_depth_cube: push rbp mov rbp, rsp lea rdi, VS_RASTER_DEPTH_CUBE; "#version 330 core\nlayout(location=0)in"... lea rsi, FS_RASTER_DEPTH_CUBE; "#version 330 core\nin vec3 vPosition;in"... call rlLoadShaderCode mov cs:dword_1B10B4, eax lea rsi, aUviewposition; "uViewPosition" mov edi, eax call rlGetLocationUniform mov cs:dword_1B10C4, eax mov edi, cs:dword_1B10B4 lea rsi, aUmatmodel; "uMatModel" call rlGetLocationUniform mov cs:dword_1B10C8, eax mov edi, cs:dword_1B10B4 lea rsi, aUmatmvp; "uMatMVP" call rlGetLocationUniform mov cs:dword_1B10CC, eax mov edi, cs:dword_1B10B4 lea rsi, aUfar; "uFar" call rlGetLocationUniform mov cs:dword_1B10D4, eax mov edi, cs:dword_1B10B4 lea rsi, aUalpha; "uAlpha" call rlGetLocationUniform mov cs:dword_1B10DC, eax mov edi, cs:dword_1B10B4 lea rsi, aUtexalbedo; "uTexAlbedo" call rlGetLocationUniform mov cs:dword_1B10E4, eax mov edi, cs:dword_1B10B4 lea rsi, aUalphascissort; "uAlphaScissorThreshold" call rlGetLocationUniform mov cs:dword_1B10EC, eax pop rbp retn
long long r3d_shader_load_raster_depth_cube() { long long result; // rax dword_1B10B4 = rlLoadShaderCode( (long long)"#version 330 core\n" "layout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=3)in" " vec4 aColor;uniform mat4 uMatModel;uniform mat4 uMatMVP;uniform float uAlpha;out vec3 vPosi" "tion;out vec2 vTexCoord;out float vAlpha;void main(){vPosition=vec3(uMatModel*vec4(aPosition" ",1.0));vTexCoord=aTexCoord;vAlpha=uAlpha*aColor.a;gl_Position=uMatMVP*vec4(aPosition,1.0);}", (long long)"#version 330 core\n" "in vec3 vPosition;in vec2 vTexCoord;in float vAlpha;uniform sampler2D uTexAlbedo;uniform flo" "at uAlphaScissorThreshold;uniform vec3 uViewPosition;uniform float uFar;void main(){float a=" "vAlpha*texture(uTexAlbedo,vTexCoord).a;if(a < uAlphaScissorThreshold)discard;gl_FragDepth=le" "ngth(vPosition-uViewPosition)/uFar;}"); dword_1B10C4 = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uViewPosition"); dword_1B10C8 = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uMatModel"); dword_1B10CC = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uMatMVP"); dword_1B10D4 = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uFar"); dword_1B10DC = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uAlpha"); dword_1B10E4 = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uTexAlbedo"); result = rlGetLocationUniform((unsigned int)dword_1B10B4, (long long)"uAlphaScissorThreshold"); dword_1B10EC = result; return result; }
r3d_shader_load_raster_depth_cube: PUSH RBP MOV RBP,RSP LEA RDI,[0x21dd00] LEA RSI,[0x21e380] CALL 0x0011e60d MOV dword ptr [0x002b10b4],EAX LEA RSI,[0x211017] MOV EDI,EAX CALL 0x0011ea66 MOV dword ptr [0x002b10c4],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x210ea6] CALL 0x0011ea66 MOV dword ptr [0x002b10c8],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x210eb0] CALL 0x0011ea66 MOV dword ptr [0x002b10cc],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x2111da] CALL 0x0011ea66 MOV dword ptr [0x002b10d4],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x2111d3] CALL 0x0011ea66 MOV dword ptr [0x002b10dc],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x210ed7] CALL 0x0011ea66 MOV dword ptr [0x002b10e4],EAX MOV EDI,dword ptr [0x002b10b4] LEA RSI,[0x210fed] CALL 0x0011ea66 MOV dword ptr [0x002b10ec],EAX POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_shader_load_raster_depth_cube(void) { DAT_002b10b4 = rlLoadShaderCode("#version 330 core\nlayout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=3)in vec4 aColor;uniform mat4 uMatModel;uniform mat4 uMatMVP;uniform float uAlpha;out vec3 vPosition;out vec2 vTexCoord;out float vAlpha;void main(){vPosition=vec3(uMatModel*vec4(aPosition,1.0));vTexCoord=aTexCoord;vAlpha=uAlpha*aColor.a;gl_Position=uMatMVP*vec4(aPosition,1.0);}" , "#version 330 core\nin vec3 vPosition;in vec2 vTexCoord;in float vAlpha;uniform sampler2D uTexAlbedo;uniform float uAlphaScissorThreshold;uniform vec3 uViewPosition;uniform float uFar;void main(){float a=vAlpha*texture(uTexAlbedo,vTexCoord).a;if(a < uAlphaScissorThreshold)discard;gl_FragDepth=length(vPosition-uViewPosition)/uFar;}" ); _DAT_002b10c4 = rlGetLocationUniform(DAT_002b10b4,"uViewPosition"); _DAT_002b10c8 = rlGetLocationUniform(DAT_002b10b4,"uMatModel"); _DAT_002b10cc = rlGetLocationUniform(DAT_002b10b4,"uMatMVP"); _DAT_002b10d4 = rlGetLocationUniform(DAT_002b10b4,&DAT_002111da); _DAT_002b10dc = rlGetLocationUniform(DAT_002b10b4,"uAlpha"); _DAT_002b10e4 = rlGetLocationUniform(DAT_002b10b4,"uTexAlbedo"); _DAT_002b10ec = rlGetLocationUniform(DAT_002b10b4,"uAlphaScissorThreshold"); return; }
39,679
my_context_continue
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_continue(struct my_context *c) { int ret; __asm__ __volatile__ ( "movl (%[save]), %%eax\n\t" "movl %%esp, (%[save])\n\t" "movl %%eax, %%esp\n\t" "movl 4(%[save]), %%eax\n\t" "movl %%ebp, 4(%[save])\n\t" "movl %%eax, %%ebp\n\t" "movl 8(%[save]), %%eax\n\t" "movl %%ebx, 8(%[save])\n\t" "movl %%eax, %%ebx\n\t" "movl 12(%[save]), %%eax\n\t" "movl %%esi, 12(%[save])\n\t" "movl %%eax, %%esi\n\t" "movl 24(%[save]), %%eax\n\t" "call 1f\n" "1:\n\t" "popl %%ecx\n\t" "addl $(2f-1b), %%ecx\n\t" "movl %%ecx, 20(%[save])\n\t" "addl $(3f-2f), %%ecx\n\t" "movl %%ecx, 24(%[save])\n\t" /* Must restore %edi last as it is also our %[save] register. */ "movl 16(%[save]), %%ecx\n\t" "movl %%edi, 16(%[save])\n\t" "movl %%ecx, %%edi\n\t" "jmp *%%eax\n" /* Come here when operation is done. Be sure to use the same callee-save register for %[save] here and in my_context_spawn(), so we preserve the value correctly at this point. */ "2:\n\t" "movl (%[save]), %%esp\n\t" "movl 4(%[save]), %%ebp\n\t" "movl 8(%[save]), %%ebx\n\t" "movl 12(%[save]), %%esi\n\t" "movl 16(%[save]), %%edi\n\t" "xorl %[ret], %[ret]\n\t" "jmp 4f\n" /* Come here when operation is suspended. */ "3:\n\t" "movl $1, %[ret]\n" "4:\n" : [ret] "=a" (ret) : /* Need this in callee-save register to preserve in function call. */ [save] "D" (&c->save[0]) : "ecx", "edx", "memory", "cc" ); return ret; }
O3
c
my_context_continue: pushq %rbp movq %rsp, %rbp pushq %rbx movq %rdi, %rbx movq (%rbx), %rax movq %rsp, (%rbx) movq %rax, %rsp movq 0x8(%rbx), %rax movq %rbp, 0x8(%rbx) movq %rax, %rbp movq 0x18(%rbx), %rax movq %r12, 0x18(%rbx) movq %rax, %r12 movq 0x20(%rbx), %rax movq %r13, 0x20(%rbx) movq %rax, %r13 movq 0x28(%rbx), %rax movq %r14, 0x28(%rbx) movq %rax, %r14 movq 0x30(%rbx), %rax movq %r15, 0x30(%rbx) movq %rax, %r15 leaq 0x20(%rip), %rax # 0x2fe2a leaq 0x34(%rip), %rcx # 0x2fe45 movq %rax, 0x38(%rbx) movq 0x40(%rbx), %rax movq %rcx, 0x40(%rbx) movq 0x10(%rbx), %rcx movq %rbx, 0x10(%rbx) movq %rcx, %rbx jmpq *%rax movq (%rbx), %rsp movq 0x8(%rbx), %rbp movq 0x18(%rbx), %r12 movq 0x20(%rbx), %r13 movq 0x28(%rbx), %r14 movq 0x30(%rbx), %r15 xorl %eax, %eax jmp 0x2fe4a movl $0x1, %eax popq %rbx popq %rbp retq
my_context_continue: push rbp mov rbp, rsp push rbx mov rbx, rdi mov rax, [rbx] mov [rbx], rsp mov rsp, rax mov rax, [rbx+8] mov [rbx+8], rbp mov rbp, rax mov rax, [rbx+18h] mov [rbx+18h], r12 mov r12, rax mov rax, [rbx+20h] mov [rbx+20h], r13 mov r13, rax mov rax, [rbx+28h] mov [rbx+28h], r14 mov r14, rax mov rax, [rbx+30h] mov [rbx+30h], r15 mov r15, rax lea rax, sub_2FE2A lea rcx, loc_2FE45 mov [rbx+38h], rax mov rax, [rbx+40h] mov [rbx+40h], rcx mov rcx, [rbx+10h] mov [rbx+10h], rbx mov rbx, rcx jmp rax
long long my_context_continue(_QWORD *a1) { long long v1; // r12 long long v2; // r13 long long v3; // r14 long long v4; // r15 long long (*v5)(void); // rax long long v7; // [rsp+0h] [rbp-8h] BYREF long long savedregs; // [rsp+8h] [rbp+0h] BYREF *a1 = &v7; a1[1] = &savedregs; a1[3] = v1; a1[4] = v2; a1[5] = v3; a1[6] = v4; a1[7] = sub_2FE2A; v5 = (long long (*)(void))a1[8]; a1[8] = &loc_2FE45; a1[2] = a1; return v5(); }
my_context_continue: PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RBX] MOV qword ptr [RBX],RSP MOV RSP,RAX MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RBX + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RBX + 0x28] MOV qword ptr [RBX + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x30],R15 MOV R15,RAX LEA RAX,[0x12fe2a] LEA RCX,[0x12fe45] MOV qword ptr [RBX + 0x38],RAX MOV RAX,qword ptr [RBX + 0x40] MOV qword ptr [RBX + 0x40],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x10],RBX MOV RBX,RCX JMP RAX
void my_context_continue(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff0; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; *(int1 **)(param_1 + 0x38) = &LAB_0012fe2a; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_0012fe45; *(long *)(param_1 + 0x10) = param_1; /* WARNING: Could not recover jumptable at 0x0012fe28. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
39,680
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>>::moved_or_copied() const
llama.cpp/common/json.hpp
value_type moved_or_copied() const { if (value_ref == nullptr) { return std::move(owned_value); } return *value_ref; }
O3
cpp
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>>::moved_or_copied() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi testq %rsi, %rsi je 0x80f75 movq %rbx, %rdi callq 0x78ed0 jmp 0x80f9f movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x73862 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x73862 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] test rsi, rsi jz short loc_80F75 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_80F9F loc_80F75: 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) loc_80F9F: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned __int8 * 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 *a1, long long a2) { unsigned __int8 *v3; // rsi v3 = *(unsigned __int8 **)(a2 + 16); if ( v3 ) { nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, v3); } else { *(_OWORD *)a1 = *(_OWORD *)a2; 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 *)a2); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 8) = 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((char *)a1); } return a1; }
moved_or_copied: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] TEST RSI,RSI JZ 0x00180f75 MOV RDI,RBX CALL 0x00178ed0 JMP 0x00180f9f LAB_00180f75: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00173862 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00173862 LAB_00180f9f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* 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() const */ void 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(void) { int8 uVar1; int8 *in_RSI; 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> *in_RDI; if ((basic_json *)in_RSI[2] == (basic_json *)0x0) { uVar1 = in_RSI[1]; *(int8 *)in_RDI = *in_RSI; *(int8 *)(in_RDI + 8) = uVar1; 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(in_RSI,0)); *(int1 *)in_RSI = 0; in_RSI[1] = 0; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(in_RDI,0)); } else { basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(in_RDI,(basic_json *)in_RSI[2]); } return; }
39,681
mbedtls_poly1305_finish
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/poly1305.c
int mbedtls_poly1305_finish(mbedtls_poly1305_context *ctx, unsigned char mac[16]) { POLY1305_VALIDATE_RET(ctx != NULL); POLY1305_VALIDATE_RET(mac != NULL); /* Process any leftover data */ if (ctx->queue_len > 0U) { /* Add padding bit */ ctx->queue[ctx->queue_len] = 1U; ctx->queue_len++; /* Pad with zeroes */ memset(&ctx->queue[ctx->queue_len], 0, POLY1305_BLOCK_SIZE_BYTES - ctx->queue_len); poly1305_process(ctx, 1U, /* Process 1 block */ ctx->queue, 0U); /* Already padded above */ } poly1305_compute_mac(ctx, mac); return 0; }
O3
c
mbedtls_poly1305_finish: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x48(%rdi), %rax testq %rax, %rax je 0xa0b31 leaq 0x34(%r14), %r15 movb $0x1, 0x34(%r14,%rax) movq 0x48(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x48(%r14) leaq (%r14,%rax), %rdi addq $0x35, %rdi movl $0xf, %edx subq %rax, %rdx xorl %esi, %esi callq 0xf2b0 movl $0x1, %esi movq %r14, %rdi movq %r15, %rdx xorl %ecx, %ecx callq 0xa08a3 movl 0x20(%r14), %edx movl 0x24(%r14), %edi movl 0x28(%r14), %ecx movl 0x2c(%r14), %esi movq %rdx, %r15 addq $0x5, %r15 movq %r15, %r10 shrq $0x20, %r10 addq %rdi, %r10 movq %r10, %r9 shrq $0x20, %r9 addq %rcx, %r9 movq %r9, %r8 shrq $0x20, %r8 addq %rsi, %r8 movq %r8, %r11 shrq $0x20, %r11 addl 0x30(%r14), %r11d shrl $0x2, %r11d movl %r11d, %eax negl %eax decl %r11d movl %r11d, %ebp andl %edx, %ebp movl %eax, %edx andl %r15d, %edx orl %ebp, %edx movl %r11d, %ebp andl %edi, %ebp movl %eax, %r15d andl %r10d, %r15d orl %ebp, %r15d movl %r11d, %r10d andl %ecx, %r10d movl %eax, %edi andl %r9d, %edi orl %r10d, %edi andl %esi, %r11d andl %r8d, %eax orl %r11d, %eax addl 0x10(%r14), %edx movl 0x14(%r14), %ecx movl 0x18(%r14), %esi adcq %r15, %rcx addl 0x1c(%r14), %eax movb %dl, (%rbx) movb %dh, 0x1(%rbx) movl %edx, %r8d shrl $0x10, %r8d movb %r8b, 0x2(%rbx) shrl $0x18, %edx movb %dl, 0x3(%rbx) movq %rcx, %rdx movb %cl, 0x4(%rbx) movb %ch, 0x5(%rbx) movl %ecx, %r8d shrl $0x10, %r8d movb %r8b, 0x6(%rbx) shrl $0x18, %ecx movb %cl, 0x7(%rbx) addq %rdi, %rsi shrq $0x20, %rdx addq %rsi, %rdx movq %rdx, %rcx movb %dl, 0x8(%rbx) movb %dh, 0x9(%rbx) movl %edx, %esi shrl $0x10, %esi movb %sil, 0xa(%rbx) shrl $0x18, %edx movb %dl, 0xb(%rbx) shrq $0x20, %rcx addl %ecx, %eax movb %al, 0xc(%rbx) movb %ah, 0xd(%rbx) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0xe(%rbx) shrl $0x18, %eax movb %al, 0xf(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mbedtls_poly1305_finish: push rbp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rdi+48h] test rax, rax jz short loc_A0B31 lea r15, [r14+34h] mov byte ptr [r14+rax+34h], 1 mov rax, [r14+48h] lea rcx, [rax+1] mov [r14+48h], rcx lea rdi, [r14+rax] add rdi, 35h ; '5' mov edx, 0Fh sub rdx, rax xor esi, esi call _memset mov esi, 1 mov rdi, r14 mov rdx, r15 xor ecx, ecx call poly1305_process loc_A0B31: mov edx, [r14+20h] mov edi, [r14+24h] mov ecx, [r14+28h] mov esi, [r14+2Ch] mov r15, rdx add r15, 5 mov r10, r15 shr r10, 20h add r10, rdi mov r9, r10 shr r9, 20h add r9, rcx mov r8, r9 shr r8, 20h add r8, rsi mov r11, r8 shr r11, 20h add r11d, [r14+30h] shr r11d, 2 mov eax, r11d neg eax dec r11d mov ebp, r11d and ebp, edx mov edx, eax and edx, r15d or edx, ebp mov ebp, r11d and ebp, edi mov r15d, eax and r15d, r10d or r15d, ebp mov r10d, r11d and r10d, ecx mov edi, eax and edi, r9d or edi, r10d and r11d, esi and eax, r8d or eax, r11d add edx, [r14+10h] mov ecx, [r14+14h] mov esi, [r14+18h] adc rcx, r15 add eax, [r14+1Ch] mov [rbx], dl mov [rbx+1], dh mov r8d, edx shr r8d, 10h mov [rbx+2], r8b shr edx, 18h mov [rbx+3], dl mov rdx, rcx mov [rbx+4], cl mov [rbx+5], ch mov r8d, ecx shr r8d, 10h mov [rbx+6], r8b shr ecx, 18h mov [rbx+7], cl add rsi, rdi shr rdx, 20h add rdx, rsi mov rcx, rdx mov [rbx+8], dl mov [rbx+9], dh mov esi, edx shr esi, 10h mov [rbx+0Ah], sil shr edx, 18h mov [rbx+0Bh], dl shr rcx, 20h add eax, ecx mov [rbx+0Ch], al mov [rbx+0Dh], ah mov ecx, eax shr ecx, 10h mov [rbx+0Eh], cl shr eax, 18h mov [rbx+0Fh], al xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mbedtls_poly1305_finish(long long a1, long long a2) { long long v4; // rax long long v5; // rax long long v6; // rdi long long v7; // rcx long long v8; // rsi long long v9; // r8 unsigned int v10; // edx long long v11; // r15 long long v12; // rdi int v13; // r11d long long v14; // rsi unsigned long long v15; // rcx int v16; // eax unsigned long long v17; // rcx v4 = *(_QWORD *)(a1 + 72); if ( v4 ) { *(_BYTE *)(a1 + v4 + 52) = 1; v5 = *(_QWORD *)(a1 + 72); *(_QWORD *)(a1 + 72) = v5 + 1; memset(a1 + v5 + 53, 0LL, 15 - v5); poly1305_process((unsigned int *)a1, 1LL, a1 + 52, 0); } v6 = *(unsigned int *)(a1 + 36); v7 = *(unsigned int *)(a1 + 40); v8 = *(unsigned int *)(a1 + 44); v9 = v8 + ((v7 + ((v6 + (((unsigned long long)*(unsigned int *)(a1 + 32) + 5) >> 32)) >> 32)) >> 32); v10 = *(_DWORD *)(a1 + 32) & (((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2) - 1) | (*(_DWORD *)(a1 + 32) + 5) & -((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2); v11 = (unsigned int)v6 & (((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2) - 1) | (unsigned int)(v6 + (((unsigned long long)*(unsigned int *)(a1 + 32) + 5) >> 32)) & -((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2); v12 = (unsigned int)v7 & (((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2) - 1) | (unsigned int)(v7 + ((v6 + (((unsigned long long)*(unsigned int *)(a1 + 32) + 5) >> 32)) >> 32)) & -((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2); v13 = v8 & (((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2) - 1); v14 = *(unsigned int *)(a1 + 24); v15 = v11 + __CFADD__(*(_DWORD *)(a1 + 16), v10) + (unsigned long long)*(unsigned int *)(a1 + 20); v16 = *(_DWORD *)(a1 + 28) + (v13 | v9 & -((unsigned int)(*(_DWORD *)(a1 + 48) + HIDWORD(v9)) >> 2)); *(_DWORD *)a2 = *(_DWORD *)(a1 + 16) + v10; *(_WORD *)(a2 + 4) = v15; *(_BYTE *)(a2 + 6) = BYTE2(v15); *(_BYTE *)(a2 + 7) = BYTE3(v15); v17 = v12 + v14 + HIDWORD(v15); *(_WORD *)(a2 + 8) = v17; *(_BYTE *)(a2 + 10) = BYTE2(v17); *(_BYTE *)(a2 + 11) = BYTE3(v17); *(_DWORD *)(a2 + 12) = HIDWORD(v17) + v16; return 0LL; }
mbedtls_poly1305_finish: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x48] TEST RAX,RAX JZ 0x001a0b31 LEA R15,[R14 + 0x34] MOV byte ptr [R14 + RAX*0x1 + 0x34],0x1 MOV RAX,qword ptr [R14 + 0x48] LEA RCX,[RAX + 0x1] MOV qword ptr [R14 + 0x48],RCX LEA RDI,[R14 + RAX*0x1] ADD RDI,0x35 MOV EDX,0xf SUB RDX,RAX XOR ESI,ESI CALL 0x0010f2b0 MOV ESI,0x1 MOV RDI,R14 MOV RDX,R15 XOR ECX,ECX CALL 0x001a08a3 LAB_001a0b31: MOV EDX,dword ptr [R14 + 0x20] MOV EDI,dword ptr [R14 + 0x24] MOV ECX,dword ptr [R14 + 0x28] MOV ESI,dword ptr [R14 + 0x2c] MOV R15,RDX ADD R15,0x5 MOV R10,R15 SHR R10,0x20 ADD R10,RDI MOV R9,R10 SHR R9,0x20 ADD R9,RCX MOV R8,R9 SHR R8,0x20 ADD R8,RSI MOV R11,R8 SHR R11,0x20 ADD R11D,dword ptr [R14 + 0x30] SHR R11D,0x2 MOV EAX,R11D NEG EAX DEC R11D MOV EBP,R11D AND EBP,EDX MOV EDX,EAX AND EDX,R15D OR EDX,EBP MOV EBP,R11D AND EBP,EDI MOV R15D,EAX AND R15D,R10D OR R15D,EBP MOV R10D,R11D AND R10D,ECX MOV EDI,EAX AND EDI,R9D OR EDI,R10D AND R11D,ESI AND EAX,R8D OR EAX,R11D ADD EDX,dword ptr [R14 + 0x10] MOV ECX,dword ptr [R14 + 0x14] MOV ESI,dword ptr [R14 + 0x18] ADC RCX,R15 ADD EAX,dword ptr [R14 + 0x1c] MOV byte ptr [RBX],DL MOV byte ptr [RBX + 0x1],DH MOV R8D,EDX SHR R8D,0x10 MOV byte ptr [RBX + 0x2],R8B SHR EDX,0x18 MOV byte ptr [RBX + 0x3],DL MOV RDX,RCX MOV byte ptr [RBX + 0x4],CL MOV byte ptr [RBX + 0x5],CH MOV R8D,ECX SHR R8D,0x10 MOV byte ptr [RBX + 0x6],R8B SHR ECX,0x18 MOV byte ptr [RBX + 0x7],CL ADD RSI,RDI SHR RDX,0x20 ADD RDX,RSI MOV RCX,RDX MOV byte ptr [RBX + 0x8],DL MOV byte ptr [RBX + 0x9],DH MOV ESI,EDX SHR ESI,0x10 MOV byte ptr [RBX + 0xa],SIL SHR EDX,0x18 MOV byte ptr [RBX + 0xb],DL SHR RCX,0x20 ADD EAX,ECX MOV byte ptr [RBX + 0xc],AL MOV byte ptr [RBX + 0xd],AH MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RBX + 0xe],CL SHR EAX,0x18 MOV byte ptr [RBX + 0xf],AL XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 mbedtls_poly1305_finish(long param_1,int1 *param_2) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; int iVar5; uint uVar6; int iVar7; long lVar8; long lVar9; ulong uVar10; ulong uVar11; uint uVar12; ulong uVar13; if (*(long *)(param_1 + 0x48) != 0) { *(int1 *)(param_1 + 0x34 + *(long *)(param_1 + 0x48)) = 1; lVar8 = *(long *)(param_1 + 0x48); *(long *)(param_1 + 0x48) = lVar8 + 1; memset((void *)(param_1 + lVar8 + 0x35),0,0xf - lVar8); poly1305_process(param_1,1,param_1 + 0x34,0); } uVar1 = *(uint *)(param_1 + 0x28); uVar2 = *(uint *)(param_1 + 0x2c); uVar13 = (ulong)*(uint *)(param_1 + 0x20) + 5; uVar11 = (uVar13 >> 0x20) + (ulong)*(uint *)(param_1 + 0x24); uVar10 = (uVar11 >> 0x20) + (ulong)uVar1; lVar9 = (uVar10 >> 0x20) + (ulong)uVar2; uVar12 = (uint)((int)((ulong)lVar9 >> 0x20) + *(int *)(param_1 + 0x30)) >> 2; uVar4 = -uVar12; uVar12 = uVar12 - 1; uVar6 = uVar4 & (uint)uVar13 | uVar12 & *(uint *)(param_1 + 0x20); iVar7 = uVar6 + *(uint *)(param_1 + 0x10); uVar3 = *(uint *)(param_1 + 0x18); uVar11 = (ulong)*(uint *)(param_1 + 0x14) + (ulong)(uVar4 & (uint)uVar11 | uVar12 & *(uint *)(param_1 + 0x24)) + (ulong)CARRY4(uVar6,*(uint *)(param_1 + 0x10)); iVar5 = *(int *)(param_1 + 0x1c); *param_2 = (char)iVar7; param_2[1] = (char)((uint)iVar7 >> 8); param_2[2] = (char)((uint)iVar7 >> 0x10); param_2[3] = (char)((uint)iVar7 >> 0x18); param_2[4] = (char)uVar11; param_2[5] = (char)(uVar11 >> 8); param_2[6] = (char)(uVar11 >> 0x10); param_2[7] = (char)(uVar11 >> 0x18); lVar8 = (uVar11 >> 0x20) + (ulong)uVar3 + (ulong)(uVar4 & (uint)uVar10 | uVar12 & uVar1); param_2[8] = (char)lVar8; param_2[9] = (char)((ulong)lVar8 >> 8); param_2[10] = (char)((ulong)lVar8 >> 0x10); param_2[0xb] = (char)((ulong)lVar8 >> 0x18); iVar5 = (uVar4 & (uint)lVar9 | uVar12 & uVar2) + iVar5 + (int)((ulong)lVar8 >> 0x20); param_2[0xc] = (char)iVar5; param_2[0xd] = (char)((uint)iVar5 >> 8); param_2[0xe] = (char)((uint)iVar5 >> 0x10); param_2[0xf] = (char)((uint)iVar5 >> 0x18); return 0; }
39,682
find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int)
eloqsql/storage/perfschema/pfs_digest.cc
PFS_statement_stat* find_or_create_digest(PFS_thread *thread, const sql_digest_storage *digest_storage, const char *schema_name, uint schema_name_length) { assert(digest_storage != NULL); if (statements_digest_stat_array == NULL) return NULL; if (digest_storage->m_byte_count <= 0) return NULL; LF_PINS *pins= get_digest_hash_pins(thread); if (unlikely(pins == NULL)) return NULL; /* Note: the LF_HASH key is a block of memory, make sure to clean unused bytes, so that memcmp() can compare keys. */ PFS_digest_key hash_key; memset(& hash_key, 0, sizeof(hash_key)); /* Compute MD5 Hash of the tokens received. */ compute_digest_md5(digest_storage, hash_key.m_md5); memcpy((void*)& digest_storage->m_md5, &hash_key.m_md5, MD5_HASH_SIZE); /* Add the current schema to the key */ hash_key.m_schema_name_length= schema_name_length; if (schema_name_length > 0) memcpy(hash_key.m_schema_name, schema_name, schema_name_length); int res; uint retry_count= 0; const uint retry_max= 3; size_t safe_index; size_t attempts= 0; PFS_statements_digest_stat **entry; PFS_statements_digest_stat *pfs= NULL; pfs_dirty_state dirty_state; ulonglong now= my_hrtime().val; search: /* Lookup LF_HASH using this new key. */ entry= reinterpret_cast<PFS_statements_digest_stat**> (lf_hash_search(&digest_hash, pins, &hash_key, sizeof(PFS_digest_key))); if (entry && (entry != MY_ERRPTR)) { /* If digest already exists, update stats and return. */ pfs= *entry; pfs->m_last_seen= now; lf_hash_search_unpin(pins); return & pfs->m_stat; } lf_hash_search_unpin(pins); if (digest_full) { /* digest_stat array is full. Add stat at index 0 and return. */ pfs= &statements_digest_stat_array[0]; digest_lost++; if (pfs->m_first_seen == 0) pfs->m_first_seen= now; pfs->m_last_seen= now; return & pfs->m_stat; } while (++attempts <= digest_max) { safe_index= PFS_atomic::add_u32(& digest_monotonic_index.m_u32, 1) % digest_max; if (safe_index == 0) { /* Record [0] is reserved. */ continue; } /* Add a new record in digest stat array. */ assert(safe_index < digest_max); pfs= &statements_digest_stat_array[safe_index]; if (pfs->m_lock.is_free()) { if (pfs->m_lock.free_to_dirty(& dirty_state)) { /* Copy digest hash/LF Hash search key. */ memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); /* Copy digest storage to statement_digest_stat_array so that it could be used later to generate digest text. */ pfs->m_digest_storage.copy(digest_storage); pfs->m_first_seen= now; pfs->m_last_seen= now; res= lf_hash_insert(&digest_hash, pins, &pfs); if (likely(res == 0)) { pfs->m_lock.dirty_to_allocated(& dirty_state); return & pfs->m_stat; } pfs->m_lock.dirty_to_free(& dirty_state); if (res > 0) { /* Duplicate insert by another thread */ if (++retry_count > retry_max) { /* Avoid infinite loops */ digest_lost++; return NULL; } goto search; } /* OOM in lf_hash_insert */ digest_lost++; return NULL; } } } /* The digest array is now full. */ digest_full= true; pfs= &statements_digest_stat_array[0]; if (pfs->m_first_seen == 0) pfs->m_first_seen= now; pfs->m_last_seen= now; return & pfs->m_stat; }
O0
cpp
find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xf0(%rbp) movq %rsi, -0xf8(%rbp) movq %rdx, -0x100(%rbp) movl %ecx, -0x104(%rbp) cmpq $0x0, 0x3bb49d(%rip) # 0x40d588 jne 0x520fd movq $0x0, -0xe8(%rbp) jmp 0x52588 movq -0xf8(%rbp), %rax cmpl $0x0, 0x4(%rax) ja 0x5211a movq $0x0, -0xe8(%rbp) jmp 0x52588 movq -0xf0(%rbp), %rdi callq 0x525c0 movq %rax, -0x110(%rbp) cmpq $0x0, -0x110(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x52152 movq $0x0, -0xe8(%rbp) jmp 0x52588 leaq -0xdc(%rbp), %rdi xorl %esi, %esi movl $0xd4, %edx callq 0x261c0 movq -0xf8(%rbp), %rdi leaq -0xdc(%rbp), %rsi callq 0x68c50 movq -0xf8(%rbp), %rax movq -0xdc(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0xd4(%rbp), %rcx movq %rcx, 0x10(%rax) movl -0x104(%rbp), %eax movl %eax, -0xc(%rbp) cmpl $0x0, -0x104(%rbp) jbe 0x521c6 leaq -0xdc(%rbp), %rdi addq $0x10, %rdi movq -0x100(%rbp), %rsi movl -0x104(%rbp), %eax movl %eax, %edx callq 0x26280 movl $0x0, -0x118(%rbp) movl $0x3, -0x11c(%rbp) movq $0x0, -0x130(%rbp) movq $0x0, -0x140(%rbp) callq 0x58440 movq %rax, -0x158(%rbp) movq -0x158(%rbp), %rax movq %rax, -0x150(%rbp) movq -0x110(%rbp), %rsi leaq 0x3bb3f0(%rip), %rdi # 0x40d608 leaq -0xdc(%rbp), %rdx movl $0xd4, %ecx callq 0x5d8b0 movq %rax, -0x138(%rbp) cmpq $0x0, -0x138(%rbp) je 0x522a8 movl $0x1, %eax cmpq %rax, -0x138(%rbp) je 0x522a8 movq -0x138(%rbp), %rax movq (%rax), %rax movq %rax, -0x140(%rbp) movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c8(%rax) jmp 0x52270 jmp 0x52272 movq -0x110(%rbp), %rcx movq $0x0, -0x160(%rbp) movq -0x160(%rbp), %rax xchgq %rax, 0x10(%rcx) movq -0x140(%rbp), %rax addq $0x108, %rax # imm = 0x108 movq %rax, -0xe8(%rbp) jmp 0x52588 jmp 0x522aa jmp 0x522ac jmp 0x522ae movq -0x110(%rbp), %rcx movq $0x0, -0x168(%rbp) movq -0x168(%rbp), %rax xchgq %rax, 0x10(%rcx) testb $0x1, 0x3bb32e(%rip) # 0x40d600 je 0x52348 movq 0x3bb2ad(%rip), %rax # 0x40d588 movq %rax, -0x140(%rbp) movq 0x3bb297(%rip), %rax # 0x40d580 addq $0x1, %rax movq %rax, 0x3bb28c(%rip) # 0x40d580 movq -0x140(%rbp), %rax cmpq $0x0, 0x1c0(%rax) jne 0x5231a movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c0(%rax) movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c8(%rax) movq -0x140(%rbp), %rax addq $0x108, %rax # imm = 0x108 movq %rax, -0xe8(%rbp) jmp 0x52588 jmp 0x5234a movq -0x130(%rbp), %rax addq $0x1, %rax movq %rax, -0x130(%rbp) cmpq 0x3bb215(%rip), %rax # 0x40d578 ja 0x52524 leaq 0x3bb250(%rip), %rdi # 0x40d5c0 movl $0x1, %esi callq 0x37ac0 movl %eax, %eax xorl %ecx, %ecx movl %ecx, %edx divq 0x3bb1f1(%rip) # 0x40d578 movq %rdx, -0x128(%rbp) cmpq $0x0, -0x128(%rbp) jne 0x5239a jmp 0x5234a movq 0x3bb1e7(%rip), %rax # 0x40d588 movq -0x128(%rbp), %rcx shlq $0x9, %rcx addq %rcx, %rax movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rdi callq 0x527f0 testb $0x1, %al jne 0x523cb jmp 0x5251f movq -0x140(%rbp), %rdi leaq -0x144(%rbp), %rsi callq 0x37c50 testb $0x1, %al jne 0x523e7 jmp 0x5251d movq -0x140(%rbp), %rdi addq $0x4, %rdi leaq -0xdc(%rbp), %rsi movl $0xd4, %edx callq 0x26280 movq -0x140(%rbp), %rdi addq $0xd8, %rdi movq -0xf8(%rbp), %rsi callq 0x4e770 movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c0(%rax) movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c8(%rax) movq -0x110(%rbp), %rsi leaq 0x3bb1b3(%rip), %rdi # 0x40d608 leaq -0x140(%rbp), %rdx callq 0x5c890 movl %eax, -0x114(%rbp) cmpl $0x0, -0x114(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x524a7 movq -0x140(%rbp), %rdi leaq -0x144(%rbp), %rsi callq 0x334b0 movq -0x140(%rbp), %rax addq $0x108, %rax # imm = 0x108 movq %rax, -0xe8(%rbp) jmp 0x52588 movq -0x140(%rbp), %rdi leaq -0x144(%rbp), %rsi callq 0x52820 cmpl $0x0, -0x114(%rbp) jle 0x524fe movl -0x118(%rbp), %eax addl $0x1, %eax movl %eax, -0x118(%rbp) cmpl $0x3, %eax jbe 0x524f9 movq 0x3bb0a2(%rip), %rax # 0x40d580 addq $0x1, %rax movq %rax, 0x3bb097(%rip) # 0x40d580 movq $0x0, -0xe8(%rbp) jmp 0x52588 jmp 0x5220a movq 0x3bb07b(%rip), %rax # 0x40d580 addq $0x1, %rax movq %rax, 0x3bb070(%rip) # 0x40d580 movq $0x0, -0xe8(%rbp) jmp 0x52588 jmp 0x5251f jmp 0x5234a movb $0x1, 0x3bb0d5(%rip) # 0x40d600 movq 0x3bb056(%rip), %rax # 0x40d588 movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax cmpq $0x0, 0x1c0(%rax) jne 0x5255f movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c0(%rax) movq -0x150(%rbp), %rcx movq -0x140(%rbp), %rax movq %rcx, 0x1c8(%rax) movq -0x140(%rbp), %rax addq $0x108, %rax # imm = 0x108 movq %rax, -0xe8(%rbp) movq -0xe8(%rbp), %rax movq %rax, -0x170(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x525b8 movq -0x170(%rbp), %rax addq $0x170, %rsp # imm = 0x170 popq %rbp retq callq 0x26360 nopl (%rax)
_Z21find_or_create_digestP10PFS_threadPK18sql_digest_storagePKcj: push rbp mov rbp, rsp sub rsp, 170h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_F0], rdi mov [rbp+var_F8], rsi mov [rbp+var_100], rdx mov [rbp+var_104], ecx cmp cs:statements_digest_stat_array, 0 jnz short loc_520FD mov [rbp+var_E8], 0 jmp loc_52588 loc_520FD: mov rax, [rbp+var_F8] cmp dword ptr [rax+4], 0 ja short loc_5211A mov [rbp+var_E8], 0 jmp loc_52588 loc_5211A: mov rdi, [rbp+var_F0]; PFS_thread * call _ZL20get_digest_hash_pinsP10PFS_thread; get_digest_hash_pins(PFS_thread *) mov [rbp+var_110], rax cmp [rbp+var_110], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_52152 mov [rbp+var_E8], 0 jmp loc_52588 loc_52152: lea rdi, [rbp+var_DC] xor esi, esi mov edx, 0D4h call _memset mov rdi, [rbp+var_F8] lea rsi, [rbp+var_DC] call _Z18compute_digest_md5PK18sql_digest_storagePh; compute_digest_md5(sql_digest_storage const*,uchar *) mov rax, [rbp+var_F8] mov rcx, [rbp+var_DC] mov [rax+8], rcx mov rcx, [rbp+var_D4] mov [rax+10h], rcx mov eax, [rbp+var_104] mov [rbp+var_C], eax cmp [rbp+var_104], 0 jbe short loc_521C6 lea rdi, [rbp+var_DC] add rdi, 10h mov rsi, [rbp+var_100] mov eax, [rbp+var_104] mov edx, eax call _memcpy loc_521C6: mov [rbp+var_118], 0 mov [rbp+var_11C], 3 mov [rbp+var_130], 0 mov [rbp+var_140], 0 call my_hrtime mov [rbp+var_158], rax mov rax, [rbp+var_158] mov [rbp+var_150], rax loc_5220A: mov rsi, [rbp+var_110] lea rdi, digest_hash lea rdx, [rbp+var_DC] mov ecx, 0D4h call lf_hash_search mov [rbp+var_138], rax cmp [rbp+var_138], 0 jz short loc_522A8 mov eax, 1 cmp [rbp+var_138], rax jz short loc_522A8 mov rax, [rbp+var_138] mov rax, [rax] mov [rbp+var_140], rax mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C8h], rcx jmp short $+2 loc_52270: jmp short $+2 loc_52272: mov rcx, [rbp+var_110] mov [rbp+var_160], 0 mov rax, [rbp+var_160] xchg rax, [rcx+10h] mov rax, [rbp+var_140] add rax, 108h mov [rbp+var_E8], rax jmp loc_52588 loc_522A8: jmp short $+2 loc_522AA: jmp short $+2 loc_522AC: jmp short $+2 loc_522AE: mov rcx, [rbp+var_110] mov [rbp+var_168], 0 mov rax, [rbp+var_168] xchg rax, [rcx+10h] test cs:digest_full, 1 jz short loc_52348 mov rax, cs:statements_digest_stat_array mov [rbp+var_140], rax mov rax, cs:digest_lost add rax, 1 mov cs:digest_lost, rax mov rax, [rbp+var_140] cmp qword ptr [rax+1C0h], 0 jnz short loc_5231A mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C0h], rcx loc_5231A: mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C8h], rcx mov rax, [rbp+var_140] add rax, 108h mov [rbp+var_E8], rax jmp loc_52588 loc_52348: jmp short $+2 loc_5234A: mov rax, [rbp+var_130] add rax, 1 mov [rbp+var_130], rax cmp rax, cs:digest_max ja loc_52524 lea rdi, _ZL22digest_monotonic_index; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov eax, eax xor ecx, ecx mov edx, ecx div cs:digest_max mov [rbp+var_128], rdx cmp [rbp+var_128], 0 jnz short loc_5239A jmp short loc_5234A loc_5239A: mov rax, cs:statements_digest_stat_array mov rcx, [rbp+var_128] shl rcx, 9 add rax, rcx mov [rbp+var_140], rax mov rdi, [rbp+var_140]; this call _ZN8pfs_lock7is_freeEv; pfs_lock::is_free(void) test al, 1 jnz short loc_523CB jmp loc_5251F loc_523CB: mov rdi, [rbp+var_140] lea rsi, [rbp+var_144] call _ZN8pfs_lock13free_to_dirtyEP15pfs_dirty_state; pfs_lock::free_to_dirty(pfs_dirty_state *) test al, 1 jnz short loc_523E7 jmp loc_5251D loc_523E7: mov rdi, [rbp+var_140] add rdi, 4 lea rsi, [rbp+var_DC] mov edx, 0D4h call _memcpy mov rdi, [rbp+var_140] add rdi, 0D8h; this mov rsi, [rbp+var_F8]; sql_digest_storage * call _ZN18sql_digest_storage4copyEPKS_; sql_digest_storage::copy(sql_digest_storage const*) mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C0h], rcx mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C8h], rcx mov rsi, [rbp+var_110] lea rdi, digest_hash lea rdx, [rbp+var_140] call lf_hash_insert mov [rbp+var_114], eax cmp [rbp+var_114], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_524A7 mov rdi, [rbp+var_140] lea rsi, [rbp+var_144] call _ZN8pfs_lock18dirty_to_allocatedEPK15pfs_dirty_state; pfs_lock::dirty_to_allocated(pfs_dirty_state const*) mov rax, [rbp+var_140] add rax, 108h mov [rbp+var_E8], rax jmp loc_52588 loc_524A7: mov rdi, [rbp+var_140] lea rsi, [rbp+var_144] call _ZN8pfs_lock13dirty_to_freeEPK15pfs_dirty_state; pfs_lock::dirty_to_free(pfs_dirty_state const*) cmp [rbp+var_114], 0 jle short loc_524FE mov eax, [rbp+var_118] add eax, 1 mov [rbp+var_118], eax cmp eax, 3 jbe short loc_524F9 mov rax, cs:digest_lost add rax, 1 mov cs:digest_lost, rax mov [rbp+var_E8], 0 jmp loc_52588 loc_524F9: jmp loc_5220A loc_524FE: mov rax, cs:digest_lost add rax, 1 mov cs:digest_lost, rax mov [rbp+var_E8], 0 jmp short loc_52588 loc_5251D: jmp short $+2 loc_5251F: jmp loc_5234A loc_52524: mov cs:digest_full, 1 mov rax, cs:statements_digest_stat_array mov [rbp+var_140], rax mov rax, [rbp+var_140] cmp qword ptr [rax+1C0h], 0 jnz short loc_5255F mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C0h], rcx loc_5255F: mov rcx, [rbp+var_150] mov rax, [rbp+var_140] mov [rax+1C8h], rcx mov rax, [rbp+var_140] add rax, 108h mov [rbp+var_E8], rax loc_52588: mov rax, [rbp+var_E8] mov [rbp+var_170], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_525B8 mov rax, [rbp+var_170] add rsp, 170h pop rbp retn loc_525B8: call ___stack_chk_fail
long long find_or_create_digest(PFS_thread *a1, const sql_digest_storage *a2, const char *a3, unsigned int a4) { sql_digest_storage *v4; // rax unsigned int v5; // edx long long v7; // [rsp+20h] [rbp-150h] unsigned int v8; // [rsp+2Ch] [rbp-144h] BYREF pfs_lock *v9; // [rsp+30h] [rbp-140h] BYREF pfs_lock **v10; // [rsp+38h] [rbp-138h] long long v11; // [rsp+40h] [rbp-130h] unsigned long long v12; // [rsp+48h] [rbp-128h] int v13; // [rsp+54h] [rbp-11Ch] int v14; // [rsp+58h] [rbp-118h] int v15; // [rsp+5Ch] [rbp-114h] long long digest_hash_pins; // [rsp+60h] [rbp-110h] unsigned int v17; // [rsp+6Ch] [rbp-104h] const char *v18; // [rsp+70h] [rbp-100h] sql_digest_storage *v19; // [rsp+78h] [rbp-F8h] PFS_thread *v20; // [rsp+80h] [rbp-F0h] _QWORD v22[2]; // [rsp+94h] [rbp-DCh] BYREF _DWORD v23[49]; // [rsp+A4h] [rbp-CCh] BYREF unsigned long long v24; // [rsp+168h] [rbp-8h] v24 = __readfsqword(0x28u); v20 = a1; v19 = a2; v18 = a3; v17 = a4; if ( !statements_digest_stat_array ) return 0LL; if ( !*((_DWORD *)v19 + 1) ) return 0LL; digest_hash_pins = get_digest_hash_pins(v20); if ( !digest_hash_pins ) return 0LL; memset(v22, 0LL, 212LL); compute_digest_md5(v19, (unsigned __int8 *)v22); v4 = v19; *((_QWORD *)v19 + 1) = v22[0]; *((_QWORD *)v4 + 2) = v22[1]; v23[48] = v17; if ( v17 ) memcpy(v23, v18, v17); v14 = 0; v13 = 3; v11 = 0LL; v9 = 0LL; v7 = my_hrtime(); while ( 2 ) { v10 = (pfs_lock **)lf_hash_search(&digest_hash, digest_hash_pins, v22, 212LL); if ( (unsigned long long)v10 < 2 ) { _InterlockedExchange64((volatile long long *)(digest_hash_pins + 16), 0LL); if ( (digest_full & 1) != 0 ) { v9 = statements_digest_stat_array; ++digest_lost; if ( !*((_QWORD *)statements_digest_stat_array + 56) ) *((_QWORD *)v9 + 56) = v7; *((_QWORD *)v9 + 57) = v7; return (long long)v9 + 264; } else { while ( 1 ) { if ( ++v11 > digest_max ) { digest_full = 1; v9 = statements_digest_stat_array; if ( !*((_QWORD *)statements_digest_stat_array + 56) ) *((_QWORD *)v9 + 56) = v7; *((_QWORD *)v9 + 57) = v7; return (long long)v9 + 264; } v12 = (unsigned int)PFS_atomic::add_u32( (PFS_atomic *)&digest_monotonic_index, (unsigned int *)((char *)&dword_0 + 1)) % digest_max; if ( v12 ) { v9 = (pfs_lock *)((char *)statements_digest_stat_array + 512 * v12); if ( (pfs_lock::is_free(v9) & 1) != 0 && (pfs_lock::free_to_dirty(v9, &v8) & 1) != 0 ) break; } } memcpy((char *)v9 + 4, v22, 212LL); sql_digest_storage::copy((pfs_lock *)((char *)v9 + 216), v19); *((_QWORD *)v9 + 56) = v7; *((_QWORD *)v9 + 57) = v7; v15 = lf_hash_insert(&digest_hash, digest_hash_pins, &v9); if ( !v15 ) { pfs_lock::dirty_to_allocated(v9, &v8, v5); return (long long)v9 + 264; } pfs_lock::dirty_to_free(v9, &v8); if ( v15 <= 0 ) { ++digest_lost; return 0LL; } else { if ( (unsigned int)++v14 <= 3 ) continue; ++digest_lost; return 0LL; } } } else { v9 = *v10; *((_QWORD *)v9 + 57) = v7; _InterlockedExchange64((volatile long long *)(digest_hash_pins + 16), 0LL); return (long long)v9 + 264; } } }
find_or_create_digest: PUSH RBP MOV RBP,RSP SUB RSP,0x170 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xf0],RDI MOV qword ptr [RBP + -0xf8],RSI MOV qword ptr [RBP + -0x100],RDX MOV dword ptr [RBP + -0x104],ECX CMP qword ptr [0x0050d588],0x0 JNZ 0x001520fd MOV qword ptr [RBP + -0xe8],0x0 JMP 0x00152588 LAB_001520fd: MOV RAX,qword ptr [RBP + -0xf8] CMP dword ptr [RAX + 0x4],0x0 JA 0x0015211a MOV qword ptr [RBP + -0xe8],0x0 JMP 0x00152588 LAB_0015211a: MOV RDI,qword ptr [RBP + -0xf0] CALL 0x001525c0 MOV qword ptr [RBP + -0x110],RAX CMP qword ptr [RBP + -0x110],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00152152 MOV qword ptr [RBP + -0xe8],0x0 JMP 0x00152588 LAB_00152152: LEA RDI,[RBP + -0xdc] XOR ESI,ESI MOV EDX,0xd4 CALL 0x001261c0 MOV RDI,qword ptr [RBP + -0xf8] LEA RSI,[RBP + -0xdc] CALL 0x00168c50 MOV RAX,qword ptr [RBP + -0xf8] MOV RCX,qword ptr [RBP + -0xdc] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0xd4] MOV qword ptr [RAX + 0x10],RCX MOV EAX,dword ptr [RBP + -0x104] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0x104],0x0 JBE 0x001521c6 LEA RDI,[RBP + -0xdc] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x100] MOV EAX,dword ptr [RBP + -0x104] MOV EDX,EAX CALL 0x00126280 LAB_001521c6: MOV dword ptr [RBP + -0x118],0x0 MOV dword ptr [RBP + -0x11c],0x3 MOV qword ptr [RBP + -0x130],0x0 MOV qword ptr [RBP + -0x140],0x0 CALL 0x00158440 MOV qword ptr [RBP + -0x158],RAX MOV RAX,qword ptr [RBP + -0x158] MOV qword ptr [RBP + -0x150],RAX LAB_0015220a: MOV RSI,qword ptr [RBP + -0x110] LEA RDI,[0x50d608] LEA RDX,[RBP + -0xdc] MOV ECX,0xd4 CALL 0x0015d8b0 MOV qword ptr [RBP + -0x138],RAX CMP qword ptr [RBP + -0x138],0x0 JZ 0x001522a8 MOV EAX,0x1 CMP qword ptr [RBP + -0x138],RAX JZ 0x001522a8 MOV RAX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x140],RAX MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c8],RCX JMP 0x00152270 LAB_00152270: JMP 0x00152272 LAB_00152272: MOV RCX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x160],0x0 MOV RAX,qword ptr [RBP + -0x160] XCHG qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBP + -0x140] ADD RAX,0x108 MOV qword ptr [RBP + -0xe8],RAX JMP 0x00152588 LAB_001522a8: JMP 0x001522aa LAB_001522aa: JMP 0x001522ac LAB_001522ac: JMP 0x001522ae LAB_001522ae: MOV RCX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x168],0x0 MOV RAX,qword ptr [RBP + -0x168] XCHG qword ptr [RCX + 0x10],RAX TEST byte ptr [0x0050d600],0x1 JZ 0x00152348 MOV RAX,qword ptr [0x0050d588] MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [0x0050d580] ADD RAX,0x1 MOV qword ptr [0x0050d580],RAX MOV RAX,qword ptr [RBP + -0x140] CMP qword ptr [RAX + 0x1c0],0x0 JNZ 0x0015231a MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c0],RCX LAB_0015231a: MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c8],RCX MOV RAX,qword ptr [RBP + -0x140] ADD RAX,0x108 MOV qword ptr [RBP + -0xe8],RAX JMP 0x00152588 LAB_00152348: JMP 0x0015234a LAB_0015234a: MOV RAX,qword ptr [RBP + -0x130] ADD RAX,0x1 MOV qword ptr [RBP + -0x130],RAX CMP RAX,qword ptr [0x0050d578] JA 0x00152524 LEA RDI,[0x50d5c0] MOV ESI,0x1 CALL 0x00137ac0 MOV EAX,EAX XOR ECX,ECX MOV EDX,ECX DIV qword ptr [0x0050d578] MOV qword ptr [RBP + -0x128],RDX CMP qword ptr [RBP + -0x128],0x0 JNZ 0x0015239a JMP 0x0015234a LAB_0015239a: MOV RAX,qword ptr [0x0050d588] MOV RCX,qword ptr [RBP + -0x128] SHL RCX,0x9 ADD RAX,RCX MOV qword ptr [RBP + -0x140],RAX MOV RDI,qword ptr [RBP + -0x140] CALL 0x001527f0 TEST AL,0x1 JNZ 0x001523cb JMP 0x0015251f LAB_001523cb: MOV RDI,qword ptr [RBP + -0x140] LEA RSI,[RBP + -0x144] CALL 0x00137c50 TEST AL,0x1 JNZ 0x001523e7 JMP 0x0015251d LAB_001523e7: MOV RDI,qword ptr [RBP + -0x140] ADD RDI,0x4 LEA RSI,[RBP + -0xdc] MOV EDX,0xd4 CALL 0x00126280 MOV RDI,qword ptr [RBP + -0x140] ADD RDI,0xd8 MOV RSI,qword ptr [RBP + -0xf8] CALL 0x0014e770 MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c0],RCX MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c8],RCX MOV RSI,qword ptr [RBP + -0x110] LEA RDI,[0x50d608] LEA RDX,[RBP + -0x140] CALL 0x0015c890 MOV dword ptr [RBP + -0x114],EAX CMP dword ptr [RBP + -0x114],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001524a7 MOV RDI,qword ptr [RBP + -0x140] LEA RSI,[RBP + -0x144] CALL 0x001334b0 MOV RAX,qword ptr [RBP + -0x140] ADD RAX,0x108 MOV qword ptr [RBP + -0xe8],RAX JMP 0x00152588 LAB_001524a7: MOV RDI,qword ptr [RBP + -0x140] LEA RSI,[RBP + -0x144] CALL 0x00152820 CMP dword ptr [RBP + -0x114],0x0 JLE 0x001524fe MOV EAX,dword ptr [RBP + -0x118] ADD EAX,0x1 MOV dword ptr [RBP + -0x118],EAX CMP EAX,0x3 JBE 0x001524f9 MOV RAX,qword ptr [0x0050d580] ADD RAX,0x1 MOV qword ptr [0x0050d580],RAX MOV qword ptr [RBP + -0xe8],0x0 JMP 0x00152588 LAB_001524f9: JMP 0x0015220a LAB_001524fe: MOV RAX,qword ptr [0x0050d580] ADD RAX,0x1 MOV qword ptr [0x0050d580],RAX MOV qword ptr [RBP + -0xe8],0x0 JMP 0x00152588 LAB_0015251d: JMP 0x0015251f LAB_0015251f: JMP 0x0015234a LAB_00152524: MOV byte ptr [0x0050d600],0x1 MOV RAX,qword ptr [0x0050d588] MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [RBP + -0x140] CMP qword ptr [RAX + 0x1c0],0x0 JNZ 0x0015255f MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c0],RCX LAB_0015255f: MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RAX + 0x1c8],RCX MOV RAX,qword ptr [RBP + -0x140] ADD RAX,0x108 MOV qword ptr [RBP + -0xe8],RAX LAB_00152588: MOV RAX,qword ptr [RBP + -0xe8] MOV qword ptr [RBP + -0x170],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001525b8 MOV RAX,qword ptr [RBP + -0x170] ADD RSP,0x170 POP RBP RET LAB_001525b8: CALL 0x00126360
/* find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int) */ pfs_lock * find_or_create_digest(PFS_thread *param_1,sql_digest_storage *param_2,char *param_3,uint param_4) { uint uVar1; int8 uVar2; ulong uVar3; long in_FS_OFFSET; pfs_dirty_state local_14c [4]; pfs_lock *local_148; long *local_140; ulong local_138; ulong local_130; int4 local_124; uint local_120; int local_11c; long local_118; uint local_10c; char *local_108; sql_digest_storage *local_100; PFS_thread *local_f8; pfs_lock *local_f0; int8 local_e4; int8 local_dc; int1 auStack_d4 [192]; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_10c = param_4; local_108 = param_3; local_100 = param_2; local_f8 = param_1; if (statements_digest_stat_array == (pfs_lock *)0x0) { local_f0 = (pfs_lock *)0x0; } else if (*(int *)(param_2 + 4) == 0) { local_f0 = (pfs_lock *)0x0; } else { local_118 = get_digest_hash_pins(param_1); if (local_118 == 0) { local_f0 = (pfs_lock *)0x0; } else { memset(&local_e4,0,0xd4); compute_digest_md5(local_100,(uchar *)&local_e4); *(int8 *)(local_100 + 8) = local_e4; *(int8 *)(local_100 + 0x10) = local_dc; local_14 = local_10c; if (local_10c != 0) { memcpy(auStack_d4,local_108,(ulong)local_10c); } local_120 = 0; local_124 = 3; local_138 = 0; local_148 = (pfs_lock *)0x0; uVar2 = my_hrtime(); do { local_140 = (long *)lf_hash_search(digest_hash,local_118,&local_e4,0xd4); if ((local_140 != (long *)0x0) && (local_140 != (long *)0x1)) { local_148 = (pfs_lock *)*local_140; *(int8 *)(local_148 + 0x1c8) = uVar2; LOCK(); *(int8 *)(local_118 + 0x10) = 0; UNLOCK(); local_f0 = local_148 + 0x108; goto LAB_00152588; } LOCK(); *(int8 *)(local_118 + 0x10) = 0; local_f0 = statements_digest_stat_array; UNLOCK(); if ((digest_full & 1) != 0) { local_148 = statements_digest_stat_array; digest_lost = digest_lost + 1; if (*(long *)(statements_digest_stat_array + 0x1c0) == 0) { *(int8 *)(statements_digest_stat_array + 0x1c0) = uVar2; } *(int8 *)(local_f0 + 0x1c8) = uVar2; local_f0 = local_f0 + 0x108; goto LAB_00152588; } do { do { local_f0 = statements_digest_stat_array; local_138 = local_138 + 1; if (digest_max < local_138) { digest_full = 1; local_148 = statements_digest_stat_array; if (*(long *)(statements_digest_stat_array + 0x1c0) == 0) { *(int8 *)(statements_digest_stat_array + 0x1c0) = uVar2; } *(int8 *)(local_f0 + 0x1c8) = uVar2; local_f0 = local_f0 + 0x108; goto LAB_00152588; } uVar1 = PFS_atomic::add_u32((uint *)digest_monotonic_index,1); local_130 = (ulong)uVar1 % digest_max; } while (local_130 == 0); local_148 = statements_digest_stat_array + local_130 * 0x200; uVar3 = pfs_lock::is_free(local_148); } while (((uVar3 & 1) == 0) || (uVar3 = pfs_lock::free_to_dirty(local_148,local_14c), (uVar3 & 1) == 0)); memcpy(local_148 + 4,&local_e4,0xd4); sql_digest_storage::copy((sql_digest_storage *)(local_148 + 0xd8),local_100); *(int8 *)(local_148 + 0x1c0) = uVar2; *(int8 *)(local_148 + 0x1c8) = uVar2; local_11c = lf_hash_insert(digest_hash,local_118,&local_148); if (local_11c == 0) { pfs_lock::dirty_to_allocated(local_148,local_14c); local_f0 = local_148 + 0x108; goto LAB_00152588; } pfs_lock::dirty_to_free(local_148,local_14c); if (local_11c < 1) { digest_lost = digest_lost + 1; local_f0 = (pfs_lock *)0x0; goto LAB_00152588; } local_120 = local_120 + 1; } while (local_120 < 4); digest_lost = digest_lost + 1; local_f0 = (pfs_lock *)0x0; } } LAB_00152588: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_f0; }
39,683
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
monkey531[P]llama/common/./json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %r15 incq %r15 movl $0x1, %ebp movabsq $0x346dc5d63886594b, %r13 # imm = 0x346DC5D63886594B movl $0x1, %esi cmpq $0xa, %r15 jb 0x4d9e4 movl $0x4, %esi movq %r15, %rcx cmpq $0x63, %rcx jbe 0x4d9dd cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x4d9e2 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x4d9e4 movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x4d9a7 addl $-0x3, %esi jmp 0x4d9e4 addl $-0x2, %esi jmp 0x4d9e4 decl %esi movl %esi, %esi leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %edx, %edx callq 0x187a0 movq (%r12), %rdi movl 0x8(%r12), %esi movq %r15, %rdx callq 0x4ae1b movq 0x8(%r14), %r14 cmpq $0xa, %r14 jb 0x4da5e movl $0x4, %ebp movq %r14, %rcx cmpq $0x63, %rcx jbe 0x4da57 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x4da5c cmpq $0x2710, %rcx # imm = 0x2710 jb 0x4da5e movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %ebp cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x4da21 addl $-0x3, %ebp jmp 0x4da5e addl $-0x2, %ebp jmp 0x4da5e decl %ebp movl %ebp, %esi leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x28(%rsp), %rdi xorl %edx, %edx callq 0x187a0 leaq 0x28(%rsp), %r15 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0x4ae1b leaq 0x7046b(%rip), %rsi # 0xbdefc leaq 0x7046e(%rip), %rcx # 0xbdf06 leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r15, %r8 callq 0x4db30 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x4dabf movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4dadb movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x4db0c movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x4db0c movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4db28 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18b90
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov r15, [rsi+10h] inc r15 mov ebp, 1 mov r13, 346DC5D63886594Bh mov esi, 1 cmp r15, 0Ah jb short loc_4D9E4 mov esi, 4 mov rcx, r15 loc_4D9A7: cmp rcx, 63h ; 'c' jbe short loc_4D9DD cmp rcx, 3E7h jbe short loc_4D9E2 cmp rcx, 2710h jb short loc_4D9E4 mov rax, rcx mul r13 shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_4D9A7 add esi, 0FFFFFFFDh jmp short loc_4D9E4 loc_4D9DD: add esi, 0FFFFFFFEh jmp short loc_4D9E4 loc_4D9E2: dec esi loc_4D9E4: mov esi, esi lea rax, [rsp+78h+var_60] mov [rax-10h], rax lea r12, [rsp+78h+var_70] mov rdi, r12 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r12] mov esi, [r12+8] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov r14, [r14+8] cmp r14, 0Ah jb short loc_4DA5E mov ebp, 4 mov rcx, r14 loc_4DA21: cmp rcx, 63h ; 'c' jbe short loc_4DA57 cmp rcx, 3E7h jbe short loc_4DA5C cmp rcx, 2710h jb short loc_4DA5E mov rax, rcx mul r13 shr rdx, 0Bh add ebp, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_4DA21 add ebp, 0FFFFFFFDh jmp short loc_4DA5E loc_4DA57: add ebp, 0FFFFFFFEh jmp short loc_4DA5E loc_4DA5C: dec ebp loc_4DA5E: mov esi, ebp lea r12, [rsp+78h+var_40] mov [r12-10h], r12 lea rdi, [rsp+78h+var_50] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea r15, [rsp+78h+var_50] mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+78h+var_70] mov rdi, rbx mov r8, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r12 jz short loc_4DABF mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DABF: mov rdi, [rsp+78h+var_70]; void * lea rax, [rsp+78h+var_60] cmp rdi, rax jz short loc_4DADB mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DADB: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_4DB0C mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4DB0C mov rbx, rax loc_4DB0C: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_4DB28 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DB28: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { unsigned long long v3; // r15 unsigned int v4; // ebp unsigned int v5; // esi unsigned long long v6; // rcx bool v7; // cc unsigned long long v8; // r14 unsigned long long v9; // rcx void *v11; // [rsp+8h] [rbp-70h] BYREF int v12; // [rsp+10h] [rbp-68h] _QWORD v13[2]; // [rsp+18h] [rbp-60h] BYREF void *v14; // [rsp+28h] [rbp-50h] BYREF int v15; // [rsp+30h] [rbp-48h] _QWORD v16[8]; // [rsp+38h] [rbp-40h] BYREF v3 = *(_QWORD *)(a2 + 16) + 1LL; v4 = 1; v5 = 1; if ( v3 >= 0xA ) { v5 = 4; v6 = v3; while ( 1 ) { if ( v6 <= 0x63 ) { v5 -= 2; goto LABEL_10; } if ( v6 <= 0x3E7 ) break; if ( v6 < 0x2710 ) goto LABEL_10; v5 += 4; v7 = v6 <= 0x1869F; v6 /= 0x2710uLL; if ( v7 ) { v5 -= 3; goto LABEL_10; } } --v5; } LABEL_10: v11 = v13; std::string::_M_construct(&v11, v5, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v11, v12, v3); v8 = *(_QWORD *)(a2 + 8); if ( v8 >= 0xA ) { v4 = 4; v9 = v8; while ( 1 ) { if ( v9 <= 0x63 ) { v4 -= 2; goto LABEL_19; } if ( v9 <= 0x3E7 ) break; if ( v9 < 0x2710 ) goto LABEL_19; v4 += 4; v7 = v9 <= 0x1869F; v9 /= 0x2710uLL; if ( v7 ) { v4 -= 3; goto LABEL_19; } } --v4; } LABEL_19: v14 = v16; std::string::_M_construct(&v14, v4, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v14, v15, v8); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", &v11, ", column ", &v14); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); return a1; }
position_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RSI + 0x10] INC R15 MOV EBP,0x1 MOV R13,0x346dc5d63886594b MOV ESI,0x1 CMP R15,0xa JC 0x0014d9e4 MOV ESI,0x4 MOV RCX,R15 LAB_0014d9a7: CMP RCX,0x63 JBE 0x0014d9dd CMP RCX,0x3e7 JBE 0x0014d9e2 CMP RCX,0x2710 JC 0x0014d9e4 MOV RAX,RCX MUL R13 SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0014d9a7 ADD ESI,-0x3 JMP 0x0014d9e4 LAB_0014d9dd: ADD ESI,-0x2 JMP 0x0014d9e4 LAB_0014d9e2: DEC ESI LAB_0014d9e4: MOV ESI,ESI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA R12,[RSP + 0x8] MOV RDI,R12 XOR EDX,EDX CALL 0x001187a0 MOV RDI,qword ptr [R12] MOV ESI,dword ptr [R12 + 0x8] MOV RDX,R15 CALL 0x0014ae1b MOV R14,qword ptr [R14 + 0x8] CMP R14,0xa JC 0x0014da5e MOV EBP,0x4 MOV RCX,R14 LAB_0014da21: CMP RCX,0x63 JBE 0x0014da57 CMP RCX,0x3e7 JBE 0x0014da5c CMP RCX,0x2710 JC 0x0014da5e MOV RAX,RCX MUL R13 SHR RDX,0xb ADD EBP,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0014da21 ADD EBP,-0x3 JMP 0x0014da5e LAB_0014da57: ADD EBP,-0x2 JMP 0x0014da5e LAB_0014da5c: DEC EBP LAB_0014da5e: MOV ESI,EBP LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 LAB_0014da6a: LEA RDI,[RSP + 0x28] XOR EDX,EDX CALL 0x001187a0 LEA R15,[RSP + 0x28] MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0014ae1b LAB_0014da8a: LEA RSI,[0x1bdefc] LEA RCX,[0x1bdf06] LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV R8,R15 CALL 0x0014db30 LAB_0014daa8: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x0014dabf MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0014dabf: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0014dadb MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0014dadb: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { bool bVar1; char cVar2; ulong uVar3; char cVar4; char cVar5; ulong uVar6; long *local_70; uint local_68; long local_60 [2]; long *local_50; uint local_48; long local_40 [2]; uVar6 = *(long *)(param_1 + 0x10) + 1; cVar4 = '\x01'; cVar5 = '\x01'; if (9 < uVar6) { uVar3 = uVar6; cVar2 = '\x04'; do { cVar5 = cVar2; if (uVar3 < 100) { cVar5 = cVar5 + -2; goto LAB_0014d9e4; } if (uVar3 < 1000) { cVar5 = cVar5 + -1; goto LAB_0014d9e4; } if (uVar3 < 10000) goto LAB_0014d9e4; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar5 + '\x04'; } while (bVar1); cVar5 = cVar5 + '\x01'; } LAB_0014d9e4: local_70 = local_60; std::__cxx11::string::_M_construct((ulong)&local_70,cVar5); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_70,local_68,uVar6); uVar6 = *(ulong *)(param_1 + 8); if (9 < uVar6) { uVar3 = uVar6; cVar5 = '\x04'; do { cVar4 = cVar5; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_0014da5e; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_0014da5e; } if (uVar3 < 10000) goto LAB_0014da5e; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar5 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0014da5e: /* try { // try from 0014da6a to 0014da75 has its CatchHandler @ 0014db09 */ local_50 = local_40; std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,uVar6); /* try { // try from 0014da8a to 0014daa7 has its CatchHandler @ 0014daed */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)&local_70,", column ",(string *)&local_50); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } return this; }
39,684
my_charset_is_8bit_pure_ascii
eloqsql/strings/ctype-simple.c
static my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs) { size_t code; if (!cs->tab_to_uni) return 0; for (code= 0; code < 256; code++) { if (cs->tab_to_uni[code] > 0x7F) return 0; } return 1; }
O0
c
my_charset_is_8bit_pure_ascii: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x59d19 movb $0x0, -0x1(%rbp) jmp 0x59d5a movq $0x0, -0x18(%rbp) cmpq $0x100, -0x18(%rbp) # imm = 0x100 jae 0x59d56 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq -0x18(%rbp), %rcx movzwl (%rax,%rcx,2), %eax cmpl $0x7f, %eax jle 0x59d46 movb $0x0, -0x1(%rbp) jmp 0x59d5a jmp 0x59d48 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x59d21 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nop
my_charset_is_8bit_pure_ascii: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_59D19 mov [rbp+var_1], 0 jmp short loc_59D5A loc_59D19: mov [rbp+var_18], 0 loc_59D21: cmp [rbp+var_18], 100h jnb short loc_59D56 mov rax, [rbp+var_10] mov rax, [rax+68h] mov rcx, [rbp+var_18] movzx eax, word ptr [rax+rcx*2] cmp eax, 7Fh jle short loc_59D46 mov [rbp+var_1], 0 jmp short loc_59D5A loc_59D46: jmp short $+2 loc_59D48: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_59D21 loc_59D56: mov [rbp+var_1], 1 loc_59D5A: mov al, [rbp+var_1] pop rbp retn
char my_charset_is_8bit_pure_ascii(long long a1) { unsigned long long i; // [rsp+0h] [rbp-18h] if ( !*(_QWORD *)(a1 + 104) ) return 0; for ( i = 0LL; i < 0x100; ++i ) { if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu ) return 0; } return 1; }
my_charset_is_8bit_pure_ascii: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00159d19 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00159d5a LAB_00159d19: MOV qword ptr [RBP + -0x18],0x0 LAB_00159d21: CMP qword ptr [RBP + -0x18],0x100 JNC 0x00159d56 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + RCX*0x2] CMP EAX,0x7f JLE 0x00159d46 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00159d5a LAB_00159d46: JMP 0x00159d48 LAB_00159d48: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00159d21 LAB_00159d56: MOV byte ptr [RBP + -0x1],0x1 LAB_00159d5a: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 my_charset_is_8bit_pure_ascii(long param_1) { ulong local_20; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 0; } else { for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) { if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) { return 0; } } local_9 = 1; } return local_9; }
39,685
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O0
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x69c81 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0x69c7d movq -0x90(%rbp), %rax leaq 0x157be1(%rip), %rcx # 0x1c183c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x69c7f jmp 0x69c7f cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0x69c7f jmp 0x69c7f jmp 0x69cd8 jmp 0x69cb9 cmpq $0x0, -0x30(%rbp) je 0x69c93 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x69ebc movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0x69c1a jmp 0x69cd6 jmp 0x69cd8 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x69e05 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0x69d6a cmpq $0x39, -0x50(%rbp) ja 0x69d6a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0x69db3 cmpq $0x41, -0x50(%rbp) jb 0x69d8a cmpq $0x5a, -0x50(%rbp) ja 0x69d8a movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x69db1 cmpq $0x61, -0x50(%rbp) jb 0x69daa cmpq $0x7a, -0x50(%rbp) ja 0x69daa movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x69daf jmp 0x69e44 jmp 0x69db1 jmp 0x69db3 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0x69dc1 jmp 0x69e44 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0x69de1 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x69dea movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0x69dea movl $0x1, -0x40(%rbp) jmp 0x69e03 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x69e36 cmpl $0x0, -0x44(%rbp) jne 0x69e34 cmpq $0x0, -0x30(%rbp) je 0x69e1d movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0x69ebc jmp 0x69e44 jmp 0x69e38 movb $0x1, %al testb $0x1, %al jne 0x69d1b jmp 0x69e44 cmpq $0x0, -0x30(%rbp) je 0x69e56 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x69e77 movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x69ebc cmpl $0x0, -0x40(%rbp) je 0x69e91 movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x69ebc cmpl $0x0, -0x3c(%rbp) je 0x69ea6 xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x69eb1 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_69C1A: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_69C81 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_69C62; jumptable 0000000000069C62 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_69C62 movsxd rax, ds:(jpt_69C62 - 1C183Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_69C64: jmp short loc_69C7F; jumptable 0000000000069C62 case 32 loc_69C66: jmp short loc_69C7F; jumptable 0000000000069C62 case 9 loc_69C68: cmp [rbp+var_3C], 0; jumptable 0000000000069C62 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_69C7F loc_69C7B: jmp short loc_69C7F; jumptable 0000000000069C62 case 43 def_69C62: jmp short loc_69CD8; jumptable 0000000000069C62 default case, cases 10-31,33-42,44 loc_69C7F: jmp short loc_69CB9 loc_69C81: cmp [rbp+var_30], 0 jz short loc_69C93 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_69C93: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_69EBC loc_69CB9: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_69C1A jmp short $+2 loc_69CD6: jmp short $+2 loc_69CD8: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_69D1B: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_69E05 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_69D6A cmp [rbp+var_50], 39h ; '9' ja short loc_69D6A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_69DB3 loc_69D6A: cmp [rbp+var_50], 41h ; 'A' jb short loc_69D8A cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_69D8A mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_69DB1 loc_69D8A: cmp [rbp+var_50], 61h ; 'a' jb short loc_69DAA cmp [rbp+var_50], 7Ah ; 'z' ja short loc_69DAA mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_69DAF loc_69DAA: jmp loc_69E44 loc_69DAF: jmp short $+2 loc_69DB1: jmp short $+2 loc_69DB3: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_69DC1 jmp loc_69E44 loc_69DC1: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_69DE1 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_69DEA mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_69DEA loc_69DE1: mov [rbp+var_40], 1 jmp short loc_69E03 loc_69DEA: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_69E03: jmp short loc_69E36 loc_69E05: cmp [rbp+var_44], 0 jnz short loc_69E34 cmp [rbp+var_30], 0 jz short loc_69E1D mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_69E1D: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_69EBC loc_69E34: jmp short loc_69E44 loc_69E36: jmp short $+2 loc_69E38: mov al, 1 test al, 1 jnz loc_69D1B jmp short $+2 loc_69E44: cmp [rbp+var_30], 0 jz short loc_69E56 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_69E56: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_69E77 mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp short loc_69EBC loc_69E77: cmp [rbp+var_40], 0 jz short loc_69E91 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_69EBC loc_69E91: cmp [rbp+var_3C], 0 jz short loc_69EA6 xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_69EB1 loc_69EA6: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_69EB1: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_69EBC: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v9; // [rsp+18h] [rbp-88h] long long v10; // [rsp+20h] [rbp-80h] long long v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned int v13; // [rsp+3Ch] [rbp-64h] unsigned long long v14; // [rsp+40h] [rbp-60h] long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF int v17; // [rsp+5Ch] [rbp-44h] int v18; // [rsp+60h] [rbp-40h] BOOL v19; // [rsp+64h] [rbp-3Ch] int *v20; // [rsp+68h] [rbp-38h] _QWORD *v21; // [rsp+70h] [rbp-30h] int v22; // [rsp+7Ch] [rbp-24h] long long v23; // [rsp+80h] [rbp-20h] long long v24; // [rsp+88h] [rbp-18h] long long v25; // [rsp+90h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v19 = 0; v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = a2; v10 = a3 + a2; *a6 = 0; while ( 2 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) { if ( v21 ) *v21 = v11; v6 = 33; if ( !v17 ) v6 = 84; *v20 = v6; return 0LL; } else { switch ( v16 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v19 = !v19; LABEL_10: v11 += v17; continue; default: v18 = 0; v12 = 0LL; v9 = v11; v14 = 0xFFFFFFFFFFFFFFFFLL / v22; v13 = 0xFFFFFFFFFFFFFFFFLL % v22; break; } while ( 1 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) break; v11 += v17; if ( v16 < 0x30 || v16 > 0x39 ) { if ( v16 < 0x41 || v16 > 0x5A ) { if ( v16 < 0x61 || v16 > 0x7A ) goto LABEL_33; v16 = v16 - 97 + 10; } else { v16 = v16 - 65 + 10; } } else { v16 -= 48LL; } if ( (int)v16 >= v22 ) goto LABEL_33; if ( v12 > v14 || v12 == v14 && v16 > v13 ) v18 = 1; else v12 = v12 * v22 + v16; } if ( v17 ) { LABEL_33: if ( v21 ) *v21 = v11; if ( v11 == v9 ) { *v20 = 33; return 0LL; } else if ( v18 ) { *v20 = 34; return -1LL; } else if ( v19 ) { return -(long long)v12; } else { return v12; } } if ( v21 ) *v21 = v11; *v20 = 84; return 0LL; } } }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_00169c1a: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x00169c81 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x00169c7d MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x2c183c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x00169c7f caseD_9: JMP 0x00169c7f caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x00169c7f caseD_2b: JMP 0x00169c7f caseD_a: JMP 0x00169cd8 LAB_00169c7f: JMP 0x00169cb9 LAB_00169c81: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00169c93 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00169c93: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x00169ebc LAB_00169cb9: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x00169c1a JMP 0x00169cd6 LAB_00169cd6: JMP 0x00169cd8 LAB_00169cd8: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_00169d1b: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x00169e05 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x00169d6a CMP qword ptr [RBP + -0x50],0x39 JA 0x00169d6a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x00169db3 LAB_00169d6a: CMP qword ptr [RBP + -0x50],0x41 JC 0x00169d8a CMP qword ptr [RBP + -0x50],0x5a JA 0x00169d8a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x00169db1 LAB_00169d8a: CMP qword ptr [RBP + -0x50],0x61 JC 0x00169daa CMP qword ptr [RBP + -0x50],0x7a JA 0x00169daa MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x00169daf LAB_00169daa: JMP 0x00169e44 LAB_00169daf: JMP 0x00169db1 LAB_00169db1: JMP 0x00169db3 LAB_00169db3: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x00169dc1 JMP 0x00169e44 LAB_00169dc1: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x00169de1 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x00169dea MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x00169dea LAB_00169de1: MOV dword ptr [RBP + -0x40],0x1 JMP 0x00169e03 LAB_00169dea: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_00169e03: JMP 0x00169e36 LAB_00169e05: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x00169e34 CMP qword ptr [RBP + -0x30],0x0 JZ 0x00169e1d MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00169e1d: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00169ebc LAB_00169e34: JMP 0x00169e44 LAB_00169e36: JMP 0x00169e38 LAB_00169e38: MOV AL,0x1 TEST AL,0x1 JNZ 0x00169d1b JMP 0x00169e44 LAB_00169e44: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00169e56 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00169e56: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00169e77 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00169ebc LAB_00169e77: CMP dword ptr [RBP + -0x40],0x0 JZ 0x00169e91 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00169ebc LAB_00169e91: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00169ea6 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x00169eb1 LAB_00169ea6: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_00169eb1: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_00169ebc: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00169cd4) */ /* WARNING: Removing unreachable block (ram,0x00169e42) */ ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_00169d1b; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_00169d1b: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_00169e44: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0xffffffffffffffff; } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_00169e44; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_00169e44; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_00169d1b; }
39,686
pem_get_iv
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pem.c
static int pem_get_iv(const unsigned char *s, unsigned char *iv, size_t iv_len) { size_t i, j, k; memset(iv, 0, iv_len); for (i = 0; i < iv_len * 2; i++, s++) { if (*s >= '0' && *s <= '9') { j = *s - '0'; } else if (*s >= 'A' && *s <= 'F') { j = *s - '7'; } else if (*s >= 'a' && *s <= 'f') { j = *s - 'W'; } else { return MBEDTLS_ERR_PEM_INVALID_ENC_IV; } k = ((i & 1) != 0) ? j : j << 4; iv[i >> 1] = (unsigned char) (iv[i >> 1] | k); } return 0; }
O3
c
pem_get_iv: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 xorl %ebp, %ebp movq %rsi, %rdi xorl %esi, %esi callq 0xf2b0 testq %rbx, %rbx je 0x985c2 movl $0xffffffa9, %ecx # imm = 0xFFFFFFA9 addq %rbx, %rbx cmpq $0x1, %rbx adcq $0x0, %rbx xorl %eax, %eax leaq 0x27(%rcx), %rdx leaq 0x20(%rcx), %rsi xorl %edi, %edi movzbl (%r15,%rdi), %ecx leal -0x30(%rcx), %r9d movq %rdx, %r8 cmpb $0xa, %r9b jb 0x98596 leal -0x41(%rcx), %r9d movq %rsi, %r8 cmpb $0x6, %r9b jb 0x98596 leal -0x61(%rcx), %r9d movl $0xffffffa9, %r8d # imm = 0xFFFFFFA9 cmpb $0x5, %r9b ja 0x985bd addl %ecx, %r8d movl %eax, %ecx notb %cl andb $0x4, %cl shlq %cl, %r8 movq %rdi, %rcx shrq %rcx orb %r8b, (%r14,%rcx) incq %rdi addq $0x4, %rax cmpq %rdi, %rbx jne 0x98567 xorl %ebp, %ebp jmp 0x985c2 movl $0xffffee00, %ebp # imm = 0xFFFFEE00 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
pem_get_iv: push rbp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi xor ebp, ebp mov rdi, rsi xor esi, esi call _memset test rbx, rbx jz short loc_985C2 mov ecx, 0FFFFFFA9h add rbx, rbx cmp rbx, 1 adc rbx, 0 xor eax, eax lea rdx, [rcx+27h] lea rsi, [rcx+20h] xor edi, edi loc_98567: movzx ecx, byte ptr [r15+rdi] lea r9d, [rcx-30h] mov r8, rdx cmp r9b, 0Ah jb short loc_98596 lea r9d, [rcx-41h] mov r8, rsi cmp r9b, 6 jb short loc_98596 lea r9d, [rcx-61h] mov r8d, 0FFFFFFA9h cmp r9b, 5 ja short loc_985BD loc_98596: add r8d, ecx mov ecx, eax not cl and cl, 4 shl r8, cl mov rcx, rdi shr rcx, 1 or [r14+rcx], r8b inc rdi add rax, 4 cmp rbx, rdi jnz short loc_98567 xor ebp, ebp jmp short loc_985C2 loc_985BD: mov ebp, 0FFFFEE00h loc_985C2: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long pem_get_iv(long long a1, long long a2, long long a3) { unsigned int v5; // ebp long long v6; // rbx long long v7; // rax unsigned long long v8; // rdi int v9; // ecx int v10; // r8d v5 = 0; memset(a2, 0LL, a3); if ( a3 ) { v6 = (2 * a3 == 0) + 2 * a3; v7 = 0LL; v8 = 0LL; while ( 1 ) { v9 = *(unsigned __int8 *)(a1 + v8); v10 = -48; if ( (unsigned __int8)(v9 - 48) >= 0xAu ) { v10 = -55; if ( (unsigned __int8)(v9 - 65) >= 6u ) { v10 = -87; if ( (unsigned __int8)(v9 - 97) > 5u ) break; } } *(_BYTE *)(a2 + (v8++ >> 1)) |= (unsigned long long)(unsigned int)(v9 + v10) << (~(_BYTE)v7 & 4); v7 += 4LL; if ( v6 == v8 ) return 0; } return (unsigned int)-4608; } return v5; }
pem_get_iv: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI XOR EBP,EBP MOV RDI,RSI XOR ESI,ESI CALL 0x0010f2b0 TEST RBX,RBX JZ 0x001985c2 MOV ECX,0xffffffa9 ADD RBX,RBX CMP RBX,0x1 ADC RBX,0x0 XOR EAX,EAX LEA RDX,[RCX + 0x27] LEA RSI,[RCX + 0x20] XOR EDI,EDI LAB_00198567: MOVZX ECX,byte ptr [R15 + RDI*0x1] LEA R9D,[RCX + -0x30] MOV R8,RDX CMP R9B,0xa JC 0x00198596 LEA R9D,[RCX + -0x41] MOV R8,RSI CMP R9B,0x6 JC 0x00198596 LEA R9D,[RCX + -0x61] MOV R8D,0xffffffa9 CMP R9B,0x5 JA 0x001985bd LAB_00198596: ADD R8D,ECX MOV ECX,EAX NOT CL AND CL,0x4 SHL R8,CL MOV RCX,RDI SHR RCX,0x1 OR byte ptr [R14 + RCX*0x1],R8B INC RDI ADD RAX,0x4 CMP RBX,RDI JNZ 0x00198567 XOR EBP,EBP JMP 0x001985c2 LAB_001985bd: MOV EBP,0xffffee00 LAB_001985c2: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 pem_get_iv(long param_1,void *param_2,size_t param_3) { byte *pbVar1; char cVar2; byte bVar3; ulong uVar4; char cVar5; memset(param_2,0,param_3); if (param_3 != 0) { bVar3 = 0; uVar4 = 0; do { cVar2 = *(char *)(param_1 + uVar4); cVar5 = -0x30; if (((9 < (byte)(cVar2 - 0x30U)) && (cVar5 = -0x37, 5 < (byte)(cVar2 + 0xbfU))) && (cVar5 = -0x57, 5 < (byte)(cVar2 + 0x9fU))) { return 0xffffee00; } pbVar1 = (byte *)((long)param_2 + (uVar4 >> 1)); *pbVar1 = *pbVar1 | cVar5 + cVar2 << (~bVar3 & 4); uVar4 = uVar4 + 1; bVar3 = bVar3 + 4; } while (param_3 * 2 + (ulong)(param_3 * 2 == 0) != uVar4); } return 0; }
39,687
ftparser_call_initializer
eloqsql/storage/myisam/ft_parser.c
MYSQL_FTPARSER_PARAM *ftparser_call_initializer(MI_INFO *info, uint keynr, uint paramnr) { uint32 ftparser_nr; struct st_mysql_ftparser *parser; if (!ftparser_alloc_param(info)) return 0; if (keynr == NO_SUCH_KEY) { ftparser_nr= 0; parser= &ft_default_parser; } else { ftparser_nr= info->s->keyinfo[keynr].ftkey_nr; parser= info->s->keyinfo[keynr].parser; } DBUG_ASSERT(paramnr < MAX_PARAM_NR); ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr; if (! info->ftparser_param[ftparser_nr].mysql_add_word) { /* Note, that mysql_add_word is used here as a flag: mysql_add_word == 0 - parser is not initialized mysql_add_word != 0 - parser is initialized, or no initialization needed. */ info->ftparser_param[ftparser_nr].mysql_add_word= (int (*)(struct st_mysql_ftparser_param *, const char *, int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1; if (parser->init && parser->init(&info->ftparser_param[ftparser_nr])) return 0; } return &info->ftparser_param[ftparser_nr]; }
O0
c
ftparser_call_initializer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0xa3460 cmpq $0x0, %rax jne 0xa351e movq $0x0, -0x8(%rbp) jmp 0xa3613 cmpl $-0x1, -0x14(%rbp) jne 0xa3538 movl $0x0, -0x1c(%rbp) leaq 0x21cdce(%rip), %rax # 0x2c0300 movq %rax, -0x28(%rbp) jmp 0xa3576 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movl 0x20(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x38(%rax), %rax movq %rax, -0x28(%rbp) jmp 0xa3578 jmp 0xa357a movl -0x1c(%rbp), %eax shll %eax addl -0x18(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0xd0(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0xa35fa movq -0x10(%rbp), %rax movq 0xd0(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movl $0x1, %ecx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0xa35f8 movq -0x28(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0xd0(%rcx), %rdi movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rdi callq *%rax cmpl $0x0, %eax je 0xa35f8 movq $0x0, -0x8(%rbp) jmp 0xa3613 jmp 0xa35fa movq -0x10(%rbp), %rax movq 0xd0(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
ftparser_call_initializer: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rdi, [rbp+var_10] call ftparser_alloc_param cmp rax, 0 jnz short loc_A351E mov [rbp+var_8], 0 jmp loc_A3613 loc_A351E: cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_A3538 mov [rbp+var_1C], 0 lea rax, ft_default_parser mov [rbp+var_28], rax jmp short loc_A3576 loc_A3538: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov eax, [rax+20h] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+38h] mov [rbp+var_28], rax loc_A3576: jmp short $+2 loc_A3578: jmp short $+2 loc_A357A: mov eax, [rbp+var_1C] shl eax, 1 add eax, [rbp+var_18] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+0D0h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_A35FA mov rax, [rbp+var_10] mov rax, [rax+0D0h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov ecx, 1 mov [rax+8], rcx mov rax, [rbp+var_28] cmp qword ptr [rax+10h], 0 jz short loc_A35F8 mov rax, [rbp+var_28] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rdi, [rcx+0D0h] mov ecx, [rbp+var_1C] shl rcx, 6 add rdi, rcx call rax cmp eax, 0 jz short loc_A35F8 mov [rbp+var_8], 0 jmp short loc_A3613 loc_A35F8: jmp short $+2 loc_A35FA: mov rax, [rbp+var_10] mov rax, [rax+0D0h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov [rbp+var_8], rax loc_A3613: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned long long ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3) { _QWORD *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+14h] [rbp-1Ch] if ( !ftparser_alloc_param(a1) ) return 0LL; if ( a2 == -1 ) { v5 = 0; v4 = &ft_default_parser; } else { v5 = *(_DWORD *)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 32); v4 = *(_QWORD **)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 56); } v6 = a3 + 2 * v5; if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[26] + 8) && (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[26] + 8) = 1LL, v4[2]) && ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[26]) ) { return 0LL; } else { return ((unsigned long long)v6 << 6) + a1[26]; } }
ftparser_call_initializer: 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 RDI,qword ptr [RBP + -0x10] CALL 0x001a3460 CMP RAX,0x0 JNZ 0x001a351e MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a3613 LAB_001a351e: CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x001a3538 MOV dword ptr [RBP + -0x1c],0x0 LEA RAX,[0x3c0300] MOV qword ptr [RBP + -0x28],RAX JMP 0x001a3576 LAB_001a3538: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x28],RAX LAB_001a3576: JMP 0x001a3578 LAB_001a3578: JMP 0x001a357a LAB_001a357a: MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 ADD EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd0] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001a35fa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd0] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV ECX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001a35f8 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0xd0] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RDI,RCX CALL RAX CMP EAX,0x0 JZ 0x001a35f8 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a3613 LAB_001a35f8: JMP 0x001a35fa LAB_001a35fa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd0] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_001a3613: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long ftparser_call_initializer(long *param_1,uint param_2,int param_3) { uint uVar1; int iVar2; long lVar3; int1 *local_30; int local_24; long local_10; lVar3 = ftparser_alloc_param(param_1); if (lVar3 == 0) { local_10 = 0; } else { if (param_2 == 0xffffffff) { local_24 = 0; local_30 = ft_default_parser; } else { local_24 = *(int *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x20); local_30 = *(int1 **)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x38); } uVar1 = local_24 * 2 + param_3; if (((*(long *)(param_1[0x1a] + (ulong)uVar1 * 0x40 + 8) == 0) && (*(int8 *)(param_1[0x1a] + (ulong)uVar1 * 0x40 + 8) = 1, *(long *)(local_30 + 0x10) != 0)) && (iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x1a] + (ulong)uVar1 * 0x40), iVar2 != 0)) { local_10 = 0; } else { local_10 = param_1[0x1a] + (ulong)uVar1 * 0x40; } } return local_10; }
39,688
httplib::detail::decode_url(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string decode_url(const std::string &s, bool convert_plus_to_space) { std::string result; for (size_t i = 0; i < s.size(); i++) { if (s[i] == '%' && i + 1 < s.size()) { if (s[i + 1] == 'u') { auto val = 0; if (from_hex_to_i(s, i + 2, 4, val)) { // 4 digits Unicode codes char buff[4]; size_t len = to_utf8(val, buff); if (len > 0) { result.append(buff, len); } i += 5; // 'u0000' } else { result += s[i]; } } else { auto val = 0; if (from_hex_to_i(s, i + 1, 2, val)) { // 2 digits hex codes result += static_cast<char>(val); i += 2; // '00' } else { result += s[i]; } } } else if (convert_plus_to_space && s[i] == '+') { result += ' '; } else { result += s[i]; } } return result; }
O0
c
httplib::detail::decode_url(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): subq $0x88, %rsp movq %rdi, 0x30(%rsp) movb %dl, %al movq %rdi, %rcx movq %rcx, 0x38(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) andb $0x1, %al movb %al, 0x77(%rsp) movb $0x0, 0x76(%rsp) callq 0xbb80 movq $0x0, 0x68(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x78(%rsp), %rdi callq 0xb590 movq %rax, %rcx movq 0x28(%rsp), %rax cmpq %rcx, %rax jae 0x1d178 movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xb910 movsbl (%rax), %eax cmpl $0x25, %eax jne 0x1d110 movq 0x68(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) movq 0x78(%rsp), %rdi callq 0xb590 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq %rcx, %rax jae 0x1d110 movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi addq $0x1, %rsi callq 0xb910 movsbl (%rax), %eax cmpl $0x75, %eax jne 0x1d097 movl $0x0, 0x64(%rsp) movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi addq $0x2, %rsi movl $0x4, %edx leaq 0x64(%rsp), %rcx callq 0x1e740 movb %al, 0x1f(%rsp) jmp 0x1cfff movb 0x1f(%rsp), %al testb $0x1, %al jne 0x1d009 jmp 0x1d075 movl 0x64(%rsp), %edi leaq 0x50(%rsp), %rsi callq 0x1e830 movq %rax, 0x10(%rsp) jmp 0x1d01e movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jbe 0x1d065 movq 0x30(%rsp), %rdi movq 0x48(%rsp), %rdx leaq 0x50(%rsp), %rsi callq 0xb0c0 jmp 0x1d046 jmp 0x1d065 movq 0x30(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) callq 0xbfb0 jmp 0x1d19b movq 0x68(%rsp), %rax addq $0x5, %rax movq %rax, 0x68(%rsp) jmp 0x1d095 movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xb910 movq 0x30(%rsp), %rdi movsbl (%rax), %esi callq 0xb520 jmp 0x1d093 jmp 0x1d095 jmp 0x1d10e movl $0x0, 0x44(%rsp) movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi incq %rsi movl $0x2, %edx leaq 0x44(%rsp), %rcx callq 0x1e740 movb %al, 0xf(%rsp) jmp 0x1d0c1 movb 0xf(%rsp), %al testb $0x1, %al jne 0x1d0cb jmp 0x1d0ec movq 0x30(%rsp), %rdi movsbl 0x44(%rsp), %esi callq 0xb520 jmp 0x1d0dc movq 0x68(%rsp), %rax addq $0x2, %rax movq %rax, 0x68(%rsp) jmp 0x1d10c movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xb910 movq 0x30(%rsp), %rdi movsbl (%rax), %esi callq 0xb520 jmp 0x1d10a jmp 0x1d10c jmp 0x1d10e jmp 0x1d163 testb $0x1, 0x77(%rsp) je 0x1d141 movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xb910 movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x1d141 movq 0x30(%rsp), %rdi movl $0x20, %esi callq 0xb520 jmp 0x1d13f jmp 0x1d161 movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xb910 movq 0x30(%rsp), %rdi movsbl (%rax), %esi callq 0xb520 jmp 0x1d15f jmp 0x1d161 jmp 0x1d163 jmp 0x1d165 movq 0x68(%rsp), %rax addq $0x1, %rax movq %rax, 0x68(%rsp) jmp 0x1cf4c movb $0x1, 0x76(%rsp) testb $0x1, 0x76(%rsp) jne 0x1d18e movq 0x30(%rsp), %rdi callq 0xbfb0 movq 0x38(%rsp), %rax addq $0x88, %rsp retq movq 0x58(%rsp), %rdi callq 0xbe10 nopw %cs:(%rax,%rax) nop
_ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: sub rsp, 88h mov [rsp+88h+var_58], rdi mov al, dl mov rcx, rdi mov [rsp+88h+var_50], rcx mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi and al, 1 mov [rsp+88h+var_11], al mov [rsp+88h+var_12], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov [rsp+88h+var_24+4], 0 loc_1CF4C: mov rax, [rsp+88h+var_24+4] mov [rsp+88h+var_60], rax mov rdi, [rsp+88h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rsp+88h+var_60] cmp rax, rcx jnb loc_1D178 mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 25h ; '%' jnz loc_1D110 mov rax, [rsp+88h+var_24+4] add rax, 1 mov [rsp+88h+var_68], rax mov rdi, [rsp+88h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rsp+88h+var_68] cmp rax, rcx jnb loc_1D110 mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] add rsi, 1 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 75h ; 'u' jnz loc_1D097 mov dword ptr [rsp+88h+var_24], 0 mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] add rsi, 2 mov edx, 4 lea rcx, [rsp+88h+var_24] call _ZN7httplib6detail13from_hex_to_iERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmRi; httplib::detail::from_hex_to_i(std::string const&,ulong,ulong,int &) mov [rsp+88h+var_69], al jmp short $+2 loc_1CFFF: mov al, [rsp+88h+var_69] test al, 1 jnz short loc_1D009 jmp short loc_1D075 loc_1D009: mov edi, dword ptr [rsp+88h+var_24]; this lea rsi, [rsp+88h+var_38]; int call _ZN7httplib6detail7to_utf8EiPc; httplib::detail::to_utf8(int,char *) mov [rsp+88h+var_78], rax jmp short $+2 loc_1D01E: mov rax, [rsp+88h+var_78] mov [rsp+88h+var_40], rax cmp [rsp+88h+var_40], 0 jbe short loc_1D065 mov rdi, [rsp+88h+var_58] mov rdx, [rsp+88h+var_40] lea rsi, [rsp+88h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) jmp short $+2 loc_1D046: jmp short loc_1D065 mov rdi, [rsp+arg_28]; void * mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1D19B loc_1D065: mov rax, [rsp+88h+var_24+4] add rax, 5 mov [rsp+88h+var_24+4], rax jmp short loc_1D095 loc_1D075: mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov rdi, [rsp+88h+var_58] movsx esi, byte ptr [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_1D093: jmp short $+2 loc_1D095: jmp short loc_1D10E loc_1D097: mov [rsp+88h+var_44], 0 mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] inc rsi mov edx, 2 lea rcx, [rsp+88h+var_44] call _ZN7httplib6detail13from_hex_to_iERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmRi; httplib::detail::from_hex_to_i(std::string const&,ulong,ulong,int &) mov [rsp+88h+var_79], al jmp short $+2 loc_1D0C1: mov al, [rsp+88h+var_79] test al, 1 jnz short loc_1D0CB jmp short loc_1D0EC loc_1D0CB: mov rdi, [rsp+88h+var_58] movsx esi, byte ptr [rsp+88h+var_44] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_1D0DC: mov rax, [rsp+88h+var_24+4] add rax, 2 mov [rsp+88h+var_24+4], rax jmp short loc_1D10C loc_1D0EC: mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov rdi, [rsp+88h+var_58] movsx esi, byte ptr [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_1D10A: jmp short $+2 loc_1D10C: jmp short $+2 loc_1D10E: jmp short loc_1D163 loc_1D110: test [rsp+88h+var_11], 1 jz short loc_1D141 mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_1D141 mov rdi, [rsp+88h+var_58] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_1D13F: jmp short loc_1D161 loc_1D141: mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_24+4] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov rdi, [rsp+88h+var_58] movsx esi, byte ptr [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_1D15F: jmp short $+2 loc_1D161: jmp short $+2 loc_1D163: jmp short $+2 loc_1D165: mov rax, [rsp+88h+var_24+4] add rax, 1 mov [rsp+88h+var_24+4], rax jmp loc_1CF4C loc_1D178: mov [rsp+88h+var_12], 1 test [rsp+88h+var_12], 1 jnz short loc_1D18E mov rdi, [rsp+88h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1D18E: mov rax, [rsp+88h+var_50] add rsp, 88h retn loc_1D19B: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long httplib::detail::decode_url(long long a1, long long a2, char a3) { char *v3; // rdx char *v4; // rax unsigned long long v6; // [rsp+20h] [rbp-68h] unsigned long long v7; // [rsp+28h] [rbp-60h] int v8; // [rsp+44h] [rbp-44h] BYREF long long v9; // [rsp+48h] [rbp-40h] int v10[5]; // [rsp+50h] [rbp-38h] BYREF _DWORD v11[4]; // [rsp+64h] [rbp-24h] BYREF char v12; // [rsp+76h] [rbp-12h] char v13; // [rsp+77h] [rbp-11h] long long v14; // [rsp+78h] [rbp-10h] long long v15; // [rsp+80h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3 & 1; v12 = 0; std::string::basic_string(a1); for ( *(_QWORD *)&v11[1] = 0LL; ; ++*(_QWORD *)&v11[1] ) { v7 = *(_QWORD *)&v11[1]; if ( v7 >= std::string::size(v14) ) break; if ( *(_BYTE *)std::string::operator[](v14, *(_QWORD *)&v11[1]) != 37 || (v6 = *(_QWORD *)&v11[1] + 1LL, v6 >= std::string::size(v14)) ) { if ( (v13 & 1) != 0 && *(_BYTE *)std::string::operator[](v14, *(_QWORD *)&v11[1]) == 43 ) { std::string::operator+=(a1, 32LL); continue; } goto LABEL_17; } if ( *(_BYTE *)std::string::operator[](v14, *(_QWORD *)&v11[1] + 1LL) != 117 ) { v8 = 0; if ( (httplib::detail::from_hex_to_i(v14, *(_QWORD *)&v11[1] + 1LL, 2LL, &v8) & 1) != 0 ) { std::string::operator+=(a1, (unsigned int)(char)v8); *(_QWORD *)&v11[1] += 2LL; continue; } LABEL_17: v4 = (char *)std::string::operator[](v14, *(_QWORD *)&v11[1]); std::string::operator+=(a1, (unsigned int)*v4); continue; } v11[0] = 0; if ( (httplib::detail::from_hex_to_i(v14, *(_QWORD *)&v11[1] + 2LL, 4LL, v11) & 1) == 0 ) goto LABEL_17; v9 = httplib::detail::to_utf8((httplib::detail *)v11[0], (int)v10, v3); if ( v9 ) std::string::append(a1, v10, v9); *(_QWORD *)&v11[1] += 5LL; } return a1; }
decode_url: SUB RSP,0x88 MOV qword ptr [RSP + 0x30],RDI MOV AL,DL MOV RCX,RDI MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI AND AL,0x1 MOV byte ptr [RSP + 0x77],AL MOV byte ptr [RSP + 0x76],0x0 CALL 0x0010bb80 MOV qword ptr [RSP + 0x68],0x0 LAB_0011cf4c: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x78] CALL 0x0010b590 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] CMP RAX,RCX JNC 0x0011d178 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0010b910 MOVSX EAX,byte ptr [RAX] CMP EAX,0x25 JNZ 0x0011d110 MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x78] CALL 0x0010b590 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] CMP RAX,RCX JNC 0x0011d110 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] ADD RSI,0x1 CALL 0x0010b910 MOVSX EAX,byte ptr [RAX] CMP EAX,0x75 JNZ 0x0011d097 MOV dword ptr [RSP + 0x64],0x0 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] ADD RSI,0x2 LAB_0011cfea: MOV EDX,0x4 LEA RCX,[RSP + 0x64] CALL 0x0011e740 MOV byte ptr [RSP + 0x1f],AL JMP 0x0011cfff LAB_0011cfff: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x0011d009 JMP 0x0011d075 LAB_0011d009: MOV EDI,dword ptr [RSP + 0x64] LEA RSI,[RSP + 0x50] CALL 0x0011e830 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011d01e LAB_0011d01e: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JBE 0x0011d065 MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x50] CALL 0x0010b0c0 JMP 0x0011d046 LAB_0011d046: JMP 0x0011d065 LAB_0011d065: MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x5 MOV qword ptr [RSP + 0x68],RAX JMP 0x0011d095 LAB_0011d075: MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0010b910 MOV RDI,qword ptr [RSP + 0x30] MOVSX ESI,byte ptr [RAX] CALL 0x0010b520 JMP 0x0011d093 LAB_0011d093: JMP 0x0011d095 LAB_0011d095: JMP 0x0011d10e LAB_0011d097: MOV dword ptr [RSP + 0x44],0x0 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] INC RSI MOV EDX,0x2 LEA RCX,[RSP + 0x44] CALL 0x0011e740 MOV byte ptr [RSP + 0xf],AL JMP 0x0011d0c1 LAB_0011d0c1: MOV AL,byte ptr [RSP + 0xf] TEST AL,0x1 JNZ 0x0011d0cb JMP 0x0011d0ec LAB_0011d0cb: MOV RDI,qword ptr [RSP + 0x30] MOVSX ESI,byte ptr [RSP + 0x44] CALL 0x0010b520 JMP 0x0011d0dc LAB_0011d0dc: MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x2 MOV qword ptr [RSP + 0x68],RAX JMP 0x0011d10c LAB_0011d0ec: MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0010b910 MOV RDI,qword ptr [RSP + 0x30] MOVSX ESI,byte ptr [RAX] CALL 0x0010b520 JMP 0x0011d10a LAB_0011d10a: JMP 0x0011d10c LAB_0011d10c: JMP 0x0011d10e LAB_0011d10e: JMP 0x0011d163 LAB_0011d110: TEST byte ptr [RSP + 0x77],0x1 JZ 0x0011d141 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0010b910 MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0011d141 MOV RDI,qword ptr [RSP + 0x30] MOV ESI,0x20 CALL 0x0010b520 JMP 0x0011d13f LAB_0011d13f: JMP 0x0011d161 LAB_0011d141: MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0010b910 MOV RDI,qword ptr [RSP + 0x30] MOVSX ESI,byte ptr [RAX] CALL 0x0010b520 LAB_0011d15d: JMP 0x0011d15f LAB_0011d15f: JMP 0x0011d161 LAB_0011d161: JMP 0x0011d163 LAB_0011d163: JMP 0x0011d165 LAB_0011d165: MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x1 MOV qword ptr [RSP + 0x68],RAX JMP 0x0011cf4c LAB_0011d178: MOV byte ptr [RSP + 0x76],0x1 TEST byte ptr [RSP + 0x76],0x1 JNZ 0x0011d18e MOV RDI,qword ptr [RSP + 0x30] CALL 0x0010bfb0 LAB_0011d18e: MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x88 RET
/* WARNING: Removing unreachable block (ram,0x0011d184) */ /* httplib::detail::decode_url(std::__cxx11::string const&, bool) */ detail * __thiscall httplib::detail::decode_url(detail *this,string *param_1,bool param_2) { byte bVar1; ulong uVar2; char *pcVar3; ulong uVar4; int local_44; long local_40; char local_38 [20]; int local_24; ulong local_20; int1 local_12; byte local_11; string *local_10; detail *local_8; local_12 = 0; local_11 = param_2; local_10 = param_1; local_8 = this; std::__cxx11::string::string((string *)this); for (local_20 = 0; uVar4 = local_20, uVar2 = std::__cxx11::string::size(), uVar4 < uVar2; local_20 = local_20 + 1) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10); if ((*pcVar3 == '%') && (uVar4 = local_20 + 1, uVar2 = std::__cxx11::string::size(), uVar4 < uVar2)) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10); if (*pcVar3 == 'u') { local_24 = 0; /* try { // try from 0011cfea to 0011d15c has its CatchHandler @ 0011d048 */ bVar1 = from_hex_to_i(local_10,local_20 + 2,4,&local_24); if ((bVar1 & 1) == 0) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10); std::__cxx11::string::operator+=((string *)this,*pcVar3); } else { local_40 = to_utf8(local_24,local_38); if (local_40 != 0) { std::__cxx11::string::append((char *)this,(ulong)local_38); } local_20 = local_20 + 5; } } else { local_44 = 0; bVar1 = from_hex_to_i(local_10,local_20 + 1,2,&local_44); if ((bVar1 & 1) == 0) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10); std::__cxx11::string::operator+=((string *)this,*pcVar3); } else { std::__cxx11::string::operator+=((string *)this,(char)local_44); local_20 = local_20 + 2; } } } else if (((local_11 & 1) == 0) || (pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10), *pcVar3 != '+')) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_10); std::__cxx11::string::operator+=((string *)this,*pcVar3); } else { std::__cxx11::string::operator+=((string *)this,' '); } } return this; }
39,689
httplib::detail::decode_url(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string decode_url(const std::string &s, bool convert_plus_to_space) { std::string result; for (size_t i = 0; i < s.size(); i++) { if (s[i] == '%' && i + 1 < s.size()) { if (s[i + 1] == 'u') { auto val = 0; if (from_hex_to_i(s, i + 2, 4, val)) { // 4 digits Unicode codes char buff[4]; size_t len = to_utf8(val, buff); if (len > 0) { result.append(buff, len); } i += 5; // 'u0000' } else { result += s[i]; } } else { auto val = 0; if (from_hex_to_i(s, i + 1, 2, val)) { // 2 digits hex codes result += static_cast<char>(val); i += 2; // '00' } else { result += s[i]; } } } else if (convert_plus_to_space && s[i] == '+') { result += ' '; } else { result += s[i]; } } return result; }
O1
c
httplib::detail::decode_url(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, %ebp movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, 0x10(%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rsi), %rdx testq %rdx, %rdx je 0x2f18a movq %rsi, %r14 xorl %r13d, %r13d movl $0x20, %r15d xorl %r12d, %r12d movq (%r14), %rsi movb (%rsi,%r12), %al cmpb $0x25, %al jne 0x2efbd leaq 0x1(%r12), %rcx cmpq %rdx, %rcx jae 0x2efbd cmpb $0x75, (%rsi,%rcx) jne 0x2efee leaq 0x2(%r12), %r8 xorl %ecx, %ecx movl $0x0, %edi cmpq %r8, %rdx jbe 0x2f086 leaq (%rsi,%r12), %rdx addq $0x2, %rdx xorl %esi, %esi xorl %ecx, %ecx movsbl (%rdx,%rsi), %edi testl %edi, %edi je 0x2f084 cmpb $0x20, %dil setge %r10b leal -0x30(%rdi), %r9d cmpl $0xa, %r9d setb %r11b movb $0x1, %r8b testb %r11b, %r10b jne 0x2ef9d leal -0x41(%rdi), %r9d cmpb $0x5, %r9b ja 0x2ef87 addl $-0x37, %edi jmp 0x2ef9a leal -0x61(%rdi), %r8d addl $-0x57, %edi cmpb $0x6, %r8b setb %r8b cmovael %r13d, %edi movl %edi, %r9d testb %r8b, %r8b je 0x2f084 shll $0x4, %ecx addl %r9d, %ecx incq %rsi cmpq $0x4, %rsi jne 0x2ef50 movb $0x1, %dil jmp 0x2f086 movzbl %al, %ecx testb %bpl, %bpl movl %ecx, %edx cmovnel %r15d, %edx cmpb $0x2b, %al cmovnel %ecx, %edx movsbl %dl, %esi movq %rbx, %rdi callq 0x84b0 incq %r12 movq 0x8(%r14), %rdx cmpq %rdx, %r12 jb 0x2ef08 jmp 0x2f18a leaq (%rsi,%r12), %rdx incq %rdx xorl %esi, %esi xorl %ecx, %ecx movsbl (%rdx,%rsi), %edi testl %edi, %edi je 0x2f05a cmpb $0x20, %dil setge %r10b leal -0x30(%rdi), %r9d cmpl $0xa, %r9d setb %r11b movb $0x1, %r8b testb %r11b, %r10b jne 0x2f042 leal -0x41(%rdi), %r9d cmpb $0x5, %r9b ja 0x2f02c addl $-0x37, %edi jmp 0x2f03f leal -0x61(%rdi), %r8d addl $-0x57, %edi cmpb $0x6, %r8b setb %r8b cmovael %r13d, %edi movl %edi, %r9d testb %r8b, %r8b je 0x2f05a shll $0x4, %ecx addl %r9d, %ecx incq %rsi cmpq $0x2, %rsi jne 0x2eff9 movb $0x1, %dl jmp 0x2f05c xorl %edx, %edx testb %dl, %dl je 0x2f074 movsbl %cl, %esi movq %rbx, %rdi callq 0x84b0 addq $0x2, %r12 jmp 0x2efd9 movsbl %al, %esi movq %rbx, %rdi callq 0x84b0 jmp 0x2efd9 xorl %edi, %edi testb %dil, %dil je 0x2f09e cmpl $0x7f, %ecx jg 0x2f0ae andb $0x7f, %cl movb %cl, 0xc(%rsp) movl $0x1, %edx jmp 0x2f105 movsbl %al, %esi movq %rbx, %rdi callq 0x84b0 jmp 0x2efd9 cmpl $0x7ff, %ecx # imm = 0x7FF jg 0x2f0d4 movl %ecx, %eax shrl $0x6, %eax andb $0x1f, %al orb $-0x40, %al movb %al, 0xc(%rsp) andb $0x3f, %cl orb $-0x80, %cl movb %cl, 0xd(%rsp) movl $0x2, %edx jmp 0x2f105 cmpl $0xd7ff, %ecx # imm = 0xD7FF jg 0x2f121 movl %ecx, %eax shrl $0xc, %eax andb $0xf, %al orb $-0x20, %al movb %al, 0xc(%rsp) movl %ecx, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0xd(%rsp) andb $0x3f, %cl orb $-0x80, %cl movb %cl, 0xe(%rsp) movl $0x3, %edx xorl %eax, %eax testb %al, %al jne 0x2f118 movq %rbx, %rdi leaq 0xc(%rsp), %rsi callq 0x8090 addq $0x5, %r12 jmp 0x2efd9 movb $0x1, %al cmpl $0xe000, %ecx # imm = 0xE000 jge 0x2f12f xorl %edx, %edx jmp 0x2f107 cmpl $0xffff, %ecx # imm = 0xFFFF jle 0x2f0dc cmpl $0x10ffff, %ecx # imm = 0x10FFFF jg 0x2f12b movl %ecx, %eax shrl $0x12, %eax movl %ecx, %edx shrl $0x4, %edx andl $0xff00, %edx # imm = 0xFF00 movzbl %al, %eax orl %edx, %eax movl %ecx, %edx shll $0xa, %edx andl $0xff0000, %edx # imm = 0xFF0000 orl %eax, %edx shll $0x18, %ecx orl %edx, %ecx movd %ecx, %xmm0 pand 0x1415e(%rip), %xmm0 # 0x432d0 por 0x14166(%rip), %xmm0 # 0x432e0 movd %xmm0, 0xc(%rsp) movl $0x4, %edx jmp 0x2f105 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2f1a2 jmp 0x2f1a2 jmp 0x2f1a2 movq %rax, %r14 movq (%rbx), %rdi cmpq 0x10(%rsp), %rdi je 0x2f1bf movq 0x10(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x8580 movq %r14, %rdi callq 0x8960 nop
_ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, edx mov rbx, rdi lea rax, [rdi+10h] mov [rsp+48h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdx, [rsi+8] test rdx, rdx jz loc_2F18A mov r14, rsi xor r13d, r13d mov r15d, 20h ; ' ' xor r12d, r12d loc_2EF08: mov rsi, [r14] mov al, [rsi+r12] cmp al, 25h ; '%' jnz loc_2EFBD lea rcx, [r12+1] cmp rcx, rdx jnb loc_2EFBD cmp byte ptr [rsi+rcx], 75h ; 'u' jnz loc_2EFEE lea r8, [r12+2] xor ecx, ecx mov edi, 0 cmp rdx, r8 jbe loc_2F086 lea rdx, [rsi+r12] add rdx, 2 xor esi, esi xor ecx, ecx loc_2EF50: movsx edi, byte ptr [rdx+rsi] test edi, edi jz loc_2F084 cmp dil, 20h ; ' ' setnl r10b lea r9d, [rdi-30h] cmp r9d, 0Ah setb r11b mov r8b, 1 test r10b, r11b jnz short loc_2EF9D lea r9d, [rdi-41h] cmp r9b, 5 ja short loc_2EF87 add edi, 0FFFFFFC9h jmp short loc_2EF9A loc_2EF87: lea r8d, [rdi-61h] add edi, 0FFFFFFA9h cmp r8b, 6 setb r8b cmovnb edi, r13d loc_2EF9A: mov r9d, edi loc_2EF9D: test r8b, r8b jz loc_2F084 shl ecx, 4 add ecx, r9d inc rsi cmp rsi, 4 jnz short loc_2EF50 mov dil, 1 jmp loc_2F086 loc_2EFBD: movzx ecx, al test bpl, bpl mov edx, ecx cmovnz edx, r15d cmp al, 2Bh ; '+' cmovnz edx, ecx movsx esi, dl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_2EFD9: inc r12 mov rdx, [r14+8] cmp r12, rdx jb loc_2EF08 jmp loc_2F18A loc_2EFEE: lea rdx, [rsi+r12] inc rdx xor esi, esi xor ecx, ecx loc_2EFF9: movsx edi, byte ptr [rdx+rsi] test edi, edi jz short loc_2F05A cmp dil, 20h ; ' ' setnl r10b lea r9d, [rdi-30h] cmp r9d, 0Ah setb r11b mov r8b, 1 test r10b, r11b jnz short loc_2F042 lea r9d, [rdi-41h] cmp r9b, 5 ja short loc_2F02C add edi, 0FFFFFFC9h jmp short loc_2F03F loc_2F02C: lea r8d, [rdi-61h] add edi, 0FFFFFFA9h cmp r8b, 6 setb r8b cmovnb edi, r13d loc_2F03F: mov r9d, edi loc_2F042: test r8b, r8b jz short loc_2F05A shl ecx, 4 add ecx, r9d inc rsi cmp rsi, 2 jnz short loc_2EFF9 mov dl, 1 jmp short loc_2F05C loc_2F05A: xor edx, edx loc_2F05C: test dl, dl jz short loc_2F074 movsx esi, cl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r12, 2 jmp loc_2EFD9 loc_2F074: movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp loc_2EFD9 loc_2F084: xor edi, edi loc_2F086: test dil, dil jz short loc_2F09E cmp ecx, 7Fh jg short loc_2F0AE and cl, 7Fh mov byte ptr [rsp+48h+var_3C], cl mov edx, 1 jmp short loc_2F105 loc_2F09E: movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp loc_2EFD9 loc_2F0AE: cmp ecx, 7FFh jg short loc_2F0D4 mov eax, ecx shr eax, 6 and al, 1Fh or al, 0C0h mov byte ptr [rsp+48h+var_3C], al and cl, 3Fh or cl, 80h mov byte ptr [rsp+48h+var_3C+1], cl mov edx, 2 jmp short loc_2F105 loc_2F0D4: cmp ecx, 0D7FFh jg short loc_2F121 loc_2F0DC: mov eax, ecx shr eax, 0Ch and al, 0Fh or al, 0E0h mov byte ptr [rsp+48h+var_3C], al mov eax, ecx shr eax, 6 and al, 3Fh or al, 80h mov byte ptr [rsp+48h+var_3C+1], al and cl, 3Fh or cl, 80h mov byte ptr [rsp+48h+var_3C+2], cl mov edx, 3 loc_2F105: xor eax, eax loc_2F107: test al, al jnz short loc_2F118 mov rdi, rbx lea rsi, [rsp+48h+var_3C] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) loc_2F118: add r12, 5 jmp loc_2EFD9 loc_2F121: mov al, 1 cmp ecx, 0E000h jge short loc_2F12F loc_2F12B: xor edx, edx jmp short loc_2F107 loc_2F12F: cmp ecx, 0FFFFh jle short loc_2F0DC cmp ecx, 10FFFFh jg short loc_2F12B mov eax, ecx shr eax, 12h mov edx, ecx shr edx, 4 and edx, 0FF00h movzx eax, al or eax, edx mov edx, ecx shl edx, 0Ah and edx, 0FF0000h or edx, eax shl ecx, 18h or ecx, edx movd xmm0, ecx pand xmm0, cs:xmmword_432D0 por xmm0, cs:xmmword_432E0 movd [rsp+48h+var_3C], xmm0 mov edx, 4 jmp loc_2F105 loc_2F18A: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_2F1A2 jmp short loc_2F1A2 jmp short $+2 loc_2F1A2: mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+arg_8] jz short loc_2F1BF mov rax, [rsp+arg_8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2F1BF: mov rdi, r14 call __Unwind_Resume
long long httplib::detail::decode_url(long long a1, long long *a2, char a3) { unsigned long long v5; // rdx unsigned long long v7; // r12 long long v8; // rsi char v9; // al int v10; // ecx char v11; // di long long v12; // rdx long long v13; // rsi int v14; // edi int v15; // r9d bool v16; // r8 int v17; // edi unsigned __int8 v18; // r8 char v19; // dl long long v20; // rdx long long v21; // rsi char v22; // cl int v23; // edi char v24; // r9 bool v25; // r8 char v26; // di unsigned __int8 v27; // r8 char v28; // dl char v29; // al *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v5 = a2[1]; if ( v5 ) { v7 = 0LL; while ( 1 ) { v8 = *a2; v9 = *(_BYTE *)(*a2 + v7); if ( v9 != 37 || v7 + 1 >= v5 ) { v19 = *(_BYTE *)(*a2 + v7); if ( a3 ) v19 = 32; if ( v9 != 43 ) v19 = *(_BYTE *)(*a2 + v7); std::string::push_back(a1, (unsigned int)v19); goto LABEL_23; } if ( *(_BYTE *)(v8 + v7 + 1) == 117 ) break; v20 = v8 + v7 + 1; v21 = 0LL; v22 = 0; while ( 1 ) { v23 = *(char *)(v20 + v21); if ( !*(_BYTE *)(v20 + v21) ) break; v24 = v23 - 48; v25 = 1; if ( (unsigned int)(v23 - 48) >= 0xA || (char)v23 < 32 ) { if ( (unsigned __int8)(v23 - 65) > 5u ) { v27 = v23 - 97; v26 = v23 - 87; v25 = v27 < 6u; if ( !v25 ) v26 = 0; } else { v26 = v23 - 55; } v24 = v26; } if ( !v25 ) break; v22 = v24 + 16 * v22; if ( ++v21 == 2 ) { v28 = 1; goto LABEL_37; } } v28 = 0; LABEL_37: if ( !v28 ) goto LABEL_39; std::string::push_back(a1, (unsigned int)v22); v7 += 2LL; LABEL_23: ++v7; v5 = a2[1]; if ( v7 >= v5 ) return a1; } v10 = 0; v11 = 0; if ( v5 > v7 + 2 ) { v12 = v8 + v7 + 2; v13 = 0LL; v10 = 0; while ( 1 ) { v14 = *(char *)(v12 + v13); if ( !*(_BYTE *)(v12 + v13) ) break; v15 = v14 - 48; v16 = 1; if ( (unsigned int)(v14 - 48) >= 0xA || (char)v14 < 32 ) { if ( (unsigned __int8)(v14 - 65) > 5u ) { v18 = v14 - 97; v17 = v14 - 87; v16 = v18 < 6u; if ( !v16 ) v17 = 0; } else { v17 = v14 - 55; } v15 = v17; } if ( !v16 ) break; v10 = v15 + 16 * v10; if ( ++v13 == 4 ) { v11 = 1; goto LABEL_41; } } v11 = 0; } LABEL_41: if ( v11 ) { if ( v10 <= 127 || v10 < 55296 || (v29 = 1, v10 >= 57344) && v10 < 1114112 ) v29 = 0; if ( !v29 ) std::string::append(a1); v7 += 5LL; goto LABEL_23; } LABEL_39: std::string::push_back(a1, 37LL); goto LABEL_23; } return a1; }
decode_url: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,EDX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDX,qword ptr [RSI + 0x8] TEST RDX,RDX JZ 0x0012f18a MOV R14,RSI XOR R13D,R13D MOV R15D,0x20 XOR R12D,R12D LAB_0012ef08: MOV RSI,qword ptr [R14] MOV AL,byte ptr [RSI + R12*0x1] CMP AL,0x25 JNZ 0x0012efbd LEA RCX,[R12 + 0x1] CMP RCX,RDX JNC 0x0012efbd CMP byte ptr [RSI + RCX*0x1],0x75 JNZ 0x0012efee LEA R8,[R12 + 0x2] XOR ECX,ECX MOV EDI,0x0 CMP RDX,R8 JBE 0x0012f086 LEA RDX,[RSI + R12*0x1] ADD RDX,0x2 XOR ESI,ESI XOR ECX,ECX LAB_0012ef50: MOVSX EDI,byte ptr [RDX + RSI*0x1] TEST EDI,EDI JZ 0x0012f084 CMP DIL,0x20 SETGE R10B LEA R9D,[RDI + -0x30] CMP R9D,0xa SETC R11B MOV R8B,0x1 TEST R10B,R11B JNZ 0x0012ef9d LEA R9D,[RDI + -0x41] CMP R9B,0x5 JA 0x0012ef87 ADD EDI,-0x37 JMP 0x0012ef9a LAB_0012ef87: LEA R8D,[RDI + -0x61] ADD EDI,-0x57 CMP R8B,0x6 SETC R8B CMOVNC EDI,R13D LAB_0012ef9a: MOV R9D,EDI LAB_0012ef9d: TEST R8B,R8B JZ 0x0012f084 SHL ECX,0x4 ADD ECX,R9D INC RSI CMP RSI,0x4 JNZ 0x0012ef50 MOV DIL,0x1 JMP 0x0012f086 LAB_0012efbd: MOVZX ECX,AL TEST BPL,BPL MOV EDX,ECX CMOVNZ EDX,R15D CMP AL,0x2b CMOVNZ EDX,ECX MOVSX ESI,DL LAB_0012efd1: MOV RDI,RBX CALL 0x001084b0 LAB_0012efd9: INC R12 MOV RDX,qword ptr [R14 + 0x8] CMP R12,RDX JC 0x0012ef08 JMP 0x0012f18a LAB_0012efee: LEA RDX,[RSI + R12*0x1] INC RDX XOR ESI,ESI XOR ECX,ECX LAB_0012eff9: MOVSX EDI,byte ptr [RDX + RSI*0x1] TEST EDI,EDI JZ 0x0012f05a CMP DIL,0x20 SETGE R10B LEA R9D,[RDI + -0x30] CMP R9D,0xa SETC R11B MOV R8B,0x1 TEST R10B,R11B JNZ 0x0012f042 LEA R9D,[RDI + -0x41] CMP R9B,0x5 JA 0x0012f02c ADD EDI,-0x37 JMP 0x0012f03f LAB_0012f02c: LEA R8D,[RDI + -0x61] ADD EDI,-0x57 CMP R8B,0x6 SETC R8B CMOVNC EDI,R13D LAB_0012f03f: MOV R9D,EDI LAB_0012f042: TEST R8B,R8B JZ 0x0012f05a SHL ECX,0x4 ADD ECX,R9D INC RSI CMP RSI,0x2 JNZ 0x0012eff9 MOV DL,0x1 JMP 0x0012f05c LAB_0012f05a: XOR EDX,EDX LAB_0012f05c: TEST DL,DL JZ 0x0012f074 LAB_0012f060: MOVSX ESI,CL MOV RDI,RBX CALL 0x001084b0 ADD R12,0x2 JMP 0x0012efd9 LAB_0012f074: MOVSX ESI,AL MOV RDI,RBX CALL 0x001084b0 JMP 0x0012efd9 LAB_0012f084: XOR EDI,EDI LAB_0012f086: TEST DIL,DIL JZ 0x0012f09e CMP ECX,0x7f JG 0x0012f0ae AND CL,0x7f MOV byte ptr [RSP + 0xc],CL MOV EDX,0x1 JMP 0x0012f105 LAB_0012f09e: MOVSX ESI,AL MOV RDI,RBX CALL 0x001084b0 JMP 0x0012efd9 LAB_0012f0ae: CMP ECX,0x7ff JG 0x0012f0d4 MOV EAX,ECX SHR EAX,0x6 AND AL,0x1f OR AL,0xc0 MOV byte ptr [RSP + 0xc],AL AND CL,0x3f OR CL,0x80 MOV byte ptr [RSP + 0xd],CL MOV EDX,0x2 JMP 0x0012f105 LAB_0012f0d4: CMP ECX,0xd7ff JG 0x0012f121 LAB_0012f0dc: MOV EAX,ECX SHR EAX,0xc AND AL,0xf OR AL,0xe0 MOV byte ptr [RSP + 0xc],AL MOV EAX,ECX SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOV byte ptr [RSP + 0xd],AL AND CL,0x3f OR CL,0x80 MOV byte ptr [RSP + 0xe],CL MOV EDX,0x3 LAB_0012f105: XOR EAX,EAX LAB_0012f107: TEST AL,AL JNZ 0x0012f118 LAB_0012f10b: MOV RDI,RBX LEA RSI,[RSP + 0xc] CALL 0x00108090 LAB_0012f118: ADD R12,0x5 JMP 0x0012efd9 LAB_0012f121: MOV AL,0x1 CMP ECX,0xe000 JGE 0x0012f12f LAB_0012f12b: XOR EDX,EDX JMP 0x0012f107 LAB_0012f12f: CMP ECX,0xffff JLE 0x0012f0dc CMP ECX,0x10ffff JG 0x0012f12b MOV EAX,ECX SHR EAX,0x12 MOV EDX,ECX SHR EDX,0x4 AND EDX,0xff00 MOVZX EAX,AL OR EAX,EDX MOV EDX,ECX SHL EDX,0xa AND EDX,0xff0000 OR EDX,EAX SHL ECX,0x18 OR ECX,EDX MOVD XMM0,ECX PAND XMM0,xmmword ptr [0x001432d0] POR XMM0,xmmword ptr [0x001432e0] MOVD dword ptr [RSP + 0xc],XMM0 MOV EDX,0x4 JMP 0x0012f105 LAB_0012f18a: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* httplib::detail::decode_url(std::__cxx11::string const&, bool) */ string * httplib::detail::decode_url(string *param_1,bool param_2) { char cVar1; long lVar2; int1 uVar3; uint uVar4; ulong uVar5; int7 in_register_00000031; long *plVar6; long lVar7; char cVar8; int iVar9; uint uVar10; ulong uVar11; bool bVar12; int4 local_3c; string *local_38; plVar6 = (long *)CONCAT71(in_register_00000031,param_2); local_38 = param_1 + 0x10; *(string **)param_1 = local_38; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; uVar5 = plVar6[1]; if (uVar5 != 0) { uVar11 = 0; do { lVar2 = *plVar6; cVar8 = (char)param_1; if ((*(char *)(lVar2 + uVar11) == '%') && (uVar11 + 1 < uVar5)) { if (*(char *)(lVar2 + uVar11 + 1) == 'u') { uVar4 = 0; bVar12 = false; if (uVar11 + 2 < uVar5) { lVar7 = 0; uVar4 = 0; do { cVar1 = *(char *)(lVar2 + uVar11 + 2 + lVar7); iVar9 = (int)cVar1; if (cVar1 == '\0') { LAB_0012f084: bVar12 = false; goto LAB_0012f086; } uVar10 = iVar9 - 0x30; bVar12 = true; if (cVar1 < ' ' || 9 < uVar10) { if ((byte)(cVar1 + 0xbfU) < 6) { uVar10 = iVar9 - 0x37; } else { uVar10 = iVar9 - 0x57; bVar12 = (byte)(cVar1 + 0x9fU) < 6; if (!bVar12) { uVar10 = 0; } } } if (!bVar12) goto LAB_0012f084; uVar4 = uVar4 * 0x10 + uVar10; lVar7 = lVar7 + 1; } while (lVar7 != 4); bVar12 = true; } LAB_0012f086: if (bVar12) { uVar3 = (int1)uVar4; if ((int)uVar4 < 0x80) { local_3c = CONCAT31(local_3c._1_3_,uVar3) & 0xffffff7f; LAB_0012f105: bVar12 = false; } else { if ((int)uVar4 < 0x800) { uVar4 = CONCAT31(local_3c._1_3_,(char)(uVar4 >> 6)) & 0xffffff1f; local_3c._2_2_ = (int2)(uVar4 >> 0x10); local_3c = CONCAT22(local_3c._2_2_,CONCAT11(uVar3,(char)uVar4)) & 0xffff3fff | 0x80c0; goto LAB_0012f105; } if ((int)uVar4 < 0xd800) { LAB_0012f0dc: uVar10 = CONCAT31(local_3c._1_3_,(char)(uVar4 >> 0xc)) & 0xffffff0f; local_3c._2_2_ = (int2)(uVar10 >> 0x10); uVar4 = CONCAT22(local_3c._2_2_,CONCAT11((char)(uVar4 >> 6),(char)uVar10)) & 0xffff3fff; local_3c._3_1_ = (int1)(uVar4 >> 0x18); local_3c = CONCAT13(local_3c._3_1_,CONCAT12(uVar3,(short)uVar4)) & 0xff3fffff | 0x8080e0; goto LAB_0012f105; } bVar12 = true; if (0xdfff < (int)uVar4) { if ((int)uVar4 < 0x10000) goto LAB_0012f0dc; if ((int)uVar4 < 0x110000) { local_3c = (uVar4 << 0x18 | (uVar4 & 0x3fc0) << 10 | uVar4 >> 0x12 & 0xff | uVar4 >> 4 & 0xff00) & SUB164(_DAT_001432d0,0) | SUB164(_DAT_001432e0,0); goto LAB_0012f105; } } } if (!bVar12) { /* try { // try from 0012f10b to 0012f117 has its CatchHandler @ 0012f19c */ std::__cxx11::string::append((char *)param_1,(ulong)&local_3c); } uVar11 = uVar11 + 5; } else { /* try { // try from 0012f09e to 0012f0a8 has its CatchHandler @ 0012f19e */ std::__cxx11::string::push_back(cVar8); } } else { lVar7 = 0; do { cVar1 = *(char *)(lVar2 + uVar11 + 1 + lVar7); if (cVar1 == '\0') { LAB_0012f05a: bVar12 = false; goto LAB_0012f05c; } bVar12 = true; if ((cVar1 < ' ' || 9 < (int)cVar1 - 0x30U) && (5 < (byte)(cVar1 + 0xbfU))) { bVar12 = (byte)(cVar1 + 0x9fU) < 6; } if (!bVar12) goto LAB_0012f05a; lVar7 = lVar7 + 1; } while (lVar7 != 2); bVar12 = true; LAB_0012f05c: if (bVar12) { /* try { // try from 0012f060 to 0012f07e has its CatchHandler @ 0012f1a0 */ std::__cxx11::string::push_back(cVar8); uVar11 = uVar11 + 2; } else { std::__cxx11::string::push_back(cVar8); } } } else { /* try { // try from 0012efd1 to 0012efd8 has its CatchHandler @ 0012f1a2 */ std::__cxx11::string::push_back(cVar8); } uVar11 = uVar11 + 1; uVar5 = plVar6[1]; } while (uVar11 < uVar5); } return param_1; }
39,690
udiv1norm
bluesky950520[P]quickjs/libbf.c
static inline limb_t udiv1norm(limb_t *pr, limb_t a1, limb_t a0, limb_t d, limb_t d_inv) { limb_t n1m, n_adj, q, r, ah; dlimb_t a; n1m = ((slimb_t)a0 >> (LIMB_BITS - 1)); n_adj = a0 + (n1m & d); a = (dlimb_t)d_inv * (a1 - n1m) + n_adj; q = (a >> LIMB_BITS) + a1; /* compute a - q * r and update q so that the remainder is\ between 0 and d - 1 */ a = ((dlimb_t)a1 << LIMB_BITS) | a0; a = a - (dlimb_t)q * d - d; ah = a >> LIMB_BITS; q += 1 + ah; r = (limb_t)a + (ah & d); *pr = r; return q; }
O2
c
udiv1norm: movq %r8, %rax movq %rdx, %r8 movq %rdx, %r10 sarq $0x3f, %r10 movq %rsi, %rdx subq %r10, %rdx andq %rcx, %r10 addq %r8, %r10 mulq %rdx movq %rdx, %r9 addq %r10, %rax adcq %rsi, %r9 movq %r9, %rax notq %rax mulq %rcx subq %rcx, %rdx addq %r8, %rax adcq %rsi, %rdx leaq (%r9,%rdx), %rsi incq %rsi andq %rcx, %rdx addq %rdx, %rax movq %rax, (%rdi) movq %rsi, %rax retq
udiv1norm: mov rax, r8 mov r8, rdx mov r10, rdx sar r10, 3Fh mov rdx, rsi sub rdx, r10 and r10, rcx add r10, r8 mul rdx mov r9, rdx add rax, r10 adc r9, rsi mov rax, r9 not rax mul rcx sub rdx, rcx add rax, r8 adc rdx, rsi lea rsi, [r9+rdx] inc rsi and rdx, rcx add rax, rdx mov [rdi], rax mov rax, rsi retn
long long udiv1norm(_QWORD *a1, unsigned long long a2, long long a3, unsigned long long a4, unsigned long long a5) { long long v7; // r10 unsigned __int128 v8; // rax unsigned long long v9; // r9 unsigned __int128 v10; // rax unsigned __int128 v11; // rax v7 = a3 + (a4 & (a3 >> 63)); v8 = (a2 - (a3 >> 63)) * (unsigned __int128)a5; v9 = a2 + __CFADD__(v7, (_QWORD)v8) + *((_QWORD *)&v8 + 1); v10 = a4 * (unsigned __int128)~v9; *((_QWORD *)&v10 + 1) -= a4; v11 = __PAIR128__(a2, a3) + v10; *a1 = (a4 & *((_QWORD *)&v11 + 1)) + v11; return v9 + *((_QWORD *)&v11 + 1) + 1; }
udiv1norm: MOV RAX,R8 MOV R8,RDX MOV R10,RDX SAR R10,0x3f MOV RDX,RSI SUB RDX,R10 AND R10,RCX ADD R10,R8 MUL RDX MOV R9,RDX ADD RAX,R10 ADC R9,RSI MOV RAX,R9 NOT RAX MUL RCX SUB RDX,RCX ADD RAX,R8 ADC RDX,RSI LEA RSI,[R9 + RDX*0x1] INC RSI AND RDX,RCX ADD RAX,RDX MOV qword ptr [RDI],RAX MOV RAX,RSI RET
long udiv1norm(long *param_1,long param_2,ulong param_3,ulong param_4,ulong param_5) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar5; ulong uVar6; ulong uVar7; auVar1._8_8_ = 0; auVar1._0_8_ = param_5; auVar3._8_8_ = 0; auVar3._0_8_ = param_2 - ((long)param_3 >> 0x3f); uVar7 = SUB168(auVar1 * auVar3,8) + param_2 + (ulong)CARRY8(SUB168(auVar1 * auVar3,0),((long)param_3 >> 0x3f & param_4) + param_3); auVar2._8_8_ = 0; auVar2._0_8_ = ~uVar7; auVar4._8_8_ = 0; auVar4._0_8_ = param_4; uVar5 = SUB168(auVar2 * auVar4,0); uVar6 = (SUB168(auVar2 * auVar4,8) - param_4) + param_2 + (ulong)CARRY8(uVar5,param_3); *param_1 = uVar5 + param_3 + (uVar6 & param_4); return uVar7 + uVar6 + 1; }
39,691
mysql_stmt_next_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { int rc= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (!mysql_stmt_more_results(stmt)) return(-1); if (stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE) madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA); stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE; if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT) stmt->mysql->status= MYSQL_STATUS_STMT_RESULT; if (stmt->mysql->field_count) rc= madb_alloc_stmt_fields(stmt); else { stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.last_insert_id= stmt->mysql->insert_id; stmt->upsert_status.server_status= stmt->mysql->server_status; stmt->upsert_status.warning_count= stmt->mysql->warning_count; } stmt->field_count= stmt->mysql->field_count; stmt->result.rows= 0; return(rc); }
O0
c
mysql_stmt_next_result: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x3159f jmp 0x31530 movq -0x10(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x32bf0(%rip), %rax # 0x64140 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x32bd6(%rip), %rax # 0x64150 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3189a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jae 0x31697 jmp 0x315af movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x32b69(%rip), %rax # 0x64140 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x32b47(%rip), %rax # 0x64150 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) jmp 0x31628 movq -0x10(%rbp), %rax movl $0x7de, 0x108(%rax) # imm = 0x7DE movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x32af8(%rip), %rax # 0x64140 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x32ade(%rip), %rax # 0x64150 movq 0x70(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3189a movq -0x10(%rbp), %rdi callq 0x30ed0 cmpb $0x0, %al jne 0x316b0 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3189a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jbe 0x316d2 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jae 0x316d2 movq -0x10(%rbp), %rdi movl $0xb, %esi callq 0x2e990 movq -0x10(%rbp), %rax movl $0x3, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x21f60 cmpl $0x0, %eax je 0x317ca movq -0x10(%rbp), %rax movl $0x6, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x10(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x3177b movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x28(%rbp) jmp 0x317a1 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x329b7(%rip), %rax # 0x64150 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3189a movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x1, 0x488(%rax) jne 0x317ed movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x8, 0x488(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x37c(%rax) je 0x3180c movq -0x10(%rbp), %rdi callq 0x318b0 movl %eax, -0x14(%rbp) jmp 0x31870 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x338(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xf8(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x340(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x100(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf4(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x388(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf0(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x37c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xc8(%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_next_result: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_3159F jmp short $+2 loc_31530: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3189A loc_3159F: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jnb loc_31697 jmp short $+2 loc_315AF: mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+90h], 7DEh mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 jmp short $+2 loc_31628: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DEh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+70h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3189A loc_31697: mov rdi, [rbp+var_10] call mysql_stmt_more_results cmp al, 0 jnz short loc_316B0 mov [rbp+var_4], 0FFFFFFFFh jmp loc_3189A loc_316B0: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jbe short loc_316D2 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnb short loc_316D2 mov rdi, [rbp+var_10] mov esi, 0Bh call madb_reset_stmt loc_316D2: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 3 mov rax, [rbp+var_10] mov rdi, [rax+38h] call mysql_next_result cmp eax, 0 jz loc_317CA mov rax, [rbp+var_10] mov dword ptr [rax+50h], 6 mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_10] mov [rax+108h], ecx mov rdi, [rbp+var_10] add rdi, 30Dh mov rax, [rbp+var_10] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_10] add rax, 10Ch mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_3177B mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h mov [rbp+var_28], rax jmp short loc_317A1 loc_3177B: mov rax, [rbp+var_10] 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_28], rax loc_317A1: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3189A loc_317CA: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+488h], 1 jnz short loc_317ED mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+488h], 8 loc_317ED: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+37Ch], 0 jz short loc_3180C mov rdi, [rbp+var_10] call madb_alloc_stmt_fields mov [rbp+var_14], eax jmp short loc_31870 loc_3180C: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+338h] mov rax, [rbp+var_10] mov [rax+0F8h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+340h] mov rax, [rbp+var_10] mov [rax+100h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+380h] mov rax, [rbp+var_10] mov [rax+0F4h], ecx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+388h] mov rax, [rbp+var_10] mov [rax+0F0h], ecx loc_31870: mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+37Ch] mov rax, [rbp+var_10] mov [rax+60h], ecx mov rax, [rbp+var_10] mov qword ptr [rax+0C8h], 0 mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_3189A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_next_result(long long a1) { char *v1; // rax unsigned int v3; // [rsp+1Ch] [rbp-14h] v3 = 0; if ( *(_QWORD *)(a1 + 56) ) { if ( *(_DWORD *)(a1 + 80) >= 2u ) { if ( mysql_stmt_more_results(a1) ) { if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u ) madb_reset_stmt(a1, 11); *(_DWORD *)(a1 + 80) = 3; if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) ) { *(_DWORD *)(a1 + 80) = 6; *(_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 ) v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v1, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 ) *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8; if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) ) { v3 = madb_alloc_stmt_fields(a1); } else { *(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL); *(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL); *(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL); *(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL); } *(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL); *(_QWORD *)(a1 + 200) = 0LL; return v3; } } else { return (unsigned int)-1; } } else { *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014; strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0; *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[14], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } } else { *(_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; } }
mysql_stmt_next_result: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0013159f JMP 0x00131530 LAB_00131530: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x164140] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x164150] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013189a LAB_0013159f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JNC 0x00131697 JMP 0x001315af LAB_001315af: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7de MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x164140] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x164150] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 JMP 0x00131628 LAB_00131628: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x164140] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x164150] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013189a LAB_00131697: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00130ed0 CMP AL,0x0 JNZ 0x001316b0 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013189a LAB_001316b0: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JBE 0x001316d2 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNC 0x001316d2 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xb CALL 0x0012e990 LAB_001316d2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x3 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00121f60 CMP EAX,0x0 JZ 0x001317ca MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10c MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x0013177b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x28],RAX JMP 0x001317a1 LAB_0013177b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x164150] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX LAB_001317a1: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013189a LAB_001317ca: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x1 JNZ 0x001317ed MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x8 LAB_001317ed: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x37c],0x0 JZ 0x0013180c MOV RDI,qword ptr [RBP + -0x10] CALL 0x001318b0 MOV dword ptr [RBP + -0x14],EAX JMP 0x00131870 LAB_0013180c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x338] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xf8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x340] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x100],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x388] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf0],ECX LAB_00131870: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x37c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0013189a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_next_result(long param_1) { char cVar1; int iVar2; char *local_30; int4 local_1c; int4 local_c; local_1c = 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_001641b8,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else if (*(uint *)(param_1 + 0x50) < 2) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_001641c0,0x1ff); *(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0; *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_001641c0,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else { cVar1 = mysql_stmt_more_results(param_1); if (cVar1 == '\0') { local_c = 0xffffffff; } else { if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) { madb_reset_stmt(param_1,0xb); } *(int4 *)(param_1 + 0x50) = 3; iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38)); if (iVar2 == 0) { if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8; } if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) { *(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388); } else { local_1c = madb_alloc_stmt_fields(param_1); } *(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c); *(int8 *)(param_1 + 200) = 0; local_c = local_1c; } else { *(int4 *)(param_1 + 0x50) = 6; *(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_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_30,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } } } return local_c; }
39,692
ma_delete_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_delete_static_record(MARIA_HA *info, const uchar *record __attribute__ ((unused))) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _ma_dpointer(info->s, temp+1, info->s->state.dellink); info->s->state.dellink= info->cur_row.lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info, temp, 1+info->s->rec_reflength, info->cur_row.lastpos, MYF(MY_NABP)) != 0); }
O0
c
ma_delete_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx incq %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0x20(%rax), %rax movq 0x3a0(%rcx), %rdx movq 0x10(%rax), %rcx addq %rdx, %rcx movq %rcx, 0x10(%rax) movb $0x0, -0x11(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rdi leaq -0x10(%rbp), %rsi movq 0xc8(%rdi), %rdx callq 0x6b4b0 movq -0x20(%rbp), %rcx movq (%rcx), %rax movq 0x98(%rcx), %rcx movq %rcx, 0xc8(%rax) movq -0x20(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x20(%rbp), %rdi movq (%rdi), %rdx movq 0x98(%rdi), %rcx movq 0x6e8(%rdx), %rax movl 0x740(%rdx), %edx incl %edx leaq -0x11(%rbp), %rsi movl $0x4, %r8d callq *%rax testq %rax, %rax setne %al movb %al, -0x29(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x73718 movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
_ma_delete_static_record: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rax, [rbp+var_20] mov rax, [rax+20h] mov rcx, [rax+8] inc rcx mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rax+20h] mov rdx, [rcx+3A0h] mov rcx, [rax+10h] add rcx, rdx mov [rax+10h], rcx mov [rbp+var_11], 0 mov rax, [rbp+var_20] mov rdi, [rax] lea rsi, [rbp+var_10] mov rdx, [rdi+0C8h] call _ma_dpointer mov rcx, [rbp+var_20] mov rax, [rcx] mov rcx, [rcx+98h] mov [rax+0C8h], rcx mov rax, [rbp+var_20] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_20] mov rdx, [rdi] mov rcx, [rdi+98h] mov rax, [rdx+6E8h] mov edx, [rdx+740h] inc edx lea rsi, [rbp+var_11] mov r8d, 4 call rax test rax, rax setnz al mov [rbp+var_29], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_73718 mov al, [rbp+var_29] add rsp, 30h pop rbp retn loc_73718: call ___stack_chk_fail
bool ma_delete_static_record(long long *a1) { char v2; // [rsp+1Fh] [rbp-11h] BYREF char v3[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v4; // [rsp+28h] [rbp-8h] v4 = __readfsqword(0x28u); ++*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928); v2 = 0; ma_dpointer(*a1, v3, *(_QWORD *)(*a1 + 200)); *(_QWORD *)(*a1 + 200) = a1[19]; *((_DWORD *)a1 + 358) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))( a1, &v2, (unsigned int)(*(_DWORD *)(*a1 + 1856) + 1), a1[19], 4LL) != 0; }
_ma_delete_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] INC RCX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RCX + 0x3a0] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x11],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x10] MOV RDX,qword ptr [RDI + 0xc8] CALL 0x0016b4b0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x98] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x98] MOV RAX,qword ptr [RDX + 0x6e8] MOV EDX,dword ptr [RDX + 0x740] INC EDX LEA RSI,[RBP + -0x11] MOV R8D,0x4 CALL RAX TEST RAX,RAX SETNZ AL MOV byte ptr [RBP + -0x29],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00173718 MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET LAB_00173718: CALL 0x0012a270
int8 _ma_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0); local_19 = 0; _ma_dpointer(*param_1,local_18,*(int8 *)(*param_1 + 200)); *(long *)(*param_1 + 200) = param_1[0x13]; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,&local_19,*(int *)(*param_1 + 0x740) + 1,param_1[0x13],4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,693
gc_decref
bluesky950520[P]quickjs/quickjs.c
static void gc_decref(JSRuntime *rt) { struct list_head *el, *el1; JSGCObjectHeader *p; init_list_head(&rt->tmp_obj_list); /* decrement the refcount of all the children of all the GC objects and move the GC objects with zero refcount to tmp_obj_list */ list_for_each_safe(el, el1, &rt->gc_obj_list) { p = list_entry(el, JSGCObjectHeader, link); assert(p->mark == 0); mark_children(rt, p, gc_decref_child); p->mark = 1; if (p->ref_count == 0) { list_del(&p->link); list_add_tail(&p->link, &rt->tmp_obj_list); } } }
O0
c
gc_decref: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi addq $0xb8, %rdi callq 0x22390 movq 0x20(%rsp), %rax movq 0xa0(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x98, %rcx cmpq %rcx, %rax je 0x2ad09 movq 0x18(%rsp), %rax addq $-0x8, %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0x34a6e(%rip), %rdx # 0x5f710 callq 0x5f210 movq 0x8(%rsp), %rax movb 0x4(%rax), %cl andb $0xf, %cl orb $0x10, %cl movb %cl, 0x4(%rax) movq 0x8(%rsp), %rax cmpl $0x0, (%rax) jne 0x2acea movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x23c30 movq 0x8(%rsp), %rdi addq $0x8, %rdi movq 0x20(%rsp), %rsi addq $0xb8, %rsi callq 0x23a50 jmp 0x2acec movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x2ac69 addq $0x28, %rsp retq nop
gc_decref: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rdi, [rsp+28h+var_8] add rdi, 0B8h call init_list_head_0 mov rax, [rsp+28h+var_8] mov rax, [rax+0A0h] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax loc_2AC69: mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_8] add rcx, 98h cmp rax, rcx jz loc_2AD09 mov rax, [rsp+28h+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_20] lea rdx, gc_decref_child call mark_children mov rax, [rsp+28h+var_20] mov cl, [rax+4] and cl, 0Fh or cl, 10h mov [rax+4], cl mov rax, [rsp+28h+var_20] cmp dword ptr [rax], 0 jnz short loc_2ACEA mov rdi, [rsp+28h+var_20] add rdi, 8 call list_del_0 mov rdi, [rsp+28h+var_20] add rdi, 8 mov rsi, [rsp+28h+var_8] add rsi, 0B8h call list_add_tail_0 loc_2ACEA: jmp short $+2 loc_2ACEC: mov rax, [rsp+28h+var_18] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax jmp loc_2AC69 loc_2AD09: add rsp, 28h retn
_QWORD * gc_decref(_QWORD *a1) { _QWORD *result; // rax _QWORD *i; // [rsp+10h] [rbp-18h] _QWORD *v3; // [rsp+18h] [rbp-10h] init_list_head_0(a1 + 23); v3 = (_QWORD *)a1[20]; for ( i = (_QWORD *)v3[1]; ; i = (_QWORD *)i[1] ) { result = v3; if ( v3 == a1 + 19 ) break; mark_children(a1, v3 - 1, gc_decref_child); *((_BYTE *)v3 - 4) = *((_BYTE *)v3 - 4) & 0xF | 0x10; if ( !*((_DWORD *)v3 - 2) ) { list_del_0(v3); list_add_tail_0((long long)v3, a1 + 23); } v3 = i; } return result; }
gc_decref: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0xb8 CALL 0x00122390 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_0012ac69: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x98 CMP RAX,RCX JZ 0x0012ad09 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x8 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] LEA RDX,[0x15f710] CALL 0x0015f210 MOV RAX,qword ptr [RSP + 0x8] MOV CL,byte ptr [RAX + 0x4] AND CL,0xf OR CL,0x10 MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x0 JNZ 0x0012acea MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00123c30 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x20] ADD RSI,0xb8 CALL 0x00123a50 LAB_0012acea: JMP 0x0012acec LAB_0012acec: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x0012ac69 LAB_0012ad09: ADD RSP,0x28 RET
void gc_decref(long param_1) { long local_18; long local_10; init_list_head(param_1 + 0xb8); local_10 = *(long *)(param_1 + 0xa0); local_18 = *(long *)(local_10 + 8); while (local_10 != param_1 + 0x98) { mark_children(param_1,(int *)(local_10 + -8),gc_decref_child); *(byte *)(local_10 + -4) = *(byte *)(local_10 + -4) & 0xf | 0x10; if (*(int *)(local_10 + -8) == 0) { list_del(local_10); list_add_tail(local_10,param_1 + 0xb8); } local_10 = local_18; local_18 = *(long *)(local_18 + 8); } return; }
39,694
diag
eloqsql/libmariadb/unittest/mytap/tap.c
void diag(char const *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(tapout, "# "); vfprintf(tapout, fmt, ap); emit_endl(); va_end(ap); }
O3
c
diag: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdi, %rbx leaq -0xe0(%rbp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x14c4e movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leaq -0x30(%rbp), %r14 movq %rdi, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%r14) movq 0x3233e(%rip), %r15 # 0x46fb0 movq (%r15), %rdi leaq 0x1fb05(%rip), %rdx # 0x34781 movl $0x1, %esi xorl %eax, %eax callq 0x13740 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x13150 movq (%r15), %rdi leaq 0x1f913(%rip), %rdx # 0x345b8 movl $0x1, %esi xorl %eax, %eax callq 0x13740 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
diag: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rdi lea rdi, [rbp+var_E0] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_14C4E movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_14C4E: lea r14, [rbp+var_30] mov [r14+10h], rdi lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000008h mov [r14], rax mov r15, cs:stdout_ptr mov rdi, [r15] lea rdx, asc_34781; "# " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk mov rdi, [r15] lea rdx, aExecuteTestWit+28h; "\n" mov esi, 1 xor eax, eax call ___fprintf_chk add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long diag( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-E0h] BYREF long long v17; // [rsp+8h] [rbp-D8h] long long v18; // [rsp+10h] [rbp-D0h] long long v19; // [rsp+18h] [rbp-C8h] long long v20; // [rsp+20h] [rbp-C0h] long long v21; // [rsp+28h] [rbp-B8h] __m128 v22; // [rsp+30h] [rbp-B0h] __m128 v23; // [rsp+40h] [rbp-A0h] __m128 v24; // [rsp+50h] [rbp-90h] __m128 v25; // [rsp+60h] [rbp-80h] __m128 v26; // [rsp+70h] [rbp-70h] __m128 v27; // [rsp+80h] [rbp-60h] __m128 v28; // [rsp+90h] [rbp-50h] __m128 v29; // [rsp+A0h] [rbp-40h] _QWORD v30[6]; // [rsp+B0h] [rbp-30h] BYREF v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v17 = a2; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v30[2] = &v16; v30[1] = &a15; v30[0] = 0x3000000008LL; __fprintf_chk(stdout, 1LL, "# "); __vfprintf_chk(stdout, 1LL, a1, v30); return __fprintf_chk(stdout, 1LL, "\n"); }
diag: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI LEA RDI,[RBP + -0xe0] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x00114c4e MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00114c4e: LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x00146fb0] MOV RDI,qword ptr [R15] LEA RDX,[0x134781] MOV ESI,0x1 XOR EAX,EAX CALL 0x00113740 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x00113150 MOV RDI,qword ptr [R15] LEA RDX,[0x1345b8] MOV ESI,0x1 XOR EAX,EAX CALL 0x00113740 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void diag(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; int1 local_e8 [8]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; puVar1 = PTR_stdout_00146fb0; local_28 = local_e8; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_30 = &stack0x00000008; local_38 = 0x3000000008; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; __fprintf_chk(*(int8 *)PTR_stdout_00146fb0,1,&DAT_00134781); __vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38); __fprintf_chk(*(int8 *)puVar1,1,"\n"); return; }
39,695
Catch::Clara::Opt::validate() const
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
Detail::Result Opt::validate() const { if (m_optNames.empty()) return Detail::Result::logicError("No options supplied to Opt"); for (auto const& name : m_optNames) { if (name.empty()) return Detail::Result::logicError( "Option name cannot be empty"); #ifdef CATCH_PLATFORM_WINDOWS if (name[0] != '-' && name[0] != '/') return Detail::Result::logicError( "Option name must begin with '-' or '/'"); #else if (name[0] != '-') return Detail::Result::logicError( "Option name must begin with '-'"); #endif } return ParserRefImpl::validate(); }
O3
cpp
Catch::Clara::Opt::validate() const: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x60(%rsi), %rax movq 0x68(%rsi), %rcx cmpq %rcx, %rax je 0x5a6a9 cmpq $0x0, 0x8(%rax) je 0x5a6c2 movq (%rax), %rdx cmpb $0x2d, (%rdx) jne 0x5a6db addq $0x20, %rax cmpq %rcx, %rax jne 0x5a663 movl $0x0, 0x8(%rbx) leaq 0xd6047(%rip), %rax # 0x1306d0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rax movq %rax, 0x10(%rbx) movq $0x0, 0x18(%rbx) movb $0x0, 0x20(%rbx) jmp 0x5a741 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x82bf7(%rip), %rsi # 0xdd2b0 leaq 0x82c0a(%rip), %rdx # 0xdd2ca jmp 0x5a6f2 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x82bf9(%rip), %rsi # 0xdd2cb leaq 0x82c0d(%rip), %rdx # 0xdd2e6 jmp 0x5a6f2 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x82bfc(%rip), %rsi # 0xdd2e7 leaq 0x82c14(%rip), %rdx # 0xdd306 movq %rsp, %r14 movq %r14, %rdi callq 0x37312 movl $0x1, 0x8(%rbx) leaq 0xd5fc5(%rip), %rax # 0x1306d0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rax movq %rax, 0x10(%rbx) movq (%r14), %rcx cmpq %r15, %rcx je 0x5a731 movq %rcx, 0x10(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x20(%rbx) jmp 0x5a738 movups (%r15), %xmm0 movups %xmm0, (%rax) movq 0x8(%rsp), %rax movq %rax, 0x18(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
_ZNK5Catch5Clara3Opt8validateEv: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov rax, [rsi+60h] mov rcx, [rsi+68h] cmp rax, rcx jz short loc_5A6A9 loc_5A663: cmp qword ptr [rax+8], 0 jz short loc_5A6C2 mov rdx, [rax] cmp byte ptr [rdx], 2Dh ; '-' jnz short loc_5A6DB add rax, 20h ; ' ' cmp rax, rcx jnz short loc_5A663 mov dword ptr [rbx+8], 0 lea rax, _ZTVN5Catch5Clara6Detail11BasicResultIvEE; `vtable for'Catch::Clara::Detail::BasicResult<void> add rax, 10h mov [rbx], rax lea rax, [rbx+20h] mov [rbx+10h], rax mov qword ptr [rbx+18h], 0 mov byte ptr [rbx+20h], 0 jmp loc_5A741 loc_5A6A9: lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aNoOptionsSuppl; "No options supplied to Opt" lea rdx, aNoOptionsSuppl+1Ah; "" jmp short loc_5A6F2 loc_5A6C2: lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aOptionNameCann; "Option name cannot be empty" lea rdx, aOptionNameCann+1Bh; "" jmp short loc_5A6F2 loc_5A6DB: lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aOptionNameMust; "Option name must begin with '-'" lea rdx, aOptionNameMust+1Fh; "" loc_5A6F2: mov r14, rsp mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov dword ptr [rbx+8], 1 lea rax, _ZTVN5Catch5Clara6Detail11BasicResultIvEE; `vtable for'Catch::Clara::Detail::BasicResult<void> add rax, 10h mov [rbx], rax lea rax, [rbx+20h] mov [rbx+10h], rax mov rcx, [r14] cmp rcx, r15 jz short loc_5A731 mov [rbx+10h], rcx mov rax, [rsp+38h+var_28] mov [rbx+20h], rax jmp short loc_5A738 loc_5A731: movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 loc_5A738: mov rax, [rsp+38h+var_30] mov [rbx+18h], rax loc_5A741: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn
Catch::Clara::Opt * Catch::Clara::Opt::validate(Catch::Clara::Opt *this, long long a2) { long long v2; // rax long long v3; // rcx char *v4; // rsi char *v5; // rdx _QWORD v7[2]; // [rsp+0h] [rbp-38h] BYREF _OWORD v8[2]; // [rsp+10h] [rbp-28h] BYREF v2 = *(_QWORD *)(a2 + 96); v3 = *(_QWORD *)(a2 + 104); if ( v2 == v3 ) { v7[0] = v8; v4 = "No options supplied to Opt"; v5 = ""; } else { while ( 1 ) { if ( !*(_QWORD *)(v2 + 8) ) { v7[0] = v8; v4 = "Option name cannot be empty"; v5 = ""; goto LABEL_9; } if ( **(_BYTE **)v2 != 45 ) break; v2 += 32LL; if ( v2 == v3 ) { *((_DWORD *)this + 2) = 0; *(_QWORD *)this = &`vtable for'Catch::Clara::Detail::BasicResult<void> + 2; *((_QWORD *)this + 2) = (char *)this + 32; *((_QWORD *)this + 3) = 0LL; *((_BYTE *)this + 32) = 0; return this; } } v7[0] = v8; v4 = "Option name must begin with '-'"; v5 = ""; } LABEL_9: std::string::_M_construct<char const*>(v7, v4, (long long)v5); *((_DWORD *)this + 2) = 1; *(_QWORD *)this = &`vtable for'Catch::Clara::Detail::BasicResult<void> + 2; *((_QWORD *)this + 2) = (char *)this + 32; if ( (_OWORD *)v7[0] == v8 ) { *((_OWORD *)this + 2) = v8[0]; } else { *((_QWORD *)this + 2) = v7[0]; *((_QWORD *)this + 4) = *(_QWORD *)&v8[0]; } *((_QWORD *)this + 3) = v7[1]; return this; }
validate: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x60] MOV RCX,qword ptr [RSI + 0x68] CMP RAX,RCX JZ 0x0015a6a9 LAB_0015a663: CMP qword ptr [RAX + 0x8],0x0 JZ 0x0015a6c2 MOV RDX,qword ptr [RAX] CMP byte ptr [RDX],0x2d JNZ 0x0015a6db ADD RAX,0x20 CMP RAX,RCX JNZ 0x0015a663 MOV dword ptr [RBX + 0x8],0x0 LEA RAX,[0x2306d0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RAX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x18],0x0 MOV byte ptr [RBX + 0x20],0x0 JMP 0x0015a741 LAB_0015a6a9: LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x1dd2b0] LEA RDX,[0x1dd2ca] JMP 0x0015a6f2 LAB_0015a6c2: LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x1dd2cb] LEA RDX,[0x1dd2e6] JMP 0x0015a6f2 LAB_0015a6db: LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x1dd2e7] LEA RDX,[0x1dd306] LAB_0015a6f2: MOV R14,RSP MOV RDI,R14 CALL 0x00137312 MOV dword ptr [RBX + 0x8],0x1 LEA RAX,[0x2306d0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RAX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RAX MOV RCX,qword ptr [R14] CMP RCX,R15 JZ 0x0015a731 MOV qword ptr [RBX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x20],RAX JMP 0x0015a738 LAB_0015a731: MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 LAB_0015a738: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x18],RAX LAB_0015a741: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* Catch::Clara::Opt::validate() const */ void Catch::Clara::Opt::validate(void) { int8 *puVar1; char *pcVar2; long in_RSI; char *pcVar3; int8 *in_RDI; int8 *local_38; int8 local_30; int8 local_28; int8 uStack_20; puVar1 = *(int8 **)(in_RSI + 0x60); if (puVar1 == *(int8 **)(in_RSI + 0x68)) { pcVar3 = "No options supplied to Opt"; pcVar2 = ""; LAB_0015a6f2: local_38 = &local_28; std::__cxx11::string::_M_construct<char_const*>(&local_38,pcVar3,pcVar2); *(int4 *)(in_RDI + 1) = 1; *in_RDI = &PTR__BasicResult_002306e0; in_RDI[2] = in_RDI + 4; if (local_38 == &local_28) { in_RDI[4] = local_28; in_RDI[5] = uStack_20; } else { in_RDI[2] = local_38; in_RDI[4] = local_28; } in_RDI[3] = local_30; } else { do { if (puVar1[1] == 0) { pcVar3 = "Option name cannot be empty"; pcVar2 = ""; goto LAB_0015a6f2; } if (*(char *)*puVar1 != '-') { pcVar3 = "Option name must begin with \'-\'"; pcVar2 = ""; goto LAB_0015a6f2; } puVar1 = puVar1 + 4; } while (puVar1 != *(int8 **)(in_RSI + 0x68)); *(int4 *)(in_RDI + 1) = 0; *in_RDI = &PTR__BasicResult_002306e0; in_RDI[2] = in_RDI + 4; in_RDI[3] = 0; *(int1 *)(in_RDI + 4) = 0; } return; }
39,696
ma_dynstr_set
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_set(DYNAMIC_STRING *str, const char *init_str) { uint length; if (init_str && (length= (uint) strlen(init_str)+1) > str->max_length) { str->max_length=((length+str->alloc_increment-1)/str->alloc_increment)* str->alloc_increment; if (!str->max_length) str->max_length=str->alloc_increment; if (!(str->str=(char*) realloc(str->str,str->max_length))) return(TRUE); } if (init_str) { str->length=length-1; memcpy(str->str,init_str,length); } else str->length=0; return(FALSE); }
O3
c
ma_dynstr_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %r14 testq %rsi, %rsi je 0x24e7a movq %rsi, %rbx movq %rsi, %rdi callq 0x131c0 movq %rax, %r12 leal 0x1(%rax), %r15d movq (%r14), %rdi cmpq %r15, 0x10(%r14) jae 0x24e66 movq 0x18(%r14), %rcx leaq (%rcx,%r15), %rsi decq %rsi movq %rsi, %rax xorl %edx, %edx divq %rcx subq %rdx, %rsi cmoveq %rcx, %rsi movq %rsi, 0x10(%r14) callq 0x13730 movq %rax, %rdi movq %rax, (%r14) testq %rax, %rax je 0x24e8d movl %r12d, %eax movq %rax, 0x8(%r14) movq %rbx, %rsi movq %r15, %rdx callq 0x13390 jmp 0x24e82 movq $0x0, 0x8(%r14) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, %al jmp 0x24e84
ma_dynstr_set: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdi test rsi, rsi jz short loc_24E7A mov rbx, rsi mov rdi, rsi call _strlen mov r12, rax lea r15d, [rax+1] mov rdi, [r14] cmp [r14+10h], r15 jnb short loc_24E66 mov rcx, [r14+18h] lea rsi, [rcx+r15] dec rsi mov rax, rsi xor edx, edx div rcx sub rsi, rdx cmovz rsi, rcx mov [r14+10h], rsi call _realloc mov rdi, rax mov [r14], rax test rax, rax jz short loc_24E8D loc_24E66: mov eax, r12d mov [r14+8], rax mov rsi, rbx mov rdx, r15 call _memcpy jmp short loc_24E82 loc_24E7A: mov qword ptr [r14+8], 0 loc_24E82: xor eax, eax loc_24E84: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_24E8D: mov al, 1 jmp short loc_24E84
long long ma_dynstr_set(long long *a1, long long a2) { unsigned int v4; // r12d unsigned long long v5; // r15 long long v6; // rdi unsigned long long v7; // rsi if ( !a2 ) { a1[1] = 0LL; return 0LL; } v4 = strlen(a2); v5 = v4 + 1; v6 = *a1; if ( a1[2] >= v5 ) goto LABEL_6; v7 = a1[3] + v5 - 1 - (a1[3] + v5 - 1) % a1[3]; if ( !v7 ) v7 = a1[3]; a1[2] = v7; v6 = realloc(v6, v7); *a1 = v6; if ( v6 ) { LABEL_6: a1[1] = v4; memcpy(v6, a2, v5); return 0LL; } return 1LL; }
ma_dynstr_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDI TEST RSI,RSI JZ 0x00124e7a MOV RBX,RSI MOV RDI,RSI CALL 0x001131c0 MOV R12,RAX LEA R15D,[RAX + 0x1] MOV RDI,qword ptr [R14] CMP qword ptr [R14 + 0x10],R15 JNC 0x00124e66 MOV RCX,qword ptr [R14 + 0x18] LEA RSI,[RCX + R15*0x1] DEC RSI MOV RAX,RSI XOR EDX,EDX DIV RCX SUB RSI,RDX CMOVZ RSI,RCX MOV qword ptr [R14 + 0x10],RSI CALL 0x00113730 MOV RDI,RAX MOV qword ptr [R14],RAX TEST RAX,RAX JZ 0x00124e8d LAB_00124e66: MOV EAX,R12D MOV qword ptr [R14 + 0x8],RAX MOV RSI,RBX MOV RDX,R15 CALL 0x00113390 JMP 0x00124e82 LAB_00124e7a: MOV qword ptr [R14 + 0x8],0x0 LAB_00124e82: XOR EAX,EAX LAB_00124e84: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00124e8d: MOV AL,0x1 JMP 0x00124e84
int8 ma_dynstr_set(int8 *param_1,char *param_2) { ulong uVar1; size_t sVar2; void *__ptr; ulong uVar3; size_t __size; ulong __n; if (param_2 == (char *)0x0) { param_1[1] = 0; } else { sVar2 = strlen(param_2); __n = (ulong)((int)sVar2 + 1); __ptr = (void *)*param_1; if ((ulong)param_1[2] < __n) { uVar1 = param_1[3]; uVar3 = (uVar1 + __n) - 1; __size = uVar3 - uVar3 % uVar1; if (__size == 0) { __size = uVar1; } param_1[2] = __size; __ptr = realloc(__ptr,__size); *param_1 = __ptr; if (__ptr == (void *)0x0) { return 1; } } param_1[1] = sVar2 & 0xffffffff; memcpy(__ptr,param_2,__n); } return 0; }
39,697
find_end
corpus-core[P]colibri-stateless/src/util/json_validate.c
static const char* find_end(const char* pos, char start, char end) { int level = 1; for (; *pos; pos++) { if (*pos == start) level++; else if (*pos == end) { level--; if (!level) return pos; } } return NULL; }
O0
c
find_end: pushq %rbp movq %rsp, %rbp movb %dl, %al movb %sil, %cl movq %rdi, -0x10(%rbp) movb %cl, -0x11(%rbp) movb %al, -0x12(%rbp) movl $0x1, -0x18(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x21fc9 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x11(%rbp), %ecx cmpl %ecx, %eax jne 0x21f8d movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x21fb9 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x12(%rbp), %ecx cmpl %ecx, %eax jne 0x21fb7 movl -0x18(%rbp), %eax addl $-0x1, %eax movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x21fb5 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x21fd1 jmp 0x21fb7 jmp 0x21fb9 jmp 0x21fbb movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x21f6a movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
find_end_0: push rbp mov rbp, rsp mov al, dl mov cl, sil mov [rbp+var_10], rdi mov [rbp+var_11], cl mov [rbp+var_12], al mov [rbp+var_18], 1 loc_21F6A: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_21FC9 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_11] cmp eax, ecx jnz short loc_21F8D mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_21FB9 loc_21F8D: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_12] cmp eax, ecx jnz short loc_21FB7 mov eax, [rbp+var_18] add eax, 0FFFFFFFFh mov [rbp+var_18], eax cmp [rbp+var_18], 0 jnz short loc_21FB5 mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_21FD1 loc_21FB5: jmp short $+2 loc_21FB7: jmp short $+2 loc_21FB9: jmp short $+2 loc_21FBB: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_21F6A loc_21FC9: mov [rbp+var_8], 0 loc_21FD1: mov rax, [rbp+var_8] pop rbp retn
_BYTE * find_end_0(_BYTE *a1, char a2, char a3) { int v4; // [rsp+0h] [rbp-18h] v4 = 1; while ( *a1 ) { if ( (char)*a1 == a2 ) { ++v4; } else if ( (char)*a1 == a3 && !--v4 ) { return a1; } ++a1; } return 0LL; }
find_end: PUSH RBP MOV RBP,RSP MOV AL,DL MOV CL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],CL MOV byte ptr [RBP + -0x12],AL MOV dword ptr [RBP + -0x18],0x1 LAB_00121f6a: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x00121fc9 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x11] CMP EAX,ECX JNZ 0x00121f8d MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x00121fb9 LAB_00121f8d: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x12] CMP EAX,ECX JNZ 0x00121fb7 MOV EAX,dword ptr [RBP + -0x18] ADD EAX,-0x1 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x00121fb5 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00121fd1 LAB_00121fb5: JMP 0x00121fb7 LAB_00121fb7: JMP 0x00121fb9 LAB_00121fb9: JMP 0x00121fbb LAB_00121fbb: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00121f6a LAB_00121fc9: MOV qword ptr [RBP + -0x8],0x0 LAB_00121fd1: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * find_end(char *param_1,char param_2,char param_3) { int local_20; char *local_18; local_20 = 1; local_18 = param_1; do { if (*local_18 == '\0') { return (char *)0x0; } if (*local_18 == param_2) { local_20 = local_20 + 1; } else if ((*local_18 == param_3) && (local_20 = local_20 + -1, local_20 == 0)) { return local_18; } local_18 = local_18 + 1; } while( true ); }
39,698
_JS_FindAtom
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len, int atom_type) { uint32_t h, h1, i; JSAtomStruct *p; h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING); h &= JS_ATOM_HASH_MASK; h1 = h & (rt->atom_hash_size - 1); i = rt->atom_hash[h1]; while (i != 0) { p = rt->atom_array[i]; if (p->hash == h && p->atom_type == JS_ATOM_TYPE_STRING && p->len == len && p->is_wide_char == 0 && memcmp(p->u.str8, str, len) == 0) { if (!__JS_AtomIsConst(i)) p->header.ref_count++; return i; } i = p->hash_next; } return JS_ATOM_NULL; }
O0
c
_JS_FindAtom: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movl %ecx, 0x14(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movl $0x1, %edx callq 0x5c9d0 movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax movq 0x28(%rsp), %rcx movl 0x50(%rcx), %ecx subl $0x1, %ecx andl %ecx, %eax movl %eax, 0xc(%rsp) movq 0x28(%rsp), %rax movq 0x60(%rax), %rax movl 0xc(%rsp), %ecx movl (%rax,%rcx,4), %eax movl %eax, 0x8(%rsp) cmpl $0x0, 0x8(%rsp) je 0x28253 movq 0x28(%rsp), %rax movq 0x68(%rax), %rax movl 0x8(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, (%rsp) movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x20, %rax andq $0x3fffffff, %rax # imm = 0x3FFFFFFF cmpl 0x10(%rsp), %eax jne 0x28243 movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movzbl %al, %eax cmpl $0x1, %eax jne 0x28243 movq (%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %eax cmpq 0x18(%rsp), %rax jne 0x28243 movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax movzbl %al, %eax cmpl $0x0, %eax jne 0x28243 movq (%rsp), %rdi addq $0x18, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xe480 cmpl $0x0, %eax jne 0x28243 movl 0x8(%rsp), %edi callq 0x28000 cmpl $0x0, %eax jne 0x28239 movq (%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl 0x8(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0x2825b movq (%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x8(%rsp) jmp 0x28185 movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
__JS_FindAtom: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov [rsp+38h+var_24], ecx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_20] mov edx, 1 call hash_string8 mov [rsp+38h+var_28], eax mov eax, [rsp+38h+var_28] and eax, 3FFFFFFFh mov [rsp+38h+var_28], eax mov eax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_10] mov ecx, [rcx+50h] sub ecx, 1 and eax, ecx mov [rsp+38h+var_2C], eax mov rax, [rsp+38h+var_10] mov rax, [rax+60h] mov ecx, [rsp+38h+var_2C] mov eax, [rax+rcx*4] mov [rsp+38h+var_30], eax loc_28185: cmp [rsp+38h+var_30], 0 jz loc_28253 mov rax, [rsp+38h+var_10] mov rax, [rax+68h] mov ecx, [rsp+38h+var_30] mov rax, [rax+rcx*8] mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 20h and rax, 3FFFFFFFh cmp eax, [rsp+38h+var_28] jnz loc_28243 mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 3Eh movzx eax, al cmp eax, 1 jnz short loc_28243 mov rax, [rsp+38h+var_38] mov rax, [rax+4] and rax, 7FFFFFFFh mov eax, eax cmp rax, [rsp+38h+var_20] jnz short loc_28243 mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 1Fh and rax, 1 movzx eax, al cmp eax, 0 jnz short loc_28243 mov rdi, [rsp+38h+var_38] add rdi, 18h mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] call _memcmp cmp eax, 0 jnz short loc_28243 mov edi, [rsp+38h+var_30] call __JS_AtomIsConst cmp eax, 0 jnz short loc_28239 mov rax, [rsp+38h+var_38] mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_28239: mov eax, [rsp+38h+var_30] mov [rsp+38h+var_4], eax jmp short loc_2825B loc_28243: mov rax, [rsp+38h+var_38] mov eax, [rax+0Ch] mov [rsp+38h+var_30], eax jmp loc_28185 loc_28253: mov [rsp+38h+var_4], 0 loc_2825B: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long _JS_FindAtom(long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-38h] unsigned int i; // [rsp+8h] [rbp-30h] unsigned int v6; // [rsp+10h] [rbp-28h] v6 = hash_string8(a2, a3, 1LL) & 0x3FFFFFFF; for ( i = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * ((*(_DWORD *)(a1 + 80) - 1) & v6)); ; i = *(_DWORD *)(v4 + 12) ) { if ( !i ) return 0; v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * i); if ( (HIDWORD(*(_QWORD *)(v4 + 4)) & 0x3FFFFFFF) == v6 && *(_QWORD *)(v4 + 4) >> 62 == 1 && (*(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL) == a3 && (*(_QWORD *)(v4 + 4) & 0x80000000LL) == 0 && !(unsigned int)memcmp(v4 + 24, a2, a3) ) { break; } } if ( !_JS_AtomIsConst(i) ) ++*(_DWORD *)v4; return i; }
__JS_FindAtom: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x14],ECX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x1 CALL 0x0015c9d0 MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x10] AND EAX,0x3fffffff MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RCX + 0x50] SUB ECX,0x1 AND EAX,ECX MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x8],EAX LAB_00128185: CMP dword ptr [RSP + 0x8],0x0 JZ 0x00128253 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x20 AND RAX,0x3fffffff CMP EAX,dword ptr [RSP + 0x10] JNZ 0x00128243 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOVZX EAX,AL CMP EAX,0x1 JNZ 0x00128243 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV EAX,EAX CMP RAX,qword ptr [RSP + 0x18] JNZ 0x00128243 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 MOVZX EAX,AL CMP EAX,0x0 JNZ 0x00128243 MOV RDI,qword ptr [RSP] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0010e480 CMP EAX,0x0 JNZ 0x00128243 MOV EDI,dword ptr [RSP + 0x8] CALL 0x00128000 CMP EAX,0x0 JNZ 0x00128239 MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00128239: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x34],EAX JMP 0x0012825b LAB_00128243: MOV RAX,qword ptr [RSP] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + 0x8],EAX JMP 0x00128185 LAB_00128253: MOV dword ptr [RSP + 0x34],0x0 LAB_0012825b: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3) { int *piVar1; uint uVar2; int iVar3; uint local_30; uVar2 = hash_string8(param_2,param_3,1); local_30 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)(uVar2 & 0x3fffffff & *(int *)(param_1 + 0x50) - 1U) * 4); while( true ) { if (local_30 == 0) { return 0; } piVar1 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)local_30 * 8); if ((((((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x20) & 0x3fffffff) == (uVar2 & 0x3fffffff) ) && ((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x3e) == 1)) && (((uint)*(int8 *)(piVar1 + 1) & 0x7fffffff) == param_3)) && (((*(ulong *)(piVar1 + 1) >> 0x1f & 1) == 0 && (iVar3 = memcmp(piVar1 + 6,param_2,param_3), iVar3 == 0)))) break; local_30 = piVar1[3]; } iVar3 = __JS_AtomIsConst(local_30); if (iVar3 == 0) { *piVar1 = *piVar1 + 1; } return local_30; }
39,699
_JS_FindAtom
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len, int atom_type) { uint32_t h, h1, i; JSAtomStruct *p; h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING); h &= JS_ATOM_HASH_MASK; h1 = h & (rt->atom_hash_size - 1); i = rt->atom_hash[h1]; while (i != 0) { p = rt->atom_array[i]; if (p->hash == h && p->atom_type == JS_ATOM_TYPE_STRING && p->len == len && p->is_wide_char == 0 && memcmp(p->u.str8, str, len) == 0) { if (!__JS_AtomIsConst(i)) p->header.ref_count++; return i; } i = p->hash_next; } return JS_ATOM_NULL; }
O1
c
_JS_FindAtom: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x1, %r15d testq %rdx, %rdx je 0x1fe6c xorl %eax, %eax imull $0x107, %r15d, %ecx # imm = 0x107 movzbl (%r14,%rax), %r15d addl %ecx, %r15d incq %rax cmpq %rax, %rbx jne 0x1fe4e andl $0x3fffffff, %r15d # imm = 0x3FFFFFFF movl 0x50(%rdi), %eax decl %eax andl %r15d, %eax movq 0x60(%rdi), %rcx movl (%rcx,%rax,4), %ebp testl %ebp, %ebp je 0x1fee6 movq 0x68(%rdi), %r12 movl %ebp, %eax movq (%r12,%rax,8), %r13 movq 0x4(%r13), %rax testl %eax, %eax js 0x1fede movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rbx, %rcx jne 0x1fede movq %rax, %rcx movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000 andq %rdx, %rcx movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000 cmpq %rdx, %rcx jne 0x1fede shrq $0x20, %rax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF cmpl %r15d, %eax jne 0x1fede leaq 0x18(%r13), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xe6a0 testl %eax, %eax je 0x1fef9 movl 0xc(%r13), %ebp testl %ebp, %ebp jne 0x1fe83 xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0xe0, %ebp jl 0x1fee8 incl (%r13) jmp 0x1fee8
__JS_FindAtom: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15d, 1 test rdx, rdx jz short loc_1FE6C xor eax, eax loc_1FE4E: imul ecx, r15d, 107h movzx r15d, byte ptr [r14+rax] add r15d, ecx inc rax cmp rbx, rax jnz short loc_1FE4E and r15d, 3FFFFFFFh loc_1FE6C: mov eax, [rdi+50h] dec eax and eax, r15d mov rcx, [rdi+60h] mov ebp, [rcx+rax*4] test ebp, ebp jz short loc_1FEE6 mov r12, [rdi+68h] loc_1FE83: mov eax, ebp mov r13, [r12+rax*8] mov rax, [r13+4] test eax, eax js short loc_1FEDE mov ecx, eax and ecx, 7FFFFFFFh cmp rcx, rbx jnz short loc_1FEDE mov rcx, rax mov rdx, 0C000000000000000h and rcx, rdx mov rdx, 4000000000000000h cmp rcx, rdx jnz short loc_1FEDE shr rax, 20h and eax, 3FFFFFFFh cmp eax, r15d jnz short loc_1FEDE lea rdi, [r13+18h] mov rsi, r14 mov rdx, rbx call _bcmp test eax, eax jz short loc_1FEF9 loc_1FEDE: mov ebp, [r13+0Ch] test ebp, ebp jnz short loc_1FE83 loc_1FEE6: xor ebp, ebp loc_1FEE8: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1FEF9: cmp ebp, 0E0h jl short loc_1FEE8 inc dword ptr [r13+0] jmp short loc_1FEE8
long long _JS_FindAtom(long long a1, long long a2, long long a3) { int v4; // r15d long long i; // rax int v6; // ebp long long v7; // r12 long long v8; // r13 long long v9; // rax v4 = 1; if ( a3 ) { for ( i = 0LL; i != a3; ++i ) v4 = 263 * v4 + *(unsigned __int8 *)(a2 + i); v4 &= 0x3FFFFFFFu; } v6 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1))); if ( v6 ) { v7 = *(_QWORD *)(a1 + 104); while ( 1 ) { v8 = *(_QWORD *)(v7 + 8LL * (unsigned int)v6); v9 = *(_QWORD *)(v8 + 4); if ( (int)v9 >= 0 && (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3 && (v9 & 0xC000000000000000LL) == 0x4000000000000000LL && (HIDWORD(v9) & 0x3FFFFFFF) == v4 && !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) ) { break; } v6 = *(_DWORD *)(v8 + 12); if ( !v6 ) return 0; } if ( v6 >= 224 ) ++*(_DWORD *)v8; } else { return 0; } return (unsigned int)v6; }
__JS_FindAtom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15D,0x1 TEST RDX,RDX JZ 0x0011fe6c XOR EAX,EAX LAB_0011fe4e: IMUL ECX,R15D,0x107 MOVZX R15D,byte ptr [R14 + RAX*0x1] ADD R15D,ECX INC RAX CMP RBX,RAX JNZ 0x0011fe4e AND R15D,0x3fffffff LAB_0011fe6c: MOV EAX,dword ptr [RDI + 0x50] DEC EAX AND EAX,R15D MOV RCX,qword ptr [RDI + 0x60] MOV EBP,dword ptr [RCX + RAX*0x4] TEST EBP,EBP JZ 0x0011fee6 MOV R12,qword ptr [RDI + 0x68] LAB_0011fe83: MOV EAX,EBP MOV R13,qword ptr [R12 + RAX*0x8] MOV RAX,qword ptr [R13 + 0x4] TEST EAX,EAX JS 0x0011fede MOV ECX,EAX AND ECX,0x7fffffff CMP RCX,RBX JNZ 0x0011fede MOV RCX,RAX MOV RDX,-0x4000000000000000 AND RCX,RDX MOV RDX,0x4000000000000000 CMP RCX,RDX JNZ 0x0011fede SHR RAX,0x20 AND EAX,0x3fffffff CMP EAX,R15D JNZ 0x0011fede LEA RDI,[R13 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0010e6a0 TEST EAX,EAX JZ 0x0011fef9 LAB_0011fede: MOV EBP,dword ptr [R13 + 0xc] TEST EBP,EBP JNZ 0x0011fe83 LAB_0011fee6: XOR EBP,EBP LAB_0011fee8: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011fef9: CMP EBP,0xe0 JL 0x0011fee8 INC dword ptr [R13] JMP 0x0011fee8
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3) { long lVar1; int *piVar2; ulong uVar3; int iVar4; size_t sVar5; uint uVar6; uint uVar7; uVar7 = 1; if (param_3 != 0) { sVar5 = 0; do { uVar7 = (uint)*(byte *)((long)param_2 + sVar5) + uVar7 * 0x107; sVar5 = sVar5 + 1; } while (param_3 != sVar5); uVar7 = uVar7 & 0x3fffffff; } uVar6 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)(*(int *)(param_1 + 0x50) - 1U & uVar7) * 4); if (uVar6 != 0) { lVar1 = *(long *)(param_1 + 0x68); do { piVar2 = *(int **)(lVar1 + (ulong)uVar6 * 8); uVar3 = *(ulong *)(piVar2 + 1); if ((((-1 < (int)(uint)uVar3) && (((uint)uVar3 & 0x7fffffff) == param_3)) && ((uVar3 & 0xc000000000000000) == 0x4000000000000000)) && ((((uint)(uVar3 >> 0x20) & 0x3fffffff) == uVar7 && (iVar4 = bcmp(piVar2 + 6,param_2,param_3), iVar4 == 0)))) { if ((int)uVar6 < 0xe0) { return uVar6; } *piVar2 = *piVar2 + 1; return uVar6; } uVar6 = piVar2[3]; } while (uVar6 != 0); } return 0; }