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
47,900
js_for_of_start
bluesky950520[P]quickjs/quickjs.c
static __exception int js_for_of_start(JSContext *ctx, JSValue *sp, BOOL is_async) { JSValue op1, obj, method; op1 = sp[-1]; obj = JS_GetIterator(ctx, op1, is_async); if (JS_IsException(obj)) return -1; JS_FreeValue(ctx, op1); sp[-1] = obj; method = JS_GetProperty(ctx, obj, JS_ATOM_next); if (JS_IsException(method)) return -1; sp[0] = method; return 0; }
O1
c
js_for_of_start: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ecx movq %rsi, %rbx movq %rdi, %r14 movq -0x10(%rsi), %r13 movq -0x8(%rsi), %rbp movq %r13, %rsi movq %rbp, %rdx callq 0x4180b movq %rdx, %r12 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x6, %r12d je 0x3fa98 movq %rax, %r15 movq 0x18(%r14), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1d8c6 movq %r15, -0x10(%rbx) movq %r12, -0x8(%rbx) movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6b, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF addq $0x10, %rsp cmpl $0x6, %edx je 0x3fa98 movq %rax, (%rbx) movq %rdx, 0x8(%rbx) xorl %ecx, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_for_of_start: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ecx, edx mov rbx, rsi mov r14, rdi mov r13, [rsi-10h] mov rbp, [rsi-8] mov rsi, r13 mov rdx, rbp call JS_GetIterator mov r12, rdx mov ecx, 0FFFFFFFFh cmp r12d, 6 jz short loc_3FA98 mov r15, rax mov rdi, [r14+18h] mov rsi, r13 mov rdx, rbp call JS_FreeValueRT mov [rbx-10h], r15 mov [rbx-8], r12 mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 6Bh ; 'k' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 mov ecx, 0FFFFFFFFh add rsp, 10h cmp edx, 6 jz short loc_3FA98 mov [rbx], rax mov [rbx+8], rdx xor ecx, ecx loc_3FA98: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_for_of_start(long long a1, unsigned long long *a2, unsigned int a3) { _DWORD *v3; // r13 long long v4; // rbp long long Iterator; // rax long long v6; // rdx long long v7; // r12 unsigned int v8; // ecx long long v9; // r15 unsigned long long PropertyInternal2; // rax unsigned long long v11; // rdx v3 = (_DWORD *)*(a2 - 2); v4 = *(a2 - 1); Iterator = JS_GetIterator(a1, v3, v4, a3); v7 = v6; v8 = -1; if ( (_DWORD)v6 != 6 ) { v9 = Iterator; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v3, v4); *(a2 - 2) = v9; *(a2 - 1) = v7; PropertyInternal2 = JS_GetPropertyInternal2(a1, v9, v7, 0x6Bu, v9, v7, 0LL, 0); v8 = -1; if ( (_DWORD)v11 != 6 ) { *a2 = PropertyInternal2; a2[1] = v11; return 0; } } return v8; }
47,901
js_for_of_start
bluesky950520[P]quickjs/quickjs.c
static __exception int js_for_of_start(JSContext *ctx, JSValue *sp, BOOL is_async) { JSValue op1, obj, method; op1 = sp[-1]; obj = JS_GetIterator(ctx, op1, is_async); if (JS_IsException(obj)) return -1; JS_FreeValue(ctx, op1); sp[-1] = obj; method = JS_GetProperty(ctx, obj, JS_ATOM_next); if (JS_IsException(method)) return -1; sp[0] = method; return 0; }
O2
c
js_for_of_start: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ecx movq %rsi, %rbx movq %rdi, %r14 movq -0x10(%rsi), %r15 movq -0x8(%rsi), %r12 movq %r15, %rsi movq %r12, %rdx callq 0x39687 movq %rdx, %rbp pushq $-0x1 popq %rcx cmpl $0x6, %ebp je 0x37d30 movq %rax, %r13 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl %ecx, %r15d callq 0x1801e movq %r13, -0x10(%rbx) movq %rbp, -0x8(%rbx) pushq $0x6b popq %rcx movq %r14, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1b043 movl %r15d, %ecx cmpl $0x6, %edx je 0x37d30 movq %rax, (%rbx) movq %rdx, 0x8(%rbx) xorl %ecx, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_for_of_start: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ecx, edx mov rbx, rsi mov r14, rdi mov r15, [rsi-10h] mov r12, [rsi-8] mov rsi, r15 mov rdx, r12 call JS_GetIterator mov rbp, rdx push 0FFFFFFFFFFFFFFFFh pop rcx cmp ebp, 6 jz short loc_37D30 mov r13, rax mov rdi, r14 mov rsi, r15 mov rdx, r12 mov r15d, ecx call JS_FreeValue mov [rbx-10h], r13 mov [rbx-8], rbp push 6Bh ; 'k' pop rcx mov rdi, r14 mov rsi, r13 mov rdx, rbp call JS_GetProperty mov ecx, r15d cmp edx, 6 jz short loc_37D30 mov [rbx], rax mov [rbx+8], rdx xor ecx, ecx loc_37D30: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_for_of_start(long long a1, long long *a2, unsigned int a3) { long long v3; // r15 long long v4; // r12 long long Iterator; // rax long long v6; // rdx long long v7; // rbp unsigned int v8; // ecx long long v9; // r13 long long Property; // rax long long v11; // rdx v3 = *(a2 - 2); v4 = *(a2 - 1); Iterator = JS_GetIterator(a1, v3, v4, a3); v7 = v6; v8 = -1; if ( (_DWORD)v6 != 6 ) { v9 = Iterator; JS_FreeValue(a1, v3, v4); *(a2 - 2) = v9; *(a2 - 1) = v7; Property = JS_GetProperty(a1, v9, v7, 107); v8 = -1; if ( (_DWORD)v11 != 6 ) { *a2 = Property; a2[1] = v11; return 0; } } return v8; }
js_for_of_start: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV ECX,EDX MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RSI + -0x10] MOV R12,qword ptr [RSI + -0x8] MOV RSI,R15 MOV RDX,R12 CALL 0x00139687 MOV RBP,RDX PUSH -0x1 POP RCX CMP EBP,0x6 JZ 0x00137d30 MOV R13,RAX MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV R15D,ECX CALL 0x0011801e MOV qword ptr [RBX + -0x10],R13 MOV qword ptr [RBX + -0x8],RBP PUSH 0x6b POP RCX MOV RDI,R14 MOV RSI,R13 MOV RDX,RBP CALL 0x0011b043 MOV ECX,R15D CMP EDX,0x6 JZ 0x00137d30 MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RDX XOR ECX,ECX LAB_00137d30: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 js_for_of_start(int8 param_1,int1 (*param_2) [16],int4 param_3) { int8 uVar1; int8 uVar2; int4 uVar3; int1 auVar4 [16]; uVar1 = *(int8 *)param_2[-1]; uVar2 = *(int8 *)(param_2[-1] + 8); auVar4 = JS_GetIterator(param_1,uVar1,uVar2,param_3); uVar3 = 0xffffffff; if (auVar4._8_4_ != 6) { uVar3 = 0xffffffff; JS_FreeValue(param_1,uVar1,uVar2); param_2[-1] = auVar4; auVar4 = JS_GetProperty(param_1,auVar4._0_8_,auVar4._8_8_,0x6b); if (auVar4._8_4_ != 6) { *param_2 = auVar4; uVar3 = 0; } } return uVar3; }
47,902
js_for_of_start
bluesky950520[P]quickjs/quickjs.c
static __exception int js_for_of_start(JSContext *ctx, JSValue *sp, BOOL is_async) { JSValue op1, obj, method; op1 = sp[-1]; obj = JS_GetIterator(ctx, op1, is_async); if (JS_IsException(obj)) return -1; JS_FreeValue(ctx, op1); sp[-1] = obj; method = JS_GetProperty(ctx, obj, JS_ATOM_next); if (JS_IsException(method)) return -1; sp[0] = method; return 0; }
O3
c
js_for_of_start: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ecx movq %rsi, %rbx movq %rdi, %r14 movq -0x10(%rsi), %r13 movq -0x8(%rsi), %rbp movq %r13, %rsi movq %rbp, %rdx callq 0x43211 movq %rdx, %r12 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x6, %r12d je 0x412f0 movq %rax, %r15 cmpl $-0x9, %ebp jb 0x412b4 movq 0x18(%r14), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x412b4 movq %r13, %rsi movq %rbp, %rdx callq 0x219cc movq %r15, -0x10(%rbx) movq %r12, -0x8(%rbx) movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6b, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x2384b addq $0x10, %rsp cmpl $0x6, %edx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF je 0x412f0 movq %rax, (%rbx) movq %rdx, 0x8(%rbx) xorl %ecx, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_for_of_start: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ecx, edx mov rbx, rsi mov r14, rdi mov r13, [rsi-10h] mov rbp, [rsi-8] mov rsi, r13 mov rdx, rbp call JS_GetIterator mov r12, rdx mov ecx, 0FFFFFFFFh cmp r12d, 6 jz short loc_412F0 mov r15, rax cmp ebp, 0FFFFFFF7h jb short loc_412B4 mov rdi, [r14+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_412B4 mov rsi, r13 mov rdx, rbp call js_free_value_rt loc_412B4: mov [rbx-10h], r15 mov [rbx-8], r12 mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 6Bh ; 'k' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h cmp edx, 6 mov ecx, 0FFFFFFFFh jz short loc_412F0 mov [rbx], rax mov [rbx+8], rdx xor ecx, ecx loc_412F0: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_for_of_start(long long a1, unsigned long long *a2, unsigned int a3) { _QWORD *v4; // r13 long long v5; // rbp long long Iterator; // rax long long v7; // rdx long long v8; // r12 unsigned int v9; // ecx long long v10; // r15 long long v11; // rdi int v12; // eax unsigned long long PropertyInternal2; // rax unsigned long long v14; // rdx v4 = (_QWORD *)*(a2 - 2); v5 = *(a2 - 1); Iterator = JS_GetIterator(a1, v4, v5, a3); v8 = v7; v9 = -1; if ( (_DWORD)v7 != 6 ) { v10 = Iterator; if ( (unsigned int)v5 >= 0xFFFFFFF7 ) { v11 = *(_QWORD *)(a1 + 24); v12 = (*(_DWORD *)v4)--; if ( v12 <= 1 ) js_free_value_rt(v11, v4, v5); } *(a2 - 2) = v10; *(a2 - 1) = v8; PropertyInternal2 = JS_GetPropertyInternal2(a1, v10, v8, 0x6Bu, v10, v8, 0LL, 0); v9 = -1; if ( (_DWORD)v14 != 6 ) { *a2 = PropertyInternal2; a2[1] = v14; return 0; } } return v9; }
js_for_of_start: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV ECX,EDX MOV RBX,RSI MOV R14,RDI MOV R13,qword ptr [RSI + -0x10] MOV RBP,qword ptr [RSI + -0x8] MOV RSI,R13 MOV RDX,RBP CALL 0x00143211 MOV R12,RDX MOV ECX,0xffffffff CMP R12D,0x6 JZ 0x001412f0 MOV R15,RAX CMP EBP,-0x9 JC 0x001412b4 MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x001412b4 MOV RSI,R13 MOV RDX,RBP CALL 0x001219cc LAB_001412b4: MOV qword ptr [RBX + -0x10],R15 MOV qword ptr [RBX + -0x8],R12 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6b MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x0012384b ADD RSP,0x10 CMP EDX,0x6 MOV ECX,0xffffffff JZ 0x001412f0 MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RDX XOR ECX,ECX LAB_001412f0: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 js_for_of_start(long param_1,int1 (*param_2) [16],int4 param_3) { int iVar1; int *piVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; piVar2 = *(int **)param_2[-1]; uVar3 = *(int8 *)(param_2[-1] + 8); auVar5 = JS_GetIterator(param_1,piVar2,uVar3,param_3); uVar4 = 0xffffffff; if (auVar5._8_4_ != 6) { if (0xfffffff6 < (uint)uVar3) { uVar4 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar4,piVar2,uVar3); } } param_2[-1] = auVar5; auVar5 = JS_GetPropertyInternal2 (param_1,auVar5._0_8_,auVar5._8_8_,0x6b,auVar5._0_8_,auVar5._8_8_,0,0); uVar4 = 0xffffffff; if (auVar5._8_4_ != 6) { *param_2 = auVar5; uVar4 = 0; } } return uVar4; }
47,903
llama_sampler_top_p_apply(llama_sampler*, llama_token_data_array*)
monkey531[P]llama/src/llama-sampling.cpp
static void llama_sampler_top_p_apply(struct llama_sampler * smpl, llama_token_data_array * cur_p) { const auto * ctx = (llama_sampler_top_p *) smpl->ctx; if (ctx->p >= 1.0f) { return; } llama_sampler_softmax_impl(cur_p); // Compute the cumulative probabilities float cum_sum = 0.0f; size_t last_idx = cur_p->size; for (size_t i = 0; i < cur_p->size; ++i) { cum_sum += cur_p->data[i].p; // Check if the running sum is at least p or if we have kept at least min_keep tokens // we set the last index to i+1 to indicate that the current iterate should be included in the set if (cum_sum >= ctx->p && i + 1 >= ctx->min_keep) { last_idx = i + 1; break; } } // Resize the output vector to keep only the top-p tokens cur_p->size = last_idx; }
O3
cpp
llama_sampler_top_p_apply(llama_sampler*, llama_token_data_array*): pushq %r14 pushq %rbx pushq %rax movq 0x8(%rdi), %r14 movss (%r14), %xmm0 ucomiss 0x32114(%rip), %xmm0 # 0x110000 jae 0xddf4a movq %rsi, %rbx movq %rsi, %rdi callq 0xdce07 movq 0x8(%rbx), %rax testq %rax, %rax je 0xddf44 movq (%rbx), %rdx movss (%r14), %xmm0 movq %rax, %rsi negq %rsi addq $0x8, %rdx xorps %xmm1, %xmm1 movl $0x1, %ecx addss (%rdx), %xmm1 ucomiss %xmm0, %xmm1 jb 0xddf2b cmpq 0x8(%r14), %rcx jae 0xddf46 leaq (%rsi,%rcx), %rdi incq %rdi incq %rcx addq $0xc, %rdx cmpq $0x1, %rdi jne 0xddf1c movq %rax, %rcx jmp 0xddf46 xorl %ecx, %ecx movq %rcx, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZL25llama_sampler_top_p_applyP13llama_samplerP22llama_token_data_array: push r14 push rbx push rax mov r14, [rdi+8] movss xmm0, dword ptr [r14] ucomiss xmm0, cs:dword_110000 jnb short loc_DDF4A mov rbx, rsi mov rdi, rsi call _ZL26llama_sampler_softmax_implP22llama_token_data_array; llama_sampler_softmax_impl(llama_token_data_array *) mov rax, [rbx+8] test rax, rax jz short loc_DDF44 mov rdx, [rbx] movss xmm0, dword ptr [r14] mov rsi, rax neg rsi add rdx, 8 xorps xmm1, xmm1 mov ecx, 1 loc_DDF1C: addss xmm1, dword ptr [rdx] ucomiss xmm1, xmm0 jb short loc_DDF2B cmp rcx, [r14+8] jnb short loc_DDF46 loc_DDF2B: lea rdi, [rsi+rcx] inc rdi inc rcx add rdx, 0Ch cmp rdi, 1 jnz short loc_DDF1C mov rcx, rax jmp short loc_DDF46 loc_DDF44: xor ecx, ecx loc_DDF46: mov [rbx+8], rcx loc_DDF4A: add rsp, 8 pop rbx pop r14 retn
long long llama_sampler_top_p_apply(long long a1, long long *a2) { long long result; // rax long long v3; // r14 float *v4; // rdx float v5; // xmm1_4 unsigned long long v6; // rcx long long v7; // rdi v3 = *(_QWORD *)(a1 + 8); if ( *(float *)v3 < 1.0 ) { llama_sampler_softmax_impl(a2); result = a2[1]; if ( result ) { v4 = (float *)(*a2 + 8); v5 = 0.0; v6 = 1LL; while ( 1 ) { v5 = v5 + *v4; if ( v5 >= *(float *)v3 && v6 >= *(_QWORD *)(v3 + 8) ) break; v7 = v6 - result + 1; ++v6; v4 += 3; if ( v7 == 1 ) { v6 = a2[1]; break; } } } else { v6 = 0LL; } a2[1] = v6; } return result; }
llama_sampler_top_p_apply: PUSH R14 PUSH RBX PUSH RAX MOV R14,qword ptr [RDI + 0x8] MOVSS XMM0,dword ptr [R14] UCOMISS XMM0,dword ptr [0x00210000] JNC 0x001ddf4a MOV RBX,RSI MOV RDI,RSI CALL 0x001dce07 MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x001ddf44 MOV RDX,qword ptr [RBX] MOVSS XMM0,dword ptr [R14] MOV RSI,RAX NEG RSI ADD RDX,0x8 XORPS XMM1,XMM1 MOV ECX,0x1 LAB_001ddf1c: ADDSS XMM1,dword ptr [RDX] UCOMISS XMM1,XMM0 JC 0x001ddf2b CMP RCX,qword ptr [R14 + 0x8] JNC 0x001ddf46 LAB_001ddf2b: LEA RDI,[RSI + RCX*0x1] INC RDI INC RCX ADD RDX,0xc CMP RDI,0x1 JNZ 0x001ddf1c MOV RCX,RAX JMP 0x001ddf46 LAB_001ddf44: XOR ECX,ECX LAB_001ddf46: MOV qword ptr [RBX + 0x8],RCX LAB_001ddf4a: ADD RSP,0x8 POP RBX POP R14 RET
/* llama_sampler_top_p_apply(llama_sampler*, llama_token_data_array*) */ void llama_sampler_top_p_apply(llama_sampler *param_1,llama_token_data_array *param_2) { float *pfVar1; ulong uVar2; ulong uVar3; ulong uVar4; float *pfVar5; bool bVar6; float fVar7; pfVar1 = *(float **)(param_1 + 8); if (*pfVar1 < DAT_00210000) { llama_sampler_softmax_impl(param_2); uVar2 = *(ulong *)(param_2 + 8); if (uVar2 == 0) { uVar4 = 0; } else { pfVar5 = (float *)(*(long *)param_2 + 8); fVar7 = 0.0; uVar3 = 1; do { fVar7 = fVar7 + *pfVar5; if ((*pfVar1 <= fVar7) && (uVar4 = uVar3, *(ulong *)(pfVar1 + 2) <= uVar3)) break; pfVar5 = pfVar5 + 3; bVar6 = uVar3 != uVar2; uVar4 = uVar2; uVar3 = uVar3 + 1; } while (bVar6); } *(ulong *)(param_2 + 8) = uVar4; } return; }
47,904
JS_AddIntrinsicTypedArrays
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicTypedArrays(JSContext *ctx) { JSValue typed_array_base_proto, typed_array_base_func; JSValue array_buffer_func, shared_array_buffer_func; int i; ctx->class_proto[JS_CLASS_ARRAY_BUFFER] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_ARRAY_BUFFER], js_array_buffer_proto_funcs, countof(js_array_buffer_proto_funcs)); array_buffer_func = JS_NewGlobalCConstructorOnly(ctx, "ArrayBuffer", js_array_buffer_constructor, 1, ctx->class_proto[JS_CLASS_ARRAY_BUFFER]); JS_SetPropertyFunctionList(ctx, array_buffer_func, js_array_buffer_funcs, countof(js_array_buffer_funcs)); ctx->class_proto[JS_CLASS_SHARED_ARRAY_BUFFER] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_SHARED_ARRAY_BUFFER], js_shared_array_buffer_proto_funcs, countof(js_shared_array_buffer_proto_funcs)); shared_array_buffer_func = JS_NewGlobalCConstructorOnly(ctx, "SharedArrayBuffer", js_shared_array_buffer_constructor, 1, ctx->class_proto[JS_CLASS_SHARED_ARRAY_BUFFER]); JS_SetPropertyFunctionList(ctx, shared_array_buffer_func, js_shared_array_buffer_funcs, countof(js_shared_array_buffer_funcs)); typed_array_base_proto = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, typed_array_base_proto, js_typed_array_base_proto_funcs, countof(js_typed_array_base_proto_funcs)); /* TypedArray.prototype.toString must be the same object as Array.prototype.toString */ JSValue obj = JS_GetProperty(ctx, ctx->class_proto[JS_CLASS_ARRAY], JS_ATOM_toString); /* XXX: should use alias method in JSCFunctionListEntry */ //@@@ JS_DefinePropertyValue(ctx, typed_array_base_proto, JS_ATOM_toString, obj, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); typed_array_base_func = JS_NewCFunction(ctx, js_typed_array_base_constructor, "TypedArray", 0); JS_SetPropertyFunctionList(ctx, typed_array_base_func, js_typed_array_base_funcs, countof(js_typed_array_base_funcs)); JS_SetConstructor(ctx, typed_array_base_func, typed_array_base_proto); /* Used to squelch a -Wcast-function-type warning. */ JSCFunctionType ft = { .generic_magic = js_typed_array_constructor }; for(i = JS_CLASS_UINT8C_ARRAY; i < JS_CLASS_UINT8C_ARRAY + JS_TYPED_ARRAY_COUNT; i++) { JSValue func_obj; char buf[ATOM_GET_STR_BUF_SIZE]; const char *name; ctx->class_proto[i] = JS_NewObjectProto(ctx, typed_array_base_proto); JS_DefinePropertyValueStr(ctx, ctx->class_proto[i], "BYTES_PER_ELEMENT", js_int32(1 << typed_array_size_log2(i)), 0); name = JS_AtomGetStr(ctx, buf, sizeof(buf), JS_ATOM_Uint8ClampedArray + i - JS_CLASS_UINT8C_ARRAY); func_obj = JS_NewCFunction3(ctx, ft.generic, name, 3, JS_CFUNC_constructor_magic, i, typed_array_base_func); JS_NewGlobalCConstructor2(ctx, func_obj, name, ctx->class_proto[i]); JS_DefinePropertyValueStr(ctx, func_obj, "BYTES_PER_ELEMENT", js_int32(1 << typed_array_size_log2(i)), 0); } JS_FreeValue(ctx, typed_array_base_proto); JS_FreeValue(ctx, typed_array_base_func); /* DataView */ ctx->class_proto[JS_CLASS_DATAVIEW] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATAVIEW], js_dataview_proto_funcs, countof(js_dataview_proto_funcs)); JS_NewGlobalCConstructorOnly(ctx, "DataView", js_dataview_constructor, 1, ctx->class_proto[JS_CLASS_DATAVIEW]); /* Atomics */ #ifdef CONFIG_ATOMICS JS_AddIntrinsicAtomics(ctx); #endif }
O1
c
JS_AddIntrinsicTypedArrays: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdi, %r12 movq 0x40(%rdi), %rbx movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movl $0x1, %ecx callq 0x202f1 movq %rax, 0x130(%rbx) movq %rdx, 0x138(%rbx) movq 0x40(%r12), %rax movq 0x130(%rax), %rsi movq 0x138(%rax), %rdx leaq 0xabd66(%rip), %rcx # 0xc9f40 movq %r12, %rdi movl $0x9, %r8d callq 0x32053 movq 0x40(%r12), %rax movq 0x130(%rax), %r14 movq 0x138(%rax), %r15 leaq 0x48(%r12), %rax movq %rax, 0x40(%rsp) movups 0x48(%r12), %xmm0 movups %xmm0, (%rsp) leaq 0x1ab35(%rip), %rsi # 0x38d4b leaq 0x82ca6(%rip), %rbx # 0xa0ec3 movq %r12, %rdi movq %rbx, %rdx movl $0x1, %ecx movl $0x2, %r8d xorl %r9d, %r9d callq 0x203f2 movq %rax, %r13 movq %rdx, %rbp movq %r12, %rdi movq %rax, %rsi movq %rbx, %rcx movq %r14, %r8 movq %r15, %r9 callq 0x35596 leaq 0xabe09(%rip), %rcx # 0xca060 movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movl $0x2, %r8d callq 0x32053 movq 0x40(%r12), %rbx movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r12, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, 0x140(%rbx) movq %rdx, 0x148(%rbx) movq 0x40(%r12), %rax movq 0x140(%rax), %rsi movq 0x148(%rax), %rdx leaq 0xabdf3(%rip), %rcx # 0xca0a0 movq %r12, %rdi movl $0x6, %r8d callq 0x32053 movq 0x40(%r12), %rax movq 0x140(%rax), %r14 movq 0x148(%rax), %r15 movups 0x48(%r12), %xmm0 movups %xmm0, (%rsp) leaq 0x1aa77(%rip), %rsi # 0x38d56 leaq 0x82c18(%rip), %rbx # 0xa0efe movq %r12, %rdi movq %rbx, %rdx movl $0x1, %ecx movl $0x2, %r8d xorl %r9d, %r9d callq 0x203f2 movq %rax, %r13 movq %rdx, %rbp movq %r12, %rdi movq %rax, %rsi movq %rbx, %rcx movq %r14, %r8 movq %r15, %r9 callq 0x35596 leaq 0xabe40(%rip), %rcx # 0xca160 movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movl $0x1, %r8d callq 0x32053 movq 0x40(%r12), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r12, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, %r14 movq %rdx, %r15 leaq 0xabe25(%rip), %rcx # 0xca180 movq %r12, %rdi movq %rax, %rsi movl $0x24, %r8d callq 0x32053 movq 0x40(%r12), %rax movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r12, %rdi movl $0x38, %ecx movq %rsi, %r8 movq %rdx, %r9 callq 0x2238f movq %rdx, %r9 movl $0x3, %ebx movl %ebx, (%rsp) movq %r12, %rdi movq %r14, %rsi movq %r15, %rdx movl $0x38, %ecx movq %rax, %r8 callq 0x25ea7 movups 0x48(%r12), %xmm0 movups %xmm0, (%rsp) leaq 0x1a993(%rip), %rsi # 0x38d61 leaq 0x8293a(%rip), %rdx # 0xa0d0f movq %r12, %rdi xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x203f2 movq %rax, %r13 movq %rdx, %rbp movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) leaq 0xac204(%rip), %rcx # 0xca600 movq %r12, %rdi movq %rax, %rsi movl $0x3, %r8d callq 0x32053 movl %ebx, (%rsp) movq %r12, 0x28(%rsp) movq %r12, %rdi movq %r13, 0x38(%rsp) movq %r13, %rsi movq %rbp, 0x30(%rsp) movq %rbp, %rdx movq %r14, 0x20(%rsp) movq %r14, %rcx movq %r15, 0x18(%rsp) movq %r15, %r8 xorl %r9d, %r9d callq 0x3260b movl $0x158, %ebp # imm = 0x158 xorl %ebx, %ebx movq 0x28(%rsp), %r12 movq 0x40(%r12), %r14 movq %r12, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movl $0x1, %ecx callq 0x202f1 movq %rax, -0x8(%r14,%rbp) movq %rdx, (%r14,%rbp) leaq 0x7dd57(%rip), %rax # 0x9c1cf movb (%rbx,%rax), %cl movl $0x1, %eax shlq %cl, %rax movq %rax, %r8 movq %rax, 0x48(%rsp) movq 0x40(%r12), %rax movq -0x8(%rax,%rbp), %rsi movq (%rax,%rbp), %rdx xorl %eax, %eax movl %eax, (%rsp) movq %r12, %rdi leaq 0x7f2bb(%rip), %rcx # 0x9d763 xorl %r9d, %r9d callq 0x26043 movq 0x18(%r12), %rdi leal 0xa4(%rbx), %edx leaq 0x60(%rsp), %rsi callq 0x215dc movq %rax, %r13 leal 0x15(%rbx), %r9d movups 0x50(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r12, %rdi leaq 0x19f45(%rip), %rsi # 0x38424 movq %rax, %rdx movl $0x3, %ecx movl $0x3, %r8d callq 0x203f2 movq %rax, %r14 movq %rdx, %r15 movq 0x40(%r12), %rax movq -0x8(%rax,%rbp), %r8 movq (%rax,%rbp), %r9 movq %r12, %rdi movq %r14, %rsi movq %r13, %rcx callq 0x35596 xorl %eax, %eax movl %eax, (%rsp) movq %r12, %rdi movq %r14, %rsi movq %r15, %rdx leaq 0x7f23a(%rip), %rcx # 0x9d763 movq 0x48(%rsp), %r8 xorl %r9d, %r9d callq 0x26043 incq %rbx addq $0x10, %rbp cmpq $0xc, %rbx jne 0x1e44c movq 0x28(%rsp), %r13 movq 0x18(%r13), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1ccb2 movq 0x18(%r13), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x1ccb2 movq 0x40(%r13), %rbx movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r13, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, 0x210(%rbx) movq %rdx, 0x218(%rbx) movq 0x40(%r13), %rax movq 0x210(%rax), %rsi movq 0x218(%rax), %rdx leaq 0xac0ae(%rip), %rcx # 0xca660 movq %r13, %rdi movl $0x1a, %r8d callq 0x32053 movq 0x40(%r13), %rax movq 0x210(%rax), %r14 movq 0x218(%rax), %r15 movq 0x40(%rsp), %rax movups (%rax), %xmm0 movups %xmm0, (%rsp) leaq 0x1a794(%rip), %rsi # 0x38d79 leaq 0x82a5b(%rip), %r12 # 0xa1047 movq %r13, %rdi movq %r12, %rdx movl $0x1, %ecx movl $0x2, %r8d xorl %r9d, %r9d callq 0x203f2 movq %r13, %rdi movq %rax, %rsi movq %r12, %rcx movq %r14, %r8 movq %r15, %r9 callq 0x35596 leaq 0xacf80(%rip), %rdi # 0xcb5a0 leaq 0x1a718(%rip), %rsi # 0x38d3f callq 0x1bb1e movq 0x1a0(%r13), %rsi movq 0x1a8(%r13), %rdx leaq 0xab71f(%rip), %rcx # 0xc9d60 movq %r13, %rdi movl $0x1, %r8d callq 0x32053 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_AddIntrinsicTypedArrays: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r12, rdi mov rbx, [rdi+40h] mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov ecx, 1 call JS_NewObjectProtoClass mov [rbx+130h], rax mov [rbx+138h], rdx mov rax, [r12+40h] mov rsi, [rax+130h] mov rdx, [rax+138h] lea rcx, js_array_buffer_proto_funcs mov rdi, r12 mov r8d, 9 call JS_SetPropertyFunctionList mov rax, [r12+40h] mov r14, [rax+130h] mov r15, [rax+138h] lea rax, [r12+48h] mov [rsp+0D8h+var_98], rax movups xmm0, xmmword ptr [r12+48h] movups [rsp+0D8h+var_D8], xmm0 lea rsi, js_array_buffer_constructor lea rbx, aCannotUseIdent+15h; "ArrayBuffer" mov rdi, r12 mov rdx, rbx mov ecx, 1 mov r8d, 2 xor r9d, r9d call JS_NewCFunction3 mov r13, rax mov rbp, rdx mov rdi, r12 mov rsi, rax mov rcx, rbx mov r8, r14 mov r9, r15 call JS_NewGlobalCConstructor2 lea rcx, js_array_buffer_funcs mov rdi, r12 mov rsi, r13 mov rdx, rbp mov r8d, 2 call JS_SetPropertyFunctionList mov rbx, [r12+40h] mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, r12 mov ecx, 1 call JS_NewObjectProtoClass mov [rbx+140h], rax mov [rbx+148h], rdx mov rax, [r12+40h] mov rsi, [rax+140h] mov rdx, [rax+148h] lea rcx, js_shared_array_buffer_proto_funcs mov rdi, r12 mov r8d, 6 call JS_SetPropertyFunctionList mov rax, [r12+40h] mov r14, [rax+140h] mov r15, [rax+148h] movups xmm0, xmmword ptr [r12+48h] movups [rsp+0D8h+var_D8], xmm0 lea rsi, js_shared_array_buffer_constructor lea rbx, aCannotTransfer+12h; "SharedArrayBuffer" mov rdi, r12 mov rdx, rbx mov ecx, 1 mov r8d, 2 xor r9d, r9d call JS_NewCFunction3 mov r13, rax mov rbp, rdx mov rdi, r12 mov rsi, rax mov rcx, rbx mov r8, r14 mov r9, r15 call JS_NewGlobalCConstructor2 lea rcx, js_shared_array_buffer_funcs mov rdi, r12 mov rsi, r13 mov rdx, rbp mov r8d, 1 call JS_SetPropertyFunctionList mov rax, [r12+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r12 mov ecx, 1 call JS_NewObjectProtoClass mov r14, rax mov r15, rdx lea rcx, js_typed_array_base_proto_funcs mov rdi, r12 mov rsi, rax mov r8d, 24h ; '$' call JS_SetPropertyFunctionList mov rax, [r12+40h] mov rsi, [rax+20h] mov rdx, [rax+28h] mov dword ptr [rsp+0D8h+var_D8+8], 0 mov qword ptr [rsp+0D8h+var_D8], 0 mov rdi, r12 mov ecx, 38h ; '8' mov r8, rsi mov r9, rdx call JS_GetPropertyInternal2 mov r9, rdx mov ebx, 3 mov dword ptr [rsp+0D8h+var_D8], ebx mov rdi, r12 mov rsi, r14 mov rdx, r15 mov ecx, 38h ; '8' mov r8, rax call JS_DefinePropertyValue movups xmm0, xmmword ptr [r12+48h] movups [rsp+0D8h+var_D8], xmm0 lea rsi, js_typed_array_base_constructor lea rdx, aNotATypedarray+6; "TypedArray" mov rdi, r12 xor ecx, ecx xor r8d, r8d xor r9d, r9d call JS_NewCFunction3 mov r13, rax mov rbp, rdx mov qword ptr [rsp+0D8h+var_88], rax mov qword ptr [rsp+0D8h+var_88+8], rdx lea rcx, js_typed_array_base_funcs mov rdi, r12 mov rsi, rax mov r8d, 3 call JS_SetPropertyFunctionList mov dword ptr [rsp+0D8h+var_D8], ebx mov [rsp+0D8h+var_B0], r12 mov rdi, r12 mov [rsp+0D8h+var_A0], r13 mov rsi, r13 mov [rsp+0D8h+var_A8], rbp mov rdx, rbp mov [rsp+0D8h+var_B8], r14 mov rcx, r14 mov [rsp+0D8h+var_C0], r15 mov r8, r15 xor r9d, r9d call JS_SetConstructor2 mov ebp, 158h xor ebx, ebx mov r12, [rsp+0D8h+var_B0] loc_1E44C: mov r14, [r12+40h] mov rdi, r12 mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] mov ecx, 1 call JS_NewObjectProtoClass mov [r14+rbp-8], rax mov [r14+rbp], rdx lea rax, typed_array_size_log2 mov cl, [rbx+rax] mov eax, 1 shl rax, cl mov r8, rax mov [rsp+0D8h+var_90], rax mov rax, [r12+40h] mov rsi, [rax+rbp-8] mov rdx, [rax+rbp] xor eax, eax mov dword ptr [rsp+0D8h+var_D8], eax mov rdi, r12 lea rcx, aBytesPerElemen; "BYTES_PER_ELEMENT" xor r9d, r9d call JS_DefinePropertyValueStr mov rdi, [r12+18h] lea edx, [rbx+0A4h] lea rsi, [rsp+0D8h+var_78] call JS_AtomGetStrRT mov r13, rax lea r9d, [rbx+15h] movups xmm0, [rsp+0D8h+var_88] movups [rsp+0D8h+var_D8], xmm0 mov rdi, r12 lea rsi, js_typed_array_constructor mov rdx, rax mov ecx, 3 mov r8d, 3 call JS_NewCFunction3 mov r14, rax mov r15, rdx mov rax, [r12+40h] mov r8, [rax+rbp-8] mov r9, [rax+rbp] mov rdi, r12 mov rsi, r14 mov rcx, r13 call JS_NewGlobalCConstructor2 xor eax, eax mov dword ptr [rsp+0D8h+var_D8], eax mov rdi, r12 mov rsi, r14 mov rdx, r15 lea rcx, aBytesPerElemen; "BYTES_PER_ELEMENT" mov r8, [rsp+0D8h+var_90] xor r9d, r9d call JS_DefinePropertyValueStr inc rbx add rbp, 10h cmp rbx, 0Ch jnz loc_1E44C mov r13, [rsp+0D8h+var_B0] mov rdi, [r13+18h] mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] call JS_FreeValueRT mov rdi, [r13+18h] mov rsi, [rsp+0D8h+var_A0] mov rdx, [rsp+0D8h+var_A8] call JS_FreeValueRT mov rbx, [r13+40h] mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, r13 mov ecx, 1 call JS_NewObjectProtoClass mov [rbx+210h], rax mov [rbx+218h], rdx mov rax, [r13+40h] mov rsi, [rax+210h] mov rdx, [rax+218h] lea rcx, js_dataview_proto_funcs mov rdi, r13 mov r8d, 1Ah call JS_SetPropertyFunctionList mov rax, [r13+40h] mov r14, [rax+210h] mov r15, [rax+218h] mov rax, [rsp+0D8h+var_98] movups xmm0, xmmword ptr [rax] movups [rsp+0D8h+var_D8], xmm0 lea rsi, js_dataview_constructor lea r12, aNotADataview+6; "DataView" mov rdi, r13 mov rdx, r12 mov ecx, 1 mov r8d, 2 xor r9d, r9d call JS_NewCFunction3 mov rdi, r13 mov rsi, rax mov rcx, r12 mov r8, r14 mov r9, r15 call JS_NewGlobalCConstructor2 lea rdi, js_atomics_once lea rsi, js__atomics_init call js_once mov rsi, [r13+1A0h] mov rdx, [r13+1A8h] lea rcx, js_atomics_obj mov rdi, r13 mov r8d, 1 call JS_SetPropertyFunctionList add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_AddIntrinsicTypedArrays(long long *a1) { _QWORD *v2; // rbx long long v3; // rdx long long v4; // rax long long v5; // r14 long long v6; // r15 long long v7; // r13 long long v8; // rdx long long v9; // rbp _QWORD *v10; // rbx long long v11; // rdx long long v12; // rax long long v13; // r14 long long v14; // r15 long long v15; // r13 long long v16; // rdx long long v17; // rbp long long v18; // r14 long long v19; // rdx long long v20; // r15 int PropertyInternal2; // eax int v22; // edx __int128 v23; // rax long long v24; // rbp _DWORD *v25; // r13 long long v26; // rbp long long i; // rbx long long v28; // r14 long long v29; // rdx long long StrRT; // r13 long long v31; // rax long long v32; // rdx int v33; // r15d _QWORD *v35; // rbx long long v36; // rdx long long v37; // rax long long v38; // r14 long long v39; // r15 long long v40; // rax long long v41; // rdx long long v43; // [rsp+18h] [rbp-C0h] _DWORD *v44; // [rsp+20h] [rbp-B8h] long long v45; // [rsp+30h] [rbp-A8h] _DWORD *v46; // [rsp+38h] [rbp-A0h] long long v47; // [rsp+48h] [rbp-90h] __int128 v48; // [rsp+50h] [rbp-88h] char v49[120]; // [rsp+60h] [rbp-78h] BYREF v2 = (_QWORD *)a1[8]; v2[38] = JS_NewObjectProtoClass(a1, v2[2], v2[3], 1LL); v2[39] = v3; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 304), *(_QWORD *)(a1[8] + 312), &js_array_buffer_proto_funcs, 9LL); v4 = a1[8]; v5 = *(_QWORD *)(v4 + 304); v6 = *(_QWORD *)(v4 + 312); v7 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_array_buffer_constructor, (unsigned int)"ArrayBuffer", 1, 2, 0, a1[9], a1[10]); v9 = v8; JS_NewGlobalCConstructor2(a1, v7, v8, "ArrayBuffer", v5, v6); JS_SetPropertyFunctionList(a1, v7, v9, &js_array_buffer_funcs, 2LL); v10 = (_QWORD *)a1[8]; v10[40] = JS_NewObjectProtoClass(a1, v10[2], v10[3], 1LL); v10[41] = v11; JS_SetPropertyFunctionList( a1, *(_QWORD *)(a1[8] + 320), *(_QWORD *)(a1[8] + 328), &js_shared_array_buffer_proto_funcs, 6LL); v12 = a1[8]; v13 = *(_QWORD *)(v12 + 320); v14 = *(_QWORD *)(v12 + 328); v15 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_shared_array_buffer_constructor, (unsigned int)"SharedArrayBuffer", 1, 2, 0, a1[9], a1[10]); v17 = v16; JS_NewGlobalCConstructor2(a1, v15, v16, "SharedArrayBuffer", v13, v14); JS_SetPropertyFunctionList(a1, v15, v17, &js_shared_array_buffer_funcs, 1LL); v18 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1[8] + 16), *(_QWORD *)(a1[8] + 24), 1LL); v20 = v19; JS_SetPropertyFunctionList(a1, v18, v19, &js_typed_array_base_proto_funcs, 36LL); PropertyInternal2 = JS_GetPropertyInternal2( (_DWORD)a1, *(_QWORD *)(a1[8] + 32), *(_QWORD *)(a1[8] + 40), 56, *(_QWORD *)(a1[8] + 32), *(_QWORD *)(a1[8] + 40), 0LL, 0); JS_DefinePropertyValue((_DWORD)a1, v18, v20, 56, PropertyInternal2, v22, 3); *(_QWORD *)&v23 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_typed_array_base_constructor, (unsigned int)"TypedArray", 0, 0, 0, a1[9], a1[10]); v24 = *((_QWORD *)&v23 + 1); v25 = (_DWORD *)v23; v48 = v23; JS_SetPropertyFunctionList(a1, v23, *((_QWORD *)&v23 + 1), &js_typed_array_base_funcs, 3LL); v46 = v25; v45 = v24; v44 = (_DWORD *)v18; v43 = v20; JS_SetConstructor2(a1, v25, v24, v18, v20, 0LL, 3); v26 = 344LL; for ( i = 0LL; i != 12; ++i ) { v28 = a1[8]; *(_QWORD *)(v28 + v26 - 8) = JS_NewObjectProtoClass(a1, v44, v43, 1LL); *(_QWORD *)(v28 + v26) = v29; v47 = 1LL << typed_array_size_log2[i]; JS_DefinePropertyValueStr( (_DWORD)a1, *(_QWORD *)(a1[8] + v26 - 8), *(_QWORD *)(a1[8] + v26), (unsigned int)"BYTES_PER_ELEMENT", v47, 0, 0); StrRT = JS_AtomGetStrRT(a1[3], v49, (unsigned int)(i + 164)); v31 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_typed_array_constructor, StrRT, 3, 3, (int)i + 21, v48, *((long long *)&v48 + 1)); LODWORD(v28) = v31; v33 = v32; JS_NewGlobalCConstructor2(a1, v31, v32, StrRT, *(_QWORD *)(a1[8] + v26 - 8), *(_QWORD *)(a1[8] + v26)); JS_DefinePropertyValueStr((_DWORD)a1, v28, v33, (unsigned int)"BYTES_PER_ELEMENT", v47, 0, 0); v26 += 16LL; } JS_FreeValueRT(a1[3], v44, v43); JS_FreeValueRT(a1[3], v46, v45); v35 = (_QWORD *)a1[8]; v35[66] = JS_NewObjectProtoClass(a1, v35[2], v35[3], 1LL); v35[67] = v36; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 528), *(_QWORD *)(a1[8] + 536), &js_dataview_proto_funcs, 26LL); v37 = a1[8]; v38 = *(_QWORD *)(v37 + 528); v39 = *(_QWORD *)(v37 + 536); v40 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_dataview_constructor, (unsigned int)"DataView", 1, 2, 0, a1[9], a1[10]); JS_NewGlobalCConstructor2(a1, v40, v41, "DataView", v38, v39); js_once(); return JS_SetPropertyFunctionList(a1, a1[52], a1[53], &js_atomics_obj, 1LL); }
JS_AddIntrinsicTypedArrays: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R12,RDI MOV RBX,qword ptr [RDI + 0x40] MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [RBX + 0x130],RAX MOV qword ptr [RBX + 0x138],RDX MOV RAX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RAX + 0x138] LEA RCX,[0x1c9f40] MOV RDI,R12 MOV R8D,0x9 CALL 0x00132053 MOV RAX,qword ptr [R12 + 0x40] MOV R14,qword ptr [RAX + 0x130] MOV R15,qword ptr [RAX + 0x138] LEA RAX,[R12 + 0x48] MOV qword ptr [RSP + 0x40],RAX MOVUPS XMM0,xmmword ptr [R12 + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x138d4b] LEA RBX,[0x1a0ec3] MOV RDI,R12 MOV RDX,RBX MOV ECX,0x1 MOV R8D,0x2 XOR R9D,R9D CALL 0x001203f2 MOV R13,RAX MOV RBP,RDX MOV RDI,R12 MOV RSI,RAX MOV RCX,RBX MOV R8,R14 MOV R9,R15 CALL 0x00135596 LEA RCX,[0x1ca060] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBP MOV R8D,0x2 CALL 0x00132053 MOV RBX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,R12 MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [RBX + 0x140],RAX MOV qword ptr [RBX + 0x148],RDX MOV RAX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RAX + 0x140] MOV RDX,qword ptr [RAX + 0x148] LEA RCX,[0x1ca0a0] MOV RDI,R12 MOV R8D,0x6 CALL 0x00132053 MOV RAX,qword ptr [R12 + 0x40] MOV R14,qword ptr [RAX + 0x140] MOV R15,qword ptr [RAX + 0x148] MOVUPS XMM0,xmmword ptr [R12 + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x138d56] LEA RBX,[0x1a0efe] MOV RDI,R12 MOV RDX,RBX MOV ECX,0x1 MOV R8D,0x2 XOR R9D,R9D CALL 0x001203f2 MOV R13,RAX MOV RBP,RDX MOV RDI,R12 MOV RSI,RAX MOV RCX,RBX MOV R8,R14 MOV R9,R15 CALL 0x00135596 LEA RCX,[0x1ca160] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBP MOV R8D,0x1 CALL 0x00132053 MOV RAX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R12 MOV ECX,0x1 CALL 0x001202f1 MOV R14,RAX MOV R15,RDX LEA RCX,[0x1ca180] MOV RDI,R12 MOV RSI,RAX MOV R8D,0x24 CALL 0x00132053 MOV RAX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R12 MOV ECX,0x38 MOV R8,RSI MOV R9,RDX CALL 0x0012238f MOV R9,RDX MOV EBX,0x3 MOV dword ptr [RSP],EBX MOV RDI,R12 MOV RSI,R14 MOV RDX,R15 MOV ECX,0x38 MOV R8,RAX CALL 0x00125ea7 MOVUPS XMM0,xmmword ptr [R12 + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x138d61] LEA RDX,[0x1a0d0f] MOV RDI,R12 XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL 0x001203f2 MOV R13,RAX MOV RBP,RDX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX LEA RCX,[0x1ca600] MOV RDI,R12 MOV RSI,RAX MOV R8D,0x3 CALL 0x00132053 MOV dword ptr [RSP],EBX MOV qword ptr [RSP + 0x28],R12 MOV RDI,R12 MOV qword ptr [RSP + 0x38],R13 MOV RSI,R13 MOV qword ptr [RSP + 0x30],RBP MOV RDX,RBP MOV qword ptr [RSP + 0x20],R14 MOV RCX,R14 MOV qword ptr [RSP + 0x18],R15 MOV R8,R15 XOR R9D,R9D CALL 0x0013260b MOV EBP,0x158 XOR EBX,EBX MOV R12,qword ptr [RSP + 0x28] LAB_0011e44c: MOV R14,qword ptr [R12 + 0x40] MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [R14 + RBP*0x1 + -0x8],RAX MOV qword ptr [R14 + RBP*0x1],RDX LEA RAX,[0x19c1cf] MOV CL,byte ptr [RBX + RAX*0x1] MOV EAX,0x1 SHL RAX,CL MOV R8,RAX MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [R12 + 0x40] MOV RSI,qword ptr [RAX + RBP*0x1 + -0x8] MOV RDX,qword ptr [RAX + RBP*0x1] XOR EAX,EAX MOV dword ptr [RSP],EAX MOV RDI,R12 LEA RCX,[0x19d763] XOR R9D,R9D CALL 0x00126043 MOV RDI,qword ptr [R12 + 0x18] LEA EDX,[RBX + 0xa4] LEA RSI,[RSP + 0x60] CALL 0x001215dc MOV R13,RAX LEA R9D,[RBX + 0x15] MOVUPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R12 LEA RSI,[0x138424] MOV RDX,RAX MOV ECX,0x3 MOV R8D,0x3 CALL 0x001203f2 MOV R14,RAX MOV R15,RDX MOV RAX,qword ptr [R12 + 0x40] MOV R8,qword ptr [RAX + RBP*0x1 + -0x8] MOV R9,qword ptr [RAX + RBP*0x1] MOV RDI,R12 MOV RSI,R14 MOV RCX,R13 CALL 0x00135596 XOR EAX,EAX MOV dword ptr [RSP],EAX MOV RDI,R12 MOV RSI,R14 MOV RDX,R15 LEA RCX,[0x19d763] MOV R8,qword ptr [RSP + 0x48] XOR R9D,R9D CALL 0x00126043 INC RBX ADD RBP,0x10 CMP RBX,0xc JNZ 0x0011e44c MOV R13,qword ptr [RSP + 0x28] MOV RDI,qword ptr [R13 + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011ccb2 MOV RDI,qword ptr [R13 + 0x18] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] CALL 0x0011ccb2 MOV RBX,qword ptr [R13 + 0x40] MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,R13 MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [RBX + 0x210],RAX MOV qword ptr [RBX + 0x218],RDX MOV RAX,qword ptr [R13 + 0x40] MOV RSI,qword ptr [RAX + 0x210] MOV RDX,qword ptr [RAX + 0x218] LEA RCX,[0x1ca660] MOV RDI,R13 MOV R8D,0x1a CALL 0x00132053 MOV RAX,qword ptr [R13 + 0x40] MOV R14,qword ptr [RAX + 0x210] MOV R15,qword ptr [RAX + 0x218] MOV RAX,qword ptr [RSP + 0x40] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x138d79] LEA R12,[0x1a1047] MOV RDI,R13 MOV RDX,R12 MOV ECX,0x1 MOV R8D,0x2 XOR R9D,R9D CALL 0x001203f2 MOV RDI,R13 MOV RSI,RAX MOV RCX,R12 MOV R8,R14 MOV R9,R15 CALL 0x00135596 LEA RDI,[0x1cb5a0] LEA RSI,[0x138d3f] CALL 0x0011bb1e MOV RSI,qword ptr [R13 + 0x1a0] MOV RDX,qword ptr [R13 + 0x1a8] LEA RCX,[0x1c9d60] MOV RDI,R13 MOV R8D,0x1 CALL 0x00132053 ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void JS_AddIntrinsicTypedArrays(long param_1) { int8 uVar1; ulong uVar2; long lVar3; int8 uVar4; int8 uVar5; int8 uVar6; long lVar7; long lVar8; int1 auVar9 [16]; int1 auVar10 [16]; int4 uVar12; ulong uVar11; int4 uStack_80; int1 local_78 [72]; lVar7 = *(long *)(param_1 + 0x40); auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar7 + 0x10),*(int8 *)(lVar7 + 0x18),1); *(int1 (*) [16])(lVar7 + 0x130) = auVar9; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x130), *(int8 *)(*(long *)(param_1 + 0x40) + 0x138),js_array_buffer_proto_funcs,9); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x130); uVar6 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x138); auVar9 = JS_NewCFunction3(param_1,js_array_buffer_constructor,"ArrayBuffer",1,2,0, *(int8 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); JS_NewGlobalCConstructor2(param_1,auVar9._0_8_,auVar9._8_8_,"ArrayBuffer",uVar4,uVar6); JS_SetPropertyFunctionList(param_1,auVar9._0_8_,auVar9._8_8_,js_array_buffer_funcs,2); lVar7 = *(long *)(param_1 + 0x40); auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar7 + 0x10),*(int8 *)(lVar7 + 0x18),1); *(int1 (*) [16])(lVar7 + 0x140) = auVar9; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x140), *(int8 *)(*(long *)(param_1 + 0x40) + 0x148),js_shared_array_buffer_proto_funcs,6 ); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x140); uVar6 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x148); auVar9 = JS_NewCFunction3(param_1,js_shared_array_buffer_constructor,"SharedArrayBuffer",1,2,0, *(int8 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); JS_NewGlobalCConstructor2(param_1,auVar9._0_8_,auVar9._8_8_,"SharedArrayBuffer",uVar4,uVar6); JS_SetPropertyFunctionList(param_1,auVar9._0_8_,auVar9._8_8_,js_shared_array_buffer_funcs,1); auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); uVar5 = auVar9._8_8_; uVar1 = auVar9._0_8_; JS_SetPropertyFunctionList(param_1,uVar1,uVar5,js_typed_array_base_proto_funcs,0x24); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x20); uVar6 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x28); uVar12 = 0; auVar9 = JS_GetPropertyInternal2(param_1,uVar4,uVar6,0x38,uVar4,uVar6,0,0); JS_DefinePropertyValue(param_1,uVar1,uVar5,0x38,auVar9._0_8_,auVar9._8_8_,CONCAT44(uVar12,3)); uVar4 = *(int8 *)(param_1 + 0x48); auVar9 = JS_NewCFunction3(param_1,js_typed_array_base_constructor,"TypedArray",0,0,0,uVar4, *(int4 *)(param_1 + 0x50)); uVar6 = auVar9._8_8_; uVar2 = auVar9._0_8_; uVar12 = (int4)((ulong)uVar4 >> 0x20); JS_SetPropertyFunctionList(param_1,uVar2,uVar6,js_typed_array_base_funcs,3); uVar11 = CONCAT44(uVar12,3); JS_SetConstructor2(param_1,uVar2,uVar6,uVar1,uVar5,0,uVar11); lVar8 = 0x158; lVar7 = 0; do { lVar3 = *(long *)(param_1 + 0x40); auVar10 = JS_NewObjectProtoClass(param_1,uVar1,uVar5,1); *(long *)(lVar3 + -8 + lVar8) = auVar10._0_8_; *(long *)(lVar3 + lVar8) = auVar10._8_8_; lVar3 = 1L << ((&typed_array_size_log2)[lVar7] & 0x3f); JS_DefinePropertyValueStr (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + -8 + lVar8), *(int8 *)(*(long *)(param_1 + 0x40) + lVar8),"BYTES_PER_ELEMENT",lVar3,0, uVar11 & 0xffffffff00000000); uVar4 = JS_AtomGetStrRT(*(int8 *)(param_1 + 0x18),local_78,(int)lVar7 + 0xa4); uStack_80 = auVar9._8_4_; uVar11 = uVar2; auVar10 = JS_NewCFunction3(param_1,js_typed_array_constructor,uVar4,3,3,(int)lVar7 + 0x15,uVar2, uStack_80); JS_NewGlobalCConstructor2 (param_1,auVar10._0_8_,auVar10._8_8_,uVar4, *(int8 *)(*(long *)(param_1 + 0x40) + -8 + lVar8)); uVar11 = uVar11 & 0xffffffff00000000; JS_DefinePropertyValueStr (param_1,auVar10._0_8_,auVar10._8_8_,"BYTES_PER_ELEMENT",lVar3,0,uVar11); lVar7 = lVar7 + 1; lVar8 = lVar8 + 0x10; } while (lVar7 != 0xc); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1,uVar5); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar6); lVar7 = *(long *)(param_1 + 0x40); auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar7 + 0x10),*(int8 *)(lVar7 + 0x18),1); *(int1 (*) [16])(lVar7 + 0x210) = auVar9; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x210), *(int8 *)(*(long *)(param_1 + 0x40) + 0x218),js_dataview_proto_funcs,0x1a); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x210); uVar6 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x218); auVar9 = JS_NewCFunction3(param_1,js_dataview_constructor,"DataView",1,2,0, *(int8 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); JS_NewGlobalCConstructor2(param_1,auVar9._0_8_,auVar9._8_8_,"DataView",uVar4,uVar6); js_once(&js_atomics_once,js__atomics_init); JS_SetPropertyFunctionList (param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8), js_atomics_obj,1); return; }
47,905
my_instr_mb
eloqsql/strings/ctype-mb.c
uint my_instr_mb(CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const char *end, *b0; int res= 0; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } b0= b; end= b+b_length-s_length+1; while (b < end) { int mb_len; if (!my_ci_strnncoll(cs, (const uchar *) b, s_length, (const uchar *) s, s_length, 0)) { if (nmatch) { match[0].beg= 0; match[0].end= (uint) (b-b0); match[0].mb_len= res; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= 0; /* Not computed */ } } return 2; } mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1; b+= mb_len; b_length-= mb_len; res++; } } return 0; }
O3
c
my_instr_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, -0x40(%rbp) xorl %eax, %eax cmpq %rdx, %r8 ja 0x822e3 movq %r8, %r14 testq %r8, %r8 je 0x82276 movq %rdx, %r13 addq %rsi, %r13 subq %r14, %r13 incq %r13 cmpq %rsi, %r13 jbe 0x822e3 movq %rdi, %rbx movq %r9, -0x38(%rbp) xorl %r12d, %r12d movq %rsi, -0x30(%rbp) movq %rsi, %r15 movq 0xc0(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq -0x40(%rbp), %rcx movq %r14, %r8 xorl %r9d, %r9d callq *0x8(%rax) testl %eax, %eax je 0x822a3 movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x1, %ecx cmovbl %ecx, %eax cmovll %ecx, %eax cltq addq %rax, %r15 incl %r12d cmpq %r13, %r15 jb 0x82220 xorl %eax, %eax jmp 0x822e3 cmpl $0x0, 0x10(%rbp) je 0x822de movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %r14d, %r14d movl $0x4, %edx movl %r14d, (%r9,%rdx) movl $0x0, (%r9,%rcx) jmp 0x822e3 movl $0x2, %eax movl 0x10(%rbp), %ecx testl %ecx, %ecx je 0x822e3 movq -0x38(%rbp), %r9 movl $0x0, (%r9) subl -0x30(%rbp), %r15d movl %r15d, 0x4(%r9) movl %r12d, 0x8(%r9) cmpl $0x1, %ecx je 0x822e3 movl %r15d, 0xc(%r9) addl %r15d, %r14d movl $0x14, %ecx movl $0x10, %edx jmp 0x82295 movl $0x1, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_instr_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rcx xor eax, eax cmp r8, rdx ja loc_822E3 mov r14, r8 test r8, r8 jz short loc_82276 mov r13, rdx add r13, rsi sub r13, r14 inc r13 cmp r13, rsi jbe loc_822E3 mov rbx, rdi mov [rbp+var_38], r9 xor r12d, r12d mov [rbp+var_30], rsi mov r15, rsi loc_82220: mov rax, [rbx+0C0h] mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, [rbp+var_40] mov r8, r14 xor r9d, r9d call qword ptr [rax+8] test eax, eax jz short loc_822A3 mov rax, [rbx+0B8h] mov rdi, rbx mov rsi, r15 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 1 cmovb eax, ecx cmovl eax, ecx cdqe add r15, rax inc r12d cmp r15, r13 jb short loc_82220 xor eax, eax jmp short loc_822E3 loc_82276: cmp [rbp+arg_0], 0 jz short loc_822DE mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor r14d, r14d mov edx, 4 loc_82295: mov [r9+rdx], r14d mov dword ptr [r9+rcx], 0 jmp short loc_822E3 loc_822A3: mov eax, 2 mov ecx, [rbp+arg_0] test ecx, ecx jz short loc_822E3 mov r9, [rbp+var_38] mov dword ptr [r9], 0 sub r15d, dword ptr [rbp+var_30] mov [r9+4], r15d mov [r9+8], r12d cmp ecx, 1 jz short loc_822E3 mov [r9+0Ch], r15d add r14d, r15d mov ecx, 14h mov edx, 10h jmp short loc_82295 loc_822DE: mov eax, 1 loc_822E3: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_instr_mb( long long a1, unsigned long long a2, unsigned long long a3, long long a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax unsigned long long v9; // r13 int v10; // r12d unsigned long long v11; // r15 int v12; // eax bool v13; // cc long long v14; // rcx int v15; // r14d long long v16; // rdx int v17; // r15d _DWORD *v19; // [rsp+8h] [rbp-38h] result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v9 = a2 + a3 - a5 + 1; if ( v9 > a2 ) { v19 = a6; v10 = 0; v11 = a2; while ( (*(unsigned int ( **)(long long, unsigned long long, unsigned long long, long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 192) + 8LL))( a1, v11, a5, a4, a5, 0LL) ) { v12 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v11, v9); v13 = v12 < 2; if ( (unsigned int)v12 < 2 ) v12 = 1; if ( v13 ) v12 = 1; v11 += v12; ++v10; if ( v11 >= v9 ) return 0LL; } result = 2LL; if ( a7 ) { a6 = v19; *v19 = 0; v17 = v11 - a2; v19[1] = v17; v19[2] = v10; if ( a7 != 1 ) { v19[3] = v17; v15 = v17 + a5; v14 = 5LL; v16 = 4LL; goto LABEL_14; } } } } else { if ( a7 ) { *a6 = 0; result = 1LL; v14 = 2LL; v15 = 0; v16 = 1LL; LABEL_14: a6[v16] = v15; a6[v14] = 0; return result; } return 1LL; } } return result; }
my_instr_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RCX XOR EAX,EAX CMP R8,RDX JA 0x001822e3 MOV R14,R8 TEST R8,R8 JZ 0x00182276 MOV R13,RDX ADD R13,RSI SUB R13,R14 INC R13 CMP R13,RSI JBE 0x001822e3 MOV RBX,RDI MOV qword ptr [RBP + -0x38],R9 XOR R12D,R12D MOV qword ptr [RBP + -0x30],RSI MOV R15,RSI LAB_00182220: MOV RAX,qword ptr [RBX + 0xc0] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x40] MOV R8,R14 XOR R9D,R9D CALL qword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x001822a3 MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x1 CMOVC EAX,ECX CMOVL EAX,ECX CDQE ADD R15,RAX INC R12D CMP R15,R13 JC 0x00182220 XOR EAX,EAX JMP 0x001822e3 LAB_00182276: CMP dword ptr [RBP + 0x10],0x0 JZ 0x001822de MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR R14D,R14D MOV EDX,0x4 LAB_00182295: MOV dword ptr [R9 + RDX*0x1],R14D MOV dword ptr [R9 + RCX*0x1],0x0 JMP 0x001822e3 LAB_001822a3: MOV EAX,0x2 MOV ECX,dword ptr [RBP + 0x10] TEST ECX,ECX JZ 0x001822e3 MOV R9,qword ptr [RBP + -0x38] MOV dword ptr [R9],0x0 SUB R15D,dword ptr [RBP + -0x30] MOV dword ptr [R9 + 0x4],R15D MOV dword ptr [R9 + 0x8],R12D CMP ECX,0x1 JZ 0x001822e3 MOV dword ptr [R9 + 0xc],R15D ADD R14D,R15D MOV ECX,0x14 MOV EDX,0x10 JMP 0x00182295 LAB_001822de: MOV EAX,0x1 LAB_001822e3: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_instr_mb(long param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5, int4 *param_6,int param_7) { int iVar1; uint uVar2; uint uVar3; int8 uVar4; long lVar5; long lVar6; int iVar7; ulong uVar8; ulong uVar9; int local_38; uVar4 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar4 = 1; } else { *param_6 = 0; uVar4 = 1; lVar5 = 8; local_38 = 0; lVar6 = 4; LAB_00182295: *(int *)((long)param_6 + lVar6) = local_38; *(int4 *)((long)param_6 + lVar5) = 0; } } else { uVar8 = ((param_3 + param_2) - param_5) + 1; if (param_2 < uVar8) { iVar7 = 0; uVar9 = param_2; do { iVar1 = (**(code **)(*(long *)(param_1 + 0xc0) + 8)) (param_1,uVar9,param_5,param_4,param_5,0); if (iVar1 == 0) { uVar4 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; local_38 = (int)param_2; local_38 = (int)uVar9 - local_38; param_6[1] = local_38; param_6[2] = iVar7; if (param_7 == 1) { return 2; } param_6[3] = local_38; local_38 = (int)param_5 + local_38; lVar5 = 0x14; lVar6 = 0x10; goto LAB_00182295; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar9,uVar8); uVar3 = uVar2; if (uVar2 < 2) { uVar3 = 1; } if ((int)uVar2 < 2) { uVar3 = 1; } uVar9 = uVar9 + (long)(int)uVar3; iVar7 = iVar7 + 1; } while (uVar9 < uVar8); uVar4 = 0; } } } return uVar4; }
47,906
skip_all
eloqsql/unittest/mytap/tap.c
void skip_all(char const *reason, ...) { va_list ap; va_start(ap, reason); fprintf(tapout, "1..0 # skip "); vfprintf(tapout, reason, ap); fflush(tapout); va_end(ap); exit(0); }
O3
c
skip_all: 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 0x2639f 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 0x2ccbe5(%rip), %r15 # 0x2f2fa8 movq (%r15), %rdi leaq 0x37e1d(%rip), %rdx # 0x5e1ea movl $0x1, %esi xorl %eax, %eax callq 0x25530 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x250d0 movq (%r15), %rdi callq 0x25360 xorl %edi, %edi callq 0x253b0
skip_all: 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_2639F 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_2639F: 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, a10Skip; "1..0 # skip " 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] call _fflush xor edi, edi call _exit
void __noreturn skip_all( 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 v15; // [rsp+0h] [rbp-E0h] BYREF long long v16; // [rsp+8h] [rbp-D8h] long long v17; // [rsp+10h] [rbp-D0h] long long v18; // [rsp+18h] [rbp-C8h] long long v19; // [rsp+20h] [rbp-C0h] long long v20; // [rsp+28h] [rbp-B8h] __m128 v21; // [rsp+30h] [rbp-B0h] __m128 v22; // [rsp+40h] [rbp-A0h] __m128 v23; // [rsp+50h] [rbp-90h] __m128 v24; // [rsp+60h] [rbp-80h] __m128 v25; // [rsp+70h] [rbp-70h] __m128 v26; // [rsp+80h] [rbp-60h] __m128 v27; // [rsp+90h] [rbp-50h] __m128 v28; // [rsp+A0h] [rbp-40h] _QWORD v29[6]; // [rsp+B0h] [rbp-30h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v16 = a2; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v15; v29[1] = &a15; v29[0] = 0x3000000008LL; __fprintf_chk(stdout, 1LL, "1..0 # skip "); __vfprintf_chk(stdout, 1LL, a1, v29); fflush(stdout); exit(0LL); }
skip_all: 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 0x0012639f 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_0012639f: 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 [0x003f2fa8] MOV RDI,qword ptr [R15] LEA RDX,[0x15e1ea] MOV ESI,0x1 XOR EAX,EAX CALL 0x00125530 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x001250d0 MOV RDI,qword ptr [R15] CALL 0x00125360 XOR EDI,EDI CALL 0x001253b0
void skip_all(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_003f2fa8; 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_003f2fa8,1,"1..0 # skip "); __vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38); fflush(*(FILE **)puVar1); /* WARNING: Subroutine does not return */ exit(0); }
47,907
R3D_GetShadowBias
r3d/src/r3d_lighting.c
float R3D_GetShadowBias(R3D_Light id) { r3d_get_and_check_light(light, id, 0); return light->shadow.bias; }
O3
c
R3D_GetShadowBias: movl %edi, %edx testl %edi, %edi je 0xbeafa leaq 0xf11a0(%rip), %rax # 0x1afc60 cmpl %edx, 0x168(%rax) jbe 0xbeafa movq 0x128(%rax), %rsi leal -0x1(%rdx), %ecx cmpb $0x1, (%rsi,%rcx) jne 0xbeafa movq 0x108(%rax), %rsi cmpq %rcx, 0x110(%rax) setbe %dil testq %rsi, %rsi sete %r8b orb %dil, %r8b cmpb $0x1, %r8b jne 0xbeb16 pushq %rbp movq %rsp, %rbp leaq 0x532df(%rip), %rsi # 0x111de4 movl $0x5, %edi xorl %eax, %eax callq 0xa9c09 xorps %xmm0, %xmm0 popq %rbp retq imulq 0x120(%rax), %rcx movss 0x60(%rsi,%rcx), %xmm0 retq
R3D_GetShadowBias: mov edx, edi test edi, edi jz short loc_BEAFA lea rax, R3D cmp [rax+168h], edx jbe short loc_BEAFA mov rsi, [rax+128h] lea ecx, [rdx-1] cmp byte ptr [rsi+rcx], 1 jnz short loc_BEAFA mov rsi, [rax+108h] cmp [rax+110h], rcx setbe dil test rsi, rsi setz r8b or r8b, dil cmp r8b, 1 jnz short loc_BEB16 loc_BEAFA: push rbp mov rbp, rsp lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid" mov edi, 5 xor eax, eax call TraceLog xorps xmm0, xmm0 pop rbp retn loc_BEB16: imul rcx, [rax+120h] movss xmm0, dword ptr [rsi+rcx+60h] retn
float R3D_GetShadowBias(unsigned int a1) { unsigned long long v1; // rcx long long v2; // rsi if ( a1 ) { if ( *((_DWORD *)&R3D + 90) > a1 ) { v1 = a1 - 1; if ( *(_BYTE *)(*((_QWORD *)&R3D + 37) + v1) == 1 ) { v2 = *((_QWORD *)&R3D + 33); if ( *((_QWORD *)&R3D + 34) > v1 && v2 != 0 ) return *(float *)(v2 + *((_QWORD *)&R3D + 36) * v1 + 96); } } } TraceLog(5, (long long)"Light [ID %i] is not valid", a1); return 0.0; }
R3D_GetShadowBias: MOV EDX,EDI TEST EDI,EDI JZ 0x001beafa LEA RAX,[0x2afc60] CMP dword ptr [RAX + 0x168],EDX JBE 0x001beafa MOV RSI,qword ptr [RAX + 0x128] LEA ECX,[RDX + -0x1] CMP byte ptr [RSI + RCX*0x1],0x1 JNZ 0x001beafa MOV RSI,qword ptr [RAX + 0x108] CMP qword ptr [RAX + 0x110],RCX SETBE DIL TEST RSI,RSI SETZ R8B OR R8B,DIL CMP R8B,0x1 JNZ 0x001beb16 LAB_001beafa: PUSH RBP MOV RBP,RSP LEA RSI,[0x211de4] MOV EDI,0x5 XOR EAX,EAX CALL 0x001a9c09 XORPS XMM0,XMM0 POP RBP RET LAB_001beb16: IMUL RCX,qword ptr [RAX + 0x120] MOVSS XMM0,dword ptr [RSI + RCX*0x1 + 0x60] RET
int4 R3D_GetShadowBias(uint param_1) { ulong uVar1; if (((param_1 != 0) && (param_1 < DAT_002afdc8)) && (uVar1 = (ulong)(param_1 - 1), *(char *)(DAT_002afd88 + uVar1) == '\x01')) { if (DAT_002afd68 != 0 && uVar1 < DAT_002afd70) { return *(int4 *)(DAT_002afd68 + 0x60 + uVar1 * DAT_002afd80); } } TraceLog(5,"Light [ID %i] is not valid"); return 0; }
47,908
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("parse_error", id_), "parse error", position_string(pos), ": ", exception::diagnostics(context), what_arg); return {id_, pos.chars_read_total, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0x110(%rsp) movl %esi, 0x10c(%rsp) movq %rdx, 0x100(%rsp) movq %rcx, 0xf8(%rsp) movq %r8, 0xf0(%rsp) leaq 0x8f(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x52de0 movq 0x30(%rsp), %rdx leaq 0x10543b(%rip), %rsi # 0x1c55e4 leaq 0x90(%rsp), %rdi callq 0x5bc60 jmp 0xc01b8 movl 0x10c(%rsp), %edx leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xad520 jmp 0xc01d6 movq 0x100(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0xcd520 jmp 0xc01ea xorl %eax, %eax movl %eax, %esi leaq 0x38(%rsp), %rdi callq 0xcace0 jmp 0xc01fa movq 0xf8(%rsp), %rcx movq %rsp, %rax movq %rcx, (%rax) leaq 0x1053e1(%rip), %rdx # 0x1c55f0 leaq 0x1067d7(%rip), %r8 # 0x1c69ed leaq 0xd0(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0x58(%rsp), %rcx leaq 0x38(%rsp), %r9 callq 0xcd430 jmp 0xc0237 leaq 0x38(%rsp), %rdi callq 0x53180 leaq 0x58(%rsp), %rdi callq 0x53180 leaq 0xb0(%rsp), %rdi callq 0x53180 leaq 0x90(%rsp), %rdi callq 0x53180 leaq 0x8f(%rsp), %rdi callq 0x53160 movl 0x10c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x100(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) leaq 0xd0(%rsp), %rdi callq 0x521a0 movq 0x20(%rsp), %rdi movl 0x14(%rsp), %esi movq 0x18(%rsp), %rdx movq %rax, %rcx callq 0xcd5f0 jmp 0xc02b2 leaq 0xd0(%rsp), %rdi callq 0x53180 movq 0x28(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc0357 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc034a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc033d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc0333 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x38(%rsp), %rdi callq 0x53180 leaq 0x58(%rsp), %rdi callq 0x53180 leaq 0xb0(%rsp), %rdi callq 0x53180 leaq 0x90(%rsp), %rdi callq 0x53180 leaq 0x8f(%rsp), %rdi callq 0x53160 jmp 0xc0384 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0xd0(%rsp), %rdi callq 0x53180 movq 0x80(%rsp), %rdi callq 0x529b0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 118h mov [rsp+118h+var_F8], rdi; __int64 mov rax, rdi mov qword ptr [rsp+118h+var_F0], rax; char mov [rsp+118h+var_8], rdi mov [rsp+118h+var_C], esi mov [rsp+118h+var_18], rdx mov [rsp+118h+var_20], rcx mov [rsp+118h+var_28], r8 lea rdi, [rsp+118h+var_89] mov [rsp+118h+var_E8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+118h+var_E8] lea rsi, aParseError; "parse_error" lea rdi, [rsp+118h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_C01B8: mov edx, [rsp+118h+var_C] lea rdi, [rsp+118h+var_68]; int lea rsi, [rsp+118h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_C01D6: mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_C0] call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&) jmp short $+2 loc_C01EA: xor eax, eax mov esi, eax lea rdi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_C01FA: mov rcx, [rsp+118h+var_20] mov rax, rsp mov [rax], rcx lea rdx, aParseError_0; "parse error" lea r8, aSubtype+9; int lea rdi, [rsp+118h+var_48]; int lea rsi, [rsp+118h+var_68]; int lea rcx, [rsp+118h+var_C0]; int lea r9, [rsp+118h+var_E0]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&) jmp short $+2 loc_C0237: lea rdi, [rsp+118h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+118h+var_C] mov [rsp+118h+var_104], eax mov rax, [rsp+118h+var_18] mov rax, [rax] mov [rsp+118h+var_100], rax lea rdi, [rsp+118h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+118h+var_F8]; this mov esi, [rsp+118h+var_104]; int mov rdx, [rsp+118h+var_100]; unsigned __int64 mov rcx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(int,ulong,char const*) jmp short $+2 loc_C02B2: lea rdi, [rsp+118h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+118h+var_F0] add rsp, 118h retn mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C0357 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C034A mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C033D mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C0333 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C0333: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C033D: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C034A: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C0357: lea rdi, [rsp+arg_87] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_C0384 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C0384: mov rdi, [rsp+arg_78] call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( long long a1, int a2, unsigned long long *a3, void *a4, long long a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d const char *v13; // rax int v15; // [rsp+8h] [rbp-110h] int v16; // [rsp+10h] [rbp-108h] int v17; // [rsp+14h] [rbp-104h] int v18; // [rsp+18h] [rbp-100h] unsigned long long v19; // [rsp+18h] [rbp-100h] nlohmann::json_abi_v3_11_3::detail::parse_error *v20; // [rsp+20h] [rbp-F8h] int v21[8]; // [rsp+38h] [rbp-E0h] BYREF int v22[13]; // [rsp+58h] [rbp-C0h] BYREF char v23; // [rsp+8Fh] [rbp-89h] BYREF _BYTE v24[32]; // [rsp+90h] [rbp-88h] BYREF int v25[8]; // [rsp+B0h] [rbp-68h] BYREF int v26[8]; // [rsp+D0h] [rbp-48h] BYREF long long v27; // [rsp+F0h] [rbp-28h] void *v28; // [rsp+F8h] [rbp-20h] unsigned long long *v29; // [rsp+100h] [rbp-18h] int v30; // [rsp+10Ch] [rbp-Ch] long long v31; // [rsp+110h] [rbp-8h] v31 = a1; v30 = a2; v29 = a3; v28 = a4; v27 = a5; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v24, (long long)"parse_error", (long long)&v23); nlohmann::json_abi_v3_11_3::detail::exception::name(v25, (long long)v24, v30); nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11]( (unsigned int)v22, (_DWORD)v29, v5, v6, v7, v8); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((unsigned int)v21, 0, v9, v10, v11, v12); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>( (int)v26, (int)v25, (int)"parse error", (int)v22, (int)": ", (int)v21, v28, v15, v16, v18, a1); std::string::~string(v21); std::string::~string(v22); std::string::~string(v25); std::string::~string(v24); std::allocator<char>::~allocator(&v23); v17 = v30; v19 = *v29; v13 = (const char *)std::string::c_str(v26); nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(v20, v17, v19, v13); std::string::~string(v26); return a1; }
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: SUB RSP,0x118 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x110],RDI MOV dword ptr [RSP + 0x10c],ESI MOV qword ptr [RSP + 0x100],RDX MOV qword ptr [RSP + 0xf8],RCX MOV qword ptr [RSP + 0xf0],R8 LEA RDI,[RSP + 0x8f] MOV qword ptr [RSP + 0x30],RDI CALL 0x00152de0 MOV RDX,qword ptr [RSP + 0x30] LAB_001c01a2: LEA RSI,[0x2c55e4] LEA RDI,[RSP + 0x90] CALL 0x0015bc60 JMP 0x001c01b8 LAB_001c01b8: MOV EDX,dword ptr [RSP + 0x10c] LAB_001c01bf: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] CALL 0x001ad520 JMP 0x001c01d6 LAB_001c01d6: MOV RSI,qword ptr [RSP + 0x100] LAB_001c01de: LEA RDI,[RSP + 0x58] CALL 0x001cd520 JMP 0x001c01ea LAB_001c01ea: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x38] CALL 0x001cace0 JMP 0x001c01fa LAB_001c01fa: MOV RCX,qword ptr [RSP + 0xf8] LAB_001c0202: MOV RAX,RSP MOV qword ptr [RAX],RCX LEA RDX,[0x2c55f0] LEA R8,[0x2c69ed] LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xb0] LEA RCX,[RSP + 0x58] LEA R9,[RSP + 0x38] CALL 0x001cd430 JMP 0x001c0237 LAB_001c0237: LEA RDI,[RSP + 0x38] CALL 0x00153180 LEA RDI,[RSP + 0x58] CALL 0x00153180 LEA RDI,[RSP + 0xb0] CALL 0x00153180 LEA RDI,[RSP + 0x90] CALL 0x00153180 LEA RDI,[RSP + 0x8f] CALL 0x00153160 MOV EAX,dword ptr [RSP + 0x10c] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0xd0] CALL 0x001521a0 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x14] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RAX LAB_001c02ab: CALL 0x001cd5f0 LAB_001c02b0: JMP 0x001c02b2 LAB_001c02b2: LEA RDI,[RSP + 0xd0] CALL 0x00153180 MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0x118 RET
parse_error * _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (parse_error *param_1,int param_2,position_t *param_3,string *param_4,int8 param_5) { ulong uVar1; int iVar2; char *pcVar3; exception local_e0 [32]; parse_error local_c0 [55]; allocator local_89; string local_88 [32]; exception local_68 [32]; detail local_48 [32]; int8 local_28; string *local_20; position_t *local_18; int local_c; parse_error *local_8; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_c = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001c01a2 to 001c01b5 has its CatchHandler @ 001c02cc */ std::__cxx11::string::string<std::allocator<char>>(local_88,"parse_error",&local_89); /* try { // try from 001c01bf to 001c01d3 has its CatchHandler @ 001c02df */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_68,local_88,local_c); /* try { // try from 001c01de to 001c01e7 has its CatchHandler @ 001c02f2 */ nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_(local_c0,local_18); /* try { // try from 001c01ea to 001c01f7 has its CatchHandler @ 001c0305 */ nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_ (local_e0,(_func_decltype_nullptr *)0x0); /* try { // try from 001c0202 to 001c0234 has its CatchHandler @ 001c0318 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&> (local_48,(string *)local_68,"parse error",(string *)local_c0,": ",(string *)local_e0, local_20); std::__cxx11::string::~string((string *)local_e0); std::__cxx11::string::~string((string *)local_c0); std::__cxx11::string::~string((string *)local_68); std::__cxx11::string::~string(local_88); std::allocator<char>::~allocator((allocator<char> *)&local_89); iVar2 = local_c; uVar1 = *(ulong *)local_18; pcVar3 = (char *)std::__cxx11::string::c_str(); /* try { // try from 001c02ab to 001c02af has its CatchHandler @ 001c0366 */ nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(param_1,iVar2,uVar1,pcVar3); std::__cxx11::string::~string((string *)local_48); return param_1; }
47,909
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("parse_error", id_), "parse error", position_string(pos), ": ", exception::diagnostics(context), what_arg); return {id_, pos.chars_read_total, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x64e98(%rip), %rsi # 0xaeae5 leaq 0x64e9c(%rip), %rdx # 0xaeaf0 leaq 0x8(%rsp), %rdi callq 0x200f4 leaq 0x68(%rsp), %rdi leaq 0x8(%rsp), %rsi movl %ebp, %edx callq 0x41306 leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x4f174 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) movq %r15, (%rsp) leaq 0x64e54(%rip), %rdx # 0xaeaf1 leaq 0x6622a(%rip), %r8 # 0xafece leaq 0x88(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0x48(%rsp), %rcx leaq 0x28(%rsp), %r9 callq 0x4f06b movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x49cd7 movq 0x38(%rsp), %rsi incq %rsi callq 0x186e0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49cf2 movq 0x58(%rsp), %rsi incq %rsi callq 0x186e0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49d0d movq 0x78(%rsp), %rsi incq %rsi callq 0x186e0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x49d24 movq 0x18(%rsp), %rsi incq %rsi callq 0x186e0 movq (%r14), %r14 movq 0x88(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x41502 leaq 0x956f0(%rip), %rax # 0xdf430 addq $0x10, %rax movq %rax, (%rbx) movq %r14, 0x20(%rbx) leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49d6c movq 0x98(%rsp), %rsi incq %rsi callq 0x186e0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49e19 movq 0x98(%rsp), %rsi jmp 0x49e0c movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x49dbd movq 0x38(%rsp), %rsi incq %rsi callq 0x186e0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49ddd movq 0x58(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x49ddd movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x49dfd movq 0x78(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x49dfd movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x49e19 movq 0x18(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x49e19 movq %rax, %rbx movq %rbx, %rdi callq 0x18c10 nop
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea r12, [rsp+0D8h+var_C0] mov [r12-10h], r12 lea rsi, aParseError; "parse_error" lea rdx, aParseError+0Bh; "" lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0D8h+var_70]; int lea rsi, [rsp+0D8h+var_D0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0D8h+var_90]; int mov rsi, r14; int call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&) lea r13, [rsp+0D8h+var_A0] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 mov [rsp+0D8h+var_D8], r15 lea rdx, aParseError_0; "parse error" lea r8, aSubtype+9; ": " lea rdi, [rsp+0D8h+var_50] lea rsi, [rsp+0D8h+var_70] lea rcx, [rsp+0D8h+var_90] lea r9, [rsp+0D8h+var_B0] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&) mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, r13 jz short loc_49CD7 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49CD7: lea rax, [rsp+0D8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_49CF2 mov rsi, [rsp+0D8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49CF2: lea rax, [rsp+0D8h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_49D0D mov rsi, [rsp+0D8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49D0D: mov rdi, [rsp+0D8h+var_D0]; void * cmp rdi, r12 jz short loc_49D24 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49D24: mov r14, [r14] mov rdx, [rsp+0D8h+var_50]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail11parse_errorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::parse_error add rax, 10h mov [rbx], rax mov [rbx+20h], r14 lea rax, [rsp+0D8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_49D6C mov rsi, [rsp+0D8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49D6C: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_90] mov rdi, [rax-10h] cmp rdi, rax jz loc_49E19 mov rsi, [rsp+arg_90] jmp short loc_49E0C mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_49DBD mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49DBD: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_49DDD mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_49DDD mov rbx, rax loc_49DDD: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_49DFD mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_49DFD mov rbx, rax loc_49DFD: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_49E19 mov rsi, [rsp+arg_10] loc_49E0C: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_49E19 mov rbx, rax loc_49E19: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, long long *a3, long long a4) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v10; // r14 void *v12; // [rsp+0h] [rbp-D8h] void *v13[2]; // [rsp+8h] [rbp-D0h] BYREF _QWORD v14[2]; // [rsp+18h] [rbp-C0h] BYREF void *v15; // [rsp+28h] [rbp-B0h] BYREF long long v16; // [rsp+30h] [rbp-A8h] _QWORD v17[2]; // [rsp+38h] [rbp-A0h] BYREF int v18[4]; // [rsp+48h] [rbp-90h] BYREF long long v19; // [rsp+58h] [rbp-80h] BYREF int v20[4]; // [rsp+68h] [rbp-70h] BYREF long long v21; // [rsp+78h] [rbp-60h] BYREF char *v22; // [rsp+88h] [rbp-50h] BYREF long long v23; // [rsp+98h] [rbp-40h] BYREF v13[0] = v14; std::string::_M_construct<char const*>((long long)v13, "parse_error", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v20, (long long)v13, a2); nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11]( (int)v18, (int)a3, v6, v7, v8, v9, v12, (int)v13[0], (long long)v13[1], v14[0], (void *)v14[1], (int)v15, v16); v15 = v17; v16 = 0LL; LOBYTE(v17[0]) = 0; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>( (unsigned int)&v22, (unsigned int)v20, (unsigned int)"parse error", (unsigned int)v18, (unsigned int)": ", (unsigned int)&v15, a4); if ( v15 != v17 ) operator delete(v15, v17[0] + 1LL); if ( *(long long **)v18 != &v19 ) operator delete(*(void **)v18, v19 + 1); if ( *(long long **)v20 != &v21 ) operator delete(*(void **)v20, v21 + 1); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); v10 = *a3; nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v22); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::parse_error + 2; *((_QWORD *)this + 4) = v10; if ( v22 != (char *)&v23 ) operator delete(v22, v23 + 1); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LAB_00149c46: LEA RSI,[0x1aeae5] LEA RDX,[0x1aeaf0] LEA RDI,[RSP + 0x8] CALL 0x001200f4 LAB_00149c5e: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x8] MOV EDX,EBP CALL 0x00141306 LAB_00149c6f: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x0014f174 LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LAB_00149c92: MOV qword ptr [RSP],R15 LEA RDX,[0x1aeaf1] LEA R8,[0x1afece] LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x68] LEA RCX,[RSP + 0x48] LEA R9,[RSP + 0x28] CALL 0x0014f06b MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00149cd7 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186e0 LAB_00149cd7: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00149cf2 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001186e0 LAB_00149cf2: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00149d0d MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001186e0 LAB_00149d0d: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00149d24 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186e0 LAB_00149d24: MOV R14,qword ptr [R14] MOV RDX,qword ptr [RSP + 0x88] LAB_00149d2f: MOV RDI,RBX MOV ESI,EBP CALL 0x00141502 LAB_00149d39: LEA RAX,[0x1df430] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x20],R14 LEA RAX,[RSP + 0x98] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00149d6c MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x001186e0 LAB_00149d6c: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (exception *param_1,int param_2,position_t *param_3,string *param_4) { int8 uVar1; long *local_d0 [2]; long local_c0 [2]; int1 *local_b0; int8 local_a8; int1 local_a0; int7 uStack_9f; long *local_90 [2]; long local_80 [2]; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; /* try { // try from 00149c46 to 00149c5d has its CatchHandler @ 00149e16 */ local_d0[0] = local_c0; std::__cxx11::string::_M_construct<char_const*>(local_d0,"parse_error",""); /* try { // try from 00149c5e to 00149c6e has its CatchHandler @ 00149dfa */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_70,(string *)local_d0,param_2); /* try { // try from 00149c6f to 00149c7b has its CatchHandler @ 00149dda */ nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ ((parse_error *)local_90,param_3); local_a8 = 0; local_a0 = 0; /* try { // try from 00149c92 to 00149cbf has its CatchHandler @ 00149da3 */ local_b0 = &local_a0; nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_50,(string *)local_70,"parse error",(string *)local_90,": ", (string *)&local_b0,param_4); if (local_b0 != &local_a0) { operator_delete(local_b0,CONCAT71(uStack_9f,local_a0) + 1); } if (local_90[0] != local_80) { operator_delete(local_90[0],local_80[0] + 1); } if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } if (local_d0[0] != local_c0) { operator_delete(local_d0[0],local_c0[0] + 1); } uVar1 = *(int8 *)param_3; /* try { // try from 00149d2f to 00149d38 has its CatchHandler @ 00149d81 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,(char *)local_50[0]); *(int ***)param_1 = &PTR__exception_001df440; *(int8 *)(param_1 + 0x20) = uVar1; if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return param_1; }
47,910
ma_pvio_start_ssl
eloqsql/libmariadb/libmariadb/ma_pvio.c
my_bool ma_pvio_start_ssl(MARIADB_PVIO *pvio) { if (!pvio || !pvio->mysql) return 1; CLEAR_CLIENT_ERROR(pvio->mysql); if (!(pvio->ctls= ma_pvio_tls_init(pvio->mysql))) { return 1; } if (ma_pvio_tls_connect(pvio->ctls)) { free(pvio->ctls); pvio->ctls= NULL; return 1; } /* default behaviour: 1. peer certificate verification 2. verify CN (requires option ssl_verify_check) 3. verrify finger print */ if ((pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && ma_pvio_tls_verify_server_cert(pvio->ctls)) return 1; if (pvio->mysql->options.extension && ((pvio->mysql->options.extension->tls_fp && pvio->mysql->options.extension->tls_fp[0]) || (pvio->mysql->options.extension->tls_fp_list && pvio->mysql->options.extension->tls_fp_list[0]))) { if (ma_pvio_tls_check_fp(pvio->ctls, pvio->mysql->options.extension->tls_fp, pvio->mysql->options.extension->tls_fp_list)) return 1; } return 0; }
O0
c
ma_pvio_start_ssl: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x889ee movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0x889f7 movb $0x1, -0x1(%rbp) jmp 0x88bb9 jmp 0x889f9 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl $0x0, 0x90(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0xe0b70(%rip), %rsi # 0x169591 callq 0x60480 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movb $0x0, 0x97(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0x88a5d movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x88a5f movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi callq 0x88c90 movq -0x10(%rbp), %rcx movq %rax, 0x38(%rcx) cmpq $0x0, %rax jne 0x88a83 movb $0x1, -0x1(%rbp) jmp 0x88bb9 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x88d40 cmpb $0x0, %al je 0x88ab6 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x601e0 movq -0x10(%rbp), %rax movq $0x0, 0x38(%rax) movb $0x1, -0x1(%rbp) jmp 0x88bb9 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x368(%rax), %rax andq $0x40000000, %rax # imm = 0x40000000 cmpq $0x0, %rax je 0x88aec movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x88df0 cmpl $0x0, %eax je 0x88aec movb $0x1, -0x1(%rbp) jmp 0x88bb9 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x88bb5 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x90(%rax) je 0x88b39 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x90(%rax), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x88b70 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x98(%rax) je 0x88bb5 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x98(%rax), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x88bb5 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x90(%rax), %rsi movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x98(%rax), %rdx callq 0x88ec0 cmpb $0x0, %al je 0x88bb3 movb $0x1, -0x1(%rbp) jmp 0x88bb9 jmp 0x88bb5 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_pvio_start_ssl: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jz short loc_889EE mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jnz short loc_889F7 loc_889EE: mov [rbp+var_1], 1 jmp loc_88BB9 loc_889F7: jmp short $+2 loc_889F9: mov rax, [rbp+var_10] mov rax, [rax+40h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_10] mov rdi, [rax+40h] add rdi, 297h lea rsi, a000000+1; "00000" call _strcpy mov rax, [rbp+var_10] mov rax, [rax+40h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+2A0h], 0 jz short loc_88A5D mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_88A5D: jmp short $+2 loc_88A5F: mov rax, [rbp+var_10] mov rdi, [rax+40h] call ma_pvio_tls_init mov rcx, [rbp+var_10] mov [rcx+38h], rax cmp rax, 0 jnz short loc_88A83 mov [rbp+var_1], 1 jmp loc_88BB9 loc_88A83: mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_pvio_tls_connect cmp al, 0 jz short loc_88AB6 mov rax, [rbp+var_10] mov rdi, [rax+38h] call _free mov rax, [rbp+var_10] mov qword ptr [rax+38h], 0 mov [rbp+var_1], 1 jmp loc_88BB9 loc_88AB6: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+368h] and rax, 40000000h cmp rax, 0 jz short loc_88AEC mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_pvio_tls_verify_server_cert cmp eax, 0 jz short loc_88AEC mov [rbp+var_1], 1 jmp loc_88BB9 loc_88AEC: mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz loc_88BB5 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+90h], 0 jz short loc_88B39 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+90h] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_88B70 loc_88B39: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+98h], 0 jz short loc_88BB5 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+98h] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_88BB5 loc_88B70: mov rax, [rbp+var_10] mov rdi, [rax+38h] mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rsi, [rax+90h] mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rdx, [rax+98h] call ma_pvio_tls_check_fp cmp al, 0 jz short loc_88BB3 mov [rbp+var_1], 1 jmp short loc_88BB9 loc_88BB3: jmp short $+2 loc_88BB5: mov [rbp+var_1], 0 loc_88BB9: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
bool ma_pvio_start_ssl(long long a1) { long long v1; // rax if ( !a1 || !*(_QWORD *)(a1 + 64) ) return 1; *(_DWORD *)(*(_QWORD *)(a1 + 64) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 64) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 64) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 64) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 672LL) + 4LL) = 0; v1 = ma_pvio_tls_init(*(_QWORD *)(a1 + 64)); *(_QWORD *)(a1 + 56) = v1; if ( !v1 ) return 1; if ( !(unsigned __int8)ma_pvio_tls_connect(*(_QWORD *)(a1 + 56)) ) return (*(_QWORD *)(*(_QWORD *)(a1 + 64) + 872LL) & 0x40000000LL) != 0 && (unsigned int)ma_pvio_tls_verify_server_cert(*(_QWORD *)(a1 + 56)) || *(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) && (*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL) && **(_BYTE **)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL) || *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL) && **(_BYTE **)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL)) && (unsigned __int8)ma_pvio_tls_check_fp( *(_QWORD *)(a1 + 56), *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL), *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL)); free(*(_QWORD *)(a1 + 56)); *(_QWORD *)(a1 + 56) = 0LL; return 1; }
ma_pvio_start_ssl: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JZ 0x001889ee MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001889f7 LAB_001889ee: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00188bb9 LAB_001889f7: JMP 0x001889f9 LAB_001889f9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] ADD RDI,0x297 LEA RSI,[0x269591] CALL 0x00160480 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x00188a5d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_00188a5d: JMP 0x00188a5f LAB_00188a5f: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] CALL 0x00188c90 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x38],RAX CMP RAX,0x0 JNZ 0x00188a83 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00188bb9 LAB_00188a83: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00188d40 CMP AL,0x0 JZ 0x00188ab6 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00188bb9 LAB_00188ab6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x368] AND RAX,0x40000000 CMP RAX,0x0 JZ 0x00188aec MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00188df0 CMP EAX,0x0 JZ 0x00188aec MOV byte ptr [RBP + -0x1],0x1 JMP 0x00188bb9 LAB_00188aec: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00188bb5 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x90],0x0 JZ 0x00188b39 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x90] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00188b70 LAB_00188b39: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x98],0x0 JZ 0x00188bb5 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x98] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00188bb5 LAB_00188b70: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RSI,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RDX,qword ptr [RAX + 0x98] CALL 0x00188ec0 CMP AL,0x0 JZ 0x00188bb3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00188bb9 LAB_00188bb3: JMP 0x00188bb5 LAB_00188bb5: MOV byte ptr [RBP + -0x1],0x0 LAB_00188bb9: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 ma_pvio_start_ssl(long param_1) { char cVar1; int iVar2; long lVar3; int1 local_9; if ((param_1 == 0) || (*(long *)(param_1 + 0x40) == 0)) { local_9 = 1; } else { *(int4 *)(*(long *)(param_1 + 0x40) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x40) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x40) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x40) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x2a0) + 4) = 0; } lVar3 = ma_pvio_tls_init(*(int8 *)(param_1 + 0x40)); *(long *)(param_1 + 0x38) = lVar3; if (lVar3 == 0) { local_9 = 1; } else { cVar1 = ma_pvio_tls_connect(*(int8 *)(param_1 + 0x38)); if (cVar1 == '\0') { if (((*(ulong *)(*(long *)(param_1 + 0x40) + 0x368) & 0x40000000) == 0) || (iVar2 = ma_pvio_tls_verify_server_cert(*(int8 *)(param_1 + 0x38)), iVar2 == 0)) { if (((*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0) || (((*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90) == 0 || (**(char **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90) == '\0')) && ((*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98) == 0 || (**(char **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98) == '\0')))))) || (cVar1 = ma_pvio_tls_check_fp (*(int8 *)(param_1 + 0x38), *(int8 *) (*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90), *(int8 *) (*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98)), cVar1 == '\0')) { local_9 = 0; } else { local_9 = 1; } } else { local_9 = 1; } } else { free(*(void **)(param_1 + 0x38)); *(int8 *)(param_1 + 0x38) = 0; local_9 = 1; } } } return local_9; }
47,911
gguf_set_val_u16
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u16(struct gguf_context * ctx, const char * key, uint16_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O1
cpp
gguf_set_val_u16: pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq %rsi, 0x10(%rsp) movw %dx, 0xc(%rsp) leaq 0x18(%rsp), %r14 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x18d70 leaq 0x1d68d(%rip), %rsi # 0x5d061 movq %r14, %rdi callq 0x18220 testl %eax, %eax je 0x3fa27 leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f9fb movq 0x28(%rsp), %rsi incq %rsi callq 0x180e0 leaq 0x10(%rsp), %r14 movq (%r14), %rsi movq %rbx, %rdi callq 0x186c0 addq $0x8, %rbx leaq 0xc(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x179a0 addq $0x38, %rsp popq %rbx popq %r14 retq leaq 0x1d5bf(%rip), %rdi # 0x5cfed leaq 0x1e0c1(%rip), %rdx # 0x5daf6 movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x18ce0 movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3fa5f movq 0x28(%rsp), %rsi incq %rsi callq 0x180e0 movq %rbx, %rdi callq 0x18ea0
gguf_set_val_u16: push r14 push rbx sub rsp, 38h mov rbx, rdi mov [rsp+48h+var_38], rsi mov [rsp+48h+var_3C], dx lea r14, [rsp+48h+var_30] lea rdx, [rsp+48h+var_39] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_3FA27 lea rax, [rsp+48h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F9FB mov rsi, [rsp+48h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F9FB: lea r14, [rsp+48h+var_38] mov rsi, [r14] mov rdi, rbx call _gguf_remove_key add rbx, 8 lea rdx, [rsp+48h+var_3C] mov rdi, rbx mov rsi, r14 call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRtEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,ushort &>(char const*&,ushort &) add rsp, 38h pop rbx pop r14 retn loc_3FA27: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rax, [rsp+48h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3FA5F mov rsi, [rsp+48h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3FA5F: mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u16(long long a1, long long a2, __int16 a3) { int v3; // ecx int v4; // r8d int v5; // r9d __int16 v7; // [rsp+Ch] [rbp-3Ch] BYREF char v8; // [rsp+Fh] [rbp-39h] BYREF long long v9; // [rsp+10h] [rbp-38h] BYREF void *v10[2]; // [rsp+18h] [rbp-30h] BYREF long long v11; // [rsp+28h] [rbp-20h] BYREF v9 = a2; v7 = a3; std::string::basic_string<std::allocator<char>>(v10, a2, &v8); if ( !(unsigned int)std::string::compare(v10, "general.alignment") ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (unsigned int)"general.alignment must be type u32", v3, v4, v5); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); gguf_remove_key(a1, v9); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned short &>(a1 + 8, &v9, &v7); }
gguf_set_val_u16: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV qword ptr [RSP + 0x10],RSI MOV word ptr [RSP + 0xc],DX LEA R14,[RSP + 0x18] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00118d70 LEA RSI,[0x15d061] MOV RDI,R14 CALL 0x00118220 TEST EAX,EAX JZ 0x0013fa27 LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013f9fb MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001180e0 LAB_0013f9fb: LEA R14,[RSP + 0x10] MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x001186c0 ADD RBX,0x8 LEA RDX,[RSP + 0xc] MOV RDI,RBX MOV RSI,R14 CALL 0x001179a0 ADD RSP,0x38 POP RBX POP R14 RET LAB_0013fa27: LEA RDI,[0x15cfed] LEA RDX,[0x15daf6] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x00118ce0
void gguf_set_val_u16(long param_1,char *param_2,ushort param_3) { int iVar1; ushort local_3c; allocator local_39; char *local_38; long *local_30 [2]; long local_20 [2]; local_3c = param_3; local_38 = param_2; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_2,&local_39); iVar1 = std::__cxx11::string::compare((string *)local_30,"general.alignment"); if (iVar1 != 0) { if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } gguf_remove_key(param_1,local_38); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_short&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_38,&local_3c); return; } /* try { // try from 0013fa27 to 0013fa40 has its CatchHandler @ 0013fa41 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
47,912
gguf_set_val_u16
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u16(struct gguf_context * ctx, const char * key, uint16_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O2
cpp
gguf_set_val_u16: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movw %dx, 0x4(%rsp) leaq 0x10(%rsp), %r15 leaq 0x7(%rsp), %rdx movq %r15, %rdi callq 0x1fa80 leaq 0x1d839(%rip), %rsi # 0x5f2c1 movq %r15, %rdi callq 0x20210 testb %al, %al jne 0x41ac9 leaq 0x10(%rsp), %rdi callq 0x1eab0 movq %rbx, %rdi movq %r14, %rsi callq 0x1f0d0 addq $0x8, %rbx leaq 0x8(%rsp), %rsi leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x1ddc0 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1d77d(%rip), %rdi # 0x5f24d leaq 0x1eb24(%rip), %rdx # 0x605fb movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x1f9b0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1eab0 movq %rbx, %rdi callq 0x1fc10
gguf_set_val_u16: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_44], dx lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_41] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_41AC9 lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_44] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRtEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,ushort &>(char const*&,ushort &) add rsp, 30h pop rbx pop r14 pop r15 retn loc_41AC9: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u16( long long a1, long long a2, __int16 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // rdx char v18; // [rsp+0h] [rbp-48h] __int16 v19; // [rsp+4h] [rbp-44h] BYREF char v20; // [rsp+7h] [rbp-41h] BYREF long long v21; // [rsp+8h] [rbp-40h] BYREF _BYTE v22[56]; // [rsp+10h] [rbp-38h] BYREF v21 = a2; v19 = a3; std::string::basic_string<std::allocator<char>>(v22, a2, &v20); if ( (unsigned __int8)std::operator==<char>(v22, "general.alignment") ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (long long)"general.alignment must be type u32", v11, v12, v13, a4, a5, a6, a7, v14, v15, a10, a11, v18); std::string::~string(v22); gguf_remove_key(a1, a2, v16); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned short &>(a1 + 8, &v21, &v19); }
gguf_set_val_u16: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV word ptr [RSP + 0x4],DX LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0x7] MOV RDI,R15 CALL 0x0011fa80 LEA RSI,[0x15f2c1] MOV RDI,R15 CALL 0x00120210 TEST AL,AL JNZ 0x00141ac9 LEA RDI,[RSP + 0x10] CALL 0x0011eab0 MOV RDI,RBX MOV RSI,R14 CALL 0x0011f0d0 ADD RBX,0x8 LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x4] MOV RDI,RBX CALL 0x0011ddc0 ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_00141ac9: LEA RDI,[0x15f24d] LEA RDX,[0x1605fb] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x0011f9b0
void gguf_set_val_u16(long param_1,char *param_2,ushort param_3) { bool bVar1; ushort local_44; allocator local_41; char *local_40; string local_38 [32]; local_44 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_41); bVar1 = std::operator==(local_38,"general.alignment"); if (!bVar1) { std::__cxx11::string::~string(local_38); gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_short&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_44); return; } /* try { // try from 00141ac9 to 00141ae2 has its CatchHandler @ 00141ae3 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
47,913
gguf_set_val_u16
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u16(struct gguf_context * ctx, const char * key, uint16_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O3
cpp
gguf_set_val_u16: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movw %dx, 0x4(%rsp) leaq 0x10(%rsp), %r15 leaq 0x7(%rsp), %rdx movq %r15, %rdi callq 0x17d60 leaq 0x1e4e7(%rip), %rsi # 0x5d551 movq %r15, %rdi callq 0x17210 testl %eax, %eax je 0x3f0bc leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f091 movq 0x20(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi movq %r14, %rsi callq 0x176b0 addq $0x8, %rbx leaq 0x8(%rsp), %rsi leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x169a0 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1e41a(%rip), %rdi # 0x5d4dd leaq 0x1ef1c(%rip), %rdx # 0x5dfe6 movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x17cd0 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f0f4 movq 0x20(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi callq 0x17e90
gguf_set_val_u16: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_44], dx lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_41] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_3F0BC lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F091 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F091: mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_44] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRtEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,ushort &>(char const*&,ushort &) add rsp, 30h pop rbx pop r14 pop r15 retn loc_3F0BC: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F0F4 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F0F4: mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u16(long long a1, long long a2, __int16 a3) { int v3; // ecx int v4; // r8d int v5; // r9d __int16 v7; // [rsp+4h] [rbp-44h] BYREF char v8; // [rsp+7h] [rbp-41h] BYREF long long v9; // [rsp+8h] [rbp-40h] BYREF void *v10[2]; // [rsp+10h] [rbp-38h] BYREF long long v11; // [rsp+20h] [rbp-28h] BYREF v9 = a2; v7 = a3; std::string::basic_string<std::allocator<char>>(v10, a2, &v8); if ( !(unsigned int)std::string::compare(v10, "general.alignment") ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (unsigned int)"general.alignment must be type u32", v3, v4, v5); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); gguf_remove_key(a1, a2); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned short &>(a1 + 8, &v9, &v7); }
gguf_set_val_u16: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV word ptr [RSP + 0x4],DX LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0x7] MOV RDI,R15 CALL 0x00117d60 LEA RSI,[0x15d551] MOV RDI,R15 CALL 0x00117210 TEST EAX,EAX JZ 0x0013f0bc LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013f091 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001170d0 LAB_0013f091: MOV RDI,RBX MOV RSI,R14 CALL 0x001176b0 ADD RBX,0x8 LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x4] MOV RDI,RBX CALL 0x001169a0 ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_0013f0bc: LEA RDI,[0x15d4dd] LEA RDX,[0x15dfe6] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x00117cd0
void gguf_set_val_u16(long param_1,char *param_2,ushort param_3) { int iVar1; ushort local_44; allocator local_41; char *local_40; long *local_38 [2]; long local_28 [2]; local_44 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_2,&local_41); iVar1 = std::__cxx11::string::compare((string *)local_38,"general.alignment"); if (iVar1 != 0) { if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_short&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_44); return; } /* try { // try from 0013f0bc to 0013f0d5 has its CatchHandler @ 0013f0d6 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
47,914
ma_tls_set_certs
eloqsql/libmariadb/libmariadb/secure/openssl.c
static int ma_tls_set_certs(MYSQL *mysql, SSL_CTX *ctx) { char *certfile= mysql->options.ssl_cert, *keyfile= mysql->options.ssl_key; char *pw= (mysql->options.extension) ? mysql->options.extension->tls_pw : NULL; /* add cipher */ if ((mysql->options.ssl_cipher && mysql->options.ssl_cipher[0] != 0)) { if( #ifdef TLS1_3_VERSION SSL_CTX_set_ciphersuites(ctx, mysql->options.ssl_cipher) == 0 && #endif SSL_CTX_set_cipher_list(ctx, mysql->options.ssl_cipher) == 0) goto error; } /* ca_file and ca_path */ if (!SSL_CTX_load_verify_locations(ctx, mysql->options.ssl_ca, mysql->options.ssl_capath)) { if (mysql->options.ssl_ca || mysql->options.ssl_capath) goto error; if (SSL_CTX_set_default_verify_paths(ctx) == 0) goto error; } if (mysql->options.extension && (mysql->options.extension->ssl_crl || mysql->options.extension->ssl_crlpath)) { X509_STORE *certstore; if ((certstore= SSL_CTX_get_cert_store(ctx))) { if (X509_STORE_load_locations(certstore, mysql->options.extension->ssl_crl, mysql->options.extension->ssl_crlpath) == 0) goto error; if (X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL) == 0) goto error; } } if (keyfile && !certfile) certfile= keyfile; if (certfile && !keyfile) keyfile= certfile; /* set cert */ if (certfile && certfile[0] != 0) { if (SSL_CTX_use_certificate_chain_file(ctx, certfile) != 1) { goto error; } } if (keyfile && keyfile[0]) { FILE *fp; if ((fp= fopen(keyfile, "rb"))) { EVP_PKEY *key= EVP_PKEY_new(); PEM_read_PrivateKey(fp, &key, NULL, pw); fclose(fp); if (SSL_CTX_use_PrivateKey(ctx, key) != 1) { unsigned long err= ERR_peek_error(); EVP_PKEY_free(key); if (!(ERR_GET_LIB(err) == ERR_LIB_X509 && ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE)) goto error; } EVP_PKEY_free(key); } else { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, CER(CR_FILE_NOT_FOUND), keyfile); return 1; } } /* verify key */ if (certfile && SSL_CTX_check_private_key(ctx) != 1) goto error; SSL_CTX_set_verify(ctx, (mysql->options.ssl_ca || mysql->options.ssl_capath) ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL); return 0; error: ma_tls_set_error(mysql); return 1; }
O0
c
ma_tls_set_certs: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x408(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x400(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x36d64 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0xa0(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x36d6c xorl %eax, %eax movq %rax, -0x58(%rbp) jmp 0x36d6c movq -0x58(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x420(%rax) je 0x36dce movq -0x10(%rbp), %rax movq 0x420(%rax), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x36dce movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x420(%rax), %rsi callq 0x13500 cmpl $0x0, %eax jne 0x36dcc movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x420(%rax), %rsi callq 0x13400 cmpl $0x0, %eax jne 0x36dcc jmp 0x37062 jmp 0x36dce movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x410(%rax), %rsi movq -0x10(%rbp), %rax movq 0x418(%rax), %rdx callq 0x13550 cmpl $0x0, %eax jne 0x36e28 movq -0x10(%rbp), %rax cmpq $0x0, 0x410(%rax) jne 0x36e0e movq -0x10(%rbp), %rax cmpq $0x0, 0x418(%rax) je 0x36e13 jmp 0x37062 movq -0x18(%rbp), %rdi callq 0x134a0 cmpl $0x0, %eax jne 0x36e26 jmp 0x37062 jmp 0x36e28 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x36ebe movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x10(%rax) jne 0x36e5e movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x18(%rax) je 0x36ebe movq -0x18(%rbp), %rdi callq 0x137d0 movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x36ebc movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x18(%rax), %rdx callq 0x13800 cmpl $0x0, %eax jne 0x36ea2 jmp 0x37062 movq -0x38(%rbp), %rdi movl $0xc, %esi callq 0x132f0 cmpl $0x0, %eax jne 0x36eba jmp 0x37062 jmp 0x36ebc jmp 0x36ebe cmpq $0x0, -0x28(%rbp) je 0x36ed4 cmpq $0x0, -0x20(%rbp) jne 0x36ed4 movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x36eea cmpq $0x0, -0x28(%rbp) jne 0x36eea movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) je 0x36f16 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x36f16 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x13350 cmpl $0x1, %eax je 0x36f14 jmp 0x37062 jmp 0x36f16 cmpq $0x0, -0x28(%rbp) je 0x36ff8 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x36ff8 movq -0x28(%rbp), %rdi leaq 0x14f9c(%rip), %rsi # 0x4bed8 callq 0x134d0 movq %rax, -0x40(%rbp) cmpq $0x0, %rax je 0x36fc4 callq 0x13740 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x30(%rbp), %rcx leaq -0x48(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x132e0 movq -0x40(%rbp), %rdi callq 0x13420 movq -0x18(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x13380 cmpl $0x1, %eax je 0x36fb9 callq 0x130c0 movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rdi callq 0x132b0 movq -0x50(%rbp), %rdi callq 0x37b90 cmpl $0xb, %eax jne 0x36fb2 movq -0x50(%rbp), %rdi callq 0x37bd0 cmpl $0x65, %eax je 0x36fb7 jmp 0x37062 jmp 0x36fb9 movq -0x48(%rbp), %rdi callq 0x132b0 jmp 0x36ff6 movq -0x10(%rbp), %rdi leaq 0x28f41(%rip), %rax # 0x5ff10 movq (%rax), %rdx leaq 0x29147(%rip), %rax # 0x60120 movq 0x20(%rax), %rcx movq -0x28(%rbp), %r8 movl $0x7ea, %esi # imm = 0x7EA movb $0x0, %al callq 0x160f0 movl $0x1, -0x4(%rbp) jmp 0x37072 jmp 0x36ff8 cmpq $0x0, -0x20(%rbp) je 0x3700f movq -0x18(%rbp), %rdi callq 0x13710 cmpl $0x1, %eax je 0x3700f jmp 0x37062 movq -0x18(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rcx movb $0x1, %al cmpq $0x0, 0x410(%rcx) movb %al, -0x59(%rbp) jne 0x3703c movq -0x10(%rbp), %rax cmpq $0x0, 0x418(%rax) setne %al movb %al, -0x59(%rbp) movq -0x68(%rbp), %rdi movb -0x59(%rbp), %cl xorl %esi, %esi movl $0x1, %eax testb $0x1, %cl cmovnel %eax, %esi xorl %eax, %eax movl %eax, %edx callq 0x13120 movl $0x0, -0x4(%rbp) jmp 0x37072 movq -0x10(%rbp), %rdi callq 0x372c0 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopl (%rax,%rax)
ma_tls_set_certs: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+408h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+400h] mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_36D64 mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+0A0h] mov [rbp+var_58], rax jmp short loc_36D6C loc_36D64: xor eax, eax mov [rbp+var_58], rax jmp short $+2 loc_36D6C: mov rax, [rbp+var_58] mov [rbp+var_30], rax mov rax, [rbp+var_10] cmp qword ptr [rax+420h], 0 jz short loc_36DCE mov rax, [rbp+var_10] mov rax, [rax+420h] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_36DCE mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+420h] call _SSL_CTX_set_ciphersuites cmp eax, 0 jnz short loc_36DCC mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+420h] call _SSL_CTX_set_cipher_list cmp eax, 0 jnz short loc_36DCC jmp loc_37062 loc_36DCC: jmp short $+2 loc_36DCE: mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+410h] mov rax, [rbp+var_10] mov rdx, [rax+418h] call _SSL_CTX_load_verify_locations cmp eax, 0 jnz short loc_36E28 mov rax, [rbp+var_10] cmp qword ptr [rax+410h], 0 jnz short loc_36E0E mov rax, [rbp+var_10] cmp qword ptr [rax+418h], 0 jz short loc_36E13 loc_36E0E: jmp loc_37062 loc_36E13: mov rdi, [rbp+var_18] call _SSL_CTX_set_default_verify_paths cmp eax, 0 jnz short loc_36E26 jmp loc_37062 loc_36E26: jmp short $+2 loc_36E28: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz loc_36EBE mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+10h], 0 jnz short loc_36E5E mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+18h], 0 jz short loc_36EBE loc_36E5E: mov rdi, [rbp+var_18] call _SSL_CTX_get_cert_store mov [rbp+var_38], rax cmp rax, 0 jz short loc_36EBC mov rdi, [rbp+var_38] mov rax, [rbp+var_10] mov rax, [rax+480h] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+480h] mov rdx, [rax+18h] call _X509_STORE_load_locations cmp eax, 0 jnz short loc_36EA2 jmp loc_37062 loc_36EA2: mov rdi, [rbp+var_38] mov esi, 0Ch call _X509_STORE_set_flags cmp eax, 0 jnz short loc_36EBA jmp loc_37062 loc_36EBA: jmp short $+2 loc_36EBC: jmp short $+2 loc_36EBE: cmp [rbp+var_28], 0 jz short loc_36ED4 cmp [rbp+var_20], 0 jnz short loc_36ED4 mov rax, [rbp+var_28] mov [rbp+var_20], rax loc_36ED4: cmp [rbp+var_20], 0 jz short loc_36EEA cmp [rbp+var_28], 0 jnz short loc_36EEA mov rax, [rbp+var_20] mov [rbp+var_28], rax loc_36EEA: cmp [rbp+var_20], 0 jz short loc_36F16 mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_36F16 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _SSL_CTX_use_certificate_chain_file cmp eax, 1 jz short loc_36F14 jmp loc_37062 loc_36F14: jmp short $+2 loc_36F16: cmp [rbp+var_28], 0 jz loc_36FF8 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 0 jz loc_36FF8 mov rdi, [rbp+var_28] lea rsi, aRb; "rb" call _fopen64 mov [rbp+var_40], rax cmp rax, 0 jz short loc_36FC4 call _EVP_PKEY_new mov [rbp+var_48], rax mov rdi, [rbp+var_40] mov rcx, [rbp+var_30] lea rsi, [rbp+var_48] xor eax, eax mov edx, eax call _PEM_read_PrivateKey mov rdi, [rbp+var_40] call _fclose mov rdi, [rbp+var_18] mov rsi, [rbp+var_48] call _SSL_CTX_use_PrivateKey cmp eax, 1 jz short loc_36FB9 call _ERR_peek_error mov [rbp+var_50], rax mov rdi, [rbp+var_48] call _EVP_PKEY_free mov rdi, [rbp+var_50] call ERR_GET_LIB cmp eax, 0Bh jnz short loc_36FB2 mov rdi, [rbp+var_50] call ERR_GET_REASON cmp eax, 65h ; 'e' jz short loc_36FB7 loc_36FB2: jmp loc_37062 loc_36FB7: jmp short $+2 loc_36FB9: mov rdi, [rbp+var_48] call _EVP_PKEY_free jmp short loc_36FF6 loc_36FC4: mov rdi, [rbp+var_10] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, mariadb_client_errors mov rcx, [rax+20h] mov r8, [rbp+var_28] mov esi, 7EAh mov al, 0 call my_set_error mov [rbp+var_4], 1 jmp short loc_37072 loc_36FF6: jmp short $+2 loc_36FF8: cmp [rbp+var_20], 0 jz short loc_3700F mov rdi, [rbp+var_18] call _SSL_CTX_check_private_key cmp eax, 1 jz short loc_3700F jmp short loc_37062 loc_3700F: mov rax, [rbp+var_18] mov [rbp+var_68], rax mov rcx, [rbp+var_10] mov al, 1 cmp qword ptr [rcx+410h], 0 mov [rbp+var_59], al jnz short loc_3703C mov rax, [rbp+var_10] cmp qword ptr [rax+418h], 0 setnz al mov [rbp+var_59], al loc_3703C: mov rdi, [rbp+var_68] mov cl, [rbp+var_59] xor esi, esi mov eax, 1 test cl, 1 cmovnz esi, eax xor eax, eax mov edx, eax call _SSL_CTX_set_verify mov [rbp+var_4], 0 jmp short loc_37072 loc_37062: mov rdi, [rbp+var_10] call ma_tls_set_error mov [rbp+var_4], 1 loc_37072: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long ma_tls_set_certs(_QWORD *a1, long long a2) { bool v3; // [rsp+17h] [rbp-59h] long long v4; // [rsp+18h] [rbp-58h] long long v5; // [rsp+20h] [rbp-50h] long long v6; // [rsp+28h] [rbp-48h] BYREF long long v7; // [rsp+30h] [rbp-40h] long long cert_store; // [rsp+38h] [rbp-38h] long long v9; // [rsp+40h] [rbp-30h] _BYTE *v10; // [rsp+48h] [rbp-28h] _BYTE *v11; // [rsp+50h] [rbp-20h] long long v12; // [rsp+58h] [rbp-18h] _QWORD *v13; // [rsp+60h] [rbp-10h] v13 = a1; v12 = a2; v11 = (_BYTE *)a1[129]; v10 = (_BYTE *)a1[128]; if ( a1[144] ) v4 = *(_QWORD *)(v13[144] + 160LL); else v4 = 0LL; v9 = v4; if ( v13[132] && *(_BYTE *)v13[132] && !(unsigned int)SSL_CTX_set_ciphersuites(v12, v13[132]) && !(unsigned int)SSL_CTX_set_cipher_list(v12, v13[132]) ) { goto LABEL_42; } if ( !(unsigned int)SSL_CTX_load_verify_locations(v12, v13[130], v13[131]) && (v13[130] || v13[131] || !(unsigned int)SSL_CTX_set_default_verify_paths(v12)) ) { goto LABEL_42; } if ( v13[144] && (*(_QWORD *)(v13[144] + 16LL) || *(_QWORD *)(v13[144] + 24LL)) ) { cert_store = SSL_CTX_get_cert_store(v12); if ( cert_store ) { if ( !(unsigned int)X509_STORE_load_locations( cert_store, *(_QWORD *)(v13[144] + 16LL), *(_QWORD *)(v13[144] + 24LL)) || !(unsigned int)X509_STORE_set_flags(cert_store, 12LL) ) { goto LABEL_42; } } } if ( v10 && !v11 ) v11 = v10; if ( v11 && !v10 ) v10 = v11; if ( v11 && *v11 && (unsigned int)SSL_CTX_use_certificate_chain_file(v12, v11) != 1 ) goto LABEL_42; if ( v10 && *v10 ) { v7 = fopen64(v10, "rb"); if ( !v7 ) { my_set_error((long long)v13, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)mariadb_client_errors[4], v10); return 1; } v6 = EVP_PKEY_new(); PEM_read_PrivateKey(v7, &v6, 0LL, v9); fclose(v7); if ( (unsigned int)SSL_CTX_use_PrivateKey(v12, v6) != 1 ) { v5 = ERR_peek_error(); EVP_PKEY_free(v6); if ( (unsigned int)ERR_GET_LIB(v5) != 11 || (unsigned int)ERR_GET_REASON(v5) != 101 ) goto LABEL_42; } EVP_PKEY_free(v6); } if ( v11 && (unsigned int)SSL_CTX_check_private_key(v12) != 1 ) { LABEL_42: ma_tls_set_error(v13); return 1; } v3 = 1; if ( !v13[130] ) v3 = v13[131] != 0LL; SSL_CTX_set_verify(v12, v3, 0LL); return 0; }
ma_tls_set_certs: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x408] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x400] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00136d64 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x58],RAX JMP 0x00136d6c LAB_00136d64: XOR EAX,EAX MOV qword ptr [RBP + -0x58],RAX JMP 0x00136d6c LAB_00136d6c: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x420],0x0 JZ 0x00136dce MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x420] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00136dce MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x420] CALL 0x00113500 CMP EAX,0x0 JNZ 0x00136dcc MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x420] CALL 0x00113400 CMP EAX,0x0 JNZ 0x00136dcc JMP 0x00137062 LAB_00136dcc: JMP 0x00136dce LAB_00136dce: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x410] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x418] CALL 0x00113550 CMP EAX,0x0 JNZ 0x00136e28 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x410],0x0 JNZ 0x00136e0e MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x418],0x0 JZ 0x00136e13 LAB_00136e0e: JMP 0x00137062 LAB_00136e13: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001134a0 CMP EAX,0x0 JNZ 0x00136e26 JMP 0x00137062 LAB_00136e26: JMP 0x00136e28 LAB_00136e28: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00136ebe MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x00136e5e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x18],0x0 JZ 0x00136ebe LAB_00136e5e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001137d0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x00136ebc MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00113800 CMP EAX,0x0 JNZ 0x00136ea2 JMP 0x00137062 LAB_00136ea2: MOV RDI,qword ptr [RBP + -0x38] MOV ESI,0xc CALL 0x001132f0 CMP EAX,0x0 JNZ 0x00136eba JMP 0x00137062 LAB_00136eba: JMP 0x00136ebc LAB_00136ebc: JMP 0x00136ebe LAB_00136ebe: CMP qword ptr [RBP + -0x28],0x0 JZ 0x00136ed4 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00136ed4 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX LAB_00136ed4: CMP qword ptr [RBP + -0x20],0x0 JZ 0x00136eea CMP qword ptr [RBP + -0x28],0x0 JNZ 0x00136eea MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_00136eea: CMP qword ptr [RBP + -0x20],0x0 JZ 0x00136f16 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00136f16 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00113350 CMP EAX,0x1 JZ 0x00136f14 JMP 0x00137062 LAB_00136f14: JMP 0x00136f16 LAB_00136f16: CMP qword ptr [RBP + -0x28],0x0 JZ 0x00136ff8 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00136ff8 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[0x14bed8] CALL 0x001134d0 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JZ 0x00136fc4 CALL 0x00113740 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x48] XOR EAX,EAX MOV EDX,EAX CALL 0x001132e0 MOV RDI,qword ptr [RBP + -0x40] CALL 0x00113420 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00113380 CMP EAX,0x1 JZ 0x00136fb9 CALL 0x001130c0 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x48] CALL 0x001132b0 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00137b90 CMP EAX,0xb JNZ 0x00136fb2 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00137bd0 CMP EAX,0x65 JZ 0x00136fb7 LAB_00136fb2: JMP 0x00137062 LAB_00136fb7: JMP 0x00136fb9 LAB_00136fb9: MOV RDI,qword ptr [RBP + -0x48] CALL 0x001132b0 JMP 0x00136ff6 LAB_00136fc4: MOV RDI,qword ptr [RBP + -0x10] LEA RAX,[0x15ff10] MOV RDX,qword ptr [RAX] LEA RAX,[0x160120] MOV RCX,qword ptr [RAX + 0x20] MOV R8,qword ptr [RBP + -0x28] MOV ESI,0x7ea MOV AL,0x0 CALL 0x001160f0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00137072 LAB_00136ff6: JMP 0x00136ff8 LAB_00136ff8: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013700f MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113710 CMP EAX,0x1 JZ 0x0013700f JMP 0x00137062 LAB_0013700f: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x68],RAX MOV RCX,qword ptr [RBP + -0x10] MOV AL,0x1 CMP qword ptr [RCX + 0x410],0x0 MOV byte ptr [RBP + -0x59],AL JNZ 0x0013703c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x418],0x0 SETNZ AL MOV byte ptr [RBP + -0x59],AL LAB_0013703c: MOV RDI,qword ptr [RBP + -0x68] MOV CL,byte ptr [RBP + -0x59] XOR ESI,ESI MOV EAX,0x1 TEST CL,0x1 CMOVNZ ESI,EAX XOR EAX,EAX MOV EDX,EAX CALL 0x00113120 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00137072 LAB_00137062: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001372c0 MOV dword ptr [RBP + -0x4],0x1 LAB_00137072: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int4 ma_tls_set_certs(long param_1,SSL_CTX *param_2) { int iVar1; ulong uVar2; bool bVar3; void *local_60; EVP_PKEY *local_50; FILE *local_48; X509_STORE *local_40; void *local_38; char *local_30; char *local_28; SSL_CTX *local_20; long local_18; local_28 = *(char **)(param_1 + 0x408); local_30 = *(char **)(param_1 + 0x400); if (*(long *)(param_1 + 0x480) == 0) { local_60 = (void *)0x0; } else { local_60 = *(void **)(*(long *)(param_1 + 0x480) + 0xa0); } local_38 = local_60; local_20 = param_2; local_18 = param_1; if ((((((*(long *)(param_1 + 0x420) == 0) || (**(char **)(param_1 + 0x420) == '\0')) || (iVar1 = SSL_CTX_set_ciphersuites(param_2,*(int8 *)(param_1 + 0x420)), iVar1 != 0)) || (iVar1 = SSL_CTX_set_cipher_list(local_20,*(char **)(local_18 + 0x420)), iVar1 != 0)) && ((iVar1 = SSL_CTX_load_verify_locations (local_20,*(char **)(local_18 + 0x410),*(char **)(local_18 + 0x418)), iVar1 != 0 || (((*(long *)(local_18 + 0x410) == 0 && (*(long *)(local_18 + 0x418) == 0)) && (iVar1 = SSL_CTX_set_default_verify_paths(local_20), iVar1 != 0)))))) && ((((*(long *)(local_18 + 0x480) == 0 || ((*(long *)(*(long *)(local_18 + 0x480) + 0x10) == 0 && (*(long *)(*(long *)(local_18 + 0x480) + 0x18) == 0)))) || (local_40 = SSL_CTX_get_cert_store(local_20), local_40 == (X509_STORE *)0x0)) || ((iVar1 = X509_STORE_load_locations (local_40,*(char **)(*(long *)(local_18 + 0x480) + 0x10), *(char **)(*(long *)(local_18 + 0x480) + 0x18)), iVar1 != 0 && (iVar1 = X509_STORE_set_flags(local_40,0xc), iVar1 != 0)))))) { if ((local_30 != (char *)0x0) && (local_28 == (char *)0x0)) { local_28 = local_30; } if ((local_28 != (char *)0x0) && (local_30 == (char *)0x0)) { local_30 = local_28; } if (((local_28 == (char *)0x0) || (*local_28 == '\0')) || (iVar1 = SSL_CTX_use_certificate_chain_file(local_20,local_28), iVar1 == 1)) { if ((local_30 != (char *)0x0) && (*local_30 != '\0')) { local_48 = fopen64(local_30,"rb"); if (local_48 == (FILE *)0x0) { my_set_error(local_18,0x7ea,SQLSTATE_UNKNOWN,mariadb_client_errors._32_8_,local_30); return 1; } local_50 = EVP_PKEY_new(); PEM_read_PrivateKey(local_48,&local_50,(int1 *)0x0,local_38); fclose(local_48); iVar1 = SSL_CTX_use_PrivateKey(local_20,local_50); if (iVar1 != 1) { uVar2 = ERR_peek_error(); EVP_PKEY_free(local_50); iVar1 = ERR_GET_LIB(uVar2); if ((iVar1 != 0xb) || (iVar1 = ERR_GET_REASON(uVar2), iVar1 != 0x65)) goto LAB_00137062; } EVP_PKEY_free(local_50); } if ((local_28 == (char *)0x0) || (iVar1 = SSL_CTX_check_private_key(local_20), iVar1 == 1)) { bVar3 = true; if (*(long *)(local_18 + 0x410) == 0) { bVar3 = *(long *)(local_18 + 0x418) != 0; } SSL_CTX_set_verify(local_20,(uint)bVar3,(callback *)0x0); return 0; } } } LAB_00137062: ma_tls_set_error(local_18); return 1; }
47,915
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O0
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x3e0ac movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x3e0ac xorl %eax, %eax leaq 0x36f68a(%rip), %rcx # 0x3ad708 cmpq $0x0, (%rcx) movb %al, -0x11(%rbp) je 0x3e09f leaq 0x36f67a(%rip), %rax # 0x3ad708 movq (%rax), %rdi callq 0x3e050 cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x3e0c8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x3e0c1 movl $0x1, -0x4(%rbp) jmp 0x3e0c8 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_if_hard_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_3E0AC mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_3E0AC xor eax, eax lea rcx, home_dir cmp qword ptr [rcx], 0 mov [rbp+var_11], al jz short loc_3E09F lea rax, home_dir mov rdi, [rax] call test_if_hard_path cmp eax, 0 setnz al mov [rbp+var_11], al loc_3E09F: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_3E0C8 loc_3E0AC: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_3E0C1 mov [rbp+var_4], 1 jmp short loc_3E0C8 loc_3E0C1: mov [rbp+var_4], 0 loc_3E0C8: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 test_if_hard_path(char *a1) { bool v2; // [rsp+Fh] [rbp-11h] if ( *a1 == 126 && a1[1] == 47 ) { v2 = 0; if ( home_dir ) return (unsigned int)test_if_hard_path(home_dir) != 0; return v2; } else { return *a1 == 47; } }
test_if_hard_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0013e0ac MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x0013e0ac XOR EAX,EAX LEA RCX,[0x4ad708] CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x0013e09f LEA RAX,[0x4ad708] MOV RDI,qword ptr [RAX] CALL 0x0013e050 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_0013e09f: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0013e0c8 LAB_0013e0ac: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0013e0c1 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013e0c8 LAB_0013e0c1: MOV dword ptr [RBP + -0x4],0x0 LAB_0013e0c8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool test_if_hard_path(char *param_1) { int iVar1; bool local_19; if ((*param_1 == '~') && (param_1[1] == '/')) { local_19 = false; if (home_dir != 0) { iVar1 = test_if_hard_path(home_dir); local_19 = iVar1 != 0; } } else if (*param_1 == '/') { local_19 = true; } else { local_19 = false; } return local_19; }
47,916
minja::split(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&)
llama.cpp/common/minja/minja.hpp
static std::vector<std::string> split(const std::string & s, const std::string & sep) { std::vector<std::string> result; size_t start = 0; size_t end = s.find(sep); while (end != std::string::npos) { result.push_back(s.substr(start, end - start)); start = end + sep.length(); end = s.find(sep, start); } result.push_back(s.substr(start)); return result; }
O3
cpp
minja::split(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 %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %ebp, %ebp movq %r14, %rdi xorl %edx, %edx callq 0x215d0 cmpq $-0x1, %rax je 0xb9d9c movq %rax, %r12 xorl %ebp, %ebp leaq 0x8(%rsp), %r13 movq %r12, %rcx subq %rbp, %rcx movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x22130 movq %rbx, %rdi movq %r13, %rsi callq 0x842a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xb9d7b movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %r12, %rbp addq %rcx, %rbp movq %r14, %rdi movq %rbp, %rdx callq 0x215d0 movq %rax, %r12 cmpq $-0x1, %rax jne 0xb9d40 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbp, %rdx movq $-0x1, %rcx callq 0x22130 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x842a0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb9ddb movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi jmp 0xb9e0c jmp 0xb9dfa movq %rax, %r14 jmp 0xb9e1e movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xb9e1e movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 movq %rbx, %rdi callq 0x2c368 movq %r14, %rdi callq 0x21b20
_ZN5minjaL5splitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rdx] mov rcx, [rdx+8] xor ebp, ebp mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_B9D9C mov r12, rax xor ebp, ebp lea r13, [rsp+58h+var_50] loc_B9D40: mov rcx, r12 sub rcx, rbp mov rdi, r13 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_B9D7B mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B9D7B: mov rsi, [r15] mov rcx, [r15+8] mov rbp, r12 add rbp, rcx mov rdi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r12, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_B9D40 loc_B9D9C: lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, rbp mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B9DDB mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B9DDB: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] jmp short loc_B9E0C jmp short $+2 loc_B9DFA: mov r14, rax jmp short loc_B9E1E mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] loc_B9E0C: cmp rdi, rax jz short loc_B9E1E mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B9E1E: mov rdi, rbx; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
void minja::split(long long a1, long long a2, _QWORD *a3) { long long v4; // rbp long long v5; // rax long long v6; // r12 long long v7; // rcx void *v8[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v4 = 0LL; v5 = std::string::find(a2, *a3, 0LL, a3[1]); if ( v5 != -1 ) { v6 = v5; v4 = 0LL; do { std::string::substr(v8, a2, v4, v6 - v4); std::vector<std::string>::emplace_back<std::string>(a1, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); v7 = a3[1]; v4 = v7 + v6; v6 = std::string::find(a2, *a3, v7 + v6, v7); } while ( v6 != -1 ); } std::string::substr(v8, a2, v4, -1LL); std::vector<std::string>::emplace_back<std::string>(a1, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); }
split: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR EBP,EBP MOV RDI,R14 XOR EDX,EDX CALL 0x001215d0 CMP RAX,-0x1 JZ 0x001b9d9c MOV R12,RAX XOR EBP,EBP LEA R13,[RSP + 0x8] LAB_001b9d40: MOV RCX,R12 SUB RCX,RBP LAB_001b9d46: MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP CALL 0x00122130 LAB_001b9d54: MOV RDI,RBX MOV RSI,R13 CALL 0x001842a0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001b9d7b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121180 LAB_001b9d7b: MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RBP,R12 ADD RBP,RCX MOV RDI,R14 MOV RDX,RBP CALL 0x001215d0 MOV R12,RAX CMP RAX,-0x1 JNZ 0x001b9d40 LAB_001b9d9c: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBP MOV RCX,-0x1 CALL 0x00122130 LAB_001b9db3: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001842a0 LAB_001b9dc0: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001b9ddb MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121180 LAB_001b9ddb: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::split(std::__cxx11::string const&, std::__cxx11::string const&) */ void __thiscall minja::split(minja *this,string *param_1,string *param_2) { long lVar1; long *local_50 [2]; long local_40 [2]; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; lVar1 = std::__cxx11::string::find((char *)param_1,*(ulong *)param_2,0); if (lVar1 != -1) { do { /* try { // try from 001b9d46 to 001b9d53 has its CatchHandler @ 001b9dfa */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 001b9d54 to 001b9d5e has its CatchHandler @ 001b9dff */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar1 = std::__cxx11::string::find ((char *)param_1,*(ulong *)param_2,lVar1 + *(long *)(param_2 + 8)); } while (lVar1 != -1); } /* try { // try from 001b9d9c to 001b9db2 has its CatchHandler @ 001b9df8 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 001b9db3 to 001b9dbf has its CatchHandler @ 001b9dea */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return; }
47,917
thr_print_locks
eloqsql/mysys/thr_lock.c
void thr_print_locks(void) { LIST *list; uint count=0; mysql_mutex_lock(&THR_LOCK_lock); puts("Current active THR (table level locks):"); for (list= thr_lock_thread_list; list && count++ < MAX_THREADS; list= list_rest(list)) { THR_LOCK *lock=(THR_LOCK*) list->data; mysql_mutex_lock(&lock->mutex); if ((lock->write.data || lock->read.data || lock->write_wait.data || lock->read_wait.data)) { printf("lock: %p:", lock); if ((lock->write_wait.data || lock->read_wait.data) && (! lock->read.data && ! lock->write.data)) printf(" WARNING: "); if (lock->write.data) printf(" write"); if (lock->write_wait.data) printf(" write_wait"); if (lock->read.data) printf(" read"); if (lock->read_wait.data) printf(" read_wait"); puts(""); thr_print_lock("write",&lock->write); thr_print_lock("write_wait",&lock->write_wait); thr_print_lock("read",&lock->read); thr_print_lock("read_wait",&lock->read_wait); puts(""); } mysql_mutex_unlock(&lock->mutex); } fflush(stdout); mysql_mutex_unlock(&THR_LOCK_lock); }
O3
c
thr_print_locks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp leaq 0xb67b2d(%rip), %rax # 0xc16268 cmpq $0x0, 0x40(%rax) jne 0xae978 leaq 0xb67b1b(%rip), %rdi # 0xc16268 callq 0x2a200 leaq 0x3a7c6(%rip), %rdi # 0xe8f1f callq 0x2a820 leaq 0xb67db3(%rip), %rax # 0xc16518 movq (%rax), %r15 testq %r15, %r15 je 0xae93f movl $0x3e9, %ebx # imm = 0x3E9 decl %ebx je 0xae93f movq 0x10(%r15), %r14 leaq 0x18(%r14), %r12 cmpq $0x0, 0x58(%r14) jne 0xae914 movq %r12, %rdi callq 0x2a200 cmpq $0x0, 0x90(%r14) jne 0xae7bf cmpq $0x0, 0x70(%r14) jne 0xae7bf cmpq $0x0, 0x80(%r14) jne 0xae7bf cmpq $0x0, 0x60(%r14) je 0xae8dc movq %r15, -0x38(%rbp) leaq 0x90(%r14), %r15 movl $0x1, %edi leaq 0x3a771(%rip), %rsi # 0xe8f47 movq %r14, %rdx xorl %eax, %eax callq 0x2a850 cmpq $0x0, 0x80(%r14) jne 0xae7f1 cmpq $0x0, 0x60(%r14) je 0xae7f8 cmpq $0x0, 0x70(%r14) je 0xae800 cmpq $0x0, (%r15) jne 0xae80a jmp 0xae81d cmpq $0x0, (%r15) je 0xae8fc movl $0x1, %edi leaq 0x3a746(%rip), %rsi # 0xe8f5c xorl %eax, %eax callq 0x2a850 movq %r12, -0x40(%rbp) leaq 0x80(%r14), %r12 cmpq $0x0, (%r12) je 0xae842 movl $0x1, %edi leaq 0x3a728(%rip), %rsi # 0xe8f63 xorl %eax, %eax callq 0x2a850 cmpq $0x0, 0x70(%r14) je 0xae85c movl $0x1, %edi leaq 0x35334(%rip), %rsi # 0xe3b89 xorl %eax, %eax callq 0x2a850 movl %ebx, -0x2c(%rbp) cmpq $0x0, 0x60(%r14) je 0xae879 movl $0x1, %edi leaq 0x3a6fd(%rip), %rsi # 0xe8f6f xorl %eax, %eax callq 0x2a850 leaq 0x70(%r14), %r13 leaq 0x60(%r14), %rbx movl $0xa, %edi callq 0x2a960 leaq 0x3a6cb(%rip), %rdi # 0xe8f5d movq %r15, %rsi callq 0xae994 leaq 0x3a6c3(%rip), %rdi # 0xe8f64 movq %r12, %rsi callq 0xae994 leaq 0x352da(%rip), %rdi # 0xe3b8a movq %r13, %rsi callq 0xae994 leaq 0x3a6b1(%rip), %rdi # 0xe8f70 movq %rbx, %rsi callq 0xae994 movl $0xa, %edi callq 0x2a960 movl -0x2c(%rbp), %ebx movq -0x40(%rbp), %r12 movq -0x38(%rbp), %r15 movq 0x58(%r14), %rdi testq %rdi, %rdi jne 0xae92d movq %r12, %rdi callq 0x2a1d0 movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xae776 jmp 0xae93f movl $0x1, %edi leaq 0x3a649(%rip), %rsi # 0xe8f51 xorl %eax, %eax callq 0x2a850 jmp 0xae7f8 movq %r12, %rdi leaq 0x3a5c7(%rip), %rsi # 0xe8ee5 movl $0x621, %edx # imm = 0x621 callq 0x308cf jmp 0xae799 leaq 0x2e5124(%rip), %rax # 0x393a58 movq (%rax), %rax callq *0x160(%rax) jmp 0xae8e5 movq 0x2e265a(%rip), %rax # 0x390fa0 movq (%rax), %rdi callq 0x2a400 leaq 0xb67913(%rip), %rax # 0xc16268 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0xae982 leaq 0xb67903(%rip), %rdi # 0xc16268 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2a1d0 callq 0x30f48 jmp 0xae752 leaq 0x2e50cf(%rip), %rax # 0x393a58 movq (%rax), %rax callq *0x160(%rax) jmp 0xae95e
thr_print_locks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h lea rax, THR_LOCK_lock cmp qword ptr [rax+40h], 0 jnz loc_AE978 lea rdi, THR_LOCK_lock call _pthread_mutex_lock loc_AE752: lea rdi, aCurrentActiveT; "Current active THR (table level locks):" call _puts lea rax, thr_lock_thread_list mov r15, [rax] test r15, r15 jz loc_AE93F mov ebx, 3E9h loc_AE776: dec ebx jz loc_AE93F mov r14, [r15+10h] lea r12, [r14+18h] cmp qword ptr [r14+58h], 0 jnz loc_AE914 mov rdi, r12 call _pthread_mutex_lock loc_AE799: cmp qword ptr [r14+90h], 0 jnz short loc_AE7BF cmp qword ptr [r14+70h], 0 jnz short loc_AE7BF cmp qword ptr [r14+80h], 0 jnz short loc_AE7BF cmp qword ptr [r14+60h], 0 jz loc_AE8DC loc_AE7BF: mov [rbp+var_38], r15 lea r15, [r14+90h] mov edi, 1 lea rsi, aLockP; "lock: %p:" mov rdx, r14 xor eax, eax call ___printf_chk cmp qword ptr [r14+80h], 0 jnz short loc_AE7F1 cmp qword ptr [r14+60h], 0 jz short loc_AE7F8 loc_AE7F1: cmp qword ptr [r14+70h], 0 jz short loc_AE800 loc_AE7F8: cmp qword ptr [r15], 0 jnz short loc_AE80A jmp short loc_AE81D loc_AE800: cmp qword ptr [r15], 0 jz loc_AE8FC loc_AE80A: mov edi, 1 lea rsi, aWrite; " write" xor eax, eax call ___printf_chk loc_AE81D: mov [rbp+var_40], r12 lea r12, [r14+80h] cmp qword ptr [r12], 0 jz short loc_AE842 mov edi, 1 lea rsi, aWriteWait; " write_wait" xor eax, eax call ___printf_chk loc_AE842: cmp qword ptr [r14+70h], 0 jz short loc_AE85C mov edi, 1 lea rsi, aTheEventWasCor+34h; " read" xor eax, eax call ___printf_chk loc_AE85C: mov [rbp+var_2C], ebx cmp qword ptr [r14+60h], 0 jz short loc_AE879 mov edi, 1 lea rsi, aReadWait; " read_wait" xor eax, eax call ___printf_chk loc_AE879: lea r13, [r14+70h] lea rbx, [r14+60h] mov edi, 0Ah call _putchar lea rdi, aWrite+1; "write" mov rsi, r15 call thr_print_lock lea rdi, aWriteWait+1; "write_wait" mov rsi, r12 call thr_print_lock lea rdi, aTheEventWasCor+35h; "read" mov rsi, r13 call thr_print_lock lea rdi, aReadWait+1; "read_wait" mov rsi, rbx call thr_print_lock mov edi, 0Ah call _putchar mov ebx, [rbp+var_2C] mov r12, [rbp+var_40] mov r15, [rbp+var_38] loc_AE8DC: mov rdi, [r14+58h] test rdi, rdi jnz short loc_AE92D loc_AE8E5: mov rdi, r12 call _pthread_mutex_unlock mov r15, [r15+8] test r15, r15 jnz loc_AE776 jmp short loc_AE93F loc_AE8FC: mov edi, 1 lea rsi, aWarning_1; " WARNING: " xor eax, eax call ___printf_chk jmp loc_AE7F8 loc_AE914: mov rdi, r12 lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 621h call psi_mutex_lock jmp loc_AE799 loc_AE92D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_AE8E5 loc_AE93F: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush lea rax, THR_LOCK_lock mov rdi, [rax+40h] test rdi, rdi jnz short loc_AE982 loc_AE95E: lea rdi, THR_LOCK_lock add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_AE978: call thr_print_locks_cold_1 jmp loc_AE752 loc_AE982: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_AE95E
long long thr_print_locks() { long long *v0; // r15 int v1; // ebx _QWORD *v2; // r14 _QWORD *v3; // r12 _QWORD *v4; // r15 long long *v6; // [rsp+8h] [rbp-38h] if ( THR_LOCK_lock[8] ) thr_print_locks_cold_1(); else pthread_mutex_lock(THR_LOCK_lock); puts("Current active THR (table level locks):"); v0 = thr_lock_thread_list; if ( thr_lock_thread_list ) { v1 = 1001; while ( 1 ) { if ( !--v1 ) goto LABEL_32; v2 = (_QWORD *)v0[2]; v3 = v2 + 3; if ( v2[11] ) psi_mutex_lock((long long)(v2 + 3), (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x621u); else pthread_mutex_lock(v2 + 3); if ( v2[18] || v2[14] || v2[16] || v2[12] ) break; LABEL_26: if ( v2[11] ) PSI_server[44](); pthread_mutex_unlock(v3); v0 = (long long *)v0[1]; if ( !v0 ) goto LABEL_32; } v6 = v0; v4 = v2 + 18; __printf_chk(1LL, "lock: %p:", v2); if ( (v2[16] || v2[12]) && !v2[14] ) { if ( *v4 ) { LABEL_18: __printf_chk(1LL, " write"); LABEL_19: if ( v2[16] ) __printf_chk(1LL, " write_wait"); if ( v2[14] ) __printf_chk(1LL, " read"); if ( v2[12] ) __printf_chk(1LL, " read_wait"); putchar(10LL); thr_print_lock("write", v2 + 18); thr_print_lock("write_wait", v2 + 16); thr_print_lock("read", v2 + 14); thr_print_lock("read_wait", v2 + 12); putchar(10LL); v3 = v2 + 3; v0 = v6; goto LABEL_26; } __printf_chk(1LL, " WARNING: "); } if ( !*v4 ) goto LABEL_19; goto LABEL_18; } LABEL_32: fflush(stdout); if ( THR_LOCK_lock[8] ) PSI_server[44](); return pthread_mutex_unlock(THR_LOCK_lock); }
thr_print_locks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 LEA RAX,[0xd16268] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001ae978 LEA RDI,[0xd16268] CALL 0x0012a200 LAB_001ae752: LEA RDI,[0x1e8f1f] CALL 0x0012a820 LEA RAX,[0xd16518] MOV R15,qword ptr [RAX] TEST R15,R15 JZ 0x001ae93f MOV EBX,0x3e9 LAB_001ae776: DEC EBX JZ 0x001ae93f MOV R14,qword ptr [R15 + 0x10] LEA R12,[R14 + 0x18] CMP qword ptr [R14 + 0x58],0x0 JNZ 0x001ae914 MOV RDI,R12 CALL 0x0012a200 LAB_001ae799: CMP qword ptr [R14 + 0x90],0x0 JNZ 0x001ae7bf CMP qword ptr [R14 + 0x70],0x0 JNZ 0x001ae7bf CMP qword ptr [R14 + 0x80],0x0 JNZ 0x001ae7bf CMP qword ptr [R14 + 0x60],0x0 JZ 0x001ae8dc LAB_001ae7bf: MOV qword ptr [RBP + -0x38],R15 LEA R15,[R14 + 0x90] MOV EDI,0x1 LEA RSI,[0x1e8f47] MOV RDX,R14 XOR EAX,EAX CALL 0x0012a850 CMP qword ptr [R14 + 0x80],0x0 JNZ 0x001ae7f1 CMP qword ptr [R14 + 0x60],0x0 JZ 0x001ae7f8 LAB_001ae7f1: CMP qword ptr [R14 + 0x70],0x0 JZ 0x001ae800 LAB_001ae7f8: CMP qword ptr [R15],0x0 JNZ 0x001ae80a JMP 0x001ae81d LAB_001ae800: CMP qword ptr [R15],0x0 JZ 0x001ae8fc LAB_001ae80a: MOV EDI,0x1 LEA RSI,[0x1e8f5c] XOR EAX,EAX CALL 0x0012a850 LAB_001ae81d: MOV qword ptr [RBP + -0x40],R12 LEA R12,[R14 + 0x80] CMP qword ptr [R12],0x0 JZ 0x001ae842 MOV EDI,0x1 LEA RSI,[0x1e8f63] XOR EAX,EAX CALL 0x0012a850 LAB_001ae842: CMP qword ptr [R14 + 0x70],0x0 JZ 0x001ae85c MOV EDI,0x1 LEA RSI,[0x1e3b89] XOR EAX,EAX CALL 0x0012a850 LAB_001ae85c: MOV dword ptr [RBP + -0x2c],EBX CMP qword ptr [R14 + 0x60],0x0 JZ 0x001ae879 MOV EDI,0x1 LEA RSI,[0x1e8f6f] XOR EAX,EAX CALL 0x0012a850 LAB_001ae879: LEA R13,[R14 + 0x70] LEA RBX,[R14 + 0x60] MOV EDI,0xa CALL 0x0012a960 LEA RDI,[0x1e8f5d] MOV RSI,R15 CALL 0x001ae994 LEA RDI,[0x1e8f64] MOV RSI,R12 CALL 0x001ae994 LEA RDI,[0x1e3b8a] MOV RSI,R13 CALL 0x001ae994 LEA RDI,[0x1e8f70] MOV RSI,RBX CALL 0x001ae994 MOV EDI,0xa CALL 0x0012a960 MOV EBX,dword ptr [RBP + -0x2c] MOV R12,qword ptr [RBP + -0x40] MOV R15,qword ptr [RBP + -0x38] LAB_001ae8dc: MOV RDI,qword ptr [R14 + 0x58] TEST RDI,RDI JNZ 0x001ae92d LAB_001ae8e5: MOV RDI,R12 CALL 0x0012a1d0 MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001ae776 JMP 0x001ae93f LAB_001ae8fc: MOV EDI,0x1 LEA RSI,[0x1e8f51] XOR EAX,EAX CALL 0x0012a850 JMP 0x001ae7f8 LAB_001ae914: MOV RDI,R12 LEA RSI,[0x1e8ee5] MOV EDX,0x621 CALL 0x001308cf JMP 0x001ae799 LAB_001ae92d: LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001ae8e5 LAB_001ae93f: MOV RAX,qword ptr [0x00490fa0] MOV RDI,qword ptr [RAX] CALL 0x0012a400 LEA RAX,[0xd16268] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x001ae982 LAB_001ae95e: LEA RDI,[0xd16268] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012a1d0 LAB_001ae978: CALL 0x00130f48 JMP 0x001ae752 LAB_001ae982: LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001ae95e
void thr_print_locks(void) { pthread_mutex_t *__mutex; long *plVar1; long lVar2; int iVar3; long lVar4; if (THR_LOCK_lock._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_lock); } else { thr_print_locks_cold_1(); } puts("Current active THR (table level locks):"); if (thr_lock_thread_list != 0) { iVar3 = 0x3e9; lVar4 = thr_lock_thread_list; do { iVar3 = iVar3 + -1; if (iVar3 == 0) break; lVar2 = *(long *)(lVar4 + 0x10); __mutex = (pthread_mutex_t *)(lVar2 + 0x18); if (*(long *)(lVar2 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x621); } if ((((*(long *)(lVar2 + 0x90) != 0) || (*(long *)(lVar2 + 0x70) != 0)) || (*(long *)(lVar2 + 0x80) != 0)) || (*(long *)(lVar2 + 0x60) != 0)) { plVar1 = (long *)(lVar2 + 0x90); __printf_chk(1,"lock: %p:",lVar2); if (((*(long *)(lVar2 + 0x80) == 0) && (*(long *)(lVar2 + 0x60) == 0)) || (*(long *)(lVar2 + 0x70) != 0)) { LAB_001ae7f8: if (*plVar1 != 0) goto LAB_001ae80a; } else { if (*plVar1 == 0) { __printf_chk(1," WARNING: "); goto LAB_001ae7f8; } LAB_001ae80a: __printf_chk(1," write"); } if (*(long *)(lVar2 + 0x80) != 0) { __printf_chk(1," write_wait"); } if (*(long *)(lVar2 + 0x70) != 0) { __printf_chk(1," read"); } if (*(long *)(lVar2 + 0x60) != 0) { __printf_chk(1," read_wait"); } putchar(10); thr_print_lock("write",plVar1); thr_print_lock("write_wait",(long *)(lVar2 + 0x80)); thr_print_lock("read",lVar2 + 0x70); thr_print_lock("read_wait",lVar2 + 0x60); putchar(10); } if (*(long *)(lVar2 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); lVar4 = *(long *)(lVar4 + 8); } while (lVar4 != 0); } fflush(*(FILE **)PTR_stdout_00490fa0); if (THR_LOCK_lock._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_lock); return; }
47,918
lunasvg::SVGGradientElement::collectGradientAttributes(lunasvg::SVGGradientAttributes&) const
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
void SVGGradientElement::collectGradientAttributes(SVGGradientAttributes& attributes) const { if(!attributes.hasGradientTransform() && hasAttribute(PropertyID::GradientTransform)) attributes.setGradientTransform(this); if(!attributes.hasSpreadMethod() && hasAttribute(PropertyID::SpreadMethod)) attributes.setSpreadMethod(this); if(!attributes.hasGradientUnits() && hasAttribute(PropertyID::GradientUnits)) attributes.setGradientUnits(this); if(!attributes.hasGradientContentElement()) { for(const auto& child : children()) { if(auto element = toSVGElement(child); element && element->id() == ElementID::Stop) { attributes.setGradientContentElement(this); break; } } } }
O1
cpp
lunasvg::SVGGradientElement::collectGradientAttributes(lunasvg::SVGGradientAttributes&) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, (%rsi) jne 0x17a7b movq %r14, %rdi movl $0x19, %esi callq 0xf1c8 testb %al, %al je 0x17a7b movq %r14, (%rbx) cmpq $0x0, 0x8(%rbx) jne 0x17a97 movq %r14, %rdi movl $0x38, %esi callq 0xf1c8 testb %al, %al je 0x17a97 movq %r14, 0x8(%rbx) cmpq $0x0, 0x10(%rbx) jne 0x17ab3 movq %r14, %rdi movl $0x1a, %esi callq 0xf1c8 testb %al, %al je 0x17ab3 movq %r14, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x17ac4 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x58(%r14), %r12 movq 0x58(%r14), %r13 cmpq %r12, %r13 je 0x17aba movq 0x10(%r13), %r15 testq %r15, %r15 je 0x17ae7 movq (%r15), %rax movq %r15, %rdi callq *0x18(%rax) testb %al, %al jne 0x17aea xorl %r15d, %r15d testq %r15, %r15 je 0x17af6 cmpb $0x12, 0x43(%r15) je 0x17afc movq (%r13), %r13 jmp 0x17acc movq %r14, 0x18(%rbx) jmp 0x17aba
_ZNK7lunasvg18SVGGradientElement25collectGradientAttributesERNS_21SVGGradientAttributesE: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi cmp qword ptr [rsi], 0 jnz short loc_17A7B mov rdi, r14 mov esi, 19h call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID) test al, al jz short loc_17A7B mov [rbx], r14 loc_17A7B: cmp qword ptr [rbx+8], 0 jnz short loc_17A97 mov rdi, r14 mov esi, 38h ; '8' call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID) test al, al jz short loc_17A97 mov [rbx+8], r14 loc_17A97: cmp qword ptr [rbx+10h], 0 jnz short loc_17AB3 mov rdi, r14 mov esi, 1Ah call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID) test al, al jz short loc_17AB3 mov [rbx+10h], r14 loc_17AB3: cmp qword ptr [rbx+18h], 0 jz short loc_17AC4 loc_17ABA: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_17AC4: lea r12, [r14+58h] mov r13, [r14+58h] loc_17ACC: cmp r13, r12 jz short loc_17ABA mov r15, [r13+10h] test r15, r15 jz short loc_17AE7 mov rax, [r15] mov rdi, r15 call qword ptr [rax+18h] test al, al jnz short loc_17AEA loc_17AE7: xor r15d, r15d loc_17AEA: test r15, r15 jz short loc_17AF6 cmp byte ptr [r15+43h], 12h jz short loc_17AFC loc_17AF6: mov r13, [r13+0] jmp short loc_17ACC loc_17AFC: mov [rbx+18h], r14 jmp short loc_17ABA
void lunasvg::SVGGradientElement::collectGradientAttributes(long long a1, long long *a2) { _QWORD *i; // r13 _BYTE *v3; // r15 if ( !*a2 && lunasvg::SVGElement::hasAttribute(a1, 25) ) *a2 = a1; if ( !a2[1] && lunasvg::SVGElement::hasAttribute(a1, 56) ) a2[1] = a1; if ( !a2[2] && lunasvg::SVGElement::hasAttribute(a1, 26) ) a2[2] = a1; if ( !a2[3] ) { for ( i = *(_QWORD **)(a1 + 88); i != (_QWORD *)(a1 + 88); i = (_QWORD *)*i ) { v3 = (_BYTE *)i[2]; if ( !v3 || !(*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v3 + 24LL))(i[2]) ) v3 = 0LL; if ( v3 && v3[67] == 18 ) { a2[3] = a1; return; } } } }
collectGradientAttributes: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP qword ptr [RSI],0x0 JNZ 0x00117a7b MOV RDI,R14 MOV ESI,0x19 CALL 0x0010f1c8 TEST AL,AL JZ 0x00117a7b MOV qword ptr [RBX],R14 LAB_00117a7b: CMP qword ptr [RBX + 0x8],0x0 JNZ 0x00117a97 MOV RDI,R14 MOV ESI,0x38 CALL 0x0010f1c8 TEST AL,AL JZ 0x00117a97 MOV qword ptr [RBX + 0x8],R14 LAB_00117a97: CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00117ab3 MOV RDI,R14 MOV ESI,0x1a CALL 0x0010f1c8 TEST AL,AL JZ 0x00117ab3 MOV qword ptr [RBX + 0x10],R14 LAB_00117ab3: CMP qword ptr [RBX + 0x18],0x0 JZ 0x00117ac4 LAB_00117aba: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00117ac4: LEA R12,[R14 + 0x58] MOV R13,qword ptr [R14 + 0x58] LAB_00117acc: CMP R13,R12 JZ 0x00117aba MOV R15,qword ptr [R13 + 0x10] TEST R15,R15 JZ 0x00117ae7 MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x18] TEST AL,AL JNZ 0x00117aea LAB_00117ae7: XOR R15D,R15D LAB_00117aea: TEST R15,R15 JZ 0x00117af6 CMP byte ptr [R15 + 0x43],0x12 JZ 0x00117afc LAB_00117af6: MOV R13,qword ptr [R13] JMP 0x00117acc LAB_00117afc: MOV qword ptr [RBX + 0x18],R14 JMP 0x00117aba
/* lunasvg::SVGGradientElement::collectGradientAttributes(lunasvg::SVGGradientAttributes&) const */ void __thiscall lunasvg::SVGGradientElement::collectGradientAttributes (SVGGradientElement *this,SVGGradientAttributes *param_1) { char cVar1; SVGGradientElement *pSVar2; long *plVar3; if ((*(long *)param_1 == 0) && (cVar1 = SVGElement::hasAttribute((SVGElement *)this,0x19), cVar1 != '\0')) { *(SVGGradientElement **)param_1 = this; } if ((*(long *)(param_1 + 8) == 0) && (cVar1 = SVGElement::hasAttribute((SVGElement *)this,0x38), cVar1 != '\0')) { *(SVGGradientElement **)(param_1 + 8) = this; } if ((*(long *)(param_1 + 0x10) == 0) && (cVar1 = SVGElement::hasAttribute((SVGElement *)this,0x1a), cVar1 != '\0')) { *(SVGGradientElement **)(param_1 + 0x10) = this; } if (*(long *)(param_1 + 0x18) == 0) { for (pSVar2 = *(SVGGradientElement **)(this + 0x58); pSVar2 != this + 0x58; pSVar2 = *(SVGGradientElement **)pSVar2) { plVar3 = *(long **)(pSVar2 + 0x10); if ((plVar3 == (long *)0x0) || (cVar1 = (**(code **)(*plVar3 + 0x18))(plVar3), cVar1 == '\0')) { plVar3 = (long *)0x0; } if ((plVar3 != (long *)0x0) && (*(char *)((long)plVar3 + 0x43) == '\x12')) { *(SVGGradientElement **)(param_1 + 0x18) = this; return; } } } return; }
47,919
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>*)
AlayaLite/build_O3/_deps/concurrentqueue-src/concurrentqueue.h
explicit ExplicitProducer(ConcurrentQueue* parent_) : ProducerBase(parent_, true), blockIndex(nullptr), pr_blockIndexSlotsUsed(0), pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1), pr_blockIndexFront(0), pr_blockIndexEntries(nullptr), pr_blockIndexRaw(nullptr) { size_t poolBasedIndexSize = details::ceil_to_pow_2(parent_->initialBlockPoolSize) >> 1; if (poolBasedIndexSize > pr_blockIndexSize) { pr_blockIndexSize = poolBasedIndexSize; } new_block_index(0); // This creates an index with double the number of current entries, i.e. EXPLICIT_INITIAL_INDEX_SIZE }
O3
c
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>*): xorl %eax, %eax movq %rax, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rax, 0x18(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movq %rax, 0x40(%rdi) movb $0x1, 0x48(%rdi) movq %rsi, 0x50(%rdi) leaq 0x85da8(%rip), %rcx # 0xb09c8 addq $0x10, %rcx movq %rcx, (%rdi) movups %xmm0, 0x58(%rdi) movq $0x10, 0x68(%rdi) movups %xmm0, 0x70(%rdi) movq %rax, 0x80(%rdi) movq 0x20(%rsi), %rax decq %rax movq %rax, %rcx shrq %rcx orq %rax, %rcx movq %rcx, %rax shrq $0x2, %rax orq %rcx, %rax movq %rax, %rcx shrq $0x4, %rcx orq %rax, %rcx movq %rcx, %rax shrq $0x8, %rax orq %rcx, %rax movq %rax, %rcx shrq $0x10, %rcx orq %rax, %rcx movq %rcx, %rax shrq $0x20, %rax orq %rcx, %rax incq %rax cmpq $0x22, %rax jb 0x2ac90 shrq %rax movq %rax, 0x68(%rdi) xorl %esi, %esi jmp 0x2ac98 nop
_ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerC2EPS5_: xor eax, eax mov [rdi+8], rax mov byte ptr [rdi+10h], 0 mov [rdi+18h], rax xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+30h], xmm0 mov [rdi+40h], rax mov byte ptr [rdi+48h], 1 mov [rdi+50h], rsi lea rcx, _ZTVN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerE; `vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer add rcx, 10h mov [rdi], rcx movups xmmword ptr [rdi+58h], xmm0 mov qword ptr [rdi+68h], 10h movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], rax mov rax, [rsi+20h] dec rax mov rcx, rax shr rcx, 1 or rcx, rax mov rax, rcx shr rax, 2 or rax, rcx mov rcx, rax shr rcx, 4 or rcx, rax mov rax, rcx shr rax, 8 or rax, rcx mov rcx, rax shr rcx, 10h or rcx, rax mov rax, rcx shr rax, 20h or rax, rcx inc rax cmp rax, 22h ; '"' jb short loc_2AC90 shr rax, 1 mov [rdi+68h], rax loc_2AC90: xor esi, esi jmp _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer15new_block_indexEm; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index(ulong)
long long moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer( long long a1, long long a2) { unsigned long long v2; // rax unsigned long long v3; // rax *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; *(_QWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; *(_BYTE *)(a1 + 72) = 1; *(_QWORD *)(a1 + 80) = a2; *(_QWORD *)a1 = &`vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer + 2; *(_OWORD *)(a1 + 88) = 0LL; *(_QWORD *)(a1 + 104) = 16LL; *(_OWORD *)(a1 + 112) = 0LL; *(_QWORD *)(a1 + 128) = 0LL; v2 = (*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1)) >> 2) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1)) >> 2)) >> 4) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1)) >> 2) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1) | (((*(_QWORD *)(a2 + 32) - 1LL) | ((unsigned long long)(*(_QWORD *)(a2 + 32) - 1LL) >> 1)) >> 2)) >> 4)) >> 8); v3 = (v2 | (v2 >> 16) | ((v2 | (v2 >> 16)) >> 32)) + 1; if ( v3 >= 0x22 ) *(_QWORD *)(a1 + 104) = v3 >> 1; return moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index( a1, 0LL); }
ExplicitProducer: XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX MOV byte ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RDI + 0x40],RAX MOV byte ptr [RDI + 0x48],0x1 MOV qword ptr [RDI + 0x50],RSI LEA RCX,[0x1b09c8] ADD RCX,0x10 MOV qword ptr [RDI],RCX MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOV qword ptr [RDI + 0x68],0x10 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],RAX MOV RAX,qword ptr [RSI + 0x20] DEC RAX MOV RCX,RAX SHR RCX,0x1 OR RCX,RAX MOV RAX,RCX SHR RAX,0x2 OR RAX,RCX MOV RCX,RAX SHR RCX,0x4 OR RCX,RAX MOV RAX,RCX SHR RAX,0x8 OR RAX,RCX MOV RCX,RAX SHR RCX,0x10 OR RCX,RAX MOV RAX,RCX SHR RAX,0x20 OR RAX,RCX INC RAX CMP RAX,0x22 JC 0x0012ac90 SHR RAX,0x1 MOV qword ptr [RDI + 0x68],RAX LAB_0012ac90: XOR ESI,ESI JMP 0x0012ac98
/* moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>*) */ void __thiscall moodycamel:: ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>:: ExplicitProducer::ExplicitProducer(ExplicitProducer *this,ConcurrentQueue *param_1) { ulong uVar1; *(int8 *)(this + 8) = 0; this[0x10] = (ExplicitProducer)0x0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; this[0x48] = (ExplicitProducer)0x1; *(ConcurrentQueue **)(this + 0x50) = param_1; *(int ***)this = &PTR__ExplicitProducer_001b09d8; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0x10; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; uVar1 = *(long *)(param_1 + 0x20) - 1U >> 1 | *(long *)(param_1 + 0x20) - 1U; uVar1 = uVar1 >> 2 | uVar1; uVar1 = uVar1 >> 4 | uVar1; uVar1 = uVar1 >> 8 | uVar1; uVar1 = uVar1 >> 0x10 | uVar1; uVar1 = (uVar1 >> 0x20 | uVar1) + 1; if (0x21 < uVar1) { *(ulong *)(this + 0x68) = uVar1 >> 1; } new_block_index(this,0); return; }
47,920
HeapSetZeroOnFree
seiftnesse[P]memoryallocator/src/custom_alloc_debug.c
void HeapSetZeroOnFree(int depth, size_t shallow_size) { if (depth >= ZERO_DEPTH_NONE && depth <= ZERO_DEPTH_DEEP) { zero_on_free_depth = depth; } else { HEAP_LOG("Invalid zero-on-free depth: %d, using default\n", depth); zero_on_free_depth = ZERO_DEPTH_NONE; } if (shallow_size > 0) { shallow_zero_size = shallow_size; } const char *depth_str; switch (zero_on_free_depth) { case ZERO_DEPTH_NONE: depth_str = "none (best performance)"; break; case ZERO_DEPTH_SHALLOW: depth_str = "shallow (headers/pointers only)"; break; case ZERO_DEPTH_MEDIUM: depth_str = "medium (50% of memory)"; break; case ZERO_DEPTH_DEEP: depth_str = "deep (entire memory block)"; break; default: depth_str = "unknown"; } HEAP_LOG("Zero-on-free configured: depth=%s, shallow_size=%zu bytes\n", depth_str, shallow_zero_size); }
O1
c
HeapSetZeroOnFree: xorl %eax, %eax cmpl $0x4, %edi cmovbl %edi, %eax movl %eax, 0x41041a2(%rip) # 0x4107138 testq %rsi, %rsi je 0x2fa2 movq %rsi, 0x311e(%rip) # 0x60c0 retq
HeapSetZeroOnFree: xor eax, eax cmp edi, 4 cmovb eax, edi mov cs:zero_on_free_depth, eax test rsi, rsi jz short locret_2FA2 mov cs:shallow_zero_size, rsi locret_2FA2: retn
long long HeapSetZeroOnFree(unsigned int a1, int *a2) { long long result; // rax result = 0LL; if ( a1 < 4 ) result = a1; zero_on_free_depth = result; if ( a2 ) shallow_zero_size = a2; return result; }
HeapSetZeroOnFree: XOR EAX,EAX CMP EDI,0x4 CMOVC EAX,EDI MOV dword ptr [0x04207138],EAX TEST RSI,RSI JZ 0x00102fa2 MOV qword ptr [0x001060c0],RSI LAB_00102fa2: RET
void HeapSetZeroOnFree(uint param_1,long param_2) { zero_on_free_depth = 0; if (param_1 < 4) { zero_on_free_depth = param_1; } if (param_2 != 0) { shallow_zero_size = param_2; } return; }
47,921
js_new_string_char
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string_char(JSContext *ctx, uint16_t c) { if (c < 0x100) { char ch8 = c; return js_new_string8_len(ctx, &ch8, 1); } else { uint16_t ch16 = c; return js_new_string16_len(ctx, &ch16, 1); } }
O1
c
js_new_string_char: pushq %rbx subq $0x10, %rsp movl %esi, %ebx cmpl $0xff, %esi ja 0x3d5b0 leaq 0x7(%rsp), %rsi movb %bl, (%rsi) movl $0x1, %edx callq 0x201dd jmp 0x3d5e8 movl $0x1, %esi movl $0x1, %edx callq 0x20b73 testq %rax, %rax je 0x3d5d6 movw %bx, 0x18(%rax) movq %rax, 0x8(%rsp) movq $-0x7, %rdx jmp 0x3d5e3 movl $0x0, 0x8(%rsp) movl $0x6, %edx movq 0x8(%rsp), %rax addq $0x10, %rsp popq %rbx retq
js_new_string_char: push rbx sub rsp, 10h mov ebx, esi cmp esi, 0FFh ja short loc_3D5B0 lea rsi, [rsp+18h+var_11] mov [rsi], bl mov edx, 1 call js_new_string8_len jmp short loc_3D5E8 loc_3D5B0: mov esi, 1 mov edx, 1 call js_alloc_string test rax, rax jz short loc_3D5D6 mov [rax+18h], bx mov [rsp+18h+var_10], rax mov rdx, 0FFFFFFFFFFFFFFF9h jmp short loc_3D5E3 loc_3D5D6: mov dword ptr [rsp+18h+var_10], 0 mov edx, 6 loc_3D5E3: mov rax, [rsp+18h+var_10] loc_3D5E8: add rsp, 10h pop rbx retn
long long js_new_string_char(long long a1, unsigned int a2) { long long v3; // rax char v4; // [rsp+7h] [rbp-11h] BYREF long long v5; // [rsp+8h] [rbp-10h] if ( a2 > 0xFF ) { v3 = js_alloc_string(a1, 1LL, 1u); if ( v3 ) { *(_WORD *)(v3 + 24) = a2; return v3; } else { LODWORD(v5) = 0; } return v5; } else { v4 = a2; return js_new_string8_len(a1, (long long)&v4, 1u); } }
47,922
js_new_string_char
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string_char(JSContext *ctx, uint16_t c) { if (c < 0x100) { char ch8 = c; return js_new_string8_len(ctx, &ch8, 1); } else { uint16_t ch16 = c; return js_new_string16_len(ctx, &ch16, 1); } }
O2
c
js_new_string_char: pushq %rax cmpw $0xff, %si ja 0x35eb9 leaq 0x5(%rsp), %rax movb %sil, (%rax) pushq $0x1 popq %rdx movq %rax, %rsi callq 0x1a4e8 jmp 0x35ecc leaq 0x6(%rsp), %rax movw %si, (%rax) pushq $0x1 popq %rdx movq %rax, %rsi callq 0x35ff3 popq %rcx retq
js_new_string_char: push rax cmp si, 0FFh ja short loc_35EB9 lea rax, [rsp+8+var_3] mov [rax], sil push 1 pop rdx mov rsi, rax call js_new_string8_len jmp short loc_35ECC loc_35EB9: lea rax, [rsp+8+var_2] mov [rax], si push 1 pop rdx mov rsi, rax call js_new_string16_len loc_35ECC: pop rcx retn
long long js_new_string_char(long long a1, unsigned __int16 a2) { long long v2; // rax int v4; // [rsp+0h] [rbp-4h] BYREF v4 = HIDWORD(v2); if ( a2 > 0xFFu ) { HIWORD(v4) = a2; return js_new_string16_len(a1, (char *)&v4 + 2, 1LL); } else { BYTE1(v4) = a2; return js_new_string8_len(a1, (long long)&v4 + 1, 1u); } }
js_new_string_char: PUSH RAX CMP SI,0xff JA 0x00135eb9 LEA RAX,[RSP + 0x5] MOV byte ptr [RAX],SIL PUSH 0x1 POP RDX MOV RSI,RAX CALL 0x0011a4e8 JMP 0x00135ecc LAB_00135eb9: LEA RAX,[RSP + 0x6] MOV word ptr [RAX],SI PUSH 0x1 POP RDX MOV RSI,RAX CALL 0x00135ff3 LAB_00135ecc: POP RCX RET
void js_new_string_char(int8 param_1,ushort param_2) { int1 local_3; int1 local_2 [2]; if (param_2 < 0x100) { js_new_string8_len(param_1,&local_3,1); } else { js_new_string16_len(param_1,local_2,1); } return; }
47,923
ftxui::(anonymous namespace)::ExecuteSignalHandlers()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ExecuteSignalHandlers() { int signal_exit_count = g_signal_exit_count.exchange(0); while (signal_exit_count--) { ScreenInteractive::Private::Signal(*g_active_screen, SIGABRT); } #if !defined(_WIN32) int signal_stop_count = g_signal_stop_count.exchange(0); while (signal_stop_count--) { ScreenInteractive::Private::Signal(*g_active_screen, SIGTSTP); } int signal_resize_count = g_signal_resize_count.exchange(0); while (signal_resize_count--) { ScreenInteractive::Private::Signal(*g_active_screen, SIGWINCH); } #endif }
O3
cpp
ftxui::(anonymous namespace)::ExecuteSignalHandlers(): pushq %rbp pushq %rbx pushq %rax xorl %ebx, %ebx xorl %ebp, %ebp xchgl %ebp, 0x2bb8b(%rip) # 0x5a2c8 testl %ebp, %ebp je 0x2e74a callq 0x2e59f decl %ebp jne 0x2e741 xchgl %ebx, 0x2bb7c(%rip) # 0x5a2cc testl %ebx, %ebx je 0x2e769 movq 0x2bb65(%rip), %rdi # 0x5a2c0 movl $0x14, %esi callq 0x2fa50 decl %ebx jne 0x2e754 xorl %ebx, %ebx xchgl %ebx, 0x2bb5f(%rip) # 0x5a2d0 testl %ebx, %ebx je 0x2e78a movq 0x2bb44(%rip), %rdi # 0x5a2c0 movl $0x1c, %esi callq 0x2fa50 decl %ebx jne 0x2e775 addq $0x8, %rsp popq %rbx popq %rbp retq nop
_ZN5ftxui12_GLOBAL__N_121ExecuteSignalHandlersEv: push rbp push rbx push rax xor ebx, ebx xor ebp, ebp xchg ebp, cs:_ZN5ftxui12_GLOBAL__N_119g_signal_exit_countE; ftxui::`anonymous namespace'::g_signal_exit_count test ebp, ebp jz short loc_2E74A loc_2E741: call _ZN5ftxui12_GLOBAL__N_16OnExitEv; ftxui::`anonymous namespace'::OnExit(void) dec ebp jnz short loc_2E741 loc_2E74A: xchg ebx, cs:_ZN5ftxui12_GLOBAL__N_119g_signal_stop_countE; ftxui::`anonymous namespace'::g_signal_stop_count test ebx, ebx jz short loc_2E769 loc_2E754: mov rdi, cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE; this mov esi, 14h; int call _ZN5ftxui17ScreenInteractive6SignalEi; ftxui::ScreenInteractive::Signal(int) dec ebx jnz short loc_2E754 loc_2E769: xor ebx, ebx xchg ebx, cs:_ZN5ftxui12_GLOBAL__N_121g_signal_resize_countE; ftxui::`anonymous namespace'::g_signal_resize_count test ebx, ebx jz short loc_2E78A loc_2E775: mov rdi, cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE; this mov esi, 1Ch; int call _ZN5ftxui17ScreenInteractive6SignalEi; ftxui::ScreenInteractive::Signal(int) dec ebx jnz short loc_2E775 loc_2E78A: add rsp, 8 pop rbx pop rbp retn
long long ftxui::`anonymous namespace'::ExecuteSignalHandlers(ftxui::_anonymous_namespace_ *this) { __int32 i; // ebp long long result; // rax __int32 j; // ebx __int32 k; // ebx for ( i = _InterlockedExchange(&ftxui::`anonymous namespace'::g_signal_exit_count, 0); i; --i ) result = ftxui::`anonymous namespace'::OnExit(this); for ( j = _InterlockedExchange(&ftxui::`anonymous namespace'::g_signal_stop_count, 0); j; --j ) result = ftxui::ScreenInteractive::Signal(ftxui::`anonymous namespace'::g_active_screen, 20); for ( k = _InterlockedExchange(&ftxui::`anonymous namespace'::g_signal_resize_count, 0); k; --k ) result = ftxui::ScreenInteractive::Signal(ftxui::`anonymous namespace'::g_active_screen, 28); return result; }
ExecuteSignalHandlers: PUSH RBP PUSH RBX PUSH RAX XOR EBX,EBX XOR EBP,EBP XCHG dword ptr [0x0015a2c8],EBP TEST EBP,EBP JZ 0x0012e74a LAB_0012e741: CALL 0x0012e59f DEC EBP JNZ 0x0012e741 LAB_0012e74a: XCHG dword ptr [0x0015a2cc],EBX TEST EBX,EBX JZ 0x0012e769 LAB_0012e754: MOV RDI,qword ptr [0x0015a2c0] MOV ESI,0x14 CALL 0x0012fa50 DEC EBX JNZ 0x0012e754 LAB_0012e769: XOR EBX,EBX XCHG dword ptr [0x0015a2d0],EBX TEST EBX,EBX JZ 0x0012e78a LAB_0012e775: MOV RDI,qword ptr [0x0015a2c0] MOV ESI,0x1c CALL 0x0012fa50 DEC EBX JNZ 0x0012e775 LAB_0012e78a: ADD RSP,0x8 POP RBX POP RBP RET
/* ftxui::(anonymous namespace)::ExecuteSignalHandlers() */ void ftxui::(anonymous_namespace)::ExecuteSignalHandlers(void) { int iVar1; int iVar2; iVar2 = g_signal_exit_count; LOCK(); g_signal_exit_count = 0; UNLOCK(); if (iVar2 != 0) { do { OnExit(); iVar2 = iVar2 + -1; } while (iVar2 != 0); } iVar2 = g_signal_stop_count; LOCK(); g_signal_stop_count = 0; UNLOCK(); iVar1 = g_signal_resize_count; for (; iVar2 != 0; iVar2 = iVar2 + -1) { g_signal_resize_count = iVar1; ScreenInteractive::Signal(g_active_screen,0x14); iVar1 = g_signal_resize_count; } LOCK(); g_signal_resize_count = 0; UNLOCK(); for (; iVar1 != 0; iVar1 = iVar1 + -1) { ScreenInteractive::Signal(g_active_screen,0x1c); } return; }
47,924
ma_pvio_wait_io_or_timeout
eloqsql/libmariadb/libmariadb/ma_pvio.c
int ma_pvio_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout) { if (pvio) { if (IS_PVIO_ASYNC_ACTIVE(pvio)) return ma_pvio_wait_async(pvio->mysql->options.extension->async_context, (is_read) ? VIO_IO_EVENT_READ : VIO_IO_EVENT_WRITE, timeout); if (pvio && pvio->methods->wait_io_or_timeout) return pvio->methods->wait_io_or_timeout(pvio, is_read, timeout); } return 1; }
O3
c
ma_pvio_wait_io_or_timeout: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl $0x1, %eax testq %rdi, %rdi je 0x8e4b5 movq 0x40(%rdi), %rcx testq %rcx, %rcx je 0x8e49c movq 0x480(%rcx), %rcx testq %rcx, %rcx je 0x8e49c movq 0x28(%rcx), %rbx testq %rbx, %rbx je 0x8e49c cmpb $0x0, 0x14(%rbx) je 0x8e49c xorl %eax, %eax cmpb $0x1, %sil adcl $0x1, %eax movl %eax, (%rbx) testl %edx, %edx js 0x8e463 orl $0x8, %eax movl %eax, (%rbx) movl %edx, 0x10(%rbx) movq 0x20(%rbx), %rax testq %rax, %rax je 0x8e477 movq 0x28(%rbx), %rsi movl $0x1, %edi callq *%rax leaq 0x38(%rbx), %rdi callq 0x9e6a5 movq 0x20(%rbx), %rax testq %rax, %rax je 0x8e491 movq 0x28(%rbx), %rsi xorl %edi, %edi callq *%rax xorl %eax, %eax testb $0x8, 0x4(%rbx) sete %al jmp 0x8e4b5 movq 0x48(%rdi), %rcx movq 0x30(%rcx), %rcx testq %rcx, %rcx je 0x8e4b5 movsbl %sil, %esi addq $0x8, %rsp popq %rbx popq %rbp jmpq *%rcx addq $0x8, %rsp popq %rbx popq %rbp retq
ma_pvio_wait_io_or_timeout: push rbp mov rbp, rsp push rbx push rax mov eax, 1 test rdi, rdi jz loc_8E4B5 mov rcx, [rdi+40h] test rcx, rcx jz short loc_8E49C mov rcx, [rcx+480h] test rcx, rcx jz short loc_8E49C mov rbx, [rcx+28h] test rbx, rbx jz short loc_8E49C cmp byte ptr [rbx+14h], 0 jz short loc_8E49C xor eax, eax cmp sil, 1 adc eax, 1 mov [rbx], eax test edx, edx js short loc_8E463 or eax, 8 mov [rbx], eax mov [rbx+10h], edx loc_8E463: mov rax, [rbx+20h] test rax, rax jz short loc_8E477 mov rsi, [rbx+28h] mov edi, 1 call rax loc_8E477: lea rdi, [rbx+38h] call my_context_yield mov rax, [rbx+20h] test rax, rax jz short loc_8E491 mov rsi, [rbx+28h] xor edi, edi call rax loc_8E491: xor eax, eax test byte ptr [rbx+4], 8 setz al jmp short loc_8E4B5 loc_8E49C: mov rcx, [rdi+48h] mov rcx, [rcx+30h] test rcx, rcx jz short loc_8E4B5 movsx esi, sil add rsp, 8 pop rbx pop rbp jmp rcx loc_8E4B5: add rsp, 8 pop rbx pop rbp retn
long long ma_pvio_wait_io_or_timeout(long long a1, char a2, int a3) { long long result; // rax long long v4; // rcx long long v5; // rcx long long v6; // rbx int v7; // eax void ( *v8)(long long, _QWORD); // rax void ( *v9)(_QWORD, _QWORD); // rax long long ( *v10)(long long, _QWORD); // rcx result = 1LL; if ( a1 ) { v4 = *(_QWORD *)(a1 + 64); if ( v4 && (v5 = *(_QWORD *)(v4 + 1152)) != 0 && (v6 = *(_QWORD *)(v5 + 40)) != 0 && *(_BYTE *)(v6 + 20) ) { v7 = (a2 == 0) + 1; *(_DWORD *)v6 = v7; if ( a3 >= 0 ) { *(_DWORD *)v6 = v7 | 8; *(_DWORD *)(v6 + 16) = a3; } v8 = *(void ( **)(long long, _QWORD))(v6 + 32); if ( v8 ) v8(1LL, *(_QWORD *)(v6 + 40)); my_context_yield(v6 + 56); v9 = *(void ( **)(_QWORD, _QWORD))(v6 + 32); if ( v9 ) v9(0LL, *(_QWORD *)(v6 + 40)); return (*(_BYTE *)(v6 + 4) & 8) == 0; } else { v10 = *(long long ( **)(long long, _QWORD))(*(_QWORD *)(a1 + 72) + 48LL); if ( v10 ) return v10(a1, (unsigned int)a2); } } return result; }
ma_pvio_wait_io_or_timeout: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EAX,0x1 TEST RDI,RDI JZ 0x0018e4b5 MOV RCX,qword ptr [RDI + 0x40] TEST RCX,RCX JZ 0x0018e49c MOV RCX,qword ptr [RCX + 0x480] TEST RCX,RCX JZ 0x0018e49c MOV RBX,qword ptr [RCX + 0x28] TEST RBX,RBX JZ 0x0018e49c CMP byte ptr [RBX + 0x14],0x0 JZ 0x0018e49c XOR EAX,EAX CMP SIL,0x1 ADC EAX,0x1 MOV dword ptr [RBX],EAX TEST EDX,EDX JS 0x0018e463 OR EAX,0x8 MOV dword ptr [RBX],EAX MOV dword ptr [RBX + 0x10],EDX LAB_0018e463: MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0018e477 MOV RSI,qword ptr [RBX + 0x28] MOV EDI,0x1 CALL RAX LAB_0018e477: LEA RDI,[RBX + 0x38] CALL 0x0019e6a5 MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0018e491 MOV RSI,qword ptr [RBX + 0x28] XOR EDI,EDI CALL RAX LAB_0018e491: XOR EAX,EAX TEST byte ptr [RBX + 0x4],0x8 SETZ AL JMP 0x0018e4b5 LAB_0018e49c: MOV RCX,qword ptr [RDI + 0x48] MOV RCX,qword ptr [RCX + 0x30] TEST RCX,RCX JZ 0x0018e4b5 MOVSX ESI,SIL ADD RSP,0x8 POP RBX POP RBP JMP RCX LAB_0018e4b5: ADD RSP,0x8 POP RBX POP RBP RET
ulong ma_pvio_wait_io_or_timeout(long param_1,char param_2,uint param_3) { long lVar1; uint *puVar2; code *UNRECOVERED_JUMPTABLE; uint uVar3; ulong uVar4; uVar4 = 1; if (param_1 != 0) { if ((((*(long *)(param_1 + 0x40) == 0) || (lVar1 = *(long *)(*(long *)(param_1 + 0x40) + 0x480), lVar1 == 0)) || (puVar2 = *(uint **)(lVar1 + 0x28), puVar2 == (uint *)0x0)) || ((char)puVar2[5] == '\0')) { UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1 + 0x48) + 0x30); if (UNRECOVERED_JUMPTABLE != (code *)0x0) { /* WARNING: Could not recover jumptable at 0x0018e4b3. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar4 = (*UNRECOVERED_JUMPTABLE)(param_1,(int)param_2); return uVar4; } } else { uVar3 = (param_2 == '\0') + 1; *puVar2 = uVar3; if (-1 < (int)param_3) { *puVar2 = uVar3 | 8; puVar2[4] = param_3; } if (*(code **)(puVar2 + 8) != (code *)0x0) { (**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10)); } my_context_yield(puVar2 + 0xe); if (*(code **)(puVar2 + 8) != (code *)0x0) { (**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10)); } uVar4 = (ulong)((puVar2[1] & 8) == 0); } } return uVar4; }
47,925
void google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::TypeHandler, (void*)0>(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::TypeHandler::Type&&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h
inline void Add(typename TypeHandler::Type&& value) { if (rep_ != nullptr && current_size_ < rep_->allocated_size) { *cast<TypeHandler>(rep_->elements[current_size_++]) = std::move(value); return; } if (!rep_ || rep_->allocated_size == total_size_) { Reserve(total_size_ + 1); } ++rep_->allocated_size; typename TypeHandler::Type* result = TypeHandler::New(arena_, std::move(value)); rep_->elements[current_size_++] = result; }
O3
c
void google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::TypeHandler, (void*)0>(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::TypeHandler::Type&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rdi), %rax testq %rax, %rax je 0x83a15 movslq 0x8(%rbx), %rcx movl (%rax), %esi cmpl %esi, %ecx jge 0x83a1a leal 0x1(%rcx), %edx movl %edx, 0x8(%rbx) movq 0x8(%rax,%rcx,8), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2c6a0 movl 0xc(%rbx), %esi jmp 0x83a1f cmpl 0xc(%rbx), %esi jne 0x83a2f incl %esi movq %rbx, %rdi callq 0x84db0 movq 0x10(%rbx), %rax movl (%rax), %esi incl %esi movl %esi, (%rax) movq (%rbx), %rdi testq %rdi, %rdi je 0x83a5c movq 0x18c43e(%rip), %rdx # 0x20fe80 movl $0x20, %esi callq 0x78480 movq %rax, (%rdx) leaq -0x26a9a(%rip), %rcx # 0x5cfbc movq %rcx, 0x8(%rdx) jmp 0x83a66 movl $0x20, %edi callq 0x2d270 leaq 0x10(%rax), %rdx movq %rdx, (%rax) movq (%r14), %rsi leaq 0x10(%r14), %rcx cmpq %rcx, %rsi je 0x83a85 movq %rsi, (%rax) movq (%rcx), %rdx movq %rdx, 0x10(%rax) jmp 0x83a8b movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%r14), %rdx movq %rdx, 0x8(%rax) movq %rcx, (%r14) movq $0x0, 0x8(%r14) movb $0x0, 0x10(%r14) movq 0x10(%rbx), %rcx movslq 0x8(%rbx), %rdx leal 0x1(%rdx), %esi movl %esi, 0x8(%rbx) movq %rax, 0x8(%rcx,%rdx,8) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerETnPNSt9enable_ifIXsrNT_7MovableE5valueEvE4typeELPv0EEEvONSE_4TypeE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rdi+10h] test rax, rax jz short loc_83A15 movsxd rcx, dword ptr [rbx+8] mov esi, [rax] cmp ecx, esi jge short loc_83A1A lea edx, [rcx+1] mov [rbx+8], edx mov rdi, [rax+rcx*8+8] mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) loc_83A15: mov esi, [rbx+0Ch] jmp short loc_83A1F loc_83A1A: cmp esi, [rbx+0Ch] jnz short loc_83A2F loc_83A1F: inc esi; int mov rdi, rbx; this call _ZN6google8protobuf8internal20RepeatedPtrFieldBase7ReserveEi; google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int) mov rax, [rbx+10h] mov esi, [rax] loc_83A2F: inc esi mov [rax], esi mov rdi, [rbx]; this test rdi, rdi jz short loc_83A5C mov rdx, cs:_ZTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_ptr; type_info * mov esi, 20h ; ' '; unsigned __int64 call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rdx], rax lea rcx, _ZN6google8protobuf8internal21arena_destruct_objectINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvPv; google::protobuf::internal::arena_destruct_object<std::string>(void *) mov [rdx+8], rcx jmp short loc_83A66 loc_83A5C: mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) loc_83A66: lea rdx, [rax+10h] mov [rax], rdx mov rsi, [r14] lea rcx, [r14+10h] cmp rsi, rcx jz short loc_83A85 mov [rax], rsi mov rdx, [rcx] mov [rax+10h], rdx jmp short loc_83A8B loc_83A85: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_83A8B: mov rdx, [r14+8] mov [rax+8], rdx mov [r14], rcx mov qword ptr [r14+8], 0 mov byte ptr [r14+10h], 0 mov rcx, [rbx+10h] movsxd rdx, dword ptr [rbx+8] lea esi, [rdx+1] mov [rbx+8], esi mov [rcx+rdx*8+8], rax add rsp, 8 pop rbx pop r14 retn
_QWORD * ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerETnPNSt9enable_ifIXsrNT_7MovableE5valueEvE4typeELPv0EEEvONSE_4TypeE( google::protobuf::internal::RepeatedPtrFieldBase *this, long long a2) { int *v4; // rax long long v5; // rcx int v6; // esi _QWORD *result; // rax google::protobuf::Arena *v8; // rdi _QWORD *v9; // rdx _OWORD *v10; // rcx long long v11; // rcx long long v12; // rdx v4 = (int *)*((_QWORD *)this + 2); if ( !v4 ) { v6 = *((_DWORD *)this + 3); LABEL_6: google::protobuf::internal::RepeatedPtrFieldBase::Reserve(this, v6 + 1); v4 = (int *)*((_QWORD *)this + 2); v6 = *v4; goto LABEL_7; } v5 = *((int *)this + 2); v6 = *v4; if ( (int)v5 < *v4 ) { *((_DWORD *)this + 2) = v5 + 1; return std::string::operator=(*(_QWORD **)&v4[2 * v5 + 2], a2); } if ( v6 == *((_DWORD *)this + 3) ) goto LABEL_6; LABEL_7: *v4 = v6 + 1; v8 = *(google::protobuf::Arena **)this; if ( *(_QWORD *)this ) { result = (_QWORD *)google::protobuf::Arena::AllocateAlignedWithCleanup( v8, 0x20uLL, (const type_info *)&`typeinfo for'std::string); *v9 = result; v9[1] = google::protobuf::internal::arena_destruct_object<std::string>; } else { result = (_QWORD *)operator new(0x20uLL); } *result = result + 2; v10 = (_OWORD *)(a2 + 16); if ( *(_QWORD *)a2 == a2 + 16 ) { *((_OWORD *)result + 1) = *v10; } else { *result = *(_QWORD *)a2; result[2] = *(_QWORD *)v10; } result[1] = *(_QWORD *)(a2 + 8); *(_QWORD *)a2 = v10; *(_QWORD *)(a2 + 8) = 0LL; *(_BYTE *)(a2 + 16) = 0; v11 = *((_QWORD *)this + 2); v12 = *((int *)this + 2); *((_DWORD *)this + 2) = v12 + 1; *(_QWORD *)(v11 + 8 * v12 + 8) = result; return result; }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerETnPNSt9enable_ifIXsrNT_7MovableE5valueEvE4typeELPv0EEEvONSE_4TypeE: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX JZ 0x00183a15 MOVSXD RCX,dword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] CMP ECX,ESI JGE 0x00183a1a LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x8],EDX MOV RDI,qword ptr [RAX + RCX*0x8 + 0x8] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x0012c6a0 LAB_00183a15: MOV ESI,dword ptr [RBX + 0xc] JMP 0x00183a1f LAB_00183a1a: CMP ESI,dword ptr [RBX + 0xc] JNZ 0x00183a2f LAB_00183a1f: INC ESI MOV RDI,RBX CALL 0x00184db0 MOV RAX,qword ptr [RBX + 0x10] MOV ESI,dword ptr [RAX] LAB_00183a2f: INC ESI MOV dword ptr [RAX],ESI MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00183a5c MOV RDX,qword ptr [0x0030fe80] MOV ESI,0x20 CALL 0x00178480 MOV qword ptr [RDX],RAX LEA RCX,[0x15cfbc] MOV qword ptr [RDX + 0x8],RCX JMP 0x00183a66 LAB_00183a5c: MOV EDI,0x20 CALL 0x0012d270 LAB_00183a66: LEA RDX,[RAX + 0x10] MOV qword ptr [RAX],RDX MOV RSI,qword ptr [R14] LEA RCX,[R14 + 0x10] CMP RSI,RCX JZ 0x00183a85 MOV qword ptr [RAX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RAX + 0x10],RDX JMP 0x00183a8b LAB_00183a85: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_00183a8b: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [R14],RCX MOV qword ptr [R14 + 0x8],0x0 MOV byte ptr [R14 + 0x10],0x0 MOV RCX,qword ptr [RBX + 0x10] MOVSXD RDX,dword ptr [RBX + 0x8] LEA ESI,[RDX + 0x1] MOV dword ptr [RBX + 0x8],ESI MOV qword ptr [RCX + RDX*0x8 + 0x8],RAX ADD RSP,0x8 POP RBX POP R14 RET
void _ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerETnPNSt9enable_ifIXsrNT_7MovableE5valueEvE4typeELPv0EEEvONSE_4TypeE (RepeatedPtrFieldBase *param_1,string *param_2) { string *psVar1; int iVar2; long lVar3; int *piVar4; long *plVar5; int iVar6; int1 auVar7 [16]; piVar4 = *(int **)(param_1 + 0x10); if (piVar4 == (int *)0x0) { iVar6 = *(int *)(param_1 + 0xc); } else { iVar2 = *(int *)(param_1 + 8); iVar6 = *piVar4; if (iVar2 < iVar6) { *(int *)(param_1 + 8) = iVar2 + 1; std::__cxx11::string::operator=(*(string **)(piVar4 + (long)iVar2 * 2 + 2),param_2); return; } if (iVar6 != *(int *)(param_1 + 0xc)) goto LAB_00183a2f; } google::protobuf::internal::RepeatedPtrFieldBase::Reserve(param_1,iVar6 + 1); piVar4 = *(int **)(param_1 + 0x10); iVar6 = *piVar4; LAB_00183a2f: *piVar4 = iVar6 + 1; if (*(ulong *)param_1 == 0) { plVar5 = (long *)operator_new(0x20); } else { auVar7 = google::protobuf::Arena::AllocateAlignedWithCleanup (*(ulong *)param_1,(type_info *)0x20); plVar5 = auVar7._0_8_; *auVar7._8_8_ = plVar5; auVar7._8_8_[1] = google::protobuf::internal::arena_destruct_object<std::__cxx11::string>; } *plVar5 = (long)(plVar5 + 2); psVar1 = param_2 + 0x10; if (*(string **)param_2 == psVar1) { lVar3 = *(long *)(param_2 + 0x18); plVar5[2] = *(long *)psVar1; plVar5[3] = lVar3; } else { *plVar5 = (long)*(string **)param_2; plVar5[2] = *(long *)psVar1; } plVar5[1] = *(long *)(param_2 + 8); *(string **)param_2 = psVar1; *(int8 *)(param_2 + 8) = 0; param_2[0x10] = (string)0x0; iVar6 = *(int *)(param_1 + 8); *(int *)(param_1 + 8) = iVar6 + 1; *(long **)(*(long *)(param_1 + 0x10) + 8 + (long)iVar6 * 8) = plVar5; return; }
47,926
check_magic
pnggroup[P]pngcheck/pngcheck.c
int check_magic(uch *magic, const char *fname, int which) { int i; const uch *good_magic = (which == 0)? good_PNG_magic : ((which == 1)? good_MNG_magic : good_JNG_magic); for (i = 1; i <= 3; ++i) { if (magic[i] != good_magic[i]) { return 2; } } if (magic[0] != good_magic[0] || magic[4] != good_magic[4] || magic[5] != good_magic[5] || magic[6] != good_magic[6] || magic[7] != good_magic[7]) { if (!verbose) { printf("%s: CORRUPTED by text conversion\n", fname); return 1; } printf(" File is CORRUPTED. It seems to have suffered "); /* This coding derived from Alexander Lehmann's checkpng code */ if (strncmp((const char *)&magic[4], "\012\032", 2) == 0) printf("DOS->Unix"); else if (strncmp((const char *)&magic[4], "\015\032", 2) == 0) printf("DOS->Mac"); else if (strncmp((const char *)&magic[4], "\015\015\032", 3) == 0) printf("Unix->Mac"); else if (strncmp((const char *)&magic[4], "\012\012\032", 3) == 0) printf("Mac->Unix"); else if (strncmp((const char *)&magic[4], "\012\012", 2) == 0) printf("DOS->Unix"); else if (strncmp((const char *)&magic[4], "\015\015\012\032", 4) == 0) printf("Unix->DOS"); else if (strncmp((const char *)&magic[4], "\015\012\032\015", 4) == 0) printf("Unix->DOS"); else if (strncmp((const char *)&magic[4], "\015\012\012", 3) == 0) printf("DOS EOF"); else if (strncmp((const char *)&magic[4], "\015\012\032\012", 4) != 0) printf("EOL"); else printf("an unknown"); printf(" conversion.\n"); if (magic[0] == 9) printf(" It was probably transmitted through a 7-bit channel.\n"); else if (magic[0] != good_magic[0]) printf(" It was probably transmitted in text mode.\n"); return 1; } return 0; }
O1
c
check_magic: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x1, %edx leaq 0x154e(%rip), %rax # 0x12608 leaq 0x154f(%rip), %rcx # 0x12610 cmoveq %rax, %rcx testl %edx, %edx leaq 0x1052(%rip), %rax # 0x12120 cmovneq %rcx, %rax movl $0x1, %ecx movb (%rbx,%rcx), %dl cmpb (%rax,%rcx), %dl jne 0x1124d incq %rcx cmpq $0x4, %rcx jne 0x110d7 movb (%rax), %r12b cmpb %r12b, (%rbx) jne 0x1111a movb 0x4(%rbx), %cl cmpb 0x4(%rax), %cl jne 0x1111a movb 0x5(%rbx), %cl cmpb 0x5(%rax), %cl jne 0x1111a movb 0x6(%rbx), %cl cmpb 0x6(%rax), %cl jne 0x1111a movb 0x7(%rbx), %cl xorl %ebp, %ebp cmpb 0x7(%rax), %cl je 0x112aa cmpl $0x0, 0xa0ef(%rip) # 0x1b210 je 0x11254 leaq 0x5eca(%rip), %rdi # 0x16ff8 xorl %eax, %eax callq 0x20e0 leaq 0x4(%rbx), %r14 leaq 0x5f0b(%rip), %rsi # 0x1704b movl $0x2, %edx movq %r14, %rdi callq 0x2050 leaq 0x5ed5(%rip), %r15 # 0x17029 testl %eax, %eax je 0x1127d leaq 0x5eda(%rip), %rsi # 0x1703d movl $0x2, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x11264 leaq 0x5ebd(%rip), %rsi # 0x1703c movl $0x3, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x1126d leaq 0x5eaf(%rip), %rsi # 0x1704a movl $0x3, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x11276 leaq 0x5eb6(%rip), %rsi # 0x1706d movl $0x2, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x1127d leaq 0x5e85(%rip), %rsi # 0x17058 movl $0x4, %edx movq %r14, %rdi callq 0x2050 leaq 0x5e76(%rip), %r15 # 0x1705d testl %eax, %eax je 0x1127d leaq 0x5e71(%rip), %rsi # 0x17067 movl $0x4, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x1127d leaq 0x5e5e(%rip), %rsi # 0x1706c movl $0x3, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax je 0x112cd leaq 0x5e4e(%rip), %rsi # 0x17078 movl $0x4, %edx movq %r14, %rdi callq 0x2050 testl %eax, %eax leaq 0x5e41(%rip), %rax # 0x17081 leaq 0x5e36(%rip), %r15 # 0x1707d cmoveq %rax, %r15 jmp 0x1127d movl $0x2, %ebp jmp 0x112aa leaq 0x5d7a(%rip), %rdi # 0x16fd5 xorl %eax, %eax callq 0x20e0 jmp 0x112a5 leaq 0x5dc8(%rip), %r15 # 0x17033 jmp 0x1127d leaq 0x5dcc(%rip), %r15 # 0x17040 jmp 0x1127d leaq 0x5dd1(%rip), %r15 # 0x1704e movq %r15, %rdi xorl %eax, %eax callq 0x20e0 leaq 0x73d4(%rip), %rdi # 0x18662 callq 0x2070 movb (%rbx), %al cmpb $0x9, %al jne 0x112b5 leaq 0x73fb(%rip), %rdi # 0x1869b callq 0x2070 movl $0x1, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x1, %ebp cmpb %r12b, %al je 0x112aa leaq 0x73a9(%rip), %rdi # 0x1866f callq 0x2070 jmp 0x112aa leaq 0x5d9c(%rip), %r15 # 0x17070 jmp 0x1127d
check_magic: push rbp push r15 push r14 push r12 push rbx mov rbx, rdi cmp edx, 1 lea rax, good_MNG_magic lea rcx, good_JNG_magic cmovz rcx, rax test edx, edx lea rax, good_PNG_magic cmovnz rax, rcx mov ecx, 1 loc_110D7: mov dl, [rbx+rcx] cmp dl, [rax+rcx] jnz loc_1124D inc rcx cmp rcx, 4 jnz short loc_110D7 mov r12b, [rax] cmp [rbx], r12b jnz short loc_1111A mov cl, [rbx+4] cmp cl, [rax+4] jnz short loc_1111A mov cl, [rbx+5] cmp cl, [rax+5] jnz short loc_1111A mov cl, [rbx+6] cmp cl, [rax+6] jnz short loc_1111A mov cl, [rbx+7] xor ebp, ebp cmp cl, [rax+7] jz loc_112AA loc_1111A: cmp cs:verbose, 0 jz loc_11254 lea rdi, aFileIsCorrupte; " File is CORRUPTED. It seems to have "... xor eax, eax call _printf lea r14, [rbx+4] lea rsi, unk_1704B mov edx, 2 mov rdi, r14 call _strncmp lea r15, aDosUnix; "DOS->Unix" test eax, eax jz loc_1127D lea rsi, unk_1703D mov edx, 2 mov rdi, r14 call _strncmp test eax, eax jz loc_11264 lea rsi, unk_1703C mov edx, 3 mov rdi, r14 call _strncmp test eax, eax jz loc_1126D lea rsi, unk_1704A mov edx, 3 mov rdi, r14 call _strncmp test eax, eax jz loc_11276 lea rsi, unk_1706D mov edx, 2 mov rdi, r14 call _strncmp test eax, eax jz loc_1127D lea rsi, unk_17058 mov edx, 4 mov rdi, r14 call _strncmp lea r15, aUnixDos; "Unix->DOS" test eax, eax jz loc_1127D lea rsi, unk_17067 mov edx, 4 mov rdi, r14 call _strncmp test eax, eax jz short loc_1127D lea rsi, unk_1706C mov edx, 3 mov rdi, r14 call _strncmp test eax, eax jz loc_112CD lea rsi, unk_17078 mov edx, 4 mov rdi, r14 call _strncmp test eax, eax lea rax, aAnUnknown; "an unknown" lea r15, unk_1707D cmovz r15, rax jmp short loc_1127D loc_1124D: mov ebp, 2 jmp short loc_112AA loc_11254: lea rdi, aSCorruptedByTe; "%s: CORRUPTED by text conversion\n" xor eax, eax call _printf jmp short loc_112A5 loc_11264: lea r15, aDosMac; "DOS->Mac" jmp short loc_1127D loc_1126D: lea r15, aUnixMac; "Unix->Mac" jmp short loc_1127D loc_11276: lea r15, aMacUnix; "Mac->Unix" loc_1127D: mov rdi, r15 xor eax, eax call _printf lea rdi, aConversion; " conversion." call _puts mov al, [rbx] cmp al, 9 jnz short loc_112B5 lea rdi, aItWasProbablyT; " It was probably transmitted through a"... call _puts loc_112A5: mov ebp, 1 loc_112AA: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_112B5: mov ebp, 1 cmp al, r12b jz short loc_112AA lea rdi, aItWasProbablyT_0; " It was probably transmitted in text m"... call _puts jmp short loc_112AA loc_112CD: lea r15, aDosEof; "DOS EOF" jmp short loc_1127D
long long check_magic(_BYTE *a1, const char *a2, int a3) { char *v3; // rcx char *v4; // rax long long i; // rcx char v6; // r12 unsigned int v7; // ebp const char *v8; // r15 v3 = (char *)&good_JNG_magic; if ( a3 == 1 ) v3 = (char *)&good_MNG_magic; v4 = (char *)&good_PNG_magic; if ( a3 ) v4 = v3; for ( i = 1LL; i != 4; ++i ) { if ( a1[i] != v4[i] ) return 2; } v6 = *v4; if ( *a1 == *v4 && a1[4] == v4[4] && a1[5] == v4[5] && a1[6] == v4[6] ) { v7 = 0; if ( a1[7] == v4[7] ) return v7; } if ( !verbose ) { printf("%s: CORRUPTED by text conversion\n", a2); return 1; } printf(" File is CORRUPTED. It seems to have suffered "); v8 = "DOS->Unix"; if ( !(unsigned int)strncmp(a1 + 4, &unk_1704B, 2LL) ) { LABEL_30: printf(v8); goto LABEL_31; } if ( !(unsigned int)strncmp(a1 + 4, &unk_1703D, 2LL) ) { printf("DOS->Mac"); } else { if ( (unsigned int)strncmp(a1 + 4, &unk_1703C, 3LL) ) { if ( !(unsigned int)strncmp(a1 + 4, &unk_1704A, 3LL) ) { v8 = "Mac->Unix"; } else if ( (unsigned int)strncmp(a1 + 4, &unk_1706D, 2LL) ) { v8 = "Unix->DOS"; if ( (unsigned int)strncmp(a1 + 4, &unk_17058, 4LL) ) { if ( (unsigned int)strncmp(a1 + 4, &unk_17067, 4LL) ) { if ( !(unsigned int)strncmp(a1 + 4, &unk_1706C, 3LL) ) { printf("DOS EOF"); goto LABEL_31; } v8 = (const char *)&unk_1707D; if ( !(unsigned int)strncmp(a1 + 4, &unk_17078, 4LL) ) v8 = "an unknown"; } } } goto LABEL_30; } printf("Unix->Mac"); } LABEL_31: puts(" conversion."); if ( *a1 == 9 ) { puts(" It was probably transmitted through a 7-bit channel."); return 1; } v7 = 1; if ( *a1 != v6 ) puts(" It was probably transmitted in text mode."); return v7; }
check_magic: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP EDX,0x1 LEA RAX,[0x112608] LEA RCX,[0x112610] CMOVZ RCX,RAX TEST EDX,EDX LEA RAX,[0x112120] CMOVNZ RAX,RCX MOV ECX,0x1 LAB_001110d7: MOV DL,byte ptr [RBX + RCX*0x1] CMP DL,byte ptr [RAX + RCX*0x1] JNZ 0x0011124d INC RCX CMP RCX,0x4 JNZ 0x001110d7 MOV R12B,byte ptr [RAX] CMP byte ptr [RBX],R12B JNZ 0x0011111a MOV CL,byte ptr [RBX + 0x4] CMP CL,byte ptr [RAX + 0x4] JNZ 0x0011111a MOV CL,byte ptr [RBX + 0x5] CMP CL,byte ptr [RAX + 0x5] JNZ 0x0011111a MOV CL,byte ptr [RBX + 0x6] CMP CL,byte ptr [RAX + 0x6] JNZ 0x0011111a MOV CL,byte ptr [RBX + 0x7] XOR EBP,EBP CMP CL,byte ptr [RAX + 0x7] JZ 0x001112aa LAB_0011111a: CMP dword ptr [0x0011b210],0x0 JZ 0x00111254 LEA RDI,[0x116ff8] XOR EAX,EAX CALL 0x001020e0 LEA R14,[RBX + 0x4] LEA RSI,[0x11704b] MOV EDX,0x2 MOV RDI,R14 CALL 0x00102050 LEA R15,[0x117029] TEST EAX,EAX JZ 0x0011127d LEA RSI,[0x11703d] MOV EDX,0x2 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x00111264 LEA RSI,[0x11703c] MOV EDX,0x3 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x0011126d LEA RSI,[0x11704a] MOV EDX,0x3 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x00111276 LEA RSI,[0x11706d] MOV EDX,0x2 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x0011127d LEA RSI,[0x117058] MOV EDX,0x4 MOV RDI,R14 CALL 0x00102050 LEA R15,[0x11705d] TEST EAX,EAX JZ 0x0011127d LEA RSI,[0x117067] MOV EDX,0x4 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x0011127d LEA RSI,[0x11706c] MOV EDX,0x3 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX JZ 0x001112cd LEA RSI,[0x117078] MOV EDX,0x4 MOV RDI,R14 CALL 0x00102050 TEST EAX,EAX LEA RAX,[0x117081] LEA R15,[0x11707d] CMOVZ R15,RAX JMP 0x0011127d LAB_0011124d: MOV EBP,0x2 JMP 0x001112aa LAB_00111254: LEA RDI,[0x116fd5] XOR EAX,EAX CALL 0x001020e0 JMP 0x001112a5 LAB_00111264: LEA R15,[0x117033] JMP 0x0011127d LAB_0011126d: LEA R15,[0x117040] JMP 0x0011127d LAB_00111276: LEA R15,[0x11704e] LAB_0011127d: MOV RDI,R15 XOR EAX,EAX CALL 0x001020e0 LEA RDI,[0x118662] CALL 0x00102070 MOV AL,byte ptr [RBX] CMP AL,0x9 JNZ 0x001112b5 LEA RDI,[0x11869b] CALL 0x00102070 LAB_001112a5: MOV EBP,0x1 LAB_001112aa: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001112b5: MOV EBP,0x1 CMP AL,R12B JZ 0x001112aa LEA RDI,[0x11866f] CALL 0x00102070 JMP 0x001112aa LAB_001112cd: LEA R15,[0x117070] JMP 0x0011127d
int8 check_magic(char *param_1,int8 param_2,int param_3) { char cVar1; int iVar2; char *pcVar3; long lVar4; int8 uVar5; char *pcVar6; pcVar3 = (char *)&good_JNG_magic; if (param_3 == 1) { pcVar3 = (char *)&good_MNG_magic; } pcVar6 = (char *)&good_PNG_magic; if (param_3 != 0) { pcVar6 = pcVar3; } lVar4 = 1; do { if (param_1[lVar4] != pcVar6[lVar4]) { return 2; } lVar4 = lVar4 + 1; } while (lVar4 != 4); cVar1 = *pcVar6; if ((((*param_1 != cVar1) || (param_1[4] != pcVar6[4])) || (param_1[5] != pcVar6[5])) || ((param_1[6] != pcVar6[6] || (uVar5 = 0, param_1[7] != pcVar6[7])))) { if (verbose == 0) { printf("%s: CORRUPTED by text conversion\n"); } else { printf(" File is CORRUPTED. It seems to have suffered "); pcVar3 = param_1 + 4; iVar2 = strncmp(pcVar3,"\n\x1a",2); pcVar6 = "DOS->Unix"; if (iVar2 != 0) { iVar2 = strncmp(pcVar3,"\r\x1a",2); if (iVar2 == 0) { pcVar6 = "DOS->Mac"; } else { iVar2 = strncmp(pcVar3,"\r\r\x1a",3); if (iVar2 == 0) { pcVar6 = "Unix->Mac"; } else { iVar2 = strncmp(pcVar3,"\n\n\x1a",3); if (iVar2 == 0) { pcVar6 = "Mac->Unix"; } else { iVar2 = strncmp(pcVar3,"\n\n",2); if (iVar2 != 0) { iVar2 = strncmp(pcVar3,"\r\r\n\x1a",4); pcVar6 = "Unix->DOS"; if ((iVar2 != 0) && (iVar2 = strncmp(pcVar3,"\r\n\x1a\r",4), iVar2 != 0)) { iVar2 = strncmp(pcVar3,"\r\n\n",3); if (iVar2 == 0) { pcVar6 = "DOS EOF"; } else { iVar2 = strncmp(pcVar3,"\r\n\x1a\n",4); pcVar6 = "EOL"; if (iVar2 == 0) { pcVar6 = "an unknown"; } } } } } } } } printf(pcVar6); puts(" conversion."); if (*param_1 != '\t') { if (*param_1 == cVar1) { return 1; } puts(" It was probably transmitted in text mode."); return 1; } puts(" It was probably transmitted through a 7-bit channel."); } uVar5 = 1; } return uVar5; }
47,927
check_magic
pnggroup[P]pngcheck/pngcheck.c
int check_magic(uch *magic, const char *fname, int which) { int i; const uch *good_magic = (which == 0)? good_PNG_magic : ((which == 1)? good_MNG_magic : good_JNG_magic); for (i = 1; i <= 3; ++i) { if (magic[i] != good_magic[i]) { return 2; } } if (magic[0] != good_magic[0] || magic[4] != good_magic[4] || magic[5] != good_magic[5] || magic[6] != good_magic[6] || magic[7] != good_magic[7]) { if (!verbose) { printf("%s: CORRUPTED by text conversion\n", fname); return 1; } printf(" File is CORRUPTED. It seems to have suffered "); /* This coding derived from Alexander Lehmann's checkpng code */ if (strncmp((const char *)&magic[4], "\012\032", 2) == 0) printf("DOS->Unix"); else if (strncmp((const char *)&magic[4], "\015\032", 2) == 0) printf("DOS->Mac"); else if (strncmp((const char *)&magic[4], "\015\015\032", 3) == 0) printf("Unix->Mac"); else if (strncmp((const char *)&magic[4], "\012\012\032", 3) == 0) printf("Mac->Unix"); else if (strncmp((const char *)&magic[4], "\012\012", 2) == 0) printf("DOS->Unix"); else if (strncmp((const char *)&magic[4], "\015\015\012\032", 4) == 0) printf("Unix->DOS"); else if (strncmp((const char *)&magic[4], "\015\012\032\015", 4) == 0) printf("Unix->DOS"); else if (strncmp((const char *)&magic[4], "\015\012\012", 3) == 0) printf("DOS EOF"); else if (strncmp((const char *)&magic[4], "\015\012\032\012", 4) != 0) printf("EOL"); else printf("an unknown"); printf(" conversion.\n"); if (magic[0] == 9) printf(" It was probably transmitted through a 7-bit channel.\n"); else if (magic[0] != good_magic[0]) printf(" It was probably transmitted in text mode.\n"); return 1; } return 0; }
O3
c
check_magic: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x1, %edx leaq 0x1947(%rip), %rax # 0x13608 leaq 0x1948(%rip), %rcx # 0x13610 cmoveq %rax, %rcx testl %edx, %edx leaq 0x144b(%rip), %rax # 0x13120 cmovneq %rcx, %rax movl $0x1, %ecx movb (%rbx,%rcx), %dl cmpb (%rax,%rcx), %dl jne 0x11d71 incq %rcx cmpq $0x4, %rcx jne 0x11cde movb (%rax), %r12b cmpb %r12b, (%rbx) jne 0x11d21 movb 0x4(%rbx), %cl cmpb 0x4(%rax), %cl jne 0x11d21 movb 0x5(%rbx), %cl cmpb 0x5(%rax), %cl jne 0x11d21 movb 0x6(%rbx), %cl cmpb 0x6(%rax), %cl jne 0x11d21 movb 0x7(%rbx), %cl xorl %ebp, %ebp cmpb 0x7(%rax), %cl je 0x11e6d cmpl $0x0, 0xa4e8(%rip) # 0x1c210 je 0x11d7b leaq 0x61fd(%rip), %rdi # 0x17f2e xorl %ebp, %ebp xorl %eax, %eax callq 0x20e0 movzbl 0x4(%rbx), %eax cmpl $0xd, %eax je 0x11d8e cmpl $0xa, %eax jne 0x11dc3 leaq 0x6210(%rip), %r14 # 0x17f5f cmpb $0x1a, 0x5(%rbx) je 0x11e40 cmpb $0xa, 0x5(%rbx) jne 0x11dbb cmpb $0x1a, 0x6(%rbx) jne 0x11dbb leaq 0x6210(%rip), %r14 # 0x17f7c jmp 0x11e40 movl $0x2, %ebp jmp 0x11e6d leaq 0x6189(%rip), %rdi # 0x17f0b xorl %eax, %eax callq 0x20e0 jmp 0x11e68 cmpb $0x1a, 0x5(%rbx) jne 0x11da0 leaq 0x61ce(%rip), %r14 # 0x17f69 jmp 0x11e40 movb $0x1, %bpl cmpb $0xd, 0x5(%rbx) jne 0x11dc3 cmpb $0x1a, 0x6(%rbx) jne 0x11dc3 leaq 0x61bc(%rip), %r14 # 0x17f72 jmp 0x11e40 cmpb $0xa, 0x5(%rbx) je 0x11e40 xorl %ebp, %ebp leaq 0x4(%rbx), %r15 leaq 0x61b8(%rip), %rsi # 0x17f86 movl $0x4, %edx movq %r15, %rdi callq 0x2050 leaq 0x61a9(%rip), %r14 # 0x17f8b testl %eax, %eax je 0x11e40 leaq 0x61a8(%rip), %rsi # 0x17f95 movl $0x4, %edx movq %r15, %rdi callq 0x2050 testl %eax, %eax je 0x11e40 testb %bpl, %bpl je 0x11e18 cmpb $0xa, 0x5(%rbx) jne 0x11e18 cmpb $0xa, 0x6(%rbx) jne 0x11e18 leaq 0x6184(%rip), %r14 # 0x17f9a jmp 0x11e40 leaq 0x6183(%rip), %rsi # 0x17fa2 movl $0x4, %edx movq %r15, %rdi callq 0x2050 testl %eax, %eax leaq 0x6176(%rip), %rax # 0x17fab leaq 0x616b(%rip), %r14 # 0x17fa7 cmoveq %rax, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x20e0 leaq 0x773b(%rip), %rdi # 0x1958c callq 0x2070 movb (%rbx), %al cmpb $0x9, %al jne 0x11e78 leaq 0x7762(%rip), %rdi # 0x195c5 callq 0x2070 movl $0x1, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x1, %ebp cmpb %r12b, %al je 0x11e6d leaq 0x7710(%rip), %rdi # 0x19599 callq 0x2070 jmp 0x11e6d
check_magic: push rbp push r15 push r14 push r12 push rbx mov rbx, rdi cmp edx, 1 lea rax, good_MNG_magic lea rcx, good_JNG_magic cmovz rcx, rax test edx, edx lea rax, good_PNG_magic cmovnz rax, rcx mov ecx, 1 loc_11CDE: mov dl, [rbx+rcx] cmp dl, [rax+rcx] jnz loc_11D71 inc rcx cmp rcx, 4 jnz short loc_11CDE mov r12b, [rax] cmp [rbx], r12b jnz short loc_11D21 mov cl, [rbx+4] cmp cl, [rax+4] jnz short loc_11D21 mov cl, [rbx+5] cmp cl, [rax+5] jnz short loc_11D21 mov cl, [rbx+6] cmp cl, [rax+6] jnz short loc_11D21 mov cl, [rbx+7] xor ebp, ebp cmp cl, [rax+7] jz loc_11E6D loc_11D21: cmp cs:verbose, 0 jz short loc_11D7B lea rdi, aFileIsCorrupte; " File is CORRUPTED. It seems to have "... xor ebp, ebp xor eax, eax call _printf movzx eax, byte ptr [rbx+4] cmp eax, 0Dh jz short loc_11D8E cmp eax, 0Ah jnz short loc_11DC3 lea r14, aDosUnix; "DOS->Unix" cmp byte ptr [rbx+5], 1Ah jz loc_11E40 cmp byte ptr [rbx+5], 0Ah jnz short loc_11DBB cmp byte ptr [rbx+6], 1Ah jnz short loc_11DBB lea r14, aMacUnix; "Mac->Unix" jmp loc_11E40 loc_11D71: mov ebp, 2 jmp loc_11E6D loc_11D7B: lea rdi, aSCorruptedByTe; "%s: CORRUPTED by text conversion\n" xor eax, eax call _printf jmp loc_11E68 loc_11D8E: cmp byte ptr [rbx+5], 1Ah jnz short loc_11DA0 lea r14, aDosMac; "DOS->Mac" jmp loc_11E40 loc_11DA0: mov bpl, 1 cmp byte ptr [rbx+5], 0Dh jnz short loc_11DC3 cmp byte ptr [rbx+6], 1Ah jnz short loc_11DC3 lea r14, aUnixMac; "Unix->Mac" jmp loc_11E40 loc_11DBB: cmp byte ptr [rbx+5], 0Ah jz short loc_11E40 xor ebp, ebp loc_11DC3: lea r15, [rbx+4] lea rsi, unk_17F86 mov edx, 4 mov rdi, r15 call _strncmp lea r14, aUnixDos; "Unix->DOS" test eax, eax jz short loc_11E40 lea rsi, unk_17F95 mov edx, 4 mov rdi, r15 call _strncmp test eax, eax jz short loc_11E40 test bpl, bpl jz short loc_11E18 cmp byte ptr [rbx+5], 0Ah jnz short loc_11E18 cmp byte ptr [rbx+6], 0Ah jnz short loc_11E18 lea r14, aDosEof; "DOS EOF" jmp short loc_11E40 loc_11E18: lea rsi, unk_17FA2 mov edx, 4 mov rdi, r15 call _strncmp test eax, eax lea rax, aAnUnknown; "an unknown" lea r14, unk_17FA7 cmovz r14, rax loc_11E40: mov rdi, r14 xor eax, eax call _printf lea rdi, aConversion; " conversion." call _puts mov al, [rbx] cmp al, 9 jnz short loc_11E78 lea rdi, aItWasProbablyT; " It was probably transmitted through a"... call _puts loc_11E68: mov ebp, 1 loc_11E6D: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_11E78: mov ebp, 1 cmp al, r12b jz short loc_11E6D lea rdi, aItWasProbablyT_0; " It was probably transmitted in text m"... call _puts jmp short loc_11E6D
long long check_magic(_BYTE *a1, const char *a2, int a3) { char *v3; // rcx char *v4; // rax long long i; // rcx char v6; // r12 unsigned int v7; // ebp char v8; // bp int v9; // eax const char *v10; // r14 v3 = (char *)&good_JNG_magic; if ( a3 == 1 ) v3 = (char *)&good_MNG_magic; v4 = (char *)&good_PNG_magic; if ( a3 ) v4 = v3; for ( i = 1LL; i != 4; ++i ) { if ( a1[i] != v4[i] ) return 2; } v6 = *v4; if ( *a1 == *v4 && a1[4] == v4[4] && a1[5] == v4[5] && a1[6] == v4[6] ) { v7 = 0; if ( a1[7] == v4[7] ) return v7; } if ( !verbose ) { printf("%s: CORRUPTED by text conversion\n", a2); return 1; } v8 = 0; printf(" File is CORRUPTED. It seems to have suffered "); v9 = (unsigned __int8)a1[4]; if ( v9 == 13 ) { if ( a1[5] == 26 ) { printf("DOS->Mac"); goto LABEL_38; } v8 = 1; if ( a1[5] == 13 && a1[6] == 26 ) { printf("Unix->Mac"); goto LABEL_38; } goto LABEL_29; } if ( v9 != 10 ) { LABEL_29: v10 = "Unix->DOS"; if ( (unsigned int)strncmp(a1 + 4, &unk_17F86, 4LL) && (unsigned int)strncmp(a1 + 4, &unk_17F95, 4LL) ) { if ( v8 && a1[5] == 10 && a1[6] == 10 ) { printf("DOS EOF"); goto LABEL_38; } v10 = (const char *)&unk_17FA7; if ( !(unsigned int)strncmp(a1 + 4, &unk_17FA2, 4LL) ) v10 = "an unknown"; } LABEL_37: printf(v10); goto LABEL_38; } v10 = "DOS->Unix"; if ( a1[5] == 26 ) goto LABEL_37; if ( a1[5] != 10 || a1[6] != 26 ) { if ( a1[5] == 10 ) goto LABEL_37; v8 = 0; goto LABEL_29; } printf("Mac->Unix"); LABEL_38: puts(" conversion."); if ( *a1 == 9 ) { puts(" It was probably transmitted through a 7-bit channel."); return 1; } v7 = 1; if ( *a1 != v6 ) puts(" It was probably transmitted in text mode."); return v7; }
check_magic: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP EDX,0x1 LEA RAX,[0x113608] LEA RCX,[0x113610] CMOVZ RCX,RAX TEST EDX,EDX LEA RAX,[0x113120] CMOVNZ RAX,RCX MOV ECX,0x1 LAB_00111cde: MOV DL,byte ptr [RBX + RCX*0x1] CMP DL,byte ptr [RAX + RCX*0x1] JNZ 0x00111d71 INC RCX CMP RCX,0x4 JNZ 0x00111cde MOV R12B,byte ptr [RAX] CMP byte ptr [RBX],R12B JNZ 0x00111d21 MOV CL,byte ptr [RBX + 0x4] CMP CL,byte ptr [RAX + 0x4] JNZ 0x00111d21 MOV CL,byte ptr [RBX + 0x5] CMP CL,byte ptr [RAX + 0x5] JNZ 0x00111d21 MOV CL,byte ptr [RBX + 0x6] CMP CL,byte ptr [RAX + 0x6] JNZ 0x00111d21 MOV CL,byte ptr [RBX + 0x7] XOR EBP,EBP CMP CL,byte ptr [RAX + 0x7] JZ 0x00111e6d LAB_00111d21: CMP dword ptr [0x0011c210],0x0 JZ 0x00111d7b LEA RDI,[0x117f2e] XOR EBP,EBP XOR EAX,EAX CALL 0x001020e0 MOVZX EAX,byte ptr [RBX + 0x4] CMP EAX,0xd JZ 0x00111d8e CMP EAX,0xa JNZ 0x00111dc3 LEA R14,[0x117f5f] CMP byte ptr [RBX + 0x5],0x1a JZ 0x00111e40 CMP byte ptr [RBX + 0x5],0xa JNZ 0x00111dbb CMP byte ptr [RBX + 0x6],0x1a JNZ 0x00111dbb LEA R14,[0x117f7c] JMP 0x00111e40 LAB_00111d71: MOV EBP,0x2 JMP 0x00111e6d LAB_00111d7b: LEA RDI,[0x117f0b] XOR EAX,EAX CALL 0x001020e0 JMP 0x00111e68 LAB_00111d8e: CMP byte ptr [RBX + 0x5],0x1a JNZ 0x00111da0 LEA R14,[0x117f69] JMP 0x00111e40 LAB_00111da0: MOV BPL,0x1 CMP byte ptr [RBX + 0x5],0xd JNZ 0x00111dc3 CMP byte ptr [RBX + 0x6],0x1a JNZ 0x00111dc3 LEA R14,[0x117f72] JMP 0x00111e40 LAB_00111dbb: CMP byte ptr [RBX + 0x5],0xa JZ 0x00111e40 XOR EBP,EBP LAB_00111dc3: LEA R15,[RBX + 0x4] LEA RSI,[0x117f86] MOV EDX,0x4 MOV RDI,R15 CALL 0x00102050 LEA R14,[0x117f8b] TEST EAX,EAX JZ 0x00111e40 LEA RSI,[0x117f95] MOV EDX,0x4 MOV RDI,R15 CALL 0x00102050 TEST EAX,EAX JZ 0x00111e40 TEST BPL,BPL JZ 0x00111e18 CMP byte ptr [RBX + 0x5],0xa JNZ 0x00111e18 CMP byte ptr [RBX + 0x6],0xa JNZ 0x00111e18 LEA R14,[0x117f9a] JMP 0x00111e40 LAB_00111e18: LEA RSI,[0x117fa2] MOV EDX,0x4 MOV RDI,R15 CALL 0x00102050 TEST EAX,EAX LEA RAX,[0x117fab] LEA R14,[0x117fa7] CMOVZ R14,RAX LAB_00111e40: MOV RDI,R14 XOR EAX,EAX CALL 0x001020e0 LEA RDI,[0x11958c] CALL 0x00102070 MOV AL,byte ptr [RBX] CMP AL,0x9 JNZ 0x00111e78 LEA RDI,[0x1195c5] CALL 0x00102070 LAB_00111e68: MOV EBP,0x1 LAB_00111e6d: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00111e78: MOV EBP,0x1 CMP AL,R12B JZ 0x00111e6d LEA RDI,[0x119599] CALL 0x00102070 JMP 0x00111e6d
int8 check_magic(char *param_1,int8 param_2,int param_3) { char cVar1; bool bVar2; int iVar3; char *pcVar4; char *pcVar5; long lVar6; pcVar5 = (char *)&good_JNG_magic; if (param_3 == 1) { pcVar5 = (char *)&good_MNG_magic; } pcVar4 = (char *)&good_PNG_magic; if (param_3 != 0) { pcVar4 = pcVar5; } lVar6 = 1; do { if (param_1[lVar6] != pcVar4[lVar6]) { return 2; } lVar6 = lVar6 + 1; } while (lVar6 != 4); cVar1 = *pcVar4; if ((((*param_1 == cVar1) && (param_1[4] == pcVar4[4])) && (param_1[5] == pcVar4[5])) && ((param_1[6] == pcVar4[6] && (param_1[7] == pcVar4[7])))) { return 0; } if (verbose == 0) { printf("%s: CORRUPTED by text conversion\n"); return 1; } bVar2 = false; printf(" File is CORRUPTED. It seems to have suffered "); if (param_1[4] == '\r') { if (param_1[5] == '\x1a') { pcVar5 = "DOS->Mac"; goto LAB_00111e40; } bVar2 = true; if ((param_1[5] == '\r') && (param_1[6] == '\x1a')) { pcVar5 = "Unix->Mac"; goto LAB_00111e40; } } else if (param_1[4] == '\n') { pcVar5 = "DOS->Unix"; if (param_1[5] == '\x1a') goto LAB_00111e40; if ((param_1[5] == '\n') && (param_1[6] == '\x1a')) { pcVar5 = "Mac->Unix"; goto LAB_00111e40; } if (param_1[5] == '\n') goto LAB_00111e40; bVar2 = false; } pcVar4 = param_1 + 4; iVar3 = strncmp(pcVar4,"\r\r\n\x1a",4); pcVar5 = "Unix->DOS"; if ((iVar3 != 0) && (iVar3 = strncmp(pcVar4,"\r\n\x1a\r",4), iVar3 != 0)) { if ((bVar2) && ((param_1[5] == '\n' && (param_1[6] == '\n')))) { pcVar5 = "DOS EOF"; } else { iVar3 = strncmp(pcVar4,"\r\n\x1a\n",4); pcVar5 = "EOL"; if (iVar3 == 0) { pcVar5 = "an unknown"; } } } LAB_00111e40: printf(pcVar5); puts(" conversion."); if (*param_1 == '\t') { puts(" It was probably transmitted through a 7-bit channel."); return 1; } if (*param_1 != cVar1) { puts(" It was probably transmitted in text mode."); return 1; } return 1; }
47,928
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 0x3a1ce movl %eax, %r15d movq %r14, %rdi movl $0x19, %esi movq %rbx, %rdx xorl %eax, %eax callq 0x3a1ce movl %eax, %ebx orl %r15d, %ebx movq %r14, %rdi movl $0x1a, %esi movq %r13, %rdx xorl %eax, %eax callq 0x3a1ce movl %eax, %r15d movq %r14, %rdi movl $0x1b, %esi movq %r12, %rdx xorl %eax, %eax callq 0x3a1ce movl %eax, %r12d orl %r15d, %r12d orl %ebx, %r12d movq %r14, %rdi movl $0x1c, %esi movq -0x38(%rbp), %rdx xorl %eax, %eax callq 0x3a1ce movl %eax, %ebx orl %r12d, %ebx movq %r14, %rdi movl $0x1d, %esi movq -0x40(%rbp), %rdx xorl %eax, %eax callq 0x3a1ce 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 loc_3C000: 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 0x0013a1ce MOV R15D,EAX MOV RDI,R14 MOV ESI,0x19 MOV RDX,RBX XOR EAX,EAX CALL 0x0013a1ce MOV EBX,EAX OR EBX,R15D MOV RDI,R14 MOV ESI,0x1a MOV RDX,R13 XOR EAX,EAX CALL 0x0013a1ce MOV R15D,EAX MOV RDI,R14 MOV ESI,0x1b MOV RDX,R12 XOR EAX,EAX CALL 0x0013a1ce 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 0x0013a1ce MOV EBX,EAX OR EBX,R12D MOV RDI,R14 MOV ESI,0x1d MOV RDX,qword ptr [RBP + -0x40] XOR EAX,EAX CALL 0x0013a1ce 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))); }
47,929
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0xcbe81 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcbf05 movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb5f47 leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0xcbeaa movq %rbx, %r13 jmp 0xcbecf movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x29080 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0xcbeb1 cmpq %r14, %rbx jae 0xcbee7 subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x292a0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcbf05 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_CBE81 mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_CBF05 mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_CBE81: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_CBEAA mov r13, rbx jmp short loc_CBECF loc_CBEAA: movsx r15, al mov r13, rbx loc_CBEB1: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_CBEB1 loc_CBECF: cmp rbx, r14 jnb short loc_CBEE7 sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_CBEE7: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_CBF05 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CBF05: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 char v8; // al long long v9; // r12 long long v10; // r13 long long v11; // r15 _BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v13[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v12, v13); v9 = v8; if ( v8 <= a3 ) { v11 = v8; v10 = a2; do { memcpy(v5, v12, v11); v5 += v9; v10 += v9; } while ( v5 + v9 <= v7 ); } else { v10 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v10); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x001cbe81 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cbf05 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b5f47 LAB_001cbe81: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x001cbeaa MOV R13,RBX JMP 0x001cbecf LAB_001cbeaa: MOVSX R15,AL MOV R13,RBX LAB_001cbeb1: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00129080 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x001cbeb1 LAB_001cbecf: CMP RBX,R14 JNC 0x001cbee7 SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x001292a0 LAB_001cbee7: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cbf05 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cbf05: CALL 0x00129250
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,930
mbedtls_ecp_copy
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecp.c
int mbedtls_ecp_copy(mbedtls_ecp_point *P, const mbedtls_ecp_point *Q) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; ECP_VALIDATE_RET(P != NULL); ECP_VALIDATE_RET(Q != NULL); MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&P->X, &Q->X)); MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&P->Y, &Q->Y)); MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&P->Z, &Q->Z)); cleanup: return ret; }
O3
c
mbedtls_ecp_copy: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 callq 0x7e098 testl %eax, %eax jne 0x84493 leaq 0x18(%r14), %rdi leaq 0x18(%rbx), %rsi callq 0x7e098 testl %eax, %eax je 0x8449b addq $0x8, %rsp popq %rbx popq %r14 retq addq $0x30, %r14 addq $0x30, %rbx movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x7e098
mbedtls_ecp_copy: push r14 push rbx push rax mov rbx, rsi mov r14, rdi call mbedtls_mpi_copy test eax, eax jnz short loc_84493 lea rdi, [r14+18h] lea rsi, [rbx+18h] call mbedtls_mpi_copy test eax, eax jz short loc_8449B loc_84493: add rsp, 8 pop rbx pop r14 retn loc_8449B: add r14, 30h ; '0' add rbx, 30h ; '0' mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp mbedtls_mpi_copy
long long mbedtls_ecp_copy(long long a1, long long a2) { long long result; // rax result = mbedtls_mpi_copy(a1, a2); if ( !(_DWORD)result ) { result = mbedtls_mpi_copy(a1 + 24, a2 + 24); if ( !(_DWORD)result ) return mbedtls_mpi_copy(a1 + 48, a2 + 48); } return result; }
mbedtls_ecp_copy: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CALL 0x0017e098 TEST EAX,EAX JNZ 0x00184493 LEA RDI,[R14 + 0x18] LEA RSI,[RBX + 0x18] CALL 0x0017e098 TEST EAX,EAX JZ 0x0018449b LAB_00184493: ADD RSP,0x8 POP RBX POP R14 RET LAB_0018449b: ADD R14,0x30 ADD RBX,0x30 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0017e098
void mbedtls_ecp_copy(long param_1,long param_2) { int iVar1; iVar1 = mbedtls_mpi_copy(); if (iVar1 == 0) { iVar1 = mbedtls_mpi_copy(param_1 + 0x18,param_2 + 0x18); if (iVar1 == 0) { mbedtls_mpi_copy(param_1 + 0x30,param_2 + 0x30); return; } } return; }
47,931
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O3
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x9368b cmpq $0x0, 0x10(%rsi) je 0x936e6 movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1a450 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86378 leaq 0x5d131(%rip), %rsi # 0xf07e2 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78b0d movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1ae50 xorl %ebp, %ebp movq 0x98919(%rip), %rsi # 0x12bff0 movq 0x98882(%rip), %rdx # 0x12bf60 movq %rbx, %rdi callq 0x1af40 callq 0x1a320 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93709 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93724 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0x9374e jmp 0x93756 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9374e movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x9374e movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_9368B cmp qword ptr [rsi+10h], 0 jz short loc_936E6 mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_9368B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_936E6: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93709 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_93709: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93724 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_93724: test bpl, bpl jnz short loc_9374E jmp short loc_93756 mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9374E mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9374E mov r14, rax loc_9374E: mov rdi, rbx; void * call ___cxa_free_exception loc_93756: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x0019368b CMP qword ptr [RSI + 0x10],0x0 JZ 0x001936e6 MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0019368b: MOV EDI,0x10 CALL 0x0011a450 MOV RBX,RAX LAB_00193698: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186378 LAB_001936aa: LEA RSI,[0x1f07e2] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178b0d MOV BPL,0x1 LAB_001936c1: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0011ae50 XOR EBP,EBP MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,RBX CALL 0x0011af40 LAB_001936e6: CALL 0x0011a320
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193698 to 001936a9 has its CatchHandler @ 0019374b */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 001936aa to 001936bd has its CatchHandler @ 0019372b */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 001936c1 to 001936e5 has its CatchHandler @ 001936eb */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
47,932
ftxui::(anonymous namespace)::InputBase::HandleRightCtrl()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/input.cpp
bool HandleRightCtrl() { if (cursor_position() == (int)content().size()) { return false; } // Move right, until entering a word. while (cursor_position() < (int)content().size()) { cursor_position() = GlyphNext(content(), cursor_position()); if (IsWordCharacter(content(), cursor_position())) { break; } } // Move right, as long as right is a word character: while (cursor_position() < (int)content().size()) { const size_t next = GlyphNext(content(), cursor_position()); if (!IsWordCharacter(content(), cursor_position())) { break; } cursor_position() = next; } return true; }
O1
cpp
ftxui::(anonymous namespace)::InputBase::HandleRightCtrl(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x28(%rdi), %r14 addq $0xf8, %rbx movq %rbx, %rdi callq 0x2cdc2 movl (%rax), %ebp movq %r14, %rdi callq 0x2c944 movl 0x8(%rax), %r13d cmpl %r13d, %ebp je 0x2c46c movq %rbx, %rdi callq 0x2cdc2 movl (%rax), %r15d movq %r14, %rdi callq 0x2c944 cmpl 0x8(%rax), %r15d jge 0x2c453 movq %r14, %rdi callq 0x2c944 movq %rax, %r15 movq %rbx, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r15, %rdi callq 0x3b991 movq %rax, %r15 movq %rbx, %rdi callq 0x2cdc2 movl %r15d, (%rax) movq %r14, %rdi callq 0x2c944 movq %rax, %r15 movq %rbx, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r15, %rdi callq 0x2c5e9 testb %al, %al je 0x2c398 jmp 0x2c453 movq %r14, %rdi callq 0x2c944 movq %rax, %r15 movq %rbx, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r15, %rdi callq 0x3b991 movq %rax, %r15 movq %r14, %rdi callq 0x2c944 movq %rax, %r12 movq %rbx, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r12, %rdi callq 0x2c5e9 testb %al, %al je 0x2c46c movq %rbx, %rdi callq 0x2cdc2 movl %r15d, (%rax) movq %rbx, %rdi callq 0x2cdc2 movl (%rax), %r15d movq %r14, %rdi callq 0x2c944 cmpl 0x8(%rax), %r15d jl 0x2c405 cmpl %r13d, %ebp setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5ftxui12_GLOBAL__N_19InputBase15HandleRightCtrlEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r14, [rdi+28h] add rbx, 0F8h mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov ebp, [rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r13d, [rax+8] cmp ebp, r13d jz loc_2C46C loc_2C398: mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov r15d, [rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) cmp r15d, [rax+8] jge loc_2C453 mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r15, rax mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r15 call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong) mov r15, rax mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov [rax], r15d mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r15, rax mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r15 call _ZN5ftxui12_GLOBAL__N_115IsWordCharacterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::`anonymous namespace'::IsWordCharacter(std::string const&,ulong) test al, al jz short loc_2C398 jmp short loc_2C453 loc_2C405: mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r15, rax mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r15 call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong) mov r15, rax mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r12, rax mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r12 call _ZN5ftxui12_GLOBAL__N_115IsWordCharacterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::`anonymous namespace'::IsWordCharacter(std::string const&,ulong) test al, al jz short loc_2C46C mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov [rax], r15d loc_2C453: mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov r15d, [rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) cmp r15d, [rax+8] jl short loc_2C405 loc_2C46C: cmp ebp, r13d setnz al add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ftxui::`anonymous namespace'::InputBase::HandleRightCtrl(ftxui::_anonymous_namespace_::InputBase *this) { char *v1; // r14 char *v2; // rbx int v3; // ebp int v4; // r13d int v5; // r15d long long v6; // r15 int *v7; // rax long long v8; // r15 int *v9; // rax long long v10; // r15 int *v11; // rax int v12; // r15d long long v13; // r12 int *v14; // rax int v15; // r15d v1 = (char *)this + 40; v2 = (char *)this + 248; v3 = *(_DWORD *)ftxui::Ref<int>::Address((char *)this + 248); v4 = *(_DWORD *)(ftxui::Ref<std::string>::Address((char *)this + 40) + 8); if ( v3 != v4 ) { do { v5 = *(_DWORD *)ftxui::Ref<int>::Address(v2); if ( v5 >= *(_DWORD *)(ftxui::Ref<std::string>::Address(v1) + 8) ) break; v6 = ftxui::Ref<std::string>::Address(v1); v7 = (int *)ftxui::Ref<int>::Address(v2); LODWORD(v6) = ftxui::GlyphNext(v6, *v7); *(_DWORD *)ftxui::Ref<int>::Address(v2) = v6; v8 = ftxui::Ref<std::string>::Address(v1); v9 = (int *)ftxui::Ref<int>::Address(v2); } while ( !(unsigned __int8)ftxui::`anonymous namespace'::IsWordCharacter(v8, *v9) ); while ( 1 ) { v15 = *(_DWORD *)ftxui::Ref<int>::Address(v2); if ( v15 >= *(_DWORD *)(ftxui::Ref<std::string>::Address(v1) + 8) ) break; v10 = ftxui::Ref<std::string>::Address(v1); v11 = (int *)ftxui::Ref<int>::Address(v2); v12 = ftxui::GlyphNext(v10, *v11); v13 = ftxui::Ref<std::string>::Address(v1); v14 = (int *)ftxui::Ref<int>::Address(v2); if ( !(unsigned __int8)ftxui::`anonymous namespace'::IsWordCharacter(v13, *v14) ) break; *(_DWORD *)ftxui::Ref<int>::Address(v2) = v12; } } return v3 != v4; }
HandleRightCtrl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0x28] ADD RBX,0xf8 MOV RDI,RBX CALL 0x0012cdc2 MOV EBP,dword ptr [RAX] MOV RDI,R14 CALL 0x0012c944 MOV R13D,dword ptr [RAX + 0x8] CMP EBP,R13D JZ 0x0012c46c LAB_0012c398: MOV RDI,RBX CALL 0x0012cdc2 MOV R15D,dword ptr [RAX] MOV RDI,R14 CALL 0x0012c944 CMP R15D,dword ptr [RAX + 0x8] JGE 0x0012c453 MOV RDI,R14 CALL 0x0012c944 MOV R15,RAX MOV RDI,RBX CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R15 CALL 0x0013b991 MOV R15,RAX MOV RDI,RBX CALL 0x0012cdc2 MOV dword ptr [RAX],R15D MOV RDI,R14 CALL 0x0012c944 MOV R15,RAX MOV RDI,RBX CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R15 CALL 0x0012c5e9 TEST AL,AL JZ 0x0012c398 JMP 0x0012c453 LAB_0012c405: MOV RDI,R14 CALL 0x0012c944 MOV R15,RAX MOV RDI,RBX CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R15 CALL 0x0013b991 MOV R15,RAX MOV RDI,R14 CALL 0x0012c944 MOV R12,RAX MOV RDI,RBX CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R12 CALL 0x0012c5e9 TEST AL,AL JZ 0x0012c46c MOV RDI,RBX CALL 0x0012cdc2 MOV dword ptr [RAX],R15D LAB_0012c453: MOV RDI,RBX CALL 0x0012cdc2 MOV R15D,dword ptr [RAX] MOV RDI,R14 CALL 0x0012c944 CMP R15D,dword ptr [RAX + 0x8] JL 0x0012c405 LAB_0012c46c: CMP EBP,R13D SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::(anonymous namespace)::InputBase::HandleRightCtrl() */ bool __thiscall ftxui::(anonymous_namespace)::InputBase::HandleRightCtrl(InputBase *this) { Ref<std::__cxx11::string> *this_00; int iVar1; int iVar2; int iVar3; int *piVar4; long lVar5; string *psVar6; int4 uVar7; int4 *puVar8; char cVar9; Ref<int> *this_01; this_00 = (Ref<std::__cxx11::string> *)(this + 0x28); this_01 = (Ref<int> *)(this + 0xf8); piVar4 = (int *)Ref<int>::Address(this_01); iVar1 = *piVar4; lVar5 = Ref<std::__cxx11::string>::Address(this_00); iVar2 = *(int *)(lVar5 + 8); if (iVar1 == iVar2) { LAB_0012c46c: return iVar1 != iVar2; } do { piVar4 = (int *)Ref<int>::Address(this_01); iVar3 = *piVar4; lVar5 = Ref<std::__cxx11::string>::Address(this_00); if (*(int *)(lVar5 + 8) <= iVar3) break; psVar6 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); uVar7 = GlyphNext(psVar6,(long)*piVar4); puVar8 = (int4 *)Ref<int>::Address(this_01); *puVar8 = uVar7; psVar6 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); cVar9 = IsWordCharacter(psVar6,(long)*piVar4); } while (cVar9 == '\0'); do { piVar4 = (int *)Ref<int>::Address(this_01); iVar3 = *piVar4; lVar5 = Ref<std::__cxx11::string>::Address(this_00); if (*(int *)(lVar5 + 8) <= iVar3) goto LAB_0012c46c; psVar6 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); uVar7 = GlyphNext(psVar6,(long)*piVar4); psVar6 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar4 = (int *)Ref<int>::Address(this_01); cVar9 = IsWordCharacter(psVar6,(long)*piVar4); if (cVar9 == '\0') goto LAB_0012c46c; puVar8 = (int4 *)Ref<int>::Address(this_01); *puVar8 = uVar7; } while( true ); }
47,933
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O0
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq %rcx, -0x80(%rbp) movq %r8, -0x88(%rbp) movq $0x0, -0xa8(%rbp) movl $0x0, -0xb4(%rbp) leaq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x78(%rbp), %rax addq -0x88(%rbp), %rax addq $0x2, %rax cmpq $0x50, %rax jbe 0x97ced movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x7d1e0 movq %rax, -0x98(%rbp) movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax addq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0x78(%rbp) je 0x97d1e movq -0x98(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x360b0 movq -0x98(%rbp), %rax movq -0x78(%rbp), %rcx movb $0x0, (%rax,%rcx) cmpq $0x0, -0x88(%rbp) je 0x97d4e movq -0xa0(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x360b0 movq -0xa0(%rbp), %rax movq -0x88(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x98050 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x98050 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x97db6 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x97dc4 movq -0x88(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc0(%rbp), %rax movq -0xc8(%rbp), %rcx movq %rcx, -0xb0(%rbp) addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x98(%rbp), %rax cmpq -0x90(%rbp), %rax jae 0x97e4c movq -0x98(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x98(%rbp) movzbl (%rax), %eax movq -0xa0(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0xa0(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x97e4a movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x97ecd jmp 0x97de3 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x97e63 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x97ec1 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x97e98 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x85f50 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x97eb5 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x85f50 movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xb4(%rbp) cmpq $0x0, -0xa8(%rbp) je 0x97ee3 movq -0xa8(%rbp), %rdi callq 0x7d560 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x97f10 movl -0xd4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq callq 0x362a0 nopw %cs:(%rax,%rax)
my_strnncollsp_tis620: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov [rbp+var_88], r8 mov [rbp+var_A8], 0 mov [rbp+var_B4], 0 lea rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_78] add rax, [rbp+var_88] add rax, 2 cmp rax, 50h ; 'P' jbe short loc_97CED mov rsi, [rbp+var_78] add rsi, [rbp+var_88] add rsi, 2 xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_98], rax mov [rbp+var_A8], rax loc_97CED: mov rax, [rbp+var_98] add rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax cmp [rbp+var_78], 0 jz short loc_97D1E mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_97D1E: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_97D4E mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_97D4E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_88] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] call thai2sortable mov [rbp+var_78], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] call thai2sortable mov [rbp+var_88], rax mov rax, [rbp+var_98] mov [rbp+var_C0], rax mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_97DB6 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_97DC4 loc_97DB6: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_97DC4: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_97DE3: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_97E4C mov rax, [rbp+var_98] mov rcx, rax add rcx, 1 mov [rbp+var_98], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_A0] mov rdx, rcx add rdx, 1 mov [rbp+var_A0], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_97E4A mov rax, [rbp+var_98] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_A0] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_B4], eax jmp loc_97ECD loc_97E4A: jmp short loc_97DE3 loc_97E4C: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_97E63 xor eax, eax mov [rbp+var_CC], eax jmp short loc_97EC1 loc_97E63: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_97E98 mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_D0], eax jmp short loc_97EB5 loc_97E98: mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov [rbp+var_D0], eax loc_97EB5: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_97EC1: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_97ECD: cmp [rbp+var_A8], 0 jz short loc_97EE3 mov rdi, [rbp+var_A8] call my_free loc_97EE3: mov eax, [rbp+var_B4] mov [rbp+var_D4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_97F10 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_97F10: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx int v8; // [rsp+10h] [rbp-D0h] unsigned int v9; // [rsp+14h] [rbp-CCh] unsigned long long v10; // [rsp+18h] [rbp-C8h] unsigned __int8 *v11; // [rsp+20h] [rbp-C0h] unsigned int v12; // [rsp+2Ch] [rbp-B4h] long long v13; // [rsp+38h] [rbp-A8h] unsigned __int8 *v14; // [rsp+40h] [rbp-A0h] unsigned __int8 *v15; // [rsp+48h] [rbp-98h] unsigned long long v17; // [rsp+58h] [rbp-88h] unsigned long long v20; // [rsp+68h] [rbp-78h] char v21; // [rsp+80h] [rbp-60h] BYREF unsigned long long v22; // [rsp+D8h] [rbp-8h] v22 = __readfsqword(0x28u); v13 = 0LL; v15 = (unsigned __int8 *)&v21; if ( (unsigned long long)(a5 + a3 + 2) > 0x50 ) { v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8); v13 = (long long)v15; } v14 = &v15[a3 + 1]; if ( a3 ) memcpy(v15, a2, a3); v15[a3] = 0; if ( a5 ) memcpy(v14, a4, a5); v14[a5] = 0; v20 = thai2sortable(v15, a3); v17 = thai2sortable(v14, a5); v11 = v15; if ( v20 >= v17 ) v10 = v17; else v10 = v20; while ( v15 < &v11[v10] ) { v5 = v15++; v6 = v14++; if ( *v5 != *v6 ) { v12 = *(v15 - 1) - *(v14 - 1); goto LABEL_21; } } if ( v20 == v17 ) { v9 = 0; } else { if ( v20 >= v17 ) v8 = my_strnncollsp_padspace_bin(v15, v20 - v10); else v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10); v9 = v8; } v12 = v9; LABEL_21: if ( v13 ) my_free(v13); return v12; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV qword ptr [RBP + -0x88],R8 MOV qword ptr [RBP + -0xa8],0x0 MOV dword ptr [RBP + -0xb4],0x0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x88] ADD RAX,0x2 CMP RAX,0x50 JBE 0x00197ced MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x0017d1e0 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_00197ced: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x00197d1e MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x001360b0 LAB_00197d1e: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + RCX*0x1],0x0 CMP qword ptr [RBP + -0x88],0x0 JZ 0x00197d4e MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x001360b0 LAB_00197d4e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] CALL 0x00198050 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x00198050 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00197db6 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x00197dc4 LAB_00197db6: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_00197dc4: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb0],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX LAB_00197de3: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x00197e4c MOV RAX,qword ptr [RBP + -0x98] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x98],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0xa0] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0xa0],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00197e4a MOV RAX,qword ptr [RBP + -0x98] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0xa0] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0xb4],EAX JMP 0x00197ecd LAB_00197e4a: JMP 0x00197de3 LAB_00197e4c: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00197e63 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x00197ec1 LAB_00197e63: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00197e98 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00185f50 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x00197eb5 LAB_00197e98: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00185f50 MOV dword ptr [RBP + -0xd0],EAX LAB_00197eb5: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_00197ec1: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_00197ecd: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x00197ee3 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0017d560 LAB_00197ee3: MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00197f10 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_00197f10: CALL 0x001362a0
int my_strnncollsp_tis620 (int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5) { byte *pbVar1; byte *__dest; ulong uVar2; ulong uVar3; byte *pbVar4; long in_FS_OFFSET; int local_d8; int local_d4; ulong local_d0; int local_bc; byte *local_b0; byte *local_a8; byte *local_a0; byte local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_b0 = (byte *)0x0; local_a0 = local_68; if (0x50 < param_3 + param_5 + 2) { local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8); local_a0 = local_b0; } __dest = local_a0 + param_3 + 1; if (param_3 != 0) { memcpy(local_a0,param_2,param_3); } local_a0[param_3] = 0; if (param_5 != 0) { memcpy(__dest,param_4,param_5); } __dest[param_5] = 0; uVar2 = thai2sortable(local_a0,param_3); uVar3 = thai2sortable(__dest,param_5); local_d0 = uVar3; if (uVar2 < uVar3) { local_d0 = uVar2; } pbVar4 = local_a0 + local_d0; pbVar1 = local_a0; do { local_a0 = pbVar1; local_a8 = __dest; if (pbVar4 <= local_a0) { if (uVar2 == uVar3) { local_d4 = 0; } else { if (uVar2 < uVar3) { local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0); local_d8 = -local_d8; } else { local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0); } local_d4 = local_d8; } local_bc = local_d4; goto LAB_00197ecd; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_00197ecd: if (local_b0 != (byte *)0x0) { my_free(local_b0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_bc; }
47,934
bf_set_float64
bluesky950520[P]quickjs/libbf.c
int bf_set_float64(bf_t *a, double d) { Float64Union u; uint64_t m; int shift, e, sgn; u.d = d; sgn = u.u >> 63; e = (u.u >> 52) & ((1 << 11) - 1); m = u.u & (((uint64_t)1 << 52) - 1); if (e == ((1 << 11) - 1)) { if (m != 0) { bf_set_nan(a); } else { bf_set_inf(a, sgn); } } else if (e == 0) { if (m == 0) { bf_set_zero(a, sgn); } else { /* subnormal number */ m <<= 12; shift = clz64(m); m <<= shift; e = -shift; goto norm; } } else { m = (m << 11) | ((uint64_t)1 << 63); norm: a->expn = e - 1023 + 1; #if LIMB_BITS == 32 if (bf_resize(a, 2)) goto fail; a->tab[0] = m; a->tab[1] = m >> 32; #else if (bf_resize(a, 1)) goto fail; a->tab[0] = m; #endif a->sign = sgn; } return 0; fail: bf_set_nan(a); return BF_ST_MEM_ERROR; }
O0
c
bf_set_float64: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movsd %xmm0, 0x20(%rsp) movsd 0x20(%rsp), %xmm0 movsd %xmm0, 0x18(%rsp) movq 0x18(%rsp), %rax shrq $0x3f, %rax movl %eax, 0x4(%rsp) movq 0x18(%rsp), %rax shrq $0x34, %rax andq $0x7ff, %rax # imm = 0x7FF movl %eax, 0x8(%rsp) movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF andq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) cmpl $0x7ff, 0x8(%rsp) # imm = 0x7FF jne 0xeb030 cmpq $0x0, 0x10(%rsp) je 0xeb01d movq 0x28(%rsp), %rdi callq 0xe61a0 jmp 0xeb02b movq 0x28(%rsp), %rdi movl 0x4(%rsp), %esi callq 0xe6280 jmp 0xeb0f4 cmpl $0x0, 0x8(%rsp) jne 0xeb08c cmpq $0x0, 0x10(%rsp) jne 0xeb04f movq 0x28(%rsp), %rdi movl 0x4(%rsp), %esi callq 0xe6240 jmp 0xeb08a movq 0x10(%rsp), %rax shlq $0xc, %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0xeb120 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, %ecx shlq %cl, %rax movq %rax, 0x10(%rsp) xorl %eax, %eax subl 0xc(%rsp), %eax movl %eax, 0x8(%rsp) jmp 0xeb0a7 jmp 0xeb0f2 movq 0x10(%rsp), %rax shlq $0xb, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 orq %rcx, %rax movq %rax, 0x10(%rsp) movl 0x8(%rsp), %eax subl $0x3ff, %eax # imm = 0x3FF addl $0x1, %eax movslq %eax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x28(%rsp), %rdi movl $0x1, %esi callq 0xe5fd0 cmpl $0x0, %eax je 0xeb0d5 jmp 0xeb0fe movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rax movq 0x20(%rax), %rax movq %rcx, (%rax) movl 0x4(%rsp), %ecx movq 0x28(%rsp), %rax movl %ecx, 0x8(%rax) jmp 0xeb0f4 movl $0x0, 0x34(%rsp) jmp 0xeb110 movq 0x28(%rsp), %rdi callq 0xe61a0 movl $0x20, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
bf_set_float64: sub rsp, 38h mov [rsp+38h+var_10], rdi movsd [rsp+38h+var_18], xmm0 movsd xmm0, [rsp+38h+var_18] movsd [rsp+38h+var_20], xmm0 mov rax, [rsp+38h+var_20] shr rax, 3Fh mov [rsp+38h+var_34], eax mov rax, [rsp+38h+var_20] shr rax, 34h and rax, 7FFh mov [rsp+38h+var_30], eax mov rax, 0FFFFFFFFFFFFFh and rax, [rsp+38h+var_20] mov [rsp+38h+var_28], rax cmp [rsp+38h+var_30], 7FFh jnz short loc_EB030 cmp [rsp+38h+var_28], 0 jz short loc_EB01D mov rdi, [rsp+38h+var_10] call bf_set_nan jmp short loc_EB02B loc_EB01D: mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_34] call bf_set_inf loc_EB02B: jmp loc_EB0F4 loc_EB030: cmp [rsp+38h+var_30], 0 jnz short loc_EB08C cmp [rsp+38h+var_28], 0 jnz short loc_EB04F mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_34] call bf_set_zero jmp short loc_EB08A loc_EB04F: mov rax, [rsp+38h+var_28] shl rax, 0Ch mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_28] call clz64_0 mov [rsp+38h+var_2C], eax mov ecx, [rsp+38h+var_2C] mov rax, [rsp+38h+var_28] mov ecx, ecx shl rax, cl mov [rsp+38h+var_28], rax xor eax, eax sub eax, [rsp+38h+var_2C] mov [rsp+38h+var_30], eax jmp short loc_EB0A7 loc_EB08A: jmp short loc_EB0F2 loc_EB08C: mov rax, [rsp+38h+var_28] shl rax, 0Bh mov rcx, 8000000000000000h or rax, rcx mov [rsp+38h+var_28], rax loc_EB0A7: mov eax, [rsp+38h+var_30] sub eax, 3FFh add eax, 1 movsxd rcx, eax mov rax, [rsp+38h+var_10] mov [rax+10h], rcx mov rdi, [rsp+38h+var_10] mov esi, 1 call bf_resize cmp eax, 0 jz short loc_EB0D5 jmp short loc_EB0FE loc_EB0D5: mov rcx, [rsp+38h+var_28] mov rax, [rsp+38h+var_10] mov rax, [rax+20h] mov [rax], rcx mov ecx, [rsp+38h+var_34] mov rax, [rsp+38h+var_10] mov [rax+8], ecx loc_EB0F2: jmp short $+2 loc_EB0F4: mov [rsp+38h+var_4], 0 jmp short loc_EB110 loc_EB0FE: mov rdi, [rsp+38h+var_10] call bf_set_nan mov [rsp+38h+var_4], 20h ; ' ' loc_EB110: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long bf_set_float64(long long a1, double a2) { int v3; // [rsp+4h] [rbp-34h] int v4; // [rsp+8h] [rbp-30h] int v5; // [rsp+Ch] [rbp-2Ch] long long v6; // [rsp+10h] [rbp-28h] unsigned long long v7; // [rsp+10h] [rbp-28h] v3 = *(_QWORD *)&a2 >> 63; v4 = (*(_QWORD *)&a2 >> 52) & 0x7FF; v6 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL; if ( v4 == 2047 ) { if ( v6 ) bf_set_nan(a1); else bf_set_inf(a1, v3); return 0; } if ( ((*(_QWORD *)&a2 >> 52) & 0x7FF) != 0 ) { v7 = (v6 << 11) | 0x8000000000000000LL; } else { if ( !v6 ) { bf_set_zero(a1, v3); return 0; } v5 = clz64_0(*(_QWORD *)&a2 << 12); v7 = *(_QWORD *)&a2 << 12 << v5; v4 = -v5; } *(_QWORD *)(a1 + 16) = v4 - 1023 + 1; if ( (unsigned int)bf_resize((_QWORD *)a1, 1LL) ) { bf_set_nan(a1); return 32; } **(_QWORD **)(a1 + 32) = v7; *(_DWORD *)(a1 + 8) = v3; return 0; }
bf_set_float64: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOVSD qword ptr [RSP + 0x20],XMM0 MOVSD XMM0,qword ptr [RSP + 0x20] MOVSD qword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x18] SHR RAX,0x3f MOV dword ptr [RSP + 0x4],EAX MOV RAX,qword ptr [RSP + 0x18] SHR RAX,0x34 AND RAX,0x7ff MOV dword ptr [RSP + 0x8],EAX MOV RAX,0xfffffffffffff AND RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x8],0x7ff JNZ 0x001eb030 CMP qword ptr [RSP + 0x10],0x0 JZ 0x001eb01d MOV RDI,qword ptr [RSP + 0x28] CALL 0x001e61a0 JMP 0x001eb02b LAB_001eb01d: MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x4] CALL 0x001e6280 LAB_001eb02b: JMP 0x001eb0f4 LAB_001eb030: CMP dword ptr [RSP + 0x8],0x0 JNZ 0x001eb08c CMP qword ptr [RSP + 0x10],0x0 JNZ 0x001eb04f MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x4] CALL 0x001e6240 JMP 0x001eb08a LAB_001eb04f: MOV RAX,qword ptr [RSP + 0x10] SHL RAX,0xc MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] CALL 0x001eb120 MOV dword ptr [RSP + 0xc],EAX MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV ECX,ECX SHL RAX,CL MOV qword ptr [RSP + 0x10],RAX XOR EAX,EAX SUB EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x8],EAX JMP 0x001eb0a7 LAB_001eb08a: JMP 0x001eb0f2 LAB_001eb08c: MOV RAX,qword ptr [RSP + 0x10] SHL RAX,0xb MOV RCX,-0x8000000000000000 OR RAX,RCX MOV qword ptr [RSP + 0x10],RAX LAB_001eb0a7: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0x3ff ADD EAX,0x1 MOVSXD RCX,EAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x28] MOV ESI,0x1 CALL 0x001e5fd0 CMP EAX,0x0 JZ 0x001eb0d5 JMP 0x001eb0fe LAB_001eb0d5: MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x8],ECX LAB_001eb0f2: JMP 0x001eb0f4 LAB_001eb0f4: MOV dword ptr [RSP + 0x34],0x0 JMP 0x001eb110 LAB_001eb0fe: MOV RDI,qword ptr [RSP + 0x28] CALL 0x001e61a0 MOV dword ptr [RSP + 0x34],0x20 LAB_001eb110: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 bf_set_float64(ulong param_1,long param_2) { uint uVar1; uint uVar2; int iVar3; uint local_30; ulong local_28; uVar1 = (uint)(param_1 >> 0x20); uVar2 = uVar1 >> 0x1f; local_30 = uVar1 >> 0x14 & 0x7ff; param_1 = param_1 & 0xfffffffffffff; if (local_30 == 0x7ff) { if (param_1 == 0) { bf_set_inf(param_2,uVar2); } else { bf_set_nan(param_2); } } else { if (local_30 == 0) { if (param_1 == 0) { bf_set_zero(param_2,uVar2); return 0; } iVar3 = clz64(param_1 << 0xc); local_28 = (param_1 << 0xc) << ((byte)iVar3 & 0x3f); local_30 = -iVar3; } else { local_28 = param_1 << 0xb | 0x8000000000000000; } *(long *)(param_2 + 0x10) = (long)(int)(local_30 - 0x3fe); iVar3 = bf_resize(param_2,1); if (iVar3 != 0) { bf_set_nan(param_2); return 0x20; } **(ulong **)(param_2 + 0x20) = local_28; *(uint *)(param_2 + 8) = uVar2; } return 0; }
47,935
my_strnxfrm_simple_internal
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint *nweights, const uchar *src, size_t srclen) { const uchar *map= cs->sort_order; uchar *d0= dst; uint frmlen; if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen) frmlen= (uint)srclen; if (dst != src) { const uchar *end; for (end= src + frmlen; src < end;) *dst++= map[*src++]; } else { const uchar *end; for (end= dst + frmlen; dst < end; dst++) *dst= map[(uchar) *dst]; } *nweights-= frmlen; return dst - d0; }
O3
c
my_strnxfrm_simple_internal: pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi movl (%rcx), %eax cmpq %rdx, %rax cmovbel %eax, %edx cmpq %r9, %rdx cmovbel %edx, %r9d movq %rsi, %rax cmpq %r8, %rsi je 0x597ad testq %r9, %r9 je 0x597cc leaq (%r8,%r9), %rdx movq %rsi, %rax movzbl (%r8), %r10d incq %r8 movb (%rdi,%r10), %r10b movb %r10b, (%rax) incq %rax cmpq %rdx, %r8 jb 0x59795 jmp 0x597cc testq %r9, %r9 je 0x597cc leaq (%rsi,%r9), %rdx movq %rsi, %rax movzbl (%rax), %r8d movb (%rdi,%r8), %r8b movb %r8b, (%rax) incq %rax cmpq %rdx, %rax jb 0x597b9 subl %r9d, (%rcx) subq %rsi, %rax popq %rbp retq
my_strnxfrm_simple_internal: push rbp mov rbp, rsp mov rdi, [rdi+58h] mov eax, [rcx] cmp rax, rdx cmovbe edx, eax cmp rdx, r9 cmovbe r9d, edx mov rax, rsi cmp rsi, r8 jz short loc_597AD test r9, r9 jz short loc_597CC lea rdx, [r8+r9] mov rax, rsi loc_59795: movzx r10d, byte ptr [r8] inc r8 mov r10b, [rdi+r10] mov [rax], r10b inc rax cmp r8, rdx jb short loc_59795 jmp short loc_597CC loc_597AD: test r9, r9 jz short loc_597CC lea rdx, [rsi+r9] mov rax, rsi loc_597B9: movzx r8d, byte ptr [rax] mov r8b, [rdi+r8] mov [rax], r8b inc rax cmp rax, rdx jb short loc_597B9 loc_597CC: sub [rcx], r9d sub rax, rsi pop rbp retn
_BYTE * my_strnxfrm_simple_internal( long long a1, unsigned __int8 *a2, unsigned long long a3, _DWORD *a4, unsigned __int8 *a5, unsigned long long a6) { long long v6; // rdi unsigned long long v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rdx long long v10; // r10 v6 = *(_QWORD *)(a1 + 88); v7 = (unsigned int)*a4; if ( v7 <= a3 ) a3 = (unsigned int)v7; if ( a3 <= a6 ) a6 = (unsigned int)a3; v8 = a2; if ( a2 == a5 ) { if ( a6 ) { v8 = a2; do { *v8 = *(_BYTE *)(v6 + *v8); ++v8; } while ( v8 < &a2[a6] ); } } else if ( a6 ) { v9 = &a5[a6]; v8 = a2; do { v10 = *a5++; *v8++ = *(_BYTE *)(v6 + v10); } while ( a5 < v9 ); } *a4 -= a6; return (_BYTE *)(v8 - a2); }
my_strnxfrm_simple_internal: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] MOV EAX,dword ptr [RCX] CMP RAX,RDX CMOVBE EDX,EAX CMP RDX,R9 CMOVBE R9D,EDX MOV RAX,RSI CMP RSI,R8 JZ 0x001597ad TEST R9,R9 JZ 0x001597cc LEA RDX,[R8 + R9*0x1] MOV RAX,RSI LAB_00159795: MOVZX R10D,byte ptr [R8] INC R8 MOV R10B,byte ptr [RDI + R10*0x1] MOV byte ptr [RAX],R10B INC RAX CMP R8,RDX JC 0x00159795 JMP 0x001597cc LAB_001597ad: TEST R9,R9 JZ 0x001597cc LEA RDX,[RSI + R9*0x1] MOV RAX,RSI LAB_001597b9: MOVZX R8D,byte ptr [RAX] MOV R8B,byte ptr [RDI + R8*0x1] MOV byte ptr [RAX],R8B INC RAX CMP RAX,RDX JC 0x001597b9 LAB_001597cc: SUB dword ptr [RCX],R9D SUB RAX,RSI POP RBP RET
long my_strnxfrm_simple_internal (long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6) { byte *pbVar1; byte bVar2; long lVar3; byte *pbVar4; ulong uVar5; ulong uVar6; lVar3 = *(long *)(param_1 + 0x58); uVar5 = param_3 & 0xffffffff; if (*param_4 <= param_3) { uVar5 = (ulong)*param_4; } uVar6 = param_6 & 0xffffffff; if (uVar5 <= param_6) { uVar6 = uVar5; } pbVar4 = param_2; if (param_2 == param_5) { if (uVar6 != 0) { do { *pbVar4 = *(byte *)(lVar3 + (ulong)*pbVar4); pbVar4 = pbVar4 + 1; } while (pbVar4 < param_2 + uVar6); } } else if (uVar6 != 0) { pbVar1 = param_5 + uVar6; do { bVar2 = *param_5; param_5 = param_5 + 1; *pbVar4 = *(byte *)(lVar3 + (ulong)bVar2); pbVar4 = pbVar4 + 1; } while (param_5 < pbVar1); } *param_4 = *param_4 - (int)uVar6; return (long)pbVar4 - (long)param_2; }
47,936
alloc_root
eloqsql/mysys/my_alloc.c
void *alloc_root(MEM_ROOT *mem_root, size_t length) { #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root->block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((uchar*) 0); /* purecov: inspected */ } next->next= mem_root->used; next->left= 0; next->size= length; mem_root->used= next; DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM))))); DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); #else size_t get_size, block_size; uchar* point; reg1 USED_MEM *next= 0; reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* Avoid reusing an already allocated block */ if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev ; next && next->left < length ; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2); get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); get_size= MY_MAX(get_size, block_size); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root-> block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((void*) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; TRASH_MEM(next); } point= (uchar*) ((char*) next+ (next->size-next->left)); /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ if ((next->left-= length) < mem_root->min_malloc) { /* Full block */ *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); #endif }
O3
c
alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x2d7be cmpq %r14, 0x8(%rax) jae 0x2d7a5 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0xa, %ecx jb 0x2d7a5 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x2d7a5 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x2d7be movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x2d7a8 jmp 0x2d81b movq 0x20(%rbx), %rdx movq %rdx, %rax andq $-0x2, %rax movl 0x28(%rbx), %r15d shrl $0x2, %r15d imulq %rax, %r15 leaq 0x18(%r14), %rax cmpq %r15, %rax cmovaq %rax, %r15 movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx orq $0x1010, %rdx # imm = 0x1010 movq %r15, %rsi callq 0x2b0cd testq %rax, %rax je 0x2d84d incl 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x2d85a movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x2d85a movq 0x30(%rbx), %rax testq %rax, %rax je 0x2d858 callq *%rax xorl %ecx, %ecx movq %rcx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
alloc_root: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_2D7BE cmp [rax+8], r14 jnb short loc_2D7A5 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 0Ah jb short loc_2D7A5 cmp qword ptr [rax+8], 0FFFh ja short loc_2D7A5 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_2D7A5: mov rax, rbx loc_2D7A8: mov r12, rax mov rax, [rax] test rax, rax jz short loc_2D7BE mov rdx, [rax+8] cmp rdx, r14 jb short loc_2D7A8 jmp short loc_2D81B loc_2D7BE: mov rdx, [rbx+20h] mov rax, rdx and rax, 0FFFFFFFFFFFFFFFEh mov r15d, [rbx+28h] shr r15d, 2 imul r15, rax lea rax, [r14+18h] cmp rax, r15 cmova r15, rax mov edi, [rbx+38h] and edx, 1 shl edx, 10h or rdx, 1010h mov rsi, r15 call my_malloc test rax, rax jz short loc_2D84D inc dword ptr [rbx+28h] mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_2D81B: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_2D85A mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_2D85A loc_2D84D: mov rax, [rbx+30h] test rax, rax jz short loc_2D858 call rax loc_2D858: xor ecx, ecx loc_2D85A: mov rax, rcx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx long long v8; // rdx unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void (*v12)(void); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0xA && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_QWORD *)(a1 + 32); v9 = (v8 & 0xFFFFFFFFFFFFFFFELL) * (*(_DWORD *)(a1 + 40) >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)my_malloc(*(_DWORD *)(a1 + 56), v9, ((v8 & 1) << 16) | 0x1010); if ( v6 ) { ++*(_DWORD *)(a1 + 40); *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void (**)(void))(a1 + 48); if ( v12 ) v12(); return 0LL; } return v10; }
alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x0012d7be CMP qword ptr [RAX + 0x8],R14 JNC 0x0012d7a5 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0xa JC 0x0012d7a5 CMP qword ptr [RAX + 0x8],0xfff JA 0x0012d7a5 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_0012d7a5: MOV RAX,RBX LAB_0012d7a8: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0012d7be MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x0012d7a8 JMP 0x0012d81b LAB_0012d7be: MOV RDX,qword ptr [RBX + 0x20] MOV RAX,RDX AND RAX,-0x2 MOV R15D,dword ptr [RBX + 0x28] SHR R15D,0x2 IMUL R15,RAX LEA RAX,[R14 + 0x18] CMP RAX,R15 CMOVA R15,RAX MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 OR RDX,0x1010 MOV RSI,R15 CALL 0x0012b0cd TEST RAX,RAX JZ 0x0012d84d INC dword ptr [RBX + 0x28] MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_0012d81b: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x0012d85a MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x0012d85a LAB_0012d84d: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0012d858 CALL RAX LAB_0012d858: XOR ECX,ECX LAB_0012d85a: MOV RAX,RCX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_0012d7be: uVar7 = (ulong)(*(uint *)(param_1 + 5) >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)my_malloc((int)param_1[7],uVar7,((uint)param_1[4] & 1) << 0x10 | 0x1010); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 9 < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_0012d7be; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
47,937
ggml_set_i32_nd
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, int32_t value) { void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3]; switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(data))[0] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(data))[0] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(data))[0] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(data))[0] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O3
c
ggml_set_i32_nd: movslq %esi, %rsi imulq 0x30(%rdi), %rsi addq 0xf8(%rdi), %rsi movslq %edx, %rdx imulq 0x38(%rdi), %rdx movslq %ecx, %rax imulq 0x40(%rdi), %rax addq %rdx, %rax addq %rsi, %rax movslq %r8d, %rcx imulq 0x48(%rdi), %rcx movl (%rdi), %edx leal -0x18(%rdx), %esi cmpl $0x6, %esi ja 0xa153 leaq 0x490c7(%rip), %rdx # 0x5320c movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi movb %r9b, (%rax,%rcx) retq testl %edx, %edx je 0xa19d cmpl $0x1, %edx jne 0xa1bb vcvtsi2ss %r9d, %xmm0, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rax,%rcx) retq movw %r9w, (%rax,%rcx) retq movl %r9d, (%rax,%rcx) retq vcvtsi2ss %r9d, %xmm0, %xmm0 vmovd %xmm0, %esi movl %esi, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF movl %esi, %edx shrl $0x10, %edx cmpl $0x7f800001, %edi # imm = 0x7F800001 jb 0xa1a8 orl $0x40, %edx jmp 0xa1b6 vcvtsi2ss %r9d, %xmm0, %xmm0 vmovss %xmm0, (%rax,%rcx) retq andl $0x1, %edx addl %esi, %edx addl $0x7fff, %edx # imm = 0x7FFF shrl $0x10, %edx movw %dx, (%rax,%rcx) retq pushq %rax leaq 0x496a7(%rip), %rdi # 0x5386a leaq 0x4980d(%rip), %rdx # 0x539d7 movl $0xaa6, %esi # imm = 0xAA6 xorl %eax, %eax callq 0x8950
ggml_set_i32_nd: movsxd rsi, esi imul rsi, [rdi+30h] add rsi, [rdi+0F8h] movsxd rdx, edx imul rdx, [rdi+38h] movsxd rax, ecx imul rax, [rdi+40h] add rax, rdx add rax, rsi movsxd rcx, r8d imul rcx, [rdi+48h] mov edx, [rdi] lea esi, [rdx-18h]; switch 7 cases cmp esi, 6 ja short def_A14C; jumptable 000000000000A14C default case lea rdx, jpt_A14C movsxd rsi, ds:(jpt_A14C - 5320Ch)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_A14E: mov [rax+rcx], r9b; jumptable 000000000000A14C case 24 retn def_A14C: test edx, edx; jumptable 000000000000A14C default case jz short loc_A19D cmp edx, 1 jnz short loc_A1BB; jumptable 000000000000A14C cases 27-29 vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 retn loc_A16F: mov [rax+rcx], r9w; jumptable 000000000000A14C case 25 retn loc_A175: mov [rax+rcx], r9d; jumptable 000000000000A14C case 26 retn loc_A17A: vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000A14C case 30 vmovd esi, xmm0 mov edi, esi and edi, 7FFFFFFFh mov edx, esi shr edx, 10h cmp edi, 7F800001h jb short loc_A1A8 or edx, 40h jmp short loc_A1B6 loc_A19D: vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 retn loc_A1A8: and edx, 1 add edx, esi add edx, 7FFFh shr edx, 10h loc_A1B6: mov [rax+rcx], dx retn loc_A1BB: push rax; jumptable 000000000000A14C cases 27-29 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0AA6h xor eax, eax call _ggml_abort
long long ggml_set_i32_nd(int *a1, int a2, int a3, int a4, int a5, int a6, __m128 _XMM0) { long long result; // rax int v9; // edx unsigned int v14; // edx result = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4; _RCX = *((_QWORD *)a1 + 9) * a5; v9 = *a1; switch ( *a1 ) { case 24: *(_BYTE *)(result + _RCX) = a6; break; case 25: *(_WORD *)(result + _RCX) = a6; break; case 26: *(_DWORD *)(result + _RCX) = a6; break; case 27: case 28: case 29: goto LABEL_13; case 30: __asm { vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000A14C case 30 vmovd esi, xmm0 } if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 ) v14 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16; else LOWORD(v14) = HIWORD(_ESI) | 0x40; *(_WORD *)(result + _RCX) = v14; break; default: if ( v9 ) { if ( v9 == 1 ) { __asm { vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 } } else { LABEL_13: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 2726LL, "fatal error", _RCX); result = ggml_get_f32_1d(); } } else { __asm { vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 } } break; } return result; }
ggml_set_i32_nd: MOVSXD RSI,ESI IMUL RSI,qword ptr [RDI + 0x30] ADD RSI,qword ptr [RDI + 0xf8] MOVSXD RDX,EDX IMUL RDX,qword ptr [RDI + 0x38] MOVSXD RAX,ECX IMUL RAX,qword ptr [RDI + 0x40] ADD RAX,RDX ADD RAX,RSI MOVSXD RCX,R8D IMUL RCX,qword ptr [RDI + 0x48] MOV EDX,dword ptr [RDI] LEA ESI,[RDX + -0x18] CMP ESI,0x6 JA 0x0010a153 LEA RDX,[0x15320c] MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_18: MOV byte ptr [RAX + RCX*0x1],R9B RET default: TEST EDX,EDX JZ 0x0010a19d CMP EDX,0x1 JNZ 0x0010a1bb VCVTSI2SS XMM0,XMM0,R9D VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RAX + RCX*0x1],XMM0,0x0 RET caseD_19: MOV word ptr [RAX + RCX*0x1],R9W RET caseD_1a: MOV dword ptr [RAX + RCX*0x1],R9D RET caseD_1e: VCVTSI2SS XMM0,XMM0,R9D VMOVD ESI,XMM0 MOV EDI,ESI AND EDI,0x7fffffff MOV EDX,ESI SHR EDX,0x10 CMP EDI,0x7f800001 JC 0x0010a1a8 OR EDX,0x40 JMP 0x0010a1b6 LAB_0010a19d: VCVTSI2SS XMM0,XMM0,R9D VMOVSS dword ptr [RAX + RCX*0x1],XMM0 RET LAB_0010a1a8: AND EDX,0x1 ADD EDX,ESI ADD EDX,0x7fff SHR EDX,0x10 LAB_0010a1b6: MOV word ptr [RAX + RCX*0x1],DX RET caseD_1b: PUSH RAX LEA RDI,[0x15386a] LEA RDX,[0x1539d7] MOV ESI,0xaa6 XOR EAX,EAX CALL 0x00108950
void ggml_set_i32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5,int param_6) { int iVar1; long lVar2; long lVar3; ushort uVar4; float fVar5; int1 auVar6 [16]; int1 in_ZMM0 [64]; lVar2 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e); lVar3 = (long)param_5 * *(long *)(param_1 + 0x12); iVar1 = *param_1; auVar6._4_12_ = in_ZMM0._4_12_; switch(iVar1) { case 0x18: *(char *)(lVar2 + lVar3) = (char)param_6; return; case 0x19: *(short *)(lVar2 + lVar3) = (short)param_6; return; case 0x1a: *(int *)(lVar2 + lVar3) = param_6; return; case 0x1b: case 0x1c: case 0x1d: goto switchD_0010a14c_caseD_1b; case 0x1e: fVar5 = (float)param_6; if ((uint)ABS(fVar5) < 0x7f800001) { uVar4 = (ushort)(((uint)fVar5 >> 0x10 & 1) + (int)fVar5 + 0x7fff >> 0x10); } else { uVar4 = (ushort)((uint)fVar5 >> 0x10) | 0x40; } *(ushort *)(lVar2 + lVar3) = uVar4; return; default: if (iVar1 == 0) { *(float *)(lVar2 + lVar3) = (float)param_6; return; } if (iVar1 == 1) { auVar6._0_4_ = (float)param_6; auVar6 = vcvtps2ph_f16c(auVar6,0); vpextrw_avx(auVar6,0); return; } switchD_0010a14c_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0xaa6,"fatal error"); } }
47,938
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O1
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %rbx movq %rsi, %r12 movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x5dd83 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x702e2 movq (%r12), %rdi movq (%rdi), %rax movq %r14, %rsi movq %rbx, %rdx callq *0x28(%rax) leaq 0x58(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x28fd0 movq %rbx, %rdi callq 0x2e790 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x5dd39 callq 0x42d00 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x5dd48 callq 0x42d00 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x5dd57 callq 0x42d00 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x5deab movq 0x91224(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x5de96 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5dea0 movq %r12, 0x10(%rsp) cmpq $0x0, 0x10(%rbx) je 0x5deba movq %rdi, %r15 movq %rbx, %rdi callq 0x75892 movq 0x8(%r15), %rcx subq (%r15), %rcx sarq $0x5, %rcx cmpq %rcx, %rax jne 0x5deba movq %rbx, 0x8(%rsp) movq (%r15), %rsi cmpq %rsi, 0x8(%r15) je 0x5deab leaq 0x58(%rsp), %r12 xorl %ebx, %ebx leaq 0x18(%rsp), %r13 xorl %ebp, %ebp movq 0x10(%rsp), %rax movq (%rax), %r14 addq %rbx, %rsi movq %r13, %rdi callq 0x702e2 movq 0x8(%rsp), %rdi movq %rbp, %rsi callq 0x759de movq (%r14), %rcx movq %r14, %rdi movq %r13, %rsi movq %rax, %rdx callq *0x28(%rcx) movq %r12, %rdi xorl %esi, %esi callq 0x28fd0 movq %r12, %rdi callq 0x2e790 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x5de22 callq 0x42d00 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x5de31 callq 0x42d00 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x5de40 callq 0x42d00 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x5de76 movq 0x9113f(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x5de61 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5de6b movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5de76 movq (%rdi), %rax callq *0x18(%rax) incq %rbp movq (%r15), %rsi movq 0x8(%r15), %rax subq %rsi, %rax sarq $0x5, %rax addq $0x20, %rbx cmpq %rax, %rbp jb 0x5ddd2 jmp 0x5deab movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5deab movq (%rdi), %rax callq *0x18(%rax) addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x60f34(%rip), %rsi # 0xbee02 movq %rax, %rdi callq 0x19270 movq 0x9110b(%rip), %rsi # 0xeefe8 movq 0x91084(%rip), %rdx # 0xeef68 movq %r14, %rdi callq 0x19b70 movq %rax, %rbx movq %r14, %rdi callq 0x19510 jmp 0x5df08 jmp 0x5defb movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x6c670 movq %rbx, %rdi callq 0x19be0
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, rdx mov r12, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz loc_5DD83 lea r14, [rsp+98h+var_80] mov rdi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [r12] mov rax, [rdi] mov rsi, r14 mov rdx, rbx call qword ptr [rax+28h] lea rbx, [rsp+98h+var_40] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_5DD39 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DD39: mov rdi, [rsp+98h+var_58] test rdi, rdi jz short loc_5DD48 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DD48: mov rdi, [rsp+98h+var_68] test rdi, rdi jz short loc_5DD57 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DD57: mov rdi, [rsp+98h+var_78] test rdi, rdi jz loc_5DEAB mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_5DE96 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_5DEA0 loc_5DD83: mov [rsp+98h+var_88], r12 cmp qword ptr [rbx+10h], 0 jz loc_5DEBA mov r15, rdi mov rdi, rbx; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rcx, [r15+8] sub rcx, [r15] sar rcx, 5 cmp rax, rcx jnz loc_5DEBA mov [rsp+98h+var_90], rbx mov rsi, [r15] cmp [r15+8], rsi jz loc_5DEAB lea r12, [rsp+98h+var_40] xor ebx, ebx lea r13, [rsp+98h+var_80] xor ebp, ebp loc_5DDD2: mov rax, [rsp+98h+var_88] mov r14, [rax] add rsi, rbx mov rdi, r13 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+98h+var_90]; this mov rsi, rbp; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [r14] mov rdi, r14 mov rsi, r13 mov rdx, rax call qword ptr [rcx+28h] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+98h+var_48] test rdi, rdi jz short loc_5DE22 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DE22: mov rdi, [rsp+98h+var_58] test rdi, rdi jz short loc_5DE31 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DE31: mov rdi, [rsp+98h+var_68] test rdi, rdi jz short loc_5DE40 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5DE40: mov rdi, [rsp+98h+var_78] test rdi, rdi jz short loc_5DE76 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5DE61 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5DE6B loc_5DE61: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5DE6B: cmp eax, 1 jnz short loc_5DE76 mov rax, [rdi] call qword ptr [rax+18h] loc_5DE76: inc rbp mov rsi, [r15] mov rax, [r15+8] sub rax, rsi sar rax, 5 add rbx, 20h ; ' ' cmp rbp, rax jb loc_5DDD2 jmp short loc_5DEAB loc_5DE96: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5DEA0: cmp eax, 1 jnz short loc_5DEAB mov rax, [rdi] call qword ptr [rax+18h] loc_5DEAB: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5DEBA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_5DF08 jmp short $+2 loc_5DEFB: mov rbx, rax lea rdi, [rsp+98h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5DF08: mov rdi, rbx call __Unwind_Resume
unsigned long long minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { unsigned long long result; // rax long long v6; // rdi long long v8; // rsi long long v9; // rbx unsigned long long v10; // rbp long long v11; // r14 long long v12; // rax long long v13; // rdi signed __int32 v14; // eax std::runtime_error *exception; // r14 minja::Value *v16; // [rsp+8h] [rbp-90h] _BYTE v17[8]; // [rsp+18h] [rbp-80h] BYREF long long v18; // [rsp+20h] [rbp-78h] volatile signed __int32 *v19; // [rsp+30h] [rbp-68h] volatile signed __int32 *v20; // [rsp+40h] [rbp-58h] volatile signed __int32 *v21; // [rsp+50h] [rbp-48h] char v22[64]; // [rsp+58h] [rbp-40h] BYREF if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v17, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v17, a3); 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(v22); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v6 = v18; if ( v18 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v18 + 12); *(_DWORD *)(v18 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } } else { if ( !*((_QWORD *)a3 + 2) || (result = minja::Value::size(a3), result != (long long)(a1[1] - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = a3; v8 = *a1; if ( a1[1] != *a1 ) { v9 = 0LL; v10 = 0LL; do { v11 = *a2; minja::Value::Value(v17, v9 + v8); v12 = minja::Value::at(v16, v10); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v11 + 40LL))(v11, v17, v12); 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(v22); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v13 = v18; if ( v18 ) { if ( _libc_single_threaded ) { v14 = *(_DWORD *)(v18 + 12); *(_DWORD *)(v18 + 12) = v14 - 1; } else { v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( v14 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL); } ++v10; v8 = *a1; result = (long long)(a1[1] - *a1) >> 5; v9 += 32LL; } while ( v10 < result ); } } return result; }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDX MOV R12,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x0015dd83 LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x001702e2 MOV RDI,qword ptr [R12] MOV RAX,qword ptr [RDI] LAB_0015dd0b: MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x28] LAB_0015dd14: LEA RBX,[RSP + 0x58] MOV RDI,RBX XOR ESI,ESI CALL 0x00128fd0 MOV RDI,RBX CALL 0x0012e790 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0015dd39 CALL 0x00142d00 LAB_0015dd39: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0015dd48 CALL 0x00142d00 LAB_0015dd48: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0015dd57 CALL 0x00142d00 LAB_0015dd57: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0015deab MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x0015de96 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015dea0 LAB_0015dd83: MOV qword ptr [RSP + 0x10],R12 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0015deba MOV R15,RDI MOV RDI,RBX CALL 0x00175892 MOV RCX,qword ptr [R15 + 0x8] SUB RCX,qword ptr [R15] SAR RCX,0x5 CMP RAX,RCX JNZ 0x0015deba MOV qword ptr [RSP + 0x8],RBX MOV RSI,qword ptr [R15] CMP qword ptr [R15 + 0x8],RSI JZ 0x0015deab LEA R12,[RSP + 0x58] XOR EBX,EBX LEA R13,[RSP + 0x18] XOR EBP,EBP LAB_0015ddd2: MOV RAX,qword ptr [RSP + 0x10] MOV R14,qword ptr [RAX] ADD RSI,RBX MOV RDI,R13 CALL 0x001702e2 LAB_0015dde5: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBP CALL 0x001759de MOV RCX,qword ptr [R14] MOV RDI,R14 MOV RSI,R13 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_0015de01: MOV RDI,R12 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R12 CALL 0x0012e790 MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0015de22 CALL 0x00142d00 LAB_0015de22: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0015de31 CALL 0x00142d00 LAB_0015de31: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0015de40 CALL 0x00142d00 LAB_0015de40: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0015de76 MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x0015de61 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015de6b LAB_0015de61: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015de6b: CMP EAX,0x1 JNZ 0x0015de76 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015de76: INC RBP MOV RSI,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] SUB RAX,RSI SAR RAX,0x5 ADD RBX,0x20 CMP RBP,RAX JC 0x0015ddd2 JMP 0x0015deab LAB_0015de96: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015dea0: CMP EAX,0x1 JNZ 0x0015deab MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015deab: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015deba: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_0015dec7: LEA RSI,[0x1bee02] MOV RDI,RAX CALL 0x00119270 LAB_0015ded6: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R14 CALL 0x00119b70
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { int *piVar1; long *plVar2; int iVar3; long lVar4; int8 uVar5; runtime_error *this; long lVar6; ulong uVar7; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 0015dd0b to 0015dd13 has its CatchHandler @ 0015def9 */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } } else { if ((*(long *)(param_3 + 0x10) == 0) || (lVar4 = Value::size(param_3), lVar4 != *(long *)(param_1 + 8) - *(long *)param_1 >> 5)) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015dec7 to 0015ded5 has its CatchHandler @ 0015deec */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } lVar4 = *(long *)param_1; if (*(long *)(param_1 + 8) != lVar4) { lVar6 = 0; uVar7 = 0; do { plVar2 = *(long **)param_2; Value::Value(local_80,(string *)(lVar4 + lVar6)); /* try { // try from 0015dde5 to 0015de00 has its CatchHandler @ 0015defb */ uVar5 = Value::at(param_3,uVar7); (**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } uVar7 = uVar7 + 1; lVar4 = *(long *)param_1; lVar6 = lVar6 + 0x20; } while (uVar7 < (ulong)(*(long *)(param_1 + 8) - lVar4 >> 5)); } } return; }
47,939
verify_beacon_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_blockhash_proof.c
static bool verify_beacon_header(ssz_ob_t* header, bytes32_t exec_blockhash, bytes_t blockhash_proof) { // check merkle proof ssz_ob_t header_body_root = ssz_get(header, "bodyRoot"); bytes32_t root_hash; ssz_verify_single_merkle_proof(blockhash_proof, exec_blockhash, BLOCKHASH_BLOCKBODY_GINDEX, root_hash); if (ssz_is_error(header_body_root) || header_body_root.bytes.len != 32 || memcmp(root_hash, header_body_root.bytes.data, 32)) return false; return true; }
O0
c
verify_beacon_header: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edx, -0x18(%rbp) movq %rcx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rdi leaq 0xabc7c(%rip), %rdx # 0xdaa25 callq 0xa05c0 movq -0x28(%rbp), %rdx leaq -0x60(%rbp), %r8 movl -0x18(%rbp), %edi movq -0x10(%rbp), %rsi movl $0x32c, %ecx # imm = 0x32C callq 0xa15a0 leaq -0x40(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x2ed50 testb $0x1, %al jne 0x2ee0a cmpl $0x20, -0x40(%rbp) jne 0x2ee0a leaq -0x60(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x20, %edx callq 0x23100 cmpl $0x0, %eax je 0x2ee10 movb $0x0, -0x1(%rbp) jmp 0x2ee14 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
verify_beacon_header: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_18], edx mov [rbp+var_10], rcx mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rsi, [rbp+var_20] lea rdi, [rbp+var_40] lea rdx, aBodyroot; "bodyRoot" call ssz_get mov rdx, [rbp+var_28] lea r8, [rbp+var_60] mov edi, [rbp+var_18] mov rsi, [rbp+var_10] mov ecx, 32Ch call ssz_verify_single_merkle_proof lea rax, [rbp+var_40] mov rcx, [rax] mov [rsp+80h+var_80], rcx mov rcx, [rax+8] mov [rsp+80h+var_78], rcx mov rax, [rax+10h] mov [rsp+80h+var_70], rax call ssz_is_error_3 test al, 1 jnz short loc_2EE0A cmp [rbp+var_40], 20h ; ' ' jnz short loc_2EE0A lea rdi, [rbp+var_60] mov rsi, [rbp+var_38] mov edx, 20h ; ' ' call _memcmp cmp eax, 0 jz short loc_2EE10 loc_2EE0A: mov [rbp+var_1], 0 jmp short loc_2EE14 loc_2EE10: mov [rbp+var_1], 1 loc_2EE14: mov al, [rbp+var_1] and al, 1 add rsp, 80h pop rbp retn
bool verify_beacon_header(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int v4; // edi int v5; // esi int v6; // edx int v7; // r8d int v8; // r9d _BYTE v10[32]; // [rsp+20h] [rbp-60h] BYREF long long v11; // [rsp+40h] [rbp-40h] BYREF long long v12; // [rsp+48h] [rbp-38h] long long v13; // [rsp+50h] [rbp-30h] long long v14; // [rsp+58h] [rbp-28h] long long v15; // [rsp+60h] [rbp-20h] unsigned int v16; // [rsp+68h] [rbp-18h] long long v17; // [rsp+70h] [rbp-10h] v16 = a3; v17 = a4; v15 = a1; v14 = a2; ssz_get(&v11, a1, "bodyRoot"); v4 = v16; v5 = v17; ssz_verify_single_merkle_proof(v16, v17, v14, 812LL, v10); return (ssz_is_error_3(v4, v5, v6, v12, v7, v8, v11, v12, v13) & 1) == 0 && (_DWORD)v11 == 32 && !(unsigned int)memcmp(v10, v12, 32LL); }
verify_beacon_header: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x40] LEA RDX,[0x1daa25] CALL 0x001a05c0 MOV RDX,qword ptr [RBP + -0x28] LEA R8,[RBP + -0x60] MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] MOV ECX,0x32c CALL 0x001a15a0 LEA RAX,[RBP + -0x40] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0012ed50 TEST AL,0x1 JNZ 0x0012ee0a CMP dword ptr [RBP + -0x40],0x20 JNZ 0x0012ee0a LEA RDI,[RBP + -0x60] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x20 CALL 0x00123100 CMP EAX,0x0 JZ 0x0012ee10 LAB_0012ee0a: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ee14 LAB_0012ee10: MOV byte ptr [RBP + -0x1],0x1 LAB_0012ee14: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x80 POP RBP RET
int1 verify_beacon_header(int8 param_1,int8 param_2,int4 param_3,int8 param_4) { int iVar1; ulong uVar2; int1 local_68 [32]; int local_48 [2]; void *local_40; int8 local_30; int8 local_28; int4 local_20; int8 local_18; local_30 = param_2; local_28 = param_1; local_20 = param_3; local_18 = param_4; ssz_get(local_48,param_1,"bodyRoot"); ssz_verify_single_merkle_proof(local_20,local_18,local_30,0x32c,local_68); uVar2 = ssz_is_error(); if ((((uVar2 & 1) == 0) && (local_48[0] == 0x20)) && (iVar1 = memcmp(local_68,local_40,0x20), iVar1 == 0)) { return 1; } return 0; }
47,940
verify_beacon_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_blockhash_proof.c
static bool verify_beacon_header(ssz_ob_t* header, bytes32_t exec_blockhash, bytes_t blockhash_proof) { // check merkle proof ssz_ob_t header_body_root = ssz_get(header, "bodyRoot"); bytes32_t root_hash; ssz_verify_single_merkle_proof(blockhash_proof, exec_blockhash, BLOCKHASH_BLOCKBODY_GINDEX, root_hash); if (ssz_is_error(header_body_root) || header_body_root.bytes.len != 32 || memcmp(root_hash, header_body_root.bytes.data, 32)) return false; return true; }
O3
c
verify_beacon_header: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rcx, %rbx movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rsi leaq 0x561cb(%rip), %rdx # 0x7fae3 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x53211 leaq 0x20(%rsp), %r8 movl $0x32c, %ecx # imm = 0x32C movl %ebp, %edi movq %rbx, %rsi movq %r14, %rdx callq 0x53c4e xorl %eax, %eax cmpq $0x0, 0x10(%r15) je 0x2997b movq 0x10(%rsp), %rcx testq %rcx, %rcx je 0x2997b cmpl $0x20, 0x8(%rsp) jne 0x2997b movdqu (%rcx), %xmm0 movdqu 0x10(%rcx), %xmm1 pcmpeqb 0x30(%rsp), %xmm1 pcmpeqb 0x20(%rsp), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF sete %al addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
verify_beacon_header: push rbp push r15 push r14 push rbx sub rsp, 48h mov rbx, rcx mov ebp, edx mov r14, rsi mov rsi, rdi lea rdx, aBodyroot; "bodyRoot" lea r15, [rsp+68h+var_60] mov rdi, r15 call ssz_get lea r8, [rsp+68h+var_48] mov ecx, 32Ch mov edi, ebp mov rsi, rbx mov rdx, r14 call ssz_verify_single_merkle_proof xor eax, eax cmp qword ptr [r15+10h], 0 jz short loc_2997B mov rcx, [rsp+68h+var_58] test rcx, rcx jz short loc_2997B cmp [rsp+68h+var_60], 20h ; ' ' jnz short loc_2997B movdqu xmm0, xmmword ptr [rcx] movdqu xmm1, xmmword ptr [rcx+10h] pcmpeqb xmm1, [rsp+68h+var_38] pcmpeqb xmm0, [rsp+68h+var_48] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh setz al loc_2997B: add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn
bool verify_beacon_header(long long a1, long long a2, unsigned int a3, long long a4) { bool result; // al int v7; // [rsp+8h] [rbp-60h] BYREF const __m128i *v8; // [rsp+10h] [rbp-58h] long long v9; // [rsp+18h] [rbp-50h] __m128i v10[4]; // [rsp+20h] [rbp-48h] BYREF ssz_get(&v7, a1); ssz_verify_single_merkle_proof(a3, a4, a2, 812LL, v10); result = 0; if ( v9 && v8 && v7 == 32 ) return _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v8), v10[0]), _mm_cmpeq_epi8(_mm_loadu_si128(v8 + 1), v10[1]))) == 0xFFFF; return result; }
verify_beacon_header: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RCX MOV EBP,EDX MOV R14,RSI MOV RSI,RDI LEA RDX,[0x17fae3] LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00153211 LEA R8,[RSP + 0x20] MOV ECX,0x32c MOV EDI,EBP MOV RSI,RBX MOV RDX,R14 CALL 0x00153c4e XOR EAX,EAX CMP qword ptr [R15 + 0x10],0x0 JZ 0x0012997b MOV RCX,qword ptr [RSP + 0x10] TEST RCX,RCX JZ 0x0012997b CMP dword ptr [RSP + 0x8],0x20 JNZ 0x0012997b MOVDQU XMM0,xmmword ptr [RCX] MOVDQU XMM1,xmmword ptr [RCX + 0x10] PCMPEQB XMM1,xmmword ptr [RSP + 0x30] PCMPEQB XMM0,xmmword ptr [RSP + 0x20] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff SETZ AL LAB_0012997b: ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET
int2 verify_beacon_header(int8 param_1,int8 param_2,int4 param_3,int8 param_4) { ushort uVar1; int2 uVar2; int1 auVar3 [16]; int1 auVar4 [16]; int local_60 [2]; char *local_58; long local_50; char local_48; char cStack_47; char cStack_46; char cStack_45; char cStack_44; char cStack_43; char cStack_42; char cStack_41; char cStack_40; char cStack_3f; char cStack_3e; char cStack_3d; char cStack_3c; char cStack_3b; char cStack_3a; char cStack_39; char local_38; char cStack_37; char cStack_36; char cStack_35; char cStack_34; char cStack_33; char cStack_32; char cStack_31; char cStack_30; char cStack_2f; char cStack_2e; char cStack_2d; char cStack_2c; char cStack_2b; char cStack_2a; char cStack_29; ssz_get(local_60,param_1,"bodyRoot"); ssz_verify_single_merkle_proof(param_3,param_4,param_2,0x32c,&local_48); uVar2 = 0; if (((local_50 != 0) && (local_58 != (char *)0x0)) && (local_60[0] == 0x20)) { auVar4[0] = -(local_58[0x10] == local_38); auVar4[1] = -(local_58[0x11] == cStack_37); auVar4[2] = -(local_58[0x12] == cStack_36); auVar4[3] = -(local_58[0x13] == cStack_35); auVar4[4] = -(local_58[0x14] == cStack_34); auVar4[5] = -(local_58[0x15] == cStack_33); auVar4[6] = -(local_58[0x16] == cStack_32); auVar4[7] = -(local_58[0x17] == cStack_31); auVar4[8] = -(local_58[0x18] == cStack_30); auVar4[9] = -(local_58[0x19] == cStack_2f); auVar4[10] = -(local_58[0x1a] == cStack_2e); auVar4[0xb] = -(local_58[0x1b] == cStack_2d); auVar4[0xc] = -(local_58[0x1c] == cStack_2c); auVar4[0xd] = -(local_58[0x1d] == cStack_2b); auVar4[0xe] = -(local_58[0x1e] == cStack_2a); auVar4[0xf] = -(local_58[0x1f] == cStack_29); auVar3[0] = -(*local_58 == local_48); auVar3[1] = -(local_58[1] == cStack_47); auVar3[2] = -(local_58[2] == cStack_46); auVar3[3] = -(local_58[3] == cStack_45); auVar3[4] = -(local_58[4] == cStack_44); auVar3[5] = -(local_58[5] == cStack_43); auVar3[6] = -(local_58[6] == cStack_42); auVar3[7] = -(local_58[7] == cStack_41); auVar3[8] = -(local_58[8] == cStack_40); auVar3[9] = -(local_58[9] == cStack_3f); auVar3[10] = -(local_58[10] == cStack_3e); auVar3[0xb] = -(local_58[0xb] == cStack_3d); auVar3[0xc] = -(local_58[0xc] == cStack_3c); auVar3[0xd] = -(local_58[0xd] == cStack_3b); auVar3[0xe] = -(local_58[0xe] == cStack_3a); auVar3[0xf] = -(local_58[0xf] == cStack_39); auVar3 = auVar3 & auVar4; uVar1 = (ushort)(SUB161(auVar3 >> 7,0) & 1) | (ushort)(SUB161(auVar3 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar3 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar3 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar3 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar3 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar3 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar3 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar3 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar3 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar3 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar3 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar3 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar3 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar3 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar3[0xf] >> 7) << 0xf; uVar2 = CONCAT11((char)(uVar1 >> 8),uVar1 == 0xffff); } return uVar2; }
47,941
void google::protobuf::io::Printer::Print<char [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char [13], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char [22], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const*, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [13], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [22], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/printer.h
void Print(const char* text, const Args&... args) { std::map<std::string, std::string> vars; PrintInternal(&vars, text, args...); }
O3
c
void google::protobuf::io::Printer::Print<char [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char [13], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char [22], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const*, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [13], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [22], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbx subq $0x50, %rsp movq %r8, %rax movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rdx movaps 0x60(%rsp), %xmm0 leaq 0x28(%rsp), %rsi movl $0x0, (%rsi) xorl %r10d, %r10d movq %r10, 0x8(%rsi) movq %rsi, 0x10(%rsi) movq %rsi, 0x18(%rsi) movq %r10, 0x20(%rsi) movups %xmm0, 0x8(%rsp) movq %r9, (%rsp) leaq 0x20(%rsp), %rsi movq %rax, %r9 callq 0xafbc6 leaq 0x20(%rsp), %rdi callq 0x2e5e0 addq $0x50, %rsp popq %rbx retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x2e5e0 movq %rbx, %rdi callq 0x1f860 nop
_ZN6google8protobuf2io7Printer5PrintIJA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cSA_A13_cSA_EEEvPKcDpRKT_: push rbx sub rsp, 50h mov rax, r8 mov r8, rcx mov rcx, rdx mov rdx, rsi movaps xmm0, xmmword ptr [rsp+58h+arg_0] lea rsi, [rsp+58h+var_30] mov dword ptr [rsi], 0 xor r10d, r10d mov [rsi+8], r10 mov [rsi+10h], rsi mov [rsi+18h], rsi mov [rsi+20h], r10 movups xmmword ptr [rsp+58h+var_50], xmm0; __int64 mov [rsp+58h+var_58], r9; __int64 lea rsi, [rsp+58h+var_38] mov r9, rax call _ZN6google8protobuf2io7Printer13PrintInternalIJA11_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA13_cSA_EEEvPSt3mapISA_SA_St4lessISA_ESaISt4pairIKSA_SA_EEEPKcSM_RSG_DpRKT_; google::protobuf::io::Printer::PrintInternal<char [11],std::string,char [13],std::string>(std::map<std::string,std::string> *,char const*,char const*,std::string const&,char [11],std::string,char [13],std::string const&) lea rdi, [rsp+58h+var_38] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 50h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long google::protobuf::io::Printer::Print<char [10],std::string,char [11],std::string,char [13],std::string>( google::protobuf::io::Printer *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax _BYTE v7[8]; // [rsp+20h] [rbp-38h] BYREF int v8; // [rsp+28h] [rbp-30h] BYREF long long v9; // [rsp+30h] [rbp-28h] int *v10; // [rsp+38h] [rbp-20h] int *v11; // [rsp+40h] [rbp-18h] long long v12; // [rsp+48h] [rbp-10h] v8 = 0; v9 = 0LL; v10 = &v8; v11 = &v8; v12 = 0LL; result = google::protobuf::io::Printer::PrintInternal<char [11],std::string,char [13],std::string>( a1, (long long)v7, a2, a3, a4, a5, a6); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v7); return result; }
Print<char[10],std::__cxx11::string,char[11],std::__cxx11::string,char[13],std::__cxx11::string>: PUSH RBX SUB RSP,0x50 MOV RAX,R8 MOV R8,RCX MOV RCX,RDX MOV RDX,RSI MOVAPS XMM0,xmmword ptr [RSP + 0x60] LEA RSI,[RSP + 0x28] MOV dword ptr [RSI],0x0 XOR R10D,R10D MOV qword ptr [RSI + 0x8],R10 MOV qword ptr [RSI + 0x10],RSI MOV qword ptr [RSI + 0x18],RSI MOV qword ptr [RSI + 0x20],R10 LAB_001bfb14: MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],R9 LEA RSI,[RSP + 0x20] MOV R9,RAX CALL 0x001afbc6 LAB_001bfb2a: LEA RDI,[RSP + 0x20] CALL 0x0012e5e0 ADD RSP,0x50 POP RBX RET
/* void google::protobuf::io::Printer::Print<char [10], std::__cxx11::string, char [11], std::__cxx11::string, char [13], std::__cxx11::string >(char const*, char const (&) [10], std::__cxx11::string const&, char const (&) [11], std::__cxx11::string const&, char const (&) [13], std::__cxx11::string const&) */ void google::protobuf::io::Printer:: Print<char[10],std::__cxx11::string,char[11],std::__cxx11::string,char[13],std::__cxx11::string> (char *param_1,char *param_2,string *param_3,char *param_4,string *param_5, char *param_6,string *param_7) { _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_38 [8]; int4 local_30 [2]; int8 local_28; int4 *local_20; int4 *local_18; int8 local_10; local_20 = local_30; local_30[0] = 0; local_28 = 0; local_10 = 0; /* try { // try from 001bfb14 to 001bfb29 has its CatchHandler @ 001bfb3a */ local_18 = local_20; PrintInternal<char[11],std::__cxx11::string,char[13],std::__cxx11::string> ((map *)param_1,(char *)local_38,param_2,param_3,param_4,param_5,param_6,param_7); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_38); return; }
47,942
boot_type_string[abi:cxx11](unsigned char)
msxemulator/build_O3/_deps/picotool-src/main.cpp
std::string boot_type_string(uint8_t type) { std::string s; switch (type & 0x7f) { case BOOT_TYPE_BOOTSEL: s = "bootsel"; break; case 1: // old PC_SP; fall thru case BOOT_TYPE_PC_SP: s = "pc/sp"; break; case BOOT_TYPE_FLASH_UPDATE: s = "flash update"; break; case BOOT_TYPE_RAM_IMAGE: s = "ram image"; break; case BOOT_TYPE_NORMAL: s = "normal"; break; default: s = "<unknown>"; break; } if (type & BOOT_TYPE_CHAINED_FLAG) s += " into chained image"; return s; }
O3
cpp
boot_type_string[abi:cxx11](unsigned char): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movl %ebp, %eax andb $0x7f, %al cmpb $0xe, %al jae 0x217ad leaq 0x81eb6(%rip), %rdx # 0xa364c movzbl %al, %eax movslq (%rdx,%rax,4), %rcx addq %rdx, %rcx leaq 0x81ee1(%rip), %rdx # 0xa3688 movq (%rdx,%rax,8), %r8 jmp 0x217ba movl $0x9, %r8d leaq 0x83035(%rip), %rcx # 0xa47ef movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xf6c0 testb %bpl, %bpl jns 0x217da leaq 0x83027(%rip), %rsi # 0xa47f9 movq %rbx, %rdi callq 0xf830 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x217fe movq (%r15), %rsi incq %rsi callq 0xf470 movq %r14, %rdi callq 0xf7d0
_Z16boot_type_stringB5cxx11h: push rbp push r15 push r14 push rbx push rax mov ebp, esi mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov eax, ebp and al, 7Fh cmp al, 0Eh jnb short loc_217AD lea rdx, unk_A364C movzx eax, al movsxd rcx, dword ptr [rdx+rax*4] add rcx, rdx lea rdx, unk_A3688 mov r8, [rdx+rax*8] jmp short loc_217BA loc_217AD: mov r8d, 9 lea rcx, aUnknown_1; "<unknown>" loc_217BA: mov rdi, rbx xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) test bpl, bpl jns short loc_217DA lea rsi, aIntoChainedIma; " into chained image" mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_217DA: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_217FE mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_217FE: mov rdi, r14 call __Unwind_Resume
long long boot_type_string[abi:cxx11](long long a1, char a2) { const char *v2; // rcx long long v3; // r8 *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( (a2 & 0x7Fu) >= 0xE ) { v3 = 9LL; v2 = "<unknown>"; } else { v2 = (char *)dword_A364C + dword_A364C[a2 & 0x7F]; v3 = qword_A3688[a2 & 0x7F]; } std::string::_M_replace(a1, 0LL, 0LL, v2, v3); if ( a2 < 0 ) std::string::append(a1, " into chained image"); return a1; }
boot_type_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV EAX,EBP AND AL,0x7f CMP AL,0xe JNC 0x001217ad LEA RDX,[0x1a364c] MOVZX EAX,AL MOVSXD RCX,dword ptr [RDX + RAX*0x4] ADD RCX,RDX LEA RDX,[0x1a3688] MOV R8,qword ptr [RDX + RAX*0x8] JMP 0x001217ba LAB_001217ad: MOV R8D,0x9 LEA RCX,[0x1a47ef] LAB_001217ba: MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0010f6c0 TEST BPL,BPL JNS 0x001217da LEA RSI,[0x1a47f9] MOV RDI,RBX CALL 0x0010f830 LAB_001217da: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* boot_type_string[abi:cxx11](unsigned char) */ long * boot_type_string_abi_cxx11_(uchar param_1) { char *pcVar1; byte in_SIL; int7 in_register_00000039; long *plVar2; plVar2 = (long *)CONCAT71(in_register_00000039,param_1); *plVar2 = (long)(plVar2 + 2); plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; if ((in_SIL & 0x7f) < 0xe) { pcVar1 = &DAT_001a364c + *(int *)(&DAT_001a364c + (ulong)(in_SIL & 0x7f) * 4); } else { pcVar1 = "<unknown>"; } /* try { // try from 001217ba to 001217d9 has its CatchHandler @ 001217e8 */ std::__cxx11::string::_M_replace((ulong)plVar2,0,(char *)0x0,(ulong)pcVar1); if ((char)in_SIL < '\0') { std::__cxx11::string::append((char *)plVar2); } return plVar2; }
47,943
testing::internal::FilePath::GenerateUniqueFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, char const*)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-filepath.cc
FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, const FilePath& base_name, const char* extension) { FilePath full_pathname; int number = 0; do { full_pathname.Set(MakeFileName(directory, base_name, number++, extension)); } while (full_pathname.FileOrDirectoryExists()); return full_pathname; }
O3
cpp
testing::internal::FilePath::GenerateUniqueFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, char const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) xorl %ebp, %ebp leaq 0x8(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movl %ebp, %ecx movq %r14, %r8 callq 0x55d8a movq %rbx, %rdi movq %r13, %rsi callq 0x44b9a movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x566c1 movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 movl $0x90, %edx movq %r13, %rdi xorl %esi, %esi callq 0x113a0 movq (%rbx), %rdi movq %r13, %rsi callq 0x110f0 incl %ebp testl %eax, %eax je 0x56687 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x5671a movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x5671a movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x56732 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x11120 movq %r14, %rdi callq 0x11760
_ZN7testing8internal8FilePath22GenerateUniqueFileNameERKS1_S3_PKc: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+0C8h+var_C8], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 xor ebp, ebp lea r13, [rsp+0C8h+var_C0] loc_56687: mov rdi, r13; this mov rsi, r12; testing::internal::FilePath * mov rdx, r15; testing::internal::FilePath * mov ecx, ebp; int mov r8, r14; char * call _ZN7testing8internal8FilePath12MakeFileNameERKS1_S3_iPKc; testing::internal::FilePath::MakeFileName(testing::internal::FilePath const&,testing::internal::FilePath const&,int,char const*) mov rdi, rbx mov rsi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+0C8h+var_C0]; void * lea rax, [rsp+0C8h+var_B0] cmp rdi, rax jz short loc_566C1 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_566C1: mov edx, 90h mov rdi, r13 xor esi, esi call _memset mov rdi, [rbx] mov rsi, r13 call _stat inc ebp test eax, eax jz short loc_56687 mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_5671A mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_5671A mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5671A: mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_56732 mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_56732: mov rdi, r14 call __Unwind_Resume
testing::internal::FilePath * testing::internal::FilePath::GenerateUniqueFileName( testing::internal::FilePath *this, const testing::internal::FilePath *a2, const testing::internal::FilePath *a3, const char *a4) { int v6; // ebp void *v8[2]; // [rsp+8h] [rbp-C0h] BYREF long long v9; // [rsp+18h] [rbp-B0h] BYREF *(_QWORD *)this = (char *)this + 16; *((_QWORD *)this + 1) = 0LL; *((_BYTE *)this + 16) = 0; v6 = 0; do { testing::internal::FilePath::MakeFileName((testing::internal::FilePath *)v8, a2, a3, v6, a4); std::string::_M_assign(this, v8); if ( v8[0] != &v9 ) operator delete(v8[0], v9 + 1); memset(v8, 0LL, 144LL); ++v6; } while ( !(unsigned int)stat(*(_QWORD *)this, v8) ); return this; }
GenerateUniqueFileName: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 XOR EBP,EBP LEA R13,[RSP + 0x8] LAB_00156687: MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV ECX,EBP MOV R8,R14 CALL 0x00155d8a LAB_0015669a: MOV RDI,RBX MOV RSI,R13 CALL 0x00144b9a LAB_001566a5: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001566c1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111120 LAB_001566c1: MOV EDX,0x90 MOV RDI,R13 XOR ESI,ESI CALL 0x001113a0 MOV RDI,qword ptr [RBX] MOV RSI,R13 CALL 0x001110f0 INC EBP TEST EAX,EAX JZ 0x00156687 MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::FilePath::GenerateUniqueFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, char const*) */ FilePath * __thiscall testing::internal::FilePath::GenerateUniqueFileName (FilePath *this,FilePath *param_1,FilePath *param_2,char *param_3) { int iVar1; int iVar2; stat local_c0; *(FilePath **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (FilePath)0x0; iVar2 = 0; do { /* try { // try from 00156687 to 00156699 has its CatchHandler @ 001566f6 */ MakeFileName((FilePath *)&local_c0,param_1,param_2,iVar2,param_3); /* try { // try from 0015669a to 001566a4 has its CatchHandler @ 001566fb */ std::__cxx11::string::_M_assign((string *)this,(string *)&local_c0); if ((__nlink_t *)local_c0.st_dev != &local_c0.st_nlink) { operator_delete((void *)local_c0.st_dev,local_c0.st_nlink + 1); } memset(&local_c0,0,0x90); iVar1 = stat(*(char **)this,&local_c0); iVar2 = iVar2 + 1; } while (iVar1 == 0); return this; }
47,944
Type_collection_json::handler_by_name(st_mysql_const_lex_string const&) const
eloqsql/sql/sql_type_json.cc
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override { /* Name resolution is not needed yet. JSON is not fully pluggable at the moment: - It is parsed using a hard-coded rule in sql_yacc.yy - It does not store extended data type information into FRM file yet. JSON is detected by CHECK(JSON_VALID(col)) and this detection is also hard-coded. This will change in the future. */ return NULL; }
O0
cpp
Type_collection_json::handler_by_name(st_mysql_const_lex_string const&) const: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) xorl %eax, %eax popq %rbp retq
_ZNK20Type_collection_json15handler_by_nameERK25st_mysql_const_lex_string: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi xor eax, eax pop rbp retn
long long Type_collection_json::handler_by_name() { return 0LL; }
init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RCX + 0x898],0x0 MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0xe8] MOV qword ptr [RBP + -0x10],RAX JMP 0x00c0bd24 LAB_00c0bd24: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0xe8] CMP qword ptr [RAX + 0x200],0x0 JZ 0x00c0bd57 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x200] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x2570],RCX LAB_00c0bd57: MOV RDX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RDX + 0x8] MOV RAX,qword ptr [RDX + 0x10] MOV RSI,qword ptr [RAX + 0x388] ADD RDX,0x18 CALL 0x00a713c0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x1 XOR EAX,EAX AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* Vcol_expr_context::init() */ int8 __thiscall Vcol_expr_context::init(Vcol_expr_context *this) { *(int8 *)(*(long *)(this + 8) + 0x898) = 0; if (*(long *)(*(long *)(*(long *)(this + 0x10) + 0xe8) + 0x200) != 0) { *(int8 *)(*(long *)(this + 8) + 0x2570) = *(int8 *)(*(long *)(*(long *)(this + 0x10) + 0xe8) + 0x200); } THD::set_n_backup_active_arena (*(THD **)(this + 8),*(Query_arena **)(*(long *)(this + 0x10) + 0x388), (Query_arena *)(this + 0x18)); *this = (Vcol_expr_context)0x1; return 0; }
47,945
my_coll_parser_scan_character_list
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit, const char *name) { if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR); if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR) { if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); my_coll_parser_scan(p); } return 1; }
O0
c
my_coll_parser_scan_character_list: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x9e5b0 cmpl $0x5, (%rax) je 0x9f5ac movq -0x10(%rbp), %rdi movl $0x5, %esi callq 0x9eef0 movl %eax, -0x4(%rbp) jmp 0x9f66c movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x9e5b0 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movslq 0x24(%rax), %rdx callq 0x9f680 cmpl $0x0, %eax jne 0x9f5ed movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x9f6f0 movl %eax, -0x4(%rbp) jmp 0x9f66c movq -0x10(%rbp), %rdi movl $0x5, %esi callq 0x9eb80 cmpl $0x0, %eax jne 0x9f609 movl $0x0, -0x4(%rbp) jmp 0x9f66c jmp 0x9f60b movq -0x10(%rbp), %rdi callq 0x9e5b0 cmpl $0x5, (%rax) jne 0x9f665 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0x9e5b0 movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movslq 0x24(%rax), %rdx callq 0x9f680 cmpl $0x0, %eax jne 0x9f65a movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x9f6f0 movl %eax, -0x4(%rbp) jmp 0x9f66c movq -0x10(%rbp), %rdi callq 0x9ed90 jmp 0x9f60b movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_character_list: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 5 jz short loc_9F5AC mov rdi, [rbp+var_10] mov esi, 5 call my_coll_parser_expected_error mov [rbp+var_4], eax jmp loc_9F66C loc_9F5AC: mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_9F5ED mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_9F66C loc_9F5ED: mov rdi, [rbp+var_10] mov esi, 5 call my_coll_parser_scan_term cmp eax, 0 jnz short loc_9F609 mov [rbp+var_4], 0 jmp short loc_9F66C loc_9F609: jmp short $+2 loc_9F60B: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 5 jnz short loc_9F665 mov rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov rdi, [rbp+var_48] mov rsi, [rbp+var_40] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_9F65A mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_9F66C loc_9F65A: mov rdi, [rbp+var_10] call my_coll_parser_scan jmp short loc_9F60B loc_9F665: mov [rbp+var_4], 1 loc_9F66C: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax if ( *(_DWORD *)my_coll_parser_curr(a1) == 5 ) { v4 = my_coll_parser_curr(a1); if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) ) { if ( (unsigned int)my_coll_parser_scan_term(a1, 5u) ) { while ( *(_DWORD *)my_coll_parser_curr(a1) == 5 ) { v5 = my_coll_parser_curr(a1); if ( !(unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v5 + 36)) ) return (unsigned int)my_coll_parser_too_long_error(a1, a4); my_coll_parser_scan(a1); } return 1; } else { return 0; } } else { return (unsigned int)my_coll_parser_too_long_error(a1, a4); } } else { return (unsigned int)my_coll_parser_expected_error(a1, 5u); } }
my_coll_parser_scan_character_list: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019e5b0 CMP dword ptr [RAX],0x5 JZ 0x0019f5ac MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x5 CALL 0x0019eef0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019f66c LAB_0019f5ac: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019e5b0 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x0019f680 CMP EAX,0x0 JNZ 0x0019f5ed MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0019f6f0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019f66c LAB_0019f5ed: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x5 CALL 0x0019eb80 CMP EAX,0x0 JNZ 0x0019f609 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019f66c LAB_0019f609: JMP 0x0019f60b LAB_0019f60b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019e5b0 CMP dword ptr [RAX],0x5 JNZ 0x0019f665 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019e5b0 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x0019f680 CMP EAX,0x0 JNZ 0x0019f65a MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0019f6f0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019f66c LAB_0019f65a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ed90 JMP 0x0019f60b LAB_0019f665: MOV dword ptr [RBP + -0x4],0x1 LAB_0019f66c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 my_coll_parser_scan_character_list (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { int iVar1; int4 uVar2; int *piVar3; long lVar4; int4 local_c; piVar3 = (int *)my_coll_parser_curr(param_1); if (*piVar3 == 5) { lVar4 = my_coll_parser_curr(param_1); iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24)); if (iVar1 == 0) { local_c = my_coll_parser_too_long_error(param_1,param_4); } else { iVar1 = my_coll_parser_scan_term(param_1,5); if (iVar1 == 0) { local_c = 0; } else { while (piVar3 = (int *)my_coll_parser_curr(param_1), *piVar3 == 5) { lVar4 = my_coll_parser_curr(param_1); iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24)); if (iVar1 == 0) { uVar2 = my_coll_parser_too_long_error(param_1,param_4); return uVar2; } my_coll_parser_scan(param_1); } local_c = 1; } } } else { local_c = my_coll_parser_expected_error(param_1,5); } return local_c; }
47,946
my_print_default_files
eloqsql/mysys/my_default.c
void my_print_default_files(const char *conf_file) { const char *empty_list[]= { "", 0 }; my_bool have_ext= fn_ext(conf_file)[0] != 0; const char **exts_to_use= have_ext ? empty_list : f_extensions; char name[FN_REFLEN], **ext; puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file) { puts(my_defaults_file); return; } if (dirname_length(conf_file)) fputs(conf_file,stdout); else { const char **dirs; MEM_ROOT alloc; init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0)); if ((dirs= init_default_directories(&alloc)) == NULL) { fputs("Internal error initializing default directories list", stdout); } else { for ( ; *dirs; dirs++) { for (ext= (char**) exts_to_use; *ext; ext++) { const char *pos; char *end; if (**dirs) pos= *dirs; else if (my_defaults_extra_file) { pos= my_defaults_extra_file; fputs(pos, stdout); fputs(" ", stdout); continue; } else continue; end= convert_dirname(name, pos, NullS); if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ *end++= '.'; strxmov(end, conf_file, *ext, " ", NullS); fputs(name, stdout); } } } free_root(&alloc, MYF(0)); } puts(""); }
O3
c
my_print_default_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x258, %rsp # imm = 0x258 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) callq 0x653e8 cmpb $0x0, (%rax) leaq 0x2c6eaa(%rip), %rax # 0x32bcb0 leaq 0x2c6eb3(%rip), %rbx # 0x32bcc0 cmoveq %rax, %rbx leaq 0x32d03(%rip), %rdi # 0x97b1b callq 0x28650 leaq 0x352144(%rip), %rax # 0x3b6f68 movq (%rax), %rdi testq %rdi, %rdi je 0x64e55 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x64fd1 addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x28650 movq %r15, %rdi callq 0x50558 testq %rax, %rax je 0x64e79 movq 0x2cf127(%rip), %rax # 0x333f90 movq (%rax), %rsi movq %r15, %rdi callq 0x28450 jmp 0x64fa6 leaq 0x351d28(%rip), %rax # 0x3b6ba8 movl (%rax), %edi leaq -0x280(%rbp), %r14 movl $0x200, %edx # imm = 0x200 movq %r14, %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x5879c movq %r14, %rdi callq 0x64cc3 testq %rax, %rax je 0x64f82 movq %rax, %r14 cmpq $0x0, (%rax) je 0x64f98 movq (%rbx), %rax movq %rax, -0x238(%rbp) addq $0x8, %rbx movq %rbx, -0x240(%rbp) leaq -0x230(%rbp), %r12 cmpq $0x0, -0x238(%rbp) je 0x64f71 movq -0x240(%rbp), %rbx movq -0x238(%rbp), %r13 movq (%r14), %rsi cmpb $0x0, (%rsi) je 0x64f31 movq %r12, %rdi xorl %edx, %edx callq 0x505d3 cmpb $0x7e, -0x230(%rbp) jne 0x64f12 movb $0x2e, (%rax) incq %rax movq %rax, %rdi movq %r15, %rsi movq %r13, %rdx leaq 0x320aa(%rip), %rcx # 0x96fcc xorl %r8d, %r8d xorl %eax, %eax callq 0x93f40 movq %r12, %rdi jmp 0x64f56 leaq 0x352040(%rip), %rax # 0x3b6f78 movq (%rax), %rdi testq %rdi, %rdi je 0x64f65 movq 0x2cf049(%rip), %rax # 0x333f90 movq (%rax), %rsi callq 0x28450 leaq 0x32076(%rip), %rdi # 0x96fcc movq 0x2cf033(%rip), %rax # 0x333f90 movq (%rax), %rsi callq 0x28450 movq (%rbx), %r13 addq $0x8, %rbx testq %r13, %r13 jne 0x64ef1 cmpq $0x0, 0x8(%r14) leaq 0x8(%r14), %r14 jne 0x64ed5 jmp 0x64f98 movq 0x2cf007(%rip), %rax # 0x333f90 movq (%rax), %rsi leaq 0x32bcf(%rip), %rdi # 0x97b62 callq 0x28450 leaq -0x280(%rbp), %rdi xorl %esi, %esi callq 0x58b6b movl $0xa, %edi callq 0x28550 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x64fd1 addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x28430
my_print_default_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 258h mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax call fn_ext cmp byte ptr [rax], 0 lea rax, f_extensions lea rbx, off_32BCC0; "" cmovz rbx, rax lea rdi, aDefaultOptions; "\nDefault options are read from the fol"... call _puts lea rax, my_defaults_file mov rdi, [rax] test rdi, rdi jz short loc_64E55 mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_64FD1 add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts loc_64E55: mov rdi, r15 call dirname_length test rax, rax jz short loc_64E79 mov rax, cs:stdout_ptr mov rsi, [rax] mov rdi, r15 call _fputs jmp loc_64FA6 loc_64E79: lea rax, key_memory_defaults mov edi, [rax] lea r14, [rbp+var_280] mov edx, 200h mov rsi, r14 xor ecx, ecx xor r8d, r8d call init_alloc_root mov rdi, r14 call init_default_directories test rax, rax jz loc_64F82 mov r14, rax cmp qword ptr [rax], 0 jz loc_64F98 mov rax, [rbx] mov [rbp+var_238], rax add rbx, 8 mov [rbp+var_240], rbx lea r12, [rbp+var_230] loc_64ED5: cmp [rbp+var_238], 0 jz loc_64F71 mov rbx, [rbp+var_240] mov r13, [rbp+var_238] loc_64EF1: mov rsi, [r14] cmp byte ptr [rsi], 0 jz short loc_64F31 mov rdi, r12 xor edx, edx call convert_dirname cmp [rbp+var_230], 7Eh ; '~' jnz short loc_64F12 mov byte ptr [rax], 2Eh ; '.' inc rax loc_64F12: mov rdi, rax mov rsi, r15 mov rdx, r13 lea rcx, asc_96FCB+1; " " xor r8d, r8d xor eax, eax call strxmov mov rdi, r12 jmp short loc_64F56 loc_64F31: lea rax, my_defaults_extra_file mov rdi, [rax] test rdi, rdi jz short loc_64F65 mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs lea rdi, asc_96FCB+1; " " loc_64F56: mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs loc_64F65: mov r13, [rbx] add rbx, 8 test r13, r13 jnz short loc_64EF1 loc_64F71: cmp qword ptr [r14+8], 0 lea r14, [r14+8] jnz loc_64ED5 jmp short loc_64F98 loc_64F82: mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aInternalErrorI; "Internal error initializing default dir"... call _fputs loc_64F98: lea rdi, [rbp+var_280] xor esi, esi call free_root loc_64FA6: mov edi, 0Ah call _putchar mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_64FD1 add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_64FD1: call ___stack_chk_fail
long long my_print_default_files(_BYTE *a1) { int v1; // r15d char **v2; // rbx char *inited; // rax long long *v5; // r14 char **v6; // rbx long long v7; // r13 _WORD *v8; // rax int v9; // r9d char *v10; // rdi bool v11; // zf long long v12[8]; // [rsp+0h] [rbp-280h] BYREF char **v13; // [rsp+40h] [rbp-240h] char *v14; // [rsp+48h] [rbp-238h] _WORD v15[256]; // [rsp+50h] [rbp-230h] BYREF unsigned long long v16; // [rsp+250h] [rbp-30h] v1 = (int)a1; v16 = __readfsqword(0x28u); v2 = (char **)&off_32BCC0; if ( !*(_BYTE *)fn_ext() ) v2 = &f_extensions; puts("\nDefault options are read from the following files in the given order:"); if ( my_defaults_file ) return puts(my_defaults_file); if ( !dirname_length(a1) ) { init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0); inited = init_default_directories((long long)v12); if ( inited ) { v5 = (long long *)inited; if ( *(_QWORD *)inited ) { v14 = *v2; v13 = v2 + 1; while ( !v14 ) { LABEL_20: v11 = v5[1] == 0; ++v5; if ( v11 ) goto LABEL_23; } v6 = v13; LODWORD(v7) = (_DWORD)v14; while ( !*(_BYTE *)*v5 ) { if ( my_defaults_extra_file ) { fputs(my_defaults_extra_file, stdout); v10 = " "; LABEL_18: fputs(v10, stdout); } v7 = (long long)*v6++; if ( !v7 ) goto LABEL_20; } v8 = convert_dirname(v15, *v5, 0LL); if ( LOBYTE(v15[0]) == 126 ) { *(_BYTE *)v8 = 46; LODWORD(v8) = (_DWORD)v8 + 1; } strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9); v10 = (char *)v15; goto LABEL_18; } } else { fputs("Internal error initializing default directories list", stdout); } LABEL_23: free_root(v12, 0); goto LABEL_24; } fputs(a1, stdout); LABEL_24: putchar(10LL); return __readfsqword(0x28u); }
my_print_default_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x258 MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CALL 0x001653e8 CMP byte ptr [RAX],0x0 LEA RAX,[0x42bcb0] LEA RBX,[0x42bcc0] CMOVZ RBX,RAX LEA RDI,[0x197b1b] CALL 0x00128650 LEA RAX,[0x4b6f68] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00164e55 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00164fd1 ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00128650 LAB_00164e55: MOV RDI,R15 CALL 0x00150558 TEST RAX,RAX JZ 0x00164e79 MOV RAX,qword ptr [0x00433f90] MOV RSI,qword ptr [RAX] MOV RDI,R15 CALL 0x00128450 JMP 0x00164fa6 LAB_00164e79: LEA RAX,[0x4b6ba8] MOV EDI,dword ptr [RAX] LEA R14,[RBP + -0x280] MOV EDX,0x200 MOV RSI,R14 XOR ECX,ECX XOR R8D,R8D CALL 0x0015879c MOV RDI,R14 CALL 0x00164cc3 TEST RAX,RAX JZ 0x00164f82 MOV R14,RAX CMP qword ptr [RAX],0x0 JZ 0x00164f98 MOV RAX,qword ptr [RBX] MOV qword ptr [RBP + -0x238],RAX ADD RBX,0x8 MOV qword ptr [RBP + -0x240],RBX LEA R12,[RBP + -0x230] LAB_00164ed5: CMP qword ptr [RBP + -0x238],0x0 JZ 0x00164f71 MOV RBX,qword ptr [RBP + -0x240] MOV R13,qword ptr [RBP + -0x238] LAB_00164ef1: MOV RSI,qword ptr [R14] CMP byte ptr [RSI],0x0 JZ 0x00164f31 MOV RDI,R12 XOR EDX,EDX CALL 0x001505d3 CMP byte ptr [RBP + -0x230],0x7e JNZ 0x00164f12 MOV byte ptr [RAX],0x2e INC RAX LAB_00164f12: MOV RDI,RAX MOV RSI,R15 MOV RDX,R13 LEA RCX,[0x196fcc] XOR R8D,R8D XOR EAX,EAX CALL 0x00193f40 MOV RDI,R12 JMP 0x00164f56 LAB_00164f31: LEA RAX,[0x4b6f78] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00164f65 MOV RAX,qword ptr [0x00433f90] MOV RSI,qword ptr [RAX] CALL 0x00128450 LEA RDI,[0x196fcc] LAB_00164f56: MOV RAX,qword ptr [0x00433f90] MOV RSI,qword ptr [RAX] CALL 0x00128450 LAB_00164f65: MOV R13,qword ptr [RBX] ADD RBX,0x8 TEST R13,R13 JNZ 0x00164ef1 LAB_00164f71: CMP qword ptr [R14 + 0x8],0x0 LEA R14,[R14 + 0x8] JNZ 0x00164ed5 JMP 0x00164f98 LAB_00164f82: MOV RAX,qword ptr [0x00433f90] MOV RSI,qword ptr [RAX] LEA RDI,[0x197b62] CALL 0x00128450 LAB_00164f98: LEA RDI,[RBP + -0x280] XOR ESI,ESI CALL 0x00158b6b LAB_00164fa6: MOV EDI,0xa CALL 0x00128550 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00164fd1 ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00164fd1: CALL 0x00128430
void my_print_default_files(char *param_1) { long *plVar1; int *puVar2; char *pcVar3; long lVar4; long *plVar5; int1 *puVar6; int **ppuVar7; long in_FS_OFFSET; int1 local_288 [64]; int **local_248; int *local_240; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar3 = (char *)fn_ext(); ppuVar7 = &PTR_s__0042bcc0; if (*pcVar3 == '\0') { ppuVar7 = (int **)f_extensions; } puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file == (char *)0x0) { lVar4 = dirname_length(param_1); if (lVar4 == 0) { init_alloc_root(key_memory_defaults,local_288,0x200,0,0); plVar5 = (long *)init_default_directories(local_288); if (plVar5 == (long *)0x0) { fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_00433f90); } else if (*plVar5 != 0) { local_240 = *ppuVar7; local_248 = ppuVar7 + 1; ppuVar7 = local_248; puVar2 = local_240; do { while (puVar2 != (int *)0x0) { if (*(char *)*plVar5 == '\0') { if (my_defaults_extra_file != (char *)0x0) { fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_00433f90); pcVar3 = " "; goto LAB_00164f56; } } else { puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0); if (local_238[0] == '~') { *puVar6 = 0x2e; puVar6 = puVar6 + 1; } strxmov(puVar6,param_1,puVar2,&DAT_00196fcc,0); pcVar3 = local_238; LAB_00164f56: fputs(pcVar3,*(FILE **)PTR_stdout_00433f90); } puVar2 = *ppuVar7; ppuVar7 = ppuVar7 + 1; } plVar1 = plVar5 + 1; plVar5 = plVar5 + 1; ppuVar7 = local_248; puVar2 = local_240; } while (*plVar1 != 0); } free_root(local_288,0); } else { fputs(param_1,*(FILE **)PTR_stdout_00433f90); } putchar(10); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { puts(my_defaults_file); return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,947
test_bin_bcast::initialize_tensors(ggml_context*)
llama.cpp/tests/test-backend-ops.cpp
void initialize_tensors(ggml_context * ctx) override { for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) { if (op == ggml_mul || op == ggml_div) { // MUL and DIV have numerical issues around zero: init_tensor_uniform(t, 0.9f, 1.1f); } else { init_tensor_uniform(t); } } }
O3
cpp
test_bin_bcast::initialize_tensors(ggml_context*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x1cdb0 testq %rax, %rax je 0x3983c movq %rax, %r15 movq 0x4679c(%rip), %r12 # 0x7ff80 movq 0x46775(%rip), %r13 # 0x7ff60 movq 0x38(%r14), %rax cmpq %r12, %rax setne %cl cmpq %r13, %rax setne %al movq %r15, %rdi testb %al, %cl jne 0x39814 movss 0x2e826(%rip), %xmm0 # 0x68030 movss 0x2e822(%rip), %xmm1 # 0x68034 jmp 0x39824 movss 0x2e808(%rip), %xmm0 # 0x68024 movss 0x2e7e0(%rip), %xmm1 # 0x68004 callq 0x267f9 movq %rbx, %rdi movq %r15, %rsi callq 0x1c920 movq %rax, %r15 testq %rax, %rax jne 0x397eb popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN14test_bin_bcast18initialize_tensorsEP12ggml_context: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi call _ggml_get_first_tensor test rax, rax jz short loc_3983C mov r15, rax mov r12, cs:ggml_mul_ptr mov r13, cs:ggml_div_ptr loc_397EB: mov rax, [r14+38h] cmp rax, r12 setnz cl cmp rax, r13 setnz al mov rdi, r15 test cl, al jnz short loc_39814 movss xmm0, cs:dword_68030 movss xmm1, cs:dword_68034 jmp short loc_39824 loc_39814: movss xmm0, cs:dword_68024 movss xmm1, cs:dword_68004 loc_39824: call _ZL19init_tensor_uniformP11ggml_tensorff; init_tensor_uniform(ggml_tensor *,float,float) mov rdi, rbx mov rsi, r15 call _ggml_get_next_tensor mov r15, rax test rax, rax jnz short loc_397EB loc_3983C: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long test_bin_bcast::initialize_tensors(long long a1, long long a2) { long long result; // rax unsigned int *v3; // r15 float v4; // xmm0_4 float v5; // xmm1_4 result = ggml_get_first_tensor(a2); if ( result ) { v3 = (unsigned int *)result; do { if ( *(_QWORD *)(a1 + 56) != (_QWORD)&ggml_div && *(_QWORD *)(a1 + 56) != (_QWORD)&ggml_mul ) { v4 = -1.0; v5 = 1.0; } else { v4 = 0.89999998; v5 = 1.1; } init_tensor_uniform(v3, v4, v5); result = ggml_get_next_tensor(a2, v3); v3 = (unsigned int *)result; } while ( result ); } return result; }
initialize_tensors: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0011cdb0 TEST RAX,RAX JZ 0x0013983c MOV R15,RAX MOV R12,qword ptr [0x0017ff80] MOV R13,qword ptr [0x0017ff60] LAB_001397eb: MOV RAX,qword ptr [R14 + 0x38] CMP RAX,R12 SETNZ CL CMP RAX,R13 SETNZ AL MOV RDI,R15 TEST CL,AL JNZ 0x00139814 MOVSS XMM0,dword ptr [0x00168030] MOVSS XMM1,dword ptr [0x00168034] JMP 0x00139824 LAB_00139814: MOVSS XMM0,dword ptr [0x00168024] MOVSS XMM1,dword ptr [0x00168004] LAB_00139824: CALL 0x001267f9 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c920 MOV R15,RAX TEST RAX,RAX JNZ 0x001397eb LAB_0013983c: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* test_bin_bcast::initialize_tensors(ggml_context*) */ void __thiscall test_bin_bcast::initialize_tensors(test_bin_bcast *this,ggml_context *param_1) { int *puVar1; int *puVar2; ggml_tensor *pgVar3; float fVar4; float fVar5; pgVar3 = (ggml_tensor *)ggml_get_first_tensor(param_1); puVar2 = PTR_ggml_mul_0017ff80; puVar1 = PTR_ggml_div_0017ff60; for (; pgVar3 != (ggml_tensor *)0x0; pgVar3 = (ggml_tensor *)ggml_get_next_tensor(param_1,pgVar3)) { fVar4 = DAT_00168024; fVar5 = DAT_00168004; if (*(int **)(this + 0x38) == puVar2 || *(int **)(this + 0x38) == puVar1) { fVar4 = DAT_00168030; fVar5 = DAT_00168034; } init_tensor_uniform(pgVar3,fVar4,fVar5); } return; }
47,948
mi_check_index
eloqsql/storage/myisam/mi_search.c
int _mi_check_index(MI_INFO *info, int inx) { if (inx == -1) /* Use last index */ inx=info->lastinx; if (inx < 0) { my_errno= HA_ERR_WRONG_INDEX; return -1; } if (!mi_is_key_active(info->s->state.key_map, inx)) { my_errno= info->s->state.state.records ? HA_ERR_WRONG_INDEX : HA_ERR_END_OF_FILE; return -1; } if (info->lastinx != inx) /* Index changed */ { info->lastinx = inx; info->page_changed=1; info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); } if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) return(-1); return(inx); }
O3
c
mi_check_index: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %esi, %ebx cmpl $-0x1, %esi jne 0x85637 movl 0x1d4(%rdi), %ebx testl %ebx, %ebx js 0x8569d movq (%rdi), %rax movq 0xc0(%rax), %rcx btq %rbx, %rcx jae 0x856aa cmpl %ebx, 0x1d4(%rdi) je 0x85674 movl %ebx, 0x1d4(%rdi) movb $0x1, 0x33c(%rdi) movl $0x401, %eax # imm = 0x401 andl 0x1d0(%rdi), %eax orl $0x30, %eax movl %eax, 0x1d0(%rdi) testb $0x10, 0x1c8(%rdi) je 0x85699 addq $0x220, %rdi # imm = 0x220 movl $0x1, %esi callq 0x97479 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x856c8 movl %ebx, %eax jmp 0x856c8 callq 0xa63fe movl $0x7c, (%rax) jmp 0x856c3 cmpq $0x0, 0x18(%rax) movl $0x89, %eax movl $0x7c, %ebx cmovel %eax, %ebx callq 0xa63fe movl %ebx, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %rbp retq
_mi_check_index: push rbp mov rbp, rsp push rbx push rax mov ebx, esi cmp esi, 0FFFFFFFFh jnz short loc_85637 mov ebx, [rdi+1D4h] loc_85637: test ebx, ebx js short loc_8569D mov rax, [rdi] mov rcx, [rax+0C0h] bt rcx, rbx jnb short loc_856AA cmp [rdi+1D4h], ebx jz short loc_85674 mov [rdi+1D4h], ebx mov byte ptr [rdi+33Ch], 1 mov eax, 401h and eax, [rdi+1D0h] or eax, 30h mov [rdi+1D0h], eax loc_85674: test byte ptr [rdi+1C8h], 10h jz short loc_85699 add rdi, 220h mov esi, 1 call my_b_flush_io_cache mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_856C8 loc_85699: mov eax, ebx jmp short loc_856C8 loc_8569D: call _my_thread_var mov dword ptr [rax], 7Ch ; '|' jmp short loc_856C3 loc_856AA: cmp qword ptr [rax+18h], 0 mov eax, 89h mov ebx, 7Ch ; '|' cmovz ebx, eax call _my_thread_var mov [rax], ebx loc_856C3: mov eax, 0FFFFFFFFh loc_856C8: add rsp, 8 pop rbx pop rbp retn
long long mi_check_index(unsigned int *a1, const char *a2) { unsigned long long v2; // rbx long long v3; // rcx int v4; // ecx long long result; // rax int v6; // ebx v2 = (unsigned int)a2; if ( (_DWORD)a2 == -1 ) v2 = a1[117]; if ( (v2 & 0x80000000) != 0LL ) { *(_DWORD *)my_thread_var(a1, a2) = 124; return 0xFFFFFFFFLL; } v3 = *(_QWORD *)(*(_QWORD *)a1 + 192LL); if ( !_bittest64(&v3, v2) ) { v6 = 124; if ( !*(_QWORD *)(*(_QWORD *)a1 + 24LL) ) v6 = 137; *(_DWORD *)my_thread_var(a1, a2) = v6; return 0xFFFFFFFFLL; } if ( a1[117] != (_DWORD)v2 ) { a1[117] = v2; *((_BYTE *)a1 + 828) = 1; a1[116] = a1[116] & 0x401 | 0x30; } if ( (a1[114] & 0x10) == 0 ) return (unsigned int)v2; v4 = my_b_flush_io_cache(a1 + 136, 1LL); result = 0xFFFFFFFFLL; if ( !v4 ) return (unsigned int)v2; return result; }
_mi_check_index: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,ESI CMP ESI,-0x1 JNZ 0x00185637 MOV EBX,dword ptr [RDI + 0x1d4] LAB_00185637: TEST EBX,EBX JS 0x0018569d MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0xc0] BT RCX,RBX JNC 0x001856aa CMP dword ptr [RDI + 0x1d4],EBX JZ 0x00185674 MOV dword ptr [RDI + 0x1d4],EBX MOV byte ptr [RDI + 0x33c],0x1 MOV EAX,0x401 AND EAX,dword ptr [RDI + 0x1d0] OR EAX,0x30 MOV dword ptr [RDI + 0x1d0],EAX LAB_00185674: TEST byte ptr [RDI + 0x1c8],0x10 JZ 0x00185699 ADD RDI,0x220 MOV ESI,0x1 CALL 0x00197479 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001856c8 LAB_00185699: MOV EAX,EBX JMP 0x001856c8 LAB_0018569d: CALL 0x001a63fe MOV dword ptr [RAX],0x7c JMP 0x001856c3 LAB_001856aa: CMP qword ptr [RAX + 0x18],0x0 MOV EAX,0x89 MOV EBX,0x7c CMOVZ EBX,EAX CALL 0x001a63fe MOV dword ptr [RAX],EBX LAB_001856c3: MOV EAX,0xffffffff LAB_001856c8: ADD RSP,0x8 POP RBX POP RBP RET
ulong _mi_check_index(long *param_1,uint param_2) { int iVar1; int4 *puVar2; int4 uVar3; ulong uVar4; uVar4 = (ulong)param_2; if (param_2 == 0xffffffff) { uVar4 = (ulong)*(uint *)((long)param_1 + 0x1d4); } iVar1 = (int)uVar4; if (iVar1 < 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7c; } else { if ((*(ulong *)(*param_1 + 0xc0) >> (uVar4 & 0x3f) & 1) != 0) { if (*(int *)((long)param_1 + 0x1d4) != iVar1) { *(int *)((long)param_1 + 0x1d4) = iVar1; *(int1 *)((long)param_1 + 0x33c) = 1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401 | 0x30; } if (((*(byte *)(param_1 + 0x39) & 0x10) != 0) && (iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) { return 0xffffffff; } return uVar4; } uVar3 = 0x7c; if (*(long *)(*param_1 + 0x18) == 0) { uVar3 = 0x89; } puVar2 = (int4 *)_my_thread_var(); *puVar2 = uVar3; } return 0xffffffff; }
47,949
stbi__bmp_test_raw(stbi__context*)
SDL3Lite/dependencies/stb_image.h
static int stbi__bmp_test_raw(stbi__context *s) { int r; int sz; if (stbi__get8(s) != 'B') return 0; if (stbi__get8(s) != 'M') return 0; stbi__get32le(s); // discard filesize stbi__get16le(s); // discard reserved stbi__get16le(s); // discard reserved stbi__get32le(s); // discard data offset sz = stbi__get32le(s); r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); return r; }
O0
c
stbi__bmp_test_raw(stbi__context*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x31910 movzbl %al, %eax cmpl $0x42, %eax je 0x31829 movl $0x0, -0x4(%rbp) jmp 0x318ba movq -0x10(%rbp), %rdi callq 0x31910 movzbl %al, %eax cmpl $0x4d, %eax je 0x31843 movl $0x0, -0x4(%rbp) jmp 0x318ba movq -0x10(%rbp), %rdi callq 0x319a0 movq -0x10(%rbp), %rdi callq 0x319e0 movq -0x10(%rbp), %rdi callq 0x319e0 movq -0x10(%rbp), %rdi callq 0x319a0 movq -0x10(%rbp), %rdi callq 0x319a0 movl %eax, -0x18(%rbp) movb $0x1, %al cmpl $0xc, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x318a9 movb $0x1, %al cmpl $0x28, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x318a9 movb $0x1, %al cmpl $0x38, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x318a9 movb $0x1, %al cmpl $0x6c, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x318a9 cmpl $0x7c, -0x18(%rbp) sete %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL18stbi__bmp_test_rawP13stbi__context: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al cmp eax, 42h ; 'B' jz short loc_31829 mov [rbp+var_4], 0 jmp loc_318BA loc_31829: mov rdi, [rbp+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al cmp eax, 4Dh ; 'M' jz short loc_31843 mov [rbp+var_4], 0 jmp short loc_318BA loc_31843: mov rdi, [rbp+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov rdi, [rbp+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov rdi, [rbp+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov rdi, [rbp+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov rdi, [rbp+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov [rbp+var_18], eax mov al, 1 cmp [rbp+var_18], 0Ch mov [rbp+var_19], al jz short loc_318A9 mov al, 1 cmp [rbp+var_18], 28h ; '(' mov [rbp+var_19], al jz short loc_318A9 mov al, 1 cmp [rbp+var_18], 38h ; '8' mov [rbp+var_19], al jz short loc_318A9 mov al, 1 cmp [rbp+var_18], 6Ch ; 'l' mov [rbp+var_19], al jz short loc_318A9 cmp [rbp+var_18], 7Ch ; '|' setz al mov [rbp+var_19], al loc_318A9: mov al, [rbp+var_19] and al, 1 movzx eax, al mov [rbp+var_14], eax mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_318BA: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 stbi__bmp_test_raw(long long a1) { bool v2; // [rsp+7h] [rbp-19h] int v3; // [rsp+8h] [rbp-18h] if ( (unsigned __int8)stbi__get8(a1) == 66 ) { if ( (unsigned __int8)stbi__get8(a1) == 77 ) { stbi__get32le(a1); stbi__get16le(a1); stbi__get16le(a1); stbi__get32le(a1); v3 = stbi__get32le(a1); v2 = 1; if ( v3 != 12 ) { v2 = 1; if ( v3 != 40 ) { v2 = 1; if ( v3 != 56 ) { v2 = 1; if ( v3 != 108 ) return v3 == 124; } } } return v2; } else { return 0; } } else { return 0; } }
stbi__bmp_test_raw: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00131910 MOVZX EAX,AL CMP EAX,0x42 JZ 0x00131829 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001318ba LAB_00131829: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00131910 MOVZX EAX,AL CMP EAX,0x4d JZ 0x00131843 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001318ba LAB_00131843: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001319a0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001319e0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001319e0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001319a0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001319a0 MOV dword ptr [RBP + -0x18],EAX MOV AL,0x1 CMP dword ptr [RBP + -0x18],0xc MOV byte ptr [RBP + -0x19],AL JZ 0x001318a9 MOV AL,0x1 CMP dword ptr [RBP + -0x18],0x28 MOV byte ptr [RBP + -0x19],AL JZ 0x001318a9 MOV AL,0x1 CMP dword ptr [RBP + -0x18],0x38 MOV byte ptr [RBP + -0x19],AL JZ 0x001318a9 MOV AL,0x1 CMP dword ptr [RBP + -0x18],0x6c MOV byte ptr [RBP + -0x19],AL JZ 0x001318a9 CMP dword ptr [RBP + -0x18],0x7c SETZ AL MOV byte ptr [RBP + -0x19],AL LAB_001318a9: MOV AL,byte ptr [RBP + -0x19] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_001318ba: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
/* stbi__bmp_test_raw(stbi__context*) */ bool stbi__bmp_test_raw(stbi__context *param_1) { char cVar1; int iVar2; bool local_21; cVar1 = stbi__get8(param_1); if (cVar1 == 'B') { cVar1 = stbi__get8(param_1); if (cVar1 == 'M') { stbi__get32le(param_1); stbi__get16le(param_1); stbi__get16le(param_1); stbi__get32le(param_1); iVar2 = stbi__get32le(param_1); local_21 = true; if ((((iVar2 != 0xc) && (local_21 = true, iVar2 != 0x28)) && (local_21 = true, iVar2 != 0x38)) && (local_21 = true, iVar2 != 0x6c)) { local_21 = iVar2 == 0x7c; } } else { local_21 = false; } } else { local_21 = false; } return local_21; }
47,950
stbi__bmp_test_raw(stbi__context*)
SDL3Lite/dependencies/stb_image.h
static int stbi__bmp_test_raw(stbi__context *s) { int r; int sz; if (stbi__get8(s) != 'B') return 0; if (stbi__get8(s) != 'M') return 0; stbi__get32le(s); // discard filesize stbi__get16le(s); // discard reserved stbi__get16le(s); // discard reserved stbi__get32le(s); // discard data offset sz = stbi__get32le(s); r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); return r; }
O3
c
stbi__bmp_test_raw(stbi__context*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rdi callq 0x31fa0 movzbl %al, %eax cmpl $0x42, %eax je 0x31ea8 movl $0x0, 0x24(%rsp) jmp 0x31f52 movq 0x18(%rsp), %rdi callq 0x31fa0 movzbl %al, %eax cmpl $0x4d, %eax je 0x31ec7 movl $0x0, 0x24(%rsp) jmp 0x31f52 movq 0x18(%rsp), %rdi callq 0x32030 movq 0x18(%rsp), %rdi callq 0x32070 movq 0x18(%rsp), %rdi callq 0x32070 movq 0x18(%rsp), %rdi callq 0x32030 movq 0x18(%rsp), %rdi callq 0x32030 movl %eax, 0x10(%rsp) movb $0x1, %al cmpl $0xc, 0x10(%rsp) movb %al, 0xf(%rsp) je 0x31f3d movb $0x1, %al cmpl $0x28, 0x10(%rsp) movb %al, 0xf(%rsp) je 0x31f3d movb $0x1, %al cmpl $0x38, 0x10(%rsp) movb %al, 0xf(%rsp) je 0x31f3d movb $0x1, %al cmpl $0x6c, 0x10(%rsp) movb %al, 0xf(%rsp) je 0x31f3d cmpl $0x7c, 0x10(%rsp) sete %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al movzbl %al, %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZL18stbi__bmp_test_rawP13stbi__context: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rdi, [rsp+28h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al cmp eax, 42h ; 'B' jz short loc_31EA8 mov [rsp+28h+var_4], 0 jmp loc_31F52 loc_31EA8: mov rdi, [rsp+28h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al cmp eax, 4Dh ; 'M' jz short loc_31EC7 mov [rsp+28h+var_4], 0 jmp loc_31F52 loc_31EC7: mov rdi, [rsp+28h+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov rdi, [rsp+28h+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov rdi, [rsp+28h+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov rdi, [rsp+28h+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov rdi, [rsp+28h+var_10] call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *) mov [rsp+28h+var_18], eax mov al, 1 cmp [rsp+28h+var_18], 0Ch mov [rsp+28h+var_19], al jz short loc_31F3D mov al, 1 cmp [rsp+28h+var_18], 28h ; '(' mov [rsp+28h+var_19], al jz short loc_31F3D mov al, 1 cmp [rsp+28h+var_18], 38h ; '8' mov [rsp+28h+var_19], al jz short loc_31F3D mov al, 1 cmp [rsp+28h+var_18], 6Ch ; 'l' mov [rsp+28h+var_19], al jz short loc_31F3D cmp [rsp+28h+var_18], 7Ch ; '|' setz al mov [rsp+28h+var_19], al loc_31F3D: mov al, [rsp+28h+var_19] and al, 1 movzx eax, al mov [rsp+28h+var_14], eax mov eax, [rsp+28h+var_14] mov [rsp+28h+var_4], eax loc_31F52: mov eax, [rsp+28h+var_4] add rsp, 28h retn
_BOOL8 stbi__bmp_test_raw(long long a1) { bool v2; // [rsp+Fh] [rbp-19h] int v3; // [rsp+10h] [rbp-18h] if ( (unsigned __int8)stbi__get8(a1) == 66 ) { if ( (unsigned __int8)stbi__get8(a1) == 77 ) { stbi__get32le(a1); stbi__get16le(a1); stbi__get16le(a1); stbi__get32le(a1); v3 = stbi__get32le(a1); v2 = 1; if ( v3 != 12 ) { v2 = 1; if ( v3 != 40 ) { v2 = 1; if ( v3 != 56 ) { v2 = 1; if ( v3 != 108 ) return v3 == 124; } } } return v2; } else { return 0; } } else { return 0; } }
stbi__bmp_test_raw: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RDI,qword ptr [RSP + 0x18] CALL 0x00131fa0 MOVZX EAX,AL CMP EAX,0x42 JZ 0x00131ea8 MOV dword ptr [RSP + 0x24],0x0 JMP 0x00131f52 LAB_00131ea8: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00131fa0 MOVZX EAX,AL CMP EAX,0x4d JZ 0x00131ec7 MOV dword ptr [RSP + 0x24],0x0 JMP 0x00131f52 LAB_00131ec7: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00132030 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00132070 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00132070 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00132030 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00132030 MOV dword ptr [RSP + 0x10],EAX MOV AL,0x1 CMP dword ptr [RSP + 0x10],0xc MOV byte ptr [RSP + 0xf],AL JZ 0x00131f3d MOV AL,0x1 CMP dword ptr [RSP + 0x10],0x28 MOV byte ptr [RSP + 0xf],AL JZ 0x00131f3d MOV AL,0x1 CMP dword ptr [RSP + 0x10],0x38 MOV byte ptr [RSP + 0xf],AL JZ 0x00131f3d MOV AL,0x1 CMP dword ptr [RSP + 0x10],0x6c MOV byte ptr [RSP + 0xf],AL JZ 0x00131f3d CMP dword ptr [RSP + 0x10],0x7c SETZ AL MOV byte ptr [RSP + 0xf],AL LAB_00131f3d: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x24],EAX LAB_00131f52: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* stbi__bmp_test_raw(stbi__context*) */ bool stbi__bmp_test_raw(stbi__context *param_1) { char cVar1; int iVar2; bool local_19; cVar1 = stbi__get8(param_1); if (cVar1 == 'B') { cVar1 = stbi__get8(param_1); if (cVar1 == 'M') { stbi__get32le(param_1); stbi__get16le(param_1); stbi__get16le(param_1); stbi__get32le(param_1); iVar2 = stbi__get32le(param_1); local_19 = true; if ((((iVar2 != 0xc) && (local_19 = true, iVar2 != 0x28)) && (local_19 = true, iVar2 != 0x38)) && (local_19 = true, iVar2 != 0x6c)) { local_19 = iVar2 == 0x7c; } } else { local_19 = false; } } else { local_19 = false; } return local_19; }
47,951
mi_read_mempack_record
eloqsql/storage/myisam/mi_packrec.c
static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf) { MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; uchar *pos; DBUG_ENTER("mi_read_mempack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(-1); /* _search() didn't find record */ if (!(pos= (uchar*) _mi_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, (uchar*) share->file_map+ filepos))) DBUG_RETURN(-1); /* No need to end-zero pos here for valgrind as data is memory mapped */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); }
O0
c
mi_read_mempack_record: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x88(%rbp) cmpq $-0x1, -0x78(%rbp) jne 0x47614 jmp 0x4760b movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0x47683 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x70(%rbp), %rcx addq $0x120, %rcx # imm = 0x120 movq -0x88(%rbp), %rax movq 0x270(%rax), %r8 addq -0x78(%rbp), %r8 leaq -0x60(%rbp), %rdx callq 0x495c0 movq %rax, -0x90(%rbp) cmpq $0x0, %rax jne 0x4765e jmp 0x47655 movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0x47683 jmp 0x47660 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x80(%rbp), %rdx movq -0x90(%rbp), %rcx movq -0x48(%rbp), %r8 callq 0x46d50 movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x476ad movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x283c0 nopw %cs:(%rax,%rax)
_mi_read_mempack_record: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_88], rax cmp [rbp+var_78], 0FFFFFFFFFFFFFFFFh jnz short loc_47614 jmp short $+2 loc_4760B: mov [rbp+var_64], 0FFFFFFFFh jmp short loc_47683 loc_47614: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rcx, [rbp+var_70] add rcx, 120h mov rax, [rbp+var_88] mov r8, [rax+270h] add r8, [rbp+var_78] lea rdx, [rbp+var_60] call _mi_mempack_get_block_info mov [rbp+var_90], rax cmp rax, 0 jnz short loc_4765E jmp short $+2 loc_47655: mov [rbp+var_64], 0FFFFFFFFh jmp short loc_47683 loc_4765E: jmp short $+2 loc_47660: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rdx, [rbp+var_80] mov rcx, [rbp+var_90] mov r8, [rbp+var_48] call _mi_pack_rec_unpack mov [rbp+var_64], eax loc_47683: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_476AD mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_476AD: call ___stack_chk_fail
long long mi_read_mempack_record(long long *a1, long long a2, long long a3) { long long block_info; // [rsp+10h] [rbp-90h] _BYTE v7[24]; // [rsp+40h] [rbp-60h] BYREF long long v8; // [rsp+58h] [rbp-48h] unsigned long long v9; // [rsp+98h] [rbp-8h] v9 = __readfsqword(0x28u); if ( a2 == -1 ) { return (unsigned int)-1; } else { block_info = mi_mempack_get_block_info(a1, a1 + 10, v7, a1 + 36, a2 + *(_QWORD *)(*a1 + 624)); if ( block_info ) return (unsigned int)mi_pack_rec_unpack(a1, (long long)(a1 + 10), a3, block_info, v8); else return (unsigned int)-1; } }
_mi_read_mempack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x88],RAX CMP qword ptr [RBP + -0x78],-0x1 JNZ 0x00147614 JMP 0x0014760b LAB_0014760b: MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x00147683 LAB_00147614: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x120 MOV RAX,qword ptr [RBP + -0x88] MOV R8,qword ptr [RAX + 0x270] ADD R8,qword ptr [RBP + -0x78] LEA RDX,[RBP + -0x60] CALL 0x001495c0 MOV qword ptr [RBP + -0x90],RAX CMP RAX,0x0 JNZ 0x0014765e JMP 0x00147655 LAB_00147655: MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x00147683 LAB_0014765e: JMP 0x00147660 LAB_00147660: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x90] MOV R8,qword ptr [RBP + -0x48] CALL 0x00146d50 MOV dword ptr [RBP + -0x64],EAX LAB_00147683: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001476ad MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_001476ad: CALL 0x001283c0
int4 _mi_read_mempack_record(long *param_1,long param_2,int8 param_3) { long lVar1; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; int8 local_50; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == -1) { local_6c = 0xffffffff; } else { lVar1 = _mi_mempack_get_block_info (param_1,param_1 + 10,local_68,param_1 + 0x24, *(long *)(*param_1 + 0x270) + param_2); if (lVar1 == 0) { local_6c = 0xffffffff; } else { local_6c = _mi_pack_rec_unpack(param_1,param_1 + 10,param_3,lVar1,local_50); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,952
stbi_info_from_file
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O1
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x1d030 movq %rax, %r13 movups 0x12c301(%rip), %xmm0 # 0x156d10 leaq 0x40(%rsp), %rax movups %xmm0, -0x28(%rax) movq 0x12c301(%rip), %rcx # 0x156d20 movq %rcx, -0x18(%rax) movq %rbx, -0x10(%rax) movabsq $0x8000000001, %rcx # imm = 0x8000000001 movq %rcx, -0x8(%rax) movl $0x0, 0x80(%rax) movq %rax, 0x98(%rax) movq %rax, 0x88(%rax) leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x3c9f9 movq 0xc8(%rbp), %rax movq %rax, 0xd8(%rbp) movq %rbp, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x2aa9c movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x1dda0 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi call _ftell mov r13, rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks lea rax, [rsp+118h+var_D8] movups xmmword ptr [rax-28h], xmm0 mov rcx, cs:off_156D20 mov [rax-18h], rcx mov [rax-10h], rbx mov rcx, 8000000001h mov [rax-8], rcx mov dword ptr [rax+80h], 0 mov [rax+98h], rax mov [rax+88h], rax lea rbp, [rsp+118h+var_110] mov rdi, rbp call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbp+0C8h] mov [rbp+0D8h], rax mov rdi, rbp mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebp, eax mov rdi, rbx mov rsi, r13 xor edx, edx call _fseek mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 unsigned int v7; // ebp _BYTE v9[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v10; // [rsp+18h] [rbp-100h] long long ( *v11)(void *); // [rsp+28h] [rbp-F0h] long long v12; // [rsp+30h] [rbp-E8h] long long v13; // [rsp+38h] [rbp-E0h] _BYTE v14[128]; // [rsp+40h] [rbp-D8h] BYREF int v15; // [rsp+C0h] [rbp-58h] _BYTE *v16; // [rsp+C8h] [rbp-50h] long long v17; // [rsp+D0h] [rbp-48h] _BYTE *v18; // [rsp+D8h] [rbp-40h] long long v19; // [rsp+E0h] [rbp-38h] v6 = ftell(a1); v10 = *(_OWORD *)&stbi__stdio_callbacks; v11 = stbi__stdio_eof; v12 = a1; v13 = 0x8000000001LL; v15 = 0; v18 = v14; v16 = v14; stbi__refill_buffer(v9); v19 = v17; v7 = stbi__info_main(v9, a2, a3, a4); fseek(a1, v6, 0LL); return v7; }
stbi_info_from_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI CALL 0x0011d030 MOV R13,RAX MOVUPS XMM0,xmmword ptr [0x00256d10] LEA RAX,[RSP + 0x40] MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV RCX,qword ptr [0x00256d20] MOV qword ptr [RAX + -0x18],RCX MOV qword ptr [RAX + -0x10],RBX MOV RCX,0x8000000001 MOV qword ptr [RAX + -0x8],RCX MOV dword ptr [RAX + 0x80],0x0 MOV qword ptr [RAX + 0x98],RAX MOV qword ptr [RAX + 0x88],RAX LEA RBP,[RSP + 0x8] MOV RDI,RBP CALL 0x0013c9f9 MOV RAX,qword ptr [RBP + 0xc8] MOV qword ptr [RBP + 0xd8],RAX MOV RDI,RBP MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0012aa9c MOV EBP,EAX MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x0011dda0 MOV EAX,EBP ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 stbi_info_from_file(FILE *param_1,int *param_2,int *param_3,int *param_4) { int4 uVar1; long __off; stbi__context local_110 [40]; FILE *local_e8; int8 local_e0; int1 local_d8 [128]; int4 local_58; int1 *local_50; int8 local_48; int1 *local_40; int8 local_38; __off = ftell(param_1); local_50 = local_d8; local_110[0x10] = (stbi__context)stbi__stdio_callbacks[0]; local_110[0x11] = (stbi__context)stbi__stdio_callbacks[1]; local_110[0x12] = (stbi__context)stbi__stdio_callbacks[2]; local_110[0x13] = (stbi__context)stbi__stdio_callbacks[3]; local_110[0x14] = (stbi__context)stbi__stdio_callbacks[4]; local_110[0x15] = (stbi__context)stbi__stdio_callbacks[5]; local_110[0x16] = (stbi__context)stbi__stdio_callbacks[6]; local_110[0x17] = (stbi__context)stbi__stdio_callbacks[7]; local_110[0x18] = (stbi__context)stbi__stdio_callbacks[8]; local_110[0x19] = (stbi__context)stbi__stdio_callbacks[9]; local_110[0x1a] = (stbi__context)stbi__stdio_callbacks[10]; local_110[0x1b] = (stbi__context)stbi__stdio_callbacks[0xb]; local_110[0x1c] = (stbi__context)stbi__stdio_callbacks[0xc]; local_110[0x1d] = (stbi__context)stbi__stdio_callbacks[0xd]; local_110[0x1e] = (stbi__context)stbi__stdio_callbacks[0xe]; local_110[0x1f] = (stbi__context)stbi__stdio_callbacks[0xf]; local_110[0x20] = (stbi__context)stbi__stdio_callbacks[0x10]; local_110[0x21] = (stbi__context)stbi__stdio_callbacks[0x11]; local_110[0x22] = (stbi__context)stbi__stdio_callbacks[0x12]; local_110[0x23] = (stbi__context)stbi__stdio_callbacks[0x13]; local_110[0x24] = (stbi__context)stbi__stdio_callbacks[0x14]; local_110[0x25] = (stbi__context)stbi__stdio_callbacks[0x15]; local_110[0x26] = (stbi__context)stbi__stdio_callbacks[0x16]; local_110[0x27] = (stbi__context)stbi__stdio_callbacks[0x17]; local_e0 = 0x8000000001; local_58 = 0; local_e8 = param_1; local_40 = local_50; stbi__refill_buffer(local_110); local_38 = local_48; uVar1 = stbi__info_main(local_110,param_2,param_3,param_4); fseek(param_1,__off,0); return uVar1; }
47,953
stbi_info_from_file
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O3
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x1d030 movq %rax, %r13 movups 0x1294a0(%rip), %xmm0 # 0x153d50 leaq 0x40(%rsp), %rax movups %xmm0, -0x28(%rax) movq 0x1294a0(%rip), %rcx # 0x153d60 movq %rcx, -0x18(%rax) movq %rbx, -0x10(%rax) movabsq $0x8000000001, %rcx # imm = 0x8000000001 movq %rcx, -0x8(%rax) movl $0x0, 0x80(%rax) movq %rax, 0x98(%rax) movq %rax, 0x88(%rax) leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x3c5ff movq 0xc8(%rbp), %rax movq %rax, 0xd8(%rbp) movq %rbp, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x2a93d movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x1ddb0 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi call _ftell mov r13, rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks lea rax, [rsp+118h+var_D8] movups xmmword ptr [rax-28h], xmm0 mov rcx, cs:off_153D60 mov [rax-18h], rcx mov [rax-10h], rbx mov rcx, 8000000001h mov [rax-8], rcx mov dword ptr [rax+80h], 0 mov [rax+98h], rax mov [rax+88h], rax lea rbp, [rsp+118h+var_110] mov rdi, rbp call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbp+0C8h] mov [rbp+0D8h], rax mov rdi, rbp mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebp, eax mov rdi, rbx mov rsi, r13 xor edx, edx call _fseek mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 unsigned int v7; // ebp _BYTE v9[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v10; // [rsp+18h] [rbp-100h] long long ( *v11)(void *); // [rsp+28h] [rbp-F0h] long long v12; // [rsp+30h] [rbp-E8h] long long v13; // [rsp+38h] [rbp-E0h] _BYTE v14[128]; // [rsp+40h] [rbp-D8h] BYREF int v15; // [rsp+C0h] [rbp-58h] _BYTE *v16; // [rsp+C8h] [rbp-50h] long long v17; // [rsp+D0h] [rbp-48h] _BYTE *v18; // [rsp+D8h] [rbp-40h] long long v19; // [rsp+E0h] [rbp-38h] v6 = ftell(a1); v10 = *(_OWORD *)&stbi__stdio_callbacks; v11 = stbi__stdio_eof; v12 = a1; v13 = 0x8000000001LL; v15 = 0; v18 = v14; v16 = v14; stbi__refill_buffer(v9); v19 = v17; v7 = stbi__info_main(v9, a2, a3, a4); fseek(a1, v6, 0LL); return v7; }
stbi_info_from_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI CALL 0x0011d030 MOV R13,RAX MOVUPS XMM0,xmmword ptr [0x00253d50] LEA RAX,[RSP + 0x40] MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV RCX,qword ptr [0x00253d60] MOV qword ptr [RAX + -0x18],RCX MOV qword ptr [RAX + -0x10],RBX MOV RCX,0x8000000001 MOV qword ptr [RAX + -0x8],RCX MOV dword ptr [RAX + 0x80],0x0 MOV qword ptr [RAX + 0x98],RAX MOV qword ptr [RAX + 0x88],RAX LEA RBP,[RSP + 0x8] MOV RDI,RBP CALL 0x0013c5ff MOV RAX,qword ptr [RBP + 0xc8] MOV qword ptr [RBP + 0xd8],RAX MOV RDI,RBP MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0012a93d MOV EBP,EAX MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x0011ddb0 MOV EAX,EBP ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 stbi_info_from_file(FILE *param_1,int *param_2,int *param_3,int *param_4) { int4 uVar1; long __off; stbi__context local_110 [40]; FILE *local_e8; int8 local_e0; int1 local_d8 [128]; int4 local_58; int1 *local_50; int8 local_48; int1 *local_40; int8 local_38; __off = ftell(param_1); local_50 = local_d8; local_110[0x10] = (stbi__context)stbi__stdio_callbacks[0]; local_110[0x11] = (stbi__context)stbi__stdio_callbacks[1]; local_110[0x12] = (stbi__context)stbi__stdio_callbacks[2]; local_110[0x13] = (stbi__context)stbi__stdio_callbacks[3]; local_110[0x14] = (stbi__context)stbi__stdio_callbacks[4]; local_110[0x15] = (stbi__context)stbi__stdio_callbacks[5]; local_110[0x16] = (stbi__context)stbi__stdio_callbacks[6]; local_110[0x17] = (stbi__context)stbi__stdio_callbacks[7]; local_110[0x18] = (stbi__context)stbi__stdio_callbacks[8]; local_110[0x19] = (stbi__context)stbi__stdio_callbacks[9]; local_110[0x1a] = (stbi__context)stbi__stdio_callbacks[10]; local_110[0x1b] = (stbi__context)stbi__stdio_callbacks[0xb]; local_110[0x1c] = (stbi__context)stbi__stdio_callbacks[0xc]; local_110[0x1d] = (stbi__context)stbi__stdio_callbacks[0xd]; local_110[0x1e] = (stbi__context)stbi__stdio_callbacks[0xe]; local_110[0x1f] = (stbi__context)stbi__stdio_callbacks[0xf]; local_110[0x20] = (stbi__context)stbi__stdio_callbacks[0x10]; local_110[0x21] = (stbi__context)stbi__stdio_callbacks[0x11]; local_110[0x22] = (stbi__context)stbi__stdio_callbacks[0x12]; local_110[0x23] = (stbi__context)stbi__stdio_callbacks[0x13]; local_110[0x24] = (stbi__context)stbi__stdio_callbacks[0x14]; local_110[0x25] = (stbi__context)stbi__stdio_callbacks[0x15]; local_110[0x26] = (stbi__context)stbi__stdio_callbacks[0x16]; local_110[0x27] = (stbi__context)stbi__stdio_callbacks[0x17]; local_e0 = 0x8000000001; local_58 = 0; local_e8 = param_1; local_40 = local_50; stbi__refill_buffer(local_110); local_38 = local_48; uVar1 = stbi__info_main(local_110,param_2,param_3,param_4); fseek(param_1,__off,0); return uVar1; }
47,954
mi_checksum
eloqsql/storage/myisam/mi_checksum.c
ha_checksum mi_checksum(MI_INFO *info, const uchar *buf) { ha_checksum crc=0; const uchar *record= buf; MI_COLUMNDEF *column= info->s->rec; MI_COLUMNDEF *column_end= column+ info->s->base.fields; my_bool skip_null_bits= MY_TEST(info->s->options & HA_OPTION_NULL_FIELDS); for ( ; column != column_end ; buf+= column++->length) { const uchar *pos; ulong length; if ((record[column->null_pos] & column->null_bit) && skip_null_bits) continue; /* Null field */ switch (column->type) { case FIELD_BLOB: { length=_mi_calc_blob_length(column->length- portable_sizeof_char_ptr, buf); memcpy((void*) &pos, buf+column->length - portable_sizeof_char_ptr, sizeof(char*)); break; } case FIELD_VARCHAR: { uint pack_length= HA_VARCHAR_PACKLENGTH(column->length-1); if (pack_length == 1) length= (ulong) *(uchar*) buf; else length= uint2korr(buf); pos= buf+pack_length; break; } default: length=column->length; pos=buf; break; } crc=my_checksum(crc, pos ? pos : (uchar*) "", length); } return crc; }
O3
c
mi_checksum: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq (%rdi), %rcx movq 0x168(%rcx), %rax testq %rax, %rax je 0x90279 movq 0x230(%rcx), %r12 movq 0x318(%rcx), %rcx shlq $0x4, %rax leaq (%rax,%rax,2), %r13 xorl %ebx, %ebx andl $0x400, %ecx # imm = 0x400 movq %rcx, -0x38(%rbp) movq %rsi, %r14 xorl %r15d, %r15d movq %rsi, -0x30(%rbp) movzwl 0xe(%r12,%rbx), %eax movb 0xc(%r12,%rbx), %cl testb %cl, (%rsi,%rax) je 0x901ef cmpq $0x0, -0x38(%rbp) jne 0x90261 movl (%r12,%rbx), %eax movzwl 0x4(%r12,%rbx), %edx cmpl $0x8, %eax je 0x90220 cmpl $0x4, %eax jne 0x90233 addl $-0x8, %edx movl %edx, %edi movq %r14, %rsi callq 0x79bbd movq %rax, %rdx movzwl 0x4(%r12,%rbx), %eax movq -0x8(%r14,%rax), %rsi jmp 0x90244 cmpl $0x100, %edx # imm = 0x100 ja 0x90238 movzbl (%r14), %edx movl $0x1, %esi jmp 0x90241 movq %r14, %rsi jmp 0x90244 movzwl (%r14), %edx movl $0x2, %esi addq %r14, %rsi testq %rsi, %rsi leaq 0x50eab(%rip), %rax # 0xe10f9 cmoveq %rax, %rsi movl %r15d, %edi callq 0xa8f0c movl %eax, %r15d movq -0x30(%rbp), %rsi movzwl 0x4(%r12,%rbx), %eax addq %rax, %r14 addq $0x30, %rbx cmpq %rbx, %r13 jne 0x901d8 jmp 0x9027c xorl %r15d, %r15d movl %r15d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mi_checksum: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rcx, [rdi] mov rax, [rcx+168h] test rax, rax jz loc_90279 mov r12, [rcx+230h] mov rcx, [rcx+318h] shl rax, 4 lea r13, [rax+rax*2] xor ebx, ebx and ecx, 400h mov [rbp+var_38], rcx mov r14, rsi xor r15d, r15d mov [rbp+var_30], rsi loc_901D8: movzx eax, word ptr [r12+rbx+0Eh] mov cl, [r12+rbx+0Ch] test [rsi+rax], cl jz short loc_901EF cmp [rbp+var_38], 0 jnz short loc_90261 loc_901EF: mov eax, [r12+rbx] movzx edx, word ptr [r12+rbx+4] cmp eax, 8 jz short loc_90220 cmp eax, 4 jnz short loc_90233 add edx, 0FFFFFFF8h mov edi, edx mov rsi, r14 call _mi_calc_blob_length mov rdx, rax movzx eax, word ptr [r12+rbx+4] mov rsi, [r14+rax-8] jmp short loc_90244 loc_90220: cmp edx, 100h ja short loc_90238 movzx edx, byte ptr [r14] mov esi, 1 jmp short loc_90241 loc_90233: mov rsi, r14 jmp short loc_90244 loc_90238: movzx edx, word ptr [r14] mov esi, 2 loc_90241: add rsi, r14 loc_90244: test rsi, rsi lea rax, asc_E10F5+4; "" cmovz rsi, rax mov edi, r15d call my_checksum mov r15d, eax mov rsi, [rbp+var_30] loc_90261: movzx eax, word ptr [r12+rbx+4] add r14, rax add rbx, 30h ; '0' cmp r13, rbx jnz loc_901D8 jmp short loc_9027C loc_90279: xor r15d, r15d loc_9027C: mov eax, r15d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_checksum(long long *a1, unsigned __int8 *a2) { long long v2; // rcx long long v3; // rax long long v4; // r12 long long v5; // r13 long long v6; // rbx unsigned __int8 *v7; // r14 unsigned int v8; // r15d int v9; // eax unsigned long long v10; // rdx char *v11; // rsi long long v12; // rsi long long v14; // [rsp+8h] [rbp-38h] unsigned __int8 *v15; // [rsp+10h] [rbp-30h] v2 = *a1; v3 = *(_QWORD *)(*a1 + 360); if ( v3 ) { v4 = *(_QWORD *)(v2 + 560); v5 = 48 * v3; v6 = 0LL; v14 = *(_QWORD *)(v2 + 792) & 0x400LL; v7 = a2; v8 = 0; v15 = a2; do { if ( (*(_BYTE *)(v4 + v6 + 12) & a2[*(unsigned __int16 *)(v4 + v6 + 14)]) == 0 || !v14 ) { v9 = *(_DWORD *)(v4 + v6); v10 = *(unsigned __int16 *)(v4 + v6 + 4); if ( v9 == 8 ) { if ( (unsigned int)v10 > 0x100 ) { v10 = *(unsigned __int16 *)v7; v12 = 2LL; } else { v10 = *v7; v12 = 1LL; } v11 = (char *)&v7[v12]; } else if ( v9 == 4 ) { v10 = mi_calc_blob_length((int)v10 - 8, v7); v11 = *(char **)&v7[*(unsigned __int16 *)(v4 + v6 + 4) - 8]; } else { v11 = (char *)v7; } if ( !v11 ) v11 = ""; v8 = my_checksum(v8, v11, v10); a2 = v15; } v7 += *(unsigned __int16 *)(v4 + v6 + 4); v6 += 48LL; } while ( v5 != v6 ); } else { return 0; } return v8; }
mi_checksum: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RCX + 0x168] TEST RAX,RAX JZ 0x00190279 MOV R12,qword ptr [RCX + 0x230] MOV RCX,qword ptr [RCX + 0x318] SHL RAX,0x4 LEA R13,[RAX + RAX*0x2] XOR EBX,EBX AND ECX,0x400 MOV qword ptr [RBP + -0x38],RCX MOV R14,RSI XOR R15D,R15D MOV qword ptr [RBP + -0x30],RSI LAB_001901d8: MOVZX EAX,word ptr [R12 + RBX*0x1 + 0xe] MOV CL,byte ptr [R12 + RBX*0x1 + 0xc] TEST byte ptr [RSI + RAX*0x1],CL JZ 0x001901ef CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00190261 LAB_001901ef: MOV EAX,dword ptr [R12 + RBX*0x1] MOVZX EDX,word ptr [R12 + RBX*0x1 + 0x4] CMP EAX,0x8 JZ 0x00190220 CMP EAX,0x4 JNZ 0x00190233 ADD EDX,-0x8 MOV EDI,EDX MOV RSI,R14 CALL 0x00179bbd MOV RDX,RAX MOVZX EAX,word ptr [R12 + RBX*0x1 + 0x4] MOV RSI,qword ptr [R14 + RAX*0x1 + -0x8] JMP 0x00190244 LAB_00190220: CMP EDX,0x100 JA 0x00190238 MOVZX EDX,byte ptr [R14] MOV ESI,0x1 JMP 0x00190241 LAB_00190233: MOV RSI,R14 JMP 0x00190244 LAB_00190238: MOVZX EDX,word ptr [R14] MOV ESI,0x2 LAB_00190241: ADD RSI,R14 LAB_00190244: TEST RSI,RSI LEA RAX,[0x1e10f9] CMOVZ RSI,RAX MOV EDI,R15D CALL 0x001a8f0c MOV R15D,EAX MOV RSI,qword ptr [RBP + -0x30] LAB_00190261: MOVZX EAX,word ptr [R12 + RBX*0x1 + 0x4] ADD R14,RAX ADD RBX,0x30 CMP R13,RBX JNZ 0x001901d8 JMP 0x0019027c LAB_00190279: XOR R15D,R15D LAB_0019027c: MOV EAX,R15D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 mi_checksum(long *param_1,ushort *param_2) { ushort uVar1; long lVar2; long lVar3; ulong uVar4; int4 uVar5; ulong uVar6; long lVar7; long lVar8; ushort *puVar9; ushort *puVar10; lVar7 = *param_1; lVar2 = *(long *)(lVar7 + 0x168); if (lVar2 == 0) { uVar5 = 0; } else { lVar3 = *(long *)(lVar7 + 0x230); uVar4 = *(ulong *)(lVar7 + 0x318); lVar7 = 0; uVar5 = 0; puVar10 = param_2; do { if (((*(byte *)((long)param_2 + (ulong)*(ushort *)(lVar3 + 0xe + lVar7)) & *(byte *)(lVar3 + 0xc + lVar7)) == 0) || ((uVar4 & 0x400) == 0)) { uVar1 = *(ushort *)(lVar3 + 4 + lVar7); uVar6 = (ulong)uVar1; if (*(int *)(lVar3 + lVar7) == 8) { if (uVar1 < 0x101) { uVar6 = (ulong)(byte)*puVar10; lVar8 = 1; } else { uVar6 = (ulong)*puVar10; lVar8 = 2; } puVar9 = (ushort *)(lVar8 + (long)puVar10); } else { puVar9 = puVar10; if (*(int *)(lVar3 + lVar7) == 4) { uVar6 = _mi_calc_blob_length(uVar1 - 8,puVar10); puVar9 = *(ushort **)((long)puVar10 + ((ulong)*(ushort *)(lVar3 + 4 + lVar7) - 8)); } } if (puVar9 == (ushort *)0x0) { puVar9 = (ushort *)&DAT_001e10f9; } uVar5 = my_checksum(uVar5,puVar9,uVar6); } puVar10 = (ushort *)((long)puVar10 + (ulong)*(ushort *)(lVar3 + 4 + lVar7)); lVar7 = lVar7 + 0x30; } while (lVar2 * 0x30 != lVar7); } return uVar5; }
47,955
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O0
c
mi_copy_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rcx addq $0x10, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0xb0ff6 jmp 0xb0ff8 jmp 0xb0ffa popq %rbp retq nopl (%rax)
mi_copy_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rcx, [rbp+var_10] add rcx, 10h mov rax, [rbp+var_18] mov [rax+8], rcx jmp short $+2 loc_B0FF6: jmp short $+2 loc_B0FF8: jmp short $+2 loc_B0FFA: pop rbp retn
long long mi_copy_status(long long a1, long long a2) { long long result; // rax result = a1; *(_QWORD *)(a1 + 8) = a2 + 16; return result; }
mi_copy_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX JMP 0x001b0ff6 LAB_001b0ff6: JMP 0x001b0ff8 LAB_001b0ff8: JMP 0x001b0ffa LAB_001b0ffa: POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
47,956
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O3
c
mi_copy_status: pushq %rbp movq %rsp, %rbp addq $0x10, %rsi movq %rsi, 0x8(%rdi) popq %rbp retq
mi_copy_status: push rbp mov rbp, rsp add rsi, 10h mov [rdi+8], rsi pop rbp retn
void mi_copy_status(long long a1, long long a2) { *(_QWORD *)(a1 + 8) = a2 + 16; }
mi_copy_status: PUSH RBP MOV RBP,RSP ADD RSI,0x10 MOV qword ptr [RDI + 0x8],RSI POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
47,957
my_symlink
eloqsql/mysys/my_symlink.c
int my_symlink(const char *content, const char *linkname, myf MyFlags) { #ifndef HAVE_READLINK return 0; #else int result; DBUG_ENTER("my_symlink"); DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname)); result= 0; if (symlink(content, linkname)) { result= -1; my_errno=errno; if (MyFlags & MY_WME) my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno); } else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags)) result= -1; DBUG_RETURN(result); #endif /* HAVE_READLINK */ }
O0
c
my_symlink: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x2b006 movl $0x0, -0x1c(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x24070 cmpl $0x0, %eax je 0x2b07a movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF callq 0x24040 movl (%rax), %eax movl %eax, -0x20(%rbp) callq 0x2bad0 movl -0x20(%rbp), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2b078 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) callq 0x24040 movq -0x30(%rbp), %rdx movq -0x28(%rbp), %rcx movl (%rax), %r8d movl $0x19, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x27d80 jmp 0x2b0a5 movq -0x18(%rbp), %rax andq $0x8000, %rax # imm = 0x8000 cmpq $0x0, %rax je 0x2b0a3 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2b770 cmpl $0x0, %eax je 0x2b0a3 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x2b0a5 jmp 0x2b0a7 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_symlink: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_2B006: mov [rbp+var_1C], 0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _symlink cmp eax, 0 jz short loc_2B07A mov [rbp+var_1C], 0FFFFFFFFh call ___errno_location mov eax, [rax] mov [rbp+var_20], eax call _my_thread_var mov ecx, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_18] and rax, 10h cmp rax, 0 jz short loc_2B078 mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov [rbp+var_28], rax call ___errno_location mov rdx, [rbp+var_30] mov rcx, [rbp+var_28] mov r8d, [rax] mov edi, 19h xor eax, eax mov esi, eax mov al, 0 call my_error loc_2B078: jmp short loc_2B0A5 loc_2B07A: mov rax, [rbp+var_18] and rax, 8000h cmp rax, 0 jz short loc_2B0A3 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_sync_dir_by_file cmp eax, 0 jz short loc_2B0A3 mov [rbp+var_1C], 0FFFFFFFFh loc_2B0A3: jmp short $+2 loc_2B0A5: jmp short $+2 loc_2B0A7: mov eax, [rbp+var_1C] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long my_symlink(long long a1, long long a2, long long a3) { unsigned int *v3; // rax int v5; // [rsp+20h] [rbp-20h] unsigned int v6; // [rsp+24h] [rbp-1Ch] v6 = 0; if ( (unsigned int)symlink(a1, a2) ) { v6 = -1; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( (a3 & 0x10) != 0 ) { v3 = (unsigned int *)__errno_location(); my_error(0x19u, 0LL, a2, a1, *v3); } } else if ( (a3 & 0x8000) != 0 && (unsigned int)my_sync_dir_by_file(a2, a3) ) { return (unsigned int)-1; } return v6; }
my_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0012b006 LAB_0012b006: MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00124070 CMP EAX,0x0 JZ 0x0012b07a MOV dword ptr [RBP + -0x1c],0xffffffff CALL 0x00124040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX CALL 0x0012bad0 MOV ECX,dword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012b078 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX CALL 0x00124040 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RAX] MOV EDI,0x19 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x00127d80 LAB_0012b078: JMP 0x0012b0a5 LAB_0012b07a: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x8000 CMP RAX,0x0 JZ 0x0012b0a3 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012b770 CMP EAX,0x0 JZ 0x0012b0a3 MOV dword ptr [RBP + -0x1c],0xffffffff LAB_0012b0a3: JMP 0x0012b0a5 LAB_0012b0a5: JMP 0x0012b0a7 LAB_0012b0a7: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int4 my_symlink(char *param_1,char *param_2,ulong param_3) { int iVar1; int *piVar2; int4 local_24; local_24 = 0; iVar1 = symlink(param_1,param_2); if (iVar1 == 0) { if (((param_3 & 0x8000) != 0) && (iVar1 = my_sync_dir_by_file(param_2,param_3), iVar1 != 0)) { local_24 = 0xffffffff; } } else { local_24 = 0xffffffff; piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((param_3 & 0x10) != 0) { piVar2 = __errno_location(); my_error(0x19,0,param_2,param_1,*piVar2); } } return local_24; }
47,958
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x1203ae movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1203b6 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x2a090 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x1204a0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x1203f3 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0x1203f5 jmp 0x1203f7 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x120409 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x12040b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x11aa60 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x12048f movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x12048f movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x120640 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_1203AE mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_1203B6 loc_1203AE: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_1203B6: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_1203F3 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_1203F3: jmp short $+2 loc_1203F5: jmp short $+2 loc_1203F7: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_120409 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_120409: jmp short $+2 loc_12040B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_12048F mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_12048F mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, [rbp+var_38] mov rdx, [rbp+var_48] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_3 mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_12048F: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { my_ci_fill_3(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176)); return a3; } return v11; }
47,959
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O3
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %r12d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpq %r9, %rdx cmovbq %rdx, %r13 movq %rsi, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x29080 movq %r14, %rdi movq %r13, %rsi callq 0xb8e3b movl %r12d, %r8d cmpq %rbx, %r8 cmovaeq %rbx, %r8 cmpq %r8, %r13 cmovaeq %r8, %r13 leaq (%r14,%r13), %rdx leaq (%r14,%r8), %rcx subl %r13d, %r8d movl $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl 0x10(%rbp), %r12d movl %r12d, %r9d callq 0xb5ba4 testb %r12b, %r12b jns 0xb8e2c movq %rbx, %rdx subq %rax, %rdx jbe 0xb8e2c addq %rax, %r14 movzbl 0xb0(%r15), %ecx movq 0xb8(%r15), %rax movq %r15, %rdi movq %r14, %rsi callq *0x78(%rax) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_tis620: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov r12d, ecx mov rbx, rdx mov r14, rsi mov r15, rdi cmp rdx, r9 cmovb r13, rdx mov rdi, rsi mov rsi, r8 mov rdx, r13 call _memcpy mov rdi, r14 mov rsi, r13 call thai2sortable mov r8d, r12d cmp r8, rbx cmovnb r8, rbx cmp r13, r8 cmovnb r13, r8 lea rdx, [r14+r13] lea rcx, [r14+r8] sub r8d, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r14 mov r12d, [rbp+arg_0] mov r9d, r12d call my_strxfrm_pad_desc_and_reverse test r12b, r12b jns short loc_B8E2C mov rdx, rbx sub rdx, rax jbe short loc_B8E2C add r14, rax movzx ecx, byte ptr [r15+0B0h] mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r14 call qword ptr [rax+78h] mov rax, rbx loc_B8E2C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v7; // r13 unsigned long long v10; // r8 unsigned long long result; // rax v7 = a6; if ( a3 < a6 ) v7 = a3; memcpy(a2, a5, v7); thai2sortable(a2, v7); v10 = a4; if ( a4 >= a3 ) v10 = a3; if ( v7 >= v10 ) v7 = v10; result = my_strxfrm_pad_desc_and_reverse(a1, a2, a2 + v7, a2 + v10, (int)v10 - (int)v7, a7, 0); if ( (a7 & 0x80u) != 0 && a3 > result ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, result + a2, a3 - result, *(unsigned __int8 *)(a1 + 176)); return a3; } return result; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV R12D,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP RDX,R9 CMOVC R13,RDX MOV RDI,RSI MOV RSI,R8 MOV RDX,R13 CALL 0x00129080 MOV RDI,R14 MOV RSI,R13 CALL 0x001b8e3b MOV R8D,R12D CMP R8,RBX CMOVNC R8,RBX CMP R13,R8 CMOVNC R13,R8 LEA RDX,[R14 + R13*0x1] LEA RCX,[R14 + R8*0x1] SUB R8D,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R14 MOV R12D,dword ptr [RBP + 0x10] MOV R9D,R12D CALL 0x001b5ba4 TEST R12B,R12B JNS 0x001b8e2c MOV RDX,RBX SUB RDX,RAX JBE 0x001b8e2c ADD R14,RAX MOVZX ECX,byte ptr [R15 + 0xb0] MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV RAX,RBX LAB_001b8e2c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; ulong uVar1; uint uVar2; uVar2 = (uint)((ulong)in_RAX >> 0x20); if (param_3 < param_6) { param_6 = param_3; } memcpy(param_2,param_5,param_6); thai2sortable(param_2,param_6); uVar1 = (ulong)param_4; if (param_3 <= param_4) { uVar1 = param_3; } if (uVar1 <= param_6) { param_6 = uVar1; } uVar1 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1, (int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20); if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,(long)param_2 + uVar1,param_3 - uVar1,*(int1 *)(param_1 + 0xb0)); uVar1 = param_3; } return uVar1; }
47,960
Condition_information::aggregate(THD*, Diagnostics_area const*)
eloqsql/sql/sql_get_diagnostics.cc
bool Condition_information::aggregate(THD *thd, const Diagnostics_area *da) { bool rv= false; longlong cond_number; const Sql_condition *cond= NULL; Condition_information_item *cond_info_item; Diagnostics_area::Sql_condition_iterator it_conds= da->sql_conditions(); List_iterator_fast<Condition_information_item> it_items(*m_items); DBUG_ENTER("Condition_information::aggregate"); /* Prepare the expression for evaluation. */ if (m_cond_number_expr->fix_fields_if_needed(thd, &m_cond_number_expr)) DBUG_RETURN(true); cond_number= m_cond_number_expr->val_int(); /* Limit to the number of available conditions. Warning_info::warn_count() is not used because it indicates the number of condition regardless of @@max_error_count, which prevents conditions from being pushed, but not counted. */ if (cond_number < 1 || (ulonglong) cond_number > da->cond_count()) { my_error(ER_DA_INVALID_CONDITION_NUMBER, MYF(0)); DBUG_RETURN(true); } /* Advance to the requested condition. */ while (cond_number--) cond= it_conds++; DBUG_ASSERT(cond); /* Evaluate the requested information in the context of the condition. */ while ((cond_info_item= it_items++)) { if ((rv= evaluate(thd, cond_info_item, cond))) break; } DBUG_RETURN(rv); }
O0
cpp
Condition_information::aggregate(THD*, Diagnostics_area const*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movb $0x0, -0x21(%rbp) movq $0x0, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x4d8930 movq %rax, %rcx movq -0x78(%rbp), %rax movq %rcx, -0x50(%rbp) movq %rdx, -0x48(%rbp) movq 0x18(%rax), %rsi leaq -0x70(%rbp), %rdi callq 0xa879a0 movq -0x78(%rbp), %rdx movq 0x10(%rdx), %rdi movq -0x18(%rbp), %rsi addq $0x10, %rdx callq 0x4c2470 testb $0x1, %al jne 0xa871cb jmp 0xa871d6 jmp 0xa871cd movb $0x1, -0x1(%rbp) jmp 0xa8729a movq -0x78(%rbp), %rax movq 0x10(%rax), %rdi movq (%rdi), %rax callq *0xf0(%rax) movq %rax, -0x30(%rbp) cmpq $0x1, -0x30(%rbp) jl 0xa87210 movq -0x30(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x20(%rbp), %rdi callq 0xa87970 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx cmpq %rcx, %rax jbe 0xa87226 movl $0x6de, %edi # imm = 0x6DE xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0xc12b50 movb $0x1, -0x1(%rbp) jmp 0xa8729a jmp 0xa87228 movq -0x30(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x30(%rbp) cmpq $0x0, %rax je 0xa8724e leaq -0x50(%rbp), %rdi xorl %esi, %esi callq 0x4d8970 movq %rax, -0x38(%rbp) jmp 0xa87228 jmp 0xa87250 jmp 0xa87252 jmp 0xa87254 leaq -0x70(%rbp), %rdi xorl %esi, %esi callq 0xa879d0 movq %rax, -0x40(%rbp) cmpq $0x0, %rax je 0xa87290 movq -0x78(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rcx callq 0xa879f0 movb %al, %cl andb $0x1, %cl movb %cl, -0x21(%rbp) testb $0x1, %al jne 0xa8728c jmp 0xa8728e jmp 0xa87290 jmp 0xa87254 jmp 0xa87292 movb -0x21(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN21Condition_information9aggregateEP3THDPK16Diagnostics_area: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_78], rax mov [rbp+var_21], 0 mov [rbp+var_38], 0 mov rdi, [rbp+var_20]; this call _ZNK16Diagnostics_area14sql_conditionsEv; Diagnostics_area::sql_conditions(void) mov rcx, rax mov rax, [rbp+var_78] mov [rbp+var_50], rcx mov [rbp+var_48], rdx mov rsi, [rax+18h] lea rdi, [rbp+var_70] call _ZN18List_iterator_fastI26Condition_information_itemEC2ER4ListIS0_E; List_iterator_fast<Condition_information_item>::List_iterator_fast(List<Condition_information_item> &) mov rdx, [rbp+var_78] mov rdi, [rdx+10h]; this mov rsi, [rbp+var_18]; THD * add rdx, 10h; Item ** call _ZN4Item20fix_fields_if_neededEP3THDPPS_; Item::fix_fields_if_needed(THD *,Item**) test al, 1 jnz short loc_A871CB jmp short loc_A871D6 loc_A871CB: jmp short $+2 loc_A871CD: mov [rbp+var_1], 1 jmp loc_A8729A loc_A871D6: mov rax, [rbp+var_78] mov rdi, [rax+10h] mov rax, [rdi] call qword ptr [rax+0F0h] mov [rbp+var_30], rax cmp [rbp+var_30], 1 jl short loc_A87210 mov rax, [rbp+var_30] mov [rbp+var_80], rax mov rdi, [rbp+var_20]; this call _ZNK16Diagnostics_area10cond_countEv; Diagnostics_area::cond_count(void) mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx cmp rax, rcx jbe short loc_A87226 loc_A87210: mov edi, 6DEh xor eax, eax mov esi, eax mov al, 0 call my_error mov [rbp+var_1], 1 jmp short loc_A8729A loc_A87226: jmp short $+2 loc_A87228: mov rax, [rbp+var_30] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rcx cmp rax, 0 jz short loc_A8724E lea rdi, [rbp+var_50] xor esi, esi call _ZN17I_P_List_iteratorIK13Sql_condition8I_P_ListIS0_16I_P_List_adapterIS0_XadL_ZNS0_10next_in_wiEEEXadL_ZNS0_10prev_in_wiEEEE16I_P_List_counter23I_P_List_fast_push_backIS0_EEEppEi; I_P_List_iterator<Sql_condition const,I_P_List<Sql_condition,I_P_List_adapter<Sql_condition,&Sql_condition::next_in_wi,&Sql_condition::prev_in_wi>,I_P_List_counter,I_P_List_fast_push_back<Sql_condition>>>::operator++(int) mov [rbp+var_38], rax jmp short loc_A87228 loc_A8724E: jmp short $+2 loc_A87250: jmp short $+2 loc_A87252: jmp short $+2 loc_A87254: lea rdi, [rbp+var_70] xor esi, esi call _ZN18List_iterator_fastI26Condition_information_itemEppEi; List_iterator_fast<Condition_information_item>::operator++(int) mov [rbp+var_40], rax cmp rax, 0 jz short loc_A87290 mov rdi, [rbp+var_78] mov rsi, [rbp+var_18] mov rdx, [rbp+var_40] mov rcx, [rbp+var_38] call _ZN23Diagnostics_information8evaluateI26Condition_information_itemPK13Sql_conditionEEbP3THDPT_T0_; Diagnostics_information::evaluate<Condition_information_item,Sql_condition const*>(THD *,Condition_information_item *,Sql_condition const*) mov cl, al and cl, 1 mov [rbp+var_21], cl test al, 1 jnz short loc_A8728C jmp short loc_A8728E loc_A8728C: jmp short loc_A87290 loc_A8728E: jmp short loc_A87254 loc_A87290: jmp short $+2 loc_A87292: mov al, [rbp+var_21] and al, 1 mov [rbp+var_1], al loc_A8729A: mov al, [rbp+var_1] and al, 1 add rsp, 80h pop rbp retn
char Condition_information::aggregate(Item **this, THD *a2, const Diagnostics_area *a3) { long long v3; // rdx int v4; // edx unsigned int v5; // ecx int v6; // r8d int v7; // r9d unsigned long long v10; // [rsp+0h] [rbp-80h] _BYTE v11[32]; // [rsp+10h] [rbp-70h] BYREF _QWORD v12[2]; // [rsp+30h] [rbp-50h] BYREF long long v13; // [rsp+40h] [rbp-40h] long long v14; // [rsp+48h] [rbp-38h] long long v15; // [rsp+50h] [rbp-30h] char v16; // [rsp+5Fh] [rbp-21h] Diagnostics_area *v17; // [rsp+60h] [rbp-20h] THD *v18; // [rsp+68h] [rbp-18h] Condition_information *v19; // [rsp+70h] [rbp-10h] v19 = (Condition_information *)this; v18 = a2; v17 = a3; v16 = 0; v14 = 0LL; v12[0] = Diagnostics_area::sql_conditions(a3); v12[1] = v3; List_iterator_fast<Condition_information_item>::List_iterator_fast(v11, this[3]); if ( (Item::fix_fields_if_needed(this[2], v18, this + 2) & 1) != 0 ) return 1; v15 = (*(long long ( **)(Item *))(*(_QWORD *)this[2] + 240LL))(this[2]); if ( v15 >= 1 && (v10 = v15, v5 = Diagnostics_area::cond_count(v17), v10 <= v5) ) { while ( v15-- ) v14 = I_P_List_iterator<Sql_condition const,I_P_List<Sql_condition,I_P_List_adapter<Sql_condition,&Sql_condition::next_in_wi,&Sql_condition::prev_in_wi>,I_P_List_counter,I_P_List_fast_push_back<Sql_condition>>>::operator++((long long)v12); do { v13 = List_iterator_fast<Condition_information_item>::operator++(v11, 0LL); if ( !v13 ) break; v16 = Diagnostics_information::evaluate<Condition_information_item,Sql_condition const*>(this, v18, v13, v14) & 1; } while ( !v16 ); return v16 & 1; } else { my_error(1758, 0, v4, v5, v6, v7); return 1; } }
~Item_func_spatial_precise_rel: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,-0xa8 POP RBP JMP 0x00a87080
/* non-virtual thunk to Item_func_spatial_precise_rel::~Item_func_spatial_precise_rel() */ void __thiscall Item_func_spatial_precise_rel::~Item_func_spatial_precise_rel(Item_func_spatial_precise_rel *this) { ~Item_func_spatial_precise_rel(this + -0xa8); return; }
47,961
spdlog::details::log_msg_buffer::~log_msg_buffer()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/log_msg_buffer.h
class SPDLOG_API log_msg_buffer : public log_msg { memory_buf_t buffer; void update_string_views(); public: log_msg_buffer() = default; explicit log_msg_buffer(const log_msg &orig_msg); log_msg_buffer(const log_msg_buffer &other); log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; log_msg_buffer &operator=(const log_msg_buffer &other); log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; }
O0
c
spdlog::details::log_msg_buffer::~log_msg_buffer(): pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi addq $0x60, %rdi callq 0x23b60 popq %rax retq nopw %cs:(%rax,%rax) nop
_ZN6spdlog7details14log_msg_bufferD2Ev: push rax mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8] add rdi, 60h ; '`' call _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer() pop rax retn
void spdlog::details::log_msg_buffer::~log_msg_buffer(spdlog::details::log_msg_buffer *this, long long a2) { fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer((long long)this + 96, a2); }
~log_msg_buffer: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] ADD RDI,0x60 CALL 0x00123b60 POP RAX RET
/* spdlog::details::log_msg_buffer::~log_msg_buffer() */ log_msg_buffer * __thiscall spdlog::details::log_msg_buffer::~log_msg_buffer(log_msg_buffer *this) { fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer ((basic_memory_buffer<char,250ul,std::allocator<char>> *)(this + 0x60)); return this; }
47,962
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*)
eloqsql/mysys/lf_hash.cc
static int l_delete(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr, const uchar *key, uint keylen, LF_PINS *pins) { CURSOR cursor; int res; for (;;) { if (!l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0)) { res= 1; /* not found */ break; } else { /* mark the node deleted */ if (my_atomic_casptr((void **) (char*) &(cursor.curr->link), (void **) (char*) &cursor.next, (void *)(((intptr)cursor.next) | 1))) { /* and remove it from the list */ if (my_atomic_casptr((void **)cursor.prev, (void **)(char*)&cursor.curr, cursor.next)) lf_alloc_free(pins, cursor.curr); else { /* somebody already "helped" us and removed the node ? Let's check if we need to help that someone too! (to ensure the number of "set DELETED flag" actions is equal to the number of "remove from the list" actions) */ l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0); } res= 0; break; } } } lf_unpin(pins, 0); lf_unpin(pins, 1); lf_unpin(pins, 2); return res; }
O0
cpp
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*): pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d movq -0x30(%rbp), %rax leaq -0x48(%rbp), %r9 xorl %r10d, %r10d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) callq 0xfe180 cmpl $0x0, %eax jne 0xfdcf5 movl $0x1, -0x4c(%rbp) jmp 0xfde08 leaq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax orq $0x1, %rax movq %rax, -0x58(%rbp) movq -0x38(%rbp), %rax movq -0x58(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0x91(%rbp) movq %rcx, -0x90(%rbp) testb $0x1, %al jne 0xfdd45 movq -0xa0(%rbp), %rax movq -0x90(%rbp), %rcx movq %rcx, (%rax) movb -0x91(%rbp), %al andb $0x1, %al movb %al, -0x59(%rbp) testb $0x1, -0x59(%rbp) je 0xfde01 leaq -0x40(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x48(%rbp), %rcx movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rax movq -0x68(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0xa9(%rbp) movq %rcx, -0xa8(%rbp) testb $0x1, %al jne 0xfdda6 movq -0xb8(%rbp), %rax movq -0xa8(%rbp), %rcx movq %rcx, (%rax) movb -0xa9(%rbp), %al andb $0x1, %al movb %al, -0x69(%rbp) testb $0x1, -0x69(%rbp) je 0xfddc6 movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0xfc710 jmp 0xfddf8 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d movq -0x30(%rbp), %rax leaq -0x48(%rbp), %r9 xorl %r10d, %r10d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) callq 0xfe180 movl $0x0, -0x4c(%rbp) jmp 0xfde08 jmp 0xfde03 jmp 0xfdcb2 jmp 0xfde0a jmp 0xfde0c jmp 0xfde0e movq -0x30(%rbp), %rcx movq $0x0, -0x78(%rbp) movq -0x78(%rbp), %rax xchgq %rax, (%rcx) jmp 0xfde23 jmp 0xfde25 jmp 0xfde27 movq -0x30(%rbp), %rcx movq $0x0, -0x80(%rbp) movq -0x80(%rbp), %rax xchgq %rax, 0x8(%rcx) jmp 0xfde3d jmp 0xfde3f jmp 0xfde41 movq -0x30(%rbp), %rcx movq $0x0, -0x88(%rbp) movq -0x88(%rbp), %rax xchgq %rax, 0x10(%rcx) movl -0x4c(%rbp), %eax addq $0xd0, %rsp popq %rbp retq nopw (%rax,%rax)
_ZL8l_deletePP8LF_SLISTPK15charset_info_stjPKhjP7LF_PINS: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 loc_FDCB2: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax mov rax, [rbp+var_30] lea r9, [rbp+var_48] xor r10d, r10d mov [rsp+0D0h+var_D0], rax mov [rsp+0D0h+var_C8], 0 call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *)) cmp eax, 0 jnz short loc_FDCF5 mov [rbp+var_4C], 1 jmp loc_FDE08 loc_FDCF5: lea rax, [rbp+var_38] mov [rbp+var_A0], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_38] or rax, 1 mov [rbp+var_58], rax mov rax, [rbp+var_38] mov rdx, [rbp+var_58] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_91], al mov [rbp+var_90], rcx test al, 1 jnz short loc_FDD45 mov rax, [rbp+var_A0] mov rcx, [rbp+var_90] mov [rax], rcx loc_FDD45: mov al, [rbp+var_91] and al, 1 mov [rbp+var_59], al test [rbp+var_59], 1 jz loc_FDE01 lea rax, [rbp+var_40] mov [rbp+var_B8], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, [rbp+var_40] mov rdx, [rbp+var_68] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_A9], al mov [rbp+var_A8], rcx test al, 1 jnz short loc_FDDA6 mov rax, [rbp+var_B8] mov rcx, [rbp+var_A8] mov [rax], rcx loc_FDDA6: mov al, [rbp+var_A9] and al, 1 mov [rbp+var_69], al test [rbp+var_69], 1 jz short loc_FDDC6 mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] call lf_pinbox_free jmp short loc_FDDF8 loc_FDDC6: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax mov rax, [rbp+var_30] lea r9, [rbp+var_48] xor r10d, r10d mov [rsp+0D0h+var_D0], rax mov [rsp+0D0h+var_C8], 0 call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *)) loc_FDDF8: mov [rbp+var_4C], 0 jmp short loc_FDE08 loc_FDE01: jmp short $+2 loc_FDE03: jmp loc_FDCB2 loc_FDE08: jmp short $+2 loc_FDE0A: jmp short $+2 loc_FDE0C: jmp short $+2 loc_FDE0E: mov rcx, [rbp+var_30] mov [rbp+var_78], 0 mov rax, [rbp+var_78] xchg rax, [rcx] jmp short $+2 loc_FDE23: jmp short $+2 loc_FDE25: jmp short $+2 loc_FDE27: mov rcx, [rbp+var_30] mov [rbp+var_80], 0 mov rax, [rbp+var_80] xchg rax, [rcx+8] jmp short $+2 loc_FDE3D: jmp short $+2 loc_FDE3F: jmp short $+2 loc_FDE41: mov rcx, [rbp+var_30] mov [rbp+var_88], 0 mov rax, [rbp+var_88] xchg rax, [rcx+10h] mov eax, [rbp+var_4C] add rsp, 0D0h pop rbp retn
long long l_delete(long long a1, long long a2, int a3, long long a4, int a5, volatile long long *a6) { signed long long v6; // rax signed long long v7; // rtt char *v8; // rtt const char *v9; // rcx bool v11; // [rsp+27h] [rbp-A9h] bool v12; // [rsp+3Fh] [rbp-91h] unsigned int v13; // [rsp+84h] [rbp-4Ch] volatile signed long long *v14; // [rsp+88h] [rbp-48h] BYREF char *v15; // [rsp+90h] [rbp-40h] signed long long v16; // [rsp+98h] [rbp-38h] volatile long long *v17; // [rsp+A0h] [rbp-30h] int v18; // [rsp+ACh] [rbp-24h] long long v19; // [rsp+B0h] [rbp-20h] int v20; // [rsp+BCh] [rbp-14h] long long v21; // [rsp+C0h] [rbp-10h] long long v22; // [rsp+C8h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; do { if ( !(unsigned int)l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL) ) { v13 = 1; goto LABEL_14; } v7 = v16; v6 = _InterlockedCompareExchange64((volatile signed long long *)v15, v16 | 1, v16); v12 = v7 == v6; if ( v7 != v6 ) v16 = v6; } while ( !v12 ); v8 = v15; v9 = (const char *)_InterlockedCompareExchange64(v14, v16, (signed long long)v15); v11 = v8 == v9; if ( v8 != v9 ) v15 = (char *)v9; if ( v11 ) lf_pinbox_free((long long)v17, v15); else l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL); v13 = 0; LABEL_14: _InterlockedExchange64(v17, 0LL); _InterlockedExchange64(v17 + 1, 0LL); _InterlockedExchange64(v17 + 2, 0LL); return v13; }
l_delete: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LAB_001fdcb2: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x30] LEA R9,[RBP + -0x48] XOR R10D,R10D MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 CALL 0x001fe180 CMP EAX,0x0 JNZ 0x001fdcf5 MOV dword ptr [RBP + -0x4c],0x1 JMP 0x001fde08 LAB_001fdcf5: LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] OR RAX,0x1 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x58] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x91],AL MOV qword ptr [RBP + -0x90],RCX TEST AL,0x1 JNZ 0x001fdd45 MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x90] MOV qword ptr [RAX],RCX LAB_001fdd45: MOV AL,byte ptr [RBP + -0x91] AND AL,0x1 MOV byte ptr [RBP + -0x59],AL TEST byte ptr [RBP + -0x59],0x1 JZ 0x001fde01 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0xb8],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x68] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0xa9],AL MOV qword ptr [RBP + -0xa8],RCX TEST AL,0x1 JNZ 0x001fdda6 MOV RAX,qword ptr [RBP + -0xb8] MOV RCX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX],RCX LAB_001fdda6: MOV AL,byte ptr [RBP + -0xa9] AND AL,0x1 MOV byte ptr [RBP + -0x69],AL TEST byte ptr [RBP + -0x69],0x1 JZ 0x001fddc6 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] CALL 0x001fc710 JMP 0x001fddf8 LAB_001fddc6: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x30] LEA R9,[RBP + -0x48] XOR R10D,R10D MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 CALL 0x001fe180 LAB_001fddf8: MOV dword ptr [RBP + -0x4c],0x0 JMP 0x001fde08 LAB_001fde01: JMP 0x001fde03 LAB_001fde03: JMP 0x001fdcb2 LAB_001fde08: JMP 0x001fde0a LAB_001fde0a: JMP 0x001fde0c LAB_001fde0c: JMP 0x001fde0e LAB_001fde0e: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x78],0x0 MOV RAX,qword ptr [RBP + -0x78] XCHG qword ptr [RCX],RAX JMP 0x001fde23 LAB_001fde23: JMP 0x001fde25 LAB_001fde25: JMP 0x001fde27 LAB_001fde27: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x80],0x0 MOV RAX,qword ptr [RBP + -0x80] XCHG qword ptr [RCX + 0x8],RAX JMP 0x001fde3d LAB_001fde3d: JMP 0x001fde3f LAB_001fde3f: JMP 0x001fde41 LAB_001fde41: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x88],0x0 MOV RAX,qword ptr [RBP + -0x88] XCHG qword ptr [RCX + 0x10],RAX MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0xd0 POP RBP RET
/* l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*) */ int4 l_delete(LF_SLIST **param_1,charset_info_st *param_2,uint param_3,uchar *param_4,uint param_5, LF_PINS *param_6) { ulong *puVar1; int iVar2; ulong uVar3; bool bVar4; int4 local_54; ulong *local_50; ulong *local_48; ulong local_40; LF_PINS *local_38; uint local_2c; uchar *local_28; uint local_1c; charset_info_st *local_18; LF_SLIST **local_10; uVar3 = local_40; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; do { local_40 = uVar3; iVar2 = l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38, (_func_char_void_ptr_void_ptr *)0x0); if (iVar2 == 0) { local_54 = 1; goto LAB_001fde08; } LOCK(); uVar3 = *local_48; bVar4 = local_40 == uVar3; if (bVar4) { *local_48 = local_40 | 1; uVar3 = local_40; } UNLOCK(); } while (!bVar4); LOCK(); puVar1 = (ulong *)*local_50; if (local_48 == puVar1) { *local_50 = local_40; } UNLOCK(); if (local_48 == puVar1) { lf_pinbox_free(local_38,local_48); } else { l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38, (_func_char_void_ptr_void_ptr *)0x0); } local_54 = 0; LAB_001fde08: LOCK(); *(int8 *)local_38 = 0; UNLOCK(); LOCK(); *(int8 *)(local_38 + 8) = 0; UNLOCK(); LOCK(); *(int8 *)(local_38 + 0x10) = 0; UNLOCK(); return local_54; }
47,963
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
llama.cpp/common/chat.cpp
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) { auto content_end = input.find(prefix); size_t tc_start = std::string::npos; common_chat_msg result; result.role = "assistant"; if (content_end == std::string::npos) { result.content = input; } else { tc_start = content_end + prefix.size() - rstrip_prefix; result.content = input.substr(0, content_end); auto tool_calls = json::parse(input.substr(tc_start)); for (const auto & tool_call : tool_calls) { result.tool_calls.emplace_back(process_tool_call(tool_call)); } } return result; }
O3
cpp
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbp movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %ebx, %ebx movq %r14, %rdi xorl %edx, %edx callq 0x205a0 movq %rax, %r15 leaq 0x10(%rbp), %rax movq %rax, (%rbp) movq %rbx, 0x8(%rbp) movb %bl, 0x10(%rbp) leaq 0x30(%rbp), %rax movq %rax, 0x20(%rbp) movq %rbx, 0x28(%rbp) movb %bl, 0x30(%rbp) leaq 0x80(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbp) movups %xmm0, 0x50(%rbp) movups %xmm0, 0x60(%rbp) movq %rax, 0x70(%rbp) movq %rbx, 0x78(%rbp) movb %bl, 0x80(%rbp) leaq 0xa0(%rbp), %rax movq %rax, 0x90(%rbp) movq %rbx, 0x98(%rbp) movb %bl, 0xa0(%rbp) leaq 0xc0(%rbp), %rax movq %rax, 0xb0(%rbp) movq %rbx, 0xb8(%rbp) movb %bl, 0xc0(%rbp) movq %rbp, %rbx leaq 0x731f3(%rip), %rcx # 0x11f0e3 movl $0x9, %r8d movq %rbp, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x20830 leaq 0x20(%rbx), %rbp cmpq $-0x1, %r15 je 0xac0d7 movq %rbx, 0x8(%rsp) movq 0x8(%r13), %rbx leaq 0x10(%rsp), %rdi movq %r14, %rsi xorl %edx, %edx movq %r15, %rcx callq 0x21080 subq %r12, %r15 addq %rbx, %r15 leaq 0x10(%rsp), %r12 movq %rbp, %rdi movq %r12, %rsi callq 0x20890 movq (%r12), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xabf5c movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 leaq 0x10(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx movq $-0x1, %rcx callq 0x21080 xorps %xmm0, %xmm0 leaq 0x80(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x70(%rsp), %r12 leaq 0x10(%rsp), %rsi movq %r12, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0xb7086 movq 0x90(%rsp), %rax testq %rax, %rax je 0xabfbe leaq 0x80(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xabfda movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 leaq 0xc8(%rsp), %r14 movq %r12, (%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r14) movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000 movq %rbx, 0x18(%r14) movq %r14, %rdi callq 0x8a9ec leaq 0xa8(%rsp), %r15 movq %r12, (%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r15) movq %rbx, 0x18(%r15) movq %r15, %rdi callq 0x8ad3e movq 0x8(%rsp), %rax leaq 0x58(%rax), %r12 leaq 0x60(%rsp), %rbp leaq 0x40(%rsp), %rbx leaq 0x10(%rsp), %r13 movq %r14, %rdi movq %r15, %rsi callq 0x8aa5e testb %al, %al jne 0xac0be movq %r14, %rdi callq 0xb67b4 movq %r13, %rdi movq %rax, %rsi callq 0xac18b movq %r12, %rdi movq %r13, %rsi callq 0xcf7ca movq 0x50(%rsp), %rdi cmpq %rbp, %rdi je 0xac07e movq 0x60(%rsp), %rsi incq %rsi callq 0x20170 movq 0x30(%rsp), %rdi cmpq %rbx, %rdi je 0xac095 movq 0x40(%rsp), %rsi incq %rsi callq 0x20170 movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xac0b1 movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 movq %r14, %rdi callq 0x89f96 jmp 0xac03a leaq 0x70(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x858ca movq %rbx, %rdi callq 0x89fe4 jmp 0xac0e2 movq %rbp, %rdi movq %r14, %rsi callq 0x21280 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xac136 movq %rax, %r14 movq 0x90(%rsp), %rax testq %rax, %rax je 0xac118 leaq 0x80(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0xac179 movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xac179 movq %rax, %rdi callq 0x27b48 jmp 0xac147 jmp 0xac147 movq %rbx, 0x8(%rsp) movq %rax, %r14 jmp 0xac179 jmp 0xac15f movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xb1370 jmp 0xac162 jmp 0xac15f movq %rax, %r14 leaq 0x70(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x858ca movq %r15, %rdi callq 0x89fe4 movq 0x8(%rsp), %rdi callq 0xb183a movq %r14, %rdi callq 0x20ad0
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r12, rcx mov r13, rdx mov r14, rsi mov rbp, rdi mov rsi, [rdx] mov rcx, [rdx+8] xor ebx, ebx mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r15, rax lea rax, [rbp+10h] mov [rbp+0], rax mov [rbp+8], rbx mov [rbp+10h], bl lea rax, [rbp+30h] mov [rbp+20h], rax mov [rbp+28h], rbx mov [rbp+30h], bl lea rax, [rbp+80h] xorps xmm0, xmm0 movups xmmword ptr [rbp+40h], xmm0 movups xmmword ptr [rbp+50h], xmm0 movups xmmword ptr [rbp+60h], xmm0 mov [rbp+70h], rax mov [rbp+78h], rbx mov [rbp+80h], bl lea rax, [rbp+0A0h] mov [rbp+90h], rax mov [rbp+98h], rbx mov [rbp+0A0h], bl lea rax, [rbp+0C0h] mov [rbp+0B0h], rax mov [rbp+0B8h], rbx mov [rbp+0C0h], bl mov rbx, rbp lea rcx, aYouAreAHelpful+12h; "assistant" mov r8d, 9 mov rdi, rbp xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea rbp, [rbx+20h] cmp r15, 0FFFFFFFFFFFFFFFFh jz loc_AC0D7 mov [rsp+118h+var_110], rbx mov rbx, [r13+8] lea rdi, [rsp+118h+var_108] mov rsi, r14 xor edx, edx mov rcx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) sub r15, r12 add r15, rbx lea r12, [rsp+118h+var_108] mov rdi, rbp mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea rax, [rsp+118h+var_F8] cmp rdi, rax jz short loc_ABF5C mov rsi, [rsp+118h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABF5C: lea rdi, [rsp+118h+var_108] mov rsi, r14 mov rdx, r15 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) xorps xmm0, xmm0 lea rdx, [rsp+118h+var_98] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea r12, [rsp+118h+var_A8] lea rsi, [rsp+118h+var_108] mov rdi, r12 mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) mov rax, [rsp+118h+var_88] test rax, rax jz short loc_ABFBE lea rdi, [rsp+118h+var_98] mov rsi, rdi mov edx, 3 call rax loc_ABFBE: mov rdi, [rsp+118h+var_108]; void * lea rax, [rsp+118h+var_F8] cmp rdi, rax jz short loc_ABFDA mov rsi, [rsp+118h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABFDA: lea r14, [rsp+118h+var_50] mov [r14], r12 xorps xmm0, xmm0 movups xmmword ptr [r14+8], xmm0 mov rbx, 8000000000000000h mov [r14+18h], rbx mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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>>::set_begin(void) lea r15, [rsp+118h+var_70] mov [r15], r12 xorps xmm0, xmm0 movups xmmword ptr [r15+8], xmm0 mov [r15+18h], rbx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>>::set_end(void) mov rax, [rsp+118h+var_110] lea r12, [rax+58h] lea rbp, [rsp+118h+var_B8] lea rbx, [rsp+118h+var_D8] lea r13, [rsp+118h+var_108] loc_AC03A: mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jnz short loc_AC0BE mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator*(void) mov rdi, r13 mov rsi, rax call _ZL17process_tool_callRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEE; process_tool_call(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, r12 mov rsi, r13 call _ZNSt6vectorI21common_chat_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_chat_tool_call>::emplace_back<common_chat_tool_call>(common_chat_tool_call &&) mov rdi, [rsp+118h+var_C8]; void * cmp rdi, rbp jz short loc_AC07E mov rsi, [rsp+118h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC07E: mov rdi, [rsp+118h+var_E8]; void * cmp rdi, rbx jz short loc_AC095 mov rsi, [rsp+118h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC095: mov rdi, [rsp+118h+var_108]; void * lea rax, [rsp+118h+var_F8] cmp rdi, rax jz short loc_AC0B1 mov rsi, [rsp+118h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC0B1: mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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>>::operator++(void) jmp loc_AC03A loc_AC0BE: lea rbx, [rsp+118h+var_A8] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_AC0E2 loc_AC0D7: mov rdi, rbp mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_AC0E2: add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_AC136 mov r14, rax mov rax, [rsp+118h+var_88] test rax, rax jz short loc_AC118 lea rdi, [rsp+118h+var_98] mov rsi, rdi mov edx, 3 call rax loc_AC118: mov rdi, [rsp+118h+var_108]; void * lea rax, [rsp+118h+var_F8] cmp rdi, rax jz short loc_AC179 mov rsi, [rsp+118h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AC179 loc_AC136: mov rdi, rax call __clang_call_terminate jmp short loc_AC147 jmp short loc_AC147 mov [rsp+118h+var_110], rbx loc_AC147: mov r14, rax jmp short loc_AC179 jmp short loc_AC15F mov r14, rax lea rdi, [rsp+118h+var_108]; this call _ZN21common_chat_tool_callD2Ev; common_chat_tool_call::~common_chat_tool_call() jmp short loc_AC162 jmp short $+2 loc_AC15F: mov r14, rax loc_AC162: lea r15, [rsp+118h+var_A8] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_AC179: mov rdi, [rsp+118h+var_110]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov rdi, r14 call __Unwind_Resume
long long parse_prefixed_json_tool_call_array(long long a1, long long a2, _QWORD *a3, long long a4) { long long v6; // r15 long long v7; // rdx long long v8; // rcx long long v9; // rbx long long v10; // r15 long long v11; // rax void *v13[2]; // [rsp+10h] [rbp-108h] BYREF _QWORD v14[2]; // [rsp+20h] [rbp-F8h] BYREF void *v15; // [rsp+30h] [rbp-E8h] long long v16; // [rsp+40h] [rbp-D8h] BYREF void *v17; // [rsp+50h] [rbp-C8h] long long v18; // [rsp+60h] [rbp-B8h] BYREF char v19[16]; // [rsp+70h] [rbp-A8h] BYREF __int128 v20; // [rsp+80h] [rbp-98h] BYREF __int128 v21; // [rsp+90h] [rbp-88h] char *v22; // [rsp+A8h] [rbp-70h] BYREF __int128 v23; // [rsp+B0h] [rbp-68h] unsigned long long v24; // [rsp+C0h] [rbp-58h] char *v25; // [rsp+C8h] [rbp-50h] BYREF __int128 v26; // [rsp+D0h] [rbp-48h] unsigned long long v27; // [rsp+E0h] [rbp-38h] v6 = std::string::find(a2, *a3, 0LL, a3[1]); *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; *(_QWORD *)(a1 + 32) = a1 + 48; *(_QWORD *)(a1 + 40) = 0LL; *(_BYTE *)(a1 + 48) = 0; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; *(_QWORD *)(a1 + 112) = a1 + 128; *(_QWORD *)(a1 + 120) = 0LL; *(_BYTE *)(a1 + 128) = 0; *(_QWORD *)(a1 + 144) = a1 + 160; *(_QWORD *)(a1 + 152) = 0LL; *(_BYTE *)(a1 + 160) = 0; *(_QWORD *)(a1 + 176) = a1 + 192; *(_QWORD *)(a1 + 184) = 0LL; *(_BYTE *)(a1 + 192) = 0; std::string::_M_replace(a1, 0LL, 0LL, "assistant", 9LL); if ( v6 == -1 ) return std::string::_M_assign(a1 + 32, a2, v7, v8); v9 = a3[1]; std::string::substr(v13, a2, 0LL, v6); v10 = v9 + v6 - a4; std::string::operator=(a1 + 32, v13); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); std::string::substr(v13, a2, v10, -1LL); v21 = 0LL; v20 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>( v19, v13, &v20, 1LL, 0LL); if ( (_QWORD)v21 ) ((void ( *)(__int128 *, __int128 *, long long))v21)(&v20, &v20, 3LL); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); v25 = v19; v26 = 0LL; v27 = 0x8000000000000000LL; 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>>::set_begin((unsigned __int8 **)&v25); v22 = v19; v23 = 0LL; v24 = 0x8000000000000000LL; 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>>::set_end((unsigned __int8 **)&v22); while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v25, &v22) ) { v11 = 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*(&v25); process_tool_call(v13, v11); std::vector<common_chat_tool_call>::emplace_back<common_chat_tool_call>(a1 + 88, v13); if ( v17 != &v18 ) operator delete(v17, v18 + 1); if ( v15 != &v16 ) operator delete(v15, v16 + 1); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); 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++((unsigned __int8 **)&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>::assert_invariant(v19); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); }
parse_prefixed_json_tool_call_array: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBP,RDI MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR EBX,EBX MOV RDI,R14 XOR EDX,EDX CALL 0x001205a0 MOV R15,RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP],RAX MOV qword ptr [RBP + 0x8],RBX MOV byte ptr [RBP + 0x10],BL LEA RAX,[RBP + 0x30] MOV qword ptr [RBP + 0x20],RAX MOV qword ptr [RBP + 0x28],RBX MOV byte ptr [RBP + 0x30],BL LEA RAX,[RBP + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + 0x40],XMM0 MOVUPS xmmword ptr [RBP + 0x50],XMM0 MOVUPS xmmword ptr [RBP + 0x60],XMM0 MOV qword ptr [RBP + 0x70],RAX MOV qword ptr [RBP + 0x78],RBX MOV byte ptr [RBP + 0x80],BL LEA RAX,[RBP + 0xa0] MOV qword ptr [RBP + 0x90],RAX MOV qword ptr [RBP + 0x98],RBX MOV byte ptr [RBP + 0xa0],BL LEA RAX,[RBP + 0xc0] MOV qword ptr [RBP + 0xb0],RAX MOV qword ptr [RBP + 0xb8],RBX MOV byte ptr [RBP + 0xc0],BL MOV RBX,RBP LAB_001abee9: LEA RCX,[0x21f0e3] MOV R8D,0x9 MOV RDI,RBP XOR ESI,ESI XOR EDX,EDX CALL 0x00120830 LEA RBP,[RBX + 0x20] CMP R15,-0x1 JZ 0x001ac0d7 MOV qword ptr [RSP + 0x8],RBX MOV RBX,qword ptr [R13 + 0x8] LAB_001abf19: LEA RDI,[RSP + 0x10] MOV RSI,R14 XOR EDX,EDX MOV RCX,R15 CALL 0x00121080 SUB R15,R12 ADD R15,RBX LEA R12,[RSP + 0x10] MOV RDI,RBP MOV RSI,R12 CALL 0x00120890 MOV RDI,qword ptr [R12] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x001abf5c MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120170 LAB_001abf5c: LEA RDI,[RSP + 0x10] MOV RSI,R14 MOV RDX,R15 MOV RCX,-0x1 CALL 0x00121080 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x80] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_001abf85: LEA R12,[RSP + 0x70] LEA RSI,[RSP + 0x10] MOV RDI,R12 MOV ECX,0x1 XOR R8D,R8D CALL 0x001b7086 MOV RAX,qword ptr [RSP + 0x90] TEST RAX,RAX JZ 0x001abfbe LAB_001abfac: LEA RDI,[RSP + 0x80] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001abfbe: MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x001abfda MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120170 LAB_001abfda: LEA R14,[RSP + 0xc8] MOV qword ptr [R14],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x8],XMM0 MOV RBX,-0x8000000000000000 MOV qword ptr [R14 + 0x18],RBX MOV RDI,R14 CALL 0x0018a9ec LEA R15,[RSP + 0xa8] MOV qword ptr [R15],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x8],XMM0 MOV qword ptr [R15 + 0x18],RBX MOV RDI,R15 CALL 0x0018ad3e MOV RAX,qword ptr [RSP + 0x8] LEA R12,[RAX + 0x58] LEA RBP,[RSP + 0x60] LEA RBX,[RSP + 0x40] LEA R13,[RSP + 0x10] LAB_001ac03a: MOV RDI,R14 MOV RSI,R15 CALL 0x0018aa5e TEST AL,AL JNZ 0x001ac0be LAB_001ac049: MOV RDI,R14 CALL 0x001b67b4 LAB_001ac051: MOV RDI,R13 MOV RSI,RAX CALL 0x001ac18b LAB_001ac05c: MOV RDI,R12 MOV RSI,R13 CALL 0x001cf7ca MOV RDI,qword ptr [RSP + 0x50] CMP RDI,RBP JZ 0x001ac07e MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x00120170 LAB_001ac07e: MOV RDI,qword ptr [RSP + 0x30] CMP RDI,RBX JZ 0x001ac095 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x00120170 LAB_001ac095: MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x001ac0b1 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120170 LAB_001ac0b1: MOV RDI,R14 CALL 0x00189f96 JMP 0x001ac03a LAB_001ac0be: LEA RBX,[RSP + 0x70] MOV RDI,RBX XOR ESI,ESI CALL 0x001858ca MOV RDI,RBX CALL 0x00189fe4 JMP 0x001ac0e2 LAB_001ac0d7: MOV RDI,RBP MOV RSI,R14 CALL 0x00121280 LAB_001ac0e2: ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&, unsigned long) */ void parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3) { char cVar1; long lVar2; long *local_108 [2]; long local_f8 [2]; long *local_e8; long local_d8 [2]; long *local_c8; long local_b8 [2]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_a8 [16]; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_70; int8 local_68; int8 uStack_60; int8 local_58; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_50; int8 local_48; int8 uStack_40; int8 local_38; lVar2 = std::__cxx11::string::find((char *)param_2,*(ulong *)param_3,0); *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; *(string **)(param_1 + 0x20) = param_1 + 0x30; *(int8 *)(param_1 + 0x28) = 0; param_1[0x30] = (string)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(string **)(param_1 + 0x70) = param_1 + 0x80; *(int8 *)(param_1 + 0x78) = 0; param_1[0x80] = (string)0x0; *(string **)(param_1 + 0x90) = param_1 + 0xa0; *(int8 *)(param_1 + 0x98) = 0; param_1[0xa0] = (string)0x0; *(string **)(param_1 + 0xb0) = param_1 + 0xc0; *(int8 *)(param_1 + 0xb8) = 0; param_1[0xc0] = (string)0x0; /* try { // try from 001abee9 to 001abf01 has its CatchHandler @ 001ac142 */ std::__cxx11::string::_M_replace((ulong)param_1,0,(char *)0x0,0x21f0e3); if (lVar2 == -1) { /* try { // try from 001ac0d7 to 001ac0e1 has its CatchHandler @ 001ac142 */ std::__cxx11::string::_M_assign(param_1 + 0x20); } else { /* try { // try from 001abf19 to 001abf2a has its CatchHandler @ 001ac140 */ std::__cxx11::string::substr((ulong)local_108,(ulong)param_2); std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_108); if (local_108[0] != local_f8) { operator_delete(local_108[0],local_f8[0] + 1); } /* try { // try from 001abf5c to 001abf72 has its CatchHandler @ 001ac13e */ std::__cxx11::string::substr((ulong)local_108,(ulong)param_2); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; /* try { // try from 001abf85 to 001abf9e has its CatchHandler @ 001ac0f6 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string>(local_a8,local_108,&local_98,1,0); if (local_88 != (code *)0x0) { /* try { // try from 001abfac to 001abfbd has its CatchHandler @ 001ac0f4 */ (*local_88)(&local_98,&local_98,3); } if (local_108[0] != local_f8) { operator_delete(local_108[0],local_f8[0] + 1); } local_48 = 0; uStack_40 = 0; local_38 = 0x8000000000000000; local_50 = local_a8; 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>> ::set_begin((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>> *)&local_50); local_68 = 0; uStack_60 = 0; local_58 = 0x8000000000000000; local_70 = local_a8; 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>> ::set_end((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>> *)&local_70); while( true ) { /* try { // try from 001ac03a to 001ac044 has its CatchHandler @ 001ac15f */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ ((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>> *)&local_50, (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>> *)&local_70); if (cVar1 != '\0') break; /* try { // try from 001ac049 to 001ac050 has its CatchHandler @ 001ac15d */ 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>> ::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>> *)&local_50); /* try { // try from 001ac051 to 001ac05b has its CatchHandler @ 001ac14c */ process_tool_call((basic_json *)local_108); /* try { // try from 001ac05c to 001ac066 has its CatchHandler @ 001ac14e */ std::vector<common_chat_tool_call,std::allocator<common_chat_tool_call>>:: emplace_back<common_chat_tool_call> ((vector<common_chat_tool_call,std::allocator<common_chat_tool_call>> *) (param_1 + 0x58),(common_chat_tool_call *)local_108); if (local_c8 != local_b8) { operator_delete(local_c8,local_b8[0] + 1); } if (local_e8 != local_d8) { operator_delete(local_e8,local_d8[0] + 1); } if (local_108[0] != local_f8) { operator_delete(local_108[0],local_f8[0] + 1); } /* try { // try from 001ac0b1 to 001ac0b8 has its CatchHandler @ 001ac15f */ 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>> ::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>> *)&local_50); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_a8); } return; }
47,964
vector_f_sub_sse
tsotchke[P]eshkol/src/core/utils/vector.c
static void vector_f_sub_sse(VectorF* result, const VectorF* a, const VectorF* b) { assert(result != NULL); assert(a != NULL); assert(b != NULL); assert(a->dim == b->dim); assert(result->dim >= a->dim); // Use SSE instructions for 4D vectors if (a->dim == 4) { __m128 va = _mm_load_ps(a->data); __m128 vb = _mm_load_ps(b->data); __m128 vr = _mm_sub_ps(va, vb); _mm_store_ps(result->data, vr); } else { // Fall back to generic implementation for other dimensions vector_f_sub_generic(result, a, b); } }
O0
c
vector_f_sub_sse: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) cmpq $0x0, -0x58(%rbp) je 0x56d0 jmp 0x56ef leaq 0x5f4f(%rip), %rdi # 0xb626 leaq 0x607a(%rip), %rsi # 0xb758 movl $0x153, %edx # imm = 0x153 leaq 0x6aa6(%rip), %rcx # 0xc190 callq 0x1090 cmpq $0x0, -0x60(%rbp) je 0x56f8 jmp 0x5717 leaq 0x4ada(%rip), %rdi # 0xa1d9 leaq 0x6052(%rip), %rsi # 0xb758 movl $0x154, %edx # imm = 0x154 leaq 0x6a7e(%rip), %rcx # 0xc190 callq 0x1090 cmpq $0x0, -0x68(%rbp) je 0x5720 jmp 0x573f leaq 0x4d82(%rip), %rdi # 0xa4a9 leaq 0x602a(%rip), %rsi # 0xb758 movl $0x155, %edx # imm = 0x155 leaq 0x6a56(%rip), %rcx # 0xc190 callq 0x1090 movq -0x60(%rbp), %rax movq 0x10(%rax), %rax movq -0x68(%rbp), %rcx cmpq 0x10(%rcx), %rax jne 0x5753 jmp 0x5772 leaq 0x625c(%rip), %rdi # 0xb9b6 leaq 0x5ff7(%rip), %rsi # 0xb758 movl $0x156, %edx # imm = 0x156 leaq 0x6a23(%rip), %rcx # 0xc190 callq 0x1090 movq -0x58(%rbp), %rax movq 0x10(%rax), %rax movq -0x60(%rbp), %rcx cmpq 0x10(%rcx), %rax jb 0x5786 jmp 0x57a5 leaq 0x6963(%rip), %rdi # 0xc0f0 leaq 0x5fc4(%rip), %rsi # 0xb758 movl $0x157, %edx # imm = 0x157 leaq 0x69f0(%rip), %rcx # 0xc190 callq 0x1090 movq -0x60(%rbp), %rax cmpq $0x4, 0x10(%rax) jne 0x581b movq -0x60(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movaps (%rax), %xmm0 movaps %xmm0, -0x80(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movaps (%rax), %xmm0 movaps %xmm0, -0x90(%rbp) movaps -0x80(%rbp), %xmm1 movaps -0x90(%rbp), %xmm0 movaps %xmm1, -0x10(%rbp) movaps %xmm0, -0x20(%rbp) movaps -0x10(%rbp), %xmm0 subps -0x20(%rbp), %xmm0 movaps %xmm0, -0xa0(%rbp) movq -0x58(%rbp), %rax movaps -0xa0(%rbp), %xmm0 movq %rax, -0x28(%rbp) movaps %xmm0, -0x40(%rbp) movaps -0x40(%rbp), %xmm0 movq -0x28(%rbp), %rax movaps %xmm0, (%rax) jmp 0x582c movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x5560 addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
vector_f_sub_sse: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx cmp [rbp+var_58], 0 jz short loc_56D0 jmp short loc_56EF loc_56D0: lea rdi, aResultNull; "result != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 153h lea rcx, aVoidVectorFSub_0; "void vector_f_sub_sse(VectorF *, const "... call ___assert_fail loc_56EF: cmp [rbp+var_60], 0 jz short loc_56F8 jmp short loc_5717 loc_56F8: lea rdi, aArenaNull+4; "a != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 154h lea rcx, aVoidVectorFSub_0; "void vector_f_sub_sse(VectorF *, const "... call ___assert_fail loc_5717: cmp [rbp+var_68], 0 jz short loc_5720 jmp short loc_573F loc_5720: lea rdi, aBNull; "b != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 155h lea rcx, aVoidVectorFSub_0; "void vector_f_sub_sse(VectorF *, const "... call ___assert_fail loc_573F: mov rax, [rbp+var_60] mov rax, [rax+10h] mov rcx, [rbp+var_68] cmp rax, [rcx+10h] jnz short loc_5753 jmp short loc_5772 loc_5753: lea rdi, aADimBDim; "a->dim == b->dim" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 156h lea rcx, aVoidVectorFSub_0; "void vector_f_sub_sse(VectorF *, const "... call ___assert_fail loc_5772: mov rax, [rbp+var_58] mov rax, [rax+10h] mov rcx, [rbp+var_60] cmp rax, [rcx+10h] jb short loc_5786 jmp short loc_57A5 loc_5786: lea rdi, aResultDimADim; "result->dim >= a->dim" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 157h lea rcx, aVoidVectorFSub_0; "void vector_f_sub_sse(VectorF *, const "... call ___assert_fail loc_57A5: mov rax, [rbp+var_60] cmp qword ptr [rax+10h], 4 jnz short loc_581B mov rax, [rbp+var_60] mov [rbp+var_48], rax mov rax, [rbp+var_48] movaps xmm0, xmmword ptr [rax] movaps [rbp+var_80], xmm0 mov rax, [rbp+var_68] mov [rbp+var_50], rax mov rax, [rbp+var_50] movaps xmm0, xmmword ptr [rax] movaps [rbp+var_90], xmm0 movaps xmm1, [rbp+var_80] movaps xmm0, [rbp+var_90] movaps [rbp+var_10], xmm1 movaps [rbp+var_20], xmm0 movaps xmm0, [rbp+var_10] subps xmm0, [rbp+var_20] movaps [rbp+var_A0], xmm0 mov rax, [rbp+var_58] movaps xmm0, [rbp+var_A0] mov [rbp+var_28], rax movaps [rbp+var_40], xmm0 movaps xmm0, [rbp+var_40] mov rax, [rbp+var_28] movaps xmmword ptr [rax], xmm0 jmp short loc_582C loc_581B: mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] mov rdx, [rbp+var_68] call vector_f_sub_generic loc_582C: add rsp, 0A0h pop rbp retn
unsigned long long vector_f_sub_sse(__m128 *a1, __m128 *a2, __m128 *a3) { unsigned long long result; // rax if ( !a1 ) __assert_fail( "result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 339LL, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); if ( !a2 ) __assert_fail( "a != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 340LL, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); if ( !a3 ) __assert_fail( "b != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 341LL, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); if ( a2[1].m128_u64[0] != a3[1].m128_u64[0] ) __assert_fail( "a->dim == b->dim", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 342LL, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); if ( a1[1].m128_u64[0] < a2[1].m128_u64[0] ) __assert_fail( "result->dim >= a->dim", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 343LL, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); if ( a2[1].m128_u64[0] != 4 ) return vector_f_sub_generic((long long)a1, (long long)a2, (long long)a3); result = (unsigned long long)a1; *a1 = _mm_sub_ps(*a2, *a3); return result; }
vector_f_sub_sse: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX CMP qword ptr [RBP + -0x58],0x0 JZ 0x001056d0 JMP 0x001056ef LAB_001056d0: LEA RDI,[0x10b5f4] LEA RSI,[0x10b724] MOV EDX,0x153 LEA RCX,[0x10c14a] CALL 0x00101090 LAB_001056ef: CMP qword ptr [RBP + -0x60],0x0 JZ 0x001056f8 JMP 0x00105717 LAB_001056f8: LEA RDI,[0x10a1c7] LEA RSI,[0x10b724] MOV EDX,0x154 LEA RCX,[0x10c14a] CALL 0x00101090 LAB_00105717: CMP qword ptr [RBP + -0x68],0x0 JZ 0x00105720 JMP 0x0010573f LAB_00105720: LEA RDI,[0x10a497] LEA RSI,[0x10b724] MOV EDX,0x155 LEA RCX,[0x10c14a] CALL 0x00101090 LAB_0010573f: MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x00105753 JMP 0x00105772 LAB_00105753: LEA RDI,[0x10b970] LEA RSI,[0x10b724] MOV EDX,0x156 LEA RCX,[0x10c14a] CALL 0x00101090 LAB_00105772: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RCX + 0x10] JC 0x00105786 JMP 0x001057a5 LAB_00105786: LEA RDI,[0x10c0aa] LEA RSI,[0x10b724] MOV EDX,0x157 LEA RCX,[0x10c14a] CALL 0x00101090 LAB_001057a5: MOV RAX,qword ptr [RBP + -0x60] CMP qword ptr [RAX + 0x10],0x4 JNZ 0x0010581b MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOVAPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP + -0x80],XMM0 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOVAPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP + -0x90],XMM0 MOVAPS XMM1,xmmword ptr [RBP + -0x80] MOVAPS XMM0,xmmword ptr [RBP + -0x90] MOVAPS xmmword ptr [RBP + -0x10],XMM1 MOVAPS xmmword ptr [RBP + -0x20],XMM0 MOVAPS XMM0,xmmword ptr [RBP + -0x10] SUBPS XMM0,xmmword ptr [RBP + -0x20] MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV RAX,qword ptr [RBP + -0x58] MOVAPS XMM0,xmmword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x28],RAX MOVAPS xmmword ptr [RBP + -0x40],XMM0 MOVAPS XMM0,xmmword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOVAPS xmmword ptr [RAX],XMM0 JMP 0x0010582c LAB_0010581b: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x68] CALL 0x00105560 LAB_0010582c: ADD RSP,0xa0 POP RBP RET
void vector_f_sub_sse(int8 *param_1,int8 *param_2,int8 *param_3) { float local_28; float fStack_24; float fStack_20; float fStack_1c; float local_18; float fStack_14; float fStack_10; float fStack_c; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("result != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c" ,0x153,"void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); } if (param_2 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("a != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c", 0x154,"void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); } if (param_3 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("b != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c", 0x155,"void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); } if (param_2[2] == param_3[2]) { if ((ulong)param_2[2] <= (ulong)param_1[2]) { if (param_2[2] == 4) { local_18 = (float)*param_2; fStack_14 = (float)((ulong)*param_2 >> 0x20); fStack_10 = (float)param_2[1]; fStack_c = (float)((ulong)param_2[1] >> 0x20); local_28 = (float)*param_3; fStack_24 = (float)((ulong)*param_3 >> 0x20); fStack_20 = (float)param_3[1]; fStack_1c = (float)((ulong)param_3[1] >> 0x20); *param_1 = CONCAT44(fStack_14 - fStack_24,local_18 - local_28); param_1[1] = CONCAT44(fStack_c - fStack_1c,fStack_10 - fStack_20); } else { vector_f_sub_generic(param_1,param_2,param_3); } return; } /* WARNING: Subroutine does not return */ __assert_fail("result->dim >= a->dim", "/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",0x157, "void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); } /* WARNING: Subroutine does not return */ __assert_fail("a->dim == b->dim","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c" ,0x156,"void vector_f_sub_sse(VectorF *, const VectorF *, const VectorF *)"); }
47,965
ps_fetch_double
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_double(MYSQL_BIND *r_param, const MYSQL_FIELD * field , unsigned char **row) { switch (r_param->buffer_type) { case MYSQL_TYPE_DOUBLE: { double *value= (double *)r_param->buffer; float8get(*value, *row); r_param->buffer_length= 8; } break; default: { double value; float8get(value, *row); convert_from_double(r_param, field, value, sizeof(double)); } break; } (*row)+= 8; }
O0
c
ps_fetch_double: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x60(%rax), %eax subl $0x5, %eax jne 0x5446d jmp 0x54442 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq (%rcx), %rcx movq %rcx, (%rax) movq -0x8(%rbp), %rax movq $0x8, 0x40(%rax) jmp 0x54492 movq -0x18(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movsd -0x28(%rbp), %xmm0 movl $0x8, %edx callq 0x56350 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x8, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_double: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+60h] sub eax, 5 jnz short loc_5446D jmp short $+2 loc_54442: mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rcx, [rcx] mov [rax], rcx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 8 jmp short loc_54492 loc_5446D: mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] movsd xmm0, [rbp+var_28] mov edx, 8 call convert_from_double loc_54492: mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 8 mov [rax], rcx add rsp, 30h pop rbp retn
double ** ps_fetch_double(long long a1, long long a2, double **a3) { double **result; // rax if ( *(_DWORD *)(a1 + 96) == 5 ) { **(double **)(a1 + 16) = **a3; *(_QWORD *)(a1 + 64) = 8LL; } else { convert_from_double(a1, a2, 8LL, **a3); } result = a3; ++*a3; return result; }
ps_fetch_double: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x60] SUB EAX,0x5 JNZ 0x0015446d JMP 0x00154442 LAB_00154442: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x8 JMP 0x00154492 LAB_0015446d: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RBP + -0x28] MOV EDX,0x8 CALL 0x00156350 LAB_00154492: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x8 MOV qword ptr [RAX],RCX ADD RSP,0x30 POP RBP RET
void ps_fetch_double(long param_1,int8 param_2,long *param_3) { if (*(int *)(param_1 + 0x60) == 5) { **(int8 **)(param_1 + 0x10) = *(int8 *)*param_3; *(int8 *)(param_1 + 0x40) = 8; } else { convert_from_double(*(int8 *)*param_3,param_1,param_2,8); } *param_3 = *param_3 + 8; return; }
47,966
agent_start
bluesky950520[P]quickjs/run-test262.c
static void *agent_start(void *arg) { ThreadLocalStorage *tls; Test262Agent *agent; JSRuntime *rt; JSContext *ctx; JSValue ret_val; int ret; agent = arg; tls = agent->tls; // shares thread-local storage with parent thread rt = JS_NewRuntime(); if (rt == NULL) { fatal(1, "JS_NewRuntime failure"); } JS_SetRuntimeOpaque(rt, tls); ctx = JS_NewContext(rt); if (ctx == NULL) { JS_FreeRuntime(rt); fatal(1, "JS_NewContext failure"); } JS_SetContextOpaque(ctx, agent); JS_SetRuntimeInfo(rt, "agent"); JS_SetCanBlock(rt, TRUE); add_helpers(ctx); ret_val = JS_Eval(ctx, agent->script, strlen(agent->script), "<evalScript>", JS_EVAL_TYPE_GLOBAL); free(agent->script); agent->script = NULL; if (JS_IsException(ret_val)) js_std_dump_error(ctx); JS_FreeValue(ctx, ret_val); for(;;) { JSContext *ctx1; ret = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (ret < 0) { js_std_dump_error(ctx); break; } else if (ret == 0) { if (JS_IsUndefined(agent->broadcast_func)) { break; } else { JSValue args[2]; js_mutex_lock(&tls->agent_mutex); while (!agent->broadcast_pending) { js_cond_wait(&tls->agent_cond, &tls->agent_mutex); } agent->broadcast_pending = FALSE; js_cond_signal(&tls->agent_cond); js_mutex_unlock(&tls->agent_mutex); args[0] = JS_NewArrayBuffer(ctx, agent->broadcast_sab_buf, agent->broadcast_sab_size, NULL, NULL, TRUE); args[1] = JS_NewInt32(ctx, agent->broadcast_val); ret_val = JS_Call(ctx, agent->broadcast_func, JS_UNDEFINED, 2, args); JS_FreeValue(ctx, args[0]); JS_FreeValue(ctx, args[1]); if (JS_IsException(ret_val)) js_std_dump_error(ctx); JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, agent->broadcast_func); agent->broadcast_func = JS_UNDEFINED; } } } JS_FreeValue(ctx, agent->broadcast_func); JS_FreeContext(ctx); JS_FreeRuntime(rt); return NULL; }
O0
c
agent_start: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0xe0(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax movq 0x60(%rax), %rax movq %rax, 0xd8(%rsp) callq 0x29ab0 movq %rax, 0xc8(%rsp) cmpq $0x0, 0xc8(%rsp) jne 0x15a7e movl $0x1, %edi leaq 0xf97ba(%rip), %rsi # 0x10f231 movb $0x0, %al callq 0xec80 movq 0xc8(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x29a00 movq 0xc8(%rsp), %rdi callq 0x2a850 movq %rax, 0xc0(%rsp) cmpq $0x0, 0xc0(%rsp) jne 0x15ad3 movq 0xc8(%rsp), %rdi callq 0x29720 movl $0x1, %edi leaq 0xf977b(%rip), %rsi # 0x10f247 movb $0x0, %al callq 0xec80 movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rsi callq 0x2dcc0 movq 0xc8(%rsp), %rdi leaq 0xf9e75(%rip), %rsi # 0x10f96c callq 0x29fd0 movq 0xc8(%rsp), %rdi movl $0x1, %esi callq 0x29bb0 movq 0xc0(%rsp), %rdi callq 0x11680 movq 0xc0(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xd0(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) movq 0xd0(%rsp), %rax movq 0x18(%rax), %rdi callq 0xe260 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rax, %rdx leaq 0xf9d99(%rip), %rcx # 0x10f8f7 xorl %r8d, %r8d callq 0x50ff0 movq %rax, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xd0(%rsp), %rax movq 0x18(%rax), %rdi callq 0xe060 movq 0xd0(%rsp), %rax movq $0x0, 0x18(%rax) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x135b0 cmpl $0x0, %eax je 0x15bde movq 0xc0(%rsp), %rdi callq 0x17c40 movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi callq 0x2e1f0 movq %rax, %rdi leaq 0x90(%rsp), %rsi callq 0x29dc0 movl %eax, 0xac(%rsp) cmpl $0x0, 0xac(%rsp) jge 0x15c3b movq 0xc0(%rsp), %rdi callq 0x17c40 jmp 0x15eb7 cmpl $0x0, 0xac(%rsp) jne 0x15eb0 movq 0xd0(%rsp), %rax movq 0x20(%rax), %rdi movq 0x28(%rax), %rsi callq 0x15f50 cmpl $0x0, %eax je 0x15c68 jmp 0x15eb7 movq 0xd8(%rsp), %rdi callq 0x27220 movq 0xd0(%rsp), %rax cmpl $0x0, 0x30(%rax) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x15c8c jmp 0x15ca7 movq 0xd8(%rsp), %rdi addq $0x28, %rdi movq 0xd8(%rsp), %rsi callq 0x27330 jmp 0x15c75 movq 0xd0(%rsp), %rax movl $0x0, 0x30(%rax) movq 0xd8(%rsp), %rdi addq $0x28, %rdi callq 0x272f0 movq 0xd8(%rsp), %rdi callq 0x27240 movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rax movq 0x48(%rax), %rsi movq 0x50(%rax), %rdx xorl %eax, %eax movl %eax, %r8d movl $0x1, %r9d movq %r8, %rcx callq 0x5db90 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movups 0x60(%rsp), %xmm0 movaps %xmm0, 0x70(%rsp) movq 0xc0(%rsp), %rcx movq 0xd0(%rsp), %rax movl 0x58(%rax), %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) movl 0xec(%rsp), %eax movl %eax, 0xf8(%rsp) movq $0x0, 0x100(%rsp) movq 0xf8(%rsp), %rcx movq 0x100(%rsp), %rax movq %rcx, 0x50(%rsp) movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x88(%rsp) movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rcx movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) leaq 0x70(%rsp), %rax movq 0x20(%rcx), %rsi movq 0x28(%rcx), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 movl $0x2, %r9d movq %rax, (%rsp) callq 0x40340 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x29f80 movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x135b0 cmpl $0x0, %eax je 0x15e49 movq 0xc0(%rsp), %rdi callq 0x17c40 movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rax movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x29f80 movq 0xd0(%rsp), %rax movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x28(%rax) jmp 0x15eb0 jmp 0x15eb2 jmp 0x15bfb movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rax movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi callq 0x2de40 movq 0xc8(%rsp), %rdi callq 0x29720 xorl %eax, %eax addq $0x108, %rsp # imm = 0x108 retq nopl (%rax,%rax)
agent_start: sub rsp, 108h mov [rsp+108h+var_28], rdi mov rax, [rsp+108h+var_28] mov [rsp+108h+var_38], rax mov rax, [rsp+108h+var_38] mov rax, [rax+60h] mov [rsp+108h+var_30], rax call JS_NewRuntime mov [rsp+108h+var_40], rax cmp [rsp+108h+var_40], 0 jnz short loc_15A7E mov edi, 1 lea rsi, aJsNewruntimeFa; "JS_NewRuntime failure" mov al, 0 call fatal loc_15A7E: mov rdi, [rsp+108h+var_40] mov rsi, [rsp+108h+var_30] call JS_SetRuntimeOpaque mov rdi, [rsp+108h+var_40] call JS_NewContext mov [rsp+108h+var_48], rax cmp [rsp+108h+var_48], 0 jnz short loc_15AD3 mov rdi, [rsp+108h+var_40] call JS_FreeRuntime mov edi, 1 lea rsi, aJsNewcontextFa; "JS_NewContext failure" mov al, 0 call fatal loc_15AD3: mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_38] call JS_SetContextOpaque mov rdi, [rsp+108h+var_40] lea rsi, aCannotBeCalled+1Bh; "agent" call JS_SetRuntimeInfo mov rdi, [rsp+108h+var_40] mov esi, 1 call JS_SetCanBlock mov rdi, [rsp+108h+var_48] call add_helpers mov rax, [rsp+108h+var_48] mov [rsp+108h+var_F8], rax mov rax, [rsp+108h+var_38] mov rax, [rax+18h] mov [rsp+108h+var_F0], rax mov rax, [rsp+108h+var_38] mov rdi, [rax+18h] call _strlen mov rdi, [rsp+108h+var_F8] mov rsi, [rsp+108h+var_F0] mov rdx, rax lea rcx, aEvalscript_0; "<evalScript>" xor r8d, r8d call JS_Eval mov [rsp+108h+var_70], rax mov [rsp+108h+var_68], rdx mov rax, [rsp+108h+var_70] mov [rsp+108h+var_58], rax mov rax, [rsp+108h+var_68] mov [rsp+108h+var_50], rax mov rax, [rsp+108h+var_38] mov rdi, [rax+18h] call _free mov rax, [rsp+108h+var_38] mov qword ptr [rax+18h], 0 mov rdi, [rsp+108h+var_58] mov rsi, [rsp+108h+var_50] call JS_IsException cmp eax, 0 jz short loc_15BDE mov rdi, [rsp+108h+var_48] call js_std_dump_error loc_15BDE: mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] call JS_FreeValue loc_15BFB: mov rdi, [rsp+108h+var_48] call JS_GetRuntime mov rdi, rax lea rsi, [rsp+108h+var_78] call JS_ExecutePendingJob mov [rsp+108h+var_5C], eax cmp [rsp+108h+var_5C], 0 jge short loc_15C3B mov rdi, [rsp+108h+var_48] call js_std_dump_error jmp loc_15EB7 loc_15C3B: cmp [rsp+108h+var_5C], 0 jnz loc_15EB0 mov rax, [rsp+108h+var_38] mov rdi, [rax+20h] mov rsi, [rax+28h] call JS_IsUndefined cmp eax, 0 jz short loc_15C68 jmp loc_15EB7 loc_15C68: mov rdi, [rsp+108h+var_30] call js_mutex_lock loc_15C75: mov rax, [rsp+108h+var_38] cmp dword ptr [rax+30h], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_15C8C jmp short loc_15CA7 loc_15C8C: mov rdi, [rsp+108h+var_30] add rdi, 28h ; '(' mov rsi, [rsp+108h+var_30] call js_cond_wait jmp short loc_15C75 loc_15CA7: mov rax, [rsp+108h+var_38] mov dword ptr [rax+30h], 0 mov rdi, [rsp+108h+var_30] add rdi, 28h ; '(' call js_cond_signal mov rdi, [rsp+108h+var_30] call js_mutex_unlock mov rdi, [rsp+108h+var_48] mov rax, [rsp+108h+var_38] mov rsi, [rax+48h] mov rdx, [rax+50h] xor eax, eax mov r8d, eax mov r9d, 1 mov rcx, r8 call JS_NewArrayBuffer mov qword ptr [rsp+108h+var_A8], rax mov qword ptr [rsp+108h+var_A8+8], rdx movups xmm0, [rsp+108h+var_A8] movaps [rsp+108h+var_98], xmm0 mov rcx, [rsp+108h+var_48] mov rax, [rsp+108h+var_38] mov eax, [rax+58h] mov [rsp+108h+var_18], rcx mov [rsp+108h+var_1C], eax mov eax, [rsp+108h+var_1C] mov dword ptr [rsp+108h+var_10], eax mov [rsp+108h+var_8], 0 mov rcx, [rsp+108h+var_10] mov rax, [rsp+108h+var_8] mov [rsp+108h+var_B8], rcx mov [rsp+108h+var_B0], rax mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_88], rax mov rax, [rsp+108h+var_B0] mov [rsp+108h+var_80], rax mov rdi, [rsp+108h+var_48] mov rcx, [rsp+108h+var_38] mov dword ptr [rsp+108h+var_D8], 0 mov [rsp+108h+var_D0], 3 lea rax, [rsp+108h+var_98] mov rsi, [rcx+20h] mov rdx, [rcx+28h] mov rcx, [rsp+108h+var_D8] mov r8, [rsp+108h+var_D0] mov r9d, 2 mov [rsp+108h+var_108], rax call JS_Call mov [rsp+108h+var_C8], rax mov [rsp+108h+var_C0], rdx mov rax, [rsp+108h+var_C8] mov [rsp+108h+var_58], rax mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_50], rax mov rdi, [rsp+108h+var_48] mov rsi, qword ptr [rsp+108h+var_98] mov rdx, qword ptr [rsp+108h+var_98+8] call JS_FreeValue mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_88] mov rdx, [rsp+108h+var_80] call JS_FreeValue mov rdi, [rsp+108h+var_58] mov rsi, [rsp+108h+var_50] call JS_IsException cmp eax, 0 jz short loc_15E49 mov rdi, [rsp+108h+var_48] call js_std_dump_error loc_15E49: mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] call JS_FreeValue mov rdi, [rsp+108h+var_48] mov rax, [rsp+108h+var_38] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_FreeValue mov rax, [rsp+108h+var_38] mov dword ptr [rsp+108h+var_E8], 0 mov [rsp+108h+var_E0], 3 mov rcx, [rsp+108h+var_E8] mov [rax+20h], rcx mov rcx, [rsp+108h+var_E0] mov [rax+28h], rcx jmp short $+2 loc_15EB0: jmp short $+2 loc_15EB2: jmp loc_15BFB loc_15EB7: mov rdi, [rsp+108h+var_48] mov rax, [rsp+108h+var_38] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_FreeValue mov rdi, [rsp+108h+var_48] call JS_FreeContext mov rdi, [rsp+108h+var_40] call JS_FreeRuntime xor eax, eax add rsp, 108h retn
long long agent_start(long long a1) { long long v1; // rax long long v2; // rdx long long Runtime; // rax long long v4; // rsi long long v5; // rdx __int128 v6; // rax long long v7; // rdx long long v8; // rax long long v10; // [rsp+18h] [rbp-F0h] long long v11; // [rsp+20h] [rbp-E8h] __int128 v12; // [rsp+70h] [rbp-98h] BYREF long long v13; // [rsp+80h] [rbp-88h] long long v14; // [rsp+88h] [rbp-80h] _BYTE v15[8]; // [rsp+90h] [rbp-78h] BYREF long long v16; // [rsp+98h] [rbp-70h] long long v17; // [rsp+A0h] [rbp-68h] int v18; // [rsp+ACh] [rbp-5Ch] long long v19; // [rsp+B0h] [rbp-58h] long long v20; // [rsp+B8h] [rbp-50h] long long v21; // [rsp+C0h] [rbp-48h] long long v22; // [rsp+C8h] [rbp-40h] long long v23; // [rsp+D0h] [rbp-38h] long long v24; // [rsp+D8h] [rbp-30h] long long v25; // [rsp+E0h] [rbp-28h] int v26; // [rsp+ECh] [rbp-1Ch] long long v27; // [rsp+F0h] [rbp-18h] long long v28; // [rsp+F8h] [rbp-10h] long long v29; // [rsp+100h] [rbp-8h] v25 = a1; v23 = a1; v24 = *(_QWORD *)(a1 + 96); v22 = JS_NewRuntime(); if ( !v22 ) fatal(1u, (long long)"JS_NewRuntime failure"); JS_SetRuntimeOpaque(v22, v24); v21 = JS_NewContext(v22); if ( !v21 ) { JS_FreeRuntime(v22); fatal(1u, (long long)"JS_NewContext failure"); } JS_SetContextOpaque(v21, v23); JS_SetRuntimeInfo(v22, "agent"); JS_SetCanBlock(v22, 1LL); add_helpers(v21); v10 = *(_QWORD *)(v23 + 24); v1 = strlen(v10); v16 = JS_Eval(v21, v10, v1, "<evalScript>", 0LL); v17 = v2; v19 = v16; v20 = v2; free(*(_QWORD *)(v23 + 24)); *(_QWORD *)(v23 + 24) = 0LL; if ( JS_IsException(v19, v20) ) js_std_dump_error(v21); JS_FreeValue(v21, v19, v20); while ( 1 ) { Runtime = JS_GetRuntime(v21); v18 = JS_ExecutePendingJob(Runtime, v15); if ( v18 < 0 ) break; if ( !v18 ) { v4 = *(_QWORD *)(v23 + 40); if ( (unsigned int)JS_IsUndefined(*(_QWORD *)(v23 + 32), v4) ) goto LABEL_19; js_mutex_lock(v24); while ( !*(_DWORD *)(v23 + 48) ) { v4 = v24; js_cond_wait(v24 + 40, v24); } *(_DWORD *)(v23 + 48) = 0; js_cond_signal(v24 + 40); js_mutex_unlock(v24, v4, v5); *(_QWORD *)&v6 = JS_NewArrayBuffer(v21, *(_QWORD *)(v23 + 72), *(_QWORD *)(v23 + 80), 0LL, 0LL, 1LL); v12 = v6; LODWORD(v6) = *(_DWORD *)(v23 + 88); v27 = v21; v26 = v6; LODWORD(v28) = v6; v29 = 0LL; v13 = v28; v14 = 0LL; v19 = JS_Call(v21, *(_QWORD *)(v23 + 32), *(_QWORD *)(v23 + 40), 0, 3, 2, (long long)&v12); v20 = v7; JS_FreeValue(v21, v12, *((_QWORD *)&v12 + 1)); JS_FreeValue(v21, v13, v14); if ( JS_IsException(v19, v20) ) js_std_dump_error(v21); JS_FreeValue(v21, v19, v20); JS_FreeValue(v21, *(_QWORD *)(v23 + 32), *(_QWORD *)(v23 + 40)); v8 = v23; LODWORD(v11) = 0; *(_QWORD *)(v23 + 32) = v11; *(_QWORD *)(v8 + 40) = 3LL; } } js_std_dump_error(v21); LABEL_19: JS_FreeValue(v21, *(_QWORD *)(v23 + 32), *(_QWORD *)(v23 + 40)); JS_FreeContext(v21); JS_FreeRuntime(v22); return 0LL; }
agent_start: SUB RSP,0x108 MOV qword ptr [RSP + 0xe0],RDI MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RSP + 0xd8],RAX CALL 0x00129ab0 MOV qword ptr [RSP + 0xc8],RAX CMP qword ptr [RSP + 0xc8],0x0 JNZ 0x00115a7e MOV EDI,0x1 LEA RSI,[0x20f231] MOV AL,0x0 CALL 0x0010ec80 LAB_00115a7e: MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x00129a00 MOV RDI,qword ptr [RSP + 0xc8] CALL 0x0012a850 MOV qword ptr [RSP + 0xc0],RAX CMP qword ptr [RSP + 0xc0],0x0 JNZ 0x00115ad3 MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00129720 MOV EDI,0x1 LEA RSI,[0x20f247] MOV AL,0x0 CALL 0x0010ec80 LAB_00115ad3: MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xd0] CALL 0x0012dcc0 MOV RDI,qword ptr [RSP + 0xc8] LEA RSI,[0x20f96c] CALL 0x00129fd0 MOV RDI,qword ptr [RSP + 0xc8] MOV ESI,0x1 CALL 0x00129bb0 MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00111680 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0010e260 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RAX LEA RCX,[0x20f8f7] XOR R8D,R8D CALL 0x00150ff0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0010e060 MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001135b0 CMP EAX,0x0 JZ 0x00115bde MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00117c40 LAB_00115bde: MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 LAB_00115bfb: MOV RDI,qword ptr [RSP + 0xc0] CALL 0x0012e1f0 MOV RDI,RAX LEA RSI,[RSP + 0x90] CALL 0x00129dc0 MOV dword ptr [RSP + 0xac],EAX CMP dword ptr [RSP + 0xac],0x0 JGE 0x00115c3b MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00117c40 JMP 0x00115eb7 LAB_00115c3b: CMP dword ptr [RSP + 0xac],0x0 JNZ 0x00115eb0 MOV RAX,qword ptr [RSP + 0xd0] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RAX + 0x28] CALL 0x00115f50 CMP EAX,0x0 JZ 0x00115c68 JMP 0x00115eb7 LAB_00115c68: MOV RDI,qword ptr [RSP + 0xd8] CALL 0x00127220 LAB_00115c75: MOV RAX,qword ptr [RSP + 0xd0] CMP dword ptr [RAX + 0x30],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x00115c8c JMP 0x00115ca7 LAB_00115c8c: MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x28 MOV RSI,qword ptr [RSP + 0xd8] CALL 0x00127330 JMP 0x00115c75 LAB_00115ca7: MOV RAX,qword ptr [RSP + 0xd0] MOV dword ptr [RAX + 0x30],0x0 MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x28 CALL 0x001272f0 MOV RDI,qword ptr [RSP + 0xd8] CALL 0x00127240 MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RAX + 0x48] MOV RDX,qword ptr [RAX + 0x50] XOR EAX,EAX MOV R8D,EAX MOV R9D,0x1 MOV RCX,R8 CALL 0x0015db90 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOV RCX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xd0] MOV EAX,dword ptr [RAX + 0x58] MOV qword ptr [RSP + 0xf0],RCX MOV dword ptr [RSP + 0xec],EAX MOV EAX,dword ptr [RSP + 0xec] MOV dword ptr [RSP + 0xf8],EAX MOV qword ptr [RSP + 0x100],0x0 MOV RCX,qword ptr [RSP + 0xf8] MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RSP + 0xd0] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 LEA RAX,[RSP + 0x70] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] MOV R9D,0x2 MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001135b0 CMP EAX,0x0 JZ 0x00115e49 MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00117c40 LAB_00115e49: MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0xd0] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x28],RCX JMP 0x00115eb0 LAB_00115eb0: JMP 0x00115eb2 LAB_00115eb2: JMP 0x00115bfb LAB_00115eb7: MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xc0] CALL 0x0012de40 MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00129720 XOR EAX,EAX ADD RSP,0x108 RET
int8 agent_start(long param_1) { long lVar1; int iVar2; size_t sVar3; int8 uVar4; int1 auVar5 [16]; uint uStack_e4; uint uStack_d4; int4 local_a8; int4 uStack_a4; int4 uStack_a0; int4 uStack_9c; int4 local_98; int4 uStack_94; int4 uStack_90; int4 uStack_8c; int8 local_88; int8 local_80; int1 local_78 [8]; int1 local_70 [16]; int local_5c; int1 local_58 [16]; long local_48; long local_40; long local_38; long local_30; long local_28; int4 local_1c; long local_18; int4 local_10; int4 uStack_c; int8 local_8; local_30 = *(long *)(param_1 + 0x60); local_38 = param_1; local_28 = param_1; local_40 = JS_NewRuntime(); if (local_40 == 0) { fatal(1,"JS_NewRuntime failure"); } JS_SetRuntimeOpaque(local_40,local_30); local_48 = JS_NewContext(local_40); if (local_48 == 0) { JS_FreeRuntime(local_40); fatal(1,"JS_NewContext failure"); } JS_SetContextOpaque(local_48,local_38); JS_SetRuntimeInfo(local_40,"agent"); JS_SetCanBlock(local_40,1); add_helpers(local_48); lVar1 = local_48; uVar4 = *(int8 *)(local_38 + 0x18); sVar3 = strlen(*(char **)(local_38 + 0x18)); local_70 = JS_Eval(lVar1,uVar4,sVar3,"<evalScript>",0); local_58 = local_70; free(*(void **)(local_38 + 0x18)); *(int8 *)(local_38 + 0x18) = 0; iVar2 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar2 != 0) { js_std_dump_error(local_48); } JS_FreeValue(local_48,local_58._0_8_,local_58._8_8_); while( true ) { uVar4 = JS_GetRuntime(local_48); local_5c = JS_ExecutePendingJob(uVar4,local_78); if (local_5c < 0) break; if (local_5c == 0) { iVar2 = JS_IsUndefined(*(int8 *)(local_38 + 0x20),*(int8 *)(local_38 + 0x28)); if (iVar2 != 0) goto LAB_00115eb7; js_mutex_lock(local_30); while (*(int *)(local_38 + 0x30) == 0) { js_cond_wait(local_30 + 0x28,local_30); } *(int4 *)(local_38 + 0x30) = 0; js_cond_signal(local_30 + 0x28); js_mutex_unlock(local_30); auVar5 = JS_NewArrayBuffer(local_48,*(int8 *)(local_38 + 0x48), *(int8 *)(local_38 + 0x50),0,0,1); local_a8 = auVar5._0_4_; uStack_a4 = auVar5._4_4_; uStack_a0 = auVar5._8_4_; uStack_9c = auVar5._12_4_; local_98 = local_a8; uStack_94 = uStack_a4; uStack_90 = uStack_a0; uStack_8c = uStack_9c; local_1c = *(int4 *)(local_38 + 0x58); local_18 = local_48; local_8 = 0; local_88 = CONCAT44(uStack_c,local_1c); local_80 = 0; local_10 = local_1c; auVar5 = JS_Call(local_48,*(int8 *)(local_38 + 0x20),*(int8 *)(local_38 + 0x28), (ulong)uStack_d4 << 0x20,3,2,&local_98); local_58 = auVar5; JS_FreeValue(local_48,CONCAT44(uStack_94,local_98),CONCAT44(uStack_8c,uStack_90)); JS_FreeValue(local_48,local_88,local_80); iVar2 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar2 != 0) { js_std_dump_error(local_48); } JS_FreeValue(local_48,local_58._0_8_,local_58._8_8_); JS_FreeValue(local_48,*(int8 *)(local_38 + 0x20),*(int8 *)(local_38 + 0x28)); *(ulong *)(local_38 + 0x20) = (ulong)uStack_e4 << 0x20; *(int8 *)(local_38 + 0x28) = 3; } } js_std_dump_error(local_48); LAB_00115eb7: JS_FreeValue(local_48,*(int8 *)(local_38 + 0x20),*(int8 *)(local_38 + 0x28)); JS_FreeContext(local_48); JS_FreeRuntime(local_40); return 0; }
47,967
agent_start
bluesky950520[P]quickjs/run-test262.c
static void *agent_start(void *arg) { ThreadLocalStorage *tls; Test262Agent *agent; JSRuntime *rt; JSContext *ctx; JSValue ret_val; int ret; agent = arg; tls = agent->tls; // shares thread-local storage with parent thread rt = JS_NewRuntime(); if (rt == NULL) { fatal(1, "JS_NewRuntime failure"); } JS_SetRuntimeOpaque(rt, tls); ctx = JS_NewContext(rt); if (ctx == NULL) { JS_FreeRuntime(rt); fatal(1, "JS_NewContext failure"); } JS_SetContextOpaque(ctx, agent); JS_SetRuntimeInfo(rt, "agent"); JS_SetCanBlock(rt, TRUE); add_helpers(ctx); ret_val = JS_Eval(ctx, agent->script, strlen(agent->script), "<evalScript>", JS_EVAL_TYPE_GLOBAL); free(agent->script); agent->script = NULL; if (JS_IsException(ret_val)) js_std_dump_error(ctx); JS_FreeValue(ctx, ret_val); for(;;) { JSContext *ctx1; ret = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (ret < 0) { js_std_dump_error(ctx); break; } else if (ret == 0) { if (JS_IsUndefined(agent->broadcast_func)) { break; } else { JSValue args[2]; js_mutex_lock(&tls->agent_mutex); while (!agent->broadcast_pending) { js_cond_wait(&tls->agent_cond, &tls->agent_mutex); } agent->broadcast_pending = FALSE; js_cond_signal(&tls->agent_cond); js_mutex_unlock(&tls->agent_mutex); args[0] = JS_NewArrayBuffer(ctx, agent->broadcast_sab_buf, agent->broadcast_sab_size, NULL, NULL, TRUE); args[1] = JS_NewInt32(ctx, agent->broadcast_val); ret_val = JS_Call(ctx, agent->broadcast_func, JS_UNDEFINED, 2, args); JS_FreeValue(ctx, args[0]); JS_FreeValue(ctx, args[1]); if (JS_IsException(ret_val)) js_std_dump_error(ctx); JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, agent->broadcast_func); agent->broadcast_func = JS_UNDEFINED; } } } JS_FreeValue(ctx, agent->broadcast_func); JS_FreeContext(ctx); JS_FreeRuntime(rt); return NULL; }
O2
c
agent_start: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 movq 0x60(%rdi), %r15 callq 0x1b9f6 testq %rax, %rax je 0x13269 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi callq 0x1b9ad movq %rbx, %rdi callq 0x1c172 testq %rax, %rax je 0x13272 movq %rax, %r12 movq %rax, %rdi movq %r14, %rsi callq 0x1da88 leaq 0x728c8(%rip), %rsi # 0x85962 movq %rbx, %rdi callq 0x1bbd7 pushq $0x1 popq %rsi movq %rbx, 0x38(%rsp) movq %rbx, %rdi callq 0x1ba3b movq %r12, %rdi callq 0x107a9 movq 0x18(%r14), %rbx movq %rbx, %rdi callq 0xe280 leaq 0x72820(%rip), %rcx # 0x858ed movq %r12, %rdi movq %rbx, %rsi movq %rax, %rdx xorl %r8d, %r8d callq 0x2d5b9 movq %rax, %rbx movq %rdx, %r13 movq 0x18(%r14), %rdi callq 0xe060 andq $0x0, 0x18(%r14) cmpl $0x6, %r13d jne 0x13100 movq %r12, %rdi callq 0x1404c movq %r12, %rdi movq %rbx, %rsi movq %r13, %rdx callq 0x1bbce leaq 0x28(%r15), %r13 leaq 0x40(%rsp), %rbx movq %r12, %rdi callq 0x1dd35 movq %rax, %rdi movq %rbx, %rsi callq 0x1bb0a testl %eax, %eax js 0x1322e jne 0x13117 movq 0x28(%r14), %rdx cmpl $0x3, %edx je 0x1323a movq %r15, %rdi callq 0x1a949 cmpl $0x0, 0x30(%r14) jne 0x1315d movq %r13, %rdi movq %r15, %rsi callq 0x1a9ef jmp 0x13149 andl $0x0, 0x30(%r14) movq %r13, %rdi callq 0x1a9cd movq %r15, %rdi callq 0x1a95a movq 0x48(%r14), %rsi movq 0x50(%r14), %rdx movq %r12, %rdi xorl %ecx, %ecx xorl %r8d, %r8d pushq $0x1 popq %r9 callq 0x35926 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl 0x58(%r14), %eax movq %rax, 0x20(%rsp) andq $0x0, 0x28(%rsp) movq 0x20(%r14), %rsi movq 0x28(%r14), %rdx leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %r12, %rdi xorl %ecx, %ecx pushq $0x3 popq %r8 pushq $0x2 popq %r9 callq 0x25a66 movq %rax, %rbx movq %rdx, %rbp movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r12, %rdi callq 0x1bbce movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %r12, %rdi callq 0x1bbce cmpl $0x6, %ebp jne 0x131fe movq %r12, %rdi callq 0x1404c movq %r12, %rdi movq %rbx, %rsi movq %rbp, %rdx callq 0x1bbce movq 0x20(%r14), %rsi movq 0x28(%r14), %rdx movq %r12, %rdi callq 0x1bbce andl $0x0, 0x20(%r14) movq $0x3, 0x28(%r14) jmp 0x13112 movq %r12, %rdi callq 0x1404c movq 0x28(%r14), %rdx movq 0x20(%r14), %rsi movq %r12, %rdi callq 0x1bbce movq %r12, %rdi callq 0x1dae6 movq 0x38(%rsp), %rdi callq 0x1b842 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x71fb7(%rip), %rsi # 0x85227 jmp 0x13281 movq %rbx, %rdi callq 0x1b842 leaq 0x71fbc(%rip), %rsi # 0x8523d pushq $0x1 popq %rdi xorl %eax, %eax callq 0xec74
agent_start: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdi mov r15, [rdi+60h] call JS_NewRuntime test rax, rax jz loc_13269 mov rbx, rax mov rdi, rax mov rsi, r15 call JS_SetRuntimeOpaque mov rdi, rbx call JS_NewContext test rax, rax jz loc_13272 mov r12, rax mov rdi, rax mov rsi, r14 call JS_SetContextOpaque lea rsi, aCannotBeCalled+1Bh; "agent" mov rdi, rbx call JS_SetRuntimeInfo push 1 pop rsi mov [rsp+78h+var_40], rbx mov rdi, rbx call JS_SetCanBlock mov rdi, r12 call add_helpers mov rbx, [r14+18h] mov rdi, rbx call _strlen lea rcx, aEvalscript_0; "<evalScript>" mov rdi, r12 mov rsi, rbx mov rdx, rax xor r8d, r8d call JS_Eval mov rbx, rax mov r13, rdx mov rdi, [r14+18h] call _free and qword ptr [r14+18h], 0 cmp r13d, 6 jnz short loc_13100 mov rdi, r12 call js_std_dump_error loc_13100: mov rdi, r12 mov rsi, rbx mov rdx, r13 call JS_FreeValue lea r13, [r15+28h] loc_13112: lea rbx, [rsp+78h+var_38] loc_13117: mov rdi, r12 call JS_GetRuntime mov rdi, rax mov rsi, rbx call JS_ExecutePendingJob test eax, eax js loc_1322E jnz short loc_13117 mov rdx, [r14+28h] cmp edx, 3 jz loc_1323A mov rdi, r15 call js_mutex_lock loc_13149: cmp dword ptr [r14+30h], 0 jnz short loc_1315D mov rdi, r13 mov rsi, r15 call js_cond_wait jmp short loc_13149 loc_1315D: and dword ptr [r14+30h], 0 mov rdi, r13 call js_cond_signal mov rdi, r15 call js_mutex_unlock mov rsi, [r14+48h] mov rdx, [r14+50h] mov rdi, r12 xor ecx, ecx xor r8d, r8d push 1 pop r9 call JS_NewArrayBuffer mov [rsp+78h+var_68], rax mov [rsp+78h+var_60], rdx mov eax, [r14+58h] mov [rsp+78h+var_58], rax and [rsp+78h+var_50], 0 mov rsi, [r14+20h] mov rdx, [r14+28h] lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, r12 xor ecx, ecx push 3 pop r8 push 2 pop r9 call JS_Call mov rbx, rax mov rbp, rdx mov rsi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_60] mov rdi, r12 call JS_FreeValue mov rsi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_50] mov rdi, r12 call JS_FreeValue cmp ebp, 6 jnz short loc_131FE mov rdi, r12 call js_std_dump_error loc_131FE: mov rdi, r12 mov rsi, rbx mov rdx, rbp call JS_FreeValue mov rsi, [r14+20h] mov rdx, [r14+28h] mov rdi, r12 call JS_FreeValue and dword ptr [r14+20h], 0 mov qword ptr [r14+28h], 3 jmp loc_13112 loc_1322E: mov rdi, r12 call js_std_dump_error mov rdx, [r14+28h] loc_1323A: mov rsi, [r14+20h] mov rdi, r12 call JS_FreeValue mov rdi, r12 call JS_FreeContext mov rdi, [rsp+78h+var_40] call JS_FreeRuntime xor eax, eax add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_13269: lea rsi, aJsNewruntimeFa; "JS_NewRuntime failure" jmp short loc_13281 loc_13272: mov rdi, rbx call JS_FreeRuntime lea rsi, aJsNewcontextFa; "JS_NewContext failure" loc_13281: push 1 pop rdi xor eax, eax call fatal
long long agent_start( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { _BYTE *v9; // r15 long long v10; // rax long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 long long v17; // rbx long long v18; // rax long long v19; // r12 long long v20; // rbx long long v21; // rax long long v22; // rbx int v23; // edx int v24; // r13d long long Runtime; // rax _BYTE *v26; // rsi int v27; // eax long long v28; // rdx long long v29; // rdx long long v30; // rbx int v31; // edx int v32; // ebp const char *v34; // rsi char v35; // [rsp+0h] [rbp-78h] _QWORD v36[2]; // [rsp+10h] [rbp-68h] BYREF long long v37; // [rsp+20h] [rbp-58h] long long v38; // [rsp+28h] [rbp-50h] long long v39; // [rsp+38h] [rbp-40h] _BYTE v40[56]; // [rsp+40h] [rbp-38h] BYREF v9 = *(_BYTE **)(a1 + 96); v10 = JS_NewRuntime(); if ( !v10 ) { v34 = "JS_NewRuntime failure"; goto LABEL_19; } v17 = v10; JS_SetRuntimeOpaque(v10, v9); v18 = JS_NewContext(v17); if ( !v18 ) { JS_FreeRuntime(v17); v34 = "JS_NewContext failure"; LABEL_19: fatal(1u, (long long)v34, v11, v12, v13, v14, a2, a3, a4, a5, v15, v16, a8, a9, v35); } v19 = v18; JS_SetContextOpaque(v18, a1); JS_SetRuntimeInfo(v17, "agent"); v39 = v17; JS_SetCanBlock(v17, 1LL); add_helpers(v19); v20 = *(_QWORD *)(a1 + 24); v21 = strlen(v20); v22 = JS_Eval(v19, v20, v21, "<evalScript>", 0LL); v24 = v23; free(*(_QWORD *)(a1 + 24)); *(_QWORD *)(a1 + 24) = 0LL; if ( v24 == 6 ) js_std_dump_error(v19); JS_FreeValue(v19, v22); while ( 1 ) { Runtime = JS_GetRuntime(v19); v26 = v40; v27 = JS_ExecutePendingJob(Runtime, v40); if ( v27 < 0 ) break; if ( !v27 ) { if ( (unsigned int)*(_QWORD *)(a1 + 40) == 3 ) goto LABEL_16; js_mutex_lock(v9); while ( !*(_DWORD *)(a1 + 48) ) { v26 = v9; js_cond_wait(v9 + 40, v9); } *(_DWORD *)(a1 + 48) = 0; js_cond_signal(v9 + 40); js_mutex_unlock(v9, v26, v28); v36[0] = JS_NewArrayBuffer(v19, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0LL, 0LL, 1LL); v36[1] = v29; v37 = *(unsigned int *)(a1 + 88); v38 = 0LL; v30 = JS_Call(v19, *(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 40), 0, 3, 2, (long long)v36); v32 = v31; JS_FreeValue(v19, v36[0]); JS_FreeValue(v19, v37); if ( v32 == 6 ) js_std_dump_error(v19); JS_FreeValue(v19, v30); JS_FreeValue(v19, *(_QWORD *)(a1 + 32)); *(_DWORD *)(a1 + 32) = 0; *(_QWORD *)(a1 + 40) = 3LL; } } js_std_dump_error(v19); LABEL_16: JS_FreeValue(v19, *(_QWORD *)(a1 + 32)); JS_FreeContext(v19); JS_FreeRuntime(v39); return 0LL; }
agent_start: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDI MOV R15,qword ptr [RDI + 0x60] CALL 0x0011b9f6 TEST RAX,RAX JZ 0x00113269 MOV RBX,RAX MOV RDI,RAX MOV RSI,R15 CALL 0x0011b9ad MOV RDI,RBX CALL 0x0011c172 TEST RAX,RAX JZ 0x00113272 MOV R12,RAX MOV RDI,RAX MOV RSI,R14 CALL 0x0011da88 LEA RSI,[0x185962] MOV RDI,RBX CALL 0x0011bbd7 PUSH 0x1 POP RSI MOV qword ptr [RSP + 0x38],RBX MOV RDI,RBX CALL 0x0011ba3b MOV RDI,R12 CALL 0x001107a9 MOV RBX,qword ptr [R14 + 0x18] MOV RDI,RBX CALL 0x0010e280 LEA RCX,[0x1858ed] MOV RDI,R12 MOV RSI,RBX MOV RDX,RAX XOR R8D,R8D CALL 0x0012d5b9 MOV RBX,RAX MOV R13,RDX MOV RDI,qword ptr [R14 + 0x18] CALL 0x0010e060 AND qword ptr [R14 + 0x18],0x0 CMP R13D,0x6 JNZ 0x00113100 MOV RDI,R12 CALL 0x0011404c LAB_00113100: MOV RDI,R12 MOV RSI,RBX MOV RDX,R13 CALL 0x0011bbce LEA R13,[R15 + 0x28] LAB_00113112: LEA RBX,[RSP + 0x40] LAB_00113117: MOV RDI,R12 CALL 0x0011dd35 MOV RDI,RAX MOV RSI,RBX CALL 0x0011bb0a TEST EAX,EAX JS 0x0011322e JNZ 0x00113117 MOV RDX,qword ptr [R14 + 0x28] CMP EDX,0x3 JZ 0x0011323a MOV RDI,R15 CALL 0x0011a949 LAB_00113149: CMP dword ptr [R14 + 0x30],0x0 JNZ 0x0011315d MOV RDI,R13 MOV RSI,R15 CALL 0x0011a9ef JMP 0x00113149 LAB_0011315d: AND dword ptr [R14 + 0x30],0x0 MOV RDI,R13 CALL 0x0011a9cd MOV RDI,R15 CALL 0x0011a95a MOV RSI,qword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] MOV RDI,R12 XOR ECX,ECX XOR R8D,R8D PUSH 0x1 POP R9 CALL 0x00135926 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV EAX,dword ptr [R14 + 0x58] MOV qword ptr [RSP + 0x20],RAX AND qword ptr [RSP + 0x28],0x0 MOV RSI,qword ptr [R14 + 0x20] MOV RDX,qword ptr [R14 + 0x28] LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX MOV RDI,R12 XOR ECX,ECX PUSH 0x3 POP R8 PUSH 0x2 POP R9 CALL 0x00125a66 MOV RBX,RAX MOV RBP,RDX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,R12 CALL 0x0011bbce MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RDI,R12 CALL 0x0011bbce CMP EBP,0x6 JNZ 0x001131fe MOV RDI,R12 CALL 0x0011404c LAB_001131fe: MOV RDI,R12 MOV RSI,RBX MOV RDX,RBP CALL 0x0011bbce MOV RSI,qword ptr [R14 + 0x20] MOV RDX,qword ptr [R14 + 0x28] MOV RDI,R12 CALL 0x0011bbce AND dword ptr [R14 + 0x20],0x0 MOV qword ptr [R14 + 0x28],0x3 JMP 0x00113112 LAB_0011322e: MOV RDI,R12 CALL 0x0011404c MOV RDX,qword ptr [R14 + 0x28] LAB_0011323a: MOV RSI,qword ptr [R14 + 0x20] MOV RDI,R12 CALL 0x0011bbce MOV RDI,R12 CALL 0x0011dae6 MOV RDI,qword ptr [RSP + 0x38] CALL 0x0011b842 XOR EAX,EAX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00113269: LEA RSI,[0x185227] JMP 0x00113281 LAB_00113272: MOV RDI,RBX CALL 0x0011b842 LEA RSI,[0x18523d] LAB_00113281: PUSH 0x1 POP RDI XOR EAX,EAX CALL 0x0010ec74
int8 agent_start(long param_1) { long lVar1; int iVar2; long lVar3; long lVar4; size_t sVar5; int8 uVar6; char *pcVar7; int1 auVar8 [16]; int1 local_68 [16]; ulong local_58; int8 local_50; long local_40; int1 local_38 [8]; lVar1 = *(long *)(param_1 + 0x60); lVar3 = JS_NewRuntime(); if (lVar3 == 0) { pcVar7 = "JS_NewRuntime failure"; } else { JS_SetRuntimeOpaque(lVar3,lVar1); lVar4 = JS_NewContext(lVar3); if (lVar4 != 0) { JS_SetContextOpaque(lVar4,param_1); JS_SetRuntimeInfo(lVar3,"agent"); local_40 = lVar3; JS_SetCanBlock(lVar3,1); add_helpers(lVar4); pcVar7 = *(char **)(param_1 + 0x18); sVar5 = strlen(pcVar7); auVar8 = JS_Eval(lVar4,pcVar7,sVar5,"<evalScript>",0); free(*(void **)(param_1 + 0x18)); *(int8 *)(param_1 + 0x18) = 0; if (auVar8._8_4_ == 6) { js_std_dump_error(lVar4); } JS_FreeValue(lVar4,auVar8._0_8_,auVar8._8_8_); while( true ) { do { uVar6 = JS_GetRuntime(lVar4); iVar2 = JS_ExecutePendingJob(uVar6,local_38); if (iVar2 < 0) { js_std_dump_error(lVar4); uVar6 = *(int8 *)(param_1 + 0x28); goto LAB_0011323a; } } while (iVar2 != 0); uVar6 = *(int8 *)(param_1 + 0x28); if ((int)uVar6 == 3) break; js_mutex_lock(lVar1); while (*(int *)(param_1 + 0x30) == 0) { js_cond_wait(lVar1 + 0x28,lVar1); } *(int4 *)(param_1 + 0x30) = 0; js_cond_signal(lVar1 + 0x28); js_mutex_unlock(lVar1); auVar8 = JS_NewArrayBuffer(lVar4,*(int8 *)(param_1 + 0x48), *(int8 *)(param_1 + 0x50),0,0,1); local_58 = (ulong)*(uint *)(param_1 + 0x58); local_50 = 0; local_68 = auVar8; auVar8 = JS_Call(lVar4,*(int8 *)(param_1 + 0x20),*(int8 *)(param_1 + 0x28),0,3,2 ,local_68); JS_FreeValue(lVar4,local_68._0_8_,local_68._8_8_); JS_FreeValue(lVar4,local_58,local_50); if (auVar8._8_4_ == 6) { js_std_dump_error(lVar4); } JS_FreeValue(lVar4,auVar8._0_8_,auVar8._8_8_); JS_FreeValue(lVar4,*(int8 *)(param_1 + 0x20),*(int8 *)(param_1 + 0x28)); *(int4 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 3; } LAB_0011323a: JS_FreeValue(lVar4,*(int8 *)(param_1 + 0x20),uVar6); JS_FreeContext(lVar4); JS_FreeRuntime(local_40); return 0; } JS_FreeRuntime(lVar3); pcVar7 = "JS_NewContext failure"; } /* WARNING: Subroutine does not return */ fatal(1,pcVar7); }
47,968
ma_hashtbl_init
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool _ma_hashtbl_init(MA_HASHTBL *hash,uint size,uint key_offset,uint key_length, hash_get_key get_key, void (*free_element)(void*),uint flags CALLER_INFO_PROTO) { hash->records=0; if (ma_init_dynamic_array_ci(&hash->array,sizeof(MA_HASHTBL_LINK),size,0)) { hash->free=0; /* Allow call to hash_free */ return(TRUE); } hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->current_record= NO_RECORD; /* For the future */ hash->get_key=get_key; hash->free=free_element; hash->flags=flags; if (flags & MA_HASHTBL_CASE_INSENSITIVE) hash->calc_hashnr=calc_hashnr_caseup; else hash->calc_hashnr=calc_hashnr; return(0); }
O3
c
ma_hashtbl_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %r8, %r15 movl %ecx, %r12d movl %edx, %r13d movl %esi, %edx movq %rdi, %rbx movl $0x0, 0x8(%rdi) addq $0x18, %rdi movl $0x10, %esi xorl %ecx, %ecx callq 0x8ce64 testb %al, %al je 0x8db5a movq $0x0, 0x38(%rbx) movb $0x1, %al jmp 0x8db97 movl 0x10(%rbp), %eax movl %r13d, (%rbx) movl %r12d, 0x4(%rbx) movabsq $-0xffffffff, %rcx # imm = 0xFFFFFFFF00000001 movq %rcx, 0xc(%rbx) movq %r15, 0x30(%rbx) movq %r14, 0x38(%rbx) movl %eax, 0x14(%rbx) testb $0x1, %al jne 0x8db8a leaq 0x80(%rip), %rax # 0x8dc08 jmp 0x8db91 leaq 0x15(%rip), %rax # 0x8dba6 movq %rax, 0x40(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_hashtbl_init: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r15, r8 mov r12d, ecx mov r13d, edx mov edx, esi mov rbx, rdi mov dword ptr [rdi+8], 0 add rdi, 18h mov esi, 10h xor ecx, ecx call ma_init_dynamic_array test al, al jz short loc_8DB5A mov qword ptr [rbx+38h], 0 mov al, 1 jmp short loc_8DB97 loc_8DB5A: mov eax, [rbp+arg_0] mov [rbx], r13d mov [rbx+4], r12d mov rcx, 0FFFFFFFF00000001h mov [rbx+0Ch], rcx mov [rbx+30h], r15 mov [rbx+38h], r14 mov [rbx+14h], eax test al, 1 jnz short loc_8DB8A lea rax, calc_hashnr jmp short loc_8DB91 loc_8DB8A: lea rax, calc_hashnr_caseup loc_8DB91: mov [rbx+40h], rax xor eax, eax loc_8DB97: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char ma_hashtbl_init(long long a1, unsigned int a2, int a3, int a4, long long a5, long long a6, int a7) { long long ( *v12)(); // rax *(_DWORD *)(a1 + 8) = 0; if ( (unsigned __int8)ma_init_dynamic_array(a1 + 24, 0x10u, a2, 0) ) { *(_QWORD *)(a1 + 56) = 0LL; return 1; } else { *(_DWORD *)a1 = a3; *(_DWORD *)(a1 + 4) = a4; *(_QWORD *)(a1 + 12) = 0xFFFFFFFF00000001LL; *(_QWORD *)(a1 + 48) = a5; *(_QWORD *)(a1 + 56) = a6; *(_DWORD *)(a1 + 20) = a7; if ( (a7 & 1) != 0 ) v12 = calc_hashnr_caseup; else v12 = calc_hashnr; *(_QWORD *)(a1 + 64) = v12; return 0; } }
_ma_hashtbl_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R15,R8 MOV R12D,ECX MOV R13D,EDX MOV EDX,ESI MOV RBX,RDI MOV dword ptr [RDI + 0x8],0x0 ADD RDI,0x18 MOV ESI,0x10 XOR ECX,ECX CALL 0x0018ce64 TEST AL,AL JZ 0x0018db5a MOV qword ptr [RBX + 0x38],0x0 MOV AL,0x1 JMP 0x0018db97 LAB_0018db5a: MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBX],R13D MOV dword ptr [RBX + 0x4],R12D MOV RCX,-0xffffffff MOV qword ptr [RBX + 0xc],RCX MOV qword ptr [RBX + 0x30],R15 MOV qword ptr [RBX + 0x38],R14 MOV dword ptr [RBX + 0x14],EAX TEST AL,0x1 JNZ 0x0018db8a LEA RAX,[0x18dc08] JMP 0x0018db91 LAB_0018db8a: LEA RAX,[0x18dba6] LAB_0018db91: MOV qword ptr [RBX + 0x40],RAX XOR EAX,EAX LAB_0018db97: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_hashtbl_init(int4 *param_1,int4 param_2,int4 param_3,int4 param_4, int8 param_5,int8 param_6,uint param_7) { char cVar1; int8 uVar2; code *pcVar3; param_1[2] = 0; cVar1 = ma_init_dynamic_array(param_1 + 6,0x10,param_2,0); if (cVar1 == '\0') { *param_1 = param_3; param_1[1] = param_4; *(int8 *)(param_1 + 3) = 0xffffffff00000001; *(int8 *)(param_1 + 0xc) = param_5; *(int8 *)(param_1 + 0xe) = param_6; param_1[5] = param_7; if ((param_7 & 1) == 0) { pcVar3 = calc_hashnr; } else { pcVar3 = calc_hashnr_caseup; } *(code **)(param_1 + 0x10) = pcVar3; uVar2 = 0; } else { *(int8 *)(param_1 + 0xe) = 0; uVar2 = 1; } return uVar2; }
47,969
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } int seq_count = 0; for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { seq_count++; } } putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x85f5a(%rip), %rdi # 0xae574 xorl %eax, %eax callq 0x1a080 cmpl $0x0, (%r14) jle 0x28697 movq 0x20(%r14), %r12 movl $0x3e, %r13d leaq 0x89fb8(%rip), %r15 # 0xb25f0 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0x28653 leaq 0x85fb4(%rip), %rdi # 0xae5fe movl %ebp, %esi xorl %eax, %eax callq 0x1a080 movslq 0x4(%r14), %rcx testq %rcx, %rcx jle 0x28675 xorl %edx, %edx xorl %eax, %eax movl (%r12,%rdx,4), %esi notl %esi shrl $0x1f, %esi addl %esi, %eax incq %rdx cmpq %rdx, %rcx jne 0x28660 jmp 0x28677 xorl %eax, %eax cmpl $0x3e, %eax cmovael %r13d, %eax movsbl (%rax,%r15), %edi callq 0x1aa60 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0x2863a leaq 0x89f3f(%rip), %rdi # 0xb25dd addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1ab80
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+38h+var_38], eax lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"... xor eax, eax call _printf cmp dword ptr [r14], 0 jle short loc_28697 mov r12, [r14+20h] mov r13d, 3Eh ; '>' lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_2863A: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_28653 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_28653: movsxd rcx, dword ptr [r14+4] test rcx, rcx jle short loc_28675 xor edx, edx xor eax, eax loc_28660: mov esi, [r12+rdx*4] not esi shr esi, 1Fh add eax, esi inc rdx cmp rcx, rdx jnz short loc_28660 jmp short loc_28677 loc_28675: xor eax, eax loc_28677: cmp eax, 3Eh ; '>' cmovnb eax, r13d movsx edi, byte ptr [rax+r15] call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r12, [r12+rax*4] cmp ebp, [r14] jl short loc_2863A loc_28697: lea rdi, aDoneDumping; "\n=== Done dumping" add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts
long long common_kv_cache_dump_view(long long a1, int a2) { long long v2; // r12 int v3; // ebp long long v4; // rcx long long v5; // rdx long long v6; // rax printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); if ( *(int *)a1 > 0 ) { v2 = *(_QWORD *)(a1 + 32); v3 = 0; do { if ( !(v3 % a2) ) printf("\n%5d: ", v3); v4 = *(int *)(a1 + 4); if ( v4 <= 0 ) { v6 = 0LL; } else { v5 = 0LL; LODWORD(v6) = 0; do v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6; while ( v4 != v5 ); } if ( (unsigned int)v6 >= 0x3E ) v6 = 62LL; putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]); ++v3; v2 += 4LL * *(int *)(a1 + 4); } while ( v3 < *(_DWORD *)a1 ); } return puts("\n=== Done dumping"); }
common_kv_cache_dump_view: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1ae574] XOR EAX,EAX CALL 0x0011a080 CMP dword ptr [R14],0x0 JLE 0x00128697 MOV R12,qword ptr [R14 + 0x20] MOV R13D,0x3e LEA R15,[0x1b25f0] XOR EBP,EBP LAB_0012863a: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x00128653 LEA RDI,[0x1ae5fe] MOV ESI,EBP XOR EAX,EAX CALL 0x0011a080 LAB_00128653: MOVSXD RCX,dword ptr [R14 + 0x4] TEST RCX,RCX JLE 0x00128675 XOR EDX,EDX XOR EAX,EAX LAB_00128660: MOV ESI,dword ptr [R12 + RDX*0x4] NOT ESI SHR ESI,0x1f ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x00128660 JMP 0x00128677 LAB_00128675: XOR EAX,EAX LAB_00128677: CMP EAX,0x3e CMOVNC EAX,R13D MOVSX EDI,byte ptr [RAX + R15*0x1] CALL 0x0011aa60 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x0012863a LAB_00128697: LEA RDI,[0x1b25dd] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011ab80
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2) { uint uVar1; int8 in_RAX; ulong uVar2; long lVar3; uint uVar4; long lVar5; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14))); if (0 < *(int *)param_1) { lVar5 = *(long *)(param_1 + 0x20); uVar4 = 0; do { if ((int)uVar4 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar4); } if ((long)*(int *)(param_1 + 4) < 1) { uVar1 = 0; } else { lVar3 = 0; uVar1 = 0; do { uVar1 = uVar1 - ((int)~*(uint *)(lVar5 + lVar3 * 4) >> 0x1f); lVar3 = lVar3 + 1; } while (*(int *)(param_1 + 4) != lVar3); } uVar2 = (ulong)uVar1; if (0x3d < uVar1) { uVar2 = 0x3e; } putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar2]); uVar4 = uVar4 + 1; lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4; } while ((int)uVar4 < *(int *)param_1); } puts("\n=== Done dumping"); return; }
47,970
psi_cond_wait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line); int result= my_cond_wait(&that->m_cond, &mutex->m_mutex); if (locker) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O0
c
psi_cond_wait: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) leaq 0x1c924a(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x1c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rdx movq -0x18(%rbp), %r8 movl -0x1c(%rbp), %r9d leaq -0x58(%rbp), %rdi xorl %ecx, %ecx callq *%rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x2a400 movl %eax, -0x64(%rbp) cmpq $0x0, -0x60(%rbp) je 0xf7f6d leaq 0x1c91fe(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x1c8(%rax), %rax movq -0x60(%rbp), %rdi movl -0x64(%rbp), %esi callq *%rax movl -0x64(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_cond_wait: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C0h] mov rcx, [rbp+var_8] mov rsi, [rcx+30h] mov rcx, [rbp+var_10] mov rdx, [rcx+40h] mov r8, [rbp+var_18] mov r9d, [rbp+var_1C] lea rdi, [rbp+var_58] xor ecx, ecx call rax mov [rbp+var_60], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _pthread_cond_wait mov [rbp+var_64], eax cmp [rbp+var_60], 0 jz short loc_F7F6D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C8h] mov rdi, [rbp+var_60] mov esi, [rbp+var_64] call rax loc_F7F6D: mov eax, [rbp+var_64] add rsp, 70h pop rbp retn
long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4) { unsigned int v5; // [rsp+Ch] [rbp-64h] long long v6; // [rsp+10h] [rbp-60h] _BYTE v7[60]; // [rsp+18h] [rbp-58h] BYREF unsigned int v8; // [rsp+54h] [rbp-1Ch] long long v9; // [rsp+58h] [rbp-18h] long long v10; // [rsp+60h] [rbp-10h] long long v11; // [rsp+68h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server[56])( v7, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 0LL, a3, a4); v5 = pthread_cond_wait(v11, v10); if ( v6 ) ((void ( *)(long long, _QWORD))PSI_server[57])(v6, v5); return v5; }
psi_cond_wait: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x40] MOV R8,qword ptr [RBP + -0x18] MOV R9D,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x58] XOR ECX,ECX CALL RAX MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012a400 MOV dword ptr [RBP + -0x64],EAX CMP qword ptr [RBP + -0x60],0x0 JZ 0x001f7f6d LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c8] MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x64] CALL RAX LAB_001f7f6d: MOV EAX,dword ptr [RBP + -0x64] ADD RSP,0x70 POP RBP RET
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3, int4 param_4) { int iVar1; long lVar2; int1 local_60 [60]; int4 local_24; int8 local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3, param_4); iVar1 = pthread_cond_wait(local_10,local_18); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
47,971
js_binary_logic_slow
bluesky950520[P]quickjs/quickjs.c
int js_binary_logic_slow(JSContext *ctx, JSValue *sp, OPCodeEnum op) { JSValue op1, op2; uint32_t tag1, tag2; uint32_t v1, v2, r; op1 = sp[-2]; op2 = sp[-1]; tag1 = JS_VALUE_GET_NORM_TAG(op1); tag2 = JS_VALUE_GET_NORM_TAG(op2); op1 = JS_ToNumericFree(ctx, op1); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToNumericFree(ctx, op2); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } tag1 = JS_VALUE_GET_TAG(op1); tag2 = JS_VALUE_GET_TAG(op2); if (tag1 == JS_TAG_BIG_INT || tag2 == JS_TAG_BIG_INT) { if (tag1 != tag2) { JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); JS_ThrowTypeError(ctx, "both operands must be BigInt"); goto exception; } else if (js_binary_arith_bigint(ctx, op, sp - 2, op1, op2)) { goto exception; } } else { if (unlikely(JS_ToInt32Free(ctx, (int32_t *)&v1, op1))) { JS_FreeValue(ctx, op2); goto exception; } if (unlikely(JS_ToInt32Free(ctx, (int32_t *)&v2, op2))) goto exception; switch(op) { case OP_shl: r = v1 << (v2 & 0x1f); break; case OP_sar: r = (int)v1 >> (v2 & 0x1f); break; case OP_and: r = v1 & v2; break; case OP_or: r = v1 | v2; break; case OP_xor: r = v1 ^ v2; break; default: abort(); } sp[-2] = js_int32(r); } return 0; exception: sp[-2] = JS_UNDEFINED; sp[-1] = JS_UNDEFINED; return -1; }
O1
c
js_binary_logic_slow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, %r15d movq %rsi, %rbx movq %rdi, %r14 movq -0x20(%rsi), %rsi movq -0x18(%rbx), %rdx movups -0x10(%rbx), %xmm0 movaps %xmm0, 0x20(%rsp) movl $0x1, %ecx callq 0x42b20 movq %rdx, %r12 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx cmpl $0x6, %r12d jne 0x40d8f movq 0x18(%r14), %rdi jmp 0x40dc0 movq %rax, %r13 movq %r15, 0x30(%rsp) movq %r14, %rdi movl $0x1, %ecx callq 0x42b20 movq %rdx, %rbp movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpl $0x6, %ebp jne 0x40dee movq 0x18(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 xorl %eax, %eax movl %eax, -0x20(%rbx) movl $0x3, %ecx movq %rcx, -0x18(%rbx) movl %eax, -0x10(%rbx) movq %rcx, -0x8(%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 cmpl $-0x9, %r12d je 0x40e61 cmpl $-0x9, %ebp je 0x40e61 leaq 0x1c(%rsp), %rsi movq %r14, %rdi movq %r13, %rdx movq %r12, %rcx callq 0x279c3 testl %eax, %eax jne 0x40f01 leaq 0x18(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx movq %rbp, %rcx callq 0x279c3 testl %eax, %eax jne 0x40dc5 movq 0x30(%rsp), %rcx addl $0xffffff61, %ecx # imm = 0xFFFFFF61 cmpl $0x5, %ecx ja 0x40f10 leaq 0x5bda7(%rip), %rax # 0x9cbf0 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movl 0x1c(%rsp), %eax movb 0x18(%rsp), %cl shll %cl, %eax jmp 0x40eec cmpl %ebp, %r12d jne 0x40e90 leaq -0x20(%rbx), %rdx movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r14, %rdi movq 0x30(%rsp), %rsi movq %r13, %rcx movq %r12, %r8 callq 0x4267f testl %eax, %eax jne 0x40dc5 jmp 0x40efa movq 0x18(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 movq 0x18(%r14), %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x1d8c6 leaq 0x5e7d3(%rip), %rsi # 0x9f688 movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x40dc5 movl 0x18(%rsp), %eax orl 0x1c(%rsp), %eax jmp 0x40eec movl 0x18(%rsp), %eax andl 0x1c(%rsp), %eax jmp 0x40eec movl 0x18(%rsp), %eax xorl 0x1c(%rsp), %eax jmp 0x40eec movl 0x1c(%rsp), %eax movb 0x18(%rsp), %cl sarl %cl, %eax movl %eax, %eax movq %rax, -0x20(%rbx) movq $0x0, -0x18(%rbx) xorl %eax, %eax jmp 0x40ddf movq 0x18(%r14), %rdi movq %r15, %rsi movq %rbp, %rdx jmp 0x40dc0 callq 0xe090
js_binary_logic_slow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15d, edx mov rbx, rsi mov r14, rdi mov rsi, [rsi-20h] mov rdx, [rbx-18h] movups xmm0, xmmword ptr [rbx-10h] movaps [rsp+68h+var_48], xmm0 mov ecx, 1 call JS_ToNumberHintFree mov r12, rdx mov rsi, qword ptr [rsp+68h+var_48] mov rdx, qword ptr [rsp+68h+var_48+8] cmp r12d, 6 jnz short loc_40D8F mov rdi, [r14+18h] jmp short loc_40DC0 loc_40D8F: mov r13, rax mov [rsp+68h+var_38], r15 mov rdi, r14 mov ecx, 1 call JS_ToNumberHintFree mov rbp, rdx mov qword ptr [rsp+68h+var_48], rax mov qword ptr [rsp+68h+var_48+8], rdx cmp ebp, 6 jnz short loc_40DEE mov rdi, [r14+18h] mov rsi, r13 mov rdx, r12 loc_40DC0: call JS_FreeValueRT loc_40DC5: xor eax, eax mov [rbx-20h], eax mov ecx, 3 mov [rbx-18h], rcx mov [rbx-10h], eax mov [rbx-8], rcx mov eax, 0FFFFFFFFh loc_40DDF: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_40DEE: mov r15, rax cmp r12d, 0FFFFFFF7h jz short loc_40E61 cmp ebp, 0FFFFFFF7h jz short loc_40E61 lea rsi, [rsp+68h+var_4C] mov rdi, r14 mov rdx, r13 mov rcx, r12 call JS_ToInt32Free test eax, eax jnz loc_40F01 lea rsi, [rsp+68h+var_50] mov rdi, r14 mov rdx, r15 mov rcx, rbp call JS_ToInt32Free test eax, eax jnz short loc_40DC5 mov rcx, [rsp+68h+var_38] add ecx, 0FFFFFF61h; switch 6 cases cmp ecx, 5 ja def_40E50; jumptable 0000000000040E50 default case, case 161 lea rax, jpt_40E50 movsxd rcx, ds:(jpt_40E50 - 9CBF0h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_40E52: mov eax, [rsp+68h+var_4C]; jumptable 0000000000040E50 case 159 mov cl, byte ptr [rsp+68h+var_50] shl eax, cl jmp loc_40EEC loc_40E61: cmp r12d, ebp jnz short loc_40E90 lea rdx, [rbx-20h] movaps xmm0, [rsp+68h+var_48] movups [rsp+68h+var_68], xmm0 mov rdi, r14 mov rsi, [rsp+68h+var_38] mov rcx, r13 mov r8, r12 call js_binary_arith_bigint test eax, eax jnz loc_40DC5 jmp short loc_40EFA loc_40E90: mov rdi, [r14+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT mov rdi, [r14+18h] mov rsi, r15 mov rdx, rbp call JS_FreeValueRT lea rsi, aBothOperandsMu; "both operands must be BigInt" mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp loc_40DC5 loc_40EC4: mov eax, [rsp+68h+var_50]; jumptable 0000000000040E50 case 164 or eax, [rsp+68h+var_4C] jmp short loc_40EEC loc_40ECE: mov eax, [rsp+68h+var_50]; jumptable 0000000000040E50 case 162 and eax, [rsp+68h+var_4C] jmp short loc_40EEC loc_40ED8: mov eax, [rsp+68h+var_50]; jumptable 0000000000040E50 case 163 xor eax, [rsp+68h+var_4C] jmp short loc_40EEC loc_40EE2: mov eax, [rsp+68h+var_4C]; jumptable 0000000000040E50 case 160 mov cl, byte ptr [rsp+68h+var_50] sar eax, cl loc_40EEC: mov eax, eax mov [rbx-20h], rax mov qword ptr [rbx-18h], 0 loc_40EFA: xor eax, eax jmp loc_40DDF loc_40F01: mov rdi, [r14+18h] mov rsi, r15 mov rdx, rbp jmp loc_40DC0 def_40E50: call _abort; jumptable 0000000000040E50 default case, case 161
long long js_binary_logic_slow( long long a1, long long a2, unsigned int a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // r15 long long v13; // rsi long long v14; // rdx __m128 v15; // xmm0 long long v16; // rax long long v17; // rdx long long v18; // r12 unsigned __int128 v19; // kr00_16 long long v20; // rdi _DWORD *v21; // r13 __m128 v22; // rax int v23; // r9d long long v24; // rbp _DWORD *v26; // r15 unsigned int v27; // eax long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 __m128 v32; // xmm4 __m128 v33; // xmm5 char v34; // [rsp+0h] [rbp-68h] int v35; // [rsp+18h] [rbp-50h] BYREF int v36; // [rsp+1Ch] [rbp-4Ch] BYREF __m128 v37; // [rsp+20h] [rbp-48h] long long v38; // [rsp+30h] [rbp-38h] v11 = a3; v13 = *(_QWORD *)(a2 - 32); v14 = *(_QWORD *)(a2 - 24); v15 = *(__m128 *)(a2 - 16); v37 = v15; v16 = JS_ToNumberHintFree(a1, v13, v14, 1LL); v18 = v17; v19 = (unsigned __int128)v15; if ( (_DWORD)v17 == 6 ) { v20 = *(_QWORD *)(a1 + 24); LABEL_5: JS_FreeValueRT(v20, (_DWORD *)v19, *((long long *)&v19 + 1)); goto LABEL_6; } v21 = (_DWORD *)v16; v38 = v11; v22.m128_u64[0] = JS_ToNumberHintFree(a1, v37.m128_u64[0], v37.m128_u64[1], 1LL); v24 = v22.m128_i64[1]; v37 = v22; if ( v22.m128_i32[2] == 6 ) { v20 = *(_QWORD *)(a1 + 24); v19 = __PAIR128__(v18, (unsigned long long)v21); goto LABEL_5; } v26 = (_DWORD *)v22.m128_u64[0]; if ( (_DWORD)v18 == -9 || v22.m128_i32[2] == -9 ) { if ( (_DWORD)v18 != v22.m128_i32[2] ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v21, v18); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v24); JS_ThrowTypeError( a1, (long long)"both operands must be BigInt", v28, v29, v30, v31, v15, a5, a6, a7, v32, v33, a10, a11, v34); goto LABEL_6; } if ( (unsigned int)js_binary_arith_bigint( a1, v38, (int)a2 - 32, (_DWORD)v21, v18, v23, v37.m128_i64[0], v37.m128_i64[1]) ) { LABEL_6: *(_DWORD *)(a2 - 32) = 0; *(_QWORD *)(a2 - 24) = 3LL; *(_DWORD *)(a2 - 16) = 0; *(_QWORD *)(a2 - 8) = 3LL; return 0xFFFFFFFFLL; } } else { if ( (unsigned int)JS_ToInt32Free(a1, &v36, (unsigned long long)v21, v18) ) { v20 = *(_QWORD *)(a1 + 24); v19 = __PAIR128__(v24, (unsigned long long)v26); goto LABEL_5; } if ( (unsigned int)JS_ToInt32Free(a1, &v35, (unsigned long long)v26, v24) ) goto LABEL_6; switch ( (int)v38 ) { case 159: v27 = v36 << v35; break; case 160: v27 = v36 >> v35; break; case 162: v27 = v36 & v35; break; case 163: v27 = v36 ^ v35; break; case 164: v27 = v36 | v35; break; default: abort((const char *)a1); } *(_QWORD *)(a2 - 32) = v27; *(_QWORD *)(a2 - 24) = 0LL; } return 0LL; }
js_binary_logic_slow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15D,EDX MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI + -0x20] MOV RDX,qword ptr [RBX + -0x18] MOVUPS XMM0,xmmword ptr [RBX + -0x10] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV ECX,0x1 CALL 0x00142b20 MOV R12,RDX MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] CMP R12D,0x6 JNZ 0x00140d8f MOV RDI,qword ptr [R14 + 0x18] JMP 0x00140dc0 LAB_00140d8f: MOV R13,RAX MOV qword ptr [RSP + 0x30],R15 MOV RDI,R14 MOV ECX,0x1 CALL 0x00142b20 MOV RBP,RDX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX CMP EBP,0x6 JNZ 0x00140dee MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R13 MOV RDX,R12 LAB_00140dc0: CALL 0x0011d8c6 LAB_00140dc5: XOR EAX,EAX MOV dword ptr [RBX + -0x20],EAX MOV ECX,0x3 MOV qword ptr [RBX + -0x18],RCX MOV dword ptr [RBX + -0x10],EAX MOV qword ptr [RBX + -0x8],RCX MOV EAX,0xffffffff LAB_00140ddf: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00140dee: MOV R15,RAX CMP R12D,-0x9 JZ 0x00140e61 CMP EBP,-0x9 JZ 0x00140e61 LEA RSI,[RSP + 0x1c] MOV RDI,R14 MOV RDX,R13 MOV RCX,R12 CALL 0x001279c3 TEST EAX,EAX JNZ 0x00140f01 LEA RSI,[RSP + 0x18] MOV RDI,R14 MOV RDX,R15 MOV RCX,RBP CALL 0x001279c3 TEST EAX,EAX JNZ 0x00140dc5 MOV RCX,qword ptr [RSP + 0x30] ADD ECX,0xffffff61 CMP ECX,0x5 JA 0x00140f10 LEA RAX,[0x19cbf0] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_9f: MOV EAX,dword ptr [RSP + 0x1c] MOV CL,byte ptr [RSP + 0x18] SHL EAX,CL JMP 0x00140eec LAB_00140e61: CMP R12D,EBP JNZ 0x00140e90 LEA RDX,[RBX + -0x20] MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x30] MOV RCX,R13 MOV R8,R12 CALL 0x0014267f TEST EAX,EAX JNZ 0x00140dc5 JMP 0x00140efa LAB_00140e90: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 MOV RDX,RBP CALL 0x0011d8c6 LEA RSI,[0x19f688] MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x00140dc5 caseD_a4: MOV EAX,dword ptr [RSP + 0x18] OR EAX,dword ptr [RSP + 0x1c] JMP 0x00140eec caseD_a2: MOV EAX,dword ptr [RSP + 0x18] AND EAX,dword ptr [RSP + 0x1c] JMP 0x00140eec caseD_a3: MOV EAX,dword ptr [RSP + 0x18] XOR EAX,dword ptr [RSP + 0x1c] JMP 0x00140eec caseD_a0: MOV EAX,dword ptr [RSP + 0x1c] MOV CL,byte ptr [RSP + 0x18] SAR EAX,CL LAB_00140eec: MOV EAX,EAX MOV qword ptr [RBX + -0x20],RAX MOV qword ptr [RBX + -0x18],0x0 LAB_00140efa: XOR EAX,EAX JMP 0x00140ddf LAB_00140f01: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 MOV RDX,RBP JMP 0x00140dc0 caseD_a1: CALL 0x0010e090
int8 js_binary_logic_slow (long param_1,long param_2,uint param_3,int8 param_4,int8 param_5, int8 param_6) { int iVar1; int8 uVar2; int iVar3; int8 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; uint local_50; uint local_4c; int1 local_48 [16]; ulong local_38; local_48._0_8_ = *(int8 *)(param_2 + -0x10); local_48._8_8_ = *(int8 *)(param_2 + -8); auVar5 = JS_ToNumberHintFree(param_1,*(int8 *)(param_2 + -0x20), *(int8 *)(param_2 + -0x18),1); uVar2 = auVar5._8_8_; uVar4 = auVar5._0_8_; iVar1 = auVar5._8_4_; if (iVar1 == 6) { uVar4 = *(int8 *)(param_1 + 0x18); auVar5 = local_48; } else { local_38 = (ulong)param_3; auVar6 = JS_ToNumberHintFree(param_1,local_48._0_8_,local_48._8_8_,1); iVar3 = auVar6._8_4_; local_48 = auVar6; if (iVar3 == 6) { uVar4 = *(int8 *)(param_1 + 0x18); } else { if ((iVar1 == -9) || (iVar3 == -9)) { if (iVar1 == iVar3) { local_48._0_4_ = auVar6._0_4_; iVar1 = js_binary_arith_bigint (param_1,local_38,param_2 + -0x20,uVar4,uVar2,param_6,local_48._0_4_, iVar3); local_48 = auVar6; if (iVar1 == 0) { return 0; } } else { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); JS_ThrowTypeError(param_1,"both operands must be BigInt"); } goto LAB_00140dc5; } iVar1 = JS_ToInt32Free(param_1,&local_4c,uVar4,uVar2); if (iVar1 == 0) { iVar1 = JS_ToInt32Free(param_1,&local_50,auVar6._0_8_,auVar6._8_8_); if (iVar1 == 0) { switch((int)local_38) { case 0x9f: local_50 = local_4c << ((byte)local_50 & 0x1f); break; case 0xa0: local_50 = (int)local_4c >> ((byte)local_50 & 0x1f); break; default: /* WARNING: Subroutine does not return */ abort(); case 0xa2: local_50 = local_50 & local_4c; break; case 0xa3: local_50 = local_50 ^ local_4c; break; case 0xa4: local_50 = local_50 | local_4c; } *(ulong *)(param_2 + -0x20) = (ulong)local_50; *(int8 *)(param_2 + -0x18) = 0; return 0; } goto LAB_00140dc5; } uVar4 = *(int8 *)(param_1 + 0x18); auVar5 = auVar6; } } JS_FreeValueRT(uVar4,auVar5._0_8_,auVar5._8_8_); LAB_00140dc5: *(int4 *)(param_2 + -0x20) = 0; *(int8 *)(param_2 + -0x18) = 3; *(int4 *)(param_2 + -0x10) = 0; *(int8 *)(param_2 + -8) = 3; return 0xffffffff; }
47,972
mysql_list_processes_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_processes_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_processes, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O0
c
mysql_list_processes_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x24a70 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_list_processes_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_list_processes mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+8], rcx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_list_processes_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_QWORD *)(v2 + 8) = mysql_list_processes(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_list_processes_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00124a70 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_list_processes_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_processes(*param_1); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
47,973
write_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
static my_bool write_dynamic_record(MARIA_HA *info, const uchar *record, ulong reclength) { int flag; ulong length; my_off_t filepos; DBUG_ENTER("write_dynamic_record"); flag=0; /* Check if we have enough room for the new record. First we do simplified check to make usual case faster. Then we do more precise check for the space left. Though it still is not absolutely precise, as we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be less in the most of the cases. */ if (unlikely(info->s->base.max_data_file_length - info->state->data_file_length < reclength + MARIA_MAX_DYN_BLOCK_HEADER)) { if (info->s->base.max_data_file_length - info->state->data_file_length + info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER < reclength + MARIA_MAX_DYN_BLOCK_HEADER) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(1); } } do { if (_ma_find_writepos(info,reclength,&filepos,&length)) goto err; if (_ma_write_part_record(info,filepos,length, (info->append_insert_at_end ? HA_OFFSET_ERROR : info->s->state.dellink), (uchar**) &record,&reclength,&flag)) goto err; } while (reclength); DBUG_RETURN(0); err: DBUG_RETURN(1); }
O0
c
write_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x368(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx subq 0x28(%rcx), %rax movq -0x20(%rbp), %rcx addq $0x14, %rcx cmpq %rcx, %rax setb %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x3c114 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x368(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx subq 0x28(%rcx), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx addq 0x10(%rcx), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx imulq $0x14, 0x8(%rcx), %rcx subq %rcx, %rax movq -0x20(%rbp), %rcx addq $0x14, %rcx cmpq %rcx, %rax jae 0x3c112 callq 0xf6090 movl $0x87, (%rax) movb $0x1, -0x1(%rbp) jmp 0x3c1c3 jmp 0x3c114 jmp 0x3c116 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x38(%rbp), %rdx leaq -0x30(%rbp), %rcx callq 0x411a0 cmpl $0x0, %eax je 0x3c135 jmp 0x3c1bd movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movsbl 0x681(%rax), %eax cmpl $0x0, %eax je 0x3c16a movq $-0x1, %rax movq %rax, -0x58(%rbp) jmp 0x3c17c movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rax movq %rax, -0x58(%rbp) movq -0x40(%rbp), %rdx movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdi movq -0x58(%rbp), %rcx leaq -0x18(%rbp), %r8 leaq -0x20(%rbp), %r9 leaq -0x24(%rbp), %rax movq %rax, (%rsp) callq 0x3d200 cmpl $0x0, %eax je 0x3c1a8 jmp 0x3c1bd jmp 0x3c1aa cmpq $0x0, -0x20(%rbp) jne 0x3c116 jmp 0x3c1b7 movb $0x0, -0x1(%rbp) jmp 0x3c1c3 jmp 0x3c1bf movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopl (%rax)
write_dynamic_record: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], 0 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+368h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] sub rax, [rcx+28h] mov rcx, [rbp+var_20] add rcx, 14h cmp rax, rcx setb al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_3C114 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+368h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] sub rax, [rcx+28h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] add rax, [rcx+10h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] imul rcx, [rcx+8], 14h sub rax, rcx mov rcx, [rbp+var_20] add rcx, 14h cmp rax, rcx jnb short loc_3C112 call _my_thread_var mov dword ptr [rax], 87h mov [rbp+var_1], 1 jmp loc_3C1C3 loc_3C112: jmp short $+2 loc_3C114: jmp short $+2 loc_3C116: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] lea rdx, [rbp+var_38] lea rcx, [rbp+var_30] call _ma_find_writepos cmp eax, 0 jz short loc_3C135 jmp loc_3C1BD loc_3C135: mov rax, [rbp+var_10] mov [rbp+var_50], rax mov rax, [rbp+var_38] mov [rbp+var_48], rax mov rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_10] movsx eax, byte ptr [rax+681h] cmp eax, 0 jz short loc_3C16A mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_58], rax jmp short loc_3C17C loc_3C16A: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+0C8h] mov [rbp+var_58], rax loc_3C17C: mov rdx, [rbp+var_40] mov rsi, [rbp+var_48] mov rdi, [rbp+var_50] mov rcx, [rbp+var_58] lea r8, [rbp+var_18] lea r9, [rbp+var_20] lea rax, [rbp+var_24] mov [rsp+60h+var_60], rax call _ma_write_part_record cmp eax, 0 jz short loc_3C1A8 jmp short loc_3C1BD loc_3C1A8: jmp short $+2 loc_3C1AA: cmp [rbp+var_20], 0 jnz loc_3C116 jmp short $+2 loc_3C1B7: mov [rbp+var_1], 0 jmp short loc_3C1C3 loc_3C1BD: jmp short $+2 loc_3C1BF: mov [rbp+var_1], 1 loc_3C1C3: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char write_dynamic_record(_QWORD *a1, long long a2, long long a3) { long long v5; // [rsp+28h] [rbp-38h] BYREF long long v6; // [rsp+30h] [rbp-30h] BYREF int v7; // [rsp+3Ch] [rbp-24h] BYREF long long v8; // [rsp+40h] [rbp-20h] BYREF long long v9; // [rsp+48h] [rbp-18h] BYREF _QWORD *v10; // [rsp+50h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = 0; if ( *(_QWORD *)(*a1 + 872LL) - *(_QWORD *)(a1[4] + 40LL) >= (unsigned long long)(a3 + 20) || *(_QWORD *)(v10[4] + 16LL) + *(_QWORD *)(*v10 + 872LL) - *(_QWORD *)(v10[4] + 40LL) - 20LL * *(_QWORD *)(v10[4] + 8LL) >= (unsigned long long)(v8 + 20) ) { while ( !(unsigned int)ma_find_writepos(v10, v8, &v5, &v6) ) { if ( *((_BYTE *)v10 + 1665) ? ma_write_part_record((_DWORD)v10, v5, v6, -1, (unsigned int)&v9, (unsigned int)&v8, (long long)&v7) : (unsigned int)ma_write_part_record( (_DWORD)v10, v5, v6, *(_QWORD *)(*v10 + 200LL), (unsigned int)&v9, (unsigned int)&v8, (long long)&v7) ) { break; } if ( !v8 ) return 0; } return 1; } else { *(_DWORD *)my_thread_var() = 135; return 1; } }
write_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x368] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x14 CMP RAX,RCX SETC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0013c114 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x368] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] ADD RAX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] IMUL RCX,qword ptr [RCX + 0x8],0x14 SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x14 CMP RAX,RCX JNC 0x0013c112 CALL 0x001f6090 MOV dword ptr [RAX],0x87 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013c1c3 LAB_0013c112: JMP 0x0013c114 LAB_0013c114: JMP 0x0013c116 LAB_0013c116: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] LEA RDX,[RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x001411a0 CMP EAX,0x0 JZ 0x0013c135 JMP 0x0013c1bd LAB_0013c135: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x681] CMP EAX,0x0 JZ 0x0013c16a MOV RAX,-0x1 MOV qword ptr [RBP + -0x58],RAX JMP 0x0013c17c LAB_0013c16a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xc8] MOV qword ptr [RBP + -0x58],RAX LAB_0013c17c: MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] LEA R8,[RBP + -0x18] LEA R9,[RBP + -0x20] LEA RAX,[RBP + -0x24] MOV qword ptr [RSP],RAX CALL 0x0013d200 CMP EAX,0x0 JZ 0x0013c1a8 JMP 0x0013c1bd LAB_0013c1a8: JMP 0x0013c1aa LAB_0013c1aa: CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0013c116 JMP 0x0013c1b7 LAB_0013c1b7: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013c1c3 LAB_0013c1bd: JMP 0x0013c1bf LAB_0013c1bf: MOV byte ptr [RBP + -0x1],0x1 LAB_0013c1c3: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 write_dynamic_record(long *param_1,int8 param_2,long param_3) { int iVar1; int4 *puVar2; int8 local_60; int8 local_40; int8 local_38; int4 local_2c; long local_28; int8 local_20; long *local_18; int1 local_9; local_2c = 0; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (((ulong)(*(long *)(*param_1 + 0x368) - *(long *)(param_1[4] + 0x28)) < param_3 + 0x14U) && ((ulong)((*(long *)(*param_1 + 0x368) - *(long *)(param_1[4] + 0x28)) + *(long *)(param_1[4] + 0x10) + *(long *)(param_1[4] + 8) * -0x14) < param_3 + 0x14U)) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; local_9 = 1; } else { do { iVar1 = _ma_find_writepos(local_18,local_28,&local_40,&local_38); if (iVar1 != 0) { return 1; } if (*(char *)((long)local_18 + 0x681) == '\0') { local_60 = *(int8 *)(*local_18 + 200); } else { local_60 = 0xffffffffffffffff; } iVar1 = _ma_write_part_record (local_18,local_40,local_38,local_60,&local_20,&local_28,&local_2c); if (iVar1 != 0) { return 1; } } while (local_28 != 0); local_9 = 0; } return local_9; }
47,974
my_mb_wc_sjis
eloqsql/strings/ctype-sjis.c
static int my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= sjis_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]])) return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O0
c
my_mb_wc_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xa4e8a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xa4fe8 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0xa4eb2 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xa4fe8 cmpl $0xa1, -0x2c(%rbp) jl 0xa4ee8 cmpl $0xdf, -0x2c(%rbp) jg 0xa4ee8 movslq -0x2c(%rbp), %rcx leaq 0x23dfb1(%rip), %rax # 0x2e2e80 movzwl (%rax,%rcx,2), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xa4fe8 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xa4f02 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xa4fe8 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x23df64(%rip), %rax # 0x2e2e80 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0xa4fe1 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0xa4f4d movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0x9f, %eax jle 0xa4f74 movl -0x2c(%rbp), %eax movzbl %al, %edx xorl %eax, %eax movl $0xe0, %ecx cmpl %edx, %ecx movb %al, -0x2d(%rbp) jg 0xa4fcc movl -0x2c(%rbp), %eax movzbl %al, %ecx xorl %eax, %eax cmpl $0xfc, %ecx movb %al, -0x2d(%rbp) jg 0xa4fcc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0xa4f97 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0x7e, %ecx movb %al, -0x2e(%rbp) jle 0xa4fc6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %edx xorl %eax, %eax movl $0x80, %ecx cmpl %edx, %ecx movb %al, -0x2f(%rbp) jg 0xa4fc0 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfc, %eax setle %al movb %al, -0x2f(%rbp) movb -0x2f(%rbp), %al movb %al, -0x2e(%rbp) movb -0x2e(%rbp), %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %dl xorl %eax, %eax movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0xa4fe8 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_sjis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_A4E8A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_A4FE8 loc_A4E8A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_A4EB2 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_A4FE8 loc_A4EB2: cmp [rbp+var_2C], 0A1h jl short loc_A4EE8 cmp [rbp+var_2C], 0DFh jg short loc_A4EE8 movsxd rcx, [rbp+var_2C] lea rax, sjis_to_unicode movzx eax, word ptr [rax+rcx*2] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_A4FE8 loc_A4EE8: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_A4F02 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_A4FE8 loc_A4F02: mov eax, [rbp+var_2C] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax lea rax, sjis_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz loc_A4FE1 mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_A4F4D mov eax, [rbp+var_2C] movzx eax, al cmp eax, 9Fh jle short loc_A4F74 loc_A4F4D: mov eax, [rbp+var_2C] movzx edx, al xor eax, eax mov ecx, 0E0h cmp ecx, edx mov [rbp+var_2D], al jg short loc_A4FCC mov eax, [rbp+var_2C] movzx ecx, al xor eax, eax cmp ecx, 0FCh mov [rbp+var_2D], al jg short loc_A4FCC loc_A4F74: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_A4F97 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 7Eh ; '~' mov [rbp+var_2E], al jle short loc_A4FC6 loc_A4F97: mov rax, [rbp+var_20] movzx edx, byte ptr [rax+1] xor eax, eax mov ecx, 80h cmp ecx, edx mov [rbp+var_2F], al jg short loc_A4FC0 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FCh setle al mov [rbp+var_2F], al loc_A4FC0: mov al, [rbp+var_2F] mov [rbp+var_2E], al loc_A4FC6: mov al, [rbp+var_2E] mov [rbp+var_2D], al loc_A4FCC: mov dl, [rbp+var_2D] xor eax, eax mov ecx, 0FFFFFFFEh test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_A4FE8 loc_A4FE1: mov [rbp+var_4], 2 loc_A4FE8: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long v4; // rax unsigned int v5; // eax bool v7; // [rsp+1h] [rbp-2Fh] char v8; // [rsp+2h] [rbp-2Eh] char v9; // [rsp+3h] [rbp-2Dh] unsigned int v10; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v10 = *a3; if ( v10 >= 0x80 ) { if ( *a3 < 0xA1u || *a3 > 0xDFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v4 = sjis_to_unicode[a3[1] + (v10 << 8)]; *a2 = v4; if ( v4 ) { return 2; } else { if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu || (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) ) { if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) ) { v7 = 0; if ( a3[1] >= 0x80u ) v7 = a3[1] <= 0xFCu; v8 = v7; } v9 = v8; } v5 = 0; if ( (v9 & 1) != 0 ) return (unsigned int)-2; return v5; } } else { return (unsigned int)-102; } } else { *a2 = sjis_to_unicode[*a3]; return 1; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001a4e8a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001a4fe8 LAB_001a4e8a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x001a4eb2 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001a4fe8 LAB_001a4eb2: CMP dword ptr [RBP + -0x2c],0xa1 JL 0x001a4ee8 CMP dword ptr [RBP + -0x2c],0xdf JG 0x001a4ee8 MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x3e2e80] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001a4fe8 LAB_001a4ee8: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001a4f02 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001a4fe8 LAB_001a4f02: MOV EAX,dword ptr [RBP + -0x2c] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x3e2e80] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x001a4fe1 MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x001a4f4d MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0x9f JLE 0x001a4f74 LAB_001a4f4d: MOV EAX,dword ptr [RBP + -0x2c] MOVZX EDX,AL XOR EAX,EAX MOV ECX,0xe0 CMP ECX,EDX MOV byte ptr [RBP + -0x2d],AL JG 0x001a4fcc MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL XOR EAX,EAX CMP ECX,0xfc MOV byte ptr [RBP + -0x2d],AL JG 0x001a4fcc LAB_001a4f74: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x001a4f97 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0x7e MOV byte ptr [RBP + -0x2e],AL JLE 0x001a4fc6 LAB_001a4f97: MOV RAX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RAX + 0x1] XOR EAX,EAX MOV ECX,0x80 CMP ECX,EDX MOV byte ptr [RBP + -0x2f],AL JG 0x001a4fc0 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfc SETLE AL MOV byte ptr [RBP + -0x2f],AL LAB_001a4fc0: MOV AL,byte ptr [RBP + -0x2f] MOV byte ptr [RBP + -0x2e],AL LAB_001a4fc6: MOV AL,byte ptr [RBP + -0x2e] MOV byte ptr [RBP + -0x2d],AL LAB_001a4fcc: MOV DL,byte ptr [RBP + -0x2d] XOR EAX,EAX MOV ECX,0xfffffffe TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001a4fe8 LAB_001a4fe1: MOV dword ptr [RBP + -0x4],0x2 LAB_001a4fe8: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { ushort uVar1; bool bVar2; uint uVar3; int4 local_c; if (param_3 < param_4) { uVar3 = (uint)*param_3; if (uVar3 < 0x80) { *param_2 = (long)(int)uVar3; local_c = 1; } else if ((uVar3 < 0xa1) || (0xdf < uVar3)) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { if ((((0x80 < uVar3) && (uVar3 < 0xa0)) || ((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) && (((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) && (bVar2 = false, 0x7f < param_3[1])))) { bVar2 = param_3[1] < 0xfd; } local_c = 0; if (bVar2) { local_c = 0xfffffffe; } } else { local_c = 2; } } } else { *param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2); local_c = 1; } } else { local_c = 0xffffff9b; } return local_c; }
47,975
Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM*, Field*, KEY_PART*, Item_func::Functype, Item*)
eloqsql/sql/opt_range.cc
SEL_ARG * Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param, Field *field, KEY_PART *key_part, Item_func::Functype functype, Item *value) { DBUG_ENTER("Item_bool_func::get_mm_leaf"); DBUG_ASSERT(value); // IS NULL and IS NOT NULL are handled separately if (key_part->image_type != Field::itRAW) DBUG_RETURN(0); // e.g. SPATIAL index DBUG_RETURN(field->get_mm_leaf(param, key_part, this, functype_to_scalar_comparison_op(functype), value)); }
O0
cpp
Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM*, Field*, KEY_PART*, Item_func::Functype, Item*): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x8ba7da movq -0x28(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0x8ba7f0 jmp 0x8ba7e6 movq $0x0, -0x8(%rbp) jmp 0x8ba836 jmp 0x8ba7f2 movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x2c(%rbp), %edi callq 0x8cb380 movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x40(%rbp), %rcx movl %eax, %r8d movq -0x38(%rbp), %r9 movq (%rdi), %rax callq *0x428(%rax) movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq
_ZN14Item_bool_func11get_mm_leafEP15RANGE_OPT_PARAMP5FieldP8KEY_PARTN9Item_func8FunctypeEP4Item: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov [rbp+var_40], rax jmp short $+2 loc_8BA7DA: mov rax, [rbp+var_28] cmp dword ptr [rax+18h], 0 jz short loc_8BA7F0 jmp short $+2 loc_8BA7E6: mov [rbp+var_8], 0 jmp short loc_8BA836 loc_8BA7F0: jmp short $+2 loc_8BA7F2: mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov edi, [rbp+var_2C] call _ZN9Item_func32functype_to_scalar_comparison_opENS_8FunctypeE; Item_func::functype_to_scalar_comparison_op(Item_func::Functype) mov rdi, [rbp+var_58] mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] mov rcx, [rbp+var_40] mov r8d, eax mov r9, [rbp+var_38] mov rax, [rdi] call qword ptr [rax+428h] mov [rbp+var_8], rax loc_8BA836: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long Item_bool_func::get_mm_leaf( long long a1, long long a2, long long a3, long long a4, unsigned int a5, long long a6) { unsigned int v6; // eax if ( *(_DWORD *)(a4 + 24) ) return 0LL; v6 = Item_func::functype_to_scalar_comparison_op(a5); return (*(long long ( **)(long long, long long, long long, long long, _QWORD, long long))(*(_QWORD *)a3 + 1064LL))( a3, a2, a4, a1, v6, a6); }
__cxx_global_var_init.73: PUSH RBP MOV RBP,RSP LEA RDI,[0x1e7e2b0] CALL 0x00e757e0 LEA RDI,[0xe75820] LEA RSI,[0x1e7e2b0] LEA RDX,[0x1c3c008] CALL 0x00875dc0 POP RBP RET
void __cxx_global_var_init_73(void) { Create_func_hex::Create_func_hex((Create_func_hex *)&Create_func_hex::s_singleton); __cxa_atexit(Create_func_hex::~Create_func_hex,&Create_func_hex::s_singleton,&__dso_handle); return; }
47,976
my_wc_mb_latin1
eloqsql/strings/ctype-latin1.c
static int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; if (wc > 0xFFFF) return MY_CS_ILUNI; pl= uni_to_cs[wc >> 8]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O3
c
my_wc_mb_latin1: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb2ccc xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xb2ccc pushq %rbp movq %rsp, %rbp movq %rsi, %rax shrq $0x8, %rax leaq 0x2ca31b(%rip), %rcx # 0x37cfc0 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0xb2cb7 movzbl %sil, %ecx movb (%rax,%rcx), %al jmp 0xb2cb9 xorl %eax, %eax movb %al, (%rdx) testb %al, %al setne %al testq %rsi, %rsi sete %cl orb %al, %cl movzbl %cl, %eax popq %rbp retq
my_wc_mb_latin1: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_B2CCC xor eax, eax cmp rsi, 0FFFFh ja short locret_B2CCC push rbp mov rbp, rsp mov rax, rsi shr rax, 8 lea rcx, uni_to_cs mov rax, [rcx+rax*8] test rax, rax jz short loc_B2CB7 movzx ecx, sil mov al, [rax+rcx] jmp short loc_B2CB9 loc_B2CB7: xor eax, eax loc_B2CB9: mov [rdx], al test al, al setnz al test rsi, rsi setz cl or cl, al movzx eax, cl pop rbp locret_B2CCC: retn
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rax char v6; // al result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = (long long)*(&uni_to_cs + (a2 >> 8)); if ( v5 ) v6 = *(_BYTE *)(v5 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; return (v6 != 0) | (unsigned __int8)(a2 == 0); } } return result; }
my_wc_mb_latin1: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b2ccc XOR EAX,EAX CMP RSI,0xffff JA 0x001b2ccc PUSH RBP MOV RBP,RSP MOV RAX,RSI SHR RAX,0x8 LEA RCX,[0x47cfc0] MOV RAX,qword ptr [RCX + RAX*0x8] TEST RAX,RAX JZ 0x001b2cb7 MOVZX ECX,SIL MOV AL,byte ptr [RAX + RCX*0x1] JMP 0x001b2cb9 LAB_001b2cb7: XOR EAX,EAX LAB_001b2cb9: MOV byte ptr [RDX],AL TEST AL,AL SETNZ AL TEST RSI,RSI SETZ CL OR CL,AL MOVZX EAX,CL POP RBP LAB_001b2ccc: RET
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; ulong uVar2; uVar2 = 0xffffff9b; if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) { if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0'); } return uVar2; }
47,977
test_fetch_long
eloqsql/tests/mysql_client_test.c
static void test_fetch_long() { int rc; myheader("test_fetch_long"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 int unsigned, \ c2 int unsigned, \ c3 int, \ c4 int, \ c5 int, \ c6 int unsigned, \ c7 int)"); myquery(rc); bind_fetch(4); }
O3
c
test_fetch_long: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax cmpb $0x1, 0x3d7d5d(%rip) # 0x41a4c1 jg 0x427df movq 0x35d853(%rip), %rbx # 0x39ffc0 movq (%rbx), %rdi leaq 0x9cd4d(%rip), %rdx # 0xdf4c4 movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi movl 0x3d7f80(%rip), %ecx # 0x41a70c leal 0x1(%rcx), %eax movl %eax, 0x3d7f77(%rip) # 0x41a70c movl 0x3d7f6c(%rip), %r8d # 0x41a708 movl 0x3d7d49(%rip), %r9d # 0x41a4ec leaq 0x9d09b(%rip), %rax # 0xdf845 movq %rax, (%rsp) leaq 0x9e017(%rip), %rdx # 0xe07cc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi leaq 0x9cd31(%rip), %rdx # 0xdf4fc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi callq 0x394b0 movq 0x3d7ce2(%rip), %rdi # 0x41a4c8 leaq 0x9f284(%rip), %rsi # 0xe1a71 callq 0x3b116 testl %eax, %eax jne 0x4281d movq 0x3d7ccb(%rip), %rdi # 0x41a4c8 leaq 0x9f64a(%rip), %rsi # 0xe1e4e callq 0x3b116 testl %eax, %eax jne 0x4283c movl $0x4, %edi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x41f62 xorl %edi, %edi callq 0x3ba57 leaq 0x9c581(%rip), %rdi # 0xdedac leaq 0xb288d(%rip), %rdx # 0xf50bf movl $0x10ca, %esi # imm = 0x10CA callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x9c562(%rip), %rdi # 0xdedac leaq 0xb286e(%rip), %rdx # 0xf50bf movl $0x10d3, %esi # imm = 0x10D3 callq 0x3bb30
test_fetch_long: push rbp mov rbp, rsp push rbx push rax cmp cs:opt_silent, 1 jg short loc_427DF mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, asc_DF4C4; "\n\n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] mov ecx, cs:test_count lea eax, [rcx+1] mov cs:test_count, eax mov r8d, cs:iter_count mov r9d, cs:opt_count lea rax, aTestFetchLong; "test_fetch_long" mov [rsp+10h+var_10], rax lea rdx, aUOfUUS; "%u of (%u/%u): %s" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] lea rdx, asc_DF4FC; " \n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush loc_427DF: mov rdi, cs:mysql lea rsi, aDropTableIfExi_7; "DROP TABLE IF EXISTS test_bind_fetch" call wrap_mysql_query test eax, eax jnz short loc_4281D mov rdi, cs:mysql lea rsi, aCreateTableTes_4; "CREATE TABLE test_bind_fetch(c1 int uns"... call wrap_mysql_query test eax, eax jnz short loc_4283C mov edi, 4 add rsp, 8 pop rbx pop rbp jmp bind_fetch loc_4281D: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 10CAh call die loc_4283C: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 10D3h call die
void test_fetch_long() { int v0; // ecx if ( opt_silent <= 1 ) { __fprintf_chk(stdout, 1LL, "\n\n#####################################\n"); v0 = test_count++; __fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_fetch_long"); __fprintf_chk(stdout, 1LL, " \n#####################################\n"); fflush(stdout); } if ( !(unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS test_bind_fetch") ) { if ( !(unsigned int)wrap_mysql_query( mysql, (long long)"CREATE TABLE test_bind_fetch(c1 int unsigned, " " c2 int unsigned, c" "3 int, c4 int, " " c5 int, " " c6 int unsigned, c7 int)") ) JUMPOUT(0x41F62LL); print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 4307, "r == 0"); } print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 4298, "r == 0"); }
test_fetch_long: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CMP byte ptr [0x0051a4c1],0x1 JG 0x001427df MOV RBX,qword ptr [0x0049ffc0] MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4c4] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] MOV ECX,dword ptr [0x0051a70c] LEA EAX,[RCX + 0x1] MOV dword ptr [0x0051a70c],EAX MOV R8D,dword ptr [0x0051a708] MOV R9D,dword ptr [0x0051a4ec] LEA RAX,[0x1df845] MOV qword ptr [RSP],RAX LEA RDX,[0x1e07cc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4fc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] CALL 0x001394b0 LAB_001427df: MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e1a71] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0014281d MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e1e4e] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0014283c MOV EDI,0x4 ADD RSP,0x8 POP RBX POP RBP JMP 0x00141f62 LAB_0014281d: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x10ca CALL 0x0013bb30 LAB_0014283c: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x10d3 CALL 0x0013bb30
void test_fetch_long(void) { int *puVar1; int iVar2; puVar1 = PTR_stdout_0049ffc0; if (opt_silent < '\x02') { __fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n" ); iVar2 = test_count; test_count = test_count + 1; __fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar2,iter_count,opt_count, "test_fetch_long"); __fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n"); fflush(*(FILE **)puVar1); } iVar2 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS test_bind_fetch"); if (iVar2 == 0) { iVar2 = wrap_mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 int unsigned, c2 int unsigned, c3 int, c4 int, c5 int, c6 int unsigned, c7 int)" ); if (iVar2 == 0) { bind_fetch(4); return; } print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x10d3,"r == 0"); } print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x10ca,"r == 0"); }
47,978
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
monkey531[P]llama/common/json.hpp
inline char* format_buffer(char* buf, int len, int decimal_exponent, int min_exp, int max_exp) { JSON_ASSERT(min_exp < 0); JSON_ASSERT(max_exp > 0); const int k = len; const int n = len + decimal_exponent; // v = buf * 10^(n-k) // k is the length of the buffer (number of decimal digits) // n is the position of the decimal point relative to the start of the buffer. if (k <= n && n <= max_exp) { // digits[000] // len <= max_exp + 2 std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); // Make it look like a floating-point number (#362, #378) buf[n + 0] = '.'; buf[n + 1] = '0'; return buf + (static_cast<size_t>(n) + 2); } if (0 < n && n <= max_exp) { // dig.its // len <= max_digits10 + 1 JSON_ASSERT(k > n); std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); buf[n] = '.'; return buf + (static_cast<size_t>(k) + 1U); } if (min_exp < n && n <= 0) { // 0.[000]digits // len <= 2 + (-min_exp - 1) + max_digits10 std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); buf[0] = '0'; buf[1] = '.'; std::memset(buf + 2, '0', static_cast<size_t>(-n)); return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); } if (k == 1) { // dE+123 // len <= 1 + 5 buf += 1; } else { // d.igitsE+123 // len <= max_digits10 + 1 + 5 std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); buf[1] = '.'; buf += 1 + static_cast<size_t>(k); } *buf++ = 'e'; return append_exponent(buf, n - 1); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testl %ecx, %ecx jns 0x87e56 testl %r8d, %r8d jle 0x87e72 movq %rdi, %rbx leal (%rdx,%rsi), %r14d testl %edx, %edx sets %al cmpl %r8d, %r14d setg %dil orb %al, %dil je 0x87da5 cmpl %r8d, %r14d setg %al testl %r14d, %r14d setle %dil orb %al, %dil je 0x87dce testl %r14d, %r14d setg %al cmpl %ecx, %r14d setle %cl orb %al, %cl jne 0x87e12 negl %r14d leaq (%rbx,%r14), %r15 addq $0x2, %r15 movslq %esi, %r12 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x24e20 movw $0x2e30, (%rbx) # imm = 0x2E30 addq $0x2, %rbx pushq $0x30 popq %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x24500 addq %r12, %r15 jmp 0x87e03 movslq %esi, %rax leaq (%rbx,%rax), %rdi movslq %r14d, %r14 movq %r14, %rdx subq %rax, %rdx pushq $0x30 popq %rsi callq 0x24500 leaq (%rbx,%r14), %r15 addq $0x2, %r15 movw $0x302e, -0x2(%r15) # imm = 0x302E jmp 0x87e03 testl %edx, %edx jns 0x87e93 movl %r14d, %ecx leaq (%rbx,%rcx), %rax leaq (%rbx,%rcx), %r14 incq %r14 movl %esi, %r15d movq %r15, %rdx subq %rcx, %rdx movq %r14, %rdi movq %rax, %rsi callq 0x24e20 movb $0x2e, -0x1(%r14) addq %rbx, %r15 incq %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq cmpl $0x1, %esi je 0x87e35 leaq 0x2(%rbx), %rdi leaq 0x1(%rbx), %rax movslq %esi, %r15 leaq -0x1(%r15), %rdx movq %rax, %rsi callq 0x24e20 movb $0x2e, 0x1(%rbx) addq %r15, %rbx movb $0x65, 0x1(%rbx) addq $0x2, %rbx decl %r14d movq %rbx, %rdi movl %r14d, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x887ab leaq 0x29d89(%rip), %rdi # 0xb1be6 leaq 0x242dc(%rip), %rdx # 0xac140 leaq 0x2f71e(%rip), %rcx # 0xb7589 movl $0x45e3, %esi # imm = 0x45E3 jmp 0x87e8c leaq 0x29d6d(%rip), %rdi # 0xb1be6 leaq 0x242c0(%rip), %rdx # 0xac140 leaq 0x2f70e(%rip), %rcx # 0xb7595 movl $0x45e4, %esi # imm = 0x45E4 xorl %eax, %eax callq 0x24e90 leaq 0x29d4c(%rip), %rdi # 0xb1be6 leaq 0x2429f(%rip), %rdx # 0xac140 leaq 0x2f6f9(%rip), %rcx # 0xb75a1 movl $0x45fe, %esi # imm = 0x45FE jmp 0x87e8c
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii: push r15 push r14 push r12 push rbx push rax test ecx, ecx jns loc_87E56 test r8d, r8d jle loc_87E72 mov rbx, rdi lea r14d, [rdx+rsi] test edx, edx sets al cmp r14d, r8d setnle dil or dil, al jz short loc_87DA5 cmp r14d, r8d setnle al test r14d, r14d setle dil or dil, al jz short loc_87DCE test r14d, r14d setnle al cmp r14d, ecx setle cl or cl, al jnz loc_87E12 neg r14d lea r15, [rbx+r14] add r15, 2 movsxd r12, esi mov rdi, r15 mov rsi, rbx mov rdx, r12 call _memmove mov word ptr [rbx], 2E30h add rbx, 2 push 30h ; '0' pop rsi mov rdi, rbx mov rdx, r14 call _memset add r15, r12 jmp short loc_87E03 loc_87DA5: movsxd rax, esi lea rdi, [rbx+rax] movsxd r14, r14d mov rdx, r14 sub rdx, rax push 30h ; '0' pop rsi call _memset lea r15, [rbx+r14] add r15, 2 mov word ptr [r15-2], 302Eh jmp short loc_87E03 loc_87DCE: test edx, edx jns loc_87E93 mov ecx, r14d lea rax, [rbx+rcx] lea r14, [rbx+rcx] inc r14 mov r15d, esi mov rdx, r15 sub rdx, rcx mov rdi, r14 mov rsi, rax call _memmove mov byte ptr [r14-1], 2Eh ; '.' add r15, rbx inc r15 loc_87E03: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_87E12: cmp esi, 1 jz short loc_87E35 lea rdi, [rbx+2] lea rax, [rbx+1] movsxd r15, esi lea rdx, [r15-1] mov rsi, rax call _memmove mov byte ptr [rbx+1], 2Eh ; '.' add rbx, r15 loc_87E35: mov byte ptr [rbx+1], 65h ; 'e' add rbx, 2 dec r14d mov rdi, rbx; this mov esi, r14d; char * add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *,int) loc_87E56: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMinExp0; "min_exp < 0" mov esi, 45E3h jmp short loc_87E8C loc_87E72: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaxExp0; "max_exp > 0" mov esi, 45E4h loc_87E8C: xor eax, eax call _ggml_abort loc_87E93: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKN; "k > n" mov esi, 45FEh jmp short loc_87E8C
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2, int a3, int a4, int a5) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx int v6; // r14d long long v7; // r14 char *v8; // r15 long long v9; // rcx char *v10; // r14 if ( a4 >= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17891LL, "GGML_ASSERT(%s) failed", "min_exp < 0"); goto LABEL_16; } if ( a5 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17892LL, "GGML_ASSERT(%s) failed", "max_exp > 0"); goto LABEL_16; } v5 = this; v6 = a3 + (_DWORD)a2; if ( a3 >= 0 && a3 + (int)a2 <= a5 ) { memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2); v8 = (char *)this + v6 + 2; *(_WORD *)((char *)this + v6) = 12334; return v8; } if ( v6 <= a5 && v6 > 0 ) { if ( a3 < 0 ) { v9 = (unsigned int)v6; v10 = (char *)this + (unsigned int)v6 + 1; memmove(v10, (char *)this + v9, (unsigned int)a2 - v9); *(v10 - 1) = 46; return (char *)this + (unsigned int)a2 + 1; } while ( 1 ) LABEL_16: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17918LL, "GGML_ASSERT(%s) failed", "k > n"); } if ( v6 <= 0 && v6 > a4 ) { v7 = (unsigned int)-v6; memmove((char *)this + v7 + 2, this, (int)a2); *(_WORD *)this = 11824; memset((char *)this + 2, 48LL, v7); return (char *)this + v7 + (int)a2 + 2; } if ( (_DWORD)a2 != 1 ) { memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL); *((_BYTE *)this + 1) = 46; v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2); } *((_BYTE *)v5 + 1) = 101; return (char *)nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)v5 + 2), (char *)(unsigned int)(v6 - 1), a3); }
format_buffer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST ECX,ECX JNS 0x00187e56 TEST R8D,R8D JLE 0x00187e72 MOV RBX,RDI LEA R14D,[RDX + RSI*0x1] TEST EDX,EDX SETS AL CMP R14D,R8D SETG DIL OR DIL,AL JZ 0x00187da5 CMP R14D,R8D SETG AL TEST R14D,R14D SETLE DIL OR DIL,AL JZ 0x00187dce TEST R14D,R14D SETG AL CMP R14D,ECX SETLE CL OR CL,AL JNZ 0x00187e12 NEG R14D LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOVSXD R12,ESI MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x00124e20 MOV word ptr [RBX],0x2e30 ADD RBX,0x2 PUSH 0x30 POP RSI MOV RDI,RBX MOV RDX,R14 CALL 0x00124500 ADD R15,R12 JMP 0x00187e03 LAB_00187da5: MOVSXD RAX,ESI LEA RDI,[RBX + RAX*0x1] MOVSXD R14,R14D MOV RDX,R14 SUB RDX,RAX PUSH 0x30 POP RSI CALL 0x00124500 LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOV word ptr [R15 + -0x2],0x302e JMP 0x00187e03 LAB_00187dce: TEST EDX,EDX JNS 0x00187e93 MOV ECX,R14D LEA RAX,[RBX + RCX*0x1] LEA R14,[RBX + RCX*0x1] INC R14 MOV R15D,ESI MOV RDX,R15 SUB RDX,RCX MOV RDI,R14 MOV RSI,RAX CALL 0x00124e20 MOV byte ptr [R14 + -0x1],0x2e ADD R15,RBX INC R15 LAB_00187e03: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00187e12: CMP ESI,0x1 JZ 0x00187e35 LEA RDI,[RBX + 0x2] LEA RAX,[RBX + 0x1] MOVSXD R15,ESI LEA RDX,[R15 + -0x1] MOV RSI,RAX CALL 0x00124e20 MOV byte ptr [RBX + 0x1],0x2e ADD RBX,R15 LAB_00187e35: MOV byte ptr [RBX + 0x1],0x65 ADD RBX,0x2 DEC R14D MOV RDI,RBX MOV ESI,R14D ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x001887ab LAB_00187e56: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b7589] MOV ESI,0x45e3 JMP 0x00187e8c LAB_00187e72: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b7595] MOV ESI,0x45e4 LAB_00187e8c: XOR EAX,EAX CALL 0x00124e90 LAB_00187e93: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b75a1] MOV ESI,0x45fe JMP 0x00187e8c
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */ char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer (char *param_1,int param_2,int param_3,int param_4,int param_5) { char *pcVar1; ulong uVar2; int8 uVar3; uint uVar4; char *pcVar5; if (param_4 < 0) { if (0 < param_5) { uVar4 = param_3 + param_2; if (param_5 < (int)uVar4 || param_3 < 0) { if ((int)uVar4 < 1 || param_5 < (int)uVar4) { if ((int)uVar4 <= param_4 || 0 < (int)uVar4) { if (param_2 != 1) { memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1); param_1[1] = '.'; param_1 = param_1 + param_2; } param_1[1] = 'e'; pcVar1 = (char *)append_exponent(param_1 + 2,uVar4 - 1); return pcVar1; } memmove(param_1 + (ulong)-uVar4 + 2,param_1,(long)param_2); param_1[0] = '0'; param_1[1] = '.'; memset(param_1 + 2,0x30,(ulong)-uVar4); pcVar5 = param_1 + (ulong)-uVar4 + 2 + param_2; } else { if (-1 < param_3) { pcVar1 = "k > n"; uVar3 = 0x45fe; goto LAB_00187e8c; } uVar2 = (ulong)uVar4; memmove(param_1 + uVar2 + 1,param_1 + uVar2,(uint)param_2 - uVar2); param_1[uVar2] = '.'; pcVar5 = param_1 + (ulong)(uint)param_2 + 1; } } else { memset(param_1 + param_2,0x30,(long)(int)uVar4 - (long)param_2); pcVar1 = param_1 + (int)uVar4; pcVar5 = pcVar1 + 2; pcVar1[0] = '.'; pcVar1[1] = '0'; } return pcVar5; } pcVar1 = "max_exp > 0"; uVar3 = 0x45e4; } else { pcVar1 = "min_exp < 0"; uVar3 = 0x45e3; } LAB_00187e8c: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar1); }
47,979
mysql_close_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_close_cont(MYSQL *sock, int ready_status) { int res; res= mysql_close_slow_part_cont(sock, ready_status); if (res) return res; mysql_close(sock); return 0; }
O0
c
mysql_close_cont: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x53fd0 movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) je 0x541bc movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x541cc movq -0x10(%rbp), %rdi callq 0x381f0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_cont: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call mysql_close_slow_part_cont mov [rbp+var_18], eax cmp [rbp+var_18], 0 jz short loc_541BC mov eax, [rbp+var_18] mov [rbp+var_4], eax jmp short loc_541CC loc_541BC: mov rdi, [rbp+var_10] call mysql_close mov [rbp+var_4], 0 loc_541CC: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mysql_close_cont(long long a1, unsigned int a2) { unsigned int v3; // [rsp+8h] [rbp-18h] v3 = mysql_close_slow_part_cont(a1, a2); if ( v3 ) { return v3; } else { mysql_close(a1); return 0; } }
mysql_close_cont: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x00153fd0 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JZ 0x001541bc MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX JMP 0x001541cc LAB_001541bc: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001381f0 MOV dword ptr [RBP + -0x4],0x0 LAB_001541cc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int mysql_close_cont(int8 param_1,int4 param_2) { int4 local_c; local_c = mysql_close_slow_part_cont(param_1,param_2); if (local_c == 0) { mysql_close(param_1); local_c = 0; } return local_c; }
47,980
uf_prespace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_prespace_selected(MI_COLUMNDEF *rec, MI_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((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); }
O0
c
uf_prespace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbef2a movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbef52 jmp 0xbf00a movq -0x10(%rbp), %rdi callq 0xbdad0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbf00a movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbef95 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x202833(%rip), %rcx # 0x2c17c0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbefa8 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbc280 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbefca movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbf01f movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbf008 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0xbe1e0 jmp 0xbf01f movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbe1e0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_prespace_selected_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BEF2A mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BEF52 jmp loc_BF00A loc_BEF2A: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BF00A loc_BEF52: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BEF95 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BEFA8 loc_BEF95: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BEFA8: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BEFCA mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BF01F loc_BEFCA: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BF008 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes_0 loc_BF008: jmp short loc_BF01F loc_BF00A: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BF01F: add rsp, 30h pop rbp retn
long long uf_prespace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx unsigned int v6; // eax int v7; // ecx long long result; // rax unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v7; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v6 >> v7); } if ( &a3[bits_0] <= a4 ) { memset(a3, 32LL, bits_0); result = (long long)&a3[bits_0]; if ( (_BYTE *)result != a4 ) return decode_bytes_0(a1, (long long)a2, &a3[bits_0], a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_prespace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bef2a MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bef52 JMP 0x001bf00a LAB_001bef2a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bdad0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bf00a LAB_001bef52: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bef95 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3c17c0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001befa8 LAB_001bef95: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bc280 MOV dword ptr [RBP + -0x28],EAX LAB_001befa8: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001befca MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bf01f LAB_001befca: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bf008 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x001be1e0 LAB_001bf008: JMP 0x001bf01f LAB_001bf00a: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001be1e0 LAB_001bf01f: ADD RSP,0x30 POP RBP RET
void uf_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } return; }
47,981
my_fprintf
eloqsql/strings/my_vsnprintf.c
int my_fprintf(FILE *stream, const char* format, ...) { int result; va_list args; va_start(args, format); result= my_vfprintf(stream, format, args); va_end(args); return result; }
O0
c
my_fprintf: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0xc59d8 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 %r9, -0xb8(%rbp) movq %r8, -0xc0(%rbp) movq %rcx, -0xc8(%rbp) movq %rdx, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0x20(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl $0x30, -0x2c(%rbp) movl $0x10, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0xc57f0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax addq $0xe0, %rsp popq %rbp retq nopl (%rax)
my_fprintf: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_C59D8 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_C59D8: mov [rbp+var_B8], r9 mov [rbp+var_C0], r8 mov [rbp+var_C8], rcx mov [rbp+var_D0], rdx mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rax, [rbp+var_E0] mov [rbp+var_20], rax lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_2C], 30h ; '0' mov [rbp+var_30], 10h mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call my_vfprintf mov [rbp+var_14], eax mov eax, [rbp+var_14] add rsp, 0E0h pop rbp retn
long long my_fprintf( long long a1, char *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+10h] [rbp-D0h] long long v18; // [rsp+18h] [rbp-C8h] long long v19; // [rsp+20h] [rbp-C0h] long long v20; // [rsp+28h] [rbp-B8h] __m128 v21; // [rsp+30h] [rbp-B0h] __m128 v22; // [rsp+40h] [rbp-A0h] __m128 v23; // [rsp+50h] [rbp-90h] __m128 v24; // [rsp+60h] [rbp-80h] __m128 v25; // [rsp+70h] [rbp-70h] __m128 v26; // [rsp+80h] [rbp-60h] __m128 v27; // [rsp+90h] [rbp-50h] __m128 v28; // [rsp+A0h] [rbp-40h] int v29[2]; // [rsp+B0h] [rbp-30h] BYREF char *v30; // [rsp+B8h] [rbp-28h] char *v31; // [rsp+C0h] [rbp-20h] char *v32; // [rsp+D0h] [rbp-10h] long long v33; // [rsp+D8h] [rbp-8h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v20 = a6; v19 = a5; v18 = a4; v17 = a3; v33 = a1; v32 = a2; v31 = &v16; v30 = &a15; v29[1] = 48; v29[0] = 16; return (unsigned int)my_vfprintf(a1, a2, v29); }
my_fprintf: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x001c59d8 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_001c59d8: MOV qword ptr [RBP + -0xb8],R9 MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xd0],RDX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x2c],0x30 MOV dword ptr [RBP + -0x30],0x10 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x001c57f0 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0xe0 POP RBP RET
int4 my_fprintf(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; int4 uVar1; int1 local_e8 [16]; 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; int4 local_38; int4 local_34; int1 *local_30; int1 *local_28; int8 local_18; int8 local_10; 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; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_10 = param_9; uVar1 = my_vfprintf(param_9,param_10,&local_38); return uVar1; }
47,982
backtick_string
eloqsql/strings/my_vsnprintf.c
static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end, char *par, size_t par_len, char quote_char, my_bool cut) { char *last[3]= {0,0,0}; uint char_len; char *start= to; char *par_end= par + par_len; size_t buff_length= (size_t) (end - to); uint index= 0; if (buff_length <= par_len) goto err; *start++= quote_char; for ( ; par < par_end; par+= char_len) { uchar c= *(uchar *) par; if (cut) { last[index]= start; index= (index + 1) % 3; } char_len= my_ci_charlen_fix(cs, (const uchar *) par, (const uchar *) par_end); if (char_len == 1 && c == (uchar) quote_char ) { if (start + 1 >= end) goto err; *start++= quote_char; } if (start + char_len >= end) goto err; start= strnmov(start, par, char_len); } if (start + 1 >= end) goto err; if (cut) { uint dots= 0; start= NULL; for (; dots < 3; dots++) { if (index == 0) index= 2; else index--; if (!last[index]) break; start= last[index]; } if (start == NULL) goto err; // there was no characters at all for (; dots; dots--) *start++= '.'; } *start++= quote_char; return start; err: *to='\0'; return to; }
O0
c
backtick_string: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movb %r9b, %al movb 0x10(%rbp), %r9b movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x251a0 movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) movl $0x0, -0x74(%rbp) movq -0x70(%rbp), %rax cmpq -0x30(%rbp), %rax ja 0x87242 jmp 0x873da movb -0x31(%rbp), %cl movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %cl, (%rax) movq -0x28(%rbp), %rax cmpq -0x68(%rbp), %rax jae 0x8731e movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x75(%rbp) cmpb $0x0, 0x10(%rbp) je 0x87291 movq -0x60(%rbp), %rcx movl -0x74(%rbp), %eax movq %rcx, -0x50(%rbp,%rax,8) movl -0x74(%rbp), %eax addl $0x1, %eax movl $0x3, %ecx xorl %edx, %edx divl %ecx movl %edx, -0x74(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x87450 movl %eax, -0x54(%rbp) cmpl $0x1, -0x54(%rbp) jne 0x872de movzbl -0x75(%rbp), %eax movzbl -0x31(%rbp), %ecx cmpl %ecx, %eax jne 0x872de movq -0x60(%rbp), %rax addq $0x1, %rax cmpq -0x20(%rbp), %rax jb 0x872ca jmp 0x873da movb -0x31(%rbp), %cl movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %cl, (%rax) movq -0x60(%rbp), %rax movl -0x54(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jb 0x872f3 jmp 0x873da movq -0x60(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x54(%rbp), %eax movl %eax, %edx callq 0x879b0 movq %rax, -0x60(%rbp) movl -0x54(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x87256 movq -0x60(%rbp), %rax addq $0x1, %rax cmpq -0x20(%rbp), %rax jb 0x87331 jmp 0x873da cmpb $0x0, 0x10(%rbp) je 0x873bc movl $0x0, -0x7c(%rbp) movq $0x0, -0x60(%rbp) cmpl $0x3, -0x7c(%rbp) jae 0x8738c cmpl $0x0, -0x74(%rbp) jne 0x8735f movl $0x2, -0x74(%rbp) jmp 0x87368 movl -0x74(%rbp), %eax addl $-0x1, %eax movl %eax, -0x74(%rbp) movl -0x74(%rbp), %eax cmpq $0x0, -0x50(%rbp,%rax,8) jne 0x87375 jmp 0x8738c movl -0x74(%rbp), %eax movq -0x50(%rbp,%rax,8), %rax movq %rax, -0x60(%rbp) movl -0x7c(%rbp), %eax addl $0x1, %eax movl %eax, -0x7c(%rbp) jmp 0x8734a cmpq $0x0, -0x60(%rbp) jne 0x87395 jmp 0x873da jmp 0x87397 cmpl $0x0, -0x7c(%rbp) je 0x873ba movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0x2e, (%rax) movl -0x7c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x7c(%rbp) jmp 0x87397 jmp 0x873bc movb -0x31(%rbp), %cl movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %cl, (%rax) movq -0x60(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x873e9 movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
backtick_string: push rbp mov rbp, rsp sub rsp, 80h mov al, r9b mov r9b, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al lea rdi, [rbp+var_50] xor esi, esi mov edx, 18h call _memset mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_68], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov [rbp+var_70], rax mov [rbp+var_74], 0 mov rax, [rbp+var_70] cmp rax, [rbp+var_30] ja short loc_87242 jmp loc_873DA loc_87242: mov cl, [rbp+var_31] mov rax, [rbp+var_60] mov rdx, rax add rdx, 1 mov [rbp+var_60], rdx mov [rax], cl loc_87256: mov rax, [rbp+var_28] cmp rax, [rbp+var_68] jnb loc_8731E mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_75], al cmp [rbp+arg_0], 0 jz short loc_87291 mov rcx, [rbp+var_60] mov eax, [rbp+var_74] mov [rbp+rax*8+var_50], rcx mov eax, [rbp+var_74] add eax, 1 mov ecx, 3 xor edx, edx div ecx mov [rbp+var_74], edx loc_87291: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_68] call my_ci_charlen_fix mov [rbp+var_54], eax cmp [rbp+var_54], 1 jnz short loc_872DE movzx eax, [rbp+var_75] movzx ecx, [rbp+var_31] cmp eax, ecx jnz short loc_872DE mov rax, [rbp+var_60] add rax, 1 cmp rax, [rbp+var_20] jb short loc_872CA jmp loc_873DA loc_872CA: mov cl, [rbp+var_31] mov rax, [rbp+var_60] mov rdx, rax add rdx, 1 mov [rbp+var_60], rdx mov [rax], cl loc_872DE: mov rax, [rbp+var_60] mov ecx, [rbp+var_54] add rax, rcx cmp rax, [rbp+var_20] jb short loc_872F3 jmp loc_873DA loc_872F3: mov rdi, [rbp+var_60] mov rsi, [rbp+var_28] mov eax, [rbp+var_54] mov edx, eax call strnmov mov [rbp+var_60], rax mov ecx, [rbp+var_54] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_87256 loc_8731E: mov rax, [rbp+var_60] add rax, 1 cmp rax, [rbp+var_20] jb short loc_87331 jmp loc_873DA loc_87331: cmp [rbp+arg_0], 0 jz loc_873BC mov [rbp+var_7C], 0 mov [rbp+var_60], 0 loc_8734A: cmp [rbp+var_7C], 3 jnb short loc_8738C cmp [rbp+var_74], 0 jnz short loc_8735F mov [rbp+var_74], 2 jmp short loc_87368 loc_8735F: mov eax, [rbp+var_74] add eax, 0FFFFFFFFh mov [rbp+var_74], eax loc_87368: mov eax, [rbp+var_74] cmp [rbp+rax*8+var_50], 0 jnz short loc_87375 jmp short loc_8738C loc_87375: mov eax, [rbp+var_74] mov rax, [rbp+rax*8+var_50] mov [rbp+var_60], rax mov eax, [rbp+var_7C] add eax, 1 mov [rbp+var_7C], eax jmp short loc_8734A loc_8738C: cmp [rbp+var_60], 0 jnz short loc_87395 jmp short loc_873DA loc_87395: jmp short $+2 loc_87397: cmp [rbp+var_7C], 0 jz short loc_873BA mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 2Eh ; '.' mov eax, [rbp+var_7C] add eax, 0FFFFFFFFh mov [rbp+var_7C], eax jmp short loc_87397 loc_873BA: jmp short $+2 loc_873BC: mov cl, [rbp+var_31] mov rax, [rbp+var_60] mov rdx, rax add rdx, 1 mov [rbp+var_60], rdx mov [rax], cl mov rax, [rbp+var_60] mov [rbp+var_8], rax jmp short loc_873E9 loc_873DA: mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_873E9: mov rax, [rbp+var_8] add rsp, 80h pop rbp retn
_BYTE * backtick_string( long long a1, _BYTE *a2, unsigned long long a3, char *a4, unsigned long long a5, char a6, char a7) { _BYTE *v7; // rax _BYTE *v8; // rax unsigned int v10; // [rsp+4h] [rbp-7Ch] char v11; // [rsp+Bh] [rbp-75h] unsigned int v12; // [rsp+Ch] [rbp-74h] char *v13; // [rsp+18h] [rbp-68h] _BYTE *v14; // [rsp+20h] [rbp-60h] unsigned int v15; // [rsp+2Ch] [rbp-54h] _QWORD v16[3]; // [rsp+30h] [rbp-50h] BYREF char v17; // [rsp+4Fh] [rbp-31h] unsigned long long v18; // [rsp+50h] [rbp-30h] char *v19; // [rsp+58h] [rbp-28h] unsigned long long v20; // [rsp+60h] [rbp-20h] _BYTE *v21; // [rsp+68h] [rbp-18h] long long v22; // [rsp+70h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; memset(v16, 0LL, sizeof(v16)); v13 = &v19[v18]; v12 = 0; if ( v20 - (unsigned long long)v21 <= v18 ) goto LABEL_25; v14 = v21 + 1; *v21 = v17; while ( v19 < v13 ) { v11 = *v19; if ( a7 ) { v16[v12] = v14; v12 = (v12 + 1) % 3; } v15 = my_ci_charlen_fix(v22, v19, v13); if ( v15 == 1 && v11 == v17 ) { if ( (unsigned long long)(v14 + 1) >= v20 ) goto LABEL_25; v7 = v14++; *v7 = v17; } if ( (unsigned long long)&v14[v15] >= v20 ) goto LABEL_25; v14 = (_BYTE *)strnmov(v14, v19, v15); v19 += v15; } if ( (unsigned long long)(v14 + 1) >= v20 ) goto LABEL_25; if ( a7 ) { v10 = 0; v14 = 0LL; while ( v10 < 3 ) { if ( v12 ) --v12; else v12 = 2; if ( !v16[v12] ) break; v14 = (_BYTE *)v16[v12]; ++v10; } if ( v14 ) { while ( v10 ) { v8 = v14++; *v8 = 46; --v10; } goto LABEL_24; } LABEL_25: *v21 = 0; return v21; } LABEL_24: *v14 = v17; return v14 + 1; }
backtick_string: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV AL,R9B MOV R9B,byte ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x18 CALL 0x001251a0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX MOV dword ptr [RBP + -0x74],0x0 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x30] JA 0x00187242 JMP 0x001873da LAB_00187242: MOV CL,byte ptr [RBP + -0x31] MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RAX],CL LAB_00187256: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x68] JNC 0x0018731e MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x75],AL CMP byte ptr [RBP + 0x10],0x0 JZ 0x00187291 MOV RCX,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x74] MOV qword ptr [RBP + RAX*0x8 + -0x50],RCX MOV EAX,dword ptr [RBP + -0x74] ADD EAX,0x1 MOV ECX,0x3 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x74],EDX LAB_00187291: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x68] CALL 0x00187450 MOV dword ptr [RBP + -0x54],EAX CMP dword ptr [RBP + -0x54],0x1 JNZ 0x001872de MOVZX EAX,byte ptr [RBP + -0x75] MOVZX ECX,byte ptr [RBP + -0x31] CMP EAX,ECX JNZ 0x001872de MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x20] JC 0x001872ca JMP 0x001873da LAB_001872ca: MOV CL,byte ptr [RBP + -0x31] MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RAX],CL LAB_001872de: MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x54] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JC 0x001872f3 JMP 0x001873da LAB_001872f3: MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x54] MOV EDX,EAX CALL 0x001879b0 MOV qword ptr [RBP + -0x60],RAX MOV ECX,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00187256 LAB_0018731e: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x20] JC 0x00187331 JMP 0x001873da LAB_00187331: CMP byte ptr [RBP + 0x10],0x0 JZ 0x001873bc MOV dword ptr [RBP + -0x7c],0x0 MOV qword ptr [RBP + -0x60],0x0 LAB_0018734a: CMP dword ptr [RBP + -0x7c],0x3 JNC 0x0018738c CMP dword ptr [RBP + -0x74],0x0 JNZ 0x0018735f MOV dword ptr [RBP + -0x74],0x2 JMP 0x00187368 LAB_0018735f: MOV EAX,dword ptr [RBP + -0x74] ADD EAX,-0x1 MOV dword ptr [RBP + -0x74],EAX LAB_00187368: MOV EAX,dword ptr [RBP + -0x74] CMP qword ptr [RBP + RAX*0x8 + -0x50],0x0 JNZ 0x00187375 JMP 0x0018738c LAB_00187375: MOV EAX,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + RAX*0x8 + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RBP + -0x7c] ADD EAX,0x1 MOV dword ptr [RBP + -0x7c],EAX JMP 0x0018734a LAB_0018738c: CMP qword ptr [RBP + -0x60],0x0 JNZ 0x00187395 JMP 0x001873da LAB_00187395: JMP 0x00187397 LAB_00187397: CMP dword ptr [RBP + -0x7c],0x0 JZ 0x001873ba MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0x2e MOV EAX,dword ptr [RBP + -0x7c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x7c],EAX JMP 0x00187397 LAB_001873ba: JMP 0x001873bc LAB_001873bc: MOV CL,byte ptr [RBP + -0x31] MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x8],RAX JMP 0x001873e9 LAB_001873da: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_001873e9: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x80 POP RBP RET
char * backtick_string(int8 param_1,char *param_2,char *param_3,char *param_4,ulong param_5, char param_6,char param_7) { char cVar1; uint uVar2; char *pcVar3; uint local_84; uint local_7c; char *local_68; long local_58 [3]; char local_39; ulong local_38; char *local_30; char *local_28; char *local_20; int8 local_18; local_39 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; memset(local_58,0,0x18); pcVar3 = local_30 + local_38; local_7c = 0; if (local_38 < (ulong)((long)local_28 - (long)local_20)) { local_68 = local_20 + 1; *local_20 = local_39; for (; local_30 < pcVar3; local_30 = local_30 + uVar2) { cVar1 = *local_30; if (param_7 != '\0') { local_58[local_7c] = (long)local_68; local_7c = (local_7c + 1) % 3; } uVar2 = my_ci_charlen_fix(local_18,local_30,pcVar3); if ((uVar2 == 1) && (cVar1 == local_39)) { if (local_28 <= local_68 + 1) goto LAB_001873da; *local_68 = local_39; local_68 = local_68 + 1; } if (local_28 <= local_68 + uVar2) goto LAB_001873da; local_68 = (char *)strnmov(local_68,local_30,uVar2); } if (local_68 + 1 < local_28) { if (param_7 != '\0') { local_68 = (char *)0x0; for (local_84 = 0; local_84 < 3; local_84 = local_84 + 1) { if (local_7c == 0) { local_7c = 2; } else { local_7c = local_7c - 1; } if (local_58[local_7c] == 0) break; local_68 = (char *)local_58[local_7c]; } if (local_68 == (char *)0x0) goto LAB_001873da; for (; local_84 != 0; local_84 = local_84 - 1) { *local_68 = '.'; local_68 = local_68 + 1; } } *local_68 = local_39; return local_68 + 1; } } LAB_001873da: *local_20 = '\0'; return local_20; }
47,983
init_alloc_root
eloqsql/mysys/my_alloc.c
void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused)), myf my_flags) { DBUG_ENTER("init_alloc_root"); DBUG_PRINT("enter",("root: %p prealloc: %zu", mem_root, pre_alloc_size)); mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1; if (my_flags & MY_THREAD_SPECIFIC) mem_root->block_size|= 1; mem_root->error_handler= 0; mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; mem_root->m_psi_key= key; #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if ((mem_root->free= mem_root->pre_alloc= (USED_MEM*) my_malloc(key, size, MYF(my_flags)))) { mem_root->free->size= size; mem_root->free->left= pre_alloc_size; mem_root->free->next= 0; TRASH_MEM(mem_root->free); } } #endif DBUG_VOID_RETURN; }
O3
c
init_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rsi) xorl %eax, %eax movq %rax, 0x10(%rsi) movq $0x20, 0x18(%rsi) andq $-0x2, %rdx movl %r8d, %ecx shrl $0x10, %ecx andl $0x1, %ecx addq %rdx, %rcx addq $-0x28, %rcx movq %rcx, 0x20(%rsi) movq %rax, 0x30(%rsi) movq $0x4, 0x28(%rsi) movl %edi, 0x38(%rsi) testq %rbx, %rbx je 0x2e1fc movq %rsi, %r14 leaq 0x18(%rbx), %r15 movq %r15, %rsi movq %r8, %rdx callq 0x2bc55 movq %rax, 0x10(%r14) movq %rax, (%r14) testq %rax, %rax je 0x2e1fc movq %r15, 0x10(%rax) movq (%r14), %rax movq %rbx, 0x8(%rax) movq (%r14), %rax movq $0x0, (%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
init_alloc_root: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 xor eax, eax mov [rsi+10h], rax mov qword ptr [rsi+18h], 20h ; ' ' and rdx, 0FFFFFFFFFFFFFFFEh mov ecx, r8d shr ecx, 10h and ecx, 1 add rcx, rdx add rcx, 0FFFFFFFFFFFFFFD8h mov [rsi+20h], rcx mov [rsi+30h], rax mov qword ptr [rsi+28h], 4 mov [rsi+38h], edi test rbx, rbx jz short loc_2E1FC mov r14, rsi lea r15, [rbx+18h] mov rsi, r15 mov rdx, r8 call my_malloc mov [r14+10h], rax mov [r14], rax test rax, rax jz short loc_2E1FC mov [rax+10h], r15 mov rax, [r14] mov [rax+8], rbx mov rax, [r14] mov qword ptr [rax], 0 loc_2E1FC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long init_alloc_root(unsigned int a1, long long *a2, long long a3, long long a4, unsigned int a5) { long long result; // rax *(_OWORD *)a2 = 0LL; result = 0LL; a2[2] = 0LL; a2[3] = 32LL; a2[4] = (a3 & 0xFFFFFFFFFFFFFFFELL) + (HIWORD(a5) & 1) - 40; a2[6] = 0LL; a2[5] = 4LL; *((_DWORD *)a2 + 14) = a1; if ( a4 ) { result = my_malloc(a1, a4 + 24, a5); a2[2] = result; *a2 = result; if ( result ) { *(_QWORD *)(result + 16) = a4 + 24; *(_QWORD *)(*a2 + 8) = a4; result = *a2; *(_QWORD *)*a2 = 0LL; } } return result; }
init_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 XOR EAX,EAX MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI + 0x18],0x20 AND RDX,-0x2 MOV ECX,R8D SHR ECX,0x10 AND ECX,0x1 ADD RCX,RDX ADD RCX,-0x28 MOV qword ptr [RSI + 0x20],RCX MOV qword ptr [RSI + 0x30],RAX MOV qword ptr [RSI + 0x28],0x4 MOV dword ptr [RSI + 0x38],EDI TEST RBX,RBX JZ 0x0012e1fc MOV R14,RSI LEA R15,[RBX + 0x18] MOV RSI,R15 MOV RDX,R8 CALL 0x0012bc55 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14],RAX TEST RAX,RAX JZ 0x0012e1fc MOV qword ptr [RAX + 0x10],R15 MOV RAX,qword ptr [R14] MOV qword ptr [RAX + 0x8],RBX MOV RAX,qword ptr [R14] MOV qword ptr [RAX],0x0 LAB_0012e1fc: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void init_alloc_root(int4 param_1,long *param_2,ulong param_3,long param_4,int8 param_5) { long lVar1; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; param_2[3] = 0x20; param_2[4] = (ulong)((uint)param_5 >> 0x10 & 1) + (param_3 & 0xfffffffffffffffe) + -0x28; param_2[6] = 0; param_2[5] = 4; *(int4 *)(param_2 + 7) = param_1; if (param_4 != 0) { lVar1 = my_malloc(param_1,param_4 + 0x18,param_5); param_2[2] = lVar1; *param_2 = lVar1; if (lVar1 != 0) { *(long *)(lVar1 + 0x10) = param_4 + 0x18; *(long *)(*param_2 + 8) = param_4; *(int8 *)*param_2 = 0; } } return; }
47,984
plutovg_path_get_current_point
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_get_current_point(const plutovg_path_t* path, float* x, float* y) { float xx = 0.f; float yy = 0.f; if(path->num_points > 0) { xx = path->elements.data[path->elements.size - 1].point.x; yy = path->elements.data[path->elements.size - 1].point.y; } if(x) *x = xx; if(y) *y = yy; }
O1
c
plutovg_path_get_current_point: cmpl $0x0, 0x4(%rdi) jle 0x2a439 movq 0x18(%rdi), %rax movslq 0x20(%rdi), %rcx movss -0x8(%rax,%rcx,8), %xmm1 movss -0x4(%rax,%rcx,8), %xmm0 jmp 0x2a43f xorps %xmm1, %xmm1 xorps %xmm0, %xmm0 testq %rsi, %rsi je 0x2a448 movss %xmm1, (%rsi) testq %rdx, %rdx je 0x2a451 movss %xmm0, (%rdx) retq
plutovg_path_get_current_point: cmp dword ptr [rdi+4], 0 jle short loc_2A439 mov rax, [rdi+18h] movsxd rcx, dword ptr [rdi+20h] movss xmm1, dword ptr [rax+rcx*8-8] movss xmm0, dword ptr [rax+rcx*8-4] jmp short loc_2A43F loc_2A439: xorps xmm1, xmm1 xorps xmm0, xmm0 loc_2A43F: test rsi, rsi jz short loc_2A448 movss dword ptr [rsi], xmm1 loc_2A448: test rdx, rdx jz short locret_2A451 movss dword ptr [rdx], xmm0 locret_2A451: retn
long long plutovg_path_get_current_point(long long a1, _DWORD *a2, _DWORD *a3) { long long result; // rax long long v4; // rcx int v5; // xmm1_4 int v6; // xmm0_4 if ( *(int *)(a1 + 4) <= 0 ) { v5 = 0; v6 = 0; } else { result = *(_QWORD *)(a1 + 24); v4 = *(int *)(a1 + 32); v5 = *(_DWORD *)(result + 8 * v4 - 8); v6 = *(_DWORD *)(result + 8 * v4 - 4); } if ( a2 ) *a2 = v5; if ( a3 ) *a3 = v6; return result; }
plutovg_path_get_current_point: CMP dword ptr [RDI + 0x4],0x0 JLE 0x0012a439 MOV RAX,qword ptr [RDI + 0x18] MOVSXD RCX,dword ptr [RDI + 0x20] MOVSS XMM1,dword ptr [RAX + RCX*0x8 + -0x8] MOVSS XMM0,dword ptr [RAX + RCX*0x8 + -0x4] JMP 0x0012a43f LAB_0012a439: XORPS XMM1,XMM1 XORPS XMM0,XMM0 LAB_0012a43f: TEST RSI,RSI JZ 0x0012a448 MOVSS dword ptr [RSI],XMM1 LAB_0012a448: TEST RDX,RDX JZ 0x0012a451 MOVSS dword ptr [RDX],XMM0 LAB_0012a451: RET
void plutovg_path_get_current_point(long param_1,int4 *param_2,int4 *param_3) { int4 uVar1; int4 uVar2; if (*(int *)(param_1 + 4) < 1) { uVar2 = 0; uVar1 = 0; } else { uVar2 = *(int4 *)(*(long *)(param_1 + 0x18) + -8 + (long)*(int *)(param_1 + 0x20) * 8); uVar1 = *(int4 *)(*(long *)(param_1 + 0x18) + -4 + (long)*(int *)(param_1 + 0x20) * 8); } if (param_2 != (int4 *)0x0) { *param_2 = uVar2; } if (param_3 != (int4 *)0x0) { *param_3 = uVar1; } return; }
47,985
eval_num_suffix_ll
eloqsql/mysys/my_getopt.c
static longlong eval_num_suffix_ll(char *argument, int *error, char *option_name) { char *endchar; longlong num; DBUG_ENTER("eval_num_suffix_ll"); *error= 0; errno= 0; num= strtoll(argument, &endchar, 10); if (errno == ERANGE) { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect integer value: '%s'", argument); *error= 1; DBUG_RETURN(0); } num*= eval_num_suffix(endchar, error); if (*error) fprintf(stderr, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", *endchar, option_name, argument); DBUG_RETURN(num); }
O0
c
eval_num_suffix_ll: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax movl $0x0, (%rax) callq 0x24040 movl $0x0, (%rax) movq -0x10(%rbp), %rdi leaq -0x28(%rbp), %rsi movl $0xa, %edx callq 0x24610 movq %rax, -0x30(%rbp) callq 0x24040 cmpl $0x22, (%rax) jne 0x2d408 leaq 0x1a8120(%rip), %rax # 0x1d5500 movq (%rax), %rcx movq -0x10(%rbp), %rdx xorl %edi, %edi leaq 0x52c06(%rip), %rsi # 0x7fff6 movb $0x0, %al callq *%rcx movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0x2d458 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2d470 imulq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x2d44e movq 0x1a7bb2(%rip), %rax # 0x1d4fe0 movq (%rax), %rdi movq -0x28(%rbp), %rax movsbl (%rax), %edx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 leaq 0x52bcd(%rip), %rsi # 0x80014 movb $0x0, %al callq 0x24430 jmp 0x2d450 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
eval_num_suffix_ll: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] mov dword ptr [rax], 0 call ___errno_location mov dword ptr [rax], 0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_28] mov edx, 0Ah call ___isoc23_strtol mov [rbp+var_30], rax call ___errno_location cmp dword ptr [rax], 22h ; '"' jnz short loc_2D408 lea rax, my_getopt_error_reporter mov rcx, [rax] mov rdx, [rbp+var_10] xor edi, edi lea rsi, aIncorrectInteg; "Incorrect integer value: '%s'" mov al, 0 call rcx mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp short loc_2D458 loc_2D408: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call eval_num_suffix imul rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_2D44E mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_28] movsx edx, byte ptr [rax] mov rcx, [rbp+var_20] mov r8, [rbp+var_10] lea rsi, aUnknownSuffixC; "Unknown suffix '%c' used for variable '"... mov al, 0 call _fprintf loc_2D44E: jmp short $+2 loc_2D450: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2D458: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long eval_num_suffix_ll(const char *a1, _DWORD *a2, const char *a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+0h] [rbp-30h] char *v6; // [rsp+8h] [rbp-28h] BYREF const char *v7; // [rsp+10h] [rbp-20h] _DWORD *v8; // [rsp+18h] [rbp-18h] const char *v9; // [rsp+20h] [rbp-10h] v9 = a1; v8 = a2; v7 = a3; *a2 = 0; *(_DWORD *)__errno_location() = 0; v4 = __isoc23_strtol(v9, &v6, 10LL); if ( *(_DWORD *)__errno_location() == 34 ) { my_getopt_error_reporter(0, (long long)"Incorrect integer value: '%s'", v9); *v8 = 1; return 0LL; } else { v5 = v4 * eval_num_suffix(v6, v8); if ( *v8 ) fprintf(stderr, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", (unsigned int)*v6, v7, v9); return v5; } }
eval_num_suffix_ll: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x0 CALL 0x00124040 MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x28] MOV EDX,0xa CALL 0x00124610 MOV qword ptr [RBP + -0x30],RAX CALL 0x00124040 CMP dword ptr [RAX],0x22 JNZ 0x0012d408 LEA RAX,[0x2d5500] MOV RCX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] XOR EDI,EDI LEA RSI,[0x17fff6] MOV AL,0x0 CALL RCX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012d458 LAB_0012d408: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012d470 IMUL RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x0012d44e MOV RAX,qword ptr [0x002d4fe0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOVSX EDX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x10] LEA RSI,[0x180014] MOV AL,0x0 CALL 0x00124430 LAB_0012d44e: JMP 0x0012d450 LAB_0012d450: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012d458: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long eval_num_suffix_ll(int8 param_1,int *param_2,int8 param_3) { int *piVar1; long lVar2; char *local_30; int8 local_28; int *local_20; int8 local_18; long local_10; *param_2 = 0; local_28 = param_3; local_20 = param_2; local_18 = param_1; piVar1 = __errno_location(); *piVar1 = 0; lVar2 = __isoc23_strtol(local_18,&local_30,10); piVar1 = __errno_location(); if (*piVar1 == 0x22) { (*(code *)my_getopt_error_reporter)(0,"Incorrect integer value: \'%s\'",local_18); *local_20 = 1; local_10 = 0; } else { local_10 = eval_num_suffix(local_30,local_20); local_10 = local_10 * lVar2; if (*local_20 != 0) { fprintf(*(FILE **)PTR_stderr_002d4fe0, "Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')\n", (ulong)(uint)(int)*local_30,local_28,local_18); } } return local_10; }
47,986
init_io_cache_ext
eloqsql/mysys/mf_iocache.c
int init_io_cache_ext(IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, pbool use_async_io, myf cache_myflags, PSI_file_key file_key __attribute__((unused))) { size_t min_cache; my_off_t pos; my_off_t end_of_file= ~(my_off_t) 0; DBUG_ENTER("init_io_cache_ext"); DBUG_PRINT("enter",("cache:%p type: %d pos: %llu", info, (int) type, (ulonglong) seek_offset)); info->file= file; info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */ info->pos_in_file= seek_offset; info->alloced_buffer = 0; info->buffer=0; info->seek_not_done= 0; info->next_file_user= NULL; if (file >= 0) { DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); pos= mysql_file_tell(file, MYF(0)); if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) { /* This kind of object doesn't support seek() or tell(). Don't set a seek_not_done that will make us again try to seek() later and fail. Additionally, if we're supposed to start somewhere other than the the beginning of whatever this file is, then somebody made a bad assumption. */ DBUG_ASSERT(seek_offset == 0); } else info->seek_not_done= MY_TEST(seek_offset != pos); } else if (type == WRITE_CACHE && _my_b_encr_read) { cache_myflags|= MY_ENCRYPT; DBUG_ASSERT(seek_offset == 0); } info->disk_writes= 0; info->share=0; if (!cachesize && !(cachesize= my_default_record_cache_size)) DBUG_RETURN(1); /* No cache requested */ min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2; if (type == READ_CACHE || type == SEQ_READ_APPEND) { /* Assume file isn't growing */ DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); if (!(cache_myflags & MY_DONT_CHECK_FILESIZE)) { /* Calculate end of file to avoid allocating oversized buffers */ end_of_file= mysql_file_seek(file, 0L, MY_SEEK_END, MYF(0)); /* Need to reset seek_not_done now that we just did a seek. */ info->seek_not_done= end_of_file == seek_offset ? 0 : 1; if (end_of_file < seek_offset) end_of_file=seek_offset; /* Trim cache size if the file is very small */ if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1) { cachesize= (size_t) (end_of_file-seek_offset)+IO_SIZE*2-1; use_async_io=0; /* No need to use async */ } } } cache_myflags &= ~MY_DONT_CHECK_FILESIZE; if (type != READ_NET) { /* Retry allocating memory in smaller blocks until we get one */ cachesize= ((cachesize + min_cache-1) & ~(min_cache-1)); for (;;) { size_t buffer_block; /* Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with MY_ZEROFILL. */ myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL)); if (cachesize < min_cache) cachesize = min_cache; buffer_block= cachesize; if (type == SEQ_READ_APPEND) buffer_block *= 2; else if (cache_myflags & MY_ENCRYPT) buffer_block= 2*(buffer_block + MY_AES_BLOCK_SIZE) + sizeof(IO_CACHE_CRYPT); if (cachesize == min_cache) flags|= (myf) MY_WME; if ((info->buffer= (uchar*) my_malloc(key_memory_IO_CACHE, buffer_block, flags)) != 0) { if (type == SEQ_READ_APPEND) info->write_buffer= info->buffer + cachesize; else info->write_buffer= info->buffer; info->alloced_buffer= buffer_block; break; /* Enough memory found */ } if (cachesize == min_cache) DBUG_RETURN(2); /* Can't alloc cache */ /* Try with less memory */ cachesize= (cachesize*3/4 & ~(min_cache-1)); } } DBUG_PRINT("info",("init_io_cache_ext: cachesize = %lu", (ulong) cachesize)); info->read_length=info->buffer_length=cachesize; info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); info->request_pos= info->read_pos= info->write_pos = info->buffer; if (type == SEQ_READ_APPEND) { info->append_read_pos = info->write_pos = info->write_buffer; info->write_end = info->write_buffer + info->buffer_length; mysql_mutex_init(key_IO_CACHE_append_buffer_lock, &info->append_buffer_lock, MY_MUTEX_INIT_FAST); } #if defined(SAFE_MUTEX) else { /* Clear mutex so that safe_mutex will notice that it's not initialized */ bzero((char*) &info->append_buffer_lock, sizeof(info->append_buffer_lock)); } #endif if (type == WRITE_CACHE) info->write_end= info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1)); else info->read_end=info->buffer; /* Nothing in cache */ /* End_of_file may be changed by user later */ info->end_of_file= end_of_file; info->error=0; info->type= type; init_functions(info); DBUG_RETURN(0); }
O3
c
init_io_cache_ext: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movl %esi, %r15d movq %rdi, %r12 movq 0x10(%rbp), %r13 movl %esi, 0xd4(%rdi) xorl %eax, %eax movl %eax, 0xb0(%rdi) movq %r8, -0x48(%rbp) movq %r8, (%rdi) movq %rax, 0x100(%rdi) movq %rax, 0x20(%rdi) movl %eax, 0xe0(%rdi) movq %rax, 0xd8(%rdi) testl %esi, %esi movl %ecx, -0x2c(%rbp) js 0x2a7e6 movl %r9d, %r14d leaq 0x2d0401(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x9, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2aacb movl %r15d, %edi xorl %esi, %esi callq 0x30e9c movq %rax, %r13 cmpq $-0x1, %r13 movl %r14d, %r9d jne 0x2a7cb callq 0x3193e movl %r14d, %r9d cmpl $0x1d, (%rax) je 0x2a7dc xorl %eax, %eax cmpq -0x48(%rbp), %r13 setne %al movl %eax, 0xe0(%r12) movq 0x10(%rbp), %r13 movl -0x2c(%rbp), %r14d jmp 0x2a807 movl %ecx, %r14d leaq 0x34e7a8(%rip), %rax # 0x378f98 movq %r13, %rcx orq $0x40, %rcx cmpq $0x0, (%rax) cmoveq %r13, %rcx cmpl $0x2, %r14d cmoveq %rcx, %r13 xorl %eax, %eax movq %rax, 0xb8(%r12) movq %rax, 0x98(%r12) testq %rbx, %rbx jne 0x2a831 leaq 0x2cfe5b(%rip), %rax # 0x2fa680 movq (%rax), %rbx testq %rbx, %rbx je 0x2aab4 movq %r12, -0x40(%rbp) xorl %r12d, %r12d testb %r9b, %r9b setne %cl sete %dl movq $-0x1, -0x60(%rbp) cmpl $0x1, %r14d je 0x2a874 cmpl $0x3, %r14d je 0x2a874 cmpl $0x5, %r14d jne 0x2a8f3 movq -0x40(%rbp), %r12 movq 0x20(%r12), %rax movq $-0x1, %r15 jmp 0x2a9c1 testb %r13b, %r13b movq %r13, -0x38(%rbp) js 0x2a8f7 movb %dl, -0x50(%rbp) movb %cl, -0x58(%rbp) leaq 0x2d02fe(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2aae6 movl %r15d, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0x30e38 xorl %esi, %esi movq -0x48(%rbp), %rdx cmpq %rdx, %rax cmovbeq %rdx, %rax setne %sil movq -0x40(%rbp), %rcx movl %esi, 0xe0(%rcx) movq %rax, -0x60(%rbp) subq %rdx, %rax addq $0x1fff, %rax # imm = 0x1FFF cmpq %rax, %rbx cmovaeq %rax, %rbx movb -0x58(%rbp), %cl movb -0x50(%rbp), %dl jmp 0x2a8f7 movq %r13, -0x38(%rbp) xorl %eax, %eax movb %dl, %al shll $0xd, %eax orq $-0x4000, %rax # imm = 0xC000 movq %rax, -0x58(%rbp) movb %cl, %r12b shll $0xd, %r12d addq $0x2000, %r12 # imm = 0x2000 leaq (%r12,%rbx), %r13 decq %r13 movq -0x38(%rbp), %r14 andl $0xffffff4f, %r14d # imm = 0xFFFFFF4F leaq 0x10(%r14), %rax movq %rax, -0x50(%rbp) andq -0x58(%rbp), %r13 cmpq %r12, %r13 movq %r12, %rbx cmovaq %r13, %rbx cmpl $0x3, -0x2c(%rbp) jne 0x2a94a leaq (%rbx,%rbx), %r15 jmp 0x2a95b movq %rbx, %r15 testb $0x40, -0x38(%rbp) je 0x2a95b leaq 0x48(,%rbx,2), %r15 cmpq %r13, %r12 movq -0x50(%rbp), %rdx cmovbq %r14, %rdx leaq 0x34f017(%rip), %rax # 0x379984 movl (%rax), %edi movq %r15, %rsi callq 0x300d9 movq -0x40(%rbp), %rcx movq %rax, 0x20(%rcx) testq %rax, %rax jne 0x2a997 cmpq %r13, %r12 jae 0x2aa64 leaq (%rbx,%rbx,2), %r13 shrq $0x2, %r13 jmp 0x2a930 xorl %ecx, %ecx movl -0x2c(%rbp), %r14d cmpl $0x3, %r14d cmoveq %rbx, %rcx addq %rax, %rcx movq -0x40(%rbp), %r12 movq %rcx, 0x30(%r12) movq %r15, 0x100(%r12) movq -0x38(%rbp), %r13 movq -0x60(%rbp), %r15 andl $0xffffff79, %r13d # imm = 0xFFFFFF79 movq %rbx, 0xe8(%r12) movq %rbx, 0xf0(%r12) movq %r13, 0xf8(%r12) movq %rax, 0x40(%r12) movq %rax, 0x10(%r12) movq %rax, 0x28(%r12) cmpl $0x3, %r14d jne 0x2aa6b movq 0x30(%r12), %rax movq %rax, 0x40(%r12) movq %rax, 0x38(%r12) addq %rax, %rbx movq %rbx, 0x48(%r12) leaq 0x34e5d1(%rip), %rax # 0x378fe4 movl (%rax), %edi movq %r15, %rbx leaq 0x50(%r12), %r15 leaq 0x2d0164(%rip), %rax # 0x2fab88 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x90(%r12) movq %r15, 0x88(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%r12) leaq 0x34f283(%rip), %rsi # 0x379cd0 movq %r15, %rdi movq %rbx, %r15 callq 0x24550 movq 0x20(%r12), %rax movl $0x18, %ecx jmp 0x2aa8b movl $0x2, %eax jmp 0x2aab9 movl $0x18, %ecx cmpl $0x2, %r14d jne 0x2aa8b addq %rbx, %rax movq -0x48(%rbp), %rcx andl $0xfff, %ecx # imm = 0xFFF subq %rcx, %rax movl $0x48, %ecx movq %rax, (%r12,%rcx) movq %r15, 0x8(%r12) movl $0x0, 0xe4(%r12) movl %r14d, 0xb0(%r12) movq %r12, %rdi callq 0x2ab03 xorl %eax, %eax jmp 0x2aab9 movl $0x1, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x68(%rbp), %r13 movq %rax, %rdi movl %r15d, %esi movq %r13, %rdx callq 0x24a4e movq (%r13), %r13 jmp 0x2a7b5 leaq -0x68(%rbp), %rcx movq %rax, %rdi movl %r15d, %esi movq %rcx, %r15 movq %rcx, %rdx callq 0x24aa6 movq (%r15), %rax jmp 0x2a8bc
init_io_cache_ext: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r15d, esi mov r12, rdi mov r13, [rbp+arg_0] mov [rdi+0D4h], esi xor eax, eax mov [rdi+0B0h], eax mov [rbp+var_48], r8 mov [rdi], r8 mov [rdi+100h], rax mov [rdi+20h], rax mov [rdi+0E0h], eax mov [rdi+0D8h], rax test esi, esi mov [rbp+var_2C], ecx js short loc_2A7E6 mov r14d, r9d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 9 call qword ptr [rax+158h] test rax, rax jnz loc_2AACB mov edi, r15d xor esi, esi call my_tell mov r13, rax loc_2A7B5: cmp r13, 0FFFFFFFFFFFFFFFFh mov r9d, r14d jnz short loc_2A7CB call _my_thread_var mov r9d, r14d cmp dword ptr [rax], 1Dh jz short loc_2A7DC loc_2A7CB: xor eax, eax cmp r13, [rbp+var_48] setnz al mov [r12+0E0h], eax loc_2A7DC: mov r13, [rbp+arg_0] mov r14d, [rbp+var_2C] jmp short loc_2A807 loc_2A7E6: mov r14d, ecx lea rax, _my_b_encr_read mov rcx, r13 or rcx, 40h cmp qword ptr [rax], 0 cmovz rcx, r13 cmp r14d, 2 cmovz r13, rcx loc_2A807: xor eax, eax mov [r12+0B8h], rax mov [r12+98h], rax test rbx, rbx jnz short loc_2A831 lea rax, my_default_record_cache_size mov rbx, [rax] test rbx, rbx jz loc_2AAB4 loc_2A831: mov [rbp+var_40], r12 xor r12d, r12d test r9b, r9b setnz cl setz dl mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh cmp r14d, 1 jz short loc_2A874 cmp r14d, 3 jz short loc_2A874 cmp r14d, 5 jnz loc_2A8F3 mov r12, [rbp+var_40] mov rax, [r12+20h] mov r15, 0FFFFFFFFFFFFFFFFh jmp loc_2A9C1 loc_2A874: test r13b, r13b mov [rbp+var_38], r13 js short loc_2A8F7 mov byte ptr [rbp+var_50], dl mov byte ptr [rbp+var_58], cl lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_2AAE6 mov edi, r15d xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_2A8BC: xor esi, esi mov rdx, [rbp+var_48] cmp rax, rdx cmovbe rax, rdx setnz sil mov rcx, [rbp+var_40] mov [rcx+0E0h], esi mov [rbp+var_60], rax sub rax, rdx add rax, 1FFFh cmp rbx, rax cmovnb rbx, rax mov cl, byte ptr [rbp+var_58] mov dl, byte ptr [rbp+var_50] jmp short loc_2A8F7 loc_2A8F3: mov [rbp+var_38], r13 loc_2A8F7: xor eax, eax mov al, dl shl eax, 0Dh or rax, 0FFFFFFFFFFFFC000h mov [rbp+var_58], rax mov r12b, cl shl r12d, 0Dh add r12, 2000h lea r13, [r12+rbx] dec r13 mov r14, [rbp+var_38] and r14d, 0FFFFFF4Fh lea rax, [r14+10h] mov [rbp+var_50], rax loc_2A930: and r13, [rbp+var_58] cmp r13, r12 mov rbx, r12 cmova rbx, r13 cmp [rbp+var_2C], 3 jnz short loc_2A94A lea r15, [rbx+rbx] jmp short loc_2A95B loc_2A94A: mov r15, rbx test byte ptr [rbp+var_38], 40h jz short loc_2A95B lea r15, ds:48h[rbx*2] loc_2A95B: cmp r12, r13 mov rdx, [rbp+var_50] cmovb rdx, r14 lea rax, key_memory_IO_CACHE mov edi, [rax] mov rsi, r15 call my_malloc mov rcx, [rbp+var_40] mov [rcx+20h], rax test rax, rax jnz short loc_2A997 cmp r12, r13 jnb loc_2AA64 lea r13, [rbx+rbx*2] shr r13, 2 jmp short loc_2A930 loc_2A997: xor ecx, ecx mov r14d, [rbp+var_2C] cmp r14d, 3 cmovz rcx, rbx add rcx, rax mov r12, [rbp+var_40] mov [r12+30h], rcx mov [r12+100h], r15 mov r13, [rbp+var_38] mov r15, [rbp+var_60] loc_2A9C1: and r13d, 0FFFFFF79h mov [r12+0E8h], rbx mov [r12+0F0h], rbx mov [r12+0F8h], r13 mov [r12+40h], rax mov [r12+10h], rax mov [r12+28h], rax cmp r14d, 3 jnz short loc_2AA6B mov rax, [r12+30h] mov [r12+40h], rax mov [r12+38h], rax add rbx, rax mov [r12+48h], rbx lea rax, key_IO_CACHE_append_buffer_lock mov edi, [rax] mov rbx, r15 lea r15, [r12+50h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r12+90h], rax mov [r12+88h], r15 xorps xmm0, xmm0 movups xmmword ptr [r12+78h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 mov r15, rbx call _pthread_mutex_init mov rax, [r12+20h] mov ecx, 18h jmp short loc_2AA8B loc_2AA64: mov eax, 2 jmp short loc_2AAB9 loc_2AA6B: mov ecx, 18h cmp r14d, 2 jnz short loc_2AA8B add rax, rbx mov rcx, [rbp+var_48] and ecx, 0FFFh sub rax, rcx mov ecx, 48h ; 'H' loc_2AA8B: mov [r12+rcx], rax mov [r12+8], r15 mov dword ptr [r12+0E4h], 0 mov [r12+0B0h], r14d mov rdi, r12 call init_functions xor eax, eax jmp short loc_2AAB9 loc_2AAB4: mov eax, 1 loc_2AAB9: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2AACB: lea r13, [rbp+var_68] mov rdi, rax mov esi, r15d mov rdx, r13 call init_io_cache_ext_cold_1 mov r13, [r13+0] jmp loc_2A7B5 loc_2AAE6: lea rcx, [rbp+var_68] mov rdi, rax mov esi, r15d mov r15, rcx mov rdx, rcx call init_io_cache_ext_cold_2 mov rax, [r15] jmp loc_2A8BC
long long init_io_cache_ext( long long a1, long long a2, unsigned long long a3, int a4, unsigned long long a5, unsigned int a6, long long a7) { unsigned long long v7; // rbx unsigned int v8; // r15d long long v10; // r13 unsigned int v11; // r14d long long v12; // rax long long v13; // rdi long long v14; // rcx long long v15; // r8 long long v16; // r13 _DWORD *v17; // rax int v18; // r14d int v19; // r12d long long v20; // r12 long long v21; // rax long long v22; // r15 long long v23; // rax unsigned long long v24; // rax int v25; // esi unsigned long long v26; // rdx bool v27; // zf unsigned long long v28; // rax unsigned long long v29; // r12 unsigned long long v30; // r13 unsigned long long v31; // r13 long long v32; // r15 unsigned long long v33; // rcx long long v34; // rax long long v35; // rcx _BYTE v37[72]; // [rsp+0h] [rbp-B0h] BYREF unsigned long long v38; // [rsp+48h] [rbp-68h] BYREF long long v39; // [rsp+50h] [rbp-60h] unsigned long long v40; // [rsp+58h] [rbp-58h] long long v41; // [rsp+60h] [rbp-50h] unsigned long long v42; // [rsp+68h] [rbp-48h] long long v43; // [rsp+70h] [rbp-40h] long long v44; // [rsp+78h] [rbp-38h] int v45; // [rsp+84h] [rbp-2Ch] v7 = a3; v8 = a2; v10 = a7; *(_DWORD *)(a1 + 212) = a2; *(_DWORD *)(a1 + 176) = 0; v42 = a5; *(_QWORD *)a1 = a5; *(_QWORD *)(a1 + 256) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; *(_DWORD *)(a1 + 224) = 0; *(_QWORD *)(a1 + 216) = 0LL; v45 = a4; if ( (int)a2 < 0 ) { v18 = a4; v14 = a7 | 0x40; if ( !my_b_encr_read ) v14 = a7; if ( v18 == 2 ) v10 = v14; } else { v11 = a6; v12 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v37, (unsigned int)a2, 9LL); if ( v12 ) { v13 = v12; a2 = (unsigned int)a2; init_io_cache_ext_cold_1(v12, a2, &v38); v16 = v38; } else { v13 = (unsigned int)a2; a2 = 0LL; v16 = my_tell(v8, 0LL); } LOBYTE(a6) = v11; if ( v16 != -1 || (v17 = (_DWORD *)my_thread_var(v13, a2, a3, v14, v15, v11), LOBYTE(a6) = v11, *v17 != 29) ) *(_DWORD *)(a1 + 224) = v16 != v42; v10 = a7; v18 = v45; } *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 152) = 0LL; if ( !v7 ) { v7 = my_default_record_cache_size; if ( !my_default_record_cache_size ) return 1LL; } v43 = a1; v19 = 0; LOBYTE(v14) = (_BYTE)a6 != 0; LOBYTE(a3) = (_BYTE)a6 == 0; v39 = -1LL; if ( v18 == 1 || v18 == 3 ) { v44 = v10; if ( (v10 & 0x80u) == 0LL ) { LOBYTE(v41) = (_BYTE)a6 == 0; LOBYTE(v40) = (_BYTE)a6 != 0; v23 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v37, v8, 8LL); if ( v23 ) { init_io_cache_ext_cold_2(v23, v8, &v38); v24 = v38; } else { v24 = my_seek(v8, 0LL, 2LL, 0LL); } v25 = 0; v26 = v42; v27 = v24 == v42; if ( v24 <= v42 ) v24 = v42; LOBYTE(v25) = !v27; *(_DWORD *)(v43 + 224) = v25; v39 = v24; v28 = v24 - v26 + 0x1FFF; if ( v7 >= v28 ) v7 = v28; LOBYTE(v14) = v40; LOBYTE(a3) = v41; } LABEL_27: v40 = ((unsigned __int8)a3 << 13) | 0xFFFFFFFFFFFFC000LL; LOBYTE(v19) = v14; v29 = (unsigned int)(v19 << 13) + 0x2000LL; v30 = v29 + v7 - 1; v41 = ((unsigned int)v44 & 0xFFFFFF4F) + 16LL; while ( 1 ) { v31 = v40 & v30; v7 = v29; if ( v31 > v29 ) v7 = v31; if ( v45 == 3 ) { v32 = 2 * v7; } else { v32 = v7; if ( (v44 & 0x40) != 0 ) v32 = 2 * v7 + 72; } v21 = my_malloc(key_memory_IO_CACHE, v32); *(_QWORD *)(v43 + 32) = v21; if ( v21 ) break; if ( v29 >= v31 ) return 2LL; v30 = (3 * v7) >> 2; } v33 = 0LL; v18 = v45; if ( v45 == 3 ) v33 = v7; v14 = v21 + v33; v20 = v43; *(_QWORD *)(v43 + 48) = v14; *(_QWORD *)(v20 + 256) = v32; LODWORD(v10) = v44; v22 = v39; goto LABEL_40; } if ( v18 != 5 ) { v44 = v10; goto LABEL_27; } v20 = v43; v21 = *(_QWORD *)(v43 + 32); v22 = -1LL; LABEL_40: *(_QWORD *)(v20 + 232) = v7; *(_QWORD *)(v20 + 240) = v7; *(_QWORD *)(v20 + 248) = (unsigned int)v10 & 0xFFFFFF79; *(_QWORD *)(v20 + 64) = v21; *(_QWORD *)(v20 + 16) = v21; *(_QWORD *)(v20 + 40) = v21; if ( v18 == 3 ) { v34 = *(_QWORD *)(v20 + 48); *(_QWORD *)(v20 + 64) = v34; *(_QWORD *)(v20 + 56) = v34; *(_QWORD *)(v20 + 72) = v34 + v7; *(_QWORD *)(v20 + 144) = (*((long long ( **)(_QWORD, long long, unsigned long long, long long))PSI_server + 8))( key_IO_CACHE_append_buffer_lock, v20 + 80, a3, v14); *(_QWORD *)(v20 + 136) = v20 + 80; *(_OWORD *)(v20 + 120) = 0LL; pthread_mutex_init(v20 + 80, &my_fast_mutexattr); v21 = *(_QWORD *)(v20 + 32); v35 = 24LL; } else { v35 = 24LL; if ( v18 == 2 ) { v21 = v7 + v21 - (v42 & 0xFFF); v35 = 72LL; } } *(_QWORD *)(v20 + v35) = v21; *(_QWORD *)(v20 + 8) = v22; *(_DWORD *)(v20 + 228) = 0; *(_DWORD *)(v20 + 176) = v18; init_functions(v20); return 0LL; }
init_io_cache_ext: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R15D,ESI MOV R12,RDI MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [RDI + 0xd4],ESI XOR EAX,EAX MOV dword ptr [RDI + 0xb0],EAX MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RDI],R8 MOV qword ptr [RDI + 0x100],RAX MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0xe0],EAX MOV qword ptr [RDI + 0xd8],RAX TEST ESI,ESI MOV dword ptr [RBP + -0x2c],ECX JS 0x0012a7e6 MOV R14D,R9D LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x9 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012aacb MOV EDI,R15D XOR ESI,ESI CALL 0x00130e9c MOV R13,RAX LAB_0012a7b5: CMP R13,-0x1 MOV R9D,R14D JNZ 0x0012a7cb CALL 0x0013193e MOV R9D,R14D CMP dword ptr [RAX],0x1d JZ 0x0012a7dc LAB_0012a7cb: XOR EAX,EAX CMP R13,qword ptr [RBP + -0x48] SETNZ AL MOV dword ptr [R12 + 0xe0],EAX LAB_0012a7dc: MOV R13,qword ptr [RBP + 0x10] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x0012a807 LAB_0012a7e6: MOV R14D,ECX LEA RAX,[0x478f98] MOV RCX,R13 OR RCX,0x40 CMP qword ptr [RAX],0x0 CMOVZ RCX,R13 CMP R14D,0x2 CMOVZ R13,RCX LAB_0012a807: XOR EAX,EAX MOV qword ptr [R12 + 0xb8],RAX MOV qword ptr [R12 + 0x98],RAX TEST RBX,RBX JNZ 0x0012a831 LEA RAX,[0x3fa680] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x0012aab4 LAB_0012a831: MOV qword ptr [RBP + -0x40],R12 XOR R12D,R12D TEST R9B,R9B SETNZ CL SETZ DL MOV qword ptr [RBP + -0x60],-0x1 CMP R14D,0x1 JZ 0x0012a874 CMP R14D,0x3 JZ 0x0012a874 CMP R14D,0x5 JNZ 0x0012a8f3 MOV R12,qword ptr [RBP + -0x40] MOV RAX,qword ptr [R12 + 0x20] MOV R15,-0x1 JMP 0x0012a9c1 LAB_0012a874: TEST R13B,R13B MOV qword ptr [RBP + -0x38],R13 JS 0x0012a8f7 MOV byte ptr [RBP + -0x50],DL MOV byte ptr [RBP + -0x58],CL LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012aae6 MOV EDI,R15D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x00130e38 LAB_0012a8bc: XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x48] CMP RAX,RDX CMOVBE RAX,RDX SETNZ SIL MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX + 0xe0],ESI MOV qword ptr [RBP + -0x60],RAX SUB RAX,RDX ADD RAX,0x1fff CMP RBX,RAX CMOVNC RBX,RAX MOV CL,byte ptr [RBP + -0x58] MOV DL,byte ptr [RBP + -0x50] JMP 0x0012a8f7 LAB_0012a8f3: MOV qword ptr [RBP + -0x38],R13 LAB_0012a8f7: XOR EAX,EAX MOV AL,DL SHL EAX,0xd OR RAX,-0x4000 MOV qword ptr [RBP + -0x58],RAX MOV R12B,CL SHL R12D,0xd ADD R12,0x2000 LEA R13,[R12 + RBX*0x1] DEC R13 MOV R14,qword ptr [RBP + -0x38] AND R14D,0xffffff4f LEA RAX,[R14 + 0x10] MOV qword ptr [RBP + -0x50],RAX LAB_0012a930: AND R13,qword ptr [RBP + -0x58] CMP R13,R12 MOV RBX,R12 CMOVA RBX,R13 CMP dword ptr [RBP + -0x2c],0x3 JNZ 0x0012a94a LEA R15,[RBX + RBX*0x1] JMP 0x0012a95b LAB_0012a94a: MOV R15,RBX TEST byte ptr [RBP + -0x38],0x40 JZ 0x0012a95b LEA R15,[0x48 + RBX*0x2] LAB_0012a95b: CMP R12,R13 MOV RDX,qword ptr [RBP + -0x50] CMOVC RDX,R14 LEA RAX,[0x479984] MOV EDI,dword ptr [RAX] MOV RSI,R15 CALL 0x001300d9 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x20],RAX TEST RAX,RAX JNZ 0x0012a997 CMP R12,R13 JNC 0x0012aa64 LEA R13,[RBX + RBX*0x2] SHR R13,0x2 JMP 0x0012a930 LAB_0012a997: XOR ECX,ECX MOV R14D,dword ptr [RBP + -0x2c] CMP R14D,0x3 CMOVZ RCX,RBX ADD RCX,RAX MOV R12,qword ptr [RBP + -0x40] MOV qword ptr [R12 + 0x30],RCX MOV qword ptr [R12 + 0x100],R15 MOV R13,qword ptr [RBP + -0x38] MOV R15,qword ptr [RBP + -0x60] LAB_0012a9c1: AND R13D,0xffffff79 MOV qword ptr [R12 + 0xe8],RBX MOV qword ptr [R12 + 0xf0],RBX MOV qword ptr [R12 + 0xf8],R13 MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12 + 0x28],RAX CMP R14D,0x3 JNZ 0x0012aa6b MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x38],RAX ADD RBX,RAX MOV qword ptr [R12 + 0x48],RBX LEA RAX,[0x478fe4] MOV EDI,dword ptr [RAX] MOV RBX,R15 LEA R15,[R12 + 0x50] LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R12 + 0x90],RAX MOV qword ptr [R12 + 0x88],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x78],XMM0 LEA RSI,[0x479cd0] MOV RDI,R15 MOV R15,RBX CALL 0x00124550 MOV RAX,qword ptr [R12 + 0x20] MOV ECX,0x18 JMP 0x0012aa8b LAB_0012aa64: MOV EAX,0x2 JMP 0x0012aab9 LAB_0012aa6b: MOV ECX,0x18 CMP R14D,0x2 JNZ 0x0012aa8b ADD RAX,RBX MOV RCX,qword ptr [RBP + -0x48] AND ECX,0xfff SUB RAX,RCX MOV ECX,0x48 LAB_0012aa8b: MOV qword ptr [R12 + RCX*0x1],RAX MOV qword ptr [R12 + 0x8],R15 MOV dword ptr [R12 + 0xe4],0x0 MOV dword ptr [R12 + 0xb0],R14D MOV RDI,R12 CALL 0x0012ab03 XOR EAX,EAX JMP 0x0012aab9 LAB_0012aab4: MOV EAX,0x1 LAB_0012aab9: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012aacb: LEA R13,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV RDX,R13 CALL 0x00124a4e MOV R13,qword ptr [R13] JMP 0x0012a7b5 LAB_0012aae6: LEA RCX,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV R15,RCX MOV RDX,RCX CALL 0x00124aa6 MOV RAX,qword ptr [R15] JMP 0x0012a8bc
int8 init_io_cache_ext(ulong *param_1,int param_2,ulong param_3,int param_4,ulong param_5,char param_6, ulong param_7) { pthread_mutex_t *__mutex; ulong *puVar1; int iVar2; long lVar3; ulong uVar4; int *piVar5; int8 uVar6; uint uVar7; uint uVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; bool bVar13; int1 local_b8 [72]; ulong local_70; ulong local_68; ulong local_60; ulong local_58; ulong local_50; ulong *local_48; ulong local_40; int local_34; *(int *)((long)param_1 + 0xd4) = param_2; *(int4 *)(param_1 + 0x16) = 0; *param_1 = param_5; param_1[0x20] = 0; param_1[4] = 0; *(int4 *)(param_1 + 0x1c) = 0; param_1[0x1b] = 0; local_50 = param_5; local_34 = param_4; if (param_2 < 0) { uVar4 = param_7 | 0x40; if (_my_b_encr_read == 0) { uVar4 = param_7; } if (param_4 == 2) { param_7 = uVar4; } } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,9); if (lVar3 == 0) { uVar4 = my_tell(param_2,0); } else { init_io_cache_ext_cold_1(lVar3,param_2,&local_70); uVar4 = local_70; } if ((uVar4 != 0xffffffffffffffff) || (piVar5 = (int *)_my_thread_var(), *piVar5 != 0x1d)) { *(uint *)(param_1 + 0x1c) = (uint)(uVar4 != local_50); } } param_1[0x17] = 0; param_1[0x13] = 0; if ((param_3 == 0) && (param_3 = my_default_record_cache_size, my_default_record_cache_size == 0)) { uVar6 = 1; } else { bVar13 = param_6 == '\0'; uVar7 = (uint)!bVar13; uVar8 = (uint)bVar13; local_68 = 0xffffffffffffffff; local_48 = param_1; if ((local_34 == 1) || (local_34 == 3)) { uVar4 = param_7; if (-1 < (char)param_7) { local_58 = CONCAT71(local_58._1_7_,bVar13); local_60 = CONCAT71(local_60._1_7_,!bVar13); local_40 = param_7; lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,8); if (lVar3 == 0) { local_70 = my_seek(param_2,0,2,0); } else { init_io_cache_ext_cold_2(lVar3,param_2,&local_70); } local_68 = local_70; if (local_70 <= local_50) { local_68 = local_50; } *(uint *)(local_48 + 0x1c) = (uint)(local_70 != local_50); uVar4 = (local_68 - local_50) + 0x1fff; if (uVar4 <= param_3) { param_3 = uVar4; } uVar7 = (uint)local_60 & 0xff; uVar8 = (uint)local_58 & 0xff; uVar4 = local_40; } } else { uVar4 = param_7; if (local_34 == 5) { uVar4 = param_1[4]; LAB_0012a9c1: iVar2 = local_34; puVar1 = local_48; uVar9 = local_68; local_48[0x1d] = param_3; local_48[0x1e] = param_3; local_48[0x1f] = (ulong)((uint)param_7 & 0xffffff79); local_48[8] = uVar4; local_48[2] = uVar4; local_48[5] = uVar4; if (local_34 == 3) { uVar4 = local_48[6]; local_48[8] = uVar4; local_48[7] = uVar4; local_48[9] = param_3 + uVar4; __mutex = (pthread_mutex_t *)(local_48 + 10); uVar4 = (**(code **)(PSI_server + 0x40))(key_IO_CACHE_append_buffer_lock,__mutex); puVar1[0x12] = uVar4; puVar1[0x11] = (ulong)__mutex; puVar1[0xf] = 0; puVar1[0x10] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar4 = puVar1[4]; lVar3 = 0x18; } else { lVar3 = 0x18; if (local_34 == 2) { uVar4 = (uVar4 + param_3) - (ulong)((uint)local_50 & 0xfff); lVar3 = 0x48; } } *(ulong *)((long)puVar1 + lVar3) = uVar4; puVar1[1] = uVar9; *(int4 *)((long)puVar1 + 0xe4) = 0; *(int *)(puVar1 + 0x16) = iVar2; init_functions(puVar1); return 0; } } local_40 = uVar4; local_60 = (ulong)(uVar8 << 0xd) | 0xffffffffffffc000; uVar9 = (ulong)(uVar7 << 0xd) + 0x2000; uVar10 = (uVar9 + param_3) - 1; uVar11 = (ulong)((uint)local_40 & 0xffffff4f); local_58 = uVar11 + 0x10; while( true ) { uVar10 = uVar10 & local_60; param_3 = uVar9; if (uVar9 < uVar10) { param_3 = uVar10; } if (local_34 == 3) { uVar12 = param_3 * 2; } else { uVar12 = param_3; if ((local_40 & 0x40) != 0) { uVar12 = param_3 * 2 + 0x48; } } uVar4 = local_58; if (uVar9 < uVar10) { uVar4 = uVar11; } uVar4 = my_malloc(key_memory_IO_CACHE,uVar12,uVar4); local_48[4] = uVar4; if (uVar4 != 0) { uVar9 = 0; if (local_34 == 3) { uVar9 = param_3; } local_48[6] = uVar9 + uVar4; local_48[0x20] = uVar12; param_7 = local_40; goto LAB_0012a9c1; } if (uVar10 <= uVar9) break; uVar10 = param_3 * 3 >> 2; } uVar6 = 2; } return uVar6; }
47,987
google::protobuf::EnumValueDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { auto str = _internal_mutable_name(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.EnumValueDescriptorProto.name"); #endif // !NDEBUG } else goto handle_unusual; continue; // optional int32 number = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { _Internal::set_has_number(&has_bits); _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.EnumValueOptions options = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; default: goto handle_unusual; } // switch handle_unusual: if ((tag == 0) || ((tag & 7) == 4)) { CHK_(ptr); ctx->SetLastTag(tag); goto message_done; } ptr = UnknownFieldParse( tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O3
cpp
google::protobuf::EnumValueDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %rax movq %rsi, (%rax) movl 0x5c(%rdx), %edx movq %r14, %rdi movq %rax, %rsi callq 0x594d4 xorl %r12d, %r12d testb %al, %al je 0x4ecc3 orl %r12d, 0x10(%rbx) movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8(%rbx), %r15 leaq 0x18(%rbx), %rax movq %rax, 0x10(%rsp) xorl %r12d, %r12d leaq 0x8(%rsp), %r13 movq 0x8(%rsp), %rdi movzbl (%rdi), %ebp leaq 0x1(%rdi), %rax testb %bpl, %bpl jns 0x4ed0c movzbl (%rax), %eax movl %eax, %ecx shll $0x7, %ecx addl %ecx, %ebp addl $-0x80, %ebp testb %al, %al js 0x4ed03 addq $0x2, %rdi movq %rdi, %rax jmp 0x4ed0c movl %ebp, %esi callq 0x9f24e movl %edx, %ebp movq %rax, 0x8(%rsp) movl %ebp, %ecx shrl $0x3, %ecx cmpl $0x3, %ecx je 0x4eda9 cmpl $0x2, %ecx je 0x4ed6d cmpl $0x1, %ecx jne 0x4edec cmpb $0xa, %bpl jne 0x4edec orb $0x1, 0x10(%rbx) movq 0x8(%rbx), %rax movq %rax, %rsi andq $-0x4, %rsi testb $0x1, %al jne 0x4ee54 movq 0x10(%rsp), %rdi callq 0x9323a movq 0x8(%rsp), %rsi movq %rax, %rdi movq %r14, %rdx callq 0x9f2ea jmp 0x4ee1c cmpb $0x10, %bpl jne 0x4edec orl $0x4, %r12d movzbl (%rax), %esi leaq 0x1(%rax), %rcx testb %sil, %sil jns 0x4ed9f movzbl (%rcx), %ecx movl %ecx, %edx shll $0x7, %edx addl %edx, %esi addl $-0x80, %esi testb %cl, %cl js 0x4ee42 addq $0x2, %rax movq %rax, %rcx movq %rcx, 0x8(%rsp) movl %esi, 0x28(%rbx) jmp 0x4ee26 cmpb $0x1a, %bpl jne 0x4edec orb $0x2, 0x10(%rbx) movq 0x20(%rbx), %rsi testq %rsi, %rsi jne 0x4eddf movq (%r15), %rax movq %rax, %rdi andq $-0x4, %rdi testb $0x1, %al jne 0x4ee6e callq 0x58a84 movq %rax, %rsi movq %rax, 0x20(%rbx) movq 0x8(%rsp), %rax movq %r14, %rdi movq %rax, %rdx callq 0x10dda jmp 0x4ee1c testl %ebp, %ebp je 0x4ee76 movl %ebp, %ecx andl $0x7, %ecx cmpl $0x4, %ecx je 0x4ee76 movq (%r15), %rsi testb $0x1, %sil je 0x4ee5c andq $-0x4, %rsi addq $0x8, %rsi movl %ebp, %edi movq %rax, %rdx movq %r14, %rcx callq 0x8822d movq %rax, 0x8(%rsp) testq %rax, %rax je 0x4ee86 movl 0x5c(%r14), %edx movq %r14, %rdi movq %r13, %rsi callq 0x594d4 testb %al, %al je 0x4ecd8 jmp 0x4ecab movq %rax, %rdi callq 0x9f1c2 movq %rax, 0x8(%rsp) movl %edx, 0x28(%rbx) jmp 0x4ee21 movq (%rsi), %rsi jmp 0x4ed4e movq %r15, %rdi callq 0x59664 movq %rax, %rsi movq 0x8(%rsp), %rax jmp 0x4ee0f movq (%rdi), %rdi jmp 0x4edce testq %rax, %rax je 0x4ee86 decl %ebp movl %ebp, 0x50(%r14) jmp 0x4ecab movq $0x0, 0x8(%rsp) jmp 0x4ecab
_ZN6google8protobuf24EnumValueDescriptorProto14_InternalParseEPKcPNS0_8internal12ParseContextE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdx mov rbx, rdi lea rax, [rsp+48h+var_40] mov [rax], rsi mov edx, [rdx+5Ch]; int mov rdi, r14; this mov rsi, rax; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) xor r12d, r12d test al, al jz short loc_4ECC3 loc_4ECAB: or [rbx+10h], r12d mov rax, [rsp+48h+var_40] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4ECC3: lea r15, [rbx+8] lea rax, [rbx+18h] mov [rsp+48h+var_38], rax xor r12d, r12d lea r13, [rsp+48h+var_40] loc_4ECD8: mov rdi, [rsp+48h+var_40]; this movzx ebp, byte ptr [rdi] lea rax, [rdi+1] test bpl, bpl jns short loc_4ED0C movzx eax, byte ptr [rax] mov ecx, eax shl ecx, 7 add ebp, ecx add ebp, 0FFFFFF80h test al, al js short loc_4ED03 add rdi, 2 mov rax, rdi jmp short loc_4ED0C loc_4ED03: mov esi, ebp; char * call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint) mov ebp, edx loc_4ED0C: mov [rsp+48h+var_40], rax mov ecx, ebp shr ecx, 3 cmp ecx, 3 jz loc_4EDA9 cmp ecx, 2 jz short loc_4ED6D cmp ecx, 1 jnz loc_4EDEC cmp bpl, 0Ah jnz loc_4EDEC or byte ptr [rbx+10h], 1 mov rax, [rbx+8] mov rsi, rax and rsi, 0FFFFFFFFFFFFFFFCh test al, 1 jnz loc_4EE54 loc_4ED4E: mov rdi, [rsp+48h+var_38] call _ZN6google8protobuf8internal14ArenaStringPtr7MutableB5cxx11EPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Mutable(google::protobuf::Arena *) mov rsi, [rsp+48h+var_40] mov rdi, rax mov rdx, r14 call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) jmp loc_4EE1C loc_4ED6D: cmp bpl, 10h jnz short loc_4EDEC or r12d, 4 movzx esi, byte ptr [rax] lea rcx, [rax+1] test sil, sil jns short loc_4ED9F movzx ecx, byte ptr [rcx] mov edx, ecx shl edx, 7; unsigned int add esi, edx add esi, 0FFFFFF80h; char * test cl, cl js loc_4EE42 add rax, 2 mov rcx, rax loc_4ED9F: mov [rsp+48h+var_40], rcx mov [rbx+28h], esi jmp short loc_4EE26 loc_4EDA9: cmp bpl, 1Ah jnz short loc_4EDEC or byte ptr [rbx+10h], 2 mov rsi, [rbx+20h] test rsi, rsi jnz short loc_4EDDF mov rax, [r15] mov rdi, rax and rdi, 0FFFFFFFFFFFFFFFCh test al, 1 jnz loc_4EE6E loc_4EDCE: call _ZN6google8protobuf5Arena18CreateMaybeMessageINS0_16EnumValueOptionsEJEEEPT_PS1_DpOT0_; google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(google::protobuf::Arena*) mov rsi, rax; google::protobuf::MessageLite * mov [rbx+20h], rax mov rax, [rsp+48h+var_40] loc_4EDDF: mov rdi, r14; this mov rdx, rax; char * call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*) jmp short loc_4EE1C loc_4EDEC: test ebp, ebp jz loc_4EE76 mov ecx, ebp and ecx, 7 cmp ecx, 4 jz short loc_4EE76 mov rsi, [r15] test sil, 1 jz short loc_4EE5C and rsi, 0FFFFFFFFFFFFFFFCh add rsi, 8; unsigned __int64 loc_4EE0F: mov edi, ebp; this mov rdx, rax; google::protobuf::UnknownFieldSet * mov rcx, r14; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) loc_4EE1C: mov [rsp+48h+var_40], rax loc_4EE21: test rax, rax jz short loc_4EE86 loc_4EE26: mov edx, [r14+5Ch]; int mov rdi, r14; this mov rsi, r13; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) test al, al jz loc_4ECD8 jmp loc_4ECAB loc_4EE42: mov rdi, rax; this call _ZN6google8protobuf8internal17VarintParseSlow32EPKcj; google::protobuf::internal::VarintParseSlow32(char const*,uint) mov [rsp+48h+var_40], rax mov [rbx+28h], edx jmp short loc_4EE21 loc_4EE54: mov rsi, [rsi] jmp loc_4ED4E loc_4EE5C: mov rdi, r15 call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov rsi, rax mov rax, [rsp+48h+var_40] jmp short loc_4EE0F loc_4EE6E: mov rdi, [rdi] jmp loc_4EDCE loc_4EE76: test rax, rax jz short loc_4EE86 dec ebp mov [r14+50h], ebp jmp loc_4ECAB loc_4EE86: mov [rsp+48h+var_40], 0 jmp loc_4ECAB
google::protobuf::internal * google::protobuf::EnumValueDescriptorProto::_InternalParse( google::protobuf::EnumValueDescriptorProto *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { unsigned int v5; // edx google::protobuf::internal::ParseContext *v6; // r8 int v7; // r12d _QWORD *v9; // r15 unsigned int v10; // ebp google::protobuf::internal *TagFallback; // rax int v12; // eax unsigned int v13; // edx unsigned int v14; // ecx _QWORD *v15; // rsi long long v16; // rax google::protobuf::internal *v17; // rax const char *v18; // rsi google::protobuf::internal *v19; // rcx int v20; // ecx google::protobuf::MessageLite *v21; // rsi _QWORD *v22; // rdi unsigned long long v23; // rsi int v24; // edx google::protobuf::internal *v25; // [rsp+8h] [rbp-40h] BYREF char *v26; // [rsp+10h] [rbp-38h] v25 = a2; v7 = 0; if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck( a3, (const char **)&v25, *((_DWORD *)a3 + 23)) ) goto LABEL_2; v9 = (_QWORD *)((char *)this + 8); v26 = (char *)this + 24; v7 = 0; while ( 1 ) { v10 = *(unsigned __int8 *)v25; TagFallback = (google::protobuf::internal *)((char *)v25 + 1); if ( (v10 & 0x80u) != 0 ) { v12 = *(unsigned __int8 *)TagFallback; v10 = (v12 << 7) + v10 - 128; if ( (v12 & 0x80u) != 0 ) { TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback( v25, (const char *)v10, v5); v10 = v13; } else { TagFallback = (google::protobuf::internal *)((char *)v25 + 2); } } v25 = TagFallback; v14 = v10 >> 3; if ( v10 >> 3 == 3 ) { if ( (_BYTE)v10 == 26 ) { *((_BYTE *)this + 16) |= 2u; v21 = (google::protobuf::MessageLite *)*((_QWORD *)this + 4); if ( !v21 ) { v22 = (_QWORD *)(*v9 & 0xFFFFFFFFFFFFFFFCLL); if ( (*v9 & 1) != 0 ) v22 = (_QWORD *)*v22; v21 = (google::protobuf::MessageLite *)google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(v22); *((_QWORD *)this + 4) = v21; TagFallback = v25; } v17 = (google::protobuf::internal *)google::protobuf::internal::ParseContext::ParseMessage( a3, v21, (const char *)TagFallback); goto LABEL_31; } goto LABEL_26; } if ( v14 != 2 ) break; if ( (_BYTE)v10 != 16 ) goto LABEL_26; v7 |= 4u; LODWORD(v18) = *(unsigned __int8 *)TagFallback; v19 = (google::protobuf::internal *)((char *)TagFallback + 1); if ( (char)v18 >= 0 ) goto LABEL_19; v20 = *(unsigned __int8 *)v19; v18 = (const char *)(unsigned int)((v20 << 7) + (_DWORD)v18 - 128); if ( (v20 & 0x80u) == 0 ) { v19 = (google::protobuf::internal *)((char *)TagFallback + 2); LABEL_19: v25 = v19; *((_DWORD *)this + 10) = (_DWORD)v18; goto LABEL_33; } v17 = (google::protobuf::internal *)google::protobuf::internal::VarintParseSlow32(TagFallback, v18, v20 << 7); v25 = v17; *((_DWORD *)this + 10) = v24; LABEL_32: if ( !v17 ) goto LABEL_39; LABEL_33: if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck( a3, (const char **)&v25, *((_DWORD *)a3 + 23)) ) goto LABEL_2; } if ( v14 == 1 && (_BYTE)v10 == 10 ) { *((_BYTE *)this + 16) |= 1u; v15 = (_QWORD *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL); if ( (*((_QWORD *)this + 1) & 1) != 0 ) v15 = (_QWORD *)*v15; v16 = google::protobuf::internal::ArenaStringPtr::Mutable[abi:cxx11](v26, v15); v17 = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v16, v25, a3); goto LABEL_31; } LABEL_26: if ( v10 && (v10 & 7) != 4 ) { if ( (*v9 & 1) != 0 ) { v23 = (*v9 & 0xFFFFFFFFFFFFFFFCLL) + 8; } else { v23 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>((char *)this + 8); TagFallback = v25; } v17 = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( (google::protobuf::internal *)v10, v23, TagFallback, (const char *)a3, v6); LABEL_31: v25 = v17; goto LABEL_32; } if ( TagFallback ) { *((_DWORD *)a3 + 20) = v10 - 1; goto LABEL_2; } LABEL_39: v25 = 0LL; LABEL_2: *((_DWORD *)this + 4) |= v7; return v25; }
_InternalParse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDX MOV RBX,RDI LEA RAX,[RSP + 0x8] MOV qword ptr [RAX],RSI MOV EDX,dword ptr [RDX + 0x5c] MOV RDI,R14 MOV RSI,RAX CALL 0x001594d4 XOR R12D,R12D TEST AL,AL JZ 0x0014ecc3 LAB_0014ecab: OR dword ptr [RBX + 0x10],R12D MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014ecc3: LEA R15,[RBX + 0x8] LEA RAX,[RBX + 0x18] MOV qword ptr [RSP + 0x10],RAX XOR R12D,R12D LEA R13,[RSP + 0x8] LAB_0014ecd8: MOV RDI,qword ptr [RSP + 0x8] MOVZX EBP,byte ptr [RDI] LEA RAX,[RDI + 0x1] TEST BPL,BPL JNS 0x0014ed0c MOVZX EAX,byte ptr [RAX] MOV ECX,EAX SHL ECX,0x7 ADD EBP,ECX ADD EBP,-0x80 TEST AL,AL JS 0x0014ed03 ADD RDI,0x2 MOV RAX,RDI JMP 0x0014ed0c LAB_0014ed03: MOV ESI,EBP CALL 0x0019f24e MOV EBP,EDX LAB_0014ed0c: MOV qword ptr [RSP + 0x8],RAX MOV ECX,EBP SHR ECX,0x3 CMP ECX,0x3 JZ 0x0014eda9 CMP ECX,0x2 JZ 0x0014ed6d CMP ECX,0x1 JNZ 0x0014edec CMP BPL,0xa JNZ 0x0014edec OR byte ptr [RBX + 0x10],0x1 MOV RAX,qword ptr [RBX + 0x8] MOV RSI,RAX AND RSI,-0x4 TEST AL,0x1 JNZ 0x0014ee54 LAB_0014ed4e: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0019323a MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RAX MOV RDX,R14 CALL 0x0019f2ea JMP 0x0014ee1c LAB_0014ed6d: CMP BPL,0x10 JNZ 0x0014edec OR R12D,0x4 MOVZX ESI,byte ptr [RAX] LEA RCX,[RAX + 0x1] TEST SIL,SIL JNS 0x0014ed9f MOVZX ECX,byte ptr [RCX] MOV EDX,ECX SHL EDX,0x7 ADD ESI,EDX ADD ESI,-0x80 TEST CL,CL JS 0x0014ee42 ADD RAX,0x2 MOV RCX,RAX LAB_0014ed9f: MOV qword ptr [RSP + 0x8],RCX MOV dword ptr [RBX + 0x28],ESI JMP 0x0014ee26 LAB_0014eda9: CMP BPL,0x1a JNZ 0x0014edec OR byte ptr [RBX + 0x10],0x2 MOV RSI,qword ptr [RBX + 0x20] TEST RSI,RSI JNZ 0x0014eddf MOV RAX,qword ptr [R15] MOV RDI,RAX AND RDI,-0x4 TEST AL,0x1 JNZ 0x0014ee6e LAB_0014edce: CALL 0x00158a84 MOV RSI,RAX MOV qword ptr [RBX + 0x20],RAX MOV RAX,qword ptr [RSP + 0x8] LAB_0014eddf: MOV RDI,R14 MOV RDX,RAX CALL 0x00110dda JMP 0x0014ee1c LAB_0014edec: TEST EBP,EBP JZ 0x0014ee76 MOV ECX,EBP AND ECX,0x7 CMP ECX,0x4 JZ 0x0014ee76 MOV RSI,qword ptr [R15] TEST SIL,0x1 JZ 0x0014ee5c AND RSI,-0x4 ADD RSI,0x8 LAB_0014ee0f: MOV EDI,EBP MOV RDX,RAX MOV RCX,R14 CALL 0x0018822d LAB_0014ee1c: MOV qword ptr [RSP + 0x8],RAX LAB_0014ee21: TEST RAX,RAX JZ 0x0014ee86 LAB_0014ee26: MOV EDX,dword ptr [R14 + 0x5c] MOV RDI,R14 MOV RSI,R13 CALL 0x001594d4 TEST AL,AL JZ 0x0014ecd8 JMP 0x0014ecab LAB_0014ee42: MOV RDI,RAX CALL 0x0019f1c2 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RBX + 0x28],EDX JMP 0x0014ee21 LAB_0014ee54: MOV RSI,qword ptr [RSI] JMP 0x0014ed4e LAB_0014ee5c: MOV RDI,R15 CALL 0x00159664 MOV RSI,RAX MOV RAX,qword ptr [RSP + 0x8] JMP 0x0014ee0f LAB_0014ee6e: MOV RDI,qword ptr [RDI] JMP 0x0014edce LAB_0014ee76: TEST RAX,RAX JZ 0x0014ee86 DEC EBP MOV dword ptr [R14 + 0x50],EBP JMP 0x0014ecab LAB_0014ee86: MOV qword ptr [RSP + 0x8],0x0 JMP 0x0014ecab
/* google::protobuf::EnumValueDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*) */ byte * __thiscall google::protobuf::EnumValueDescriptorProto::_InternalParse (EnumValueDescriptorProto *this,char *param_1,ParseContext *param_2) { InternalMetadata *this_00; byte bVar1; byte bVar2; char cVar3; string *psVar4; byte *pbVar5; MessageLite *pMVar6; uint uVar7; uint uVar8; Arena *pAVar9; UnknownFieldSet *pUVar10; uint uVar11; int1 auVar12 [12]; byte *local_40; EnumValueDescriptorProto *local_38; local_40 = (byte *)param_1; cVar3 = internal::EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_40,*(int *)(param_2 + 0x5c)); uVar11 = 0; if (cVar3 == '\0') { this_00 = (InternalMetadata *)(this + 8); local_38 = this + 0x18; uVar11 = 0; do { bVar1 = *local_40; auVar12[8] = bVar1; auVar12._0_8_ = local_40 + 1; auVar12._9_3_ = 0; if ((char)bVar1 < '\0') { bVar2 = local_40[1]; uVar7 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80; if ((char)bVar2 < '\0') { auVar12 = internal::ReadTagFallback((char *)local_40,uVar7); } else { auVar12._8_4_ = uVar7; auVar12._0_8_ = local_40 + 2; } } uVar8 = auVar12._8_4_; local_40 = auVar12._0_8_; uVar7 = uVar8 >> 3; cVar3 = auVar12[8]; if (uVar7 == 3) { if (cVar3 != '\x1a') goto LAB_0014edec; this[0x10] = (EnumValueDescriptorProto)((byte)this[0x10] | 2); pMVar6 = *(MessageLite **)(this + 0x20); if (pMVar6 == (MessageLite *)0x0) { pAVar9 = (Arena *)(*(ulong *)this_00 & 0xfffffffffffffffc); if ((*(ulong *)this_00 & 1) != 0) { pAVar9 = *(Arena **)pAVar9; } pMVar6 = (MessageLite *) Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(pAVar9); *(MessageLite **)(this + 0x20) = pMVar6; } local_40 = (byte *)internal::ParseContext::ParseMessage(param_2,pMVar6,(char *)local_40); LAB_0014ee21: if (local_40 == (byte *)0x0) { LAB_0014ee86: local_40 = (byte *)0x0; break; } } else { if (uVar7 != 2) { if ((uVar7 == 1) && (cVar3 == '\n')) { this[0x10] = (EnumValueDescriptorProto)((byte)this[0x10] | 1); pAVar9 = (Arena *)(*(ulong *)(this + 8) & 0xfffffffffffffffc); if ((*(ulong *)(this + 8) & 1) != 0) { pAVar9 = *(Arena **)pAVar9; } psVar4 = (string *) internal::ArenaStringPtr::Mutable_abi_cxx11_((ArenaStringPtr *)local_38,pAVar9) ; local_40 = (byte *)internal::InlineGreedyStringParser(psVar4,(char *)local_40,param_2); goto LAB_0014ee21; } LAB_0014edec: if ((uVar8 != 0) && ((uVar8 & 7) != 4)) { if ((*(ulong *)this_00 & 1) == 0) { pUVar10 = internal::InternalMetadata:: mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(this_00); } else { pUVar10 = (UnknownFieldSet *)((*(ulong *)this_00 & 0xfffffffffffffffc) + 8); } local_40 = (byte *)internal::UnknownFieldParse ((ulong)uVar8,pUVar10,(char *)local_40,param_2); goto LAB_0014ee21; } if (local_40 == (byte *)0x0) goto LAB_0014ee86; *(uint *)(param_2 + 0x50) = uVar8 - 1; break; } if (cVar3 != '\x10') goto LAB_0014edec; uVar11 = 4; bVar1 = *local_40; uVar7 = (uint)bVar1; pbVar5 = local_40 + 1; if ((char)bVar1 < '\0') { uVar7 = ((uint)bVar1 + (uint)*pbVar5 * 0x80) - 0x80; if ((char)*pbVar5 < '\0') { auVar12 = internal::VarintParseSlow32((char *)local_40,uVar7); local_40 = auVar12._0_8_; *(int *)(this + 0x28) = auVar12._8_4_; goto LAB_0014ee21; } pbVar5 = local_40 + 2; } *(uint *)(this + 0x28) = uVar7; local_40 = pbVar5; } cVar3 = internal::EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_40,*(int *)(param_2 + 0x5c)); } while (cVar3 == '\0'); } *(uint *)(this + 0x10) = *(uint *)(this + 0x10) | uVar11; return local_40; }
47,988
ftxui::automerge(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/automerge.cpp
Element automerge(Element child) { class Impl : public NodeDecorator { public: using NodeDecorator::NodeDecorator; void Render(Screen& screen) override { for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { screen.PixelAt(x, y).automerge = true; } } Node::Render(screen); } }; return std::make_shared<Impl>(std::move(child)); }
O1
cpp
ftxui::automerge(std::shared_ptr<ftxui::Node>): pushq %rbx movq %rdi, %rbx callq 0x24132 movl $0x60, %esi movq %rbx, %rdi popq %rbx jmp 0xb400 nop
_ZZN5ftxui9automergeESt10shared_ptrINS_4NodeEEEN4ImplD0Ev: push rbx mov rbx, rdi call _ZN5ftxui4NodeD2Ev; ftxui::Node::~Node() mov esi, 60h ; '`'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl(void **a1) { ftxui::Node::~Node(a1); operator delete(a1, 0x60uLL); }
~Impl: PUSH RBX MOV RBX,RDI CALL 0x00124132 MOV ESI,0x60 MOV RDI,RBX POP RBX JMP 0x0010b400
/* ~Impl() */ void __thiscall ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl(Impl *this) { Node::~Node((Node *)this); operator_delete(this,0x60); return; }
47,989
testing::Message::operator<<(wchar_t*)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
Message& Message::operator<<(wchar_t* wide_c_str) { return *this << internal::String::ShowWideCString(wide_c_str); }
O1
cpp
testing::Message::operator<<(wchar_t*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x20d16 movq (%rbx), %rdi addq $0x10, %rdi movq (%r14), %rsi movq 0x8(%r14), %rdx callq 0x95a0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x20d95 movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x20dbe movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 movq %rbx, %rdi callq 0x99a0
_ZN7testing7MessagelsEPw: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] mov rdi, r14; int call _ZN7testing8internal6String15ShowWideCStringB5cxx11EPKw; testing::internal::String::ShowWideCString(wchar_t const*) mov rdi, [rbx] add rdi, 10h mov rsi, [r14] mov rdx, [r14+8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_20D95 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20D95: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_20DBE mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20DBE: mov rdi, rbx call __Unwind_Resume
_QWORD * testing::Message::operator<<(_QWORD *a1) { void *v2[2]; // [rsp+8h] [rbp-30h] BYREF long long v3; // [rsp+18h] [rbp-20h] BYREF testing::internal::String::ShowWideCString[abi:cxx11]((int)v2); std::__ostream_insert<char,std::char_traits<char>>(*a1 + 16LL, v2[0], v2[1]); if ( v2[0] != &v3 ) operator delete(v2[0], v3 + 1); return a1; }
operator<<: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00120d16 MOV RDI,qword ptr [RBX] ADD RDI,0x10 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00120d75: CALL 0x001095a0 LAB_00120d7a: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00120d95 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001094c0 LAB_00120d95: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* testing::Message::TEMPNAMEPLACEHOLDERVALUE(wchar_t*) */ Message * __thiscall testing::Message::operator<<(Message *this,wchar_t *param_1) { long *local_30; long local_28; long local_20 [2]; internal::String::ShowWideCString_abi_cxx11_((String *)&local_30,param_1); /* try { // try from 00120d75 to 00120d79 has its CatchHandler @ 00120da0 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x10),(char *)local_30,local_28); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } return this; }
47,990
LefDefParser::lefwLayerRoutingStartSpacingtableParallel(int, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingStartSpacingtableParallel(int numLength, double *length) { int i; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRoutingReqData) { return LEFW_BAD_ORDER; } if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " SPACINGTABLE\n"); encPrint(lefwFile, (char*) " PARALLELRUNLENGTH"); for (i = 0; i < numLength; i++) encPrint(lefwFile, (char*) " %.11g", length[i]); } else { fprintf(lefwFile, " SPACINGTABLE\n"); fprintf(lefwFile, " PARALLELRUNLENGTH"); for (i = 0; i < numLength; i++) fprintf(lefwFile, " %.11g", length[i]); } lefwState = LEFW_LAYERROUTING_SP_START; lefwLines += 2; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerRoutingStartSpacingtableParallel(int, double*): subq $0x18, %rsp movl %edi, 0x10(%rsp) movq %rsi, 0x8(%rsp) leaq 0xa66ec(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x1eb77 movl $0x1, 0x14(%rsp) jmp 0x1ed26 leaq 0xa6922(%rip), %rax # 0xc54a0 cmpl $0x7, (%rax) je 0x1eb9c leaq 0xa6916(%rip), %rax # 0xc54a0 cmpl $0x1f, (%rax) je 0x1eb9c movl $0x2, 0x14(%rsp) jmp 0x1ed26 leaq 0xa6981(%rip), %rax # 0xc5524 cmpl $0x0, (%rax) jne 0x1ebb5 movl $0x2, 0x14(%rsp) jmp 0x1ed26 cmpl $0x0, 0xa6988(%rip) # 0xc5544 je 0x1ec03 cmpl $0x0, 0xa6977(%rip) # 0xc553c je 0x1ebe1 leaq 0xa6682(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x73c41(%rip), %rsi # 0x92819 movb $0x0, %al callq 0x8bf50 jmp 0x1ebf9 leaq 0xa6668(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x73c27(%rip), %rsi # 0x92819 movb $0x0, %al callq 0x2370 movl $0x0, 0xa6941(%rip) # 0xc5544 cmpl $0x0, 0xa6932(%rip) # 0xc553c je 0x1ec84 leaq 0xa663d(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x72204(%rip), %rsi # 0x90e21 movb $0x0, %al callq 0x8bf50 leaq 0xa6625(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x72237(%rip), %rsi # 0x90e6c movb $0x0, %al callq 0x8bf50 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x1ec82 leaq 0xa65fb(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rax movslq 0x4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 leaq 0x73da4(%rip), %rsi # 0x92a12 movb $0x1, %al callq 0x8bf50 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x1ec44 jmp 0x1ecfc leaq 0xa65c5(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x7218c(%rip), %rsi # 0x90e21 movb $0x0, %al callq 0x2370 leaq 0xa65ad(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x721bf(%rip), %rsi # 0x90e6c movb $0x0, %al callq 0x2370 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x1ecfa leaq 0xa6583(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rax movslq 0x4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 leaq 0x73d2c(%rip), %rsi # 0x92a12 movb $0x1, %al callq 0x2370 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x1ecbc jmp 0x1ecfc leaq 0xa679d(%rip), %rax # 0xc54a0 movl $0x8, (%rax) leaq 0xa678c(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x2, %ecx leaq 0xa6780(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
_ZN12LefDefParser41lefwLayerRoutingStartSpacingtableParallelEiPd: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_10], rsi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_1EB77 mov [rsp+18h+var_4], 1 jmp loc_1ED26 loc_1EB77: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_1EB9C lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_1EB9C mov [rsp+18h+var_4], 2 jmp loc_1ED26 loc_1EB9C: lea rax, _ZN12LefDefParser20lefwIsRoutingReqDataE; LefDefParser::lefwIsRoutingReqData cmp dword ptr [rax], 0 jnz short loc_1EBB5 mov [rsp+18h+var_4], 2 jmp loc_1ED26 loc_1EBB5: cmp cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon jz short loc_1EC03 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1EBE1 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1EBF9 loc_1EBE1: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf loc_1EBF9: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon loc_1EC03: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1EC84 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aSpacingtable; " SPACINGTABLE\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aParallelrunlen+1; " PARALLELRUNLENGTH" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov [rsp+18h+var_14], 0 loc_1EC44: mov eax, [rsp+18h+var_14] cmp eax, [rsp+18h+var_8] jge short loc_1EC82 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_14] movsd xmm0, qword ptr [rax+rcx*8] lea rsi, aArea11g+0Ah; " %.11g" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax jmp short loc_1EC44 loc_1EC82: jmp short loc_1ECFC loc_1EC84: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aSpacingtable; " SPACINGTABLE\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aParallelrunlen+1; " PARALLELRUNLENGTH" mov al, 0 call _fprintf mov [rsp+18h+var_14], 0 loc_1ECBC: mov eax, [rsp+18h+var_14] cmp eax, [rsp+18h+var_8] jge short loc_1ECFA lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_14] movsd xmm0, qword ptr [rax+rcx*8] lea rsi, aArea11g+0Ah; " %.11g" mov al, 1 call _fprintf mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax jmp short loc_1ECBC loc_1ECFA: jmp short $+2 loc_1ECFC: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 8 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 2 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_1ED26: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerRoutingStartSpacingtableParallel( LefDefParser *this, long long a2, double *a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // r8d int v12; // r9d int i; // [rsp+4h] [rbp-14h] int j; // [rsp+4h] [rbp-14h] if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 ) { if ( LefDefParser::lefwIsRoutingReqData ) { if ( LefDefParser::prtSemiColon ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", (_DWORD)a3, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n"); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" SPACINGTABLE\n", (_DWORD)a3, a4, a5, a6); LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" PARALLELRUNLENGTH", v6, v7, v8, v9); for ( i = 0; i < (int)this; ++i ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" %.11g", v10, i, v11, v12); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " SPACINGTABLE\n"); fprintf(*(_QWORD *)&LefDefParser::lefwFile, " PARALLELRUNLENGTH"); for ( j = 0; j < (int)this; ++j ) fprintf(*(_QWORD *)&LefDefParser::lefwFile, " %.11g", *(double *)(a2 + 8LL * j)); } LefDefParser::lefwState = 8; LefDefParser::lefwLines += 2; return 0; } else { return 2; } } else { return 2; } } else { return 1; } }
lefwLayerRoutingStartSpacingtableParallel: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV qword ptr [RSP + 0x8],RSI LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x0011eb77 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011ed26 LAB_0011eb77: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x7 JZ 0x0011eb9c LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1f JZ 0x0011eb9c MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011ed26 LAB_0011eb9c: LEA RAX,[0x1c5524] CMP dword ptr [RAX],0x0 JNZ 0x0011ebb5 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011ed26 LAB_0011ebb5: CMP dword ptr [0x001c5544],0x0 JZ 0x0011ec03 CMP dword ptr [0x001c553c],0x0 JZ 0x0011ebe1 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x192819] MOV AL,0x0 CALL 0x0018bf50 JMP 0x0011ebf9 LAB_0011ebe1: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x192819] MOV AL,0x0 CALL 0x00102370 LAB_0011ebf9: MOV dword ptr [0x001c5544],0x0 LAB_0011ec03: CMP dword ptr [0x001c553c],0x0 JZ 0x0011ec84 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x190e21] MOV AL,0x0 CALL 0x0018bf50 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x190e6c] MOV AL,0x0 CALL 0x0018bf50 MOV dword ptr [RSP + 0x4],0x0 LAB_0011ec44: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JGE 0x0011ec82 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] LEA RSI,[0x192a12] MOV AL,0x1 CALL 0x0018bf50 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x0011ec44 LAB_0011ec82: JMP 0x0011ecfc LAB_0011ec84: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x190e21] MOV AL,0x0 CALL 0x00102370 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x190e6c] MOV AL,0x0 CALL 0x00102370 MOV dword ptr [RSP + 0x4],0x0 LAB_0011ecbc: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JGE 0x0011ecfa LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] LEA RSI,[0x192a12] MOV AL,0x1 CALL 0x00102370 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x0011ecbc LAB_0011ecfa: JMP 0x0011ecfc LAB_0011ecfc: LEA RAX,[0x1c54a0] MOV dword ptr [RAX],0x8 LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x2 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_0011ed26: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerRoutingStartSpacingtableParallel(int, double*) */ int4 LefDefParser::lefwLayerRoutingStartSpacingtableParallel(int param_1,double *param_2) { int local_14; int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((lefwState == 7) || (lefwState == 0x1f)) { if (lefwIsRoutingReqData == 0) { local_4 = 2; } else { if (prtSemiColon != 0) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,";\n"); } else { encPrint(lefwFile,";\n"); } prtSemiColon = 0; } if (lefwWriteEncrypt == 0) { fprintf(lefwFile," SPACINGTABLE\n"); fprintf(lefwFile," PARALLELRUNLENGTH"); for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) { fprintf(lefwFile," %.11g",param_2[local_14]); } } else { encPrint(lefwFile," SPACINGTABLE\n"); encPrint(lefwFile," PARALLELRUNLENGTH"); for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) { encPrint(lefwFile," %.11g",param_2[local_14]); } } lefwState = 8; lefwLines = lefwLines + 2; local_4 = 0; } } else { local_4 = 2; } return local_4; }
47,991
JS_GetAnyOpaque
bluesky950520[P]quickjs/quickjs.c
void *JS_GetAnyOpaque(JSValue obj, JSClassID *class_id) { JSObject *p; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) { *class_id = 0; return NULL; } p = JS_VALUE_GET_OBJ(obj); *class_id = p->class_id; return p->u.opaque; }
O0
c
JS_GetAnyOpaque: movq %rdi, -0x18(%rsp) movq %rsi, -0x10(%rsp) movq %rdx, -0x20(%rsp) movq -0x10(%rsp), %rax cmpl $-0x1, %eax je 0x371ff movq -0x20(%rsp), %rax movl $0x0, (%rax) movq $0x0, -0x8(%rsp) jmp 0x37227 movq -0x18(%rsp), %rax movq %rax, -0x28(%rsp) movq -0x28(%rsp), %rax movzwl 0x6(%rax), %ecx movq -0x20(%rsp), %rax movl %ecx, (%rax) movq -0x28(%rsp), %rax movq 0x30(%rax), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopl (%rax)
JS_GetAnyOpaque: mov [rsp+var_18], rdi mov [rsp+var_10], rsi mov [rsp+var_20], rdx mov rax, [rsp+var_10] cmp eax, 0FFFFFFFFh jz short loc_371FF mov rax, [rsp+var_20] mov dword ptr [rax], 0 mov [rsp+var_8], 0 jmp short loc_37227 loc_371FF: mov rax, [rsp+var_18] mov [rsp+var_28], rax mov rax, [rsp+var_28] movzx ecx, word ptr [rax+6] mov rax, [rsp+var_20] mov [rax], ecx mov rax, [rsp+var_28] mov rax, [rax+30h] mov [rsp+var_8], rax loc_37227: mov rax, [rsp+var_8] retn
long long JS_GetAnyOpaque(long long a1, int a2, _DWORD *a3) { if ( a2 == -1 ) { *a3 = *(unsigned __int16 *)(a1 + 6); return *(_QWORD *)(a1 + 48); } else { *a3 = 0; return 0LL; } }
JS_GetAnyOpaque: MOV qword ptr [RSP + -0x18],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x20],RDX MOV RAX,qword ptr [RSP + -0x10] CMP EAX,-0x1 JZ 0x001371ff MOV RAX,qword ptr [RSP + -0x20] MOV dword ptr [RAX],0x0 MOV qword ptr [RSP + -0x8],0x0 JMP 0x00137227 LAB_001371ff: MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RSP + -0x28],RAX MOV RAX,qword ptr [RSP + -0x28] MOVZX ECX,word ptr [RAX + 0x6] MOV RAX,qword ptr [RSP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + -0x28] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + -0x8],RAX LAB_00137227: MOV RAX,qword ptr [RSP + -0x8] RET
int8 JS_GetAnyOpaque(long param_1,int param_2,uint *param_3) { int8 local_8; if (param_2 == -1) { *param_3 = (uint)*(ushort *)(param_1 + 6); local_8 = *(int8 *)(param_1 + 0x30); } else { *param_3 = 0; local_8 = 0; } return local_8; }
47,992
JS_GetAnyOpaque
bluesky950520[P]quickjs/quickjs.c
void *JS_GetAnyOpaque(JSValue obj, JSClassID *class_id) { JSObject *p; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) { *class_id = 0; return NULL; } p = JS_VALUE_GET_OBJ(obj); *class_id = p->class_id; return p->u.opaque; }
O2
c
JS_GetAnyOpaque: cmpl $-0x1, %esi jne 0x206e3 movzwl 0x6(%rdi), %eax movl %eax, (%rdx) movq 0x30(%rdi), %rax retq andl $0x0, (%rdx) xorl %eax, %eax retq
JS_GetAnyOpaque: cmp esi, 0FFFFFFFFh jnz short loc_206E3 movzx eax, word ptr [rdi+6] mov [rdx], eax mov rax, [rdi+30h] retn loc_206E3: and dword ptr [rdx], 0 xor eax, eax retn
long long JS_GetAnyOpaque(long long a1, int a2, _DWORD *a3) { if ( a2 == -1 ) { *a3 = *(unsigned __int16 *)(a1 + 6); return *(_QWORD *)(a1 + 48); } else { *a3 = 0; return 0LL; } }
JS_GetAnyOpaque: CMP ESI,-0x1 JNZ 0x001206e3 MOVZX EAX,word ptr [RDI + 0x6] MOV dword ptr [RDX],EAX MOV RAX,qword ptr [RDI + 0x30] RET LAB_001206e3: AND dword ptr [RDX],0x0 XOR EAX,EAX RET
int8 JS_GetAnyOpaque(long param_1,int param_2,uint *param_3) { if (param_2 == -1) { *param_3 = (uint)*(ushort *)(param_1 + 6); return *(int8 *)(param_1 + 0x30); } *param_3 = 0; return 0; }
47,993
JS_GetAnyOpaque
bluesky950520[P]quickjs/quickjs.c
void *JS_GetAnyOpaque(JSValue obj, JSClassID *class_id) { JSObject *p; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) { *class_id = 0; return NULL; } p = JS_VALUE_GET_OBJ(obj); *class_id = p->class_id; return p->u.opaque; }
O3
c
JS_GetAnyOpaque: cmpl $-0x1, %esi jne 0x2710b movzwl 0x6(%rdi), %eax movl %eax, (%rdx) movq 0x30(%rdi), %rax retq movl $0x0, (%rdx) xorl %eax, %eax retq
JS_GetAnyOpaque: cmp esi, 0FFFFFFFFh jnz short loc_2710B movzx eax, word ptr [rdi+6] mov [rdx], eax mov rax, [rdi+30h] retn loc_2710B: mov dword ptr [rdx], 0 xor eax, eax retn
long long JS_GetAnyOpaque(long long a1, int a2, _DWORD *a3) { if ( a2 == -1 ) { *a3 = *(unsigned __int16 *)(a1 + 6); return *(_QWORD *)(a1 + 48); } else { *a3 = 0; return 0LL; } }
JS_GetAnyOpaque: CMP ESI,-0x1 JNZ 0x0012710b MOVZX EAX,word ptr [RDI + 0x6] MOV dword ptr [RDX],EAX MOV RAX,qword ptr [RDI + 0x30] RET LAB_0012710b: MOV dword ptr [RDX],0x0 XOR EAX,EAX RET
int8 JS_GetAnyOpaque(long param_1,int param_2,uint *param_3) { if (param_2 == -1) { *param_3 = (uint)*(ushort *)(param_1 + 6); return *(int8 *)(param_1 + 0x30); } *param_3 = 0; return 0; }
47,994
mysql_mbcharlen_utf8mb3
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } return 0; }
O0
c
mysql_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x80, -0x8(%rbp) jae 0x5ddf9 movl $0x1, -0x4(%rbp) jmp 0x5de36 cmpl $0xc2, -0x8(%rbp) jae 0x5de0b movl $0x0, -0x4(%rbp) jmp 0x5de36 cmpl $0xe0, -0x8(%rbp) jae 0x5de1d movl $0x2, -0x4(%rbp) jmp 0x5de36 cmpl $0xf0, -0x8(%rbp) jae 0x5de2f movl $0x3, -0x4(%rbp) jmp 0x5de36 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
mysql_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 80h jnb short loc_5DDF9 mov [rbp+var_4], 1 jmp short loc_5DE36 loc_5DDF9: cmp [rbp+var_8], 0C2h jnb short loc_5DE0B mov [rbp+var_4], 0 jmp short loc_5DE36 loc_5DE0B: cmp [rbp+var_8], 0E0h jnb short loc_5DE1D mov [rbp+var_4], 2 jmp short loc_5DE36 loc_5DE1D: cmp [rbp+var_8], 0F0h jnb short loc_5DE2F mov [rbp+var_4], 3 jmp short loc_5DE36 loc_5DE2F: mov [rbp+var_4], 0 loc_5DE36: mov eax, [rbp+var_4] pop rbp retn
long long mysql_mbcharlen_utf8mb3(unsigned int a1) { if ( a1 >= 0x80 ) { if ( a1 >= 0xC2 ) { if ( a1 >= 0xE0 ) { if ( a1 >= 0xF0 ) return 0; else return 3; } else { return 2; } } else { return 0; } } else { return 1; } }
mysql_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x80 JNC 0x0015ddf9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015de36 LAB_0015ddf9: CMP dword ptr [RBP + -0x8],0xc2 JNC 0x0015de0b MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015de36 LAB_0015de0b: CMP dword ptr [RBP + -0x8],0xe0 JNC 0x0015de1d MOV dword ptr [RBP + -0x4],0x2 JMP 0x0015de36 LAB_0015de1d: CMP dword ptr [RBP + -0x8],0xf0 JNC 0x0015de2f MOV dword ptr [RBP + -0x4],0x3 JMP 0x0015de36 LAB_0015de2f: MOV dword ptr [RBP + -0x4],0x0 LAB_0015de36: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_mbcharlen_utf8mb3(uint param_1) { int4 local_c; if (param_1 < 0x80) { local_c = 1; } else if (param_1 < 0xc2) { local_c = 0; } else if (param_1 < 0xe0) { local_c = 2; } else if (param_1 < 0xf0) { local_c = 3; } else { local_c = 0; } return local_c; }
47,995
ma_remove_not_visible_states_with_lock
eloqsql/storage/maria/ma_state.c
void _ma_remove_not_visible_states_with_lock(MARIA_SHARE *share, my_bool all) { my_bool is_lock_trman; if ((is_lock_trman= trman_is_inited())) trnman_lock(); mysql_mutex_lock(&share->intern_lock); share->state_history= _ma_remove_not_visible_states(share->state_history, all, 1); mysql_mutex_unlock(&share->intern_lock); if (is_lock_trman) trnman_unlock(); }
O0
c
ma_remove_not_visible_states_with_lock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movb $0x0, %al callq 0x78380 movb %al, -0xa(%rbp) cmpb $0x0, %al je 0x47bb7 movb $0x0, %al callq 0x78340 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x1104a7(%rip), %rsi # 0x158070 movl $0xe1, %edx callq 0x479b0 movq -0x8(%rbp), %rax movq 0x450(%rax), %rdi movl $0x1, %edx movsbl -0x9(%rbp), %esi callq 0x47a80 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x450(%rax) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x47a20 cmpb $0x0, -0xa(%rbp) je 0x47c17 movb $0x0, %al callq 0x78360 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ma_remove_not_visible_states_with_lock: push rbp mov rbp, rsp sub rsp, 10h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov al, 0 call trman_is_inited mov [rbp+var_A], al cmp al, 0 jz short loc_47BB7 mov al, 0 call trnman_lock loc_47BB7: mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0E1h call inline_mysql_mutex_lock_6 mov rax, [rbp+var_8] mov rdi, [rax+450h] mov edx, 1 movsx esi, [rbp+var_9] call _ma_remove_not_visible_states mov rcx, rax mov rax, [rbp+var_8] mov [rax+450h], rcx mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_6 cmp [rbp+var_A], 0 jz short loc_47C17 mov al, 0 call trnman_unlock loc_47C17: add rsp, 10h pop rbp retn
long long ma_remove_not_visible_states_with_lock(long long a1, char a2) { long long result; // rax char is_inited; // [rsp+6h] [rbp-Ah] is_inited = trman_is_inited(); if ( is_inited ) trnman_lock(); inline_mysql_mutex_lock_6( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0xE1u); *(_QWORD *)(a1 + 1104) = ma_remove_not_visible_states(*(_QWORD **)(a1 + 1104), a2, 1); result = inline_mysql_mutex_unlock_6(a1 + 2288); if ( is_inited ) return trnman_unlock(); return result; }
_ma_remove_not_visible_states_with_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV AL,0x0 CALL 0x00178380 MOV byte ptr [RBP + -0xa],AL CMP AL,0x0 JZ 0x00147bb7 MOV AL,0x0 CALL 0x00178340 LAB_00147bb7: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x258070] MOV EDX,0xe1 CALL 0x001479b0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x450] MOV EDX,0x1 MOVSX ESI,byte ptr [RBP + -0x9] CALL 0x00147a80 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x450],RCX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00147a20 CMP byte ptr [RBP + -0xa],0x0 JZ 0x00147c17 MOV AL,0x0 CALL 0x00178360 LAB_00147c17: ADD RSP,0x10 POP RBP RET
void _ma_remove_not_visible_states_with_lock(long param_1,char param_2) { char cVar1; int8 uVar2; cVar1 = trman_is_inited(); if (cVar1 != '\0') { trnman_lock(); } inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0xe1); uVar2 = _ma_remove_not_visible_states(*(int8 *)(param_1 + 0x450),(int)param_2,1); *(int8 *)(param_1 + 0x450) = uVar2; inline_mysql_mutex_unlock(param_1 + 0x8f0); if (cVar1 != '\0') { trnman_unlock(); } return; }
47,996
minja::Parser::unexpected(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unexpected(const TemplateToken & token) const { return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O2
cpp
minja::Parser::unexpected(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x8f200 leaq 0x44512(%rip), %rsi # 0xd32e0 leaq 0x28(%rsp), %rdi movq %r12, %rdx callq 0x74fe2 movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x74516 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x6172f leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x27450 leaq 0x48(%rsp), %rdi callq 0x27998 leaq 0x8(%rsp), %rdi callq 0x27998 leaq 0x28(%rsp), %rdi callq 0x27998 leaq 0x68(%rsp), %rdi callq 0x27998 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x27998 jmp 0x8ee59 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x8ee68 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x27998 jmp 0x8ee77 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x27998 movq %rbx, %rdi callq 0x27660
_ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rsi, aUnexpected_0; "Unexpected " lea rdi, [rsp+0A8h+var_80] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rsi, [r15] mov rdx, [r14+20h] lea rdi, [rsp+0A8h+var_A0] call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8EE59 mov rbx, rax loc_8EE59: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8EE68 mov rbx, rax loc_8EE68: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8EE77 mov rbx, rax loc_8EE77: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF _BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8)); std::operator+<char>((long long)v6, (long long)"Unexpected ", (long long)v8); minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); std::operator+<char>((long long)v7, v6, v5); std::runtime_error::runtime_error(this, v7); std::string::~string(v7); std::string::~string(v5); std::string::~string(v6); std::string::~string(v8); return this; }
unexpected: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0018f200 LAB_0018edc7: LEA RSI,[0x1d32e0] LEA RDI,[RSP + 0x28] MOV RDX,R12 CALL 0x00174fe2 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_0018ede2: LEA RDI,[RSP + 0x8] CALL 0x00174516 LAB_0018edec: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0016172f LAB_0018ee00: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00127450 LAB_0018ee0d: LEA RDI,[RSP + 0x48] CALL 0x00127998 LEA RDI,[RSP + 0x8] CALL 0x00127998 LEA RDI,[RSP + 0x28] CALL 0x00127998 LEA RDI,[RSP + 0x68] CALL 0x00127998 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unexpected(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unexpected(TemplateToken *param_1) { long in_RDX; int8 *in_RSI; minja local_a0 [32]; string local_80 [32]; string local_60 [32]; TemplateToken local_40 [32]; TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8)); /* try { // try from 0018edc7 to 0018edda has its CatchHandler @ 0018ee74 */ std::operator+((char *)local_80,(string *)"Unexpected "); /* try { // try from 0018ede2 to 0018edeb has its CatchHandler @ 0018ee65 */ error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); /* try { // try from 0018edec to 0018edff has its CatchHandler @ 0018ee56 */ std::operator+(local_60,local_80); /* try { // try from 0018ee00 to 0018ee0c has its CatchHandler @ 0018ee47 */ std::runtime_error::runtime_error((runtime_error *)param_1,local_60); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string((string *)local_40); return param_1; }
47,997
string_prevc
bluesky950520[P]quickjs/quickjs.c
static int string_prevc(JSString *p, int *pidx) { int idx, c, c1; idx = *pidx; if (idx <= 0) return 0; idx--; if (p->is_wide_char) { c = p->u.str16[idx]; if (is_lo_surrogate(c) && idx > 0) { c1 = p->u.str16[idx - 1]; if (is_hi_surrogate(c1)) { c = from_surrogate(c1, c); idx--; } } } else { c = p->u.str8[idx]; } *pidx = idx; return c; }
O0
c
string_prevc: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x10(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jg 0xd6c0d movl $0x0, 0x24(%rsp) jmp 0xd6cc1 movl 0xc(%rsp), %eax addl $-0x1, %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0xd6c9b movq 0x18(%rsp), %rax movslq 0xc(%rsp), %rcx movzwl 0x18(%rax,%rcx,2), %eax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %edi callq 0x28b40 cmpl $0x0, %eax je 0xd6c99 cmpl $0x0, 0xc(%rsp) jle 0xd6c99 movq 0x18(%rsp), %rax movl 0xc(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movzwl 0x18(%rax,%rcx,2), %eax movl %eax, 0x4(%rsp) movl 0x4(%rsp), %edi callq 0x28b20 cmpl $0x0, %eax je 0xd6c97 movl 0x4(%rsp), %edi movl 0x8(%rsp), %esi callq 0x28b60 movl %eax, 0x8(%rsp) movl 0xc(%rsp), %eax addl $-0x1, %eax movl %eax, 0xc(%rsp) jmp 0xd6c99 jmp 0xd6cae movq 0x18(%rsp), %rax movslq 0xc(%rsp), %rcx movzbl 0x18(%rax,%rcx), %eax movl %eax, 0x8(%rsp) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movl 0x8(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw (%rax,%rax)
string_prevc: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_18] mov eax, [rax] mov [rsp+28h+var_1C], eax cmp [rsp+28h+var_1C], 0 jg short loc_D6C0D mov [rsp+28h+var_4], 0 jmp loc_D6CC1 loc_D6C0D: mov eax, [rsp+28h+var_1C] add eax, 0FFFFFFFFh mov [rsp+28h+var_1C], eax mov rax, [rsp+28h+var_10] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz short loc_D6C9B mov rax, [rsp+28h+var_10] movsxd rcx, [rsp+28h+var_1C] movzx eax, word ptr [rax+rcx*2+18h] mov [rsp+28h+var_20], eax mov edi, [rsp+28h+var_20] call is_lo_surrogate_0 cmp eax, 0 jz short loc_D6C99 cmp [rsp+28h+var_1C], 0 jle short loc_D6C99 mov rax, [rsp+28h+var_10] mov ecx, [rsp+28h+var_1C] sub ecx, 1 movsxd rcx, ecx movzx eax, word ptr [rax+rcx*2+18h] mov [rsp+28h+var_24], eax mov edi, [rsp+28h+var_24] call is_hi_surrogate_0 cmp eax, 0 jz short loc_D6C97 mov edi, [rsp+28h+var_24] mov esi, [rsp+28h+var_20] call from_surrogate_0 mov [rsp+28h+var_20], eax mov eax, [rsp+28h+var_1C] add eax, 0FFFFFFFFh mov [rsp+28h+var_1C], eax loc_D6C97: jmp short $+2 loc_D6C99: jmp short loc_D6CAE loc_D6C9B: mov rax, [rsp+28h+var_10] movsxd rcx, [rsp+28h+var_1C] movzx eax, byte ptr [rax+rcx+18h] mov [rsp+28h+var_20], eax loc_D6CAE: mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_18] mov [rax], ecx mov eax, [rsp+28h+var_20] mov [rsp+28h+var_4], eax loc_D6CC1: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long string_prevc(long long a1, int *a2) { unsigned __int16 v3; // [rsp+4h] [rbp-24h] unsigned int v4; // [rsp+8h] [rbp-20h] int v5; // [rsp+Ch] [rbp-1Ch] if ( *a2 > 0 ) { v5 = *a2 - 1; if ( (*(_QWORD *)(a1 + 4) & 0x80000000LL) != 0 ) { v4 = *(unsigned __int16 *)(a1 + 2LL * v5 + 24); if ( is_lo_surrogate_0(v4) && v5 > 0 ) { v3 = *(_WORD *)(a1 + 2LL * (v5 - 1) + 24); if ( is_hi_surrogate_0(v3) ) { v4 = from_surrogate_0(v3, v4); --v5; } } } else { v4 = *(unsigned __int8 *)(a1 + v5 + 24); } *a2 = v5; return v4; } else { return 0; } }
string_prevc: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JG 0x001d6c0d MOV dword ptr [RSP + 0x24],0x0 JMP 0x001d6cc1 LAB_001d6c0d: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,-0x1 MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001d6c9b MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0xc] MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18] MOV dword ptr [RSP + 0x8],EAX MOV EDI,dword ptr [RSP + 0x8] CALL 0x00128b40 CMP EAX,0x0 JZ 0x001d6c99 CMP dword ptr [RSP + 0xc],0x0 JLE 0x001d6c99 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0xc] SUB ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18] MOV dword ptr [RSP + 0x4],EAX MOV EDI,dword ptr [RSP + 0x4] CALL 0x00128b20 CMP EAX,0x0 JZ 0x001d6c97 MOV EDI,dword ptr [RSP + 0x4] MOV ESI,dword ptr [RSP + 0x8] CALL 0x00128b60 MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0xc] ADD EAX,-0x1 MOV dword ptr [RSP + 0xc],EAX LAB_001d6c97: JMP 0x001d6c99 LAB_001d6c99: JMP 0x001d6cae LAB_001d6c9b: MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x18] MOV dword ptr [RSP + 0x8],EAX LAB_001d6cae: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x24],EAX LAB_001d6cc1: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
uint string_prevc(long param_1,int *param_2) { int2 uVar1; int iVar2; int iVar3; uint local_20; int local_1c; uint local_4; iVar2 = *param_2; if (iVar2 < 1) { local_4 = 0; } else { local_1c = iVar2 + -1; if ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0) { local_20 = (uint)*(byte *)(param_1 + 0x18 + (long)local_1c); } else { local_20 = (uint)*(ushort *)(param_1 + 0x18 + (long)local_1c * 2); iVar3 = is_lo_surrogate(local_20); if ((iVar3 != 0) && (0 < local_1c)) { uVar1 = *(int2 *)(param_1 + 0x18 + (long)(iVar2 + -2) * 2); iVar3 = is_hi_surrogate(uVar1); if (iVar3 != 0) { local_20 = from_surrogate(uVar1,local_20); local_1c = iVar2 + -2; } } } *param_2 = local_1c; local_4 = local_20; } return local_4; }
47,998
change_pagecache_param
eloqsql/storage/maria/ma_pagecache.c
void change_pagecache_param(PAGECACHE *pagecache, uint division_limit, uint age_threshold) { DBUG_ENTER("change_pagecache_param"); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (division_limit) pagecache->min_warm_blocks= (pagecache->disk_blocks * division_limit / 100 + 1); if (age_threshold) pagecache->age_threshold= (pagecache->disk_blocks * age_threshold / 100); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_VOID_RETURN; }
O0
c
change_pagecache_param: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x11df35(%rip), %rsi # 0x157e89 movl $0x46d, %edx # imm = 0x46D callq 0x39fd0 cmpl $0x0, -0xc(%rbp) je 0x39f8c movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movl -0xc(%rbp), %ecx imulq %rcx, %rax movl $0x64, %ecx cqto idivq %rcx movq %rax, %rcx addq $0x1, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) cmpl $0x0, -0x10(%rbp) je 0x39fb6 movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movl -0x10(%rbp), %ecx imulq %rcx, %rax movl $0x64, %ecx cqto idivq %rcx movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x3a040 jmp 0x39fc8 addq $0x10, %rsp popq %rbp retq nop
change_pagecache_param: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 46Dh call inline_mysql_mutex_lock_0 cmp [rbp+var_C], 0 jz short loc_39F8C mov rax, [rbp+var_8] mov rax, [rax+40h] mov ecx, [rbp+var_C] imul rax, rcx mov ecx, 64h ; 'd' cqo idiv rcx mov rcx, rax add rcx, 1 mov rax, [rbp+var_8] mov [rax+8], rcx loc_39F8C: cmp [rbp+var_10], 0 jz short loc_39FB6 mov rax, [rbp+var_8] mov rax, [rax+40h] mov ecx, [rbp+var_10] imul rax, rcx mov ecx, 64h ; 'd' cqo idiv rcx mov rcx, rax mov rax, [rbp+var_8] mov [rax+10h], rcx loc_39FB6: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_0 jmp short $+2 loc_39FC8: add rsp, 10h pop rbp retn
long long change_pagecache_param(_QWORD *a1, unsigned int a2, unsigned int a3) { long long v3; // rdx inline_mysql_mutex_lock_0(a1 + 25, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 1133LL); if ( a2 ) { v3 = a2 * a1[8] % 100LL; a1[1] = a2 * a1[8] / 100LL + 1; } if ( a3 ) { v3 = a3 * a1[8] % 100LL; a1[2] = a3 * a1[8] / 100LL; } return inline_mysql_mutex_unlock_0( a1 + 25, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", v3); }
change_pagecache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x257e89] MOV EDX,0x46d CALL 0x00139fd0 CMP dword ptr [RBP + -0xc],0x0 JZ 0x00139f8c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0xc] IMUL RAX,RCX MOV ECX,0x64 CQO IDIV RCX MOV RCX,RAX ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX LAB_00139f8c: CMP dword ptr [RBP + -0x10],0x0 JZ 0x00139fb6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x10] IMUL RAX,RCX MOV ECX,0x64 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX LAB_00139fb6: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x0013a040 JMP 0x00139fc8 LAB_00139fc8: ADD RSP,0x10 POP RBP RET
void change_pagecache_param(long param_1,uint param_2,uint param_3) { inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x46d); if (param_2 != 0) { *(long *)(param_1 + 8) = (long)(*(long *)(param_1 + 0x40) * (ulong)param_2) / 100 + 1; } if (param_3 != 0) { *(long *)(param_1 + 0x10) = (long)(*(long *)(param_1 + 0x40) * (ulong)param_3) / 100; } inline_mysql_mutex_unlock(param_1 + 200); return; }
47,999
translog_relative_LSN_encode
eloqsql/storage/maria/ma_loghandler.c
static void translog_relative_LSN_encode(struct st_translog_parts *parts, LSN base_lsn, uint lsns, uchar *compressed_LSNs) { LEX_CUSTRING *part; uint lsns_len= lsns * LSN_STORE_SIZE; uchar buffer_src[MAX_NUMBER_OF_LSNS_PER_RECORD * LSN_STORE_SIZE]; uchar *buffer= buffer_src; const uchar *cbuffer; DBUG_ENTER("translog_relative_LSN_encode"); DBUG_ASSERT(parts->current != 0); part= parts->parts + parts->current; /* collect all LSN(s) in one chunk if it (they) is (are) divided */ if (part->length < lsns_len) { size_t copied= part->length; LEX_CUSTRING *next_part; DBUG_PRINT("info", ("Using buffer:%p", compressed_LSNs)); memcpy(buffer, part->str, part->length); next_part= parts->parts + parts->current + 1; do { DBUG_ASSERT(next_part < parts->parts + parts->elements); if ((next_part->length + copied) < lsns_len) { memcpy(buffer + copied, next_part->str, next_part->length); copied+= next_part->length; next_part->length= 0; next_part->str= 0; /* delete_dynamic_element(&parts->parts, parts->current + 1); */ next_part++; parts->current++; part= parts->parts + parts->current; } else { size_t len= lsns_len - copied; memcpy(buffer + copied, next_part->str, len); copied= lsns_len; next_part->str+= len; next_part->length-= len; } } while (copied < lsns_len); cbuffer= buffer; } else { cbuffer= part->str; part->str+= lsns_len; part->length-= lsns_len; parts->current--; part= parts->parts + parts->current; } { /* Compress */ LSN ref; int economy; const uchar *src_ptr; uchar *dst_ptr= compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE); /* We write the result in backward direction with no special sense or tricks both directions are equal in complicity */ for (src_ptr= cbuffer + lsns_len - LSN_STORE_SIZE; src_ptr >= (const uchar*)cbuffer; src_ptr-= LSN_STORE_SIZE) { ref= lsn_korr(src_ptr); dst_ptr= translog_put_LSN_diff(base_lsn, ref, dst_ptr); } part->length= (size_t)((compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE)) - dst_ptr); economy= lsns_len - (uint)part->length; parts->record_length-= economy; DBUG_PRINT("info", ("new length of LSNs: %lu economy: %d", (ulong)part->length, economy)); parts->total_record_length-= economy; part->str= dst_ptr; } DBUG_VOID_RETURN; }
O3
c
translog_relative_LSN_encode: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leal (,%rdx,8), %edi subl %edx, %edi movq 0x10(%rbx), %rax movl 0x8(%rbx), %edx shlq $0x4, %rdx leaq (%rax,%rdx), %r15 movq (%rax,%rdx), %rsi movq 0x8(%rax,%rdx), %r13 movq %r13, %rax subq %rdi, %rax movq %rdi, -0x48(%rbp) jae 0x50641 movq %r14, -0x58(%rbp) movq %rcx, -0x60(%rbp) leaq -0x3e(%rbp), %r12 movl $0xe, %ecx movq %r12, %rdi movq %r13, %rdx callq 0x29420 movq -0x48(%rbp), %rdi movq %r15, %rcx addq $0x18, %r15 movq 0x18(%rcx), %r14 leaq (%r14,%r13), %rax cmpq %rdi, %rax movq %rbx, -0x68(%rbp) jae 0x50664 movq %r13, %rbx leaq -0x3e(,%r13), %rdi addq %rbp, %rdi movq -0x8(%r15), %rsi movq %r14, %rdx callq 0x29080 movq -0x48(%rbp), %rdi movq %r14, %r13 addq %rbx, %r13 movq -0x68(%rbp), %rbx xorps %xmm0, %xmm0 movups %xmm0, -0x8(%r15) movl 0x8(%rbx), %eax incl %eax movl %eax, 0x8(%rbx) cmpq %rdi, %r13 jae 0x506b5 movq 0x10(%r15), %r14 addq $0x10, %r15 leaq (%r14,%r13), %rcx cmpq %rdi, %rcx jb 0x505db movl %eax, %eax shlq $0x4, %rax addq 0x10(%rbx), %rax movq %rax, -0x50(%rbp) leaq -0x8(%r15), %rax jmp 0x5066c leaq (%rsi,%rdi), %rdx movq %rdx, (%r15) movq %rax, 0x8(%r15) movl 0x8(%rbx), %r15d decl %r15d movl %r15d, 0x8(%rbx) shlq $0x4, %r15 addq 0x10(%rbx), %r15 movq %rsi, %r12 jmp 0x506c8 movq %rcx, -0x50(%rbp) leaq 0x10(%rcx), %rax movq %rax, -0x70(%rbp) movq %rdi, %rbx subq %r13, %rbx leaq -0x3e(,%r13), %rdi addq %rbp, %rdi movq (%rax), %r13 movq %r13, %rsi movq %rbx, %rdx callq 0x29080 movq -0x48(%rbp), %rdi addq %rbx, %r13 movq -0x70(%rbp), %rax movq %r13, (%rax) subq %rbx, %r14 movq %r14, (%r15) movq -0x68(%rbp), %rbx movq -0x60(%rbp), %rcx movq -0x58(%rbp), %r14 movq -0x50(%rbp), %r15 jmp 0x506c8 movl %eax, %r15d shlq $0x4, %r15 addq 0x10(%rbx), %r15 movq -0x60(%rbp), %rcx movq -0x58(%rbp), %r14 addq $0x12, %rcx leaq (%r12,%rdi), %r11 addq $-0x7, %r11 movq %rcx, %rax cmpq %r12, %r11 jb 0x507c3 movq %rcx, %rax movzbl (%r11), %esi movzbl 0x1(%r11), %edi movzbl 0x2(%r11), %r8d movq %r8, %rdx shlq $0x30, %rdx movq %rdi, %r9 shlq $0x28, %r9 movq %rsi, %r10 shlq $0x20, %r10 orq %r9, %r10 orq %rdx, %r10 movl 0x3(%r11), %r9d orq %r9, %r10 movq %r14, %rdx subq %r10, %rdx cmpq $0x3fff, %rdx # imm = 0x3FFF ja 0x50733 rolw $0x8, %dx movw %dx, -0x2(%rax) addq $-0x2, %rax jmp 0x507b6 cmpq $0x3fffff, %rdx # imm = 0x3FFFFF ja 0x50753 movl %edx, %esi shrl $0x10, %esi orb $0x40, %sil movb %sil, -0x3(%rax) movw %dx, -0x2(%rax) addq $-0x3, %rax jmp 0x507b6 cmpq $0x3fffffff, %rdx # imm = 0x3FFFFFFF ja 0x5077b movl %edx, %esi shrl $0x18, %esi orb $-0x80, %sil movb %sil, -0x4(%rax) movb %dl, -0x3(%rax) movb %dh, -0x2(%rax) shrl $0x10, %edx movb %dl, -0x1(%rax) addq $-0x4, %rax jmp 0x507b6 movq %rdx, %r10 shrq $0x26, %r10 jne 0x5079c movq %rdx, %rsi shrq $0x20, %rsi orb $-0x40, %sil movb %sil, -0x5(%rax) movl %edx, -0x4(%rax) addq $-0x5, %rax jmp 0x507b6 movw $0x100, -0x9(%rax) # imm = 0x100 movb %sil, -0x7(%rax) movb %dil, -0x6(%rax) movb %r8b, -0x5(%rax) movl %r9d, -0x4(%rax) addq $-0x9, %rax addq $-0x7, %r11 cmpq %r12, %r11 jae 0x506e3 subq %rax, %rcx movq %rcx, 0x8(%r15) subl -0x48(%rbp), %ecx movq (%rbx), %xmm0 movd %ecx, %xmm1 pshufd $0x50, %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1] paddd %xmm0, %xmm1 movq %xmm1, (%rbx) movq %rax, (%r15) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x50803 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
translog_relative_LSN_encode: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea edi, ds:0[rdx*8] sub edi, edx mov rax, [rbx+10h] mov edx, [rbx+8] shl rdx, 4 lea r15, [rax+rdx] mov rsi, [rax+rdx] mov r13, [rax+rdx+8] mov rax, r13 sub rax, rdi mov [rbp+var_48], rdi jnb loc_50641 mov [rbp+var_58], r14 mov [rbp+var_60], rcx lea r12, [rbp+var_3E] mov ecx, 0Eh mov rdi, r12 mov rdx, r13 call ___memcpy_chk mov rdi, [rbp+var_48] mov rcx, r15 add r15, 18h mov r14, [rcx+18h] lea rax, [r14+r13] cmp rax, rdi mov [rbp+var_68], rbx jnb loc_50664 loc_505DB: mov rbx, r13 lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13] add rdi, rbp mov rsi, [r15-8] mov rdx, r14 call _memcpy mov rdi, [rbp+var_48] mov r13, r14 add r13, rbx mov rbx, [rbp+var_68] xorps xmm0, xmm0 movups xmmword ptr [r15-8], xmm0 mov eax, [rbx+8] inc eax mov [rbx+8], eax cmp r13, rdi jnb loc_506B5 mov r14, [r15+10h] add r15, 10h lea rcx, [r14+r13] cmp rcx, rdi jb short loc_505DB mov eax, eax shl rax, 4 add rax, [rbx+10h] mov [rbp+var_50], rax lea rax, [r15-8] jmp short loc_5066C loc_50641: lea rdx, [rsi+rdi] mov [r15], rdx mov [r15+8], rax mov r15d, [rbx+8] dec r15d mov [rbx+8], r15d shl r15, 4 add r15, [rbx+10h] mov r12, rsi jmp short loc_506C8 loc_50664: mov [rbp+var_50], rcx lea rax, [rcx+10h] loc_5066C: mov [rbp+var_70], rax mov rbx, rdi sub rbx, r13 lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13] add rdi, rbp mov r13, [rax] mov rsi, r13 mov rdx, rbx call _memcpy mov rdi, [rbp+var_48] add r13, rbx mov rax, [rbp+var_70] mov [rax], r13 sub r14, rbx mov [r15], r14 mov rbx, [rbp+var_68] mov rcx, [rbp+var_60] mov r14, [rbp+var_58] mov r15, [rbp+var_50] jmp short loc_506C8 loc_506B5: mov r15d, eax shl r15, 4 add r15, [rbx+10h] mov rcx, [rbp+var_60] mov r14, [rbp+var_58] loc_506C8: add rcx, 12h lea r11, [r12+rdi] add r11, 0FFFFFFFFFFFFFFF9h mov rax, rcx cmp r11, r12 jb loc_507C3 mov rax, rcx loc_506E3: movzx esi, byte ptr [r11] movzx edi, byte ptr [r11+1] movzx r8d, byte ptr [r11+2] mov rdx, r8 shl rdx, 30h mov r9, rdi shl r9, 28h mov r10, rsi shl r10, 20h or r10, r9 or r10, rdx mov r9d, [r11+3] or r10, r9 mov rdx, r14 sub rdx, r10 cmp rdx, 3FFFh ja short loc_50733 rol dx, 8 mov [rax-2], dx add rax, 0FFFFFFFFFFFFFFFEh jmp loc_507B6 loc_50733: cmp rdx, offset unk_3FFFFF ja short loc_50753 mov esi, edx shr esi, 10h or sil, 40h mov [rax-3], sil mov [rax-2], dx add rax, 0FFFFFFFFFFFFFFFDh jmp short loc_507B6 loc_50753: cmp rdx, 3FFFFFFFh ja short loc_5077B mov esi, edx shr esi, 18h or sil, 80h mov [rax-4], sil mov [rax-3], dl mov [rax-2], dh shr edx, 10h mov [rax-1], dl add rax, 0FFFFFFFFFFFFFFFCh jmp short loc_507B6 loc_5077B: mov r10, rdx shr r10, 26h jnz short loc_5079C mov rsi, rdx shr rsi, 20h or sil, 0C0h mov [rax-5], sil mov [rax-4], edx add rax, 0FFFFFFFFFFFFFFFBh jmp short loc_507B6 loc_5079C: mov word ptr [rax-9], 100h mov [rax-7], sil mov [rax-6], dil mov [rax-5], r8b mov [rax-4], r9d add rax, 0FFFFFFFFFFFFFFF7h loc_507B6: add r11, 0FFFFFFFFFFFFFFF9h cmp r11, r12 jnb loc_506E3 loc_507C3: sub rcx, rax mov [r15+8], rcx sub ecx, dword ptr [rbp+var_48] movq xmm0, qword ptr [rbx] movd xmm1, ecx pshufd xmm1, xmm1, 50h ; 'P' paddd xmm1, xmm0 movq qword ptr [rbx], xmm1 mov [r15], rax mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_50803 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_50803: call ___stack_chk_fail
unsigned long long translog_relative_LSN_encode(__m128i *a1, long long a2, int a3, long long a4) { unsigned long long v6; // rdi _QWORD *v7; // r15 unsigned __int8 *v8; // rsi unsigned long long v9; // r13 unsigned __int8 *v10; // r12 _QWORD *v11; // rcx _QWORD *v12; // r15 long long v13; // r14 unsigned int v14; // eax _QWORD *v15; // rax long long v16; // r15 _QWORD *v17; // r15 unsigned long long v18; // rbx char *v19; // rdi long long v20; // r13 long long v21; // rcx unsigned __int8 *v22; // r11 long long v23; // rax char v24; // si unsigned __int8 v25; // di unsigned __int8 v26; // r8 long long v27; // r9 unsigned long long v28; // rdx long long v29; // rcx _QWORD *v31; // [rsp+0h] [rbp-70h] __m128i *v32; // [rsp+8h] [rbp-68h] long long v33; // [rsp+10h] [rbp-60h] long long v34; // [rsp+18h] [rbp-58h] long long v35; // [rsp+20h] [rbp-50h] unsigned long long v36; // [rsp+28h] [rbp-48h] _BYTE v37[14]; // [rsp+32h] [rbp-3Eh] BYREF unsigned long long v38; // [rsp+40h] [rbp-30h] long long savedregs; // [rsp+70h] [rbp+0h] BYREF v38 = __readfsqword(0x28u); v6 = (unsigned int)(7 * a3); v7 = (_QWORD *)(a1[1].m128i_i64[0] + 16LL * a1->m128i_u32[2]); v8 = (unsigned __int8 *)*v7; v9 = v7[1]; v36 = v6; if ( v9 >= v6 ) { *v7 = &v8[v6]; v7[1] = v9 - v6; v16 = (unsigned int)(a1->m128i_i32[2] - 1); a1->m128i_i32[2] = v16; v17 = (_QWORD *)(a1[1].m128i_i64[0] + 16 * v16); v10 = v8; } else { v34 = a2; v33 = a4; v10 = v37; __memcpy_chk(v37, v8, v9, 14LL); v6 = v36; v11 = v7; v12 = v7 + 3; v13 = v11[3]; v32 = a1; if ( v13 + v9 >= v36 ) { v35 = (long long)v11; v15 = v11 + 2; LABEL_8: v31 = v15; v18 = v6 - v9; v19 = (char *)&savedregs + v9 - 62; v20 = *v15; memcpy(v19, *v15, v18); v6 = v36; *v31 = v18 + v20; *v12 = v13 - v18; a1 = v32; a4 = v33; a2 = v34; v17 = (_QWORD *)v35; } else { while ( 1 ) { memcpy((char *)&savedregs + v9 - 62, *(v12 - 1), v13); v6 = v36; v9 += v13; a1 = v32; *(_OWORD *)(v12 - 1) = 0LL; v14 = v32->m128i_i32[2] + 1; v32->m128i_i32[2] = v14; if ( v9 >= v6 ) break; v13 = v12[2]; v12 += 2; if ( v13 + v9 >= v6 ) { v35 = v32[1].m128i_i64[0] + 16LL * v14; v15 = v12 - 1; goto LABEL_8; } } v17 = (_QWORD *)(v32[1].m128i_i64[0] + 16LL * v14); a4 = v33; a2 = v34; } } v21 = a4 + 18; v22 = &v10[v6 - 7]; v23 = v21; if ( v22 >= v10 ) { v23 = v21; do { v24 = *v22; v25 = v22[1]; v26 = v22[2]; v27 = *(unsigned int *)(v22 + 3); v28 = a2 - (v27 | ((unsigned long long)v26 << 48) | ((unsigned long long)v25 << 40) | ((unsigned long long)*v22 << 32)); if ( v28 > 0x3FFF ) { if ( v28 > (unsigned long long)&unk_3FFFFF ) { if ( v28 > 0x3FFFFFFF ) { if ( v28 >> 38 ) { *(_WORD *)(v23 - 9) = 256; *(_BYTE *)(v23 - 7) = v24; *(_BYTE *)(v23 - 6) = v25; *(_BYTE *)(v23 - 5) = v26; *(_DWORD *)(v23 - 4) = v27; v23 -= 9LL; } else { *(_BYTE *)(v23 - 5) = BYTE4(v28) | 0xC0; *(_DWORD *)(v23 - 4) = v28; v23 -= 5LL; } } else { *(_BYTE *)(v23 - 4) = ((unsigned int)(a2 - v27) >> 24) | 0x80; *(_WORD *)(v23 - 3) = v28; *(_BYTE *)(v23 - 1) = BYTE2(v28); v23 -= 4LL; } } else { *(_BYTE *)(v23 - 3) = ((unsigned int)(a2 - v27) >> 16) | 0x40; *(_WORD *)(v23 - 2) = v28; v23 -= 3LL; } } else { *(_WORD *)(v23 - 2) = __ROL2__(a2 - v27, 8); v23 -= 2LL; } v22 -= 7; } while ( v22 >= v10 ); } v29 = v21 - v23; v17[1] = v29; a1->m128i_i64[0] = _mm_add_epi32(_mm_shuffle_epi32(_mm_cvtsi32_si128((int)v29 - (int)v36), 80), _mm_loadl_epi64(a1)).m128i_u64[0]; *v17 = v23; return __readfsqword(0x28u); }
translog_relative_LSN_encode: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA EDI,[RDX*0x8] SUB EDI,EDX MOV RAX,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x8] SHL RDX,0x4 LEA R15,[RAX + RDX*0x1] MOV RSI,qword ptr [RAX + RDX*0x1] MOV R13,qword ptr [RAX + RDX*0x1 + 0x8] MOV RAX,R13 SUB RAX,RDI MOV qword ptr [RBP + -0x48],RDI JNC 0x00150641 MOV qword ptr [RBP + -0x58],R14 MOV qword ptr [RBP + -0x60],RCX LEA R12,[RBP + -0x3e] MOV ECX,0xe MOV RDI,R12 MOV RDX,R13 CALL 0x00129420 MOV RDI,qword ptr [RBP + -0x48] MOV RCX,R15 ADD R15,0x18 MOV R14,qword ptr [RCX + 0x18] LEA RAX,[R14 + R13*0x1] CMP RAX,RDI MOV qword ptr [RBP + -0x68],RBX JNC 0x00150664 LAB_001505db: MOV RBX,R13 LEA RDI,[-0x3e + R13*0x1] ADD RDI,RBP MOV RSI,qword ptr [R15 + -0x8] MOV RDX,R14 CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x48] MOV R13,R14 ADD R13,RBX MOV RBX,qword ptr [RBP + -0x68] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + -0x8],XMM0 MOV EAX,dword ptr [RBX + 0x8] INC EAX MOV dword ptr [RBX + 0x8],EAX CMP R13,RDI JNC 0x001506b5 MOV R14,qword ptr [R15 + 0x10] ADD R15,0x10 LEA RCX,[R14 + R13*0x1] CMP RCX,RDI JC 0x001505db MOV EAX,EAX SHL RAX,0x4 ADD RAX,qword ptr [RBX + 0x10] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[R15 + -0x8] JMP 0x0015066c LAB_00150641: LEA RDX,[RSI + RDI*0x1] MOV qword ptr [R15],RDX MOV qword ptr [R15 + 0x8],RAX MOV R15D,dword ptr [RBX + 0x8] DEC R15D MOV dword ptr [RBX + 0x8],R15D SHL R15,0x4 ADD R15,qword ptr [RBX + 0x10] MOV R12,RSI JMP 0x001506c8 LAB_00150664: MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RCX + 0x10] LAB_0015066c: MOV qword ptr [RBP + -0x70],RAX MOV RBX,RDI SUB RBX,R13 LEA RDI,[-0x3e + R13*0x1] ADD RDI,RBP MOV R13,qword ptr [RAX] MOV RSI,R13 MOV RDX,RBX CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x48] ADD R13,RBX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],R13 SUB R14,RBX MOV qword ptr [R15],R14 MOV RBX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] MOV R14,qword ptr [RBP + -0x58] MOV R15,qword ptr [RBP + -0x50] JMP 0x001506c8 LAB_001506b5: MOV R15D,EAX SHL R15,0x4 ADD R15,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBP + -0x60] MOV R14,qword ptr [RBP + -0x58] LAB_001506c8: ADD RCX,0x12 LEA R11,[R12 + RDI*0x1] ADD R11,-0x7 MOV RAX,RCX CMP R11,R12 JC 0x001507c3 MOV RAX,RCX LAB_001506e3: MOVZX ESI,byte ptr [R11] MOVZX EDI,byte ptr [R11 + 0x1] MOVZX R8D,byte ptr [R11 + 0x2] MOV RDX,R8 SHL RDX,0x30 MOV R9,RDI SHL R9,0x28 MOV R10,RSI SHL R10,0x20 OR R10,R9 OR R10,RDX MOV R9D,dword ptr [R11 + 0x3] OR R10,R9 MOV RDX,R14 SUB RDX,R10 CMP RDX,0x3fff JA 0x00150733 ROL DX,0x8 MOV word ptr [RAX + -0x2],DX ADD RAX,-0x2 JMP 0x001507b6 LAB_00150733: CMP RDX,0x3fffff JA 0x00150753 MOV ESI,EDX SHR ESI,0x10 OR SIL,0x40 MOV byte ptr [RAX + -0x3],SIL MOV word ptr [RAX + -0x2],DX ADD RAX,-0x3 JMP 0x001507b6 LAB_00150753: CMP RDX,0x3fffffff JA 0x0015077b MOV ESI,EDX SHR ESI,0x18 OR SIL,0x80 MOV byte ptr [RAX + -0x4],SIL MOV byte ptr [RAX + -0x3],DL MOV byte ptr [RAX + -0x2],DH SHR EDX,0x10 MOV byte ptr [RAX + -0x1],DL ADD RAX,-0x4 JMP 0x001507b6 LAB_0015077b: MOV R10,RDX SHR R10,0x26 JNZ 0x0015079c MOV RSI,RDX SHR RSI,0x20 OR SIL,0xc0 MOV byte ptr [RAX + -0x5],SIL MOV dword ptr [RAX + -0x4],EDX ADD RAX,-0x5 JMP 0x001507b6 LAB_0015079c: MOV word ptr [RAX + -0x9],0x100 MOV byte ptr [RAX + -0x7],SIL MOV byte ptr [RAX + -0x6],DIL MOV byte ptr [RAX + -0x5],R8B MOV dword ptr [RAX + -0x4],R9D ADD RAX,-0x9 LAB_001507b6: ADD R11,-0x7 CMP R11,R12 JNC 0x001506e3 LAB_001507c3: SUB RCX,RAX MOV qword ptr [R15 + 0x8],RCX SUB ECX,dword ptr [RBP + -0x48] MOVQ XMM0,qword ptr [RBX] MOVD XMM1,ECX PSHUFD XMM1,XMM1,0x50 PADDD XMM1,XMM0 MOVQ qword ptr [RBX],XMM1 MOV qword ptr [R15],RAX MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00150803 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00150803: CALL 0x00129270
void translog_relative_LSN_encode(int8 *param_1,long param_2,int param_3,long param_4) { byte bVar1; byte bVar2; byte bVar3; void *__src; byte bVar4; uint uVar5; long *plVar6; long lVar7; int iVar8; ushort uVar9; long lVar10; size_t __n; ulong uVar11; byte *pbVar12; byte *pbVar13; ulong uVar14; size_t __n_00; long *plVar15; long in_FS_OFFSET; long *local_58; byte local_46 [14]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar11 = (ulong)(uint)(param_3 * 7); lVar7 = param_1[2]; lVar10 = (ulong)*(uint *)(param_1 + 1) * 0x10; local_58 = (long *)(lVar7 + lVar10); pbVar13 = *(byte **)(lVar7 + lVar10); uVar14 = *(ulong *)(lVar7 + 8 + lVar10); if (uVar14 < uVar11) { __memcpy_chk(local_46,pbVar13,uVar14,0xe); plVar15 = local_58 + 3; __n_00 = local_58[3]; pbVar13 = local_46; if (__n_00 + uVar14 < uVar11) { do { plVar6 = plVar15; memcpy(local_46 + uVar14,(void *)plVar6[-1],__n_00); uVar14 = __n_00 + uVar14; plVar6[-1] = 0; *plVar6 = 0; uVar5 = *(int *)(param_1 + 1) + 1; *(uint *)(param_1 + 1) = uVar5; if (uVar11 <= uVar14) { local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]); goto LAB_001506c8; } __n_00 = plVar6[2]; plVar15 = plVar6 + 2; } while (__n_00 + uVar14 < uVar11); local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]); plVar6 = plVar6 + 1; } else { plVar6 = local_58 + 2; } __n = uVar11 - uVar14; __src = (void *)*plVar6; memcpy(local_46 + uVar14,__src,__n); *plVar6 = (long)__src + __n; *plVar15 = __n_00 - __n; } else { *local_58 = (long)(pbVar13 + uVar11); local_58[1] = uVar14 - uVar11; iVar8 = *(int *)(param_1 + 1); *(uint *)(param_1 + 1) = iVar8 - 1U; local_58 = (long *)((ulong)(iVar8 - 1U) * 0x10 + param_1[2]); } LAB_001506c8: lVar7 = param_4 + 0x12; for (pbVar12 = pbVar13 + (uVar11 - 7); pbVar13 <= pbVar12; pbVar12 = pbVar12 + -7) { bVar1 = *pbVar12; bVar2 = pbVar12[1]; bVar3 = pbVar12[2]; uVar5 = *(uint *)(pbVar12 + 3); uVar14 = param_2 - ((ulong)bVar1 << 0x20 | (ulong)bVar2 << 0x28 | (ulong)bVar3 << 0x30 | (ulong)uVar5); uVar9 = (ushort)uVar14; if (uVar14 < 0x4000) { *(ushort *)(lVar7 + -2) = uVar9 << 8 | uVar9 >> 8; lVar7 = lVar7 + -2; } else { bVar4 = (byte)(uVar14 >> 0x10); if (uVar14 < 0x400000) { *(byte *)(lVar7 + -3) = bVar4 | 0x40; *(ushort *)(lVar7 + -2) = uVar9; lVar7 = lVar7 + -3; } else if (uVar14 < 0x40000000) { *(byte *)(lVar7 + -4) = (byte)(uVar14 >> 0x18) | 0x80; *(char *)(lVar7 + -3) = (char)uVar14; *(char *)(lVar7 + -2) = (char)(uVar14 >> 8); *(byte *)(lVar7 + -1) = bVar4; lVar7 = lVar7 + -4; } else if (uVar14 >> 0x26 == 0) { *(byte *)(lVar7 + -5) = (byte)(uVar14 >> 0x20) | 0xc0; *(int *)(lVar7 + -4) = (int)uVar14; lVar7 = lVar7 + -5; } else { *(int2 *)(lVar7 + -9) = 0x100; *(byte *)(lVar7 + -7) = bVar1; *(byte *)(lVar7 + -6) = bVar2; *(byte *)(lVar7 + -5) = bVar3; *(uint *)(lVar7 + -4) = uVar5; lVar7 = lVar7 + -9; } } } lVar10 = (param_4 + 0x12) - lVar7; local_58[1] = lVar10; iVar8 = (int)lVar10 + param_3 * -7; *param_1 = CONCAT44(iVar8 + (int)((ulong)*param_1 >> 0x20),iVar8 + (int)*param_1); *local_58 = lVar7; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }