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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
28,300 | int rr_unpack_from_buffer<true, true>(READ_RECORD*) | eloqsql/sql/records.cc | static int rr_unpack_from_buffer(READ_RECORD *info)
{
if (info->unpack_counter == info->sort_info->return_rows)
return -1; /* End of buffer */
uchar *record= info->sort_info->get_sorted_record(
static_cast<uint>(info->unpack_counter));
uint sort_length= Packed_sort_keys ?
Sort_keys::read_sortkey_length(record):
info->sort_info->get_sort_length();
uchar *plen= record + sort_length;
info->sort_info->unpack_addon_fields<Packed_addon_fields>(plen);
info->unpack_counter++;
return 0;
} | O0 | cpp | int rr_unpack_from_buffer<true, true>(READ_RECORD*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x78(%rcx), %rcx
cmpq 0x178(%rcx), %rax
jne 0xa6555e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa655bf
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl %eax, %esi
callq 0x8dad00
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0xa65e70
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xa65d50
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZL21rr_unpack_from_bufferILb0ELb0EEiP11READ_RECORD:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+78h]
cmp rax, [rcx+178h]
jnz short loc_A6555E
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_A655BF
loc_A6555E:
mov rax, [rbp+var_10]
mov rdi, [rax+78h]; this
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov esi, eax; unsigned int
call _ZN9SORT_INFO17get_sorted_recordEj; SORT_INFO::get_sorted_record(uint)
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rdi, [rax+78h]; this
call _ZNK9SORT_INFO15get_sort_lengthEv; SORT_INFO::get_sort_length(void)
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+78h]
mov rsi, [rbp+var_28]
call _ZN9SORT_INFO19unpack_addon_fieldsILb0EEEvPh; SORT_INFO::unpack_addon_fields<false>(uchar *)
mov rax, [rbp+var_10]
mov rcx, [rax+40h]
add rcx, 1
mov [rax+40h], rcx
mov [rbp+var_4], 0
loc_A655BF:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long rr_unpack_from_buffer<false,false>(long long a1)
{
unsigned int sort_length; // [rsp+14h] [rbp-1Ch]
long long sorted_record; // [rsp+18h] [rbp-18h]
if ( *(_QWORD *)(a1 + 64) == *(_QWORD *)(*(_QWORD *)(a1 + 120) + 376LL) )
{
return (unsigned int)-1;
}
else
{
sorted_record = SORT_INFO::get_sorted_record(*(SORT_INFO **)(a1 + 120), *(_QWORD *)(a1 + 64));
sort_length = SORT_INFO::get_sort_length(*(SORT_INFO **)(a1 + 120));
SORT_INFO::unpack_addon_fields<false>(*(_QWORD *)(a1 + 120), sort_length + sorted_record);
++*(_QWORD *)(a1 + 64);
return 0;
}
}
| val_str:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00a6553e
LAB_00a6553e:
XOR EAX,EAX
POP RBP
RET
|
/* Item_user_var_as_out_param::val_str(String*) */
int8 Item_user_var_as_out_param::val_str(String *param_1)
{
return 0;
}
| |
28,301 | ggml_backend_compare_graph_backend | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | bool ggml_backend_compare_graph_backend(ggml_backend_t backend1, ggml_backend_t backend2, struct ggml_cgraph * graph, ggml_backend_eval_callback callback, void * user_data) {
struct ggml_backend_graph_copy copy = ggml_backend_graph_copy(backend2, graph);
if (copy.buffer == NULL) {
return false;
}
struct ggml_cgraph * g1 = graph;
struct ggml_cgraph * g2 = copy.graph;
assert(g1->n_nodes == g2->n_nodes);
for (int i = 0; i < g1->n_nodes; i++) {
//printf("eval %d/%d\n", i, g1->n_nodes);
struct ggml_tensor * t1 = g1->nodes[i];
struct ggml_tensor * t2 = g2->nodes[i];
assert(t1->op == t2->op && ggml_are_same_layout(t1, t2));
struct ggml_cgraph g1v = ggml_graph_view(g1, i, i + 1);
struct ggml_cgraph g2v = ggml_graph_view(g2, i, i + 1);
ggml_backend_graph_compute(backend1, &g1v);
ggml_backend_graph_compute(backend2, &g2v);
if (ggml_is_view_op(t1->op)) {
continue;
}
// compare results, calculate rms etc
if (!callback(i, t1, t2, user_data)) {
break;
}
}
ggml_backend_graph_copy_free(copy);
return true;
} | O1 | cpp | ggml_backend_compare_graph_backend:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x18980
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x2a5b5
movq %r15, 0x50(%rsp)
movq 0x70(%rsp), %rdx
movl 0x4(%r14), %eax
movq %rdx, 0x20(%rsp)
cmpl 0x4(%rdx), %eax
jne 0x2a5ec
movq %r14, %rsi
movq %rcx, 0x28(%rsp)
cmpl $0x0, 0x4(%r14)
jle 0x2a598
xorl %ebx, %ebx
movq %rsi, 0x48(%rsp)
movq %r12, 0x40(%rsp)
movq 0x10(%rsi), %rax
movq (%rax,%rbx,8), %r14
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%rbx,8), %rbp
movl 0x50(%r14), %eax
cmpl 0x50(%rbp), %eax
jne 0x2a5cd
movl (%r14), %eax
cmpl (%rbp), %eax
jne 0x2a5cd
movq 0x10(%r14), %rax
cmpq 0x10(%rbp), %rax
jne 0x2a5cd
movq 0x30(%r14), %rax
cmpq 0x30(%rbp), %rax
jne 0x2a5cd
movl $0x7, %ecx
movq %rcx, %rax
cmpq $0xa, %rcx
je 0x2a4db
movq -0x20(%r14,%rax,8), %rcx
cmpq -0x20(%rbp,%rax,8), %rcx
jne 0x2a4db
movq (%r14,%rax,8), %rdx
leaq 0x1(%rax), %rcx
cmpq (%rbp,%rax,8), %rdx
je 0x2a4b7
addq $-0x7, %rax
cmpq $0x2, %rax
jbe 0x2a5cd
leaq 0x1(%rbx), %r15
leaq 0xc8(%rsp), %r13
movq %r13, %rdi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x187c0
leaq 0x78(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x187c0
movq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq *0x58(%r12)
movq 0x30(%r12), %rax
testq %rax, %rax
je 0x2a535
movq %r12, %rdi
callq *%rax
movq 0x40(%rsp), %r12
movq %r12, %rdi
leaq 0x78(%rsp), %rsi
callq *0x58(%r12)
movq 0x30(%r12), %rax
testq %rax, %rax
je 0x2a556
movq %r12, %rdi
callq *%rax
movl 0x50(%r14), %ecx
addl $-0x21, %ecx
movl $0x4, %eax
cmpl $0x4, %ecx
jb 0x2a57f
movl %ebx, %edi
movq %r14, %rsi
movq %rbp, %rdx
movq 0x38(%rsp), %rcx
callq *0x30(%rsp)
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %eax
testb $0x3, %al
movq 0x48(%rsp), %rsi
jne 0x2a598
movslq 0x4(%rsi), %rax
movq %r15, %rbx
cmpq %rax, %r15
jl 0x2a468
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x18680
movq 0x28(%rsp), %rcx
testq %rcx, %rcx
setne %al
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x259af(%rip), %rdi # 0x4ff83
leaq 0x25199(%rip), %rsi # 0x4f774
leaq 0x2591f(%rip), %rcx # 0x4ff01
movl $0x726, %edx # imm = 0x726
callq 0x17b00
leaq 0x258f3(%rip), %rdi # 0x4fee6
leaq 0x2517a(%rip), %rsi # 0x4f774
leaq 0x25900(%rip), %rcx # 0x4ff01
movl $0x71f, %edx # imm = 0x71F
callq 0x17b00
| ggml_backend_compare_graph_backend:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov [rsp+148h+var_110], r8
mov [rsp+148h+var_118], rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
lea rbx, [rsp+148h+var_F0]
mov rdi, rbx
call _ggml_backend_graph_copy
mov rcx, [rbx]
test rcx, rcx
jz loc_2A5B5
mov [rsp+148h+var_F8], r15
mov rdx, [rsp+148h+var_D8]
mov eax, [r14+4]
mov [rsp+148h+var_128], rdx
cmp eax, [rdx+4]
jnz loc_2A5EC
mov rsi, r14
mov [rsp+148h+var_120], rcx
cmp dword ptr [r14+4], 0
jle loc_2A598
xor ebx, ebx
mov [rsp+148h+var_100], rsi
mov [rsp+148h+var_108], r12
loc_2A468:
mov rax, [rsi+10h]
mov r14, [rax+rbx*8]
mov rax, [rsp+148h+var_128]
mov rax, [rax+10h]
mov rbp, [rax+rbx*8]
mov eax, [r14+50h]
cmp eax, [rbp+50h]
jnz loc_2A5CD
mov eax, [r14]
cmp eax, [rbp+0]
jnz loc_2A5CD
mov rax, [r14+10h]
cmp rax, [rbp+10h]
jnz loc_2A5CD
mov rax, [r14+30h]
cmp rax, [rbp+30h]
jnz loc_2A5CD
mov ecx, 7
loc_2A4B7:
mov rax, rcx
cmp rcx, 0Ah
jz short loc_2A4DB
mov rcx, [r14+rax*8-20h]
cmp rcx, [rbp+rax*8-20h]
jnz short loc_2A4DB
mov rdx, [r14+rax*8]
lea rcx, [rax+1]
cmp rdx, [rbp+rax*8+0]
jz short loc_2A4B7
loc_2A4DB:
add rax, 0FFFFFFFFFFFFFFF9h
cmp rax, 2
jbe loc_2A5CD
lea r15, [rbx+1]
lea r13, [rsp+148h+var_80]
mov rdi, r13
mov edx, ebx
mov ecx, r15d
call _ggml_graph_view
lea rdi, [rsp+148h+var_D0]
mov rsi, [rsp+148h+var_128]
mov edx, ebx
mov ecx, r15d
call _ggml_graph_view
mov r12, [rsp+148h+var_F8]
mov rdi, r12
mov rsi, r13
call qword ptr [r12+58h]
mov rax, [r12+30h]
test rax, rax
jz short loc_2A535
mov rdi, r12
call rax
loc_2A535:
mov r12, [rsp+148h+var_108]
mov rdi, r12
lea rsi, [rsp+148h+var_D0]
call qword ptr [r12+58h]
mov rax, [r12+30h]
test rax, rax
jz short loc_2A556
mov rdi, r12
call rax
loc_2A556:
mov ecx, [r14+50h]
add ecx, 0FFFFFFDFh
mov eax, 4
cmp ecx, 4
jb short loc_2A57F
mov edi, ebx
mov rsi, r14
mov rdx, rbp
mov rcx, [rsp+148h+var_110]
call [rsp+148h+var_118]
xor al, 1
movzx eax, al
add eax, eax
loc_2A57F:
test al, 3
mov rsi, [rsp+148h+var_100]
jnz short loc_2A598
movsxd rax, dword ptr [rsi+4]
mov rbx, r15
cmp r15, rax
jl loc_2A468
loc_2A598:
movups xmm0, [rsp+148h+var_F0]
movups xmm1, xmmword ptr [rsp+68h]
movups [rsp+148h+var_138], xmm1
movups [rsp+148h+var_148], xmm0
call _ggml_backend_graph_copy_free
mov rcx, [rsp+148h+var_120]
loc_2A5B5:
test rcx, rcx
setnz al
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2A5CD:
lea rdi, aT1OpT2OpGgmlAr; "t1->op == t2->op && ggml_are_same_layou"...
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 726h
call ___assert_fail
loc_2A5EC:
lea rdi, aG1NNodesG2NNod; "g1->n_nodes == g2->n_nodes"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 71Fh
call ___assert_fail
| bool ggml_backend_compare_graph_backend(
long long a1,
long long a2,
int *a3,
long long ( *a4)(_QWORD, long long, long long, long long),
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v17; // rdi
long long v18; // r8
long long v19; // r9
long long v20; // rcx
long long v21; // rdx
long long v22; // rsi
long long v23; // rbx
long long v24; // r14
long long v25; // rbp
long long v26; // rcx
long long v27; // rax
long long v28; // r15
void ( *v29)(long long); // rax
void ( *v30)(long long); // rax
char v31; // al
long long v33; // [rsp+20h] [rbp-128h]
void ( **v34)(_QWORD); // [rsp+28h] [rbp-120h]
int *v37; // [rsp+48h] [rbp-100h]
long long v38; // [rsp+50h] [rbp-F8h]
void ( **v39[3])(_QWORD); // [rsp+58h] [rbp-F0h] BYREF
long long v40; // [rsp+70h] [rbp-D8h]
_BYTE v41[80]; // [rsp+78h] [rbp-D0h] BYREF
_BYTE v42[128]; // [rsp+C8h] [rbp-80h] BYREF
v17 = (long long)v39;
ggml_backend_graph_copy((long long)v39, a2, a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = (long long)v39[0];
if ( v39[0] )
{
v38 = a1;
v21 = v40;
v33 = v40;
if ( a3[1] != *(_DWORD *)(v40 + 4) )
__assert_fail(
"g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1823LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_"
"callback, void *)");
v22 = (long long)a3;
v34 = v39[0];
if ( a3[1] > 0 )
{
v23 = 0LL;
v37 = a3;
do
{
v24 = *(_QWORD *)(*(_QWORD *)(v22 + 16) + 8 * v23);
v25 = *(_QWORD *)(*(_QWORD *)(v33 + 16) + 8 * v23);
if ( *(_DWORD *)(v24 + 80) != *(_DWORD *)(v25 + 80)
|| *(_DWORD *)v24 != *(_DWORD *)v25
|| *(_QWORD *)(v24 + 16) != *(_QWORD *)(v25 + 16)
|| *(_QWORD *)(v24 + 48) != *(_QWORD *)(v25 + 48) )
{
goto LABEL_24;
}
v26 = 7LL;
do
{
v27 = v26;
if ( v26 == 10 )
break;
if ( *(_QWORD *)(v24 + 8 * v26 - 32) != *(_QWORD *)(v25 + 8 * v26 - 32) )
break;
++v26;
}
while ( *(_QWORD *)(v24 + 8 * v27) == *(_QWORD *)(v25 + 8 * v27) );
if ( (unsigned long long)(v27 - 7) <= 2 )
LABEL_24:
__assert_fail(
"t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1830LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_e"
"val_callback, void *)");
v28 = v23 + 1;
ggml_graph_view((long long)v42, v22, v23, v23 + 1);
ggml_graph_view((long long)v41, v33, v23, v23 + 1);
(*(void ( **)(long long, _BYTE *))(v38 + 88))(v38, v42);
v29 = *(void ( **)(long long))(v38 + 48);
if ( v29 )
v29(v38);
v17 = a2;
(*(void ( **)(long long, _BYTE *))(a2 + 88))(a2, v41);
v30 = *(void ( **)(long long))(a2 + 48);
if ( v30 )
{
v17 = a2;
v30(a2);
}
v20 = (unsigned int)(*(_DWORD *)(v24 + 80) - 33);
v31 = 4;
if ( (unsigned int)v20 >= 4 )
{
v17 = (unsigned int)v23;
v31 = 2 * (a4((unsigned int)v23, v24, v25, a5) ^ 1);
}
v22 = (long long)v37;
if ( (v31 & 3) != 0 )
break;
++v23;
}
while ( v28 < v37[1] );
}
ggml_backend_graph_copy_free(v17, v22, v21, v20, v18, v19, v39[0], (long long)v39[1], (long long)v39[2]);
v20 = (long long)v34;
}
return v20 != 0;
}
| ggml_backend_compare_graph_backend:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV qword ptr [RSP + 0x38],R8
MOV qword ptr [RSP + 0x30],RCX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
CALL 0x00118980
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x0012a5b5
MOV qword ptr [RSP + 0x50],R15
MOV RDX,qword ptr [RSP + 0x70]
MOV EAX,dword ptr [R14 + 0x4]
MOV qword ptr [RSP + 0x20],RDX
CMP EAX,dword ptr [RDX + 0x4]
JNZ 0x0012a5ec
MOV RSI,R14
MOV qword ptr [RSP + 0x28],RCX
CMP dword ptr [R14 + 0x4],0x0
JLE 0x0012a598
XOR EBX,EBX
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],R12
LAB_0012a468:
MOV RAX,qword ptr [RSI + 0x10]
MOV R14,qword ptr [RAX + RBX*0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RBP,qword ptr [RAX + RBX*0x8]
MOV EAX,dword ptr [R14 + 0x50]
CMP EAX,dword ptr [RBP + 0x50]
JNZ 0x0012a5cd
MOV EAX,dword ptr [R14]
CMP EAX,dword ptr [RBP]
JNZ 0x0012a5cd
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RBP + 0x10]
JNZ 0x0012a5cd
MOV RAX,qword ptr [R14 + 0x30]
CMP RAX,qword ptr [RBP + 0x30]
JNZ 0x0012a5cd
MOV ECX,0x7
LAB_0012a4b7:
MOV RAX,RCX
CMP RCX,0xa
JZ 0x0012a4db
MOV RCX,qword ptr [R14 + RAX*0x8 + -0x20]
CMP RCX,qword ptr [RBP + RAX*0x8 + -0x20]
JNZ 0x0012a4db
MOV RDX,qword ptr [R14 + RAX*0x8]
LEA RCX,[RAX + 0x1]
CMP RDX,qword ptr [RBP + RAX*0x8]
JZ 0x0012a4b7
LAB_0012a4db:
ADD RAX,-0x7
CMP RAX,0x2
JBE 0x0012a5cd
LEA R15,[RBX + 0x1]
LEA R13,[RSP + 0xc8]
MOV RDI,R13
MOV EDX,EBX
MOV ECX,R15D
CALL 0x001187c0
LEA RDI,[RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,EBX
MOV ECX,R15D
CALL 0x001187c0
MOV R12,qword ptr [RSP + 0x50]
MOV RDI,R12
MOV RSI,R13
CALL qword ptr [R12 + 0x58]
MOV RAX,qword ptr [R12 + 0x30]
TEST RAX,RAX
JZ 0x0012a535
MOV RDI,R12
CALL RAX
LAB_0012a535:
MOV R12,qword ptr [RSP + 0x40]
MOV RDI,R12
LEA RSI,[RSP + 0x78]
CALL qword ptr [R12 + 0x58]
MOV RAX,qword ptr [R12 + 0x30]
TEST RAX,RAX
JZ 0x0012a556
MOV RDI,R12
CALL RAX
LAB_0012a556:
MOV ECX,dword ptr [R14 + 0x50]
ADD ECX,-0x21
MOV EAX,0x4
CMP ECX,0x4
JC 0x0012a57f
MOV EDI,EBX
MOV RSI,R14
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x38]
CALL qword ptr [RSP + 0x30]
XOR AL,0x1
MOVZX EAX,AL
ADD EAX,EAX
LAB_0012a57f:
TEST AL,0x3
MOV RSI,qword ptr [RSP + 0x48]
JNZ 0x0012a598
MOVSXD RAX,dword ptr [RSI + 0x4]
MOV RBX,R15
CMP R15,RAX
JL 0x0012a468
LAB_0012a598:
MOVUPS XMM0,xmmword ptr [RSP + 0x58]
MOVUPS XMM1,xmmword ptr [RSP + 0x68]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00118680
MOV RCX,qword ptr [RSP + 0x28]
LAB_0012a5b5:
TEST RCX,RCX
SETNZ AL
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012a5cd:
LEA RDI,[0x14ff83]
LEA RSI,[0x14f774]
LEA RCX,[0x14ff01]
MOV EDX,0x726
CALL 0x00117b00
LAB_0012a5ec:
LEA RDI,[0x14fee6]
LEA RSI,[0x14f774]
LEA RCX,[0x14ff01]
MOV EDX,0x71f
CALL 0x00117b00
|
bool ggml_backend_compare_graph_backend
(long param_1,long param_2,long param_3,code *param_4,int8 param_5)
{
ulong uVar1;
int *piVar2;
int *piVar3;
long lVar4;
long lVar5;
byte bVar6;
long lVar7;
ulong uVar8;
int4 local_f0;
int4 uStack_ec;
int4 uStack_d8;
int4 uStack_d4;
int1 local_d0 [80];
int1 local_80 [80];
ggml_backend_graph_copy(&local_f0);
if (CONCAT44(uStack_ec,local_f0) != 0) {
lVar4 = CONCAT44(uStack_d4,uStack_d8);
if (*(int *)(param_3 + 4) != *(int *)(lVar4 + 4)) {
/* WARNING: Subroutine does not return */
__assert_fail("g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x71f,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
if (0 < *(int *)(param_3 + 4)) {
uVar8 = 0;
do {
piVar2 = *(int **)(*(long *)(param_3 + 0x10) + uVar8 * 8);
piVar3 = *(int **)(*(long *)(lVar4 + 0x10) + uVar8 * 8);
if ((((piVar2[0x14] != piVar3[0x14]) || (*piVar2 != *piVar3)) ||
(*(long *)(piVar2 + 4) != *(long *)(piVar3 + 4))) ||
(*(long *)(piVar2 + 0xc) != *(long *)(piVar3 + 0xc))) {
LAB_0012a5cd:
/* WARNING: Subroutine does not return */
__assert_fail("t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x726,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
lVar5 = 7;
do {
lVar7 = lVar5;
if ((lVar7 == 10) ||
(*(long *)(piVar2 + lVar7 * 2 + -8) != *(long *)(piVar3 + lVar7 * 2 + -8))) break;
lVar5 = lVar7 + 1;
} while (*(long *)(piVar2 + lVar7 * 2) == *(long *)(piVar3 + lVar7 * 2));
if (lVar7 - 7U < 3) goto LAB_0012a5cd;
uVar1 = uVar8 + 1;
ggml_graph_view(local_80,param_3,uVar8 & 0xffffffff,uVar1 & 0xffffffff);
ggml_graph_view(local_d0,lVar4,uVar8 & 0xffffffff,uVar1 & 0xffffffff);
(**(code **)(param_1 + 0x58))(param_1,local_80);
if (*(code **)(param_1 + 0x30) != (code *)0x0) {
(**(code **)(param_1 + 0x30))(param_1);
}
(**(code **)(param_2 + 0x58))(param_2,local_d0);
if (*(code **)(param_2 + 0x30) != (code *)0x0) {
(**(code **)(param_2 + 0x30))(param_2);
}
bVar6 = 0;
if (3 < piVar2[0x14] - 0x21U) {
bVar6 = (*param_4)(uVar8 & 0xffffffff,piVar2,piVar3,param_5);
bVar6 = (bVar6 ^ 1) * '\x02';
}
} while (((bVar6 & 3) == 0) && (uVar8 = uVar1, (long)uVar1 < (long)*(int *)(param_3 + 4)));
}
ggml_backend_graph_copy_free();
}
return CONCAT44(uStack_ec,local_f0) != 0;
}
| |
28,302 | ggml_backend_compare_graph_backend | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | bool ggml_backend_compare_graph_backend(ggml_backend_t backend1, ggml_backend_t backend2, struct ggml_cgraph * graph, ggml_backend_eval_callback callback, void * user_data) {
struct ggml_backend_graph_copy copy = ggml_backend_graph_copy(backend2, graph);
if (copy.buffer == NULL) {
return false;
}
struct ggml_cgraph * g1 = graph;
struct ggml_cgraph * g2 = copy.graph;
assert(g1->n_nodes == g2->n_nodes);
for (int i = 0; i < g1->n_nodes; i++) {
//printf("eval %d/%d\n", i, g1->n_nodes);
struct ggml_tensor * t1 = g1->nodes[i];
struct ggml_tensor * t2 = g2->nodes[i];
assert(t1->op == t2->op && ggml_are_same_layout(t1, t2));
struct ggml_cgraph g1v = ggml_graph_view(g1, i, i + 1);
struct ggml_cgraph g2v = ggml_graph_view(g2, i, i + 1);
ggml_backend_graph_compute(backend1, &g1v);
ggml_backend_graph_compute(backend2, &g2v);
if (ggml_is_view_op(t1->op)) {
continue;
}
// compare results, calculate rms etc
if (!callback(i, t1, t2, user_data)) {
break;
}
}
ggml_backend_graph_copy_free(copy);
return true;
} | O2 | cpp | ggml_backend_compare_graph_backend:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, %r15
movq %rdi, 0x48(%rsp)
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, 0x50(%rsp)
callq 0x1f4b0
movq (%rbx), %rax
testq %rax, %rax
je 0x2e796
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rcx
movl 0x4(%r15), %eax
movq %rcx, 0x20(%rsp)
cmpl 0x4(%rcx), %eax
jne 0x2e7cd
xorl %ebx, %ebx
movq %r15, 0x40(%rsp)
cltq
cmpq %rax, %rbx
jge 0x2e779
movq 0x10(%r15), %rax
movq (%rax,%rbx,8), %r12
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%rbx,8), %r14
movl 0x50(%r12), %eax
cmpl 0x50(%r14), %eax
jne 0x2e7ae
movq %r12, %rdi
movq %r14, %rsi
callq 0x2bc38
testb %al, %al
je 0x2e7ae
leal 0x1(%rbx), %r13d
leaq 0xc8(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x1f230
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq 0x20(%rsp), %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x1f230
movq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0x1db20
movq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x1db20
movl 0x50(%r12), %eax
addl $-0x21, %eax
cmpl $0x4, %eax
jb 0x2e768
movl %ebx, %edi
movq %r12, %rsi
movq %r14, %rdx
movq 0x38(%rsp), %rcx
callq *0x30(%rsp)
testb %al, %al
je 0x2e779
movq 0x40(%rsp), %r15
movl 0x4(%r15), %eax
incq %rbx
jmp 0x2e6b7
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1f070
movq 0x28(%rsp), %rax
testq %rax, %rax
setne %al
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x237de(%rip), %rdi # 0x51f93
leaq 0x22fc8(%rip), %rsi # 0x51784
leaq 0x2374e(%rip), %rcx # 0x51f11
movl $0x726, %edx # imm = 0x726
callq 0x1dfb0
leaq 0x23722(%rip), %rdi # 0x51ef6
leaq 0x22fa9(%rip), %rsi # 0x51784
leaq 0x2372f(%rip), %rcx # 0x51f11
movl $0x71f, %edx # imm = 0x71F
callq 0x1dfb0
| ggml_backend_compare_graph_backend:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov [rsp+148h+var_110], r8
mov [rsp+148h+var_118], rcx
mov r15, rdx
mov [rsp+148h+var_100], rdi
lea rbx, [rsp+148h+var_F0]
mov rdi, rbx
mov [rsp+148h+var_F8], rsi
call _ggml_backend_graph_copy
mov rax, [rbx]
test rax, rax
jz loc_2E796
mov [rsp+148h+var_120], rax
mov rcx, qword ptr [rsp+148h+var_D8]; int
mov eax, [r15+4]
mov [rsp+148h+var_128], rcx
cmp eax, [rcx+4]
jnz loc_2E7CD
xor ebx, ebx
mov [rsp+148h+var_108], r15
loc_2E6B7:
cdqe
cmp rbx, rax
jge loc_2E779
mov rax, [r15+10h]
mov r12, [rax+rbx*8]
mov rax, [rsp+148h+var_128]
mov rax, [rax+10h]
mov r14, [rax+rbx*8]
mov eax, [r12+50h]
cmp eax, [r14+50h]
jnz loc_2E7AE
mov rdi, r12
mov rsi, r14
call _ZL20ggml_are_same_layoutPK11ggml_tensorS1_; ggml_are_same_layout(ggml_tensor const*,ggml_tensor const*)
test al, al
jz loc_2E7AE
lea r13d, [rbx+1]
lea rbp, [rsp+148h+var_80]
mov rdi, rbp
mov rsi, r15
mov edx, ebx
mov ecx, r13d
call _ggml_graph_view
lea r15, [rsp+148h+var_D0]
mov rdi, r15
mov rsi, [rsp+148h+var_128]
mov edx, ebx
mov ecx, r13d
call _ggml_graph_view
mov rdi, [rsp+148h+var_100]
mov rsi, rbp
call _ggml_backend_graph_compute
mov rdi, [rsp+148h+var_F8]
mov rsi, r15
call _ggml_backend_graph_compute
mov eax, [r12+50h]
add eax, 0FFFFFFDFh
cmp eax, 4
jb short loc_2E768
mov edi, ebx
mov rsi, r12
mov rdx, r14
mov rcx, [rsp+148h+var_110]
call [rsp+148h+var_118]
test al, al
jz short loc_2E779
loc_2E768:
mov r15, [rsp+148h+var_108]
mov eax, [r15+4]
inc rbx
jmp loc_2E6B7
loc_2E779:
movups xmm0, xmmword ptr [rsp+148h+var_F0]
movups xmm1, xmmword ptr [rsp+68h]
movups xmmword ptr [rsp+148h+var_138], xmm1; __int64
movups xmmword ptr [rsp+148h+var_148], xmm0; void *
call _ggml_backend_graph_copy_free
mov rax, [rsp+148h+var_120]
loc_2E796:
test rax, rax
setnz al
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E7AE:
lea rdi, aT1OpT2OpGgmlAr; "t1->op == t2->op && ggml_are_same_layou"...
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 726h
call ___assert_fail
loc_2E7CD:
lea rdi, aG1NNodesG2NNod; "g1->n_nodes == g2->n_nodes"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 71Fh
call ___assert_fail
| bool ggml_backend_compare_graph_backend(
long long a1,
_BYTE *a2,
int *a3,
unsigned __int8 ( *a4)(_QWORD, long long, long long, long long),
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // r15
void **v14; // rdi
int v15; // edx
int v16; // r8d
int v17; // r9d
void *v18; // rax
int v19; // ecx
int v20; // eax
long long v21; // rbx
long long v22; // r12
long long v23; // r14
long long v25; // [rsp+20h] [rbp-128h]
void *v26; // [rsp+28h] [rbp-120h]
long long v29; // [rsp+40h] [rbp-108h]
long long v31; // [rsp+50h] [rbp-F8h]
void *v32[2]; // [rsp+58h] [rbp-F0h] BYREF
long long v33; // [rsp+68h] [rbp-E0h]
int v34[2]; // [rsp+70h] [rbp-D8h]
_BYTE v35[80]; // [rsp+78h] [rbp-D0h] BYREF
_BYTE v36[128]; // [rsp+C8h] [rbp-80h] BYREF
v13 = (long long)a3;
v14 = v32;
v31 = (long long)a2;
ggml_backend_graph_copy((long long *)v32, (long long)a2, a3, a6, a7, a8, a9, a10, a11, a12, a13);
v18 = v32[0];
if ( v32[0] )
{
v26 = v32[0];
v19 = v34[0];
v20 = *(_DWORD *)(v13 + 4);
v25 = *(_QWORD *)v34;
if ( v20 != *(_DWORD *)(*(_QWORD *)v34 + 4LL) )
__assert_fail(
"g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1823LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_"
"callback, void *)");
v21 = 0LL;
v29 = v13;
while ( v21 < v20 )
{
v22 = *(_QWORD *)(*(_QWORD *)(v13 + 16) + 8 * v21);
v23 = *(_QWORD *)(*(_QWORD *)(v25 + 16) + 8 * v21);
if ( *(_DWORD *)(v22 + 80) != *(_DWORD *)(v23 + 80)
|| !ggml_are_same_layout(
*(_DWORD **)(*(_QWORD *)(v13 + 16) + 8 * v21),
*(_DWORD **)(*(_QWORD *)(v25 + 16) + 8 * v21)) )
{
__assert_fail(
"t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1830LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eva"
"l_callback, void *)");
}
ggml_graph_view((long long)v36, v13, v21, v21 + 1);
ggml_graph_view((long long)v35, v25, v21, v21 + 1);
ggml_backend_graph_compute(a1);
LODWORD(v14) = v31;
a2 = v35;
ggml_backend_graph_compute(v31);
if ( (unsigned int)(*(_DWORD *)(v22 + 80) - 33) >= 4 )
{
LODWORD(v14) = v21;
LODWORD(a2) = v22;
if ( !a4((unsigned int)v21, v22, v23, a5) )
break;
}
v13 = v29;
v20 = *(_DWORD *)(v29 + 4);
++v21;
}
ggml_backend_graph_copy_free((int)v14, (int)a2, v15, v19, v16, v17, v32[0], (long long)v32[1], v33);
v18 = v26;
}
return v18 != 0LL;
}
| ggml_backend_compare_graph_backend:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV qword ptr [RSP + 0x38],R8
MOV qword ptr [RSP + 0x30],RCX
MOV R15,RDX
MOV qword ptr [RSP + 0x48],RDI
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
MOV qword ptr [RSP + 0x50],RSI
CALL 0x0011f4b0
MOV RAX,qword ptr [RBX]
TEST RAX,RAX
JZ 0x0012e796
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x70]
MOV EAX,dword ptr [R15 + 0x4]
MOV qword ptr [RSP + 0x20],RCX
CMP EAX,dword ptr [RCX + 0x4]
JNZ 0x0012e7cd
XOR EBX,EBX
MOV qword ptr [RSP + 0x40],R15
LAB_0012e6b7:
CDQE
CMP RBX,RAX
JGE 0x0012e779
MOV RAX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RAX + RBX*0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV R14,qword ptr [RAX + RBX*0x8]
MOV EAX,dword ptr [R12 + 0x50]
CMP EAX,dword ptr [R14 + 0x50]
JNZ 0x0012e7ae
MOV RDI,R12
MOV RSI,R14
CALL 0x0012bc38
TEST AL,AL
JZ 0x0012e7ae
LEA R13D,[RBX + 0x1]
LEA RBP,[RSP + 0xc8]
MOV RDI,RBP
MOV RSI,R15
MOV EDX,EBX
MOV ECX,R13D
CALL 0x0011f230
LEA R15,[RSP + 0x78]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,EBX
MOV ECX,R13D
CALL 0x0011f230
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,RBP
CALL 0x0011db20
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,R15
CALL 0x0011db20
MOV EAX,dword ptr [R12 + 0x50]
ADD EAX,-0x21
CMP EAX,0x4
JC 0x0012e768
MOV EDI,EBX
MOV RSI,R12
MOV RDX,R14
MOV RCX,qword ptr [RSP + 0x38]
CALL qword ptr [RSP + 0x30]
TEST AL,AL
JZ 0x0012e779
LAB_0012e768:
MOV R15,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [R15 + 0x4]
INC RBX
JMP 0x0012e6b7
LAB_0012e779:
MOVUPS XMM0,xmmword ptr [RSP + 0x58]
MOVUPS XMM1,xmmword ptr [RSP + 0x68]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0011f070
MOV RAX,qword ptr [RSP + 0x28]
LAB_0012e796:
TEST RAX,RAX
SETNZ AL
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012e7ae:
LEA RDI,[0x151f93]
LEA RSI,[0x151784]
LEA RCX,[0x151f11]
MOV EDX,0x726
CALL 0x0011dfb0
LAB_0012e7cd:
LEA RDI,[0x151ef6]
LEA RSI,[0x151784]
LEA RCX,[0x151f11]
MOV EDX,0x71f
CALL 0x0011dfb0
|
int8
ggml_backend_compare_graph_backend
(int8 param_1,int8 param_2,long param_3,code *param_4,int8 param_5)
{
ggml_tensor *pgVar1;
ggml_tensor *pgVar2;
long lVar3;
long lVar4;
char cVar5;
ulong uVar6;
int iVar7;
int4 local_f0;
int4 uStack_ec;
int4 uStack_d8;
int4 uStack_d4;
int1 local_d0 [80];
int1 local_80 [80];
ggml_backend_graph_copy(&local_f0);
lVar3 = CONCAT44(uStack_ec,local_f0);
if (lVar3 != 0) {
lVar4 = CONCAT44(uStack_d4,uStack_d8);
iVar7 = *(int *)(param_3 + 4);
if (iVar7 != *(int *)(lVar4 + 4)) {
/* WARNING: Subroutine does not return */
__assert_fail("g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x71f,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
for (uVar6 = 0; (long)uVar6 < (long)iVar7; uVar6 = uVar6 + 1) {
pgVar1 = *(ggml_tensor **)(*(long *)(param_3 + 0x10) + uVar6 * 8);
pgVar2 = *(ggml_tensor **)(*(long *)(lVar4 + 0x10) + uVar6 * 8);
if (*(int *)(pgVar1 + 0x50) != *(int *)(pgVar2 + 0x50)) {
LAB_0012e7ae:
/* WARNING: Subroutine does not return */
__assert_fail("t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x726,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
cVar5 = ggml_are_same_layout(pgVar1,pgVar2);
if (cVar5 == '\0') goto LAB_0012e7ae;
iVar7 = (int)uVar6 + 1;
ggml_graph_view(local_80,param_3,uVar6 & 0xffffffff,iVar7);
ggml_graph_view(local_d0,lVar4,uVar6 & 0xffffffff,iVar7);
ggml_backend_graph_compute(param_1,local_80);
ggml_backend_graph_compute(param_2,local_d0);
if (3 < *(int *)(pgVar1 + 0x50) - 0x21U) {
cVar5 = (*param_4)(uVar6 & 0xffffffff,pgVar1,pgVar2,param_5);
if (cVar5 == '\0') break;
}
iVar7 = *(int *)(param_3 + 4);
}
ggml_backend_graph_copy_free();
}
return CONCAT71((int7)((ulong)lVar3 >> 8),lVar3 != 0);
}
| |
28,303 | ggml_backend_compare_graph_backend | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | bool ggml_backend_compare_graph_backend(ggml_backend_t backend1, ggml_backend_t backend2, struct ggml_cgraph * graph, ggml_backend_eval_callback callback, void * user_data) {
struct ggml_backend_graph_copy copy = ggml_backend_graph_copy(backend2, graph);
if (copy.buffer == NULL) {
return false;
}
struct ggml_cgraph * g1 = graph;
struct ggml_cgraph * g2 = copy.graph;
assert(g1->n_nodes == g2->n_nodes);
for (int i = 0; i < g1->n_nodes; i++) {
//printf("eval %d/%d\n", i, g1->n_nodes);
struct ggml_tensor * t1 = g1->nodes[i];
struct ggml_tensor * t2 = g2->nodes[i];
assert(t1->op == t2->op && ggml_are_same_layout(t1, t2));
struct ggml_cgraph g1v = ggml_graph_view(g1, i, i + 1);
struct ggml_cgraph g2v = ggml_graph_view(g2, i, i + 1);
ggml_backend_graph_compute(backend1, &g1v);
ggml_backend_graph_compute(backend2, &g2v);
if (ggml_is_view_op(t1->op)) {
continue;
}
// compare results, calculate rms etc
if (!callback(i, t1, t2, user_data)) {
break;
}
}
ggml_backend_graph_copy_free(copy);
return true;
} | O3 | cpp | ggml_backend_compare_graph_backend:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x17970
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x29114
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movq 0x70(%rsp), %r13
movl 0x4(%r14), %eax
cmpl 0x4(%r13), %eax
jne 0x2914b
movq %rcx, 0x20(%rsp)
testl %eax, %eax
jle 0x290f7
movq %r14, %rsi
xorl %ebx, %ebx
movq %r14, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq 0x10(%rsi), %rax
movq (%rax,%rbx,8), %r14
movq 0x10(%r13), %rax
movq (%rax,%rbx,8), %rbp
movl 0x50(%r14), %eax
cmpl 0x50(%rbp), %eax
jne 0x2912c
movl (%r14), %eax
cmpl (%rbp), %eax
jne 0x2912c
movl $0x6, %eax
movq -0x20(%r14,%rax,8), %rcx
cmpq -0x20(%rbp,%rax,8), %rcx
jne 0x2912c
movq (%r14,%rax,8), %rcx
cmpq (%rbp,%rax,8), %rcx
jne 0x2912c
incq %rax
cmpq $0xa, %rax
jne 0x2902d
leaq 0x1(%rbx), %r15
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x177b0
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x177b0
movq 0x50(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq *0x58(%r13)
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x2909d
movq %r13, %rdi
callq *%rax
movq 0x48(%rsp), %r13
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
callq *0x58(%r13)
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x290bc
movq %r13, %rdi
callq *%rax
movl 0x50(%r14), %eax
addl $-0x21, %eax
cmpl $0x4, %eax
movq 0x40(%rsp), %r13
jb 0x290e2
movl %ebx, %edi
movq %r14, %rsi
movq %rbp, %rdx
movq 0x30(%rsp), %rcx
callq *0x28(%rsp)
testb %al, %al
je 0x290f7
movq 0x38(%rsp), %rsi
movslq 0x4(%rsi), %rax
movq %r15, %rbx
cmpq %rax, %r15
jl 0x28fff
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x17670
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
setne %al
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26ef0(%rip), %rdi # 0x50023
leaq 0x266da(%rip), %rsi # 0x4f814
leaq 0x26e60(%rip), %rcx # 0x4ffa1
movl $0x726, %edx # imm = 0x726
callq 0x16b00
leaq 0x26e34(%rip), %rdi # 0x4ff86
leaq 0x266bb(%rip), %rsi # 0x4f814
leaq 0x26e41(%rip), %rcx # 0x4ffa1
movl $0x71f, %edx # imm = 0x71F
callq 0x16b00
| ggml_backend_compare_graph_backend:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov [rsp+148h+var_118], r8
mov [rsp+148h+var_120], rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
lea rbx, [rsp+148h+var_F0]
mov rdi, rbx
call _ggml_backend_graph_copy
mov rcx, [rbx]
test rcx, rcx
jz loc_29114
mov [rsp+148h+var_100], r12
mov [rsp+148h+var_F8], r15
mov r13, [rsp+148h+var_D8]
mov eax, [r14+4]
cmp eax, [r13+4]
jnz loc_2914B
mov [rsp+148h+var_128], rcx
test eax, eax
jle loc_290F7
mov rsi, r14
xor ebx, ebx
mov [rsp+148h+var_110], r14
mov [rsp+148h+var_108], r13
loc_28FFF:
mov rax, [rsi+10h]
mov r14, [rax+rbx*8]
mov rax, [r13+10h]
mov rbp, [rax+rbx*8]
mov eax, [r14+50h]
cmp eax, [rbp+50h]
jnz loc_2912C
mov eax, [r14]
cmp eax, [rbp+0]
jnz loc_2912C
mov eax, 6
loc_2902D:
mov rcx, [r14+rax*8-20h]
cmp rcx, [rbp+rax*8-20h]
jnz loc_2912C
mov rcx, [r14+rax*8]
cmp rcx, [rbp+rax*8+0]
jnz loc_2912C
inc rax
cmp rax, 0Ah
jnz short loc_2902D
lea r15, [rbx+1]
lea r12, [rsp+148h+var_80]
mov rdi, r12
mov edx, ebx
mov ecx, r15d
call _ggml_graph_view
lea rdi, [rsp+148h+var_D0]
mov rsi, r13
mov edx, ebx
mov ecx, r15d
call _ggml_graph_view
mov r13, [rsp+148h+var_F8]
mov rdi, r13
mov rsi, r12
call qword ptr [r13+58h]
mov rax, [r13+30h]
test rax, rax
jz short loc_2909D
mov rdi, r13
call rax
loc_2909D:
mov r13, [rsp+148h+var_100]
mov rdi, r13
lea rsi, [rsp+148h+var_D0]
call qword ptr [r13+58h]
mov rax, [r13+30h]
test rax, rax
jz short loc_290BC
mov rdi, r13
call rax
loc_290BC:
mov eax, [r14+50h]
add eax, 0FFFFFFDFh
cmp eax, 4
mov r13, [rsp+148h+var_108]
jb short loc_290E2
mov edi, ebx
mov rsi, r14
mov rdx, rbp
mov rcx, [rsp+148h+var_118]
call [rsp+148h+var_120]
test al, al
jz short loc_290F7
loc_290E2:
mov rsi, [rsp+148h+var_110]
movsxd rax, dword ptr [rsi+4]
mov rbx, r15
cmp r15, rax
jl loc_28FFF
loc_290F7:
movups xmm0, [rsp+148h+var_F0]
movups xmm1, xmmword ptr [rsp+68h]
movups [rsp+148h+var_138], xmm1
movups [rsp+148h+var_148], xmm0
call _ggml_backend_graph_copy_free
mov rcx, [rsp+148h+var_128]
loc_29114:
test rcx, rcx
setnz al
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2912C:
lea rdi, aT1OpT2OpGgmlAr; "t1->op == t2->op && ggml_are_same_layou"...
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 726h
call ___assert_fail
loc_2914B:
lea rdi, aG1NNodesG2NNod; "g1->n_nodes == g2->n_nodes"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolGgmlBacken; "bool ggml_backend_compare_graph_backend"...
mov edx, 71Fh
call ___assert_fail
| bool ggml_backend_compare_graph_backend(
long long a1,
long long a2,
int *a3,
unsigned __int8 ( *a4)(_QWORD, _DWORD *, _DWORD *, long long),
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v16; // rdi
long long v17; // rdx
long long v18; // r8
long long v19; // r9
void ( **v20)(_QWORD); // rcx
long long v21; // r13
int v22; // eax
long long v23; // rbx
_DWORD *v24; // r14
_DWORD *v25; // rbp
long long i; // rax
long long v27; // r15
void ( *v28)(long long); // rax
void ( *v29)(long long); // rax
void ( **v31)(_QWORD); // [rsp+20h] [rbp-128h]
int *v34; // [rsp+38h] [rbp-110h]
long long v35; // [rsp+40h] [rbp-108h]
long long v36; // [rsp+48h] [rbp-100h]
long long v37; // [rsp+50h] [rbp-F8h]
void ( **v38[3])(_QWORD); // [rsp+58h] [rbp-F0h] BYREF
long long v39; // [rsp+70h] [rbp-D8h]
_BYTE v40[80]; // [rsp+78h] [rbp-D0h] BYREF
_BYTE v41[128]; // [rsp+C8h] [rbp-80h] BYREF
v16 = (long long)v38;
ggml_backend_graph_copy((long long)v38, a2, a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = v38[0];
if ( v38[0] )
{
v36 = a2;
v37 = a1;
v21 = v39;
v22 = a3[1];
if ( v22 != *(_DWORD *)(v39 + 4) )
__assert_fail(
"g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1823LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_"
"callback, void *)");
v31 = v38[0];
if ( v22 > 0 )
{
a2 = (long long)a3;
v23 = 0LL;
v34 = a3;
v35 = v39;
do
{
v24 = *(_DWORD **)(*(_QWORD *)(a2 + 16) + 8 * v23);
v25 = *(_DWORD **)(*(_QWORD *)(v21 + 16) + 8 * v23);
if ( v24[20] != v25[20] || *v24 != *v25 )
LABEL_20:
__assert_fail(
"t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
1830LL,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_e"
"val_callback, void *)");
for ( i = 6LL; i != 10; ++i )
{
if ( *(_QWORD *)&v24[2 * i - 8] != *(_QWORD *)&v25[2 * i - 8]
|| *(_QWORD *)&v24[2 * i] != *(_QWORD *)&v25[2 * i] )
{
goto LABEL_20;
}
}
v27 = v23 + 1;
ggml_graph_view((long long)v41, a2, v23, v23 + 1);
ggml_graph_view((long long)v40, v21, v23, v23 + 1);
(*(void ( **)(long long, _BYTE *))(v37 + 88))(v37, v41);
v28 = *(void ( **)(long long))(v37 + 48);
if ( v28 )
v28(v37);
v16 = v36;
(*(void ( **)(long long, _BYTE *))(v36 + 88))(v36, v40);
v29 = *(void ( **)(long long))(v36 + 48);
if ( v29 )
{
v16 = v36;
v29(v36);
}
v21 = v35;
if ( (unsigned int)(v24[20] - 33) >= 4 )
{
v16 = (unsigned int)v23;
a2 = (long long)v24;
if ( !a4((unsigned int)v23, v24, v25, a5) )
break;
}
a2 = (long long)v34;
++v23;
}
while ( v27 < v34[1] );
}
ggml_backend_graph_copy_free(v16, a2, v17, (long long)v20, v18, v19, v38[0], (long long)v38[1], (long long)v38[2]);
v20 = v31;
}
return v20 != 0LL;
}
| ggml_backend_compare_graph_backend:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV qword ptr [RSP + 0x30],R8
MOV qword ptr [RSP + 0x28],RCX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
CALL 0x00117970
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x00129114
MOV qword ptr [RSP + 0x48],R12
MOV qword ptr [RSP + 0x50],R15
MOV R13,qword ptr [RSP + 0x70]
MOV EAX,dword ptr [R14 + 0x4]
CMP EAX,dword ptr [R13 + 0x4]
JNZ 0x0012914b
MOV qword ptr [RSP + 0x20],RCX
TEST EAX,EAX
JLE 0x001290f7
MOV RSI,R14
XOR EBX,EBX
MOV qword ptr [RSP + 0x38],R14
MOV qword ptr [RSP + 0x40],R13
LAB_00128fff:
MOV RAX,qword ptr [RSI + 0x10]
MOV R14,qword ptr [RAX + RBX*0x8]
MOV RAX,qword ptr [R13 + 0x10]
MOV RBP,qword ptr [RAX + RBX*0x8]
MOV EAX,dword ptr [R14 + 0x50]
CMP EAX,dword ptr [RBP + 0x50]
JNZ 0x0012912c
MOV EAX,dword ptr [R14]
CMP EAX,dword ptr [RBP]
JNZ 0x0012912c
MOV EAX,0x6
LAB_0012902d:
MOV RCX,qword ptr [R14 + RAX*0x8 + -0x20]
CMP RCX,qword ptr [RBP + RAX*0x8 + -0x20]
JNZ 0x0012912c
MOV RCX,qword ptr [R14 + RAX*0x8]
CMP RCX,qword ptr [RBP + RAX*0x8]
JNZ 0x0012912c
INC RAX
CMP RAX,0xa
JNZ 0x0012902d
LEA R15,[RBX + 0x1]
LEA R12,[RSP + 0xc8]
MOV RDI,R12
MOV EDX,EBX
MOV ECX,R15D
CALL 0x001177b0
LEA RDI,[RSP + 0x78]
MOV RSI,R13
MOV EDX,EBX
MOV ECX,R15D
CALL 0x001177b0
MOV R13,qword ptr [RSP + 0x50]
MOV RDI,R13
MOV RSI,R12
CALL qword ptr [R13 + 0x58]
MOV RAX,qword ptr [R13 + 0x30]
TEST RAX,RAX
JZ 0x0012909d
MOV RDI,R13
CALL RAX
LAB_0012909d:
MOV R13,qword ptr [RSP + 0x48]
MOV RDI,R13
LEA RSI,[RSP + 0x78]
CALL qword ptr [R13 + 0x58]
MOV RAX,qword ptr [R13 + 0x30]
TEST RAX,RAX
JZ 0x001290bc
MOV RDI,R13
CALL RAX
LAB_001290bc:
MOV EAX,dword ptr [R14 + 0x50]
ADD EAX,-0x21
CMP EAX,0x4
MOV R13,qword ptr [RSP + 0x40]
JC 0x001290e2
MOV EDI,EBX
MOV RSI,R14
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x30]
CALL qword ptr [RSP + 0x28]
TEST AL,AL
JZ 0x001290f7
LAB_001290e2:
MOV RSI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSI + 0x4]
MOV RBX,R15
CMP R15,RAX
JL 0x00128fff
LAB_001290f7:
MOVUPS XMM0,xmmword ptr [RSP + 0x58]
MOVUPS XMM1,xmmword ptr [RSP + 0x68]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00117670
MOV RCX,qword ptr [RSP + 0x20]
LAB_00129114:
TEST RCX,RCX
SETNZ AL
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012912c:
LEA RDI,[0x150023]
LEA RSI,[0x14f814]
LEA RCX,[0x14ffa1]
MOV EDX,0x726
CALL 0x00116b00
LAB_0012914b:
LEA RDI,[0x14ff86]
LEA RSI,[0x14f814]
LEA RCX,[0x14ffa1]
MOV EDX,0x71f
CALL 0x00116b00
|
bool ggml_backend_compare_graph_backend
(long param_1,long param_2,long param_3,code *param_4,int8 param_5)
{
ulong uVar1;
int *piVar2;
int *piVar3;
long lVar4;
char cVar5;
long lVar6;
ulong uVar7;
int4 local_f0;
int4 uStack_ec;
int4 uStack_d8;
int4 uStack_d4;
int1 local_d0 [80];
int1 local_80 [80];
ggml_backend_graph_copy(&local_f0);
if (CONCAT44(uStack_ec,local_f0) != 0) {
lVar4 = CONCAT44(uStack_d4,uStack_d8);
if (*(int *)(param_3 + 4) != *(int *)(lVar4 + 4)) {
/* WARNING: Subroutine does not return */
__assert_fail("g1->n_nodes == g2->n_nodes",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x71f,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
if (0 < *(int *)(param_3 + 4)) {
uVar7 = 0;
do {
piVar2 = *(int **)(*(long *)(param_3 + 0x10) + uVar7 * 8);
piVar3 = *(int **)(*(long *)(lVar4 + 0x10) + uVar7 * 8);
if ((piVar2[0x14] != piVar3[0x14]) || (*piVar2 != *piVar3)) {
LAB_0012912c:
/* WARNING: Subroutine does not return */
__assert_fail("t1->op == t2->op && ggml_are_same_layout(t1, t2)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,0x726,
"bool ggml_backend_compare_graph_backend(ggml_backend_t, ggml_backend_t, struct ggml_cgraph *, ggml_backend_eval_callback, void *)"
);
}
lVar6 = 6;
do {
if ((*(long *)(piVar2 + lVar6 * 2 + -8) != *(long *)(piVar3 + lVar6 * 2 + -8)) ||
(*(long *)(piVar2 + lVar6 * 2) != *(long *)(piVar3 + lVar6 * 2))) goto LAB_0012912c;
lVar6 = lVar6 + 1;
} while (lVar6 != 10);
uVar1 = uVar7 + 1;
ggml_graph_view(local_80,param_3,uVar7 & 0xffffffff,uVar1 & 0xffffffff);
ggml_graph_view(local_d0,lVar4,uVar7 & 0xffffffff,uVar1 & 0xffffffff);
(**(code **)(param_1 + 0x58))(param_1,local_80);
if (*(code **)(param_1 + 0x30) != (code *)0x0) {
(**(code **)(param_1 + 0x30))(param_1);
}
(**(code **)(param_2 + 0x58))(param_2,local_d0);
if (*(code **)(param_2 + 0x30) != (code *)0x0) {
(**(code **)(param_2 + 0x30))(param_2);
}
if (3 < piVar2[0x14] - 0x21U) {
cVar5 = (*param_4)(uVar7 & 0xffffffff,piVar2,piVar3,param_5);
if (cVar5 == '\0') break;
}
uVar7 = uVar1;
} while ((long)uVar1 < (long)*(int *)(param_3 + 4));
}
ggml_backend_graph_copy_free();
}
return CONCAT44(uStack_ec,local_f0) != 0;
}
| |
28,304 | bf_convert_to_radix | bluesky950520[P]quickjs/libbf.c | static int bf_convert_to_radix(bf_t *r, slimb_t *pE,
const bf_t *a, int radix,
limb_t P, bf_rnd_t rnd_mode,
BOOL is_fixed_exponent)
{
slimb_t E, e, prec, extra_bits, ziv_extra_bits, prec0;
bf_t B_s, *B = &B_s;
int e_sign, ret, res;
if (a->len == 0) {
/* zero case */
*pE = 0;
return bf_set(r, a);
}
if (is_fixed_exponent) {
E = *pE;
} else {
/* compute the new exponent */
E = 1 + bf_mul_log2_radix(a->expn - 1, radix, TRUE, FALSE);
}
// bf_print_str("a", a);
// printf("E=%ld P=%ld radix=%d\n", E, P, radix);
for(;;) {
e = P - E;
e_sign = 0;
if (e < 0) {
e = -e;
e_sign = 1;
}
/* Note: precision for log2(radix) is not critical here */
prec0 = bf_mul_log2_radix(P, radix, FALSE, TRUE);
ziv_extra_bits = 16;
for(;;) {
prec = prec0 + ziv_extra_bits;
/* XXX: rigorous error analysis needed */
extra_bits = ceil_log2(e) * 2 + 1;
ret = bf_pow_ui_ui(r, radix, e, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
if (!e_sign)
ret |= bf_mul(r, r, a, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
else
ret |= bf_div(r, a, r, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
if (ret & BF_ST_MEM_ERROR)
return BF_ST_MEM_ERROR;
/* if the result is not exact, check that it can be safely
rounded to an integer */
if ((ret & BF_ST_INEXACT) &&
!bf_can_round(r, r->expn, rnd_mode, prec)) {
/* and more precision and retry */
ziv_extra_bits = ziv_extra_bits + (ziv_extra_bits / 2);
continue;
} else {
ret = bf_rint(r, rnd_mode);
if (ret & BF_ST_MEM_ERROR)
return BF_ST_MEM_ERROR;
break;
}
}
if (is_fixed_exponent)
break;
/* check that the result is < B^P */
/* XXX: do a fast approximate test first ? */
bf_init(r->ctx, B);
ret = bf_pow_ui_ui(B, radix, P, BF_PREC_INF, BF_RNDZ);
if (ret) {
bf_delete(B);
return ret;
}
res = bf_cmpu(r, B);
bf_delete(B);
if (res < 0)
break;
/* try a larger exponent */
E++;
}
*pE = E;
return 0;
} | O1 | c | bf_convert_to_radix:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, 0xc(%rsp)
movq %rdi, %r12
cmpq $0x0, 0x18(%rdx)
je 0x915b5
movq %r8, %r14
movl %ecx, %ebp
movl 0xc0(%rsp), %eax
movl %eax, 0x14(%rsp)
testl %eax, %eax
movq %rsi, 0x38(%rsp)
movq %rdx, 0x18(%rsp)
je 0x915d8
movq (%rsi), %rbx
jmp 0x915f3
movq $0x0, (%rsi)
movq %r12, %rdi
movq %rdx, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84c8d
movq 0x10(%rdx), %rdi
decq %rdi
movl %ebp, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x899e4
movq %rax, %rbx
incq %rbx
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x899e4
movq %rax, 0x50(%rsp)
movslq %ebp, %rax
movq %rax, 0x20(%rsp)
movl 0xc(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x10(%rsp)
movq %rbx, 0x30(%rsp)
movq %r14, 0x40(%rsp)
subq %rbx, %r14
movq %r14, %rax
negq %rax
movq %r14, 0x58(%rsp)
cmovsq %r14, %rax
movq %rax, 0x28(%rsp)
decq %rax
movq %rbx, 0x48(%rsp)
je 0x91651
bsrq %rax, %rax
xorq $0x3f, %rax
jmp 0x91656
movl $0x40, %eax
addq %rax, %rax
movl $0x81, %r13d
subq %rax, %r13
cmpq $0x2, 0x28(%rsp)
movl $0x1, %eax
cmovbq %rax, %r13
movl $0x10, %r15d
movq 0x50(%rsp), %rax
leaq (%r15,%rax), %r14
leaq (%r14,%r13), %rbx
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x88cee
movl %eax, %ebp
cmpq $0x0, 0x58(%rsp)
js 0x916c4
movq %r12, %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x86711
jmp 0x916e4
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
leaq -0x9aec(%rip), %r9 # 0x87bf3
callq 0x87b3a
orl %ebp, %eax
movl $0x20, %ebp
testb $0x20, %al
jne 0x917f7
testb $0x10, %al
je 0x91724
movq 0x10(%r12), %rsi
movq %r12, %rdi
movl 0xc(%rsp), %edx
movq %r14, %rcx
callq 0x851e7
testl %eax, %eax
jne 0x91724
movq %r15, %rax
shrq $0x3f, %rax
addq %r15, %rax
sarq %rax
addq %rax, %r15
jmp 0x91677
movq 0x18(%r12), %rcx
testq %rcx, %rcx
je 0x91747
movq %r12, %rdi
xorl %esi, %esi
movl 0x10(%rsp), %edx
xorl %r8d, %r8d
callq 0x84e26
testb $0x20, %al
jne 0x917f7
cmpl $0x0, 0x14(%rsp)
jne 0x917e8
movq (%r12), %rax
movq %rax, 0x60(%rsp)
movl $0x0, 0x68(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x40(%rsp), %r14
movq %r14, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x88cee
testl %eax, %eax
jne 0x9180b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8542a
movl %eax, %ebx
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x917d7
movq 0x80(%rsp), %rsi
testq %rsi, %rsi
je 0x917d7
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %ebx, %ebx
movq 0x48(%rsp), %rbx
js 0x917ed
incq %rbx
jmp 0x91626
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rax
movq %rbx, (%rax)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x917f7
movq 0x80(%rsp), %rsi
testq %rsi, %rsi
je 0x917f7
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x917f7
| bf_convert_to_radix:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov [rsp+0B8h+var_AC], r9d
mov r12, rdi
cmp qword ptr [rdx+18h], 0
jz short loc_915B5
mov r14, r8
mov ebp, ecx
mov eax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_A4], eax
test eax, eax
mov [rsp+0B8h+var_80], rsi
mov [rsp+0B8h+var_A0], rdx
jz short loc_915D8
mov rbx, [rsi]
jmp short loc_915F3
loc_915B5:
mov qword ptr [rsi], 0
mov rdi, r12
mov rsi, rdx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_set
loc_915D8:
mov rdi, [rdx+10h]
dec rdi
mov esi, ebp
mov edx, 1
xor ecx, ecx
call bf_mul_log2_radix
mov rbx, rax
inc rbx
loc_915F3:
mov rdi, r14
mov esi, ebp
xor edx, edx
mov ecx, 1
call bf_mul_log2_radix
mov [rsp+0B8h+var_68], rax
movsxd rax, ebp
mov [rsp+0B8h+var_98], rax
mov eax, [rsp+0B8h+var_AC]
or eax, 10h
mov [rsp+0B8h+var_A8], eax
mov [rsp+0B8h+var_88], rbx
mov [rsp+0B8h+var_78], r14
loc_91626:
sub r14, rbx
mov rax, r14
neg rax
mov [rsp+0B8h+var_60], r14
cmovs rax, r14
mov [rsp+0B8h+var_90], rax
dec rax
mov [rsp+0B8h+var_70], rbx
jz short loc_91651
bsr rax, rax
xor rax, 3Fh
jmp short loc_91656
loc_91651:
mov eax, 40h ; '@'
loc_91656:
add rax, rax
mov r13d, 81h
sub r13, rax
cmp [rsp+0B8h+var_90], 2
mov eax, 1
cmovb r13, rax
mov r15d, 10h
loc_91677:
mov rax, [rsp+0B8h+var_68]
lea r14, [r15+rax]
lea rbx, [r14+r13]
mov rdi, r12
mov rsi, [rsp+0B8h+var_98]
mov rdx, [rsp+0B8h+var_90]
mov rcx, rbx
mov r8d, 7E0h
call bf_pow_ui_ui
mov ebp, eax
cmp [rsp+0B8h+var_60], 0
js short loc_916C4
mov rdi, r12
mov rsi, r12
mov rdx, [rsp+0B8h+var_A0]
mov rcx, rbx
mov r8d, 7E0h
call bf_mul
jmp short loc_916E4
loc_916C4:
mov rdi, r12
mov rsi, [rsp+0B8h+var_A0]
mov rdx, r12
mov rcx, rbx
mov r8d, 7E0h
lea r9, __bf_div
call bf_op2
loc_916E4:
or eax, ebp
mov ebp, 20h ; ' '
test al, 20h
jnz loc_917F7
test al, 10h
jz short loc_91724
mov rsi, [r12+10h]
mov rdi, r12
mov edx, [rsp+0B8h+var_AC]
mov rcx, r14
call bf_can_round
test eax, eax
jnz short loc_91724
mov rax, r15
shr rax, 3Fh
add rax, r15
sar rax, 1
add r15, rax
jmp loc_91677
loc_91724:
mov rcx, [r12+18h]
test rcx, rcx
jz short loc_91747
mov rdi, r12
xor esi, esi
mov edx, [rsp+0B8h+var_A8]
xor r8d, r8d
call __bf_round
test al, 20h
jnz loc_917F7
loc_91747:
cmp [rsp+0B8h+var_A4], 0
jnz loc_917E8
mov rax, [r12]
mov [rsp+0B8h+var_58], rax
mov [rsp+0B8h+var_50], 0
mov rax, 8000000000000000h
mov [rsp+0B8h+var_48], rax
lea rax, [rsp+0B8h+var_40]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
lea rbx, [rsp+0B8h+var_58]
mov rdi, rbx
mov rsi, [rsp+0B8h+var_98]
mov r14, [rsp+0B8h+var_78]
mov rdx, r14
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_pow_ui_ui
test eax, eax
jnz short loc_9180B
mov rdi, r12
mov rsi, rbx
call bf_cmpu
mov ebx, eax
mov rax, [rsp+0B8h+var_58]
test rax, rax
jz short loc_917D7
mov rsi, [rsp+0B8h+var_38]
test rsi, rsi
jz short loc_917D7
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_917D7:
test ebx, ebx
mov rbx, [rsp+0B8h+var_70]
js short loc_917ED
inc rbx
jmp loc_91626
loc_917E8:
mov rbx, [rsp+0B8h+var_88]
loc_917ED:
mov rax, [rsp+0B8h+var_80]
mov [rax], rbx
xor ebp, ebp
loc_917F7:
mov eax, ebp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9180B:
mov ebp, eax
mov rax, [rsp+0B8h+var_58]
test rax, rax
jz short loc_917F7
mov rsi, [rsp+0B8h+var_38]
test rsi, rsi
jz short loc_917F7
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp short loc_917F7
| long long bf_convert_to_radix(
long long a1,
unsigned long long *a2,
long long a3,
signed int a4,
long long a5,
int a6,
int a7)
{
unsigned long long v9; // rbx
long long v11; // r14
unsigned long long v12; // rax
unsigned long long v13; // rax
long long v14; // rax
long long v15; // r13
long long i; // r15
long long v17; // rbx
char v18; // bp
char v19; // al
char v20; // al
unsigned int v21; // ebp
unsigned long long v22; // rcx
unsigned int v23; // eax
int v24; // ebx
bool v25; // sf
unsigned long long v26; // rbx
unsigned long long v29; // [rsp+20h] [rbp-98h]
unsigned long long v30; // [rsp+28h] [rbp-90h]
unsigned long long v31; // [rsp+30h] [rbp-88h]
unsigned long long v32; // [rsp+40h] [rbp-78h]
unsigned long long v33; // [rsp+48h] [rbp-70h]
unsigned long long v34; // [rsp+50h] [rbp-68h]
_QWORD *v35; // [rsp+60h] [rbp-58h] BYREF
int v36; // [rsp+68h] [rbp-50h]
unsigned long long v37; // [rsp+70h] [rbp-48h]
__int128 v38; // [rsp+78h] [rbp-40h]
if ( *(_QWORD *)(a3 + 24) )
{
if ( a7 )
v9 = *a2;
else
v9 = bf_mul_log2_radix(*(_QWORD *)(a3 + 16) - 1LL, a4, 1, 0) + 1;
v34 = bf_mul_log2_radix(a5, a4, 0, 1);
v29 = a4;
v31 = v9;
v32 = a5;
while ( 2 )
{
v11 = a5 - v9;
v12 = -v11;
if ( v11 > 0 )
v12 = v11;
v30 = v12;
v13 = v12 - 1;
v33 = v9;
if ( v13 )
{
_BitScanReverse64(&v13, v13);
v14 = v13 ^ 0x3F;
}
else
{
v14 = 64LL;
}
v15 = 129 - 2 * v14;
if ( v30 < 2 )
v15 = 1LL;
for ( i = 16LL; ; i += i / 2 )
{
v17 = i + v34 + v15;
v18 = bf_pow_ui_ui((_QWORD **)a1, v29, v30, v17, 0x7E0u);
if ( v11 < 0 )
v19 = bf_op2(
(__int128 *)a1,
(__int128 *)a3,
(__int128 *)a1,
v17,
2016LL,
(long long ( *)(__int128 *))_bf_div);
else
v19 = bf_mul((__int128 *)a1, a1, a3, v17, 0x7E0u);
v20 = v18 | v19;
v21 = 32;
if ( (v20 & 0x20) != 0 )
return v21;
if ( (v20 & 0x10) == 0 || bf_can_round((_QWORD *)a1, *(_QWORD *)(a1 + 16), a6, i + v34) )
break;
}
v22 = *(_QWORD *)(a1 + 24);
if ( !v22 || (_bf_round(a1, 0LL, a6 | 0x10u, v22, 0) & 0x20) == 0 )
{
if ( a7 )
{
v26 = v31;
LABEL_32:
*a2 = v26;
return 0;
}
v35 = *(_QWORD **)a1;
v36 = 0;
v37 = 0x8000000000000000LL;
v38 = 0LL;
a5 = v32;
v23 = bf_pow_ui_ui(&v35, v29, v32, 0x3FFFFFFFFFFFFFFFLL, 1u);
if ( !v23 )
{
v24 = bf_cmpu((_QWORD *)a1, &v35);
if ( v35 )
{
if ( *((_QWORD *)&v38 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v35[1])(*v35, *((_QWORD *)&v38 + 1), 0LL);
}
v25 = v24 < 0;
v26 = v33;
if ( !v25 )
{
v9 = v33 + 1;
continue;
}
goto LABEL_32;
}
v21 = v23;
if ( v35 && *((_QWORD *)&v38 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v35[1])(*v35, *((_QWORD *)&v38 + 1), 0LL);
}
return v21;
}
}
else
{
*a2 = 0LL;
return bf_set((_QWORD *)a1, a3);
}
}
| |||
28,305 | bf_convert_to_radix | bluesky950520[P]quickjs/libbf.c | static int bf_convert_to_radix(bf_t *r, slimb_t *pE,
const bf_t *a, int radix,
limb_t P, bf_rnd_t rnd_mode,
BOOL is_fixed_exponent)
{
slimb_t E, e, prec, extra_bits, ziv_extra_bits, prec0;
bf_t B_s, *B = &B_s;
int e_sign, ret, res;
if (a->len == 0) {
/* zero case */
*pE = 0;
return bf_set(r, a);
}
if (is_fixed_exponent) {
E = *pE;
} else {
/* compute the new exponent */
E = 1 + bf_mul_log2_radix(a->expn - 1, radix, TRUE, FALSE);
}
// bf_print_str("a", a);
// printf("E=%ld P=%ld radix=%d\n", E, P, radix);
for(;;) {
e = P - E;
e_sign = 0;
if (e < 0) {
e = -e;
e_sign = 1;
}
/* Note: precision for log2(radix) is not critical here */
prec0 = bf_mul_log2_radix(P, radix, FALSE, TRUE);
ziv_extra_bits = 16;
for(;;) {
prec = prec0 + ziv_extra_bits;
/* XXX: rigorous error analysis needed */
extra_bits = ceil_log2(e) * 2 + 1;
ret = bf_pow_ui_ui(r, radix, e, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
if (!e_sign)
ret |= bf_mul(r, r, a, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
else
ret |= bf_div(r, a, r, prec + extra_bits,
BF_RNDN | BF_FLAG_EXT_EXP);
if (ret & BF_ST_MEM_ERROR)
return BF_ST_MEM_ERROR;
/* if the result is not exact, check that it can be safely
rounded to an integer */
if ((ret & BF_ST_INEXACT) &&
!bf_can_round(r, r->expn, rnd_mode, prec)) {
/* and more precision and retry */
ziv_extra_bits = ziv_extra_bits + (ziv_extra_bits / 2);
continue;
} else {
ret = bf_rint(r, rnd_mode);
if (ret & BF_ST_MEM_ERROR)
return BF_ST_MEM_ERROR;
break;
}
}
if (is_fixed_exponent)
break;
/* check that the result is < B^P */
/* XXX: do a fast approximate test first ? */
bf_init(r->ctx, B);
ret = bf_pow_ui_ui(B, radix, P, BF_PREC_INF, BF_RNDZ);
if (ret) {
bf_delete(B);
return ret;
}
res = bf_cmpu(r, B);
bf_delete(B);
if (res < 0)
break;
/* try a larger exponent */
E++;
}
*pE = E;
return 0;
} | O2 | c | bf_convert_to_radix:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, (%rsp)
movq %rdi, %r12
cmpq $0x0, 0x18(%rdx)
je 0x7924c
movq %r8, %r14
movl %ecx, %ebp
movl 0xb0(%rsp), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
movq %rsi, 0x30(%rsp)
movq %rdx, 0x10(%rsp)
je 0x79269
movq (%rsi), %rbx
jmp 0x79282
andq $0x0, (%rsi)
movq %r12, %rdi
movq %rdx, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6f666
movq 0x10(%rdx), %rdi
decq %rdi
pushq $0x1
popq %rdx
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x733a5
movq %rax, %rbx
incq %rbx
pushq $0x1
popq %rcx
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x733a5
movq %rax, 0x40(%rsp)
movslq %ebp, %rax
movq %rax, 0x18(%rsp)
pushq $0x40
popq %rax
movq %rbx, 0x28(%rsp)
movq %r14, 0x38(%rsp)
movq %r14, %rcx
movq %rbx, 0x8(%rsp)
subq %rbx, %rcx
movq %rcx, %rdx
negq %rdx
movq %rcx, 0x48(%rsp)
cmovsq %rcx, %rdx
movq %rdx, 0x20(%rsp)
movq %rdx, %rcx
decq %rcx
je 0x792da
bsrq %rcx, %rax
xorq $0x3f, %rax
addq %rax, %rax
movl $0x81, %r15d
subq %rax, %r15
cmpq $0x2, 0x20(%rsp)
pushq $0x1
popq %rax
cmovbq %rax, %r15
pushq $0x10
popq %rbp
movq 0x40(%rsp), %rax
leaq (%rax,%rbp), %r14
leaq (%r14,%r15), %r13
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x72a1f
movl %eax, %ebx
cmpq $0x0, 0x48(%rsp)
js 0x79343
movq %r12, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x70da9
jmp 0x7935c
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x71cf2
orl %ebx, %eax
testb $0x20, %al
jne 0x7942f
testb $0x10, %al
je 0x79394
movq 0x10(%r12), %rsi
movq %r12, %rdi
movl (%rsp), %edx
movq %r14, %rcx
callq 0x6fb30
testl %eax, %eax
jne 0x79394
movq %rbp, %rax
cqto
pushq $0x2
popq %rcx
idivq %rcx
addq %rax, %rbp
jmp 0x792f6
movq %r12, %rdi
movl (%rsp), %esi
callq 0x71c3d
testb $0x20, %al
jne 0x7942f
cmpl $0x0, 0x4(%rsp)
jne 0x79441
movq (%r12), %rax
movq %rax, 0x50(%rsp)
andl $0x0, 0x58(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %r14
movq %r14, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %r8
callq 0x72a1f
testl %eax, %eax
jne 0x79448
movq %r12, %rdi
movq %r15, %rsi
callq 0x6fd66
movl %eax, %ebx
movq %r15, %rdi
callq 0x7145e
testl %ebx, %ebx
js 0x79458
movq 0x8(%rsp), %rbx
incq %rbx
pushq $0x40
popq %rax
jmp 0x792ab
pushq $0x20
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rcx
jmp 0x7945d
movl %eax, %ebx
leaq 0x50(%rsp), %rdi
callq 0x7145e
movl %ebx, %eax
jmp 0x79432
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
xorl %eax, %eax
jmp 0x79432
| bf_convert_to_radix:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_A8], r9d
mov r12, rdi
cmp qword ptr [rdx+18h], 0
jz short loc_7924C
mov r14, r8
mov ebp, ecx
mov eax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_A4], eax
test eax, eax
mov [rsp+0A8h+var_78], rsi
mov [rsp+0A8h+var_98], rdx
jz short loc_79269
mov rbx, [rsi]
jmp short loc_79282
loc_7924C:
and qword ptr [rsi], 0
mov rdi, r12
mov rsi, rdx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_set
loc_79269:
mov rdi, [rdx+10h]
dec rdi
push 1
pop rdx
mov esi, ebp
xor ecx, ecx
call bf_mul_log2_radix
mov rbx, rax
inc rbx
loc_79282:
push 1
pop rcx
mov rdi, r14
mov esi, ebp
xor edx, edx
call bf_mul_log2_radix
mov [rsp+0A8h+var_68], rax
movsxd rax, ebp
mov [rsp+0A8h+var_90], rax
push 40h ; '@'
pop rax
mov [rsp+0A8h+var_80], rbx
mov [rsp+0A8h+var_70], r14
loc_792AB:
mov rcx, r14
mov [rsp+0A8h+var_A0], rbx
sub rcx, rbx
mov rdx, rcx
neg rdx
mov [rsp+0A8h+var_60], rcx
cmovs rdx, rcx
mov [rsp+0A8h+var_88], rdx
mov rcx, rdx
dec rcx
jz short loc_792DA
bsr rax, rcx
xor rax, 3Fh
loc_792DA:
add rax, rax
mov r15d, 81h
sub r15, rax
cmp [rsp+0A8h+var_88], 2
push 1
pop rax
cmovb r15, rax
push 10h
pop rbp
loc_792F6:
mov rax, [rsp+0A8h+var_68]
lea r14, [rax+rbp]
lea r13, [r14+r15]
mov rdi, r12
mov rsi, [rsp+0A8h+var_90]
mov rdx, [rsp+0A8h+var_88]
mov rcx, r13
mov r8d, 7E0h
call bf_pow_ui_ui
mov ebx, eax
cmp [rsp+0A8h+var_60], 0
js short loc_79343
mov rdi, r12
mov rsi, r12
mov rdx, [rsp+0A8h+var_98]
mov rcx, r13
mov r8d, 7E0h
call bf_mul
jmp short loc_7935C
loc_79343:
mov rdi, r12
mov rsi, [rsp+0A8h+var_98]
mov rdx, r12
mov rcx, r13
mov r8d, 7E0h
call bf_div
loc_7935C:
or eax, ebx
test al, 20h
jnz loc_7942F
test al, 10h
jz short loc_79394
mov rsi, [r12+10h]
mov rdi, r12
mov edx, [rsp+0A8h+var_A8]
mov rcx, r14
call bf_can_round
test eax, eax
jnz short loc_79394
mov rax, rbp
cqo
push 2
pop rcx
idiv rcx
add rbp, rax
jmp loc_792F6
loc_79394:
mov rdi, r12
mov esi, [rsp+0A8h+var_A8]
call bf_rint
test al, 20h
jnz loc_7942F
cmp [rsp+0A8h+var_A4], 0
jnz loc_79441
mov rax, [r12]
mov [rsp+0A8h+var_58], rax
and [rsp+0A8h+var_50], 0
mov rax, 8000000000000000h
mov [rsp+0A8h+var_48], rax
lea rax, [rsp+0A8h+var_40]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
lea r15, [rsp+0A8h+var_58]
mov rdi, r15
mov rsi, [rsp+0A8h+var_90]
mov r14, [rsp+0A8h+var_70]
mov rdx, r14
mov rcx, 3FFFFFFFFFFFFFFFh
push 1
pop r8
call bf_pow_ui_ui
test eax, eax
jnz short loc_79448
mov rdi, r12
mov rsi, r15
call bf_cmpu
mov ebx, eax
mov rdi, r15
call bf_delete_0
test ebx, ebx
js short loc_79458
mov rbx, [rsp+0A8h+var_A0]
inc rbx
push 40h ; '@'
pop rax
jmp loc_792AB
loc_7942F:
push 20h ; ' '
pop rax
loc_79432:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79441:
mov rcx, [rsp+0A8h+var_80]
jmp short loc_7945D
loc_79448:
mov ebx, eax
lea rdi, [rsp+0A8h+var_58]
call bf_delete_0
mov eax, ebx
jmp short loc_79432
loc_79458:
mov rcx, [rsp+0A8h+var_A0]
loc_7945D:
mov rax, [rsp+0A8h+var_78]
mov [rax], rcx
xor eax, eax
jmp short loc_79432
| long long bf_convert_to_radix(
long long *a1,
unsigned long long *a2,
long long a3,
signed int a4,
long long a5,
int a6,
int a7)
{
unsigned long long v9; // rbx
unsigned long long v11; // rax
unsigned long long v12; // rdx
unsigned long long v13; // rax
long long v14; // r15
long long i; // rbp
long long v16; // r13
char v17; // bl
char v18; // al
char v19; // al
unsigned int v20; // eax
int v21; // ebx
unsigned long long v22; // rcx
unsigned int v23; // ebx
unsigned long long v25; // [rsp+8h] [rbp-A0h]
unsigned long long v27; // [rsp+18h] [rbp-90h]
unsigned long long v28; // [rsp+20h] [rbp-88h]
unsigned long long v29; // [rsp+28h] [rbp-80h]
unsigned long long v30; // [rsp+38h] [rbp-70h]
unsigned long long v31; // [rsp+40h] [rbp-68h]
long long v32; // [rsp+48h] [rbp-60h]
long long v33; // [rsp+50h] [rbp-58h] BYREF
int v34; // [rsp+58h] [rbp-50h]
unsigned long long v35; // [rsp+60h] [rbp-48h]
__int128 v36; // [rsp+68h] [rbp-40h]
if ( !*(_QWORD *)(a3 + 24) )
{
*a2 = 0LL;
return bf_set((long long)a1, a3);
}
if ( a7 )
v9 = *a2;
else
v9 = bf_mul_log2_radix(*(_QWORD *)(a3 + 16) - 1LL, a4, 1, 0) + 1;
v31 = bf_mul_log2_radix(a5, a4, 0, 1);
v27 = a4;
v11 = 64LL;
v29 = v9;
v30 = a5;
while ( 2 )
{
v25 = v9;
v12 = v9 - a5;
v32 = a5 - v9;
if ( (long long)(v9 - a5) < 0 )
v12 = a5 - v9;
v28 = v12;
if ( v12 != 1 )
{
_BitScanReverse64(&v13, v12 - 1);
v11 = v13 ^ 0x3F;
}
v14 = 129 - 2 * v11;
if ( v12 < 2 )
v14 = 1LL;
for ( i = 16LL; ; i += i / 2 )
{
v16 = v31 + i + v14;
v17 = bf_pow_ui_ui(a1, v27, v28, v16, 0x7E0u);
if ( v32 < 0 )
v18 = bf_div((__int128 *)a1, (__int128 *)a3, (__int128 *)a1, v16, 2016LL);
else
v18 = bf_mul(a1, a1, (long long *)a3, v16, 0x7E0u);
v19 = v17 | v18;
if ( (v19 & 0x20) != 0 )
return 32LL;
if ( (v19 & 0x10) == 0 || bf_can_round(a1, a1[2], a6, v31 + i) )
break;
}
if ( (bf_rint((long long)a1, a6) & 0x20) != 0 )
return 32LL;
if ( a7 )
{
v22 = v29;
}
else
{
v33 = *a1;
v34 = 0;
v35 = 0x8000000000000000LL;
v36 = 0LL;
a5 = v30;
v20 = bf_pow_ui_ui(&v33, v27, v30, 0x3FFFFFFFFFFFFFFFLL, 1u);
if ( v20 )
{
v23 = v20;
bf_delete_0(&v33);
return v23;
}
v21 = bf_cmpu(a1, &v33);
bf_delete_0(&v33);
if ( v21 >= 0 )
{
v9 = v25 + 1;
v11 = 64LL;
continue;
}
v22 = v25;
}
break;
}
*a2 = v22;
return 0LL;
}
| bf_convert_to_radix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RSP],R9D
MOV R12,RDI
CMP qword ptr [RDX + 0x18],0x0
JZ 0x0017924c
MOV R14,R8
MOV EBP,ECX
MOV EAX,dword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0x4],EAX
TEST EAX,EAX
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x10],RDX
JZ 0x00179269
MOV RBX,qword ptr [RSI]
JMP 0x00179282
LAB_0017924c:
AND qword ptr [RSI],0x0
MOV RDI,R12
MOV RSI,RDX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016f666
LAB_00179269:
MOV RDI,qword ptr [RDX + 0x10]
DEC RDI
PUSH 0x1
POP RDX
MOV ESI,EBP
XOR ECX,ECX
CALL 0x001733a5
MOV RBX,RAX
INC RBX
LAB_00179282:
PUSH 0x1
POP RCX
MOV RDI,R14
MOV ESI,EBP
XOR EDX,EDX
CALL 0x001733a5
MOV qword ptr [RSP + 0x40],RAX
MOVSXD RAX,EBP
MOV qword ptr [RSP + 0x18],RAX
PUSH 0x40
POP RAX
MOV qword ptr [RSP + 0x28],RBX
MOV qword ptr [RSP + 0x38],R14
LAB_001792ab:
MOV RCX,R14
MOV qword ptr [RSP + 0x8],RBX
SUB RCX,RBX
MOV RDX,RCX
NEG RDX
MOV qword ptr [RSP + 0x48],RCX
CMOVS RDX,RCX
MOV qword ptr [RSP + 0x20],RDX
MOV RCX,RDX
DEC RCX
JZ 0x001792da
BSR RAX,RCX
XOR RAX,0x3f
LAB_001792da:
ADD RAX,RAX
MOV R15D,0x81
SUB R15,RAX
CMP qword ptr [RSP + 0x20],0x2
PUSH 0x1
POP RAX
CMOVC R15,RAX
PUSH 0x10
POP RBP
LAB_001792f6:
MOV RAX,qword ptr [RSP + 0x40]
LEA R14,[RAX + RBP*0x1]
LEA R13,[R14 + R15*0x1]
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,R13
MOV R8D,0x7e0
CALL 0x00172a1f
MOV EBX,EAX
CMP qword ptr [RSP + 0x48],0x0
JS 0x00179343
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,R13
MOV R8D,0x7e0
CALL 0x00170da9
JMP 0x0017935c
LAB_00179343:
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R12
MOV RCX,R13
MOV R8D,0x7e0
CALL 0x00171cf2
LAB_0017935c:
OR EAX,EBX
TEST AL,0x20
JNZ 0x0017942f
TEST AL,0x10
JZ 0x00179394
MOV RSI,qword ptr [R12 + 0x10]
MOV RDI,R12
MOV EDX,dword ptr [RSP]
MOV RCX,R14
CALL 0x0016fb30
TEST EAX,EAX
JNZ 0x00179394
MOV RAX,RBP
CQO
PUSH 0x2
POP RCX
IDIV RCX
ADD RBP,RAX
JMP 0x001792f6
LAB_00179394:
MOV RDI,R12
MOV ESI,dword ptr [RSP]
CALL 0x00171c3d
TEST AL,0x20
JNZ 0x0017942f
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00179441
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x50],RAX
AND dword ptr [RSP + 0x58],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RSP + 0x60],RAX
LEA RAX,[RSP + 0x68]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
LEA R15,[RSP + 0x50]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
MOV R14,qword ptr [RSP + 0x38]
MOV RDX,R14
MOV RCX,0x3fffffffffffffff
PUSH 0x1
POP R8
CALL 0x00172a1f
TEST EAX,EAX
JNZ 0x00179448
MOV RDI,R12
MOV RSI,R15
CALL 0x0016fd66
MOV EBX,EAX
MOV RDI,R15
CALL 0x0017145e
TEST EBX,EBX
JS 0x00179458
MOV RBX,qword ptr [RSP + 0x8]
INC RBX
PUSH 0x40
POP RAX
JMP 0x001792ab
LAB_0017942f:
PUSH 0x20
POP RAX
LAB_00179432:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179441:
MOV RCX,qword ptr [RSP + 0x28]
JMP 0x0017945d
LAB_00179448:
MOV EBX,EAX
LEA RDI,[RSP + 0x50]
CALL 0x0017145e
MOV EAX,EBX
JMP 0x00179432
LAB_00179458:
MOV RCX,qword ptr [RSP + 0x8]
LAB_0017945d:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX],RCX
XOR EAX,EAX
JMP 0x00179432
|
ulong bf_convert_to_radix(int8 *param_1,long *param_2,long param_3,int param_4,long param_5,
int4 param_6,int param_7)
{
long lVar1;
uint uVar2;
uint uVar3;
int iVar4;
long lVar5;
long lVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
long lVar12;
long lVar13;
int8 uStack_58;
int4 uStack_50;
int8 uStack_48;
int8 uStack_40;
int8 uStack_38;
if (*(long *)(param_3 + 0x18) == 0) {
*param_2 = 0;
uVar7 = bf_set(param_1,param_3);
return uVar7;
}
if (param_7 == 0) {
lVar5 = bf_mul_log2_radix(*(long *)(param_3 + 0x10) + -1,param_4,1,0);
lVar5 = lVar5 + 1;
}
else {
lVar5 = *param_2;
}
lVar6 = bf_mul_log2_radix(param_5,param_4,0,1);
lVar12 = lVar5;
while( true ) {
uVar7 = 0x40;
uVar8 = param_5 - lVar12;
uVar11 = -uVar8;
if (0 < (long)uVar8) {
uVar11 = uVar8;
}
uVar9 = uVar11 - 1;
if (uVar9 != 0) {
uVar7 = 0x3f;
if (uVar9 != 0) {
for (; uVar9 >> uVar7 == 0; uVar7 = uVar7 - 1) {
}
}
uVar7 = uVar7 ^ 0x3f;
}
lVar10 = uVar7 * -2 + 0x81;
if (uVar11 < 2) {
lVar10 = 1;
}
lVar13 = 0x10;
while( true ) {
lVar1 = lVar6 + lVar13 + lVar10;
uVar2 = bf_pow_ui_ui(param_1,(long)param_4,uVar11,lVar1,0x7e0);
if ((long)uVar8 < 0) {
uVar3 = bf_div(param_1,param_3,param_1,lVar1,0x7e0);
}
else {
uVar3 = bf_mul(param_1,param_1,param_3,lVar1,0x7e0);
}
if (((uVar3 | uVar2) & 0x20) != 0) {
return 0x20;
}
if ((((uVar3 | uVar2) & 0x10) == 0) ||
(iVar4 = bf_can_round(param_1,param_1[2],param_6,lVar6 + lVar13), iVar4 != 0)) break;
lVar13 = lVar13 + lVar13 / 2;
}
uVar7 = bf_rint(param_1,param_6);
if ((uVar7 & 0x20) != 0) {
return 0x20;
}
lVar10 = lVar5;
if (param_7 != 0) break;
uStack_58 = *param_1;
uStack_50 = 0;
uStack_48 = 0x8000000000000000;
uStack_40 = 0;
uStack_38 = 0;
uVar2 = bf_pow_ui_ui(&uStack_58,(long)param_4,param_5,0x3fffffffffffffff,1);
if (uVar2 != 0) {
bf_delete(&uStack_58);
return (ulong)uVar2;
}
iVar4 = bf_cmpu(param_1,&uStack_58);
bf_delete(&uStack_58);
lVar10 = lVar12;
if (iVar4 < 0) break;
lVar12 = lVar12 + 1;
}
*param_2 = lVar10;
return 0;
}
| |
28,306 | 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 0x57ffe
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x58006
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 0x25260
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x580f0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x58043
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x58045
jmp 0x58047
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x58059
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5805b
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 0x526b0
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x580df
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x580df
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 0x58290
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_57FFE
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_58006
loc_57FFE:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_58006:
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_58043
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_58043:
jmp short $+2
loc_58045:
jmp short $+2
loc_58047:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_58059
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_58059:
jmp short $+2
loc_5805B:
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_580DF
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_580DF
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_1
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_580DF:
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_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176));
return a3;
}
return v11;
}
| my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00157ffe
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00158006
LAB_00157ffe:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_00158006:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00125260
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001580f0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x00158043
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_00158043:
JMP 0x00158045
LAB_00158045:
JMP 0x00158047
LAB_00158047:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00158059
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_00158059:
JMP 0x0015805b
LAB_0015805b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x38]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001526b0
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001580df
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001580df
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00158290
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_001580df:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
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,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0));
local_40 = param_3;
}
return local_40;
}
| |
28,307 | my_strnxfrm_tis620 | eloqsql/strings/ctype-tis620.c | static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
} | O3 | c | my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq %r9, %rdx
cmovbq %rdx, %r13
movq %rsi, %rdi
movq %r8, %rsi
movq %r13, %rdx
callq 0x24290
movq %r14, %rdi
movq %r13, %rsi
callq 0x43eef
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 0x40c58
testb %r12b, %r12b
jns 0x43ee0
movq %rbx, %rdx
subq %rax, %rdx
jbe 0x43ee0
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_43EE0
mov rdx, rbx
sub rdx, rax
jbe short loc_43EE0
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_43EE0:
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);
thai2sortable(a2, v7);
v10 = a4;
if ( a4 >= a3 )
v10 = a3;
if ( v7 >= v10 )
v7 = v10;
result = my_strxfrm_pad_desc_and_reverse(a1, a2, a2 + v7, a2 + v10, (int)v10 - (int)v7, a7, 0);
if ( (a7 & 0x80u) != 0 && a3 > result )
{
(*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
result + a2,
a3 - result,
*(unsigned __int8 *)(a1 + 176));
return a3;
}
return result;
}
| my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R9
MOV R12D,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP RDX,R9
CMOVC R13,RDX
MOV RDI,RSI
MOV RSI,R8
MOV RDX,R13
CALL 0x00124290
MOV RDI,R14
MOV RSI,R13
CALL 0x00143eef
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 0x00140c58
TEST R12B,R12B
JNS 0x00143ee0
MOV RDX,RBX
SUB RDX,RAX
JBE 0x00143ee0
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_00143ee0:
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;
}
| |
28,308 | mysql_server_end | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void STDCALL mysql_server_end(void)
{
if (!mysql_client_init)
return;
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0);
if (ma_init_done)
ma_end(0);
#ifdef HAVE_TLS
ma_pvio_tls_end();
#endif
mysql_client_init= 0;
ma_init_done= 0;
#ifdef WIN32
init_once = (INIT_ONCE)INIT_ONCE_STATIC_INIT;
#else
init_once = (pthread_once_t)PTHREAD_ONCE_INIT;
#endif
} | O0 | c | mysql_server_end:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x3f199(%rip) # 0x656d4
jne 0x2653f
jmp 0x26593
movb $0x0, %al
callq 0x4b510
movb $0x0, %al
callq 0x3a160
leaq 0x3f184(%rip), %rax # 0x656d8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x27480
leaq 0x3f17c(%rip), %rax # 0x656e1
cmpb $0x0, (%rax)
je 0x26571
xorl %edi, %edi
callq 0x29a50
movb $0x0, %al
callq 0x28a40
movb $0x0, 0x3f155(%rip) # 0x656d4
leaq 0x3f15b(%rip), %rax # 0x656e1
movb $0x0, (%rax)
movl $0x0, 0x3f13d(%rip) # 0x656d0
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_server_end:
push rbp
mov rbp, rsp
cmp cs:mysql_client_init, 0
jnz short loc_2653F
jmp short loc_26593
loc_2653F:
mov al, 0
call release_configuration_dirs
mov al, 0
call mysql_client_plugin_deinit
lea rax, pvio_callback
mov rdi, [rax]
xor esi, esi
call list_free
lea rax, ma_init_done
cmp byte ptr [rax], 0
jz short loc_26571
xor edi, edi
call ma_end
loc_26571:
mov al, 0
call ma_pvio_tls_end
mov cs:mysql_client_init, 0
lea rax, ma_init_done
mov byte ptr [rax], 0
mov cs:init_once, 0
loc_26593:
pop rbp
retn
| void *mysql_server_end()
{
void *result; // rax
if ( mysql_client_init )
{
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0LL);
if ( ma_init_done )
ma_end(0LL);
ma_pvio_tls_end();
mysql_client_init = 0;
result = &ma_init_done;
ma_init_done = 0;
init_once = 0;
}
return result;
}
| mysql_server_end:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [0x001656d4],0x0
JNZ 0x0012653f
JMP 0x00126593
LAB_0012653f:
MOV AL,0x0
CALL 0x0014b510
MOV AL,0x0
CALL 0x0013a160
LEA RAX,[0x1656d8]
MOV RDI,qword ptr [RAX]
XOR ESI,ESI
CALL 0x00127480
LEA RAX,[0x1656e1]
CMP byte ptr [RAX],0x0
JZ 0x00126571
XOR EDI,EDI
CALL 0x00129a50
LAB_00126571:
MOV AL,0x0
CALL 0x00128a40
MOV byte ptr [0x001656d4],0x0
LEA RAX,[0x1656e1]
MOV byte ptr [RAX],0x0
MOV dword ptr [0x001656d0],0x0
LAB_00126593:
POP RBP
RET
|
void mysql_server_end(void)
{
if (mysql_client_init != '\0') {
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback,0);
if (ma_init_done != '\0') {
ma_end(0);
}
ma_pvio_tls_end();
mysql_client_init = '\0';
ma_init_done = '\0';
init_once = 0;
}
return;
}
| |
28,309 | mysql_server_end | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void STDCALL mysql_server_end(void)
{
if (!mysql_client_init)
return;
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0);
if (ma_init_done)
ma_end(0);
#ifdef HAVE_TLS
ma_pvio_tls_end();
#endif
mysql_client_init= 0;
ma_init_done= 0;
#ifdef WIN32
init_once = (INIT_ONCE)INIT_ONCE_STATIC_INIT;
#else
init_once = (pthread_once_t)PTHREAD_ONCE_INIT;
#endif
} | O3 | c | mysql_server_end:
cmpb $0x1, 0x2ddb8(%rip) # 0x4d1e4
jne 0x1f489
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
callq 0x349ac
xorl %eax, %eax
callq 0x2a322
leaq 0x2dd9e(%rip), %rax # 0x4d1e8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1fc97
leaq 0x2dd96(%rip), %rbx # 0x4d1f1
cmpb $0x0, (%rbx)
je 0x1f467
xorl %edi, %edi
callq 0x21011
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20790
movb %r14b, 0x2dd6c(%rip) # 0x4d1e4
movb %r14b, (%rbx)
movl $0x0, 0x2dd5b(%rip) # 0x4d1e0
popq %rbx
popq %r14
popq %rbp
retq
| mysql_server_end:
cmp cs:mysql_client_init, 1
jnz short locret_1F489
push rbp
mov rbp, rsp
push r14
push rbx
xor eax, eax
call release_configuration_dirs
xor eax, eax
call mysql_client_plugin_deinit
lea rax, pvio_callback
mov rdi, [rax]
xor esi, esi
call list_free
lea rbx, ma_init_done
cmp byte ptr [rbx], 0
jz short loc_1F467
xor edi, edi
call ma_end
loc_1F467:
xor r14d, r14d
xor eax, eax
call ma_pvio_tls_end
mov cs:mysql_client_init, r14b
mov [rbx], r14b
mov cs:init_once, 0
pop rbx
pop r14
pop rbp
locret_1F489:
retn
| long long mysql_server_end()
{
long long result; // rax
if ( mysql_client_init == 1 )
{
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0LL);
if ( ma_init_done )
ma_end(0LL);
result = ma_pvio_tls_end();
mysql_client_init = 0;
ma_init_done = 0;
init_once = 0;
}
return result;
}
| mysql_server_end:
CMP byte ptr [0x0014d1e4],0x1
JNZ 0x0011f489
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
XOR EAX,EAX
CALL 0x001349ac
XOR EAX,EAX
CALL 0x0012a322
LEA RAX,[0x14d1e8]
MOV RDI,qword ptr [RAX]
XOR ESI,ESI
CALL 0x0011fc97
LEA RBX,[0x14d1f1]
CMP byte ptr [RBX],0x0
JZ 0x0011f467
XOR EDI,EDI
CALL 0x00121011
LAB_0011f467:
XOR R14D,R14D
XOR EAX,EAX
CALL 0x00120790
MOV byte ptr [0x0014d1e4],R14B
MOV byte ptr [RBX],R14B
MOV dword ptr [0x0014d1e0],0x0
POP RBX
POP R14
POP RBP
LAB_0011f489:
RET
|
void mysql_server_end(void)
{
if (mysql_client_init == '\x01') {
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback,0);
if (ma_init_done != '\0') {
ma_end(0);
}
ma_pvio_tls_end();
mysql_client_init = '\0';
ma_init_done = '\0';
init_once = 0;
}
return;
}
| |
28,310 | scan_one_character | eloqsql/strings/ctype.c | static size_t
scan_one_character(const char *s, const char *e, my_wc_t *wc)
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
if (s >= e)
return 0;
/* Escape sequence: \uXXXX */
if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2]))
{
size_t len= 3; /* We have at least one digit */
for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++)
{
}
wc[0]= 0;
return len;
}
else if ((int8) s[0] > 0) /* 7-bit character */
{
wc[0]= 0;
return 1;
}
else /* Non-escaped character */
{
int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e);
if (rc > 0)
return (size_t) rc;
}
return 0;
} | O0 | c | scan_one_character:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x314c15(%rip), %rax # 0x388cc0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x740c6
movq $0x0, -0x8(%rbp)
jmp 0x741f8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x74197
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jae 0x74197
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x74197
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x74197
movq $0x3, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x35(%rbp)
jae 0x7415d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x74166
jmp 0x74182
jmp 0x74168
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7412c
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x741f8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jle 0x741b8
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x741f8
movq -0x28(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x741ec
movslq -0x34(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x741f8
jmp 0x741ee
jmp 0x741f0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| scan_one_character:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_740C6
mov [rbp+var_8], 0
jmp loc_741F8
loc_740C6:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_74197
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jnb loc_74197
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_74197
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_74197
mov [rbp+var_30], 3
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_7412C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_35], al
jnb short loc_7415D
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
setnz al
mov [rbp+var_35], al
loc_7415D:
mov al, [rbp+var_35]
test al, 1
jnz short loc_74166
jmp short loc_74182
loc_74166:
jmp short $+2
loc_74168:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_7412C
loc_74182:
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_741F8
loc_74197:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jle short loc_741B8
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_8], 1
jmp short loc_741F8
loc_741B8:
mov rax, [rbp+var_28]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
call rax
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jle short loc_741EC
movsxd rax, [rbp+var_34]
mov [rbp+var_8], rax
jmp short loc_741F8
loc_741EC:
jmp short $+2
loc_741EE:
jmp short $+2
loc_741F0:
mov [rbp+var_8], 0
loc_741F8:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3)
{
bool v4; // [rsp+Bh] [rbp-35h]
int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned __int8 *i; // [rsp+30h] [rbp-10h]
if ( (unsigned long long)a1 >= a2 )
return 0LL;
if ( *a1 == 92
&& (unsigned long long)(a1 + 2) < a2
&& a1[1] == 117
&& (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 )
{
v6 = 3LL;
for ( i = (unsigned __int8 *)(a1 + 3); ; ++i )
{
v4 = 0;
if ( (unsigned long long)i < a2 )
v4 = (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *i + 1LL) & 0x80) != 0;
if ( !v4 )
break;
++v6;
}
*a3 = 0LL;
return v6;
}
else if ( *a1 <= 0 )
{
v5 = (*(long long ( **)(unsigned int *, _QWORD *, char *, unsigned long long))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
a3,
a1,
a2);
if ( v5 <= 0 )
return 0LL;
else
return v5;
}
else
{
*a3 = 0LL;
return 1LL;
}
}
| scan_one_character:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[0x488cc0]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x001740c6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001741f8
LAB_001740c6:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x00174197
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00174197
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x00174197
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00174197
MOV qword ptr [RBP + -0x30],0x3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0017412c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x35],AL
JNC 0x0017415d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_0017415d:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x00174166
JMP 0x00174182
LAB_00174166:
JMP 0x00174168
LAB_00174168:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017412c
LAB_00174182:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001741f8
LAB_00174197:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JLE 0x001741b8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x1
JMP 0x001741f8
LAB_001741b8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JLE 0x001741ec
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001741f8
LAB_001741ec:
JMP 0x001741ee
LAB_001741ee:
JMP 0x001741f0
LAB_001741f0:
MOV qword ptr [RBP + -0x8],0x0
LAB_001741f8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3)
{
int iVar1;
bool bVar2;
long local_38;
byte *local_18;
long local_10;
if (param_1 < param_2) {
if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) &&
((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) {
local_38 = 3;
local_18 = param_1 + 3;
while( true ) {
bVar2 = false;
if (local_18 < param_2) {
bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) !=
0;
}
if (!bVar2) break;
local_18 = local_18 + 1;
local_38 = local_38 + 1;
}
*param_3 = 0;
local_10 = local_38;
}
else if ((char)*param_1 < '\x01') {
iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,param_3,param_1,param_2);
if (iVar1 < 1) {
local_10 = 0;
}
else {
local_10 = (long)iVar1;
}
}
else {
*param_3 = 0;
local_10 = 1;
}
}
else {
local_10 = 0;
}
return local_10;
}
| |
28,311 | func_uni_big5_onechar | eloqsql/strings/ctype-big5.c | static int func_uni_big5_onechar(int code){
if ((code>=0x00A2)&&(code<=0x00F7))
return(tab_uni_big50[code-0x00A2]);
if ((code>=0x02C7)&&(code<=0x0451))
return(tab_uni_big51[code-0x02C7]);
if ((code>=0x2013)&&(code<=0x22BF))
return(tab_uni_big52[code-0x2013]);
if ((code>=0x2460)&&(code<=0x2642))
return(tab_uni_big53[code-0x2460]);
if ((code>=0x3000)&&(code<=0x3129))
return(tab_uni_big54[code-0x3000]);
if ((code>=0x32A3)&&(code<=0x32A3))
return(tab_uni_big55[code-0x32A3]);
if ((code>=0x338E)&&(code<=0x33D5))
return(tab_uni_big56[code-0x338E]);
if ((code>=0x4E00)&&(code<=0x9483))
return(tab_uni_big57[code-0x4E00]);
if ((code>=0x9577)&&(code<=0x9FA4))
return(tab_uni_big58[code-0x9577]);
if ((code>=0xFA0C)&&(code<=0xFA0D))
return(tab_uni_big59[code-0xFA0C]);
if ((code>=0xFE30)&&(code<=0xFFFD))
return(tab_uni_big510[code-0xFE30]);
return(0);
} | O0 | c | func_uni_big5_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa2, -0x8(%rbp)
jl 0x3daf7
cmpl $0xf7, -0x8(%rbp)
jg 0x3daf7
movl -0x8(%rbp), %eax
subl $0xa2, %eax
movslq %eax, %rcx
leaq 0x55df5(%rip), %rax # 0x938e0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7
jl 0x3db27
cmpl $0x451, -0x8(%rbp) # imm = 0x451
jg 0x3db27
movl -0x8(%rbp), %eax
subl $0x2c7, %eax # imm = 0x2C7
movslq %eax, %rcx
leaq 0x55e75(%rip), %rax # 0x93990
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x2013, -0x8(%rbp) # imm = 0x2013
jl 0x3db57
cmpl $0x22bf, -0x8(%rbp) # imm = 0x22BF
jg 0x3db57
movl -0x8(%rbp), %eax
subl $0x2013, %eax # imm = 0x2013
movslq %eax, %rcx
leaq 0x56165(%rip), %rax # 0x93cb0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x2460, -0x8(%rbp) # imm = 0x2460
jl 0x3db87
cmpl $0x2642, -0x8(%rbp) # imm = 0x2642
jg 0x3db87
movl -0x8(%rbp), %eax
subl $0x2460, %eax # imm = 0x2460
movslq %eax, %rcx
leaq 0x56695(%rip), %rax # 0x94210
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x3000, -0x8(%rbp) # imm = 0x3000
jl 0x3dbb7
cmpl $0x3129, -0x8(%rbp) # imm = 0x3129
jg 0x3dbb7
movl -0x8(%rbp), %eax
subl $0x3000, %eax # imm = 0x3000
movslq %eax, %rcx
leaq 0x56a35(%rip), %rax # 0x945e0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jl 0x3dbe7
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jg 0x3dbe7
movl -0x8(%rbp), %eax
subl $0x32a3, %eax # imm = 0x32A3
movslq %eax, %rcx
leaq 0x56c59(%rip), %rax # 0x94834
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x338e, -0x8(%rbp) # imm = 0x338E
jl 0x3dc17
cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5
jg 0x3dc17
movl -0x8(%rbp), %eax
subl $0x338e, %eax # imm = 0x338E
movslq %eax, %rcx
leaq 0x56c35(%rip), %rax # 0x94840
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00
jl 0x3dc47
cmpl $0x9483, -0x8(%rbp) # imm = 0x9483
jg 0x3dc47
movl -0x8(%rbp), %eax
subl $0x4e00, %eax # imm = 0x4E00
movslq %eax, %rcx
leaq 0x56c95(%rip), %rax # 0x948d0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0x9577, -0x8(%rbp) # imm = 0x9577
jl 0x3dc74
cmpl $0x9fa4, -0x8(%rbp) # imm = 0x9FA4
jg 0x3dc74
movl -0x8(%rbp), %eax
subl $0x9577, %eax # imm = 0x9577
movslq %eax, %rcx
leaq 0x5f975(%rip), %rax # 0x9d5e0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0xfa0c, -0x8(%rbp) # imm = 0xFA0C
jl 0x3dca1
cmpl $0xfa0d, -0x8(%rbp) # imm = 0xFA0D
jg 0x3dca1
movl -0x8(%rbp), %eax
subl $0xfa0c, %eax # imm = 0xFA0C
movslq %eax, %rcx
leaq 0x60da4(%rip), %rax # 0x9ea3c
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30
jl 0x3dcce
cmpl $0xfffd, -0x8(%rbp) # imm = 0xFFFD
jg 0x3dcce
movl -0x8(%rbp), %eax
subl $0xfe30, %eax # imm = 0xFE30
movslq %eax, %rcx
leaq 0x60d7b(%rip), %rax # 0x9ea40
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dcd5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| func_uni_big5_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 0A2h
jl short loc_3DAF7
cmp [rbp+var_8], 0F7h
jg short loc_3DAF7
mov eax, [rbp+var_8]
sub eax, 0A2h
movsxd rcx, eax
lea rax, tab_uni_big50
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DAF7:
cmp [rbp+var_8], 2C7h
jl short loc_3DB27
cmp [rbp+var_8], 451h
jg short loc_3DB27
mov eax, [rbp+var_8]
sub eax, 2C7h
movsxd rcx, eax
lea rax, tab_uni_big51
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DB27:
cmp [rbp+var_8], 2013h
jl short loc_3DB57
cmp [rbp+var_8], 22BFh
jg short loc_3DB57
mov eax, [rbp+var_8]
sub eax, 2013h
movsxd rcx, eax
lea rax, tab_uni_big52
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DB57:
cmp [rbp+var_8], 2460h
jl short loc_3DB87
cmp [rbp+var_8], 2642h
jg short loc_3DB87
mov eax, [rbp+var_8]
sub eax, 2460h
movsxd rcx, eax
lea rax, tab_uni_big53
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DB87:
cmp [rbp+var_8], 3000h
jl short loc_3DBB7
cmp [rbp+var_8], 3129h
jg short loc_3DBB7
mov eax, [rbp+var_8]
sub eax, 3000h
movsxd rcx, eax
lea rax, tab_uni_big54
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DBB7:
cmp [rbp+var_8], 32A3h
jl short loc_3DBE7
cmp [rbp+var_8], 32A3h
jg short loc_3DBE7
mov eax, [rbp+var_8]
sub eax, 32A3h
movsxd rcx, eax
lea rax, tab_uni_big55
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DBE7:
cmp [rbp+var_8], 338Eh
jl short loc_3DC17
cmp [rbp+var_8], 33D5h
jg short loc_3DC17
mov eax, [rbp+var_8]
sub eax, 338Eh
movsxd rcx, eax
lea rax, tab_uni_big56
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DC17:
cmp [rbp+var_8], 4E00h
jl short loc_3DC47
cmp [rbp+var_8], 9483h
jg short loc_3DC47
mov eax, [rbp+var_8]
sub eax, 4E00h
movsxd rcx, eax
lea rax, tab_uni_big57
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_3DCD5
loc_3DC47:
cmp [rbp+var_8], 9577h
jl short loc_3DC74
cmp [rbp+var_8], 9FA4h
jg short loc_3DC74
mov eax, [rbp+var_8]
sub eax, 9577h
movsxd rcx, eax
lea rax, tab_uni_big58
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_3DCD5
loc_3DC74:
cmp [rbp+var_8], 0FA0Ch
jl short loc_3DCA1
cmp [rbp+var_8], 0FA0Dh
jg short loc_3DCA1
mov eax, [rbp+var_8]
sub eax, 0FA0Ch
movsxd rcx, eax
lea rax, tab_uni_big59
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_3DCD5
loc_3DCA1:
cmp [rbp+var_8], 0FE30h
jl short loc_3DCCE
cmp [rbp+var_8], 0FFFDh
jg short loc_3DCCE
mov eax, [rbp+var_8]
sub eax, 0FE30h
movsxd rcx, eax
lea rax, tab_uni_big510
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_3DCD5
loc_3DCCE:
mov [rbp+var_4], 0
loc_3DCD5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long func_uni_big5_onechar(int a1)
{
if ( a1 < 162 || a1 > 247 )
{
if ( a1 < 711 || a1 > 1105 )
{
if ( a1 < 8211 || a1 > 8895 )
{
if ( a1 < 9312 || a1 > 9794 )
{
if ( a1 < 12288 || a1 > 12585 )
{
if ( a1 == 12963 )
{
return tab_uni_big55;
}
else if ( a1 < 13198 || a1 > 13269 )
{
if ( a1 < 19968 || a1 > 38019 )
{
if ( a1 < 38263 || a1 > 40868 )
{
if ( a1 < 64012 || a1 > 64013 )
{
if ( a1 < 65072 || a1 > 65533 )
return 0;
else
return tab_uni_big510[a1 - 65072];
}
else
{
return tab_uni_big59[a1 - 64012];
}
}
else
{
return tab_uni_big58[a1 - 38263];
}
}
else
{
return tab_uni_big57[a1 - 19968];
}
}
else
{
return tab_uni_big56[a1 - 13198];
}
}
else
{
return tab_uni_big54[a1 - 12288];
}
}
else
{
return tab_uni_big53[a1 - 9312];
}
}
else
{
return tab_uni_big52[a1 - 8211];
}
}
else
{
return tab_uni_big51[a1 - 711];
}
}
else
{
return tab_uni_big50[a1 - 162];
}
}
| func_uni_big5_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0xa2
JL 0x0013daf7
CMP dword ptr [RBP + -0x8],0xf7
JG 0x0013daf7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xa2
MOVSXD RCX,EAX
LEA RAX,[0x1938e0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013daf7:
CMP dword ptr [RBP + -0x8],0x2c7
JL 0x0013db27
CMP dword ptr [RBP + -0x8],0x451
JG 0x0013db27
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2c7
MOVSXD RCX,EAX
LEA RAX,[0x193990]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013db27:
CMP dword ptr [RBP + -0x8],0x2013
JL 0x0013db57
CMP dword ptr [RBP + -0x8],0x22bf
JG 0x0013db57
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2013
MOVSXD RCX,EAX
LEA RAX,[0x193cb0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013db57:
CMP dword ptr [RBP + -0x8],0x2460
JL 0x0013db87
CMP dword ptr [RBP + -0x8],0x2642
JG 0x0013db87
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2460
MOVSXD RCX,EAX
LEA RAX,[0x194210]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013db87:
CMP dword ptr [RBP + -0x8],0x3000
JL 0x0013dbb7
CMP dword ptr [RBP + -0x8],0x3129
JG 0x0013dbb7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3000
MOVSXD RCX,EAX
LEA RAX,[0x1945e0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dbb7:
CMP dword ptr [RBP + -0x8],0x32a3
JL 0x0013dbe7
CMP dword ptr [RBP + -0x8],0x32a3
JG 0x0013dbe7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x32a3
MOVSXD RCX,EAX
LEA RAX,[0x194834]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dbe7:
CMP dword ptr [RBP + -0x8],0x338e
JL 0x0013dc17
CMP dword ptr [RBP + -0x8],0x33d5
JG 0x0013dc17
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x338e
MOVSXD RCX,EAX
LEA RAX,[0x194840]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dc17:
CMP dword ptr [RBP + -0x8],0x4e00
JL 0x0013dc47
CMP dword ptr [RBP + -0x8],0x9483
JG 0x0013dc47
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x4e00
MOVSXD RCX,EAX
LEA RAX,[0x1948d0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dc47:
CMP dword ptr [RBP + -0x8],0x9577
JL 0x0013dc74
CMP dword ptr [RBP + -0x8],0x9fa4
JG 0x0013dc74
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x9577
MOVSXD RCX,EAX
LEA RAX,[0x19d5e0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dc74:
CMP dword ptr [RBP + -0x8],0xfa0c
JL 0x0013dca1
CMP dword ptr [RBP + -0x8],0xfa0d
JG 0x0013dca1
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfa0c
MOVSXD RCX,EAX
LEA RAX,[0x19ea3c]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dca1:
CMP dword ptr [RBP + -0x8],0xfe30
JL 0x0013dcce
CMP dword ptr [RBP + -0x8],0xfffd
JG 0x0013dcce
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfe30
MOVSXD RCX,EAX
LEA RAX,[0x19ea40]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013dcd5
LAB_0013dcce:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013dcd5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_uni_big5_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0xa2) || (0xf7 < param_1)) {
if ((param_1 < 0x2c7) || (0x451 < param_1)) {
if ((param_1 < 0x2013) || (0x22bf < param_1)) {
if ((param_1 < 0x2460) || (0x2642 < param_1)) {
if ((param_1 < 0x3000) || (0x3129 < param_1)) {
if ((param_1 < 0x32a3) || (0x32a3 < param_1)) {
if ((param_1 < 0x338e) || (0x33d5 < param_1)) {
if ((param_1 < 0x4e00) || (0x9483 < param_1)) {
if ((param_1 < 0x9577) || (0x9fa4 < param_1)) {
if ((param_1 < 0xfa0c) || (0xfa0d < param_1)) {
if ((param_1 < 0xfe30) || (0xfffd < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_uni_big510 + (long)(param_1 + -0xfe30) * 2);
}
}
else {
uVar1 = *(int2 *)((long)&tab_uni_big59 + (long)(param_1 + -0xfa0c) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big58 + (long)(param_1 + -0x9577) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big57 + (long)(param_1 + -0x4e00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big56 + (long)(param_1 + -0x338e) * 2);
}
}
else {
uVar1 = (&tab_uni_big55)[param_1 + -0x32a3];
}
}
else {
uVar1 = *(int2 *)(tab_uni_big54 + (long)(param_1 + -0x3000) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big53 + (long)(param_1 + -0x2460) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big52 + (long)(param_1 + -0x2013) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big51 + (long)(param_1 + -0x2c7) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big50 + (long)(param_1 + -0xa2) * 2);
}
return uVar1;
}
| |
28,312 | YogaTest_aspect_ratio_height_as_flex_basis_Test::~YogaTest_aspect_ratio_height_as_flex_basis_Test() | yoga-mod/tests/YGAspectRatioTest.cpp | TEST(YogaTest, aspect_ratio_height_as_flex_basis) {
YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetWidth(root, 200);
YGNodeStyleSetHeight(root, 200);
YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetHeight(root_child0, 50);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetAspectRatio(root_child0, 1);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child1 = YGNodeNew();
YGNodeStyleSetHeight(root_child1, 100);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetAspectRatio(root_child1, 1);
YGNodeInsertChild(root, root_child1, 1);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_EQ(75, YGNodeLayoutGetWidth(root_child0));
ASSERT_EQ(75, YGNodeLayoutGetHeight(root_child0));
ASSERT_EQ(75, YGNodeLayoutGetLeft(root_child1));
ASSERT_EQ(0, YGNodeLayoutGetTop(root_child1));
ASSERT_EQ(125, YGNodeLayoutGetWidth(root_child1));
ASSERT_EQ(125, YGNodeLayoutGetHeight(root_child1));
YGNodeFreeRecursive(root);
} | O0 | cpp | YogaTest_aspect_ratio_height_as_flex_basis_Test::~YogaTest_aspect_ratio_height_as_flex_basis_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x704850
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN47YogaTest_aspect_ratio_height_as_flex_basis_TestD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
call _ZN7testing4TestD2Ev; testing::Test::~Test()
add rsp, 10h
pop rbp
retn
| void YogaTest_aspect_ratio_height_as_flex_basis_Test::~YogaTest_aspect_ratio_height_as_flex_basis_Test(
YogaTest_aspect_ratio_height_as_flex_basis_Test *this)
{
testing::Test::~Test(this);
}
| ~YogaTest_aspect_ratio_height_as_flex_basis_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00804850
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_aspect_ratio_height_as_flex_basis_Test::~YogaTest_aspect_ratio_height_as_flex_basis_Test()
*/
void __thiscall
YogaTest_aspect_ratio_height_as_flex_basis_Test::~YogaTest_aspect_ratio_height_as_flex_basis_Test
(YogaTest_aspect_ratio_height_as_flex_basis_Test *this)
{
testing::Test::~Test((Test *)this);
return;
}
| |
28,313 | bchange | eloqsql/strings/bchange.c | void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
} | O3 | c | bchange:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %r8, %rdx
subq %rsi, %rdx
cmpq %rcx, %rsi
jae 0x69db6
leaq (%r15,%rdx), %rdi
addq %rbx, %rdi
addq %r15, %r8
movq %r8, %rsi
callq 0x69ddc
jmp 0x69dc2
leaq (%r15,%rbx), %rdi
addq %r15, %rsi
callq 0x286f0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x282f0
nop
| bchange:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rdi
mov rdx, r8
sub rdx, rsi
cmp rsi, rcx
jnb short loc_69DB6
lea rdi, [r15+rdx]
add rdi, rbx
add r8, r15
mov rsi, r8
call bmove_upp
jmp short loc_69DC2
loc_69DB6:
lea rdi, [r15+rbx]
add rsi, r15
call _memmove
loc_69DC2:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memcpy
| long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v7; // rdx
long long v8; // rcx
v7 = a5 - a2;
if ( a2 >= a4 )
memmove(a1 + a4, a1 + a2, v7);
else
bmove_upp(a4 + a1 + v7, a1 + a5);
return memcpy(a1, a3, a4, v8);
}
| bchange:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
MOV RDX,R8
SUB RDX,RSI
CMP RSI,RCX
JNC 0x00169db6
LEA RDI,[R15 + RDX*0x1]
ADD RDI,RBX
ADD R8,R15
MOV RSI,R8
CALL 0x00169ddc
JMP 0x00169dc2
LAB_00169db6:
LEA RDI,[R15 + RBX*0x1]
ADD RSI,R15
CALL 0x001286f0
LAB_00169dc2:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001282f0
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + (param_5 - param_2),param_5 + (long)param_1);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)(param_2 + (long)param_1),param_5 - param_2);
}
memcpy(param_1,param_3,param_4);
return;
}
| |
28,314 | lf_hash_init | eloqsql/mysys/lf_hash.cc | void lf_hash_init(LF_HASH *hash, uint element_size, uint flags,
uint key_offset, uint key_length, my_hash_get_key get_key,
CHARSET_INFO *charset)
{
lf_alloc_init(&hash->alloc, sizeof(LF_SLIST)+element_size,
offsetof(LF_SLIST, key));
lf_dynarray_init(&hash->array, sizeof(LF_SLIST *));
hash->size= 1;
hash->count= 0;
hash->element_size= element_size;
hash->flags= flags;
hash->charset= charset ? charset : &my_charset_bin;
hash->key_offset= key_offset;
hash->key_length= key_length;
hash->get_key= get_key;
hash->initializer= default_initializer;
hash->hash_function= calc_hash;
DBUG_ASSERT(get_key ? !key_offset && !key_length : key_length);
} | O3 | cpp | lf_hash_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x38(%rbp)
movl %r8d, -0x2c(%rbp)
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%rbp), %r15
addq $0x28, %rdi
leal 0x20(%rbx), %esi
movl $0x8, %edx
callq 0xa57c6
movq %r14, %rdi
movl $0x8, %esi
callq 0xa5a14
movl $0x1, 0xc0(%r14)
movl $0x0, 0xc4(%r14)
movl %ebx, 0xb8(%r14)
movl %r13d, 0xbc(%r14)
testq %r15, %r15
jne 0xa5c62
leaq 0x2e341e(%rip), %r15 # 0x389080
movq %r15, 0xa8(%r14)
movl %r12d, 0xb0(%r14)
movl -0x2c(%rbp), %eax
movl %eax, 0xb4(%r14)
movq -0x38(%rbp), %rax
movq %rax, 0x90(%r14)
leaq 0x24(%rip), %rax # 0xa5cb0
movq %rax, 0x98(%r14)
leaq 0x2f(%rip), %rax # 0xa5cc9
movq %rax, 0xa0(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lf_hash_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r9
mov [rbp+var_2C], r8d
mov r12d, ecx
mov r13d, edx
mov ebx, esi
mov r14, rdi
mov r15, [rbp+arg_0]
add rdi, 28h ; '('
lea esi, [rbx+20h]
mov edx, 8
call lf_alloc_init
mov rdi, r14
mov esi, 8
call lf_dynarray_init
mov dword ptr [r14+0C0h], 1
mov dword ptr [r14+0C4h], 0
mov [r14+0B8h], ebx
mov [r14+0BCh], r13d
test r15, r15
jnz short loc_A5C62
lea r15, my_charset_bin
loc_A5C62:
mov [r14+0A8h], r15
mov [r14+0B0h], r12d
mov eax, [rbp+var_2C]
mov [r14+0B4h], eax
mov rax, [rbp+var_38]
mov [r14+90h], rax
lea rax, _ZL19default_initializerP10st_lf_hashPvPKv; default_initializer(st_lf_hash *,void *,void const*)
mov [r14+98h], rax
lea rax, _ZL9calc_hashPK15charset_info_stPKhm; calc_hash(charset_info_st const*,uchar const*,ulong)
mov [r14+0A0h], rax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ( * lf_hash_init(long long a1, int a2, int a3, int a4, int a5, long long a6, void *a7))()
{
void *v9; // r15
long long ( *result)(); // rax
v9 = a7;
lf_alloc_init(a1 + 40, a2 + 32, 8);
lf_dynarray_init(a1, 8);
*(_DWORD *)(a1 + 192) = 1;
*(_DWORD *)(a1 + 196) = 0;
*(_DWORD *)(a1 + 184) = a2;
*(_DWORD *)(a1 + 188) = a3;
if ( !a7 )
v9 = &my_charset_bin;
*(_QWORD *)(a1 + 168) = v9;
*(_DWORD *)(a1 + 176) = a4;
*(_DWORD *)(a1 + 180) = a5;
*(_QWORD *)(a1 + 144) = a6;
*(_QWORD *)(a1 + 152) = default_initializer;
result = calc_hash;
*(_QWORD *)(a1 + 160) = calc_hash;
return result;
}
| lf_hash_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x2c],R8D
MOV R12D,ECX
MOV R13D,EDX
MOV EBX,ESI
MOV R14,RDI
MOV R15,qword ptr [RBP + 0x10]
ADD RDI,0x28
LEA ESI,[RBX + 0x20]
MOV EDX,0x8
CALL 0x001a57c6
MOV RDI,R14
MOV ESI,0x8
CALL 0x001a5a14
MOV dword ptr [R14 + 0xc0],0x1
MOV dword ptr [R14 + 0xc4],0x0
MOV dword ptr [R14 + 0xb8],EBX
MOV dword ptr [R14 + 0xbc],R13D
TEST R15,R15
JNZ 0x001a5c62
LEA R15,[0x489080]
LAB_001a5c62:
MOV qword ptr [R14 + 0xa8],R15
MOV dword ptr [R14 + 0xb0],R12D
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [R14 + 0xb4],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [R14 + 0x90],RAX
LEA RAX,[0x1a5cb0]
MOV qword ptr [R14 + 0x98],RAX
LEA RAX,[0x1a5cc9]
MOV qword ptr [R14 + 0xa0],RAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void lf_hash_init(long param_1,int param_2,int4 param_3,int4 param_4,int4 param_5,
int8 param_6,int1 *param_7)
{
lf_alloc_init(param_1 + 0x28,param_2 + 0x20,8);
lf_dynarray_init(param_1,8);
*(int4 *)(param_1 + 0xc0) = 1;
*(int4 *)(param_1 + 0xc4) = 0;
*(int *)(param_1 + 0xb8) = param_2;
*(int4 *)(param_1 + 0xbc) = param_3;
if (param_7 == (int1 *)0x0) {
param_7 = my_charset_bin;
}
*(int1 **)(param_1 + 0xa8) = param_7;
*(int4 *)(param_1 + 0xb0) = param_4;
*(int4 *)(param_1 + 0xb4) = param_5;
*(int8 *)(param_1 + 0x90) = param_6;
*(code **)(param_1 + 0x98) = default_initializer;
*(code **)(param_1 + 0xa0) = calc_hash;
return;
}
| |
28,315 | VSmile::JoySend::SetRts(bool) | sp1187[P]veesem/src/core/vsmile/vsmile.cc | void VSmile::JoySend::SetRts(bool value) {
bool old_value = vsmile_.io_.rts_[num_];
vsmile_.io_.rts_[num_] = value;
// TODO: this seems to be affected by GPIO pull configuration
if (old_value && !value) {
if (num_ == 0)
vsmile_.spg200_.SetExt1Irq(true);
if (num_ == 1)
vsmile_.spg200_.SetExt2Irq(true);
}
} | O3 | cpp | VSmile::JoySend::SetRts(bool):
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movslq 0x10(%rbx), %rax
movb 0x88(%rdi,%rax), %cl
movb %sil, 0x88(%rdi,%rax)
xorb $0x1, %cl
orb %sil, %cl
jne 0xa3fa
testl %eax, %eax
jne 0xa3e1
addq $0x90, %rdi
movl $0x1, %esi
callq 0xac82
movl 0x10(%rbx), %eax
cmpl $0x1, %eax
jne 0xa3fa
movl $0x90, %edi
addq 0x8(%rbx), %rdi
movl $0x1, %esi
popq %rbx
jmp 0xac8e
popq %rbx
retq
| _ZN6VSmile7JoySend6SetRtsEb:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]
movsxd rax, dword ptr [rbx+10h]
mov cl, [rdi+rax+88h]
mov [rdi+rax+88h], sil
xor cl, 1
or cl, sil
jnz short loc_A3FA
test eax, eax
jnz short loc_A3E1
add rdi, 90h; this
mov esi, 1; bool
call _ZN6Spg20010SetExt1IrqEb; Spg200::SetExt1Irq(bool)
mov eax, [rbx+10h]
loc_A3E1:
cmp eax, 1
jnz short loc_A3FA
mov edi, 90h
add rdi, [rbx+8]; this
mov esi, 1; bool
pop rbx
jmp _ZN6Spg20010SetExt2IrqEb; Spg200::SetExt2Irq(bool)
loc_A3FA:
pop rbx
retn
| long long VSmile::JoySend::SetRts(VSmile::JoySend *this, unsigned __int8 a2)
{
long long v3; // rdi
long long result; // rax
unsigned __int8 v5; // cl
v3 = *((_QWORD *)this + 1);
result = *((int *)this + 4);
v5 = *(_BYTE *)(v3 + result + 136);
*(_BYTE *)(v3 + result + 136) = a2;
if ( !(a2 | v5 ^ 1) )
{
if ( !(_DWORD)result )
{
Spg200::SetExt1Irq((Spg200 *)(v3 + 144), 1);
result = *((unsigned int *)this + 4);
}
if ( (_DWORD)result == 1 )
return Spg200::SetExt2Irq((Spg200 *)(*((_QWORD *)this + 1) + 144LL), 1);
}
return result;
}
| SetRts:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOVSXD RAX,dword ptr [RBX + 0x10]
MOV CL,byte ptr [RDI + RAX*0x1 + 0x88]
MOV byte ptr [RDI + RAX*0x1 + 0x88],SIL
XOR CL,0x1
OR CL,SIL
JNZ 0x0010a3fa
TEST EAX,EAX
JNZ 0x0010a3e1
ADD RDI,0x90
MOV ESI,0x1
CALL 0x0010ac82
MOV EAX,dword ptr [RBX + 0x10]
LAB_0010a3e1:
CMP EAX,0x1
JNZ 0x0010a3fa
MOV EDI,0x90
ADD RDI,qword ptr [RBX + 0x8]
MOV ESI,0x1
POP RBX
JMP 0x0010ac8e
LAB_0010a3fa:
POP RBX
RET
|
/* VSmile::JoySend::SetRts(bool) */
void __thiscall VSmile::JoySend::SetRts(JoySend *this,bool param_1)
{
char cVar1;
long lVar2;
int iVar3;
lVar2 = *(long *)(this + 8);
iVar3 = *(int *)(this + 0x10);
cVar1 = *(char *)(lVar2 + 0x88 + (long)iVar3);
*(bool *)(lVar2 + 0x88 + (long)iVar3) = param_1;
if (cVar1 == '\x01' && !param_1) {
if (iVar3 == 0) {
Spg200::SetExt1Irq((Spg200 *)(lVar2 + 0x90),true);
iVar3 = *(int *)(this + 0x10);
}
if (iVar3 == 1) {
Spg200::SetExt2Irq((Spg200 *)(*(long *)(this + 8) + 0x90),true);
return;
}
}
return;
}
| |
28,316 | inline_mysql_cond_signal | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x26dfb
leaq 0x1a77d9(%rip), %rax # 0x1ce5c0
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x24030
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_signal:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_26DFB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_26DFB:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_signal(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
| inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00126dfb
LEA RAX,[0x2ce5c0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00126dfb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124030
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
| |
28,317 | mysql_set_character_set_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_set_character_set_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_set_character_set,
(parms->mysql, parms->csname),
parms->mysql,
int,
r_int)
} | O0 | c | mysql_set_character_set_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
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x380d0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_set_character_set_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]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call mysql_set_character_set
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_set_character_set_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_set_character_set(*a1, a1[1]);
result = v2;
*v2 = 0;
return result;
}
| mysql_set_character_set_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]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001380d0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_set_character_set_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_set_character_set(*param_1,param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
28,318 | test_bug17512527 | eloqsql/tests/mysql_client_test.c | static void test_bug17512527()
{
MYSQL *conn;
MYSQL_STMT *stmt1, *stmt2;
unsigned long thread_id;
char query[MAX_TEST_QUERY_LENGTH];
int rc;
conn= client_connect(0, MYSQL_PROTOCOL_SOCKET, 1);
stmt1 = mysql_stmt_init(conn);
check_stmt(stmt1);
rc= mysql_stmt_prepare(stmt1, STRING_WITH_LEN("SELECT 1"));
check_execute(stmt1, rc);
stmt2 = mysql_stmt_init(conn);
check_stmt(stmt2);
thread_id= mysql_thread_id(conn);
sprintf(query, "KILL %lu", thread_id);
if (thread_query(query))
exit(1);
rc= mysql_stmt_prepare(stmt2, STRING_WITH_LEN("SELECT 2"));
check_execute(stmt2, rc);
rc= mysql_stmt_execute(stmt1);
check_execute_r(stmt1, rc);
rc= mysql_stmt_execute(stmt2);
check_execute(stmt2, rc);
mysql_close(conn);
mysql_stmt_close(stmt2);
mysql_stmt_close(stmt1);
} | O0 | c | test_bug17512527:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
xorl %eax, %eax
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x3d710
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
callq 0xb2790
movq %rax, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
jne 0x96e88
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x150(%rbp)
je 0x96e94
jmp 0x96eac
leaq 0x96d71(%rip), %rdi # 0x12dc0c
movl $0x4d01, %esi # imm = 0x4D01
leaq 0x9b657(%rip), %rdx # 0x1324fe
callq 0x3c010
movq -0x150(%rbp), %rdi
leaq 0xae3d7(%rip), %rsi # 0x145291
movl $0x8, %edx
callq 0x3b810
movl %eax, -0x164(%rbp)
cmpl $0x0, -0x164(%rbp)
je 0x96ee3
movq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x164(%rbp)
jne 0x96eee
jmp 0x96f06
leaq 0x96d17(%rip), %rdi # 0x12dc0c
movl $0x4d03, %esi # imm = 0x4D03
leaq 0xa290b(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x148(%rbp), %rdi
callq 0xb2790
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x158(%rbp)
jne 0x96f2c
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x158(%rbp)
je 0x96f38
jmp 0x96f50
leaq 0x96ccd(%rip), %rdi # 0x12dc0c
movl $0x4d06, %esi # imm = 0x4D06
leaq 0x9d380(%rip), %rdx # 0x1342cb
callq 0x3c010
movq -0x148(%rbp), %rdi
callq 0xaa2c0
movq %rax, -0x160(%rbp)
leaq -0x140(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0xae2ef(%rip), %rsi # 0x145267
movb $0x0, %al
callq 0x3aa20
leaq -0x140(%rbp), %rdi
callq 0x55e90
cmpb $0x0, %al
je 0x96f99
movl $0x1, %edi
callq 0x3a660
movq -0x158(%rbp), %rdi
leaq 0xae2c9(%rip), %rsi # 0x145270
movl $0x8, %edx
callq 0x3b810
movl %eax, -0x164(%rbp)
cmpl $0x0, -0x164(%rbp)
je 0x96fd0
movq -0x158(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x164(%rbp)
jne 0x96fdb
jmp 0x96ff3
leaq 0x96c2a(%rip), %rdi # 0x12dc0c
movl $0x4d0e, %esi # imm = 0x4D0E
leaq 0xa281e(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x150(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0x164(%rbp)
cmpl $0x0, -0x164(%rbp)
je 0x9701e
movq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x164(%rbp)
je 0x97029
jmp 0x97041
leaq 0x96bdc(%rip), %rdi # 0x12dc0c
movl $0x4d11, %esi # imm = 0x4D11
leaq 0x98a41(%rip), %rdx # 0x12fa7d
callq 0x3c010
movq -0x158(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0x164(%rbp)
cmpl $0x0, -0x164(%rbp)
je 0x9706c
movq -0x158(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x164(%rbp)
jne 0x97077
jmp 0x9708f
leaq 0x96b8e(%rip), %rdi # 0x12dc0c
movl $0x4d14, %esi # imm = 0x4D14
leaq 0xa2782(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x148(%rbp), %rdi
callq 0x3b2e0
movq -0x158(%rbp), %rdi
callq 0x3b9f0
movq -0x150(%rbp), %rdi
callq 0x3b9f0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x970ce
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
callq 0x3a2a0
nopw %cs:(%rax,%rax)
| test_bug17512527:
push rbp
mov rbp, rsp
sub rsp, 170h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov edi, eax
mov esi, 2
mov edx, 1
call client_connect
mov [rbp+var_148], rax
mov rdi, [rbp+var_148]
call mysql_stmt_init
mov [rbp+var_150], rax
cmp [rbp+var_150], 0
jnz short loc_96E88
xor eax, eax
mov edi, eax
call print_error
loc_96E88:
cmp [rbp+var_150], 0
jz short loc_96E94
jmp short loc_96EAC
loc_96E94:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D01h
lea rdx, aStmt10; "stmt1 != 0"
call die
loc_96EAC:
mov rdi, [rbp+var_150]
lea rsi, aAnalyzeSelect1+8; "SELECT 1"
mov edx, 8
call wrap_mysql_stmt_prepare
mov [rbp+var_164], eax
cmp [rbp+var_164], 0
jz short loc_96EE3
mov rdi, [rbp+var_150]
xor eax, eax
mov esi, eax
call print_st_error
loc_96EE3:
cmp [rbp+var_164], 0
jnz short loc_96EEE
jmp short loc_96F06
loc_96EEE:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D03h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_96F06:
mov rdi, [rbp+var_148]
call mysql_stmt_init
mov [rbp+var_158], rax
cmp [rbp+var_158], 0
jnz short loc_96F2C
xor eax, eax
mov edi, eax
call print_error
loc_96F2C:
cmp [rbp+var_158], 0
jz short loc_96F38
jmp short loc_96F50
loc_96F38:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D06h
lea rdx, aStmt20; "stmt2 != 0"
call die
loc_96F50:
mov rdi, [rbp+var_148]
call mysql_thread_id
mov [rbp+var_160], rax
lea rdi, [rbp+var_140]
mov rdx, [rbp+var_160]
lea rsi, aKillLu; "KILL %lu"
mov al, 0
call _sprintf
lea rdi, [rbp+var_140]
call thread_query
cmp al, 0
jz short loc_96F99
mov edi, 1
call _exit
loc_96F99:
mov rdi, [rbp+var_158]
lea rsi, aSelect2; "SELECT 2"
mov edx, 8
call wrap_mysql_stmt_prepare
mov [rbp+var_164], eax
cmp [rbp+var_164], 0
jz short loc_96FD0
mov rdi, [rbp+var_158]
xor eax, eax
mov esi, eax
call print_st_error
loc_96FD0:
cmp [rbp+var_164], 0
jnz short loc_96FDB
jmp short loc_96FF3
loc_96FDB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D0Eh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_96FF3:
mov rdi, [rbp+var_150]
call wrap_mysql_stmt_execute
mov [rbp+var_164], eax
cmp [rbp+var_164], 0
jz short loc_9701E
mov rdi, [rbp+var_150]
xor eax, eax
mov esi, eax
call print_st_error
loc_9701E:
cmp [rbp+var_164], 0
jz short loc_97029
jmp short loc_97041
loc_97029:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D11h
lea rdx, aRc0_0; "rc != 0"
call die
loc_97041:
mov rdi, [rbp+var_158]
call wrap_mysql_stmt_execute
mov [rbp+var_164], eax
cmp [rbp+var_164], 0
jz short loc_9706C
mov rdi, [rbp+var_158]
xor eax, eax
mov esi, eax
call print_st_error
loc_9706C:
cmp [rbp+var_164], 0
jnz short loc_97077
jmp short loc_9708F
loc_97077:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D14h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_9708F:
mov rdi, [rbp+var_148]
call wrap_mysql_close
mov rdi, [rbp+var_158]
call wrap_mysql_stmt_close
mov rdi, [rbp+var_150]
call wrap_mysql_stmt_close
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_970CE
add rsp, 170h
pop rbp
retn
loc_970CE:
call ___stack_chk_fail
| unsigned long long test_bug17512527()
{
long long v1; // [rsp+10h] [rbp-160h]
long long v2; // [rsp+18h] [rbp-158h]
long long v3; // [rsp+20h] [rbp-150h]
long long v4; // [rsp+28h] [rbp-148h]
char v5[312]; // [rsp+30h] [rbp-140h] BYREF
unsigned long long v6; // [rsp+168h] [rbp-8h]
v6 = __readfsqword(0x28u);
v4 = client_connect(0LL, 2, 1);
v3 = mysql_stmt_init(v4);
if ( !v3 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19713, "stmt1 != 0");
}
if ( (unsigned int)wrap_mysql_stmt_prepare(v3, (long long)"SELECT 1", 8LL) )
{
print_st_error(v3, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19715, "rc == 0");
}
v2 = mysql_stmt_init(v4);
if ( !v2 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19718, "stmt2 != 0");
}
v1 = mysql_thread_id(v4);
sprintf(v5, "KILL %lu", v1);
if ( thread_query(v5) )
exit(1LL);
if ( (unsigned int)wrap_mysql_stmt_prepare(v2, (long long)"SELECT 2", 8LL) )
{
print_st_error(v2, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19726, "rc == 0");
}
if ( !(unsigned int)wrap_mysql_stmt_execute(v3) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19729, "rc != 0");
print_st_error(v3, 0LL);
if ( (unsigned int)wrap_mysql_stmt_execute(v2) )
{
print_st_error(v2, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19732, "rc == 0");
}
wrap_mysql_close(v4);
wrap_mysql_stmt_close(v2);
wrap_mysql_stmt_close(v3);
return __readfsqword(0x28u);
}
| test_bug17512527:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x2
MOV EDX,0x1
CALL 0x0013d710
MOV qword ptr [RBP + -0x148],RAX
MOV RDI,qword ptr [RBP + -0x148]
CALL 0x001b2790
MOV qword ptr [RBP + -0x150],RAX
CMP qword ptr [RBP + -0x150],0x0
JNZ 0x00196e88
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00196e88:
CMP qword ptr [RBP + -0x150],0x0
JZ 0x00196e94
JMP 0x00196eac
LAB_00196e94:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d01
LEA RDX,[0x2324fe]
CALL 0x0013c010
LAB_00196eac:
MOV RDI,qword ptr [RBP + -0x150]
LEA RSI,[0x245291]
MOV EDX,0x8
CALL 0x0013b810
MOV dword ptr [RBP + -0x164],EAX
CMP dword ptr [RBP + -0x164],0x0
JZ 0x00196ee3
MOV RDI,qword ptr [RBP + -0x150]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00196ee3:
CMP dword ptr [RBP + -0x164],0x0
JNZ 0x00196eee
JMP 0x00196f06
LAB_00196eee:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d03
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_00196f06:
MOV RDI,qword ptr [RBP + -0x148]
CALL 0x001b2790
MOV qword ptr [RBP + -0x158],RAX
CMP qword ptr [RBP + -0x158],0x0
JNZ 0x00196f2c
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00196f2c:
CMP qword ptr [RBP + -0x158],0x0
JZ 0x00196f38
JMP 0x00196f50
LAB_00196f38:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d06
LEA RDX,[0x2342cb]
CALL 0x0013c010
LAB_00196f50:
MOV RDI,qword ptr [RBP + -0x148]
CALL 0x001aa2c0
MOV qword ptr [RBP + -0x160],RAX
LEA RDI,[RBP + -0x140]
MOV RDX,qword ptr [RBP + -0x160]
LEA RSI,[0x245267]
MOV AL,0x0
CALL 0x0013aa20
LEA RDI,[RBP + -0x140]
CALL 0x00155e90
CMP AL,0x0
JZ 0x00196f99
MOV EDI,0x1
CALL 0x0013a660
LAB_00196f99:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[0x245270]
MOV EDX,0x8
CALL 0x0013b810
MOV dword ptr [RBP + -0x164],EAX
CMP dword ptr [RBP + -0x164],0x0
JZ 0x00196fd0
MOV RDI,qword ptr [RBP + -0x158]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00196fd0:
CMP dword ptr [RBP + -0x164],0x0
JNZ 0x00196fdb
JMP 0x00196ff3
LAB_00196fdb:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d0e
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_00196ff3:
MOV RDI,qword ptr [RBP + -0x150]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0x164],EAX
CMP dword ptr [RBP + -0x164],0x0
JZ 0x0019701e
MOV RDI,qword ptr [RBP + -0x150]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0019701e:
CMP dword ptr [RBP + -0x164],0x0
JZ 0x00197029
JMP 0x00197041
LAB_00197029:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d11
LEA RDX,[0x22fa7d]
CALL 0x0013c010
LAB_00197041:
MOV RDI,qword ptr [RBP + -0x158]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0x164],EAX
CMP dword ptr [RBP + -0x164],0x0
JZ 0x0019706c
MOV RDI,qword ptr [RBP + -0x158]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0019706c:
CMP dword ptr [RBP + -0x164],0x0
JNZ 0x00197077
JMP 0x0019708f
LAB_00197077:
LEA RDI,[0x22dc0c]
MOV ESI,0x4d14
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0019708f:
MOV RDI,qword ptr [RBP + -0x148]
CALL 0x0013b2e0
MOV RDI,qword ptr [RBP + -0x158]
CALL 0x0013b9f0
MOV RDI,qword ptr [RBP + -0x150]
CALL 0x0013b9f0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001970ce
ADD RSP,0x170
POP RBP
RET
LAB_001970ce:
CALL 0x0013a2a0
|
void test_bug17512527(void)
{
char cVar1;
int iVar2;
int8 uVar3;
long lVar4;
long lVar5;
int8 uVar6;
long in_FS_OFFSET;
char local_148 [312];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = client_connect(0,2,1);
lVar4 = mysql_stmt_init(uVar3);
if (lVar4 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d01,"stmt1 != 0");
}
iVar2 = wrap_mysql_stmt_prepare(lVar4,"SELECT 1",8);
if (iVar2 != 0) {
print_st_error(lVar4,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d03,"rc == 0");
}
lVar5 = mysql_stmt_init(uVar3);
if (lVar5 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d06,"stmt2 != 0");
}
uVar6 = mysql_thread_id(uVar3);
sprintf(local_148,"KILL %lu",uVar6);
cVar1 = thread_query(local_148);
if (cVar1 != '\0') {
/* WARNING: Subroutine does not return */
exit(1);
}
iVar2 = wrap_mysql_stmt_prepare(lVar5,"SELECT 2",8);
if (iVar2 != 0) {
print_st_error(lVar5,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d0e,"rc == 0");
}
iVar2 = wrap_mysql_stmt_execute(lVar4);
if (iVar2 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d11,"rc != 0");
}
else {
print_st_error(lVar4,0);
}
iVar2 = wrap_mysql_stmt_execute(lVar5);
if (iVar2 != 0) {
print_st_error(lVar5,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4d14,"rc == 0");
}
wrap_mysql_close(uVar3);
wrap_mysql_stmt_close(lVar5);
wrap_mysql_stmt_close(lVar4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,319 | mysql_real_connect_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_real_connect_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_real_connect,
(parms->mysql, parms->host, parms->user, parms->passwd, parms->db,
parms->port, parms->unix_socket, parms->client_flags),
parms->mysql,
MYSQL *,
r_ptr)
} | O0 | c | mysql_real_connect_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %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
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %r8
movq -0x10(%rbp), %rax
movl 0x28(%rax), %r9d
movq -0x10(%rbp), %rax
movq 0x30(%rax), %r10
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x355f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_real_connect_start_internal:
push rbp
mov rbp, rsp
sub rsp, 30h
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]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov r8, [rax+20h]
mov rax, [rbp+var_10]
mov r9d, [rax+28h]
mov rax, [rbp+var_10]
mov r10, [rax+30h]
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rsp+30h+var_30], r10
mov [rsp+30h+var_28], rax
call mysql_real_connect
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, 30h
pop rbp
retn
| long long mysql_real_connect_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+10h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_real_connect(
*(_QWORD *)a1,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24),
*(_QWORD *)(a1 + 32),
*(_DWORD *)(a1 + 40),
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a1 + 56));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_real_connect_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
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]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9D,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV R10,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001355f0
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,0x30
POP RBP
RET
|
void mysql_real_connect_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_real_connect(*param_1,param_1[1],param_1[2],param_1[3],param_1[4],(int)param_1[5],
param_1[6],param_1[7]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
28,320 | bitmap_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O3 | c | bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x9cf2e
cmpq $0x0, 0x40(%rdi)
jne 0x9cf81
callq 0x29220
movq (%rbx), %rax
movl %r14d, %edx
andb $0x7, %r14b
movl $0x1, %r15d
movl %r14d, %ecx
shll %cl, %r15d
shrl $0x3, %edx
movb (%rax,%rdx), %r14b
movl %r15d, %ecx
notb %cl
andb %r14b, %cl
movb %cl, (%rax,%rdx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x9cf70
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x9cf94
movq %rbx, %rdi
callq 0x291e0
andb %r15b, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f11c(%rip), %rsi # 0xdc0a4
movl $0x81, %edx
callq 0x2eb8f
jmp 0x9cf2e
leaq 0x2e9075(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9cf68
| bitmap_test_and_clear:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_9CF2E
cmp qword ptr [rdi+40h], 0
jnz short loc_9CF81
call _pthread_mutex_lock
loc_9CF2E:
mov rax, [rbx]
mov edx, r14d
and r14b, 7
mov r15d, 1
mov ecx, r14d
shl r15d, cl
shr edx, 3
mov r14b, [rax+rdx]
mov ecx, r15d
not cl
and cl, r14b
mov [rax+rdx], cl
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_9CF70
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_9CF94
loc_9CF68:
mov rdi, rbx
call _pthread_mutex_unlock
loc_9CF70:
and r14b, r15b
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9CF81:
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_9CF2E
loc_9CF94:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9CF68
| long long bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // r14d
long long v4; // rdi
int v5; // r15d
long long v6; // rdx
long long v7; // rbx
long long v8; // rdi
v2 = a2;
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v4);
}
v5 = 1 << (a2 & 7);
v6 = a2 >> 3;
LOBYTE(v2) = *(_BYTE *)(*a1 + v6);
*(_BYTE *)(*a1 + v6) = v2 & ~(_BYTE)v5;
v7 = a1[2];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 64);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v7);
}
LOBYTE(v2) = v5 & v2;
return v2;
}
| bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0019cf2e
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x0019cf81
CALL 0x00129220
LAB_0019cf2e:
MOV RAX,qword ptr [RBX]
MOV EDX,R14D
AND R14B,0x7
MOV R15D,0x1
MOV ECX,R14D
SHL R15D,CL
SHR EDX,0x3
MOV R14B,byte ptr [RAX + RDX*0x1]
MOV ECX,R15D
NOT CL
AND CL,R14B
MOV byte ptr [RAX + RDX*0x1],CL
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x0019cf70
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x0019cf94
LAB_0019cf68:
MOV RDI,RBX
CALL 0x001291e0
LAB_0019cf70:
AND R14B,R15B
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019cf81:
LEA RSI,[0x1dc0a4]
MOV EDX,0x81
CALL 0x0012eb8f
JMP 0x0019cf2e
LAB_0019cf94:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019cf68
|
int8 bitmap_test_and_clear(long *param_1,uint param_2)
{
byte bVar1;
pthread_mutex_t *ppVar2;
byte bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = ~bVar3 & bVar1;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3);
}
| |
28,321 | my_strtoull | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err)
{
unsigned long long val = 0;
const char *p = str;
const char *end_str = p + len;
for (; p < end_str; p++)
{
if (*p < '0' || *p > '9')
break;
if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0'))
{
*err = ERANGE;
break;
}
val = val * 10 + *p -'0';
}
if (p == str)
/* Did not parse anything.*/
*err = ERANGE;
*end = p;
return val;
} | O3 | c | my_strtoull:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
testq %rsi, %rsi
jle 0x27195
addq %rdi, %rsi
xorl %r8d, %r8d
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
xorl %eax, %eax
movsbq (%rdi,%r8), %r10
leal -0x3a(%r10), %r11d
cmpb $-0xa, %r11b
jb 0x2719f
cmpq %r9, %rax
ja 0x27199
leaq (%rax,%rax), %r11
leaq (%r11,%r11,4), %r11
movl $0x2f, %ebx
subq %r10, %rbx
cmpq %rbx, %r11
ja 0x27199
leaq (%r11,%r10), %rax
addq $-0x30, %rax
leaq (%rdi,%r8), %r10
incq %r10
incq %r8
cmpq %rsi, %r10
jb 0x27150
addq %r8, %rdi
jmp 0x271ad
xorl %eax, %eax
jmp 0x271a7
movl $0x22, (%rcx)
addq %r8, %rdi
testq %r8, %r8
jne 0x271ad
movl $0x22, (%rcx)
movq %rdi, (%rdx)
popq %rbx
popq %rbp
retq
| my_strtoull:
push rbp
mov rbp, rsp
push rbx
test rsi, rsi
jle short loc_27195
add rsi, rdi
xor r8d, r8d
mov r9, 1999999999999999h
xor eax, eax
loc_27150:
movsx r10, byte ptr [rdi+r8]
lea r11d, [r10-3Ah]
cmp r11b, 0F6h
jb short loc_2719F
cmp rax, r9
ja short loc_27199
lea r11, [rax+rax]
lea r11, [r11+r11*4]
mov ebx, 2Fh ; '/'
sub rbx, r10
cmp r11, rbx
ja short loc_27199
lea rax, [r11+r10]
add rax, 0FFFFFFFFFFFFFFD0h
lea r10, [rdi+r8]
inc r10
inc r8
cmp r10, rsi
jb short loc_27150
add rdi, r8
jmp short loc_271AD
loc_27195:
xor eax, eax
jmp short loc_271A7
loc_27199:
mov dword ptr [rcx], 22h ; '"'
loc_2719F:
add rdi, r8
test r8, r8
jnz short loc_271AD
loc_271A7:
mov dword ptr [rcx], 22h ; '"'
loc_271AD:
mov [rdx], rdi
pop rbx
pop rbp
retn
| unsigned long long my_strtoull(long long a1, long long a2, _QWORD *a3, _DWORD *a4)
{
unsigned long long v4; // rsi
long long v5; // r8
unsigned long long result; // rax
long long v7; // r10
unsigned long long v8; // r10
if ( a2 <= 0 )
{
result = 0LL;
LABEL_11:
*a4 = 34;
goto LABEL_12;
}
v4 = a1 + a2;
v5 = 0LL;
result = 0LL;
while ( 1 )
{
v7 = *(char *)(a1 + v5);
if ( (unsigned __int8)(v7 - 58) < 0xF6u )
break;
if ( result > 0x1999999999999999LL || 10 * result > 47 - v7 )
{
*a4 = 34;
break;
}
result = 10 * result + v7 - 48;
v8 = a1 + v5++ + 1;
if ( v8 >= v4 )
{
a1 += v5;
goto LABEL_12;
}
}
a1 += v5;
if ( !v5 )
goto LABEL_11;
LABEL_12:
*a3 = a1;
return result;
}
| my_strtoull:
PUSH RBP
MOV RBP,RSP
PUSH RBX
TEST RSI,RSI
JLE 0x00127195
ADD RSI,RDI
XOR R8D,R8D
MOV R9,0x1999999999999999
XOR EAX,EAX
LAB_00127150:
MOVSX R10,byte ptr [RDI + R8*0x1]
LEA R11D,[R10 + -0x3a]
CMP R11B,0xf6
JC 0x0012719f
CMP RAX,R9
JA 0x00127199
LEA R11,[RAX + RAX*0x1]
LEA R11,[R11 + R11*0x4]
MOV EBX,0x2f
SUB RBX,R10
CMP R11,RBX
JA 0x00127199
LEA RAX,[R11 + R10*0x1]
ADD RAX,-0x30
LEA R10,[RDI + R8*0x1]
INC R10
INC R8
CMP R10,RSI
JC 0x00127150
ADD RDI,R8
JMP 0x001271ad
LAB_00127195:
XOR EAX,EAX
JMP 0x001271a7
LAB_00127199:
MOV dword ptr [RCX],0x22
LAB_0012719f:
ADD RDI,R8
TEST R8,R8
JNZ 0x001271ad
LAB_001271a7:
MOV dword ptr [RCX],0x22
LAB_001271ad:
MOV qword ptr [RDX],RDI
POP RBX
POP RBP
RET
|
ulong my_strtoull(long param_1,long param_2,long *param_3,int4 *param_4)
{
long lVar1;
char cVar2;
ulong uVar3;
long lVar4;
if (param_2 < 1) {
uVar3 = 0;
LAB_001271a7:
*param_4 = 0x22;
}
else {
lVar4 = 0;
uVar3 = 0;
do {
cVar2 = *(char *)(param_1 + lVar4);
if ((byte)(cVar2 - 0x3aU) < 0xf6) {
LAB_0012719f:
param_1 = param_1 + lVar4;
if (lVar4 == 0) goto LAB_001271a7;
goto LAB_001271ad;
}
if ((0x1999999999999999 < uVar3) || (0x2fU - (long)cVar2 < uVar3 * 10)) {
*param_4 = 0x22;
goto LAB_0012719f;
}
uVar3 = (uVar3 * 10 + (long)cVar2) - 0x30;
lVar1 = param_1 + lVar4;
lVar4 = lVar4 + 1;
} while (lVar1 + 1U < (ulong)(param_2 + param_1));
param_1 = param_1 + lVar4;
}
LAB_001271ad:
*param_3 = param_1;
return uVar3;
}
| |
28,322 | my_uni_ucs2 | eloqsql/strings/ctype-ucs2.c | static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
return MY_CS_TOOSMALL2;
if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */
return MY_CS_ILUNI;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
return 2;
} | O0 | c | my_uni_ucs2:
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
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x92e9b
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x92ed8
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x92eae
movl $0x0, -0x4(%rbp)
jmp 0x92ed8
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_uni_ucs2:
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]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_92E9B
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_92ED8
loc_92E9B:
cmp [rbp+var_18], 0FFFFh
jbe short loc_92EAE
mov [rbp+var_4], 0
jmp short loc_92ED8
loc_92EAE:
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_92ED8:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_ucs2(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a2 <= 0xFFFF )
{
*a3 = BYTE1(a2);
a3[1] = a2;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
| my_uni_ucs2:
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]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00192e9b
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00192ed8
LAB_00192e9b:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x00192eae
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00192ed8
LAB_00192eae:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00192ed8:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_ucs2(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int4 local_c;
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if (param_2 < 0x10000) {
*param_3 = (char)(param_2 >> 8);
param_3[1] = (char)param_2;
local_c = 2;
}
else {
local_c = 0;
}
return local_c;
}
| |
28,323 | check_mb_gb18030_valid | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_gb18030_valid(const char * start, const char * end)
{
if (end - start <= 1 || !is_gb18030_odd(start[0])) {
return 0;
}
if (is_gb18030_even_2(start[1])) {
return 2;
} else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) {
return 4;
}
return 0;
} | O0 | c | check_mb_gb18030_valid:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x758fb
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x758fb
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jle 0x75907
movl $0x0, -0x4(%rbp)
jmp 0x759cd
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x75925
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7e, %eax
jle 0x75945
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x80, %eax
cmpl %ecx, %eax
jg 0x7594e
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jg 0x7594e
movl $0x2, -0x4(%rbp)
jmp 0x759cd
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jle 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x39, %eax
jg 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
jg 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x759c4
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x39, %eax
jg 0x759c4
movl $0x4, -0x4(%rbp)
jmp 0x759cd
jmp 0x759c6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_mb_gb18030_valid:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 1
jle short loc_758FB
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax]
mov eax, 81h
cmp eax, ecx
jg short loc_758FB
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jle short loc_75907
loc_758FB:
mov [rbp+var_4], 0
jmp loc_759CD
loc_75907:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_75925
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jle short loc_75945
loc_75925:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 80h
cmp eax, ecx
jg short loc_7594E
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jg short loc_7594E
loc_75945:
mov [rbp+var_4], 2
jmp short loc_759CD
loc_7594E:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 3
jle short loc_759C4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 30h ; '0'
cmp eax, ecx
jg short loc_759C4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 39h ; '9'
jg short loc_759C4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+2]
mov eax, 81h
cmp eax, ecx
jg short loc_759C4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
jg short loc_759C4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+3]
mov eax, 30h ; '0'
cmp eax, ecx
jg short loc_759C4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+3]
cmp eax, 39h ; '9'
jg short loc_759C4
mov [rbp+var_4], 4
jmp short loc_759CD
loc_759C4:
jmp short $+2
loc_759C6:
mov [rbp+var_4], 0
loc_759CD:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_mb_gb18030_valid(unsigned __int8 *a1, long long a2)
{
if ( a2 - (long long)a1 <= 1 || *a1 < 0x81u || *a1 == 255 )
{
return 0;
}
else if ( (a1[1] < 0x40u || a1[1] > 0x7Eu) && (a1[1] < 0x80u || a1[1] == 255) )
{
if ( a2 - (long long)a1 <= 3
|| a1[1] < 0x30u
|| a1[1] > 0x39u
|| a1[2] < 0x81u
|| a1[2] == 255
|| a1[3] < 0x30u
|| a1[3] > 0x39u )
{
return 0;
}
else
{
return 4;
}
}
else
{
return 2;
}
}
| check_mb_gb18030_valid:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x001758fb
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX]
MOV EAX,0x81
CMP EAX,ECX
JG 0x001758fb
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JLE 0x00175907
LAB_001758fb:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001759cd
LAB_00175907:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x00175925
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JLE 0x00175945
LAB_00175925:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x80
CMP EAX,ECX
JG 0x0017594e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
JG 0x0017594e
LAB_00175945:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001759cd
LAB_0017594e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x3
JLE 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x30
CMP EAX,ECX
JG 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x39
JG 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV EAX,0x81
CMP EAX,ECX
JG 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
JG 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV EAX,0x30
CMP EAX,ECX
JG 0x001759c4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x39
JG 0x001759c4
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001759cd
LAB_001759c4:
JMP 0x001759c6
LAB_001759c6:
MOV dword ptr [RBP + -0x4],0x0
LAB_001759cd:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_gb18030_valid(byte *param_1,long param_2)
{
int4 local_c;
if (((param_2 - (long)param_1 < 2) || (*param_1 < 0x81)) || (*param_1 == 0xff)) {
local_c = 0;
}
else if (((param_1[1] < 0x40) || (0x7e < param_1[1])) &&
((param_1[1] < 0x80 || (param_1[1] == 0xff)))) {
if (((param_2 - (long)param_1 < 4) || (param_1[1] < 0x30)) ||
((0x39 < param_1[1] ||
((((param_1[2] < 0x81 || (0xfe < param_1[2])) || (param_1[3] < 0x30)) || (0x39 < param_1[3])
))))) {
local_c = 0;
}
else {
local_c = 4;
}
}
else {
local_c = 2;
}
return local_c;
}
| |
28,324 | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) | ami-iit[P]serial_cpp/include/serial_cpp/serial.h | PortNotOpenedException (const char * description) {
std::stringstream ss;
ss << "PortNotOpenedException " << description << " failed.";
e_what_ = ss.str();
} | O0 | c | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0xce60
movq -0x1d8(%rbp), %rdi
leaq 0xa0a7(%rip), %rax # 0x16d78
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x34b0
leaq -0x198(%rbp), %rdi
callq 0x3220
jmp 0xccf2
leaq -0x188(%rbp), %rdi
leaq 0x3bb9(%rip), %rsi # 0x108b9
callq 0x3310
movq %rax, -0x1e0(%rbp)
jmp 0xcd0e
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3310
movq %rax, -0x1e8(%rbp)
jmp 0xcd27
movq -0x1e8(%rbp), %rdi
leaq 0x3b4d(%rip), %rsi # 0x10882
callq 0x3310
jmp 0xcd3c
leaq -0x1c8(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3300
jmp 0xcd51
movq -0x1d8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x3410
leaq -0x1c8(%rbp), %rdi
callq 0x31e0
leaq -0x198(%rbp), %rdi
callq 0x3260
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0xcdbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3260
movq -0x1d0(%rbp), %rdi
callq 0x31e0
movq -0x1d8(%rbp), %rdi
callq 0x3630
movq -0x1a0(%rbp), %rdi
callq 0x35d0
nop
| _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc:
push rbp
mov rbp, rsp
sub rsp, 1F0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_1D8], rdi
call _ZNSt9exceptionC2Ev; std::exception::exception(void)
mov rdi, [rbp+var_1D8]
lea rax, off_16D78
mov [rdi], rax
add rdi, 8
mov [rbp+var_1D0], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_CCF2:
lea rdi, [rbp+var_188]
lea rsi, aPortnotopenede; "PortNotOpenedException "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1E0], rax
jmp short $+2
loc_CD0E:
mov rdi, [rbp+var_1E0]
mov rsi, [rbp+var_10]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1E8], rax
jmp short $+2
loc_CD27:
mov rdi, [rbp+var_1E8]
lea rsi, aFailed; " failed."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_CD3C:
lea rdi, [rbp+var_1C8]
lea rsi, [rbp+var_198]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_CD51:
mov rdi, [rbp+var_1D8]
add rdi, 8
lea rsi, [rbp+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 1F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1A0], rcx
mov [rbp+var_1A4], eax
jmp short loc_CDBB
mov rcx, rax
mov eax, edx
mov [rbp+var_1A0], rcx
mov [rbp+var_1A4], eax
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_CDBB:
mov rdi, [rbp+var_1D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_1D8]; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, [rbp+var_1A0]
call __Unwind_Resume
| long long serial_cpp::PortNotOpenedException::PortNotOpenedException(
serial_cpp::PortNotOpenedException *this,
const char *a2)
{
long long v3; // [rsp+8h] [rbp-1E8h]
long long v4; // [rsp+10h] [rbp-1E0h]
_BYTE v5[36]; // [rsp+28h] [rbp-1C8h] BYREF
_BYTE v6[16]; // [rsp+58h] [rbp-198h] BYREF
_BYTE v7[376]; // [rsp+68h] [rbp-188h] BYREF
const char *v8; // [rsp+1E0h] [rbp-10h]
std::exception *v9; // [rsp+1E8h] [rbp-8h]
v9 = this;
v8 = a2;
std::exception::exception(this);
*(_QWORD *)this = off_16D78;
std::string::basic_string((char *)this + 8);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6);
v4 = std::operator<<<std::char_traits<char>>(v7, "PortNotOpenedException ");
v3 = std::operator<<<std::char_traits<char>>(v4, v8);
std::operator<<<std::char_traits<char>>(v3, " failed.");
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v5, v6);
std::string::operator=((char *)this + 8, v5);
std::string::~string(v5);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
}
| PortNotOpenedException:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1f0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x1d8],RDI
CALL 0x0010ce60
MOV RDI,qword ptr [RBP + -0x1d8]
LEA RAX,[0x116d78]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RBP + -0x1d0],RDI
CALL 0x001034b0
LAB_0010cce4:
LEA RDI,[RBP + -0x198]
CALL 0x00103220
JMP 0x0010ccf2
LAB_0010ccf2:
LEA RDI,[RBP + -0x188]
LAB_0010ccf9:
LEA RSI,[0x1108b9]
CALL 0x00103310
MOV qword ptr [RBP + -0x1e0],RAX
JMP 0x0010cd0e
LAB_0010cd0e:
MOV RDI,qword ptr [RBP + -0x1e0]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00103310
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x0010cd27
LAB_0010cd27:
MOV RDI,qword ptr [RBP + -0x1e8]
LEA RSI,[0x110882]
CALL 0x00103310
JMP 0x0010cd3c
LAB_0010cd3c:
LEA RDI,[RBP + -0x1c8]
LEA RSI,[RBP + -0x198]
CALL 0x00103300
LAB_0010cd4f:
JMP 0x0010cd51
LAB_0010cd51:
MOV RDI,qword ptr [RBP + -0x1d8]
ADD RDI,0x8
LEA RSI,[RBP + -0x1c8]
CALL 0x00103410
LEA RDI,[RBP + -0x1c8]
CALL 0x001031e0
LEA RDI,[RBP + -0x198]
CALL 0x00103260
ADD RSP,0x1f0
POP RBP
RET
|
/* serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) */
void __thiscall
serial_cpp::PortNotOpenedException::PortNotOpenedException
(PortNotOpenedException *this,char *param_1)
{
ostream *poVar1;
string local_1d0 [48];
stringstream local_1a0 [16];
ostream local_190 [376];
char *local_18;
PortNotOpenedException *local_10;
local_18 = param_1;
local_10 = this;
std::exception::exception((exception *)this);
*(int ***)this = &PTR__PortNotOpenedException_00116d78;
std::__cxx11::string::string((string *)(this + 8));
/* try { // try from 0010cce4 to 0010ccef has its CatchHandler @ 0010cd89 */
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 0010ccf9 to 0010cd4e has its CatchHandler @ 0010cd9d */
poVar1 = std::operator<<(local_190,"PortNotOpenedException ");
poVar1 = std::operator<<(poVar1,local_18);
std::operator<<(poVar1," failed.");
std::__cxx11::stringstream::str();
std::__cxx11::string::operator=((string *)(this + 8),local_1d0);
std::__cxx11::string::~string(local_1d0);
std::__cxx11::stringstream::~stringstream(local_1a0);
return;
}
| |
28,325 | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) | ami-iit[P]serial_cpp/include/serial_cpp/serial.h | PortNotOpenedException (const char * description) {
std::stringstream ss;
ss << "PortNotOpenedException " << description << " failed.";
e_what_ = ss.str();
} | O2 | c | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6831(%rip), %rax # 0xdd88
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x28(%rsp), %rdi
callq 0x31d0
leaq 0x38(%rsp), %rdi
leaq 0x23ba(%rip), %rsi # 0x993f
callq 0x32b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x32b0
leaq 0x236c(%rip), %rsi # 0x9908
movq %rax, %rdi
callq 0x32b0
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3440
leaq 0x8(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3350
movq %rbx, %rdi
callq 0x3140
leaq 0x28(%rsp), %rdi
callq 0x3210
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x75e9
movq %rax, %r15
jmp 0x75f6
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x3210
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3510
movq %r15, %rdi
callq 0x34d0
| _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc:
push r15
push r14
push rbx
sub rsp, 1B0h
mov r15, rsi
mov rbx, rdi
lea rax, off_DD88
mov [rdi], rax
lea r14, [rdi+8]
lea rax, [rdi+18h]
mov [rdi+8], rax
and qword ptr [rdi+10h], 0
mov byte ptr [rdi+18h], 0
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1C8h+var_190]
lea rsi, aPortnotopenede; "PortNotOpenedException "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r15
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aFailed; " failed."
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rbx, [rsp+1C8h+var_1C0]
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 1B0h
pop rbx
pop r14
pop r15
retn
jmp short loc_75E9
mov r15, rax
jmp short loc_75F6
loc_75E9:
mov r15, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_75F6:
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, r15
call __Unwind_Resume
| long long serial_cpp::PortNotOpenedException::PortNotOpenedException(
serial_cpp::PortNotOpenedException *this,
const char *a2)
{
long long v2; // rax
long long v3; // rax
_BYTE v5[32]; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v7[8]; // [rsp+38h] [rbp-190h] BYREF
_BYTE v8[392]; // [rsp+40h] [rbp-188h] BYREF
*(_QWORD *)this = off_DD88;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6);
v2 = std::operator<<<std::char_traits<char>>(v7, "PortNotOpenedException ");
v3 = std::operator<<<std::char_traits<char>>(v2, a2);
std::operator<<<std::char_traits<char>>(v3, " failed.");
std::stringbuf::str(v5, v8);
std::string::operator=((char *)this + 8, v5);
std::string::~string(v5);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
}
| PortNotOpenedException:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x1b0
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[0x10dd88]
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x8]
LEA RAX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RAX
AND qword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI + 0x18],0x0
LAB_0010756f:
LEA RDI,[RSP + 0x28]
CALL 0x001031d0
LEA RDI,[RSP + 0x38]
LAB_0010757e:
LEA RSI,[0x10993f]
CALL 0x001032b0
MOV RDI,RAX
MOV RSI,R15
CALL 0x001032b0
LEA RSI,[0x109908]
MOV RDI,RAX
CALL 0x001032b0
LEA RSI,[RSP + 0x40]
LAB_001075a9:
LEA RDI,[RSP + 0x8]
CALL 0x00103440
LAB_001075b3:
LEA RBX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00103350
MOV RDI,RBX
CALL 0x00103140
LEA RDI,[RSP + 0x28]
CALL 0x00103210
ADD RSP,0x1b0
POP RBX
POP R14
POP R15
RET
|
/* serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) */
void __thiscall
serial_cpp::PortNotOpenedException::PortNotOpenedException
(PortNotOpenedException *this,char *param_1)
{
ostream *poVar1;
string local_1c0 [32];
stringstream local_1a0 [16];
ostream local_190 [376];
*(int ***)this = &PTR__PortNotOpenedException_0010dd88;
*(PortNotOpenedException **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (PortNotOpenedException)0x0;
/* try { // try from 0010756f to 00107578 has its CatchHandler @ 001075e4 */
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 0010757e to 001075a3 has its CatchHandler @ 001075e9 */
poVar1 = std::operator<<(local_190,"PortNotOpenedException ");
poVar1 = std::operator<<(poVar1,param_1);
std::operator<<(poVar1," failed.");
/* try { // try from 001075a9 to 001075b2 has its CatchHandler @ 001075e2 */
std::__cxx11::stringbuf::str();
std::__cxx11::string::operator=((string *)(this + 8),local_1c0);
std::__cxx11::string::~string(local_1c0);
std::__cxx11::stringstream::~stringstream(local_1a0);
return;
}
| |
28,326 | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) | ami-iit[P]serial_cpp/include/serial_cpp/serial.h | PortNotOpenedException (const char * description) {
std::stringstream ss;
ss << "PortNotOpenedException " << description << " failed.";
e_what_ = ss.str();
} | O3 | c | serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x7901(%rip), %rax # 0xfd78
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %r13
movq %r13, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x38(%rsp), %r15
leaq 0x34a7(%rip), %rsi # 0xb94f
movl $0x17, %edx
movq %r15, %rdi
callq 0x3330
testq %r12, %r12
je 0x84d2
movq %r12, %rdi
callq 0x3130
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3330
jmp 0x84eb
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x58(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x34b0
leaq 0x3426(%rip), %rsi # 0xb918
movl $0x8, %edx
movq %r15, %rdi
callq 0x3330
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3460
leaq 0x8(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3360
movq (%rbx), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8538
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x7a61(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x856e
movq %rax, %r15
jmp 0x858f
movq %rax, %r15
movq 0x7a28(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x85a3
movq (%r13), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3530
movq %r15, %rdi
callq 0x34f0
nop
| _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B0h
mov r12, rsi
mov rbx, rdi
lea rax, off_FD78
mov [rdi], rax
lea r14, [rdi+8]
lea r13, [rdi+18h]
mov [rdi+8], r13
mov qword ptr [rdi+10h], 0
mov byte ptr [rdi+18h], 0
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r15, [rsp+1D8h+var_1A0]
lea rsi, aPortnotopenede; "PortNotOpenedException "
mov edx, 17h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test r12, r12
jz short loc_84D2
mov rdi, r12
call _strlen
mov rdi, r15
mov rsi, r12
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_84EB
loc_84D2:
mov rax, [rsp+1D8h+var_1A0]
mov rax, [rax-18h]
lea rdi, [r15+rax]
mov esi, [rsp+rax+1D8h+var_180]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_84EB:
lea rsi, aFailed; " failed."
mov edx, 8
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, [rsp+1D8h+var_198]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rbx, [rsp+1D8h+var_1D0]
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
lea rax, [rsp+1D8h+var_1C0]
cmp rdi, rax
jz short loc_8538
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8538:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_856E
mov r15, rax
jmp short loc_858F
loc_856E:
mov r15, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_858F:
mov rdi, [r14]; void *
cmp rdi, r13
jz short loc_85A3
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_85A3:
mov rdi, rbx; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, r15
call __Unwind_Resume
| void serial_cpp::PortNotOpenedException::PortNotOpenedException(
serial_cpp::PortNotOpenedException *this,
const char *a2)
{
long long v2; // rax
void *v3[2]; // [rsp+8h] [rbp-1D0h] BYREF
long long v4; // [rsp+18h] [rbp-1C0h] BYREF
_BYTE v5[16]; // [rsp+28h] [rbp-1B0h] BYREF
long long v6; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v7[104]; // [rsp+40h] [rbp-198h] BYREF
_BYTE v8[304]; // [rsp+A8h] [rbp-130h] BYREF
*(_QWORD *)this = off_FD78;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v5);
std::__ostream_insert<char,std::char_traits<char>>(&v6, "PortNotOpenedException ", 23LL);
if ( a2 )
{
v2 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(&v6, a2, v2);
}
else
{
std::ios::clear(&v7[*(_QWORD *)(v6 - 24) - 8], *(_DWORD *)&v7[*(_QWORD *)(v6 - 24) + 24] | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(&v6, " failed.", 8LL);
std::stringbuf::str(v3, v7);
std::string::operator=((char *)this + 8, v3);
if ( v3[0] != &v4 )
operator delete(v3[0], v4 + 1);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v5,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v8);
}
| PortNotOpenedException:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b0
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[0x10fd78]
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x8]
LEA R13,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],R13
MOV qword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI + 0x18],0x0
LAB_00108492:
LEA RDI,[RSP + 0x28]
CALL 0x001031c0
LEA R15,[RSP + 0x38]
LAB_001084a1:
LEA RSI,[0x10b94f]
MOV EDX,0x17
MOV RDI,R15
CALL 0x00103330
TEST R12,R12
JZ 0x001084d2
MOV RDI,R12
CALL 0x00103130
MOV RDI,R15
MOV RSI,R12
MOV RDX,RAX
CALL 0x00103330
JMP 0x001084eb
LAB_001084d2:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R15 + RAX*0x1]
MOV ESI,dword ptr [RSP + RAX*0x1 + 0x58]
OR ESI,0x1
CALL 0x001034b0
LAB_001084eb:
LEA RSI,[0x10b918]
MOV EDX,0x8
MOV RDI,R15
CALL 0x00103330
LEA RSI,[RSP + 0x40]
LAB_00108504:
LEA RDI,[RSP + 0x8]
CALL 0x00103460
LAB_0010850e:
LEA RBX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00103360
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00108538
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001032c0
LAB_00108538:
MOV RSI,qword ptr [0x0010ffa0]
LEA RDI,[RSP + 0x28]
CALL 0x00103200
LEA RDI,[RSP + 0xa8]
CALL 0x001030d0
ADD RSP,0x1b0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) */
void __thiscall
serial_cpp::PortNotOpenedException::PortNotOpenedException
(PortNotOpenedException *this,char *param_1)
{
size_t sVar1;
long *local_1d0 [2];
long local_1c0 [2];
stringstream local_1b0 [16];
long local_1a0 [4];
uint auStack_180 [20];
ios_base local_130 [264];
*(int ***)this = &PTR__PortNotOpenedException_0010fd78;
*(PortNotOpenedException **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (PortNotOpenedException)0x0;
/* try { // try from 00108492 to 0010849b has its CatchHandler @ 00108569 */
std::__cxx11::stringstream::stringstream(local_1b0);
/* try { // try from 001084a1 to 001084fe has its CatchHandler @ 0010856e */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a0,"PortNotOpenedException ",0x17);
if (param_1 == (char *)0x0) {
std::ios::clear((ostream *)local_1a0 + *(long *)(local_1a0[0] + -0x18),
*(uint *)((long)auStack_180 + *(long *)(local_1a0[0] + -0x18)) | 1);
}
else {
sVar1 = strlen(param_1);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0,param_1,sVar1);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0," failed.",8);
/* try { // try from 00108504 to 0010850d has its CatchHandler @ 00108567 */
std::__cxx11::stringbuf::str();
std::__cxx11::string::operator=((string *)(this + 8),(string *)local_1d0);
if (local_1d0[0] != local_1c0) {
operator_delete(local_1d0[0],local_1c0[0] + 1);
}
std::__cxx11::stringstream::~stringstream(local_1b0);
std::ios_base::~ios_base(local_130);
return;
}
| |
28,327 | list_builtin_chat_templates[abi:cxx11]() | monkey531[P]llama/common/arg.cpp | static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
} | O0 | cpp | list_builtin_chat_templates[abi:cxx11]():
subq $0x218, %rsp # imm = 0x218
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x210(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xf6fa0
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x5bda0
movl %eax, 0x44(%rsp)
jmp 0x95a1b
movl 0x44(%rsp), %eax
movl %eax, 0x1f4(%rsp)
movslq 0x1f4(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0xf6fb0
jmp 0x95a3d
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xf7050
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
callq 0x9eb90
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x5bda0
movl %eax, 0x2c(%rsp)
jmp 0x95a71
movl 0x2c(%rsp), %eax
movl %eax, 0x1f4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5c120
jmp 0x95a88
leaq 0x1f8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x9eab0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0x9eae0
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x9eb10
testb $0x1, %al
jne 0x95acb
jmp 0x95b7a
leaq 0x58(%rsp), %rdi
callq 0x9eb50
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0x5ba90
movq %rax, 0x10(%rsp)
jmp 0x95af3
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x9ebf0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
leaq 0x181d82(%rip), %rax # 0x2178a3
leaq 0x185a42(%rip), %rsi # 0x21b56a
cmoveq %rax, %rsi
callq 0x5ba90
jmp 0x95b33
jmp 0x95b35
leaq 0x58(%rsp), %rdi
callq 0x9ec30
jmp 0x95ab3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0x95baf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5c040
jmp 0x95baf
movq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5c4c0
jmp 0x95b8b
leaq 0x68(%rsp), %rdi
callq 0x5c040
leaq 0x1f8(%rsp), %rdi
callq 0xaa6a0
movq 0x38(%rsp), %rax
addq $0x218, %rsp # imm = 0x218
retq
leaq 0x1f8(%rsp), %rdi
callq 0xaa6a0
movq 0x1e8(%rsp), %rdi
callq 0x5bc20
nopl (%rax)
| _ZL27list_builtin_chat_templatesB5cxx11v:
sub rsp, 218h
mov [rsp+218h+var_1E8], rdi
mov rax, rdi
mov [rsp+218h+var_1E0], rax
mov [rsp+218h+var_8], rdi
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EEC2Ev; std::vector<char const*>::vector(void)
xor eax, eax
mov esi, eax
mov rdi, rsi
call _llama_chat_builtin_templates
mov [rsp+218h+var_1D4], eax
jmp short $+2
loc_95A1B:
mov eax, [rsp+218h+var_1D4]
mov [rsp+218h+var_24], eax
movsxd rsi, [rsp+218h+var_24]
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
jmp short $+2
loc_95A3D:
lea rdi, [rsp+218h+var_20]
mov [rsp+218h+var_200], rdi
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rdi, [rsp+218h+var_200]
mov [rsp+218h+var_1F8], rax
call _ZNKSt6vectorIPKcSaIS1_EE4sizeEv; std::vector<char const*>::size(void)
mov rdi, [rsp+218h+var_1F8]
mov rsi, rax
call _llama_chat_builtin_templates
mov [rsp+218h+var_1EC], eax
jmp short $+2
loc_95A71:
mov eax, [rsp+218h+var_1EC]
mov [rsp+218h+var_24], eax
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_95A88:
lea rax, [rsp+218h+var_20]
mov [rsp+218h+var_1B8], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE5beginEv; std::vector<char const*>::begin(void)
mov [rsp+218h+var_1C0], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE3endEv; std::vector<char const*>::end(void)
mov [rsp+218h+var_1C8], rax
loc_95AB3:
lea rdi, [rsp+218h+var_1C0]
lea rsi, [rsp+218h+var_1C8]
call _ZN9__gnu_cxxneIPPKcSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<char const**,std::vector<char const*>>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&,__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&)
test al, 1
jnz short loc_95ACB
jmp loc_95B7A
loc_95ACB:
lea rdi, [rsp+218h+var_1C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(void)
mov [rsp+218h+var_1D0], rax
mov rax, [rsp+218h+var_1D0]
mov rsi, [rax]
lea rdi, [rsp+218h+var_1B0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+218h+var_208], rax
jmp short $+2
loc_95AF3:
mov rax, [rsp+218h+var_1D0]
mov [rsp+218h+var_210], rax
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE4backEv; std::vector<char const*>::back(void)
mov rdi, [rsp+218h+var_208]
mov rcx, rax
mov rax, [rsp+218h+var_210]
sub rax, rcx
lea rax, aExampleSpecifi+27h; ""
lea rsi, aZuD+6; ", "
cmovz rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_95B33:
jmp short $+2
loc_95B35:
lea rdi, [rsp+218h+var_1C0]
call _ZN9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(void)
jmp loc_95AB3
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
jmp short loc_95BAF
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
jmp short loc_95BAF
loc_95B7A:
mov rdi, [rsp+218h+var_1E8]
lea rsi, [rsp+218h+var_1B0]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_95B8B:
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+218h+var_20]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rax, [rsp+218h+var_1E0]
add rsp, 218h
retn
loc_95BAF:
lea rdi, [rsp+arg_1F0]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rdi, [rsp+arg_1E0]
call __Unwind_Resume
| long long list_builtin_chat_templates[abi:cxx11](long long a1)
{
long long v1; // rdi
char *v2; // rsi
long long v4; // [rsp+20h] [rbp-1F8h]
int v7; // [rsp+44h] [rbp-1D4h]
_QWORD *v8; // [rsp+48h] [rbp-1D0h]
long long v9; // [rsp+50h] [rbp-1C8h] BYREF
_QWORD v10[2]; // [rsp+58h] [rbp-1C0h] BYREF
_BYTE v11[396]; // [rsp+68h] [rbp-1B0h] BYREF
int v12; // [rsp+1F4h] [rbp-24h]
_BYTE v13[24]; // [rsp+1F8h] [rbp-20h] BYREF
long long v14; // [rsp+210h] [rbp-8h]
v14 = a1;
std::vector<char const*>::vector(v13);
v7 = llama_chat_builtin_templates(0LL);
std::vector<char const*>::resize(v13, v7);
v4 = std::vector<char const*>::data();
std::vector<char const*>::size(v13);
v12 = llama_chat_builtin_templates(v4);
std::ostringstream::basic_ostringstream(v11);
v10[1] = v13;
v10[0] = std::vector<char const*>::begin(v13);
v9 = std::vector<char const*>::end(v13);
while ( (__gnu_cxx::operator!=<char const**,std::vector<char const*>>(v10, &v9) & 1) != 0 )
{
v8 = (_QWORD *)__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(v10);
v1 = std::operator<<<std::char_traits<char>>(v11, *v8);
v2 = ", ";
if ( v8 == (_QWORD *)std::vector<char const*>::back(v13) )
v2 = "";
std::operator<<<std::char_traits<char>>(v1, v2);
__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(v10);
}
std::ostringstream::str(a1, v11);
std::ostringstream::~ostringstream(v11);
std::vector<char const*>::~vector(v13);
return a1;
}
| list_builtin_chat_templates[abi:cxx11]:
SUB RSP,0x218
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x210],RDI
LEA RDI,[RSP + 0x1f8]
CALL 0x001f6fa0
LAB_00195a09:
XOR EAX,EAX
MOV ESI,EAX
MOV RDI,RSI
CALL 0x0015bda0
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00195a1b
LAB_00195a1b:
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0x1f4],EAX
MOVSXD RSI,dword ptr [RSP + 0x1f4]
LEA RDI,[RSP + 0x1f8]
CALL 0x001f6fb0
JMP 0x00195a3d
LAB_00195a3d:
LEA RDI,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001f7050
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x0019eb90
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,RAX
CALL 0x0015bda0
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00195a71
LAB_00195a71:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x1f4],EAX
LEA RDI,[RSP + 0x68]
CALL 0x0015c120
JMP 0x00195a88
LAB_00195a88:
LEA RAX,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0019eab0
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0019eae0
MOV qword ptr [RSP + 0x50],RAX
LAB_00195ab3:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x50]
CALL 0x0019eb10
TEST AL,0x1
JNZ 0x00195acb
JMP 0x00195b7a
LAB_00195acb:
LEA RDI,[RSP + 0x58]
CALL 0x0019eb50
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RAX]
LAB_00195ae2:
LEA RDI,[RSP + 0x68]
CALL 0x0015ba90
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00195af3
LAB_00195af3:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x1f8]
CALL 0x0019ebf0
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,RCX
LEA RAX,[0x3178a3]
LEA RSI,[0x31b56a]
CMOVZ RSI,RAX
CALL 0x0015ba90
JMP 0x00195b33
LAB_00195b33:
JMP 0x00195b35
LAB_00195b35:
LEA RDI,[RSP + 0x58]
CALL 0x0019ec30
JMP 0x00195ab3
LAB_00195b7a:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x68]
CALL 0x0015c4c0
LAB_00195b89:
JMP 0x00195b8b
LAB_00195b8b:
LEA RDI,[RSP + 0x68]
CALL 0x0015c040
LEA RDI,[RSP + 0x1f8]
CALL 0x001aa6a0
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x218
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
int8 list_builtin_chat_templates_abi_cxx11_(void)
{
bool bVar1;
int8 uVar2;
int8 uVar3;
int8 *puVar4;
ostream *poVar5;
int8 *puVar6;
char *pcVar7;
int8 in_RDI;
int8 local_1c8;
int8 local_1c0;
vector<char_const*,std::allocator<char_const*>> *local_1b8;
ostringstream local_1b0 [396];
int local_24;
vector<char_const*,std::allocator<char_const*>> local_20 [32];
std::vector<char_const*,std::allocator<char_const*>>::vector(local_20);
/* try { // try from 00195a09 to 00195a85 has its CatchHandler @ 00195b44 */
local_24 = llama_chat_builtin_templates(0);
std::vector<char_const*,std::allocator<char_const*>>::resize(local_20,(long)local_24);
uVar2 = std::vector<char_const*,std::allocator<char_const*>>::data(local_20);
uVar3 = std::vector<char_const*,std::allocator<char_const*>>::size(local_20);
local_24 = llama_chat_builtin_templates(uVar2,uVar3);
std::__cxx11::ostringstream::ostringstream(local_1b0);
local_1b8 = local_20;
local_1c0 = std::vector<char_const*,std::allocator<char_const*>>::begin(local_1b8);
local_1c8 = std::vector<char_const*,std::allocator<char_const*>>::end(local_1b8);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8);
if (!bVar1) break;
puVar4 = (int8 *)
__gnu_cxx::
__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>::
operator*((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
/* try { // try from 00195ae2 to 00195b88 has its CatchHandler @ 00195b5a */
poVar5 = std::operator<<((ostream *)local_1b0,(char *)*puVar4);
puVar6 = (int8 *)std::vector<char_const*,std::allocator<char_const*>>::back(local_20);
pcVar7 = ", ";
if (puVar4 == puVar6) {
pcVar7 = "";
}
std::operator<<(poVar5,pcVar7);
__gnu_cxx::__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
::operator++((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
}
std::__cxx11::ostringstream::str();
std::__cxx11::ostringstream::~ostringstream(local_1b0);
std::vector<char_const*,std::allocator<char_const*>>::~vector(local_20);
return in_RDI;
}
| |
28,328 | my_read | eloqsql/mysys/my_read.c | size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count);
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{
int got_errno= my_errno= errno;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d",
(int) readbytes, (ulong) Count, Filedes,
got_errno));
if (got_errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR)
{
DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld",
(long) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Ok on read */
else
readbytes+= save_count;
break;
}
DBUG_RETURN(readbytes);
} | O3 | c | my_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, -0x2c(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, %r15d
testb $0x1a, %cl
jne 0x2b85f
leaq 0x33a88c(%rip), %rax # 0x3660e8
movq (%rax), %r15
orq %rcx, %r15
callq 0x24060
movq %rax, -0x50(%rbp)
movl $0x0, (%rax)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x24490
movq %rax, %r14
movl %r15d, %eax
andl $0x6, %eax
movq %rax, -0x38(%rbp)
cmpq %r12, %r14
je 0x2b933
movq %r15, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %r15
cmpq $0x0, -0x38(%rbp)
sete %r13b
movl (%r15), %r15d
callq 0x2696e
movl %r15d, (%rax)
cmpq $-0x1, %r14
sete %al
testl %r15d, %r15d
je 0x2b8ca
orb %r13b, %al
jne 0x2b8d5
callq 0x2696e
movl $0xaf, (%rax)
testq %r14, %r14
sete %al
cmpl $-0x1, %r14d
sete %cl
orb %al, %cl
cmpl $0x4, %r15d
sete %al
testb %al, %cl
jne 0x2b90e
leaq 0x1(%r14), %rax
cmpq $0x2, %rax
jb 0x2b957
movq -0x40(%rbp), %rax
andl $0x200, %eax # imm = 0x200
je 0x2b957
addq %r14, %rbx
subq %r14, %r12
addq %r14, -0x48(%rbp)
movq -0x50(%rbp), %r15
movl $0x0, (%r15)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x24490
movq %rax, %r14
cmpq %r12, %rax
jne 0x2b8a5
movq %r12, %r14
movq -0x48(%rbp), %rcx
addq %r14, %rcx
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
cmoveq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
testb $0x1a, %al
je 0x2b9b7
cmpq $-0x1, %r14
je 0x2b9e4
cmpq $0x0, -0x38(%rbp)
je 0x2ba1b
movq -0x40(%rbp), %r12
movl %r12d, %ebx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0x2dd38
movl $0x9, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2a83f
btl $0x9, %r12d
movl $0x1, %eax
movq %rax, -0x38(%rbp)
movq $-0x1, %rax
jb 0x2b936
jmp 0x2b948
btl $0x9, %eax
setae %cl
cmpq $0x0, -0x38(%rbp)
setne %dl
movq $-0x1, %rax
cmpq $-0x1, %r14
je 0x2b948
andb %cl, %dl
je 0x2b936
jmp 0x2b948
movq -0x40(%rbp), %rbx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0x2dd38
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2a83f
movq $-0x1, %rax
jmp 0x2b948
movq $0x0, -0x38(%rbp)
jmp 0x2b936
| my_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov rbx, rsi
mov [rbp+var_2C], edi
mov [rbp+var_48], 0
mov r15d, 0
test cl, 1Ah
jnz short loc_2B85F
lea rax, my_global_flags
mov r15, [rax]
loc_2B85F:
or r15, rcx
call ___errno_location
mov [rbp+var_50], rax
mov dword ptr [rax], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
mov eax, r15d
and eax, 6
mov [rbp+var_38], rax
cmp r14, r12
jz loc_2B933
mov [rbp+var_40], r15
mov [rbp+var_48], 0
mov r15, [rbp+var_50]
loc_2B8A5:
cmp [rbp+var_38], 0
setz r13b
mov r15d, [r15]
call _my_thread_var
mov [rax], r15d
cmp r14, 0FFFFFFFFFFFFFFFFh
setz al
test r15d, r15d
jz short loc_2B8CA
or al, r13b
jnz short loc_2B8D5
loc_2B8CA:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_2B8D5:
test r14, r14
setz al
cmp r14d, 0FFFFFFFFh
setz cl
or cl, al
cmp r15d, 4
setz al
test cl, al
jnz short loc_2B90E
lea rax, [r14+1]
cmp rax, 2
jb short loc_2B957
mov rax, [rbp+var_40]
and eax, 200h
jz short loc_2B957
add rbx, r14
sub r12, r14
add [rbp+var_48], r14
loc_2B90E:
mov r15, [rbp+var_50]
mov dword ptr [r15], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
cmp rax, r12
jnz loc_2B8A5
loc_2B933:
mov r14, r12
loc_2B936:
mov rcx, [rbp+var_48]
add rcx, r14
xor eax, eax
cmp [rbp+var_38], 0
cmovz rax, rcx
loc_2B948:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2B957:
mov rax, [rbp+var_40]
test al, 1Ah
jz short loc_2B9B7
cmp r14, 0FFFFFFFFFFFFFFFFh
jz short loc_2B9E4
cmp [rbp+var_38], 0
jz loc_2BA1B
mov r12, [rbp+var_40]
mov ebx, r12d
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 9
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
bt r12d, 9
mov eax, 1
mov [rbp+var_38], rax
mov rax, 0FFFFFFFFFFFFFFFFh
jb short loc_2B936
jmp short loc_2B948
loc_2B9B7:
bt eax, 9
setnb cl
cmp [rbp+var_38], 0
setnz dl
mov rax, 0FFFFFFFFFFFFFFFFh
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_2B948
and dl, cl
jz loc_2B936
jmp loc_2B948
loc_2B9E4:
mov rbx, [rbp+var_40]
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 2
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
mov rax, 0FFFFFFFFFFFFFFFFh
jmp loc_2B948
loc_2BA1B:
mov [rbp+var_38], 0
jmp loc_2B936
| long long my_read(long long a1, long long a2, long long a3, __int16 a4)
{
long long v5; // rbx
__int16 v6; // r15
__int16 v7; // r15
long long v8; // r14
unsigned int *v9; // r15
unsigned int v10; // r15d
long long result; // rax
long long v12; // rax
long long v13; // rax
unsigned int *v14; // [rsp+0h] [rbp-50h]
long long v15; // [rsp+8h] [rbp-48h]
__int16 v16; // [rsp+10h] [rbp-40h]
long long v17; // [rsp+18h] [rbp-38h]
v5 = a2;
v15 = 0LL;
v6 = 0;
if ( (a4 & 0x1A) == 0 )
v6 = my_global_flags;
v7 = a4 | v6;
v14 = (unsigned int *)__errno_location(a1);
*v14 = 0;
v8 = read((unsigned int)a1, a2, a3);
v17 = v7 & 6;
if ( v8 == a3 )
{
LABEL_13:
v8 = a3;
goto LABEL_14;
}
v16 = v7;
v15 = 0LL;
v9 = v14;
while ( 1 )
{
v10 = *v9;
*(_DWORD *)my_thread_var() = v10;
if ( !v10 || v17 != 0 && v8 != -1 )
*(_DWORD *)my_thread_var() = 175;
if ( v10 == 4 && (v8 == 0 || (_DWORD)v8 == -1) )
goto LABEL_12;
if ( (unsigned long long)(v8 + 1) < 2 || (v16 & 0x200) == 0 )
break;
v5 += v8;
a3 -= v8;
v15 += v8;
LABEL_12:
v9 = v14;
*v14 = 0;
v8 = read((unsigned int)a1, v5, a3);
if ( v8 == a3 )
goto LABEL_13;
}
if ( (v16 & 0x1A) != 0 )
{
if ( v8 == -1 )
{
v13 = my_filename((unsigned int)a1);
my_error(2u, v16 & 0x440 | 4, v13, v10);
return -1LL;
}
if ( v17 )
{
v12 = my_filename((unsigned int)a1);
my_error(9u, v16 & 0x440 | 4, v12, v10);
v17 = 1LL;
result = -1LL;
if ( (v16 & 0x200) == 0 )
return result;
}
else
{
v17 = 0LL;
}
LABEL_14:
result = 0LL;
if ( !v17 )
return v8 + v15;
}
else
{
result = -1LL;
if ( v8 != -1 && ((v16 & 0x200) != 0 || v17 == 0) )
goto LABEL_14;
}
return result;
}
| my_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV RBX,RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x48],0x0
MOV R15D,0x0
TEST CL,0x1a
JNZ 0x0012b85f
LEA RAX,[0x4660e8]
MOV R15,qword ptr [RAX]
LAB_0012b85f:
OR R15,RCX
CALL 0x00124060
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00124490
MOV R14,RAX
MOV EAX,R15D
AND EAX,0x6
MOV qword ptr [RBP + -0x38],RAX
CMP R14,R12
JZ 0x0012b933
MOV qword ptr [RBP + -0x40],R15
MOV qword ptr [RBP + -0x48],0x0
MOV R15,qword ptr [RBP + -0x50]
LAB_0012b8a5:
CMP qword ptr [RBP + -0x38],0x0
SETZ R13B
MOV R15D,dword ptr [R15]
CALL 0x0012696e
MOV dword ptr [RAX],R15D
CMP R14,-0x1
SETZ AL
TEST R15D,R15D
JZ 0x0012b8ca
OR AL,R13B
JNZ 0x0012b8d5
LAB_0012b8ca:
CALL 0x0012696e
MOV dword ptr [RAX],0xaf
LAB_0012b8d5:
TEST R14,R14
SETZ AL
CMP R14D,-0x1
SETZ CL
OR CL,AL
CMP R15D,0x4
SETZ AL
TEST CL,AL
JNZ 0x0012b90e
LEA RAX,[R14 + 0x1]
CMP RAX,0x2
JC 0x0012b957
MOV RAX,qword ptr [RBP + -0x40]
AND EAX,0x200
JZ 0x0012b957
ADD RBX,R14
SUB R12,R14
ADD qword ptr [RBP + -0x48],R14
LAB_0012b90e:
MOV R15,qword ptr [RBP + -0x50]
MOV dword ptr [R15],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00124490
MOV R14,RAX
CMP RAX,R12
JNZ 0x0012b8a5
LAB_0012b933:
MOV R14,R12
LAB_0012b936:
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,R14
XOR EAX,EAX
CMP qword ptr [RBP + -0x38],0x0
CMOVZ RAX,RCX
LAB_0012b948:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012b957:
MOV RAX,qword ptr [RBP + -0x40]
TEST AL,0x1a
JZ 0x0012b9b7
CMP R14,-0x1
JZ 0x0012b9e4
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0012ba1b
MOV R12,qword ptr [RBP + -0x40]
MOV EBX,R12D
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x0012dd38
MOV EDI,0x9
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x0012a83f
BT R12D,0x9
MOV EAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,-0x1
JC 0x0012b936
JMP 0x0012b948
LAB_0012b9b7:
BT EAX,0x9
SETNC CL
CMP qword ptr [RBP + -0x38],0x0
SETNZ DL
MOV RAX,-0x1
CMP R14,-0x1
JZ 0x0012b948
AND DL,CL
JZ 0x0012b936
JMP 0x0012b948
LAB_0012b9e4:
MOV RBX,qword ptr [RBP + -0x40]
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x0012dd38
MOV EDI,0x2
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x0012a83f
MOV RAX,-0x1
JMP 0x0012b948
LAB_0012ba1b:
MOV qword ptr [RBP + -0x38],0x0
JMP 0x0012b936
|
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
uint uVar2;
int *piVar4;
size_t sVar5;
int *piVar6;
int4 *puVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
long local_50;
uint uVar3;
local_50 = 0;
uVar10 = 0;
if ((param_4 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
uVar10 = uVar10 | param_4;
piVar4 = __errno_location();
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
uVar3 = (uint)uVar10;
uVar2 = uVar3 & 6;
if (sVar5 != param_3) {
local_50 = 0;
do {
iVar1 = *piVar4;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
if ((iVar1 == 0) || (sVar5 != 0xffffffffffffffff && (uVar10 & 6) != 0)) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xaf;
}
if ((int)sVar5 != -1 && sVar5 != 0 || iVar1 != 4) {
if ((sVar5 + 1 < 2) || ((uVar10 & 0x200) == 0)) {
param_3 = sVar5;
if ((uVar10 & 0x1a) == 0) {
if (sVar5 == 0xffffffffffffffff) {
return -1;
}
if ((uVar10 & 6) != 0 && (uVar3 >> 9 & 1) == 0) {
return -1;
}
}
else {
if (sVar5 == 0xffffffffffffffff) {
uVar9 = my_filename(param_1);
my_error(2,uVar3 & 0x440 | 4,uVar9,iVar1);
return -1;
}
if ((uVar10 & 6) == 0) {
uVar2 = 0;
}
else {
uVar9 = my_filename(param_1);
my_error(9,uVar3 & 0x440 | 4,uVar9,iVar1);
uVar2 = 1;
if ((uVar3 >> 9 & 1) == 0) {
return -1;
}
}
}
break;
}
param_2 = (void *)((long)param_2 + sVar5);
param_3 = param_3 - sVar5;
local_50 = local_50 + sVar5;
}
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
} while (sVar5 != param_3);
}
lVar8 = 0;
if (uVar2 == 0) {
lVar8 = local_50 + param_3;
}
return lVar8;
}
| |
28,329 | my_strtoll10 | eloqsql/strings/my_strtoll10.c | longlong my_strtoll10(const char *nptr, char **endptr, int *error)
{
const char *s, *end, *start, *n_end, *true_end;
char *dummy;
uchar c;
unsigned long i, j, k;
ulonglong li;
int negative;
ulong cutoff, cutoff2, cutoff3;
s= nptr;
/* If fixed length string */
if (endptr)
{
end= *endptr;
/* Skip leading spaces */
for ( ; s < end && my_isspace(&my_charset_latin1, *s) ; )
s++;
if (s == end)
goto no_conv;
}
else
{
endptr= &dummy; /* Easier end test */
/* Skip leading spaces */
for ( ; ; s++)
{
if (!*s)
goto no_conv;
if (!my_isspace(&my_charset_latin1, *s))
break;
}
/* This number must be big to guard against a lot of pre-zeros */
end= s+65535; /* Can't be longer than this */
}
/* Check for a sign. */
negative= 0;
if (*s == '-')
{
*error= -1; /* Mark as negative number */
negative= 1;
if (++s == end)
goto no_conv;
cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2;
cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100;
cutoff3= MAX_NEGATIVE_NUMBER % 100;
}
else
{
*error= 0;
if (*s == '+')
{
if (++s == end)
goto no_conv;
}
cutoff= ULONGLONG_MAX / LFACTOR2;
cutoff2= ULONGLONG_MAX % LFACTOR2 / 100;
cutoff3= ULONGLONG_MAX % 100;
}
/* Handle case where we have a lot of pre-zero */
if (*s == '0')
{
i= 0;
do
{
if (++s == end)
goto end_i; /* Return 0 */
}
while (*s == '0');
n_end= s+ INIT_CNT;
}
else
{
/* Read first digit to check that it's a valid number */
if ((c= (*s-'0')) > 9)
goto no_conv;
i= c;
n_end= ++s+ INIT_CNT-1;
}
/* Handle first 9 digits and store them in i */
if (n_end > end)
n_end= end;
for (; s != n_end ; s++)
{
if ((c= (*s-'0')) > 9)
goto end_i;
i= i*10+c;
}
if (s == end)
goto end_i;
/* Handle next 9 digits and store them in j */
j= 0;
start= s; /* Used to know how much to shift i */
n_end= true_end= s + INIT_CNT;
if (n_end > end)
n_end= end;
do
{
if ((c= (*s-'0')) > 9)
goto end_i_and_j;
j= j*10+c;
} while (++s != n_end);
if (s == end)
{
if (s != true_end)
goto end_i_and_j;
goto end3;
}
if ((c= (*s-'0')) > 9)
goto end3;
/* Handle the next 1 or 2 digits and store them in k */
k=c;
if (++s == end || (c= (*s-'0')) > 9)
goto end4;
k= k*10+c;
*endptr= (char*) ++s;
/* number string should have ended here */
if (s != end && (c= (*s-'0')) <= 9)
goto overflow;
/* Check that we didn't get an overflow with the last digit */
if (i > cutoff || (i == cutoff && (j > cutoff2 || (j == cutoff2 &&
k > cutoff3))))
goto overflow;
li=i*LFACTOR2+ (ulonglong) j*100 + k;
return (longlong) li;
overflow: /* *endptr is set here */
*error= MY_ERRNO_ERANGE;
return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX;
end_i:
*endptr= (char*) s;
return (negative ? ((longlong) -(long) i) : (longlong) i);
end_i_and_j:
li= (ulonglong) i * lfactor[(uint) (s-start)] + j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end3:
li=(ulonglong) i*LFACTOR+ (ulonglong) j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end4:
li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k;
*endptr= (char*) s;
if (negative)
{
if (li > MAX_NEGATIVE_NUMBER)
goto overflow;
return -((longlong) li);
}
return (longlong) li;
no_conv:
/* There was no number to convert. */
*error= MY_ERRNO_EDOM;
*endptr= (char *) nptr;
return 0;
} | O3 | c | my_strtoll10:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x9a076
movq (%rsi), %r8
movq %rdi, %rax
cmpq %rdi, %r8
jbe 0x9a066
leaq 0x2d9fd8(%rip), %rax # 0x374020
movq 0x40(%rax), %rcx
movq %rdi, %rax
movzbl (%rax), %r9d
testb $0x8, 0x1(%rcx,%r9)
je 0x9a066
incq %rax
cmpq %r8, %rax
jne 0x9a04f
movq %r8, %rax
cmpq %r8, %rax
je 0x9a154
movb (%rax), %cl
movq %r8, %rbx
jmp 0x9a0c2
movb (%rdi), %cl
leaq -0x30(%rbp), %rsi
testb %cl, %cl
je 0x9a154
leaq 0x2d9f95(%rip), %rax # 0x374020
movq 0x40(%rax), %r8
leaq 0xffff(%rdi), %rbx
movq %rdi, %rax
movzbl %cl, %r9d
testb $0x8, 0x1(%r8,%r9)
je 0x9a0b7
movb 0x1(%rax), %cl
incq %rax
incq %rbx
testb %cl, %cl
jne 0x9a099
jmp 0x9a154
leaq 0xffff(%rax), %r8
leaq -0x30(%rbp), %rsi
cmpb $0x2d, %cl
jne 0x9a0e9
movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF
incq %rax
cmpq %r8, %rax
je 0x9a154
movl $0x8, %r9d
movl $0x15f797ae, %r10d # imm = 0x15F797AE
movl $0x57f5ff8, %r11d # imm = 0x57F5FF8
jmp 0x9a112
movl $0x0, (%rdx)
movb (%rax), %r14b
cmpb $0x2b, %r14b
jne 0x9a117
incq %rax
cmpq %r8, %rax
je 0x9a154
movl $0xf, %r9d
movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C
movl $0xafebff0, %r11d # imm = 0xAFEBFF0
movb (%rax), %r14b
jmp 0x9a129
movl $0xf, %r9d
movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C
movl $0xafebff0, %r11d # imm = 0xAFEBFF0
cmpb $0x30, %r14b
jne 0x9a14a
xorl %edi, %edi
incq %rax
cmpq %r8, %rax
je 0x9a259
cmpb $0x30, (%rax)
je 0x9a131
leaq 0x9(%rax), %rbx
xorl %edi, %edi
jmp 0x9a172
addb $-0x30, %r14b
cmpb $0x9, %r14b
jbe 0x9a164
movl $0x21, (%rdx)
movq %rdi, (%rsi)
xorl %eax, %eax
jmp 0x9a269
movzbl %r14b, %edi
movq %rax, %rbx
incq %rax
addq $0x9, %rbx
cmpq %r8, %rbx
cmovaq %r8, %rbx
cmpq %rbx, %rax
je 0x9a1a0
movb (%rax), %r14b
addb $-0x30, %r14b
cmpb $0x9, %r14b
ja 0x9a256
leaq (%rdi,%rdi,4), %rdi
movzbl %r14b, %r14d
leaq (%r14,%rdi,2), %rdi
incq %rax
jmp 0x9a179
cmpq %r8, %rax
je 0x9a256
leaq 0x9(%rax), %r12
cmpq %r8, %r12
cmovaq %r8, %r12
leaq 0x1(%rax), %r14
movl $0x9, %r13d
xorl %ebx, %ebx
movb -0x1(%r14), %r15b
addb $-0x30, %r15b
cmpb $0x9, %r15b
ja 0x9a274
leaq (%rbx,%rbx,4), %rbx
movzbl %r15b, %r15d
leaq (%r15,%rbx,2), %rbx
leaq 0x1(%r14), %r15
decq %r13
cmpq %r12, %r14
movq %r15, %r14
jne 0x9a1c0
leaq -0x1(%r15), %r14
cmpq %r8, %r12
je 0x9a299
movb (%r14), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x9a29e
movzbl %al, %r14d
cmpq %r8, %r15
je 0x9a21d
movb (%r15), %al
addb $-0x30, %al
cmpb $0x9, %al
jbe 0x9a2ba
movabsq $0x2540be400, %rax # imm = 0x2540BE400
imulq %rax, %rdi
leaq (%rbx,%rbx,4), %rax
leaq (%rdi,%rax,2), %rax
addq %r14, %rax
movq %r15, (%rsi)
cmpb $0x2d, %cl
jne 0x9a269
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
cmpq %rsi, %rax
ja 0x9a2f5
negq %rax
jmp 0x9a269
movq %rax, %rbx
movq %rdi, %rax
negq %rax
cmpb $0x2d, %cl
movq %rbx, (%rsi)
cmovneq %rdi, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decq %r14
movl %r14d, %edx
subl %eax, %edx
leaq 0x28a16d(%rip), %rax # 0x3243f0
imulq (%rax,%rdx,8), %rdi
addq %rbx, %rdi
movq %rdi, %rax
negq %rax
cmpb $0x2d, %cl
movq %r14, (%rsi)
jmp 0x9a265
testq %r13, %r13
jne 0x9a277
imulq $0x3b9aca00, %rdi, %rax # imm = 0x3B9ACA00
addq %rax, %rbx
movq %rbx, %rax
negq %rax
cmpb $0x2d, %cl
movq %r14, (%rsi)
cmovneq %rbx, %rax
jmp 0x9a269
leaq 0x1(%r15), %r12
movq %r12, (%rsi)
cmpq %r8, %r12
je 0x9a2d4
movb 0x1(%r15), %sil
addb $-0x30, %sil
cmpb $0xa, %sil
jb 0x9a2f5
cmpq %r11, %rdi
ja 0x9a2f5
leaq (%r14,%r14,4), %rsi
movzbl %al, %eax
leaq (%rax,%rsi,2), %rsi
cmpq %r11, %rdi
jne 0x9a310
cmpq %r10, %rbx
ja 0x9a2f5
jne 0x9a310
cmpl %r9d, %esi
jbe 0x9a310
xorl %eax, %eax
cmpb $0x2d, %cl
setne %al
movl $0x22, (%rdx)
negq %rax
btsq $0x3f, %rax
jmp 0x9a269
movabsq $0x174876e800, %rax # imm = 0x174876E800
imulq %rax, %rdi
imulq $0x64, %rbx, %rax
addq %rdi, %rax
addq %rsi, %rax
jmp 0x9a269
nopl (%rax)
| my_strtoll10:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
test rsi, rsi
jz short loc_9A076
mov r8, [rsi]
mov rax, rdi
cmp r8, rdi
jbe short loc_9A066
lea rax, my_charset_latin1
mov rcx, [rax+40h]
mov rax, rdi
loc_9A04F:
movzx r9d, byte ptr [rax]
test byte ptr [rcx+r9+1], 8
jz short loc_9A066
inc rax
cmp rax, r8
jnz short loc_9A04F
mov rax, r8
loc_9A066:
cmp rax, r8
jz loc_9A154
mov cl, [rax]
mov rbx, r8
jmp short loc_9A0C2
loc_9A076:
mov cl, [rdi]
lea rsi, [rbp+var_30]
test cl, cl
jz loc_9A154
lea rax, my_charset_latin1
mov r8, [rax+40h]
lea rbx, [rdi+0FFFFh]
mov rax, rdi
loc_9A099:
movzx r9d, cl
test byte ptr [r8+r9+1], 8
jz short loc_9A0B7
mov cl, [rax+1]
inc rax
inc rbx
test cl, cl
jnz short loc_9A099
jmp loc_9A154
loc_9A0B7:
lea r8, [rax+0FFFFh]
lea rsi, [rbp+var_30]
loc_9A0C2:
cmp cl, 2Dh ; '-'
jnz short loc_9A0E9
mov dword ptr [rdx], 0FFFFFFFFh
inc rax
cmp rax, r8
jz short loc_9A154
mov r9d, 8
mov r10d, 15F797AEh
mov r11d, 57F5FF8h
jmp short loc_9A112
loc_9A0E9:
mov dword ptr [rdx], 0
mov r14b, [rax]
cmp r14b, 2Bh ; '+'
jnz short loc_9A117
inc rax
cmp rax, r8
jz short loc_9A154
mov r9d, 0Fh
mov r10d, 2BEF2F5Ch
mov r11d, 0AFEBFF0h
loc_9A112:
mov r14b, [rax]
jmp short loc_9A129
loc_9A117:
mov r9d, 0Fh
mov r10d, 2BEF2F5Ch
mov r11d, 0AFEBFF0h
loc_9A129:
cmp r14b, 30h ; '0'
jnz short loc_9A14A
xor edi, edi
loc_9A131:
inc rax
cmp rax, r8
jz loc_9A259
cmp byte ptr [rax], 30h ; '0'
jz short loc_9A131
lea rbx, [rax+9]
xor edi, edi
jmp short loc_9A172
loc_9A14A:
add r14b, 0D0h
cmp r14b, 9
jbe short loc_9A164
loc_9A154:
mov dword ptr [rdx], 21h ; '!'
mov [rsi], rdi
xor eax, eax
jmp loc_9A269
loc_9A164:
movzx edi, r14b
mov rbx, rax
inc rax
add rbx, 9
loc_9A172:
cmp rbx, r8
cmova rbx, r8
loc_9A179:
cmp rax, rbx
jz short loc_9A1A0
mov r14b, [rax]
add r14b, 0D0h
cmp r14b, 9
ja loc_9A256
lea rdi, [rdi+rdi*4]
movzx r14d, r14b
lea rdi, [r14+rdi*2]
inc rax
jmp short loc_9A179
loc_9A1A0:
cmp rax, r8
jz loc_9A256
lea r12, [rax+9]
cmp r12, r8
cmova r12, r8
lea r14, [rax+1]
mov r13d, 9
xor ebx, ebx
loc_9A1C0:
mov r15b, [r14-1]
add r15b, 0D0h
cmp r15b, 9
ja loc_9A274
lea rbx, [rbx+rbx*4]
movzx r15d, r15b
lea rbx, [r15+rbx*2]
lea r15, [r14+1]
dec r13
cmp r14, r12
mov r14, r15
jnz short loc_9A1C0
lea r14, [r15-1]
cmp r12, r8
jz loc_9A299
mov al, [r14]
add al, 0D0h
cmp al, 9
ja loc_9A29E
movzx r14d, al
cmp r15, r8
jz short loc_9A21D
mov al, [r15]
add al, 0D0h
cmp al, 9
jbe loc_9A2BA
loc_9A21D:
mov rax, 2540BE400h
imul rdi, rax
lea rax, [rbx+rbx*4]
lea rax, [rdi+rax*2]
add rax, r14
mov [rsi], r15
cmp cl, 2Dh ; '-'
jnz short loc_9A269
mov rsi, 8000000000000000h
cmp rax, rsi
ja loc_9A2F5
neg rax
jmp short loc_9A269
loc_9A256:
mov rbx, rax
loc_9A259:
mov rax, rdi
neg rax
cmp cl, 2Dh ; '-'
mov [rsi], rbx
loc_9A265:
cmovnz rax, rdi
loc_9A269:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A274:
dec r14
loc_9A277:
mov edx, r14d
sub edx, eax
lea rax, lfactor_0
imul rdi, [rax+rdx*8]
add rdi, rbx
mov rax, rdi
neg rax
cmp cl, 2Dh ; '-'
mov [rsi], r14
jmp short loc_9A265
loc_9A299:
test r13, r13
jnz short loc_9A277
loc_9A29E:
imul rax, rdi, 3B9ACA00h
add rbx, rax
mov rax, rbx
neg rax
cmp cl, 2Dh ; '-'
mov [rsi], r14
cmovnz rax, rbx
jmp short loc_9A269
loc_9A2BA:
lea r12, [r15+1]
mov [rsi], r12
cmp r12, r8
jz short loc_9A2D4
mov sil, [r15+1]
add sil, 0D0h
cmp sil, 0Ah
jb short loc_9A2F5
loc_9A2D4:
cmp rdi, r11
ja short loc_9A2F5
lea rsi, [r14+r14*4]
movzx eax, al
lea rsi, [rax+rsi*2]
cmp rdi, r11
jnz short loc_9A310
cmp rbx, r10
ja short loc_9A2F5
jnz short loc_9A310
cmp esi, r9d
jbe short loc_9A310
loc_9A2F5:
xor eax, eax
cmp cl, 2Dh ; '-'
setnz al
mov dword ptr [rdx], 22h ; '"'
neg rax
bts rax, 3Fh ; '?'
jmp loc_9A269
loc_9A310:
mov rax, 174876E800h
imul rdi, rax
imul rax, rbx, 64h ; 'd'
add rax, rdi
add rax, rsi
jmp loc_9A269
| unsigned long long my_strtoll10(unsigned __int8 *a1, unsigned long long *a2, _DWORD *a3)
{
unsigned long long v3; // r8
unsigned __int8 *v4; // rax
unsigned __int8 v5; // cl
_BYTE *v6; // rbx
unsigned int v7; // r9d
unsigned long long v8; // r10
unsigned long long v9; // r11
unsigned __int8 v10; // r14
unsigned long long v11; // rdi
unsigned __int8 *v12; // rbx
unsigned __int8 v13; // r14
unsigned long long result; // rax
unsigned __int8 *v15; // rbx
unsigned __int8 v16; // r14
unsigned __int8 *v17; // r12
unsigned __int8 *v18; // r14
long long v19; // r13
unsigned long long v20; // rbx
unsigned __int8 v21; // r15
_BYTE *v22; // r15
unsigned __int8 *v23; // r14
unsigned __int8 v24; // al
long long v25; // r14
unsigned __int8 v26; // al
bool v27; // zf
unsigned long long v28; // rbx
long long v29; // rsi
_BYTE v30[48]; // [rsp+0h] [rbp-30h] BYREF
if ( a2 )
{
v3 = *a2;
v4 = a1;
if ( *a2 > (unsigned long long)a1 )
{
v4 = a1;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *v4 + 1LL) & 8) != 0 )
{
if ( ++v4 == (unsigned __int8 *)v3 )
{
v4 = (unsigned __int8 *)*a2;
break;
}
}
}
if ( v4 == (unsigned __int8 *)v3 )
goto LABEL_29;
v5 = *v4;
v6 = (_BYTE *)*a2;
}
else
{
v5 = *a1;
a2 = (unsigned long long *)v30;
if ( !*a1 )
goto LABEL_29;
v6 = a1 + 0xFFFF;
v4 = a1;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v5 + 1LL) & 8) != 0 )
{
v5 = *++v4;
++v6;
if ( !v5 )
goto LABEL_29;
}
v3 = (unsigned long long)(v4 + 0xFFFF);
a2 = (unsigned long long *)v30;
}
if ( v5 == 45 )
{
*a3 = -1;
if ( ++v4 == (unsigned __int8 *)v3 )
goto LABEL_29;
v7 = 8;
v8 = 368547758LL;
v9 = 92233720LL;
goto LABEL_21;
}
*a3 = 0;
v10 = *v4;
if ( *v4 == 43 )
{
if ( ++v4 == (unsigned __int8 *)v3 )
goto LABEL_29;
v7 = 15;
v8 = 737095516LL;
v9 = 184467440LL;
LABEL_21:
v10 = *v4;
goto LABEL_23;
}
v7 = 15;
v8 = 737095516LL;
v9 = 184467440LL;
LABEL_23:
if ( v10 != 48 )
{
v13 = v10 - 48;
if ( v13 <= 9u )
{
v11 = v13;
v15 = v4++;
v12 = v15 + 9;
goto LABEL_31;
}
LABEL_29:
*a3 = 33;
*a2 = (unsigned long long)a1;
return 0LL;
}
v11 = 0LL;
do
{
if ( ++v4 == (unsigned __int8 *)v3 )
goto LABEL_50;
}
while ( *v4 == 48 );
v12 = v4 + 9;
v11 = 0LL;
LABEL_31:
if ( (unsigned long long)v12 > v3 )
v12 = (unsigned __int8 *)v3;
while ( v4 != v12 )
{
v16 = *v4 - 48;
if ( v16 > 9u )
goto LABEL_49;
v11 = v16 + 10 * v11;
++v4;
}
if ( v4 == (unsigned __int8 *)v3 )
{
LABEL_49:
v6 = v4;
LABEL_50:
result = -(long long)v11;
v27 = v5 == 45;
*a2 = (unsigned long long)v6;
LABEL_51:
if ( !v27 )
return v11;
return result;
}
v17 = v4 + 9;
if ( (unsigned long long)(v4 + 9) > v3 )
v17 = (unsigned __int8 *)v3;
v18 = v4 + 1;
v19 = 9LL;
v20 = 0LL;
do
{
v21 = *(v18 - 1) - 48;
if ( v21 > 9u )
{
v23 = v18 - 1;
goto LABEL_55;
}
v20 = v21 + 10 * v20;
v22 = v18 + 1;
--v19;
v27 = v18++ == v17;
}
while ( !v27 );
v23 = v22 - 1;
if ( v17 == (unsigned __int8 *)v3 )
{
if ( !v19 )
{
LABEL_57:
v28 = 1000000000 * v11 + v20;
result = -(long long)v28;
*a2 = (unsigned long long)v23;
if ( v5 != 45 )
return v28;
return result;
}
LABEL_55:
v11 = v20 + lfactor_0[(int)v23 - (int)v4] * v11;
result = -(long long)v11;
v27 = v5 == 45;
*a2 = (unsigned long long)v23;
goto LABEL_51;
}
v24 = *v23 - 48;
if ( v24 > 9u )
goto LABEL_57;
v25 = v24;
if ( v22 == (_BYTE *)v3 || (v26 = *v22 - 48, v26 > 9u) )
{
result = v25 + 10000000000LL * v11 + 10 * v20;
*a2 = (unsigned long long)v22;
if ( v5 != 45 )
return result;
if ( result <= 0x8000000000000000LL )
return -(long long)result;
LABEL_67:
*a3 = 34;
return -(long long)(v5 != 45) | 0x8000000000000000LL;
}
else
{
*a2 = (unsigned long long)(v22 + 1);
if ( v22 + 1 != (_BYTE *)v3 && (unsigned __int8)(v22[1] - 48) < 0xAu )
goto LABEL_67;
if ( v11 > v9 )
goto LABEL_67;
v29 = v26 + 10 * v25;
if ( v11 == v9 && (v20 > v8 || v20 == v8 && (unsigned int)v29 > v7) )
goto LABEL_67;
return v29 + 100000000000LL * v11 + 100 * v20;
}
}
| my_strtoll10:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
TEST RSI,RSI
JZ 0x0019a076
MOV R8,qword ptr [RSI]
MOV RAX,RDI
CMP R8,RDI
JBE 0x0019a066
LEA RAX,[0x474020]
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,RDI
LAB_0019a04f:
MOVZX R9D,byte ptr [RAX]
TEST byte ptr [RCX + R9*0x1 + 0x1],0x8
JZ 0x0019a066
INC RAX
CMP RAX,R8
JNZ 0x0019a04f
MOV RAX,R8
LAB_0019a066:
CMP RAX,R8
JZ 0x0019a154
MOV CL,byte ptr [RAX]
MOV RBX,R8
JMP 0x0019a0c2
LAB_0019a076:
MOV CL,byte ptr [RDI]
LEA RSI,[RBP + -0x30]
TEST CL,CL
JZ 0x0019a154
LEA RAX,[0x474020]
MOV R8,qword ptr [RAX + 0x40]
LEA RBX,[RDI + 0xffff]
MOV RAX,RDI
LAB_0019a099:
MOVZX R9D,CL
TEST byte ptr [R8 + R9*0x1 + 0x1],0x8
JZ 0x0019a0b7
MOV CL,byte ptr [RAX + 0x1]
INC RAX
INC RBX
TEST CL,CL
JNZ 0x0019a099
JMP 0x0019a154
LAB_0019a0b7:
LEA R8,[RAX + 0xffff]
LEA RSI,[RBP + -0x30]
LAB_0019a0c2:
CMP CL,0x2d
JNZ 0x0019a0e9
MOV dword ptr [RDX],0xffffffff
INC RAX
CMP RAX,R8
JZ 0x0019a154
MOV R9D,0x8
MOV R10D,0x15f797ae
MOV R11D,0x57f5ff8
JMP 0x0019a112
LAB_0019a0e9:
MOV dword ptr [RDX],0x0
MOV R14B,byte ptr [RAX]
CMP R14B,0x2b
JNZ 0x0019a117
INC RAX
CMP RAX,R8
JZ 0x0019a154
MOV R9D,0xf
MOV R10D,0x2bef2f5c
MOV R11D,0xafebff0
LAB_0019a112:
MOV R14B,byte ptr [RAX]
JMP 0x0019a129
LAB_0019a117:
MOV R9D,0xf
MOV R10D,0x2bef2f5c
MOV R11D,0xafebff0
LAB_0019a129:
CMP R14B,0x30
JNZ 0x0019a14a
XOR EDI,EDI
LAB_0019a131:
INC RAX
CMP RAX,R8
JZ 0x0019a259
CMP byte ptr [RAX],0x30
JZ 0x0019a131
LEA RBX,[RAX + 0x9]
XOR EDI,EDI
JMP 0x0019a172
LAB_0019a14a:
ADD R14B,0xd0
CMP R14B,0x9
JBE 0x0019a164
LAB_0019a154:
MOV dword ptr [RDX],0x21
MOV qword ptr [RSI],RDI
XOR EAX,EAX
JMP 0x0019a269
LAB_0019a164:
MOVZX EDI,R14B
MOV RBX,RAX
INC RAX
ADD RBX,0x9
LAB_0019a172:
CMP RBX,R8
CMOVA RBX,R8
LAB_0019a179:
CMP RAX,RBX
JZ 0x0019a1a0
MOV R14B,byte ptr [RAX]
ADD R14B,0xd0
CMP R14B,0x9
JA 0x0019a256
LEA RDI,[RDI + RDI*0x4]
MOVZX R14D,R14B
LEA RDI,[R14 + RDI*0x2]
INC RAX
JMP 0x0019a179
LAB_0019a1a0:
CMP RAX,R8
JZ 0x0019a256
LEA R12,[RAX + 0x9]
CMP R12,R8
CMOVA R12,R8
LEA R14,[RAX + 0x1]
MOV R13D,0x9
XOR EBX,EBX
LAB_0019a1c0:
MOV R15B,byte ptr [R14 + -0x1]
ADD R15B,0xd0
CMP R15B,0x9
JA 0x0019a274
LEA RBX,[RBX + RBX*0x4]
MOVZX R15D,R15B
LEA RBX,[R15 + RBX*0x2]
LEA R15,[R14 + 0x1]
DEC R13
CMP R14,R12
MOV R14,R15
JNZ 0x0019a1c0
LEA R14,[R15 + -0x1]
CMP R12,R8
JZ 0x0019a299
MOV AL,byte ptr [R14]
ADD AL,0xd0
CMP AL,0x9
JA 0x0019a29e
MOVZX R14D,AL
CMP R15,R8
JZ 0x0019a21d
MOV AL,byte ptr [R15]
ADD AL,0xd0
CMP AL,0x9
JBE 0x0019a2ba
LAB_0019a21d:
MOV RAX,0x2540be400
IMUL RDI,RAX
LEA RAX,[RBX + RBX*0x4]
LEA RAX,[RDI + RAX*0x2]
ADD RAX,R14
MOV qword ptr [RSI],R15
CMP CL,0x2d
JNZ 0x0019a269
MOV RSI,-0x8000000000000000
CMP RAX,RSI
JA 0x0019a2f5
NEG RAX
JMP 0x0019a269
LAB_0019a256:
MOV RBX,RAX
LAB_0019a259:
MOV RAX,RDI
NEG RAX
CMP CL,0x2d
MOV qword ptr [RSI],RBX
LAB_0019a265:
CMOVNZ RAX,RDI
LAB_0019a269:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a274:
DEC R14
LAB_0019a277:
MOV EDX,R14D
SUB EDX,EAX
LEA RAX,[0x4243f0]
IMUL RDI,qword ptr [RAX + RDX*0x8]
ADD RDI,RBX
MOV RAX,RDI
NEG RAX
CMP CL,0x2d
MOV qword ptr [RSI],R14
JMP 0x0019a265
LAB_0019a299:
TEST R13,R13
JNZ 0x0019a277
LAB_0019a29e:
IMUL RAX,RDI,0x3b9aca00
ADD RBX,RAX
MOV RAX,RBX
NEG RAX
CMP CL,0x2d
MOV qword ptr [RSI],R14
CMOVNZ RAX,RBX
JMP 0x0019a269
LAB_0019a2ba:
LEA R12,[R15 + 0x1]
MOV qword ptr [RSI],R12
CMP R12,R8
JZ 0x0019a2d4
MOV SIL,byte ptr [R15 + 0x1]
ADD SIL,0xd0
CMP SIL,0xa
JC 0x0019a2f5
LAB_0019a2d4:
CMP RDI,R11
JA 0x0019a2f5
LEA RSI,[R14 + R14*0x4]
MOVZX EAX,AL
LEA RSI,[RAX + RSI*0x2]
CMP RDI,R11
JNZ 0x0019a310
CMP RBX,R10
JA 0x0019a2f5
JNZ 0x0019a310
CMP ESI,R9D
JBE 0x0019a310
LAB_0019a2f5:
XOR EAX,EAX
CMP CL,0x2d
SETNZ AL
MOV dword ptr [RDX],0x22
NEG RAX
BTS RAX,0x3f
JMP 0x0019a269
LAB_0019a310:
MOV RAX,0x174876e800
IMUL RDI,RAX
IMUL RAX,RBX,0x64
ADD RAX,RDI
ADD RAX,RSI
JMP 0x0019a269
|
ulong my_strtoll10(byte *param_1,ulong *param_2,int4 *param_3)
{
byte bVar1;
byte bVar2;
byte *pbVar3;
byte *pbVar4;
byte *pbVar5;
byte bVar6;
byte *pbVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong uVar12;
long lVar13;
byte *pbVar14;
ulong local_38;
pbVar4 = param_1;
if (param_2 == (ulong *)0x0) {
bVar6 = *param_1;
param_2 = &local_38;
if (bVar6 != 0) {
pbVar7 = param_1 + 0xffff;
do {
if ((PTR_ctype_latin1_00474060[(ulong)bVar6 + 1] & 8) == 0) {
pbVar3 = pbVar4 + 0xffff;
param_2 = &local_38;
goto LAB_0019a0c2;
}
bVar6 = pbVar4[1];
pbVar4 = pbVar4 + 1;
pbVar7 = pbVar7 + 1;
} while (bVar6 != 0);
}
goto LAB_0019a154;
}
pbVar7 = (byte *)*param_2;
pbVar3 = param_1;
if (param_1 < pbVar7) {
do {
pbVar4 = pbVar3;
if ((PTR_ctype_latin1_00474060[(ulong)*pbVar3 + 1] & 8) == 0) break;
pbVar3 = pbVar3 + 1;
pbVar4 = pbVar7;
} while (pbVar3 != pbVar7);
}
if (pbVar4 == pbVar7) goto LAB_0019a154;
bVar6 = *pbVar4;
pbVar3 = pbVar7;
LAB_0019a0c2:
if (bVar6 == 0x2d) {
*param_3 = 0xffffffff;
if (pbVar4 + 1 == pbVar3) goto LAB_0019a154;
uVar10 = 8;
uVar11 = 0x15f797ae;
uVar12 = 0x57f5ff8;
LAB_0019a112:
pbVar4 = pbVar4 + 1;
bVar2 = *pbVar4;
}
else {
*param_3 = 0;
bVar2 = *pbVar4;
if (bVar2 == 0x2b) {
if (pbVar4 + 1 == pbVar3) goto LAB_0019a154;
uVar10 = 0xf;
uVar11 = 0x2bef2f5c;
uVar12 = 0xafebff0;
goto LAB_0019a112;
}
uVar10 = 0xf;
uVar11 = 0x2bef2f5c;
uVar12 = 0xafebff0;
}
if (bVar2 == 0x30) {
uVar9 = 0;
do {
pbVar14 = pbVar4;
pbVar5 = pbVar14 + 1;
if (pbVar5 == pbVar3) goto LAB_0019a259;
pbVar4 = pbVar5;
} while (*pbVar5 == 0x30);
pbVar14 = pbVar14 + 10;
uVar9 = 0;
}
else {
if (9 < (byte)(bVar2 - 0x30)) {
LAB_0019a154:
*param_3 = 0x21;
*param_2 = (ulong)param_1;
return 0;
}
uVar9 = (ulong)(byte)(bVar2 - 0x30);
pbVar5 = pbVar4 + 1;
pbVar14 = pbVar4 + 9;
}
if (pbVar3 < pbVar14) {
pbVar14 = pbVar3;
}
for (; pbVar7 = pbVar5, pbVar5 != pbVar14; pbVar5 = pbVar5 + 1) {
if (9 < (byte)(*pbVar5 - 0x30)) goto LAB_0019a259;
uVar9 = (ulong)(byte)(*pbVar5 - 0x30) + uVar9 * 10;
}
if (pbVar5 != pbVar3) {
pbVar4 = pbVar5 + 9;
if (pbVar3 < pbVar5 + 9) {
pbVar4 = pbVar3;
}
lVar13 = 9;
uVar8 = 0;
pbVar7 = pbVar5 + 1;
do {
pbVar14 = pbVar7;
if (9 < (byte)(pbVar14[-1] - 0x30)) {
pbVar14 = pbVar14 + -1;
goto LAB_0019a277;
}
uVar8 = (ulong)(byte)(pbVar14[-1] - 0x30) + uVar8 * 10;
pbVar7 = pbVar14 + 1;
lVar13 = lVar13 + -1;
} while (pbVar14 != pbVar4);
if (pbVar4 == pbVar3) {
if (lVar13 != 0) {
LAB_0019a277:
uVar9 = uVar9 * (&lfactor)[(uint)((int)pbVar14 - (int)pbVar5)] + uVar8;
*param_2 = (ulong)pbVar14;
goto LAB_0019a265;
}
}
else {
bVar2 = *pbVar14 - 0x30;
if (bVar2 < 10) {
if ((pbVar7 == pbVar3) || (bVar1 = *pbVar7, 9 < (byte)(bVar1 - 0x30))) {
uVar11 = uVar9 * 10000000000 + uVar8 * 10 + (ulong)bVar2;
*param_2 = (ulong)pbVar7;
if (bVar6 != 0x2d) {
return uVar11;
}
if (uVar11 < 0x8000000000000001) {
return -uVar11;
}
}
else {
*param_2 = (ulong)(pbVar14 + 2);
if ((((pbVar14 + 2 == pbVar3) || (9 < (byte)(pbVar14[2] - 0x30))) && (uVar9 <= uVar12)) &&
((lVar13 = (ulong)(byte)(bVar1 - 0x30) + (ulong)bVar2 * 10, uVar9 != uVar12 ||
((uVar8 <= uVar11 && ((uVar8 != uVar11 || ((uint)lVar13 <= uVar10)))))))) {
return uVar8 * 100 + uVar9 * 100000000000 + lVar13;
}
}
*param_3 = 0x22;
return -(ulong)(bVar6 != 0x2d) | 0x8000000000000000;
}
}
uVar8 = uVar8 + uVar9 * 1000000000;
*param_2 = (ulong)pbVar14;
if (bVar6 == 0x2d) {
return -uVar8;
}
return uVar8;
}
LAB_0019a259:
*param_2 = (ulong)pbVar7;
LAB_0019a265:
if (bVar6 == 0x2d) {
return -uVar9;
}
return uVar9;
}
| |
28,330 | my_strnxfrm_win1250ch | eloqsql/strings/ctype-win1250ch.c | static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
} | O0 | c | my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %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)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x101330
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x101332
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x101519
jmp 0x101342
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x101389
cmpl $0x0, -0x44(%rbp)
jne 0x10137b
movq -0x30(%rbp), %rax
cmpl $0x0, %eax
jle 0x10137b
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x101387
movl $0x0, -0x34(%rbp)
jmp 0x1014df
jmp 0x101389
cmpl $0x0, -0x44(%rbp)
jne 0x1013a8
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x154571(%rip), %rax # 0x255910
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
jmp 0x1013bf
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x343968(%rip), %rax # 0x444d20
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0xff, -0x34(%rbp)
jne 0x1014d3
movl $0x0, -0x54(%rbp)
cmpl $0x50, -0x54(%rbp)
jge 0x1014d1
movslq -0x54(%rbp), %rcx
leaq 0x187d22(%rip), %rax # 0x289110
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6d(%rbp)
je 0x101447
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x6d(%rbp)
jge 0x101447
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x101450
jmp 0x10146a
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x101404
movq -0x60(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1014c1
cmpl $0x0, -0x44(%rbp)
jne 0x101494
movslq -0x54(%rbp), %rcx
leaq 0x187c8c(%rip), %rax # 0x289110
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0x1014ad
movslq -0x54(%rbp), %rcx
leaq 0x187c71(%rip), %rax # 0x289110
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1014d1
jmp 0x1014c3
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1013d9
jmp 0x1014d3
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x1014e7
jmp 0x101519
movl -0x44(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x101514
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x50(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x101332
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x10154f
movq -0x18(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0x10154f
movq -0x10(%rbp), %rdi
addq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x3b390
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
sub rsp, 80h
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 [rbp+var_44], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_101330
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_101330:
jmp short $+2
loc_101332:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_18]
jnb loc_101519
jmp short $+2
loc_101342:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_101389
cmp [rbp+var_44], 0
jnz short loc_10137B
mov rax, [rbp+var_30]
cmp eax, 0
jle short loc_10137B
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_101387
loc_10137B:
mov [rbp+var_34], 0
jmp loc_1014DF
loc_101387:
jmp short $+2
loc_101389:
cmp [rbp+var_44], 0
jnz short loc_1013A8
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch1
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
jmp short loc_1013BF
loc_1013A8:
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch2
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
loc_1013BF:
mov eax, [rbp+var_6C]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0FFh
jnz loc_1014D3
mov [rbp+var_54], 0
loc_1013D9:
cmp [rbp+var_54], 50h ; 'P'
jge loc_1014D1
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
loc_101404:
mov rax, [rbp+var_60]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_6D], al
jz short loc_101447
mov rcx, [rbp+var_68]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_6D], al
jge short loc_101447
mov rax, [rbp+var_60]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
setz al
mov [rbp+var_6D], al
loc_101447:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_101450
jmp short loc_10146A
loc_101450:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_68], rax
jmp short loc_101404
loc_10146A:
mov rax, [rbp+var_60]
cmp byte ptr [rax], 0
jnz short loc_1014C1
cmp [rbp+var_44], 0
jnz short loc_101494
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+8]
mov [rbp+var_74], eax
jmp short loc_1014AD
loc_101494:
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+9]
mov [rbp+var_74], eax
loc_1014AD:
mov eax, [rbp+var_74]
mov [rbp+var_34], eax
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_1014D1
loc_1014C1:
jmp short $+2
loc_1014C3:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
jmp loc_1013D9
loc_1014D1:
jmp short $+2
loc_1014D3:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_1014DF:
cmp [rbp+var_34], 0
jnz short loc_1014E7
jmp short loc_101519
loc_1014E7:
mov ecx, [rbp+var_44]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
cmp eax, 0
jz short loc_101514
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_50]
mov rsi, rcx
add rsi, 1
mov [rbp+var_50], rsi
mov [rax+rcx], dl
loc_101514:
jmp loc_101332
loc_101519:
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_10154F
mov rax, [rbp+var_18]
cmp rax, [rbp+var_50]
jbe short loc_10154F
mov rdi, [rbp+var_10]
add rdi, [rbp+var_50]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_50]
xor esi, esi
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
loc_10154F:
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
| unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
long long v7; // rcx
int v9; // [rsp+Ch] [rbp-74h]
bool v10; // [rsp+13h] [rbp-6Dh]
int v11; // [rsp+14h] [rbp-6Ch]
unsigned __int8 *j; // [rsp+18h] [rbp-68h]
_BYTE *v13; // [rsp+20h] [rbp-60h]
int i; // [rsp+2Ch] [rbp-54h]
unsigned long long v15; // [rsp+30h] [rbp-50h]
int v16; // [rsp+3Ch] [rbp-44h]
unsigned __int8 *v17; // [rsp+40h] [rbp-40h]
int v18; // [rsp+4Ch] [rbp-34h]
v16 = 0;
v15 = 0LL;
v17 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
while ( v15 < a3 )
{
if ( v17 - a5 >= a6 )
{
if ( v16 || a6 <= 0 )
{
v18 = 0;
goto LABEL_28;
}
v17 = a5;
v16 = 1;
}
if ( v16 )
v11 = sort_order_win1250ch2[*v17];
else
v11 = sort_order_win1250ch1[*v17];
v18 = v11;
if ( v11 == 255 )
{
for ( i = 0; i < 80; ++i )
{
v13 = *(&doubles_0 + 2 * i);
for ( j = v17; ; ++j )
{
v10 = 0;
if ( *v13 )
{
v10 = 0;
if ( j - a5 < a6 )
v10 = (unsigned __int8)*v13 == *j;
}
if ( !v10 )
break;
++v13;
}
if ( !*v13 )
{
if ( v16 )
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 9);
else
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 8);
v18 = v9;
v17 = j - 1;
break;
}
}
}
++v17;
LABEL_28:
if ( !v18 )
break;
if ( (a7 & (1 << v16)) != 0 )
{
v7 = v15++;
*(_BYTE *)(a2 + v7) = v18;
}
}
if ( (a7 & 0x80) != 0 && a3 > v15 )
{
memset(v15 + a2, 0LL, a3 - v15);
return a3;
}
return v15;
}
| |||
28,331 | my_strnxfrm_win1250ch | eloqsql/strings/ctype-win1250ch.c | static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
} | O3 | c | my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, -0x50(%rbp)
movl 0x10(%rbp), %eax
movl %eax, %edx
orl $0xf, %edx
testb $0xf, %al
cmovnel %eax, %edx
xorl %r10d, %r10d
testq %rbx, %rbx
je 0xb01e8
movslq %r9d, %rdi
movl $0x1, %eax
subq %r8, %rax
movq %rax, -0x60(%rbp)
leaq 0x28e285(%rip), %r14 # 0x33e310
leaq 0x2bafee(%rip), %r15 # 0x36b080
xorl %eax, %eax
movq %r8, %r11
movq %rbx, -0x48(%rbp)
movq %r9, -0x40(%rbp)
movq %r8, -0x38(%rbp)
movl %edx, -0x2c(%rbp)
movq %r11, %rsi
subq %r8, %rsi
cmpq %rdi, %rsi
jge 0xb00c2
testl %r10d, %r10d
je 0xb0184
movl $0x9, %r12d
jmp 0xb00e3
testl %r9d, %r9d
jle 0xb01ec
testl %r10d, %r10d
jne 0xb01ec
movl $0x1, %r10d
movl $0x9, %r12d
movq %r8, %r11
movq %r14, %rsi
movzbl (%r11), %ecx
movb (%rsi,%rcx), %sil
cmpb $-0x1, %sil
jne 0xb01c4
movq %r12, -0x68(%rbp)
movq %r10, -0x58(%rbp)
movq %r11, %rdx
subq %r8, %rdx
movq -0x60(%rbp), %rcx
leaq (%rcx,%r11), %r13
xorl %r10d, %r10d
movq %r10, %rbx
shlq $0x4, %rbx
movq (%rbx,%r15), %rsi
movb (%rsi), %r9b
testb %r9b, %r9b
je 0xb0154
cmpq %rdi, %rdx
jge 0xb0154
incq %rsi
movq %r13, %r14
movq %r11, %r12
cmpb (%r12), %r9b
jne 0xb015c
incq %r12
movb (%rsi), %r9b
testb %r9b, %r9b
je 0xb0157
leaq 0x1(%r14), %rcx
incq %rsi
cmpq %rdi, %r14
movq %rcx, %r14
jl 0xb0132
jmp 0xb0157
movq %r11, %r12
testb %r9b, %r9b
je 0xb0199
incq %r10
cmpq $0x50, %r10
jne 0xb0111
movb $-0x1, %sil
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r8
movl -0x2c(%rbp), %edx
movq -0x58(%rbp), %r10
leaq 0x28e18e(%rip), %r14 # 0x33e310
jmp 0xb01c9
xorl %r10d, %r10d
movl $0x8, %r12d
leaq 0x28e07c(%rip), %rsi # 0x33e210
jmp 0xb00e6
addq %r15, %rbx
movq -0x68(%rbp), %rcx
movb (%rbx,%rcx), %sil
decq %r12
movq %r12, %r11
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r8
movl -0x2c(%rbp), %edx
movq -0x58(%rbp), %r10
leaq 0x28e14c(%rip), %r14 # 0x33e310
testb %sil, %sil
je 0xb01ec
btl %r10d, %edx
jae 0xb01da
movq -0x50(%rbp), %rcx
movb %sil, (%rcx,%rax)
incq %rax
incq %r11
cmpq %rbx, %rax
jb 0xb00a6
jmp 0xb0207
xorl %eax, %eax
jmp 0xb0207
testb %dl, %dl
jns 0xb0207
movq -0x50(%rbp), %rdi
addq %rax, %rdi
movq %rbx, %rdx
subq %rax, %rdx
xorl %esi, %esi
callq 0x3a3a0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov [rbp+var_50], rsi
mov eax, [rbp+arg_0]
mov edx, eax
or edx, 0Fh
test al, 0Fh
cmovnz edx, eax
xor r10d, r10d
test rbx, rbx
jz loc_B01E8
movsxd rdi, r9d
mov eax, 1
sub rax, r8
mov [rbp+var_60], rax
lea r14, _sort_order_win1250ch2
lea r15, doubles_0
xor eax, eax
mov r11, r8
mov [rbp+var_48], rbx
mov [rbp+var_40], r9
mov [rbp+var_38], r8
mov [rbp+var_2C], edx
loc_B00A6:
mov rsi, r11
sub rsi, r8
cmp rsi, rdi
jge short loc_B00C2
test r10d, r10d
jz loc_B0184
mov r12d, 9
jmp short loc_B00E3
loc_B00C2:
test r9d, r9d
jle loc_B01EC
test r10d, r10d
jnz loc_B01EC
mov r10d, 1
mov r12d, 9
mov r11, r8
loc_B00E3:
mov rsi, r14
loc_B00E6:
movzx ecx, byte ptr [r11]
mov sil, [rsi+rcx]
cmp sil, 0FFh
jnz loc_B01C4
mov [rbp+var_68], r12
mov [rbp+var_58], r10
mov rdx, r11
sub rdx, r8
mov rcx, [rbp+var_60]
lea r13, [rcx+r11]
xor r10d, r10d
loc_B0111:
mov rbx, r10
shl rbx, 4
mov rsi, [rbx+r15]
mov r9b, [rsi]
test r9b, r9b
jz short loc_B0154
cmp rdx, rdi
jge short loc_B0154
inc rsi
mov r14, r13
mov r12, r11
loc_B0132:
cmp r9b, [r12]
jnz short loc_B015C
inc r12
mov r9b, [rsi]
test r9b, r9b
jz short loc_B0157
lea rcx, [r14+1]
inc rsi
cmp r14, rdi
mov r14, rcx
jl short loc_B0132
jmp short loc_B0157
loc_B0154:
mov r12, r11
loc_B0157:
test r9b, r9b
jz short loc_B0199
loc_B015C:
inc r10
cmp r10, 50h ; 'P'
jnz short loc_B0111
mov sil, 0FFh
mov rbx, [rbp+var_48]
mov r9, [rbp+var_40]
mov r8, [rbp+var_38]
mov edx, [rbp+var_2C]
mov r10, [rbp+var_58]
lea r14, _sort_order_win1250ch2
jmp short loc_B01C9
loc_B0184:
xor r10d, r10d
mov r12d, 8
lea rsi, _sort_order_win1250ch1
jmp loc_B00E6
loc_B0199:
add rbx, r15
mov rcx, [rbp+var_68]
mov sil, [rbx+rcx]
dec r12
mov r11, r12
mov rbx, [rbp+var_48]
mov r9, [rbp+var_40]
mov r8, [rbp+var_38]
mov edx, [rbp+var_2C]
mov r10, [rbp+var_58]
lea r14, _sort_order_win1250ch2
loc_B01C4:
test sil, sil
jz short loc_B01EC
loc_B01C9:
bt edx, r10d
jnb short loc_B01DA
mov rcx, [rbp+var_50]
mov [rcx+rax], sil
inc rax
loc_B01DA:
inc r11
cmp rax, rbx
jb loc_B00A6
jmp short loc_B0207
loc_B01E8:
xor eax, eax
jmp short loc_B0207
loc_B01EC:
test dl, dl
jns short loc_B0207
mov rdi, [rbp+var_50]
add rdi, rax
mov rdx, rbx
sub rdx, rax
xor esi, esi
call _memset
mov rax, rbx
loc_B0207:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
int v8; // edx
long long v9; // r10
long long v10; // rdi
unsigned long long result; // rax
unsigned __int8 *v12; // r11
long long v13; // r12
_BYTE *v14; // rsi
char v15; // si
long long v16; // r10
char *v17; // rsi
char v18; // r9
char *v19; // rsi
unsigned __int8 *v20; // r14
_BYTE *v21; // r12
long long v23; // [rsp+8h] [rbp-68h]
long long v24; // [rsp+10h] [rbp-60h]
long long v25; // [rsp+18h] [rbp-58h]
unsigned long long v27; // [rsp+28h] [rbp-48h]
int v28; // [rsp+30h] [rbp-40h]
unsigned __int8 *v29; // [rsp+38h] [rbp-38h]
int v30; // [rsp+44h] [rbp-2Ch]
v8 = a7 | 0xF;
if ( (a7 & 0xF) != 0 )
v8 = a7;
v9 = 0LL;
if ( !a3 )
return 0LL;
v10 = a6;
v24 = 1LL - (_QWORD)a5;
result = 0LL;
v12 = a5;
v27 = a3;
v28 = a6;
v29 = a5;
v30 = v8;
while ( 2 )
{
if ( v12 - a5 >= v10 )
{
if ( a6 <= 0 || (_DWORD)v9 )
break;
v9 = 1LL;
v13 = 9LL;
v12 = a5;
}
else
{
if ( !(_DWORD)v9 )
{
v9 = 0LL;
v13 = 8LL;
v14 = &sort_order_win1250ch1;
goto LABEL_12;
}
v13 = 9LL;
}
v14 = &sort_order_win1250ch2;
LABEL_12:
v15 = v14[*v12];
if ( v15 != -1 )
goto LABEL_27;
v23 = v13;
v25 = v9;
v16 = 0LL;
while ( 1 )
{
v17 = (char *)*(&doubles_0 + 2 * v16);
v18 = *v17;
if ( !*v17 || v12 - a5 >= v10 )
break;
v19 = v17 + 1;
v20 = &v12[v24];
v21 = v12;
while ( v18 == *v21 )
{
++v21;
v18 = *v19;
if ( *v19 )
{
++v19;
if ( (long long)v20++ < v10 )
continue;
}
goto LABEL_22;
}
LABEL_23:
if ( ++v16 == 80 )
{
v15 = -1;
a3 = v27;
a6 = v28;
a5 = v29;
v8 = v30;
v9 = v25;
goto LABEL_28;
}
}
v21 = v12;
LABEL_22:
if ( v18 )
goto LABEL_23;
v15 = *((_BYTE *)&doubles_0 + 16 * v16 + v23);
v12 = v21 - 1;
a3 = v27;
a6 = v28;
a5 = v29;
v8 = v30;
v9 = v25;
LABEL_27:
if ( v15 )
{
LABEL_28:
if ( _bittest(&v8, v9) )
*(_BYTE *)(a2 + result++) = v15;
++v12;
if ( result >= a3 )
return result;
continue;
}
break;
}
if ( (v8 & 0x80u) != 0 )
{
memset(result + a2, 0LL, a3 - result);
return a3;
}
return result;
}
| my_strnxfrm_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV qword ptr [RBP + -0x50],RSI
MOV EAX,dword ptr [RBP + 0x10]
MOV EDX,EAX
OR EDX,0xf
TEST AL,0xf
CMOVNZ EDX,EAX
XOR R10D,R10D
TEST RBX,RBX
JZ 0x001b01e8
MOVSXD RDI,R9D
MOV EAX,0x1
SUB RAX,R8
MOV qword ptr [RBP + -0x60],RAX
LEA R14,[0x43e310]
LEA R15,[0x46b080]
XOR EAX,EAX
MOV R11,R8
MOV qword ptr [RBP + -0x48],RBX
MOV qword ptr [RBP + -0x40],R9
MOV qword ptr [RBP + -0x38],R8
MOV dword ptr [RBP + -0x2c],EDX
LAB_001b00a6:
MOV RSI,R11
SUB RSI,R8
CMP RSI,RDI
JGE 0x001b00c2
TEST R10D,R10D
JZ 0x001b0184
MOV R12D,0x9
JMP 0x001b00e3
LAB_001b00c2:
TEST R9D,R9D
JLE 0x001b01ec
TEST R10D,R10D
JNZ 0x001b01ec
MOV R10D,0x1
MOV R12D,0x9
MOV R11,R8
LAB_001b00e3:
MOV RSI,R14
LAB_001b00e6:
MOVZX ECX,byte ptr [R11]
MOV SIL,byte ptr [RSI + RCX*0x1]
CMP SIL,0xff
JNZ 0x001b01c4
MOV qword ptr [RBP + -0x68],R12
MOV qword ptr [RBP + -0x58],R10
MOV RDX,R11
SUB RDX,R8
MOV RCX,qword ptr [RBP + -0x60]
LEA R13,[RCX + R11*0x1]
XOR R10D,R10D
LAB_001b0111:
MOV RBX,R10
SHL RBX,0x4
MOV RSI,qword ptr [RBX + R15*0x1]
MOV R9B,byte ptr [RSI]
TEST R9B,R9B
JZ 0x001b0154
CMP RDX,RDI
JGE 0x001b0154
INC RSI
MOV R14,R13
MOV R12,R11
LAB_001b0132:
CMP R9B,byte ptr [R12]
JNZ 0x001b015c
INC R12
MOV R9B,byte ptr [RSI]
TEST R9B,R9B
JZ 0x001b0157
LEA RCX,[R14 + 0x1]
INC RSI
CMP R14,RDI
MOV R14,RCX
JL 0x001b0132
JMP 0x001b0157
LAB_001b0154:
MOV R12,R11
LAB_001b0157:
TEST R9B,R9B
JZ 0x001b0199
LAB_001b015c:
INC R10
CMP R10,0x50
JNZ 0x001b0111
MOV SIL,0xff
MOV RBX,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV R10,qword ptr [RBP + -0x58]
LEA R14,[0x43e310]
JMP 0x001b01c9
LAB_001b0184:
XOR R10D,R10D
MOV R12D,0x8
LEA RSI,[0x43e210]
JMP 0x001b00e6
LAB_001b0199:
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x68]
MOV SIL,byte ptr [RBX + RCX*0x1]
DEC R12
MOV R11,R12
MOV RBX,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV R10,qword ptr [RBP + -0x58]
LEA R14,[0x43e310]
LAB_001b01c4:
TEST SIL,SIL
JZ 0x001b01ec
LAB_001b01c9:
BT EDX,R10D
JNC 0x001b01da
MOV RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RCX + RAX*0x1],SIL
INC RAX
LAB_001b01da:
INC R11
CMP RAX,RBX
JC 0x001b00a6
JMP 0x001b0207
LAB_001b01e8:
XOR EAX,EAX
JMP 0x001b0207
LAB_001b01ec:
TEST DL,DL
JNS 0x001b0207
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,RAX
MOV RDX,RBX
SUB RDX,RAX
XOR ESI,ESI
CALL 0x0013a3a0
MOV RAX,RBX
LAB_001b0207:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strnxfrm_win1250ch
(int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5,
int param_6,uint param_7)
{
uint uVar1;
byte *pbVar2;
byte *pbVar3;
byte *pbVar4;
ulong uVar5;
char cVar6;
int1 *puVar7;
byte *pbVar8;
byte bVar9;
int iVar10;
long lVar11;
byte *pbVar12;
byte *pbVar13;
long lVar14;
uVar1 = param_7 | 0xf;
if ((param_7 & 0xf) != 0) {
uVar1 = param_7;
}
iVar10 = 0;
if (param_3 == 0) {
uVar5 = 0;
}
else {
uVar5 = 0;
pbVar12 = param_5;
do {
if ((long)pbVar12 - (long)param_5 < (long)param_6) {
if (iVar10 != 0) goto LAB_001b00e3;
iVar10 = 0;
lVar14 = 8;
puVar7 = _sort_order_win1250ch1;
}
else {
if ((param_6 < 1) || (iVar10 != 0)) goto LAB_001b01ec;
iVar10 = 1;
pbVar12 = param_5;
LAB_001b00e3:
lVar14 = 9;
puVar7 = _sort_order_win1250ch2;
}
cVar6 = puVar7[*pbVar12];
if (cVar6 == -1) {
lVar11 = 0;
do {
pbVar8 = (&doubles)[lVar11 * 2];
bVar9 = *pbVar8;
pbVar13 = pbVar12;
pbVar4 = pbVar12 + (1 - (long)param_5);
pbVar3 = pbVar12 + -(long)param_5;
if (bVar9 != 0) {
while (pbVar2 = pbVar4, (long)pbVar3 < (long)param_6) {
pbVar8 = pbVar8 + 1;
if (bVar9 != *pbVar13) goto LAB_001b015c;
pbVar13 = pbVar13 + 1;
bVar9 = *pbVar8;
if (bVar9 == 0) break;
pbVar4 = pbVar2 + 1;
pbVar3 = pbVar2;
}
}
if (bVar9 == 0) {
cVar6 = *(char *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar12 = pbVar13 + -1;
goto LAB_001b01c4;
}
LAB_001b015c:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
cVar6 = -1;
}
else {
LAB_001b01c4:
if (cVar6 == '\0') {
LAB_001b01ec:
if (-1 < (char)uVar1) {
return uVar5;
}
memset((void *)(param_2 + uVar5),0,param_3 - uVar5);
return param_3;
}
}
if ((uVar1 >> iVar10 & 1) != 0) {
*(char *)(param_2 + uVar5) = cVar6;
uVar5 = uVar5 + 1;
}
pbVar12 = pbVar12 + 1;
} while (uVar5 < param_3);
}
return uVar5;
}
| |
28,332 | js_math_f16round | bluesky950520[P]quickjs/quickjs.c | static double js_math_f16round(double a)
{
return fromfp16(tofp16(a));
} | O3 | c | js_math_f16round:
pushq %r14
pushq %rbx
pushq %rax
movq %xmm0, %rax
movq %rax, %r14
shrq $0x30, %r14
andl $0x8000, %r14d # imm = 0x8000
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jne 0x84b8b
orl $0x7c00, %r14d # imm = 0x7C00
jmp 0x84c53
ucomisd %xmm0, %xmm0
jp 0x84cc5
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x84ba5
jnp 0x84c53
andpd 0x20d93(%rip), %xmm0 # 0xa5940
leaq 0x4(%rsp), %rbx
movq %rbx, %rdi
callq 0xe510
movl (%rbx), %edi
cmpl $0x11, %edi
jge 0x84b7f
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
xorl %ebx, %ebx
cmpl $-0x18, %edi
jl 0x84bf8
addsd %xmm1, %xmm1
cmpl $-0xe, %edi
jg 0x84be7
addl $0xd, %edi
movapd %xmm1, %xmm0
callq 0xe6e0
jmp 0x84bf8
addsd 0x20e99(%rip), %xmm1 # 0xa5a88
addl $0xe, %edi
movl %edi, %ebx
movapd %xmm1, %xmm0
mulsd 0x20e90(%rip), %xmm0 # 0xa5a90
cvttsd2si %xmm0, %eax
movzwl %ax, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm0
movsd 0x20e7e(%rip), %xmm1 # 0xa5a98
ucomisd %xmm0, %xmm1
ja 0x84c4a
testb $0x1, %al
jne 0x84c30
ucomisd 0x20e6c(%rip), %xmm0 # 0xa5a98
jne 0x84c30
jnp 0x84c4a
incl %eax
movzwl %ax, %ecx
cmpl $0x400, %ecx # imm = 0x400
jne 0x84c4a
incl %ebx
cmpl $0x1f, %ebx
je 0x84b7f
xorl %eax, %eax
shll $0xa, %ebx
orl %ebx, %r14d
orl %eax, %r14d
movzwl %r14w, %ecx
movl $0x7c00, %edx # imm = 0x7C00
movl %ecx, %eax
andl %edx, %eax
andl $0x3ff, %ecx # imm = 0x3FF
cmpl %edx, %eax
jne 0x84c7f
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x20ca8(%rip), %rcx # 0xa5920
movsd (%rcx,%rax,8), %xmm0
jmp 0x84caf
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x20df2(%rip), %xmm0 # 0xa5a80
movl %eax, %edi
shrl $0xa, %edi
addl $-0xf, %edi
testl %eax, %eax
je 0x84ca2
addsd 0x20dc6(%rip), %xmm0 # 0xa5a68
movl $0xfffffff2, %eax # imm = 0xFFFFFFF2
cmovel %eax, %edi
callq 0xe6e0
testw %r14w, %r14w
jns 0x84cbd
xorpd 0x20c73(%rip), %xmm0 # 0xa5930
addq $0x8, %rsp
popq %rbx
popq %r14
retq
orl $0x7c01, %r14d # imm = 0x7C01
jmp 0x84c53
| js_math_f16round:
push r14
push rbx
push rax
movq rax, xmm0
mov r14, rax
shr r14, 30h
and r14d, 8000h
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jnz short loc_84B8B
loc_84B7F:
or r14d, 7C00h
jmp loc_84C53
loc_84B8B:
ucomisd xmm0, xmm0
jp loc_84CC5
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_84BA5
jnp loc_84C53
loc_84BA5:
andpd xmm0, cs:xmmword_A5940
lea rbx, [rsp+18h+var_14]
mov rdi, rbx
call _frexp
mov edi, [rbx]
cmp edi, 11h
jge short loc_84B7F
movapd xmm1, xmm0
xorpd xmm0, xmm0
xor ebx, ebx
cmp edi, 0FFFFFFE8h
jl short loc_84BF8
addsd xmm1, xmm1
cmp edi, 0FFFFFFF2h
jg short loc_84BE7
add edi, 0Dh
movapd xmm0, xmm1
call _scalbn
jmp short loc_84BF8
loc_84BE7:
addsd xmm1, cs:qword_A5A88
add edi, 0Eh
mov ebx, edi
movapd xmm0, xmm1
loc_84BF8:
mulsd xmm0, cs:qword_A5A90
cvttsd2si eax, xmm0
movzx ecx, ax
xorps xmm1, xmm1
cvtsi2sd xmm1, ecx
subsd xmm0, xmm1
movsd xmm1, cs:qword_A5A98
ucomisd xmm1, xmm0
ja short loc_84C4A
test al, 1
jnz short loc_84C30
ucomisd xmm0, cs:qword_A5A98
jnz short loc_84C30
jnp short loc_84C4A
loc_84C30:
inc eax
movzx ecx, ax
cmp ecx, 400h
jnz short loc_84C4A
inc ebx
cmp ebx, 1Fh
jz loc_84B7F
xor eax, eax
loc_84C4A:
shl ebx, 0Ah
or r14d, ebx
or r14d, eax
loc_84C53:
movzx ecx, r14w
mov edx, 7C00h
mov eax, ecx
and eax, edx
and ecx, 3FFh
cmp eax, edx
jnz short loc_84C7F
xor eax, eax
test ecx, ecx
setz al
lea rcx, dbl_A5920
movsd xmm0, qword ptr [rcx+rax*8]
jmp short loc_84CAF
loc_84C7F:
xorps xmm0, xmm0
cvtsi2sd xmm0, ecx
mulsd xmm0, cs:qword_A5A80
mov edi, eax
shr edi, 0Ah
add edi, 0FFFFFFF1h
test eax, eax
jz short loc_84CA2
addsd xmm0, cs:qword_A5A68
loc_84CA2:
mov eax, 0FFFFFFF2h
cmovz edi, eax
call _scalbn
loc_84CAF:
test r14w, r14w
jns short loc_84CBD
xorpd xmm0, cs:xmmword_A5930
loc_84CBD:
add rsp, 8
pop rbx
pop r14
retn
loc_84CC5:
or r14d, 7C01h
jmp short loc_84C53
| long long js_math_f16round(double a1)
{
long long v1; // rax
long long v2; // r14
double v3; // xmm0_8
double v4; // xmm1_8
double v5; // xmm0_8
int v6; // ebx
double v7; // xmm1_8
double v8; // xmm0_8
int v9; // eax
double v10; // xmm0_8
unsigned int v11; // eax
int v12; // ecx
double v14; // xmm0_8
long long v15; // rdi
int v16[5]; // [rsp+0h] [rbp-14h] BYREF
v16[0] = HIDWORD(v1);
v2 = HIWORD(*(_QWORD *)&a1) & 0x8000LL;
if ( (*(_QWORD *)&a1 & 0x7FFFFFFFFFFFFFFFLL) == 0x7FF0000000000000LL )
goto LABEL_2;
if ( a1 != 0.0 )
{
v3 = frexp(fabs(a1), v16);
if ( v16[0] < 17 )
{
v4 = v3;
v5 = 0.0;
v6 = 0;
if ( v16[0] >= -24 )
{
v7 = v4 + v4;
if ( v16[0] > -14 )
{
v6 = v16[0] + 14;
v5 = v7 + -1.0;
}
else
{
v5 = v7;
scalbn((unsigned int)(v16[0] + 13), v7);
}
}
v8 = v5 * 1024.0;
v9 = (int)v8;
v10 = v8 - (double)(unsigned __int16)(int)v8;
if ( v10 < 0.5 || (v9 & 1) == 0 && v10 == 0.5 )
goto LABEL_15;
LOWORD(v9) = v9 + 1;
if ( (unsigned __int16)v9 != 1024 )
goto LABEL_15;
if ( ++v6 != 31 )
{
LOWORD(v9) = 0;
LABEL_15:
LOWORD(v2) = v9 | ((_WORD)v6 << 10) | v2;
goto LABEL_16;
}
}
LABEL_2:
LOWORD(v2) = v2 | 0x7C00;
}
LABEL_16:
v11 = v2 & 0x7C00;
v12 = v2 & 0x3FF;
if ( v11 == 31744 )
return v12 == 0;
v14 = (double)v12 * 0.0009765625;
v15 = (v11 >> 10) - 15;
if ( (v2 & 0x7C00) != 0 )
v14 = v14 + 1.0;
else
v15 = 4294967282LL;
return scalbn(v15, v14);
}
| js_math_f16round:
PUSH R14
PUSH RBX
PUSH RAX
MOVQ RAX,XMM0
MOV R14,RAX
SHR R14,0x30
AND R14D,0x8000
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JNZ 0x00184b8b
LAB_00184b7f:
OR R14D,0x7c00
JMP 0x00184c53
LAB_00184b8b:
UCOMISD XMM0,XMM0
JP 0x00184cc5
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x00184ba5
JNP 0x00184c53
LAB_00184ba5:
ANDPD XMM0,xmmword ptr [0x001a5940]
LEA RBX,[RSP + 0x4]
MOV RDI,RBX
CALL 0x0010e510
MOV EDI,dword ptr [RBX]
CMP EDI,0x11
JGE 0x00184b7f
MOVAPD XMM1,XMM0
XORPD XMM0,XMM0
XOR EBX,EBX
CMP EDI,-0x18
JL 0x00184bf8
ADDSD XMM1,XMM1
CMP EDI,-0xe
JG 0x00184be7
ADD EDI,0xd
MOVAPD XMM0,XMM1
CALL 0x0010e6e0
JMP 0x00184bf8
LAB_00184be7:
ADDSD XMM1,qword ptr [0x001a5a88]
ADD EDI,0xe
MOV EBX,EDI
MOVAPD XMM0,XMM1
LAB_00184bf8:
MULSD XMM0,qword ptr [0x001a5a90]
CVTTSD2SI EAX,XMM0
MOVZX ECX,AX
XORPS XMM1,XMM1
CVTSI2SD XMM1,ECX
SUBSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x001a5a98]
UCOMISD XMM1,XMM0
JA 0x00184c4a
TEST AL,0x1
JNZ 0x00184c30
UCOMISD XMM0,qword ptr [0x001a5a98]
JNZ 0x00184c30
JNP 0x00184c4a
LAB_00184c30:
INC EAX
MOVZX ECX,AX
CMP ECX,0x400
JNZ 0x00184c4a
INC EBX
CMP EBX,0x1f
JZ 0x00184b7f
XOR EAX,EAX
LAB_00184c4a:
SHL EBX,0xa
OR R14D,EBX
OR R14D,EAX
LAB_00184c53:
MOVZX ECX,R14W
MOV EDX,0x7c00
MOV EAX,ECX
AND EAX,EDX
AND ECX,0x3ff
CMP EAX,EDX
JNZ 0x00184c7f
XOR EAX,EAX
TEST ECX,ECX
SETZ AL
LEA RCX,[0x1a5920]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
JMP 0x00184caf
LAB_00184c7f:
XORPS XMM0,XMM0
CVTSI2SD XMM0,ECX
MULSD XMM0,qword ptr [0x001a5a80]
MOV EDI,EAX
SHR EDI,0xa
ADD EDI,-0xf
TEST EAX,EAX
JZ 0x00184ca2
ADDSD XMM0,qword ptr [0x001a5a68]
LAB_00184ca2:
MOV EAX,0xfffffff2
CMOVZ EDI,EAX
CALL 0x0010e6e0
LAB_00184caf:
TEST R14W,R14W
JNS 0x00184cbd
XORPD XMM0,xmmword ptr [0x001a5930]
LAB_00184cbd:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00184cc5:
OR R14D,0x7c01
JMP 0x00184c53
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 js_math_f16round(double param_1)
{
double dVar1;
ulong uVar2;
uint uVar3;
int8 in_RAX;
int iVar4;
uint uVar5;
int4 uVar6;
int4 uVar7;
double dVar8;
int local_14;
local_14 = (int)((ulong)in_RAX >> 0x20);
uVar5 = (uint)((ulong)param_1 >> 0x30) & 0x8000;
if (ABS(param_1) == INFINITY) {
LAB_00184b7f:
uVar5 = uVar5 | 0x7c00;
}
else {
if (NAN(param_1)) {
uVar5 = uVar5 | 0x7c01;
goto LAB_00184c53;
}
if ((param_1 == 0.0) && (!NAN(param_1))) goto LAB_00184c53;
dVar1 = frexp((double)((ulong)param_1 & _DAT_001a5940),&local_14);
if (0x10 < local_14) goto LAB_00184b7f;
dVar8 = 0.0;
iVar4 = 0;
if (-0x19 < local_14) {
if (local_14 < -0xd) {
dVar8 = scalbn(dVar1 + dVar1,local_14 + 0xd);
iVar4 = 0;
}
else {
dVar8 = dVar1 + dVar1 + _DAT_001a5a88;
iVar4 = local_14 + 0xe;
}
}
uVar3 = (uint)(dVar8 * _DAT_001a5a90);
dVar1 = dVar8 * _DAT_001a5a90 - (double)(uVar3 & 0xffff);
if (DAT_001a5a98 <= dVar1) {
if ((uVar3 & 1) == 0) {
if ((dVar1 == DAT_001a5a98) && (!NAN(dVar1) && !NAN(DAT_001a5a98))) goto LAB_00184c4a;
}
uVar3 = uVar3 + 1;
if ((uVar3 & 0xffff) == 0x400) {
iVar4 = iVar4 + 1;
if (iVar4 == 0x1f) goto LAB_00184b7f;
uVar3 = 0;
}
}
LAB_00184c4a:
uVar5 = uVar5 | iVar4 << 10 | uVar3;
}
LAB_00184c53:
uVar3 = uVar5 & 0x7c00;
if (uVar3 == 0x7c00) {
uVar6 = (int4)*(int8 *)(&DAT_001a5920 + (ulong)((uVar5 & 0x3ff) == 0) * 8);
uVar7 = (int4)
((ulong)*(int8 *)(&DAT_001a5920 + (ulong)((uVar5 & 0x3ff) == 0) * 8) >> 0x20);
}
else {
dVar1 = (double)(uVar5 & 0x3ff) * _DAT_001a5a80;
iVar4 = (uVar3 >> 10) - 0xf;
if (uVar3 == 0) {
iVar4 = -0xe;
}
else {
dVar1 = dVar1 + DAT_001a5a68;
}
dVar1 = scalbn(dVar1,iVar4);
uVar6 = SUB84(dVar1,0);
uVar7 = (int4)((ulong)dVar1 >> 0x20);
}
if ((short)uVar5 < 0) {
uVar2 = CONCAT44(uVar7,uVar6) ^ _DAT_001a5930;
uVar6 = (int4)uVar2;
uVar7 = (int4)(uVar2 >> 0x20);
}
return CONCAT44(uVar7,uVar6);
}
| |
28,333 | minja::Value::at(unsigned long) | monkey531[P]llama/common/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O1 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0xb5502
testq %rcx, %rcx
jne 0xb5502
cmpb $0x0, 0x40(%r14)
jne 0xb5502
cmpq $0x0, 0x30(%r14)
je 0xb554d
testq %rcx, %rcx
je 0xb5535
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xb557f
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
jmp 0xb5544
testq %rdi, %rdi
je 0xb558d
leaq 0x8(%rsp), %rsi
callq 0xb586a
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x62d85(%rip), %rsi # 0x1182e6
movq %rax, %rdi
callq 0x1d410
movq 0xa3a78(%rip), %rsi # 0x158fe8
movq 0xa39e1(%rip), %rdx # 0x158f58
movq %rbx, %rdi
callq 0x1e5a0
leaq 0x634d0(%rip), %rdi # 0x118a56
xorl %eax, %eax
callq 0x1e2a0
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xab4e2
leaq 0x6347f(%rip), %rsi # 0x118a34
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x9d29f
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e420
xorl %ebp, %ebp
movq 0xa3a0b(%rip), %rsi # 0x158fe8
movq 0xa3974(%rip), %rdx # 0x158f58
movq %rbx, %rdi
callq 0x1e5a0
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5612
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xb5612
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5635
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xb5635
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
jne 0xb563f
jmp 0xb5647
movq %rax, %r14
movq %rbx, %rdi
callq 0x1d8b0
movq %r14, %rdi
callq 0x1e650
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov r14, rdi
mov [rsp+68h+var_60], rsi
mov rcx, [rdi+10h]
mov rdi, [rdi+20h]
test rdi, rdi
jnz short loc_B5502
test rcx, rcx
jnz short loc_B5502
cmp byte ptr [r14+40h], 0
jnz short loc_B5502
cmp qword ptr [r14+30h], 0
jz short loc_B554D
loc_B5502:
test rcx, rcx
jz short loc_B5535
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_B557F
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
jmp short loc_B5544
loc_B5535:
test rdi, rdi
jz short loc_B558D
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
loc_B5544:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_B554D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
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, rbx; void *
call ___cxa_throw
loc_B557F:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_B558D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+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:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5612
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B5612
mov r14, rax
mov bpl, 1
loc_B5612:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5635
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B5635
mov r14, rax
mov bpl, 1
loc_B5635:
test bpl, bpl
jnz short loc_B563F
jmp short loc_B5647
mov r14, rax
loc_B563F:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B5647:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, unsigned long long a2)
{
_QWORD *v3; // rcx
long long v4; // rdi
unsigned long long v5; // rdx
std::runtime_error *exception; // rbx
void *v8; // rbx
unsigned long long v9; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v11[16]; // [rsp+30h] [rbp-38h] BYREF
v9 = a2;
v3 = (_QWORD *)*((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v5);
return 80 * a2 + *v3;
}
else
{
if ( !v4 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v8, v11);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v4,
&v9);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JNZ 0x001b5502
TEST RCX,RCX
JNZ 0x001b5502
CMP byte ptr [R14 + 0x40],0x0
JNZ 0x001b5502
CMP qword ptr [R14 + 0x30],0x0
JZ 0x001b554d
LAB_001b5502:
TEST RCX,RCX
JZ 0x001b5535
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x001b557f
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
JMP 0x001b5544
LAB_001b5535:
TEST RDI,RDI
JZ 0x001b558d
LEA RSI,[RSP + 0x8]
CALL 0x001b586a
LAB_001b5544:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001b554d:
MOV EDI,0x10
CALL 0x0011d5b0
MOV RBX,RAX
LAB_001b555a:
LEA RSI,[0x2182e6]
MOV RDI,RAX
CALL 0x0011d410
LAB_001b5569:
MOV RSI,qword ptr [0x00258fe8]
MOV RDX,qword ptr [0x00258f58]
MOV RDI,RBX
CALL 0x0011e5a0
LAB_001b557f:
LEA RDI,[0x218a56]
XOR EAX,EAX
CALL 0x0011e2a0
LAB_001b558d:
MOV EDI,0x10
CALL 0x0011d5b0
MOV RBX,RAX
LAB_001b559a:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001ab4e2
LAB_001b55ae:
LEA RSI,[0x218a34]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x0019d29f
MOV BPL,0x1
LAB_001b55c7:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0011e420
XOR EBP,EBP
MOV RSI,qword ptr [0x00258fe8]
MOV RDX,qword ptr [0x00258f58]
MOV RDI,RBX
CALL 0x0011e5a0
|
/* minja::Value::at(unsigned long) */
long __thiscall minja::Value::at(Value *this,ulong param_1)
{
long *plVar1;
long lVar2;
runtime_error *prVar3;
ulong uVar4;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
plVar1 = *(long **)(this + 0x10);
lVar2 = *(long *)(this + 0x20);
local_60 = param_1;
if ((((lVar2 == 0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b555a to 001b5568 has its CatchHandler @ 001b563c */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00258fe8,PTR__runtime_error_00258f58);
}
if (plVar1 == (long *)0x0) {
if (lVar2 == 0) goto LAB_001b558d;
lVar2 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(lVar2,&local_60);
}
else {
uVar4 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar4 < param_1 || uVar4 - param_1 == 0) {
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_001b558d:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b559a to 001b55ad has its CatchHandler @ 001b562f */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 001b55ae to 001b55c3 has its CatchHandler @ 001b560c */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 001b55c7 to 001b55eb has its CatchHandler @ 001b55ec */
std::runtime_error::runtime_error(prVar3,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00258fe8,PTR__runtime_error_00258f58);
}
lVar2 = *plVar1 + param_1 * 0x50;
}
return lVar2;
}
| |
28,334 | minja::Value::at(unsigned long) | monkey531[P]llama/common/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O2 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
callq 0x7feaa
testb %al, %al
jne 0x877b7
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x8779b
movq %rbx, %rsi
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x879bc
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x877e7
leaq 0x8(%rsp), %rsi
callq 0x879da
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x4aa0d(%rip), %rsi # 0xd21d6
movq %rax, %rdi
callq 0x26420
movq 0x9a818(%rip), %rsi # 0x121ff0
movq 0x9a779(%rip), %rdx # 0x121f58
movq %rbx, %rdi
callq 0x275b0
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x7f8c0
leaq 0x4b119(%rip), %rsi # 0xd2924
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x74fe2
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x27450
xorl %ebp, %ebp
movq 0x9a7bd(%rip), %rsi # 0x121ff0
movq 0x9a71e(%rip), %rdx # 0x121f58
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x27998
jmp 0x87857
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x27998
testb %bpl, %bpl
jne 0x8786d
jmp 0x87875
jmp 0x8786a
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
mov [rsp+68h+var_60], rsi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_877B7
mov rdi, [r14+10h]
test rdi, rdi
jz short loc_8779B
mov rsi, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_8779B:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_877E7
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_877B7:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_877E7:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+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:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_87857
mov r14, rax
mov bpl, 1
loc_87857:
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_8786D
jmp short loc_87875
jmp short $+2
loc_8786A:
mov r14, rax
loc_8786D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_87875:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::at(minja::Value *this, long long a2)
{
long long v3; // rdi
long long v5; // rdi
std::runtime_error *exception; // rbx
void *v7; // rbx
long long v8; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF
v8 = a2;
if ( minja::Value::is_null(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *((_QWORD *)this + 2);
if ( v3 )
return std::vector<minja::Value>::at(v3, a2);
v5 = *((_QWORD *)this + 4);
if ( !v5 )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(v7, v10);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v5,
&v8);
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CALL 0x0017feaa
TEST AL,AL
JNZ 0x001877b7
MOV RDI,qword ptr [R14 + 0x10]
TEST RDI,RDI
JZ 0x0018779b
MOV RSI,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
JMP 0x001879bc
LAB_0018779b:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x001877e7
LEA RSI,[RSP + 0x8]
CALL 0x001879da
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001877b7:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_001877c2:
LEA RSI,[0x1d21d6]
MOV RDI,RAX
CALL 0x00126420
LAB_001877d1:
MOV RSI,qword ptr [0x00221ff0]
MOV RDX,qword ptr [0x00221f58]
MOV RDI,RBX
CALL 0x001275b0
LAB_001877e7:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_001877f2:
LEA RDI,[RSP + 0x10]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0017f8c0
LAB_00187804:
LEA RSI,[0x1d2924]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00174fe2
MOV BPL,0x1
LAB_0018781d:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00127450
XOR EBP,EBP
MOV RSI,qword ptr [0x00221ff0]
MOV RDX,qword ptr [0x00221f58]
MOV RDI,RBX
CALL 0x001275b0
|
/* minja::Value::at(unsigned long) */
void __thiscall minja::Value::at(Value *this,ulong param_1)
{
char cVar1;
runtime_error *prVar2;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
local_60 = param_1;
cVar1 = is_null(this);
if (cVar1 != '\0') {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001877c2 to 001877d0 has its CatchHandler @ 0018786a */
std::runtime_error::runtime_error(prVar2,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00221ff0,PTR__runtime_error_00221f58);
}
if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) !=
(vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::at
(*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1);
return;
}
if (*(long *)(this + 0x20) != 0) {
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(*(long *)(this + 0x20),&local_60);
return;
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001877f2 to 00187803 has its CatchHandler @ 00187868 */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 00187804 to 00187819 has its CatchHandler @ 00187851 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 0018781d to 00187841 has its CatchHandler @ 00187842 */
std::runtime_error::runtime_error(prVar2,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00221ff0,PTR__runtime_error_00221f58);
}
| |
28,335 | minja::Value::at(unsigned long) | monkey531[P]llama/common/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O3 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0xb4592
testq %rcx, %rcx
jne 0xb4592
cmpb $0x0, 0x40(%r14)
jne 0xb4592
cmpq $0x0, 0x30(%r14)
je 0xb45dd
testq %rcx, %rcx
je 0xb45c5
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xb460f
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
jmp 0xb45d4
testq %rdi, %rdi
je 0xb461d
leaq 0x8(%rsp), %rsi
callq 0xb492e
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x60cf5(%rip), %rsi # 0x1152e6
movq %rax, %rdi
callq 0x1d410
movq 0xa19e8(%rip), %rsi # 0x155fe8
movq 0xa1951(%rip), %rdx # 0x155f58
movq %rbx, %rdi
callq 0x1e5b0
leaq 0x61440(%rip), %rdi # 0x115a56
xorl %eax, %eax
callq 0x1e2b0
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xaa67c
leaq 0x613ef(%rip), %rsi # 0x115a34
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x9cdd5
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e430
xorl %ebp, %ebp
movq 0xa197b(%rip), %rsi # 0x155fe8
movq 0xa18e4(%rip), %rdx # 0x155f58
movq %rbx, %rdi
callq 0x1e5b0
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb469a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1dc50
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb46b5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc50
testb %bpl, %bpl
jne 0xb46e1
jmp 0xb46e9
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb46e1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc50
jmp 0xb46e1
jmp 0xb46de
movq %rax, %r14
movq %rbx, %rdi
callq 0x1d8c0
movq %r14, %rdi
callq 0x1e660
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov r14, rdi
mov [rsp+68h+var_60], rsi
mov rcx, [rdi+10h]
mov rdi, [rdi+20h]
test rdi, rdi
jnz short loc_B4592
test rcx, rcx
jnz short loc_B4592
cmp byte ptr [r14+40h], 0
jnz short loc_B4592
cmp qword ptr [r14+30h], 0
jz short loc_B45DD
loc_B4592:
test rcx, rcx
jz short loc_B45C5
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_B460F
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
jmp short loc_B45D4
loc_B45C5:
test rdi, rdi
jz short loc_B461D
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
loc_B45D4:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_B45DD:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
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, rbx; void *
call ___cxa_throw
loc_B460F:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_B461D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+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:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B469A
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B469A:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B46B5
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B46B5:
test bpl, bpl
jnz short loc_B46E1
jmp short loc_B46E9
mov r14, rax
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B46E1
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B46E1
jmp short $+2
loc_B46DE:
mov r14, rax
loc_B46E1:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B46E9:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, unsigned long long a2)
{
_QWORD *v3; // rcx
long long v4; // rdi
unsigned long long v5; // rdx
std::runtime_error *exception; // rbx
void *v8; // rbx
unsigned long long v9; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v11[16]; // [rsp+30h] [rbp-38h] BYREF
v9 = a2;
v3 = (_QWORD *)*((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v5);
return 80 * a2 + *v3;
}
else
{
if ( !v4 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v8, v11);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v4,
&v9);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JNZ 0x001b4592
TEST RCX,RCX
JNZ 0x001b4592
CMP byte ptr [R14 + 0x40],0x0
JNZ 0x001b4592
CMP qword ptr [R14 + 0x30],0x0
JZ 0x001b45dd
LAB_001b4592:
TEST RCX,RCX
JZ 0x001b45c5
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x001b460f
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
JMP 0x001b45d4
LAB_001b45c5:
TEST RDI,RDI
JZ 0x001b461d
LEA RSI,[RSP + 0x8]
CALL 0x001b492e
LAB_001b45d4:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001b45dd:
MOV EDI,0x10
CALL 0x0011d5b0
MOV RBX,RAX
LAB_001b45ea:
LEA RSI,[0x2152e6]
MOV RDI,RAX
CALL 0x0011d410
LAB_001b45f9:
MOV RSI,qword ptr [0x00255fe8]
MOV RDX,qword ptr [0x00255f58]
MOV RDI,RBX
CALL 0x0011e5b0
LAB_001b460f:
LEA RDI,[0x215a56]
XOR EAX,EAX
CALL 0x0011e2b0
LAB_001b461d:
MOV EDI,0x10
CALL 0x0011d5b0
MOV RBX,RAX
LAB_001b462a:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001aa67c
LAB_001b463e:
LEA RSI,[0x215a34]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x0019cdd5
MOV BPL,0x1
LAB_001b4657:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0011e430
XOR EBP,EBP
MOV RSI,qword ptr [0x00255fe8]
MOV RDX,qword ptr [0x00255f58]
MOV RDI,RBX
CALL 0x0011e5b0
|
/* minja::Value::at(unsigned long) */
long __thiscall minja::Value::at(Value *this,ulong param_1)
{
long *plVar1;
long lVar2;
runtime_error *prVar3;
ulong uVar4;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
plVar1 = *(long **)(this + 0x10);
lVar2 = *(long *)(this + 0x20);
local_60 = param_1;
if ((((lVar2 == 0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b45ea to 001b45f8 has its CatchHandler @ 001b46de */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58);
}
if (plVar1 == (long *)0x0) {
if (lVar2 == 0) goto LAB_001b461d;
lVar2 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(lVar2,&local_60);
}
else {
uVar4 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar4 < param_1 || uVar4 - param_1 == 0) {
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_001b461d:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b462a to 001b463d has its CatchHandler @ 001b46dc */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 001b463e to 001b4653 has its CatchHandler @ 001b46bc */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 001b4657 to 001b467b has its CatchHandler @ 001b467c */
std::runtime_error::runtime_error(prVar3,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58);
}
lVar2 = *plVar1 + param_1 * 0x50;
}
return lVar2;
}
| |
28,336 | PollInputEvents | csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | void PollInputEvents(void)
{
#if defined(SUPPORT_GESTURES_SYSTEM)
// NOTE: Gestures update must be called every frame to reset gestures correctly
// because ProcessGestureEvent() is just called on an event, not every frame
UpdateGestures();
#endif
// Reset keys/chars pressed registered
CORE.Input.Keyboard.keyPressedQueueCount = 0;
CORE.Input.Keyboard.charPressedQueueCount = 0;
// Reset last gamepad button/axis registered state
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
//CORE.Input.Gamepad.axisCount = 0;
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
// Register previous keys states
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++)
{
CORE.Input.Keyboard.previousKeyState[i] = CORE.Input.Keyboard.currentKeyState[i];
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
}
// Register previous mouse states
for (int i = 0; i < MAX_MOUSE_BUTTONS; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
// Register previous mouse wheel state
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = (Vector2){ 0.0f, 0.0f };
// Register previous mouse position
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
// Register previous touch states
for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.previousTouchState[i] = CORE.Input.Touch.currentTouchState[i];
// Reset touch positions
//for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 };
// Map touch position to mouse position for convenience
// WARNING: If the target desktop device supports touch screen, this behaviour should be reviewed!
// TODO: GLFW does not support multi-touch input just yet
// https://www.codeproject.com/Articles/668404/Programming-for-Multi-Touch
// https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-messages
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
// Check if gamepads are ready
// NOTE: We do it here in case of disconnection
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (glfwJoystickPresent(i)) CORE.Input.Gamepad.ready[i] = true;
else CORE.Input.Gamepad.ready[i] = false;
}
// Register gamepads buttons events
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (CORE.Input.Gamepad.ready[i]) // Check if gamepad is available
{
// Register previous gamepad states
for (int k = 0; k < MAX_GAMEPAD_BUTTONS; k++) CORE.Input.Gamepad.previousButtonState[i][k] = CORE.Input.Gamepad.currentButtonState[i][k];
// Get current gamepad state
// NOTE: There is no callback available, so we get it manually
GLFWgamepadstate state = { 0 };
glfwGetGamepadState(i, &state); // This remapps all gamepads so they have their buttons mapped like an xbox controller
const unsigned char *buttons = state.buttons;
for (int k = 0; (buttons != NULL) && (k < MAX_GAMEPAD_BUTTONS); k++)
{
int button = -1; // GamepadButton enum values assigned
switch (k)
{
case GLFW_GAMEPAD_BUTTON_Y: button = GAMEPAD_BUTTON_RIGHT_FACE_UP; break;
case GLFW_GAMEPAD_BUTTON_B: button = GAMEPAD_BUTTON_RIGHT_FACE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_A: button = GAMEPAD_BUTTON_RIGHT_FACE_DOWN; break;
case GLFW_GAMEPAD_BUTTON_X: button = GAMEPAD_BUTTON_RIGHT_FACE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_LEFT_BUMPER: button = GAMEPAD_BUTTON_LEFT_TRIGGER_1; break;
case GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER: button = GAMEPAD_BUTTON_RIGHT_TRIGGER_1; break;
case GLFW_GAMEPAD_BUTTON_BACK: button = GAMEPAD_BUTTON_MIDDLE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_GUIDE: button = GAMEPAD_BUTTON_MIDDLE; break;
case GLFW_GAMEPAD_BUTTON_START: button = GAMEPAD_BUTTON_MIDDLE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_DPAD_UP: button = GAMEPAD_BUTTON_LEFT_FACE_UP; break;
case GLFW_GAMEPAD_BUTTON_DPAD_RIGHT: button = GAMEPAD_BUTTON_LEFT_FACE_RIGHT; break;
case GLFW_GAMEPAD_BUTTON_DPAD_DOWN: button = GAMEPAD_BUTTON_LEFT_FACE_DOWN; break;
case GLFW_GAMEPAD_BUTTON_DPAD_LEFT: button = GAMEPAD_BUTTON_LEFT_FACE_LEFT; break;
case GLFW_GAMEPAD_BUTTON_LEFT_THUMB: button = GAMEPAD_BUTTON_LEFT_THUMB; break;
case GLFW_GAMEPAD_BUTTON_RIGHT_THUMB: button = GAMEPAD_BUTTON_RIGHT_THUMB; break;
default: break;
}
if (button != -1) // Check for valid button
{
if (buttons[k] == GLFW_PRESS)
{
CORE.Input.Gamepad.currentButtonState[i][button] = 1;
CORE.Input.Gamepad.lastButtonPressed = button;
}
else CORE.Input.Gamepad.currentButtonState[i][button] = 0;
}
}
// Get current axis state
const float *axes = state.axes;
for (int k = 0; (axes != NULL) && (k < GLFW_GAMEPAD_AXIS_LAST + 1); k++)
{
CORE.Input.Gamepad.axisState[i][k] = axes[k];
}
// Register buttons for 2nd triggers (because GLFW doesn't count these as buttons but rather axis)
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_LEFT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_LEFT_TRIGGER] > 0.1f);
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_RIGHT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_RIGHT_TRIGGER] > 0.1f);
CORE.Input.Gamepad.axisCount[i] = GLFW_GAMEPAD_AXIS_LAST + 1;
}
}
CORE.Window.resizedLastFrame = false;
if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) -> Update keys state
// While window minimized, stop loop execution
while (IsWindowState(FLAG_WINDOW_MINIMIZED) && !IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) glfwWaitEvents();
CORE.Window.shouldClose = glfwWindowShouldClose(platform.handle);
// Reset close status for next frame
glfwSetWindowShouldClose(platform.handle, GLFW_FALSE);
} | O3 | c | PollInputEvents:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
callq 0x6adbc
xorl %eax, %eax
movl %eax, 0xcba56(%rip) # 0x13c2c4
movl %eax, 0xcba94(%rip) # 0x13c308
movl %eax, 0xcbb4e(%rip) # 0x13c3c8
movq $-0x200, %rax # imm = 0xFE00
leaq 0xcb338(%rip), %r15 # 0x13bbc0
xorps %xmm0, %xmm0
movups 0x2c4(%rax,%r15), %xmm1
movups %xmm1, 0x4c4(%rax,%r15)
movups %xmm0, 0x6c4(%rax,%r15)
addq $0x10, %rax
jne 0x7088b
movq 0xcba7f(%rip), %rax # 0x13c332
movq %rax, 0xcba80(%rip) # 0x13c33a
movq 0xcba83(%rip), %rax # 0x13c344
movq %rax, 0xcba84(%rip) # 0x13c34c
movq $0x0, 0xcba71(%rip) # 0x13c344
movq 0xcba42(%rip), %rax # 0x13c31c
movq %rax, 0xcba43(%rip) # 0x13c324
movq 0xcbad0(%rip), %rcx # 0x13c3b8
movq %rcx, 0xcbad1(%rip) # 0x13c3c0
movq %rax, 0xcba82(%rip) # 0x13c378
xorl %ebx, %ebx
movl %ebx, %edi
callq 0xbdb1a
testl %eax, %eax
setne 0x81c(%rbx,%r15)
incq %rbx
cmpq $0x4, %rbx
jne 0x708f8
leaq 0xcbc46(%rip), %r12 # 0x13c560
leaq 0x10(%rsp), %r13
xorl %ebx, %ebx
cmpb $0x1, 0x81c(%rbx,%r15)
jne 0x70a07
movq %rbx, %r14
shlq $0x5, %r14
leaq (%r14,%r15), %rbp
addq $0xa20, %rbp # imm = 0xA20
xorl %eax, %eax
movups -0x80(%r12,%rax), %xmm0
movups %xmm0, (%r12,%rax)
addq $0x10, %rax
cmpq $0x20, %rax
jne 0x70944
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x20(%rsp)
movl %ebx, %edi
movq %rsp, %rsi
callq 0xbe687
leaq (%r15,%r14), %rax
leaq 0x6debd(%rip), %rcx # 0xde840
xorl %edx, %edx
cmpq $0xe, %rdx
ja 0x709a9
movl (%rcx), %esi
cmpb $0x1, (%rsp,%rdx)
leaq 0x920(%rsi,%rax), %rdi
jne 0x709a6
movb $0x1, (%rdi)
movl %esi, 0xcba24(%rip) # 0x13c3c8
jmp 0x709a9
movb $0x0, (%rdi)
incq %rdx
addq $0x4, %rcx
cmpq $0x20, %rdx
jne 0x70985
movq 0x10(%r13), %rax
movq %rax, 0x10(%rbp)
movups (%r13), %xmm0
movups %xmm0, (%rbp)
movss 0xa30(%r14,%r15), %xmm0
movss 0xa34(%r14,%r15), %xmm1
movss 0x6c961(%rip), %xmm2 # 0xdd344
ucomiss %xmm2, %xmm0
seta 0x92a(%r14,%r15)
ucomiss %xmm2, %xmm1
seta 0x92c(%r14,%r15)
movl $0x6, 0x80c(%r15,%rbx,4)
incq %rbx
addq $0x20, %r12
cmpq $0x4, %rbx
jne 0x70921
movb $0x0, 0xcb1b0(%rip) # 0x13bbcf
cmpb $0x0, 0xcb1aa(%rip) # 0x13bbd0
je 0x70a2f
callq 0xc1e41
jmp 0x70a34
callq 0xc1e21
movl $0x300, %ebx # imm = 0x300
movl 0xcb189(%rip), %eax # 0x13bbc8
andl %ebx, %eax
cmpl $0x200, %eax # imm = 0x200
jne 0x70a4f
callq 0xc1e41
jmp 0x70a39
movq 0xcbc52(%rip), %rdi # 0x13c6a8
callq 0xc0c85
testl %eax, %eax
setne 0xcb16a(%rip) # 0x13bbce
movq 0xcbc3d(%rip), %rdi # 0x13c6a8
xorl %esi, %esi
callq 0xc0ccf
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| PollInputEvents:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
call UpdateGestures
xor eax, eax
mov cs:dword_13C2C4, eax
mov cs:dword_13C308, eax
mov cs:dword_13C3C8, eax
mov rax, 0FFFFFFFFFFFFFE00h
lea r15, CORE
xorps xmm0, xmm0
loc_7088B:
movups xmm1, xmmword ptr [rax+r15+2C4h]
movups xmmword ptr [rax+r15+4C4h], xmm1
movups xmmword ptr [rax+r15+6C4h], xmm0
add rax, 10h
jnz short loc_7088B
mov rax, qword ptr cs:unk_13C332
mov cs:qword_13C33A, rax
mov rax, cs:qword_13C344
mov cs:qword_13C34C, rax
mov cs:qword_13C344, 0
mov rax, qword ptr cs:xmmword_13C31C
mov qword ptr cs:xmmword_13C31C+8, rax
mov rcx, qword ptr cs:unk_13C3B8
mov cs:qword_13C3C0, rcx
mov cs:qword_13C378, rax
xor ebx, ebx
loc_708F8:
mov edi, ebx
call glfwJoystickPresent
test eax, eax
setnz byte ptr [rbx+r15+81Ch]
inc rbx
cmp rbx, 4
jnz short loc_708F8
lea r12, unk_13C560
lea r13, [rsp+58h+var_48]
xor ebx, ebx
loc_70921:
cmp byte ptr [rbx+r15+81Ch], 1
jnz loc_70A07
mov r14, rbx
shl r14, 5
lea rbp, [r14+r15]
add rbp, 0A20h
xor eax, eax
loc_70944:
movups xmm0, xmmword ptr [r12+rax-80h]
movups xmmword ptr [r12+rax], xmm0
add rax, 10h
cmp rax, 20h ; ' '
jnz short loc_70944
xorps xmm0, xmm0
movaps [rsp+58h+var_48], xmm0
movaps [rsp+58h+var_58], xmm0
mov [rsp+58h+var_38], 0
mov edi, ebx
mov rsi, rsp
call glfwGetGamepadState
lea rax, [r15+r14]
lea rcx, unk_DE840
xor edx, edx
loc_70985:
cmp rdx, 0Eh
ja short loc_709A9
mov esi, [rcx]
cmp byte ptr [rsp+rdx+58h+var_58], 1
lea rdi, [rsi+rax+920h]
jnz short loc_709A6
mov byte ptr [rdi], 1
mov cs:dword_13C3C8, esi
jmp short loc_709A9
loc_709A6:
mov byte ptr [rdi], 0
loc_709A9:
inc rdx
add rcx, 4
cmp rdx, 20h ; ' '
jnz short loc_70985
mov rax, [r13+10h]
mov [rbp+10h], rax
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [rbp+0], xmm0
movss xmm0, dword ptr [r14+r15+0A30h]
movss xmm1, dword ptr [r14+r15+0A34h]
movss xmm2, cs:dword_DD344
ucomiss xmm0, xmm2
setnbe byte ptr [r14+r15+92Ah]
ucomiss xmm1, xmm2
setnbe byte ptr [r14+r15+92Ch]
mov dword ptr [r15+rbx*4+80Ch], 6
loc_70A07:
inc rbx
add r12, 20h ; ' '
cmp rbx, 4
jnz loc_70921
mov cs:byte_13BBCF, 0
cmp cs:byte_13BBD0, 0
jz short loc_70A2F
call glfwWaitEvents
jmp short loc_70A34
loc_70A2F:
call glfwPollEvents
loc_70A34:
mov ebx, 300h
loc_70A39:
mov eax, cs:dword_13BBC8
and eax, ebx
cmp eax, 200h
jnz short loc_70A4F
call glfwWaitEvents
jmp short loc_70A39
loc_70A4F:
mov rdi, cs:platform_0
call glfwWindowShouldClose
test eax, eax
setnz cs:byte_13BBCE
mov rdi, cs:platform_0
xor esi, esi
call glfwSetWindowShouldClose
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long PollInputEvents(double a1, double a2, double a3, double a4, double a5)
{
long long v5; // rax
long long i; // rbx
char *v7; // r12
long long j; // rbx
long long v9; // r14
long long k; // rax
unsigned int *v11; // rcx
unsigned long long m; // rdx
long long v13; // rsi
_BYTE *v14; // rdi
float v15; // xmm1_4
__int128 v17; // [rsp+0h] [rbp-58h] BYREF
__int128 v18; // [rsp+10h] [rbp-48h]
long long v19; // [rsp+20h] [rbp-38h]
UpdateGestures(a1, a2, a3, a4, a5);
dword_13C2C4 = 0;
dword_13C308 = 0;
dword_13C3C8 = 0;
v5 = 0x1FFFFFFFFFFFFFC0LL;
do
{
*(_OWORD *)((char *)&CORE[v5 + 152] + 4) = *(_OWORD *)((char *)&CORE[v5 + 88] + 4);
*(_OWORD *)((char *)&CORE[v5 + 216] + 4) = 0LL;
v5 += 2LL;
}
while ( v5 * 8 );
qword_13C33A = unk_13C332;
qword_13C34C = qword_13C344;
qword_13C344 = 0LL;
*((_QWORD *)&xmmword_13C31C + 1) = xmmword_13C31C;
qword_13C3C0 = unk_13C3B8;
qword_13C378 = xmmword_13C31C;
for ( i = 0LL; i != 4; ++i )
*((_BYTE *)&CORE[259] + i + 4) = (unsigned int)glfwJoystickPresent((unsigned int)i, 0.0) != 0;
v7 = (char *)&unk_13C560;
for ( j = 0LL; j != 4; ++j )
{
if ( *((_BYTE *)&CORE[259] + j + 4) == 1 )
{
v9 = 4 * j;
for ( k = 0LL; k != 32; k += 16LL )
*(_OWORD *)&v7[k] = *(_OWORD *)&v7[k - 128];
v18 = 0LL;
v17 = 0LL;
v19 = 0LL;
glfwGetGamepadState((unsigned int)j, &v17);
v11 = (unsigned int *)&unk_DE840;
for ( m = 0LL; m != 32; ++m )
{
if ( m <= 0xE )
{
v13 = *v11;
v14 = (char *)&CORE[v9 + 292] + v13;
if ( *((_BYTE *)&v17 + m) == 1 )
{
*v14 = 1;
dword_13C3C8 = v13;
}
else
{
*v14 = 0;
}
}
++v11;
}
CORE[4 * j + 326] = v19;
*(_OWORD *)&CORE[4 * j + 324] = v18;
v15 = *((float *)&CORE[v9 + 326] + 1);
BYTE2(CORE[v9 + 293]) = *(float *)&CORE[v9 + 326] > 0.1;
BYTE4(CORE[v9 + 293]) = v15 > 0.1;
*((_DWORD *)&CORE[257] + j + 1) = 6;
}
v7 += 32;
}
byte_13BBCF = 0;
if ( byte_13BBD0 )
goto LABEL_20;
glfwPollEvents();
while ( (dword_13BBC8 & 0x300) == 0x200 )
LABEL_20:
glfwWaitEvents();
byte_13BBCE = (unsigned int)glfwWindowShouldClose(platform_0) != 0;
return glfwSetWindowShouldClose(platform_0, 0LL);
}
| PollInputEvents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CALL 0x0016adbc
XOR EAX,EAX
MOV dword ptr [0x0023c2c4],EAX
MOV dword ptr [0x0023c308],EAX
MOV dword ptr [0x0023c3c8],EAX
MOV RAX,-0x200
LEA R15,[0x23bbc0]
XORPS XMM0,XMM0
LAB_0017088b:
MOVUPS XMM1,xmmword ptr [RAX + R15*0x1 + 0x2c4]
MOVUPS xmmword ptr [RAX + R15*0x1 + 0x4c4],XMM1
MOVUPS xmmword ptr [RAX + R15*0x1 + 0x6c4],XMM0
ADD RAX,0x10
JNZ 0x0017088b
MOV RAX,qword ptr [0x0023c332]
MOV qword ptr [0x0023c33a],RAX
MOV RAX,qword ptr [0x0023c344]
MOV qword ptr [0x0023c34c],RAX
MOV qword ptr [0x0023c344],0x0
MOV RAX,qword ptr [0x0023c31c]
MOV qword ptr [0x0023c324],RAX
MOV RCX,qword ptr [0x0023c3b8]
MOV qword ptr [0x0023c3c0],RCX
MOV qword ptr [0x0023c378],RAX
XOR EBX,EBX
LAB_001708f8:
MOV EDI,EBX
CALL 0x001bdb1a
TEST EAX,EAX
SETNZ byte ptr [RBX + R15*0x1 + 0x81c]
INC RBX
CMP RBX,0x4
JNZ 0x001708f8
LEA R12,[0x23c560]
LEA R13,[RSP + 0x10]
XOR EBX,EBX
LAB_00170921:
CMP byte ptr [RBX + R15*0x1 + 0x81c],0x1
JNZ 0x00170a07
MOV R14,RBX
SHL R14,0x5
LEA RBP,[R14 + R15*0x1]
ADD RBP,0xa20
XOR EAX,EAX
LAB_00170944:
MOVUPS XMM0,xmmword ptr [R12 + RAX*0x1 + -0x80]
MOVUPS xmmword ptr [R12 + RAX*0x1],XMM0
ADD RAX,0x10
CMP RAX,0x20
JNZ 0x00170944
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV EDI,EBX
MOV RSI,RSP
CALL 0x001be687
LEA RAX,[R15 + R14*0x1]
LEA RCX,[0x1de840]
XOR EDX,EDX
LAB_00170985:
CMP RDX,0xe
JA 0x001709a9
MOV ESI,dword ptr [RCX]
CMP byte ptr [RSP + RDX*0x1],0x1
LEA RDI,[RSI + RAX*0x1 + 0x920]
JNZ 0x001709a6
MOV byte ptr [RDI],0x1
MOV dword ptr [0x0023c3c8],ESI
JMP 0x001709a9
LAB_001709a6:
MOV byte ptr [RDI],0x0
LAB_001709a9:
INC RDX
ADD RCX,0x4
CMP RDX,0x20
JNZ 0x00170985
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RBP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RBP],XMM0
MOVSS XMM0,dword ptr [R14 + R15*0x1 + 0xa30]
MOVSS XMM1,dword ptr [R14 + R15*0x1 + 0xa34]
MOVSS XMM2,dword ptr [0x001dd344]
UCOMISS XMM0,XMM2
SETA byte ptr [R14 + R15*0x1 + 0x92a]
UCOMISS XMM1,XMM2
SETA byte ptr [R14 + R15*0x1 + 0x92c]
MOV dword ptr [R15 + RBX*0x4 + 0x80c],0x6
LAB_00170a07:
INC RBX
ADD R12,0x20
CMP RBX,0x4
JNZ 0x00170921
MOV byte ptr [0x0023bbcf],0x0
CMP byte ptr [0x0023bbd0],0x0
JZ 0x00170a2f
CALL 0x001c1e41
JMP 0x00170a34
LAB_00170a2f:
CALL 0x001c1e21
LAB_00170a34:
MOV EBX,0x300
LAB_00170a39:
MOV EAX,dword ptr [0x0023bbc8]
AND EAX,EBX
CMP EAX,0x200
JNZ 0x00170a4f
CALL 0x001c1e41
JMP 0x00170a39
LAB_00170a4f:
MOV RDI,qword ptr [0x0023c6a8]
CALL 0x001c0c85
TEST EAX,EAX
SETNZ byte ptr [0x0023bbce]
MOV RDI,qword ptr [0x0023c6a8]
XOR ESI,ESI
CALL 0x001c0ccf
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void PollInputEvents(void)
{
uint uVar1;
int8 uVar2;
float fVar3;
int iVar4;
long lVar5;
uint *puVar6;
ulong uVar7;
ulong uVar8;
int1 *puVar9;
long lVar10;
char local_58 [16];
int8 local_48;
int8 uStack_40;
int8 local_38;
UpdateGestures();
_DAT_0023c2c4 = 0;
_DAT_0023c308 = 0;
_DAT_0023c3c8 = 0;
lVar5 = -0x200;
do {
uVar2 = *(int8 *)(lVar5 + 0x23be8c);
*(int8 *)(&DAT_0023c084 + lVar5) = *(int8 *)(&DAT_0023be84 + lVar5);
*(int8 *)(lVar5 + 0x23c08c) = uVar2;
*(int8 *)(&DAT_0023c284 + lVar5) = 0;
*(int8 *)(&DAT_0023c28c + lVar5) = 0;
lVar5 = lVar5 + 0x10;
} while (lVar5 != 0);
_DAT_0023c33a = _DAT_0023c332;
_DAT_0023c34c = DAT_0023c344;
DAT_0023c344 = 0;
_DAT_0023c324 = DAT_0023c31c;
_DAT_0023c3c0 = _DAT_0023c3b8;
_DAT_0023c378 = DAT_0023c31c;
uVar8 = 0;
do {
iVar4 = glfwJoystickPresent(uVar8 & 0xffffffff);
(&DAT_0023c3dc)[uVar8] = iVar4 != 0;
uVar8 = uVar8 + 1;
} while (uVar8 != 4);
puVar9 = &DAT_0023c560;
uVar8 = 0;
do {
if ((&DAT_0023c3dc)[uVar8] == '\x01') {
lVar10 = uVar8 * 0x20;
lVar5 = 0;
do {
uVar2 = *(int8 *)((long)(puVar9 + lVar5 + -0x80) + 8);
*(int8 *)(puVar9 + lVar5) = *(int8 *)(puVar9 + lVar5 + -0x80);
*(int8 *)((long)(puVar9 + lVar5) + 8) = uVar2;
lVar5 = lVar5 + 0x10;
} while (lVar5 != 0x20);
local_48 = 0;
uStack_40 = 0;
local_58[0] = '\0';
local_58[1] = '\0';
local_58[2] = '\0';
local_58[3] = '\0';
local_58[4] = '\0';
local_58[5] = '\0';
local_58[6] = '\0';
local_58[7] = '\0';
local_58[8] = '\0';
local_58[9] = '\0';
local_58[10] = '\0';
local_58[0xb] = '\0';
local_58[0xc] = '\0';
local_58[0xd] = '\0';
local_58[0xe] = '\0';
local_58[0xf] = '\0';
local_38 = 0;
glfwGetGamepadState(uVar8 & 0xffffffff,local_58);
puVar6 = &DAT_001de840;
uVar7 = 0;
do {
if (uVar7 < 0xf) {
uVar1 = *puVar6;
if (local_58[uVar7] == '\x01') {
(&DAT_0023c4e0)[(ulong)uVar1 + lVar10] = 1;
_DAT_0023c3c8 = uVar1;
}
else {
(&DAT_0023c4e0)[(ulong)uVar1 + lVar10] = 0;
}
}
uVar7 = uVar7 + 1;
puVar6 = puVar6 + 1;
} while (uVar7 != 0x20);
*(int8 *)(&DAT_0023c5f0 + lVar10) = local_38;
*(int8 *)(&DAT_0023c5e0 + uVar8 * 8) = local_48;
*(int8 *)(&DAT_0023c5e8 + uVar8 * 8) = uStack_40;
fVar3 = DAT_001dd344;
(&DAT_0023c4ea)[lVar10] = DAT_001dd344 < *(float *)(&DAT_0023c5f0 + lVar10);
(&DAT_0023c4ec)[lVar10] = fVar3 < *(float *)(&DAT_0023c5f4 + lVar10);
*(int4 *)(&DAT_0023c3cc + uVar8 * 4) = 6;
}
uVar8 = uVar8 + 1;
puVar9 = puVar9 + 0x20;
} while (uVar8 != 4);
DAT_0023bbcf = 0;
if (DAT_0023bbd0 == '\0') {
glfwPollEvents();
}
else {
glfwWaitEvents();
}
while ((DAT_0023bbc8 & 0x300) == 0x200) {
glfwWaitEvents();
}
iVar4 = glfwWindowShouldClose(platform_0);
DAT_0023bbce = iVar4 != 0;
glfwSetWindowShouldClose(platform_0,0);
return;
}
| |
28,337 | ma_ll2str | eloqsql/libmariadb/libmariadb/ma_ll2str.c | char *ma_ll2str(long long val,char *dst,int radix)
{
char buffer[65];
register char *p;
long long_val;
if (radix < 0)
{
if (radix < -36 || radix > -2) return (char*) 0;
if (val < 0) {
*dst++ = '-';
val = 0ULL - val;
}
radix = -radix;
}
else
{
if (radix > 36 || radix < 2) return (char*) 0;
}
if (val == 0)
{
*dst++='0';
*dst='\0';
return dst;
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
while ((ulonglong) val > (ulonglong) LONG_MAX)
{
ulonglong quo=(ulonglong) val/(uint) radix;
uint rem= (uint) (val- quo* (uint) radix);
*--p = _dig_vec[rem];
val= quo;
}
long_val= (long) val;
while (long_val != 0)
{
long quo= long_val/radix;
*--p = _dig_vec[(uchar) (long_val - quo*radix)];
long_val= quo;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | ma_ll2str:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movl %edx, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
jge 0x79fef
cmpl $-0x24, -0x6c(%rbp)
jl 0x79fb5
cmpl $-0x2, -0x6c(%rbp)
jle 0x79fc2
movq $0x0, -0x58(%rbp)
jmp 0x7a15a
cmpq $0x0, -0x60(%rbp)
jge 0x79fe5
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
subl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x7a00a
cmpl $0x24, -0x6c(%rbp)
jg 0x79ffb
cmpl $0x2, -0x6c(%rbp)
jge 0x7a008
movq $0x0, -0x58(%rbp)
jmp 0x7a15a
jmp 0x7a00a
cmpq $0x0, -0x60(%rbp)
jne 0x7a037
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movb $0x30, (%rax)
movq -0x68(%rbp), %rax
movb $0x0, (%rax)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x7a15a
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x60(%rbp)
jbe 0x7a0b9
movq -0x60(%rbp), %rax
movl -0x6c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq -0x88(%rbp), %rcx
movl -0x6c(%rbp), %edx
imulq %rdx, %rcx
subq %rcx, %rax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, %ecx
leaq 0x1cfbd9(%rip), %rax # 0x249c70
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x7a04a
movq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x7a120
movq -0x80(%rbp), %rax
movslq -0x6c(%rbp), %rcx
cqto
idivq %rcx
movq %rax, -0x98(%rbp)
movq -0x80(%rbp), %rax
movq -0x98(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
subq %rcx, %rax
movzbl %al, %eax
movl %eax, %ecx
leaq 0x1cfb72(%rip), %rax # 0x249c70
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0x98(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x7a0c1
jmp 0x7a122
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x78(%rbp)
movb (%rax), %al
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x68(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7a14e
jmp 0x7a122
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7a187
movq -0xa0(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x382c0
nopl (%rax)
| ma_ll2str:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_6C], edx
cmp [rbp+var_6C], 0
jge short loc_79FEF
cmp [rbp+var_6C], 0FFFFFFDCh
jl short loc_79FB5
cmp [rbp+var_6C], 0FFFFFFFEh
jle short loc_79FC2
loc_79FB5:
mov [rbp+var_58], 0
jmp loc_7A15A
loc_79FC2:
cmp [rbp+var_60], 0
jge short loc_79FE5
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_60]
mov [rbp+var_60], rax
loc_79FE5:
xor eax, eax
sub eax, [rbp+var_6C]
mov [rbp+var_6C], eax
jmp short loc_7A00A
loc_79FEF:
cmp [rbp+var_6C], 24h ; '$'
jg short loc_79FFB
cmp [rbp+var_6C], 2
jge short loc_7A008
loc_79FFB:
mov [rbp+var_58], 0
jmp loc_7A15A
loc_7A008:
jmp short $+2
loc_7A00A:
cmp [rbp+var_60], 0
jnz short loc_7A037
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_68]
mov byte ptr [rax], 0
mov rax, [rbp+var_68]
mov [rbp+var_58], rax
jmp loc_7A15A
loc_7A037:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
loc_7A04A:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_60], rax
jbe short loc_7A0B9
mov rax, [rbp+var_60]
mov ecx, [rbp+var_6C]
xor edx, edx
div rcx
mov [rbp+var_88], rax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_88]
mov edx, [rbp+var_6C]
imul rcx, rdx
sub rax, rcx
mov [rbp+var_8C], eax
mov eax, [rbp+var_8C]
mov ecx, eax
lea rax, _dig_vec; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_88]
mov [rbp+var_60], rax
jmp short loc_7A04A
loc_7A0B9:
mov rax, [rbp+var_60]
mov [rbp+var_80], rax
loc_7A0C1:
cmp [rbp+var_80], 0
jz short loc_7A120
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_6C]
cqo
idiv rcx
mov [rbp+var_98], rax
mov rax, [rbp+var_80]
mov rcx, [rbp+var_98]
movsxd rdx, [rbp+var_6C]
imul rcx, rdx
sub rax, rcx
movzx eax, al
mov ecx, eax
lea rax, _dig_vec; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_98]
mov [rbp+var_80], rax
jmp short loc_7A0C1
loc_7A120:
jmp short $+2
loc_7A122:
mov rax, [rbp+var_78]
mov rcx, rax
add rcx, 1
mov [rbp+var_78], rcx
mov al, [rax]
mov rcx, [rbp+var_68]
mov rdx, rcx
add rdx, 1
mov [rbp+var_68], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_7A14E
jmp short loc_7A122
loc_7A14E:
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_58], rax
loc_7A15A:
mov rax, [rbp+var_58]
mov [rbp+var_A0], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7A187
mov rax, [rbp+var_A0]
add rsp, 0A0h
pop rbp
retn
loc_7A187:
call ___stack_chk_fail
| _BYTE * ma_ll2str(long long a1, _BYTE *a2, int a3)
{
_BYTE *v3; // rax
char *v4; // rax
char *v5; // rax
char *v6; // rax
_BYTE *v7; // rcx
signed long long i; // [rsp+20h] [rbp-80h]
char *v10; // [rsp+28h] [rbp-78h]
int v11; // [rsp+34h] [rbp-6Ch]
_BYTE *v12; // [rsp+38h] [rbp-68h]
_BYTE *v13; // [rsp+38h] [rbp-68h]
unsigned long long v14; // [rsp+40h] [rbp-60h]
char v16; // [rsp+90h] [rbp-10h] BYREF
unsigned long long v17; // [rsp+98h] [rbp-8h]
v17 = __readfsqword(0x28u);
v14 = a1;
v12 = a2;
v11 = a3;
if ( a3 >= 0 )
{
if ( a3 > 36 || a3 < 2 )
return 0LL;
}
else
{
if ( a3 < -36 || a3 > -2 )
return 0LL;
if ( a1 < 0 )
{
v12 = a2 + 1;
*a2 = 45;
v14 = -a1;
}
v11 = -a3;
}
if ( v14 )
{
v10 = &v16;
v16 = 0;
while ( v14 > 0x7FFFFFFFFFFFFFFFLL )
{
v4 = v10--;
*(v4 - 1) = dig_vec[v14 % (unsigned int)v11];
v14 /= (unsigned int)v11;
}
for ( i = v14; i; i /= v11 )
{
v5 = v10--;
*(v5 - 1) = dig_vec[(unsigned __int8)(i % v11)];
}
do
{
v6 = v10++;
LOBYTE(v6) = *v6;
v7 = v12++;
*v7 = (_BYTE)v6;
}
while ( (_BYTE)v6 );
return v12 - 1;
}
else
{
v3 = v12;
v13 = v12 + 1;
*v3 = 48;
*v13 = 0;
return v13;
}
}
| ma_ll2str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV dword ptr [RBP + -0x6c],EDX
CMP dword ptr [RBP + -0x6c],0x0
JGE 0x00179fef
CMP dword ptr [RBP + -0x6c],-0x24
JL 0x00179fb5
CMP dword ptr [RBP + -0x6c],-0x2
JLE 0x00179fc2
LAB_00179fb5:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x0017a15a
LAB_00179fc2:
CMP qword ptr [RBP + -0x60],0x0
JGE 0x00179fe5
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOV byte ptr [RAX],0x2d
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
LAB_00179fe5:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0017a00a
LAB_00179fef:
CMP dword ptr [RBP + -0x6c],0x24
JG 0x00179ffb
CMP dword ptr [RBP + -0x6c],0x2
JGE 0x0017a008
LAB_00179ffb:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x0017a15a
LAB_0017a008:
JMP 0x0017a00a
LAB_0017a00a:
CMP qword ptr [RBP + -0x60],0x0
JNZ 0x0017a037
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0x68]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0017a15a
LAB_0017a037:
LEA RAX,[RBP + -0x50]
ADD RAX,0x40
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
LAB_0017a04a:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x60],RAX
JBE 0x0017a0b9
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x6c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x88]
MOV EDX,dword ptr [RBP + -0x6c]
IMUL RCX,RDX
SUB RAX,RCX
MOV dword ptr [RBP + -0x8c],EAX
MOV EAX,dword ptr [RBP + -0x8c]
MOV ECX,EAX
LEA RAX,[0x349c70]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0017a04a
LAB_0017a0b9:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x80],RAX
LAB_0017a0c1:
CMP qword ptr [RBP + -0x80],0x0
JZ 0x0017a120
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RBP + -0x6c]
CQO
IDIV RCX
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x98]
MOVSXD RDX,dword ptr [RBP + -0x6c]
IMUL RCX,RDX
SUB RAX,RCX
MOVZX EAX,AL
MOV ECX,EAX
LEA RAX,[0x349c70]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0017a0c1
LAB_0017a120:
JMP 0x0017a122
LAB_0017a122:
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x78],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x68],RDX
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0017a14e
JMP 0x0017a122
LAB_0017a14e:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x58],RAX
LAB_0017a15a:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017a187
MOV RAX,qword ptr [RBP + -0xa0]
ADD RSP,0xa0
POP RBP
RET
LAB_0017a187:
CALL 0x001382c0
|
char * ma_ll2str(ulong param_1,char *param_2,uint param_3)
{
char cVar1;
char *pcVar2;
long in_FS_OFFSET;
ulong local_88;
char *local_80;
uint local_74;
char *local_70;
ulong local_68;
char *local_60;
char local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_70 = param_2;
local_68 = param_1;
if ((int)param_3 < 0) {
if (((int)param_3 < -0x24) || (-2 < (int)param_3)) {
local_60 = (char *)0x0;
goto LAB_0017a15a;
}
if ((long)param_1 < 0) {
local_70 = param_2 + 1;
*param_2 = '-';
local_68 = -param_1;
}
local_74 = -param_3;
}
else if ((0x24 < (int)param_3) || (local_74 = param_3, (int)param_3 < 2)) {
local_60 = (char *)0x0;
goto LAB_0017a15a;
}
if (local_68 == 0) {
local_60 = local_70 + 1;
*local_70 = '0';
*local_60 = '\0';
}
else {
local_19[1] = 0;
local_80 = local_19 + 1;
while (0x7fffffffffffffff < local_68) {
local_80[-1] = _dig_vec[(int)local_68 - (int)(local_68 / local_74) * local_74];
local_80 = local_80 + -1;
local_68 = local_68 / local_74;
}
local_88 = local_68;
while (pcVar2 = local_70, local_88 != 0) {
local_80[-1] = _dig_vec[(byte)((char)local_88 -
(char)((long)local_88 / (long)(int)local_74) * (char)local_74)];
local_88 = (long)local_88 / (long)(int)local_74;
local_80 = local_80 + -1;
}
do {
local_70 = pcVar2;
cVar1 = *local_80;
*local_70 = cVar1;
local_80 = local_80 + 1;
pcVar2 = local_70 + 1;
} while (cVar1 != '\0');
local_60 = local_70;
}
LAB_0017a15a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_60;
}
| |
28,338 | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | bool SVGElement::setAttribute(int specificity, PropertyID id, const std::string& value)
{
for(auto& attribute : m_attributes) {
if(id == attribute.id()) {
if(specificity < attribute.specificity())
return false;
parseAttribute(id, value);
attribute = Attribute(specificity, id, value);
return true;
}
}
parseAttribute(id, value);
m_attributes.emplace_front(specificity, id, value);
return true;
} | O1 | cpp | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpb $0x1, 0x40(%rdi)
je 0x1191b
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x20d18
movq 0x8c(%rbx), %rax
leaq 0x60(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x7c(%rbx), %xmm0
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x12e20
movq %r12, %rdi
movq %r15, %rsi
callq 0x20d8e
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xffc0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x20eba
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1191b
callq 0xc49a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x11939
callq 0xc49a
movq %rbx, %rdi
callq 0xa5c0
nop
| _ZNK7lunasvg11SVGGElement6renderERNS_14SVGRenderStateE:
push r15
push r14
push r12
push rbx
sub rsp, 78h
cmp byte ptr [rdi+40h], 1
jz short loc_1191B
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+98h+var_90]
mov rdi, r15; this
mov rsi, rbx; lunasvg::SVGElement *
call _ZN7lunasvg12SVGBlendInfoC2EPKNS_10SVGElementE; lunasvg::SVGBlendInfo::SVGBlendInfo(lunasvg::SVGElement const*)
mov rax, [rbx+8Ch]
lea rcx, [rsp+98h+var_38]; lunasvg::Transform *
mov [rcx+10h], rax
movups xmm0, xmmword ptr [rbx+7Ch]
movaps xmmword ptr [rcx], xmm0
lea r12, [rsp+98h+var_78]
mov rdi, r12; this
mov rsi, rbx; lunasvg::SVGElement *
mov rdx, r14; lunasvg::SVGRenderState *
call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementERKS0_RKNS_9TransformE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const&,lunasvg::Transform const&)
mov rdi, r12; this
mov rsi, r15; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState10beginGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::beginGroup(lunasvg::SVGBlendInfo const&)
lea rsi, [rsp+98h+var_78]
mov rdi, rbx
call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &)
lea rdi, [rsp+98h+var_78]; this
lea rsi, [rsp+98h+var_90]; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState8endGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::endGroup(lunasvg::SVGBlendInfo const&)
mov rdi, [rsp+98h+var_40]
test rdi, rdi
jz short loc_1191B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_1191B:
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_50]
test rdi, rdi
jz short loc_11939
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_11939:
mov rdi, rbx
call __Unwind_Resume
| long long lunasvg::SVGGElement::render(lunasvg::SVGGElement *this, lunasvg::SVGRenderState *a2)
{
long long result; // rax
_BYTE v3[24]; // [rsp+8h] [rbp-90h] BYREF
_BYTE v4[56]; // [rsp+20h] [rbp-78h] BYREF
volatile signed __int32 *v5; // [rsp+58h] [rbp-40h]
__int128 v6; // [rsp+60h] [rbp-38h] BYREF
long long v7; // [rsp+70h] [rbp-28h]
if ( *((_BYTE *)this + 64) != 1 )
{
lunasvg::SVGBlendInfo::SVGBlendInfo((lunasvg::SVGBlendInfo *)v3, this);
v7 = *(_QWORD *)((char *)this + 140);
v6 = *(_OWORD *)((char *)this + 124);
lunasvg::SVGRenderState::SVGRenderState((lunasvg::SVGRenderState *)v4, this, a2, (const lunasvg::Transform *)&v6);
lunasvg::SVGRenderState::beginGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v3);
lunasvg::SVGElement::renderChildren(this, (lunasvg::SVGRenderState *)v4);
result = lunasvg::SVGRenderState::endGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v3);
if ( v5 )
return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
}
return result;
}
| render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
CMP byte ptr [RDI + 0x40],0x1
JZ 0x0011191b
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,RBX
CALL 0x00120d18
MOV RAX,qword ptr [RBX + 0x8c]
LEA RCX,[RSP + 0x60]
MOV qword ptr [RCX + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX + 0x7c]
MOVAPS xmmword ptr [RCX],XMM0
LEA R12,[RSP + 0x20]
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R14
CALL 0x00112e20
LAB_001118e5:
MOV RDI,R12
MOV RSI,R15
CALL 0x00120d8e
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0010ffc0
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x8]
CALL 0x00120eba
LAB_0011190c:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x0011191b
CALL 0x0010c49a
LAB_0011191b:
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
|
/* lunasvg::SVGGElement::render(lunasvg::SVGRenderState&) const */
void __thiscall lunasvg::SVGGElement::render(SVGGElement *this,SVGRenderState *param_1)
{
SVGBlendInfo local_90 [24];
SVGRenderState local_78 [56];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
if (this[0x40] != (SVGGElement)0x1) {
SVGBlendInfo::SVGBlendInfo(local_90,(SVGElement *)this);
local_28 = *(int8 *)(this + 0x8c);
local_38 = *(int8 *)(this + 0x7c);
uStack_30 = *(int8 *)(this + 0x84);
SVGRenderState::SVGRenderState(local_78,(SVGElement *)this,param_1,(Transform *)&local_38);
/* try { // try from 001118e5 to 0011190b has its CatchHandler @ 00111927 */
SVGRenderState::beginGroup((SVGBlendInfo *)local_78);
SVGElement::renderChildren((SVGElement *)this,local_78);
SVGRenderState::endGroup(local_78,local_90);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
}
return;
}
| |
28,339 | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | bool SVGElement::setAttribute(int specificity, PropertyID id, const std::string& value)
{
for(auto& attribute : m_attributes) {
if(id == attribute.id()) {
if(specificity < attribute.specificity())
return false;
parseAttribute(id, value);
attribute = Attribute(specificity, id, value);
return true;
}
}
parseAttribute(id, value);
m_attributes.emplace_front(specificity, id, value);
return true;
} | O2 | cpp | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
cmpb $0x1, 0x40(%rdi)
je 0xff44
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1d60c
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xfe3e
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x11e58
movq %r13, %rdi
movq %r15, %rsi
callq 0x1d67a
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0xf25e
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x1d736
leaq 0x50(%rsp), %rdi
callq 0xbd24
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xbd24
movq %rbx, %rdi
callq 0xa560
nop
| _ZNK7lunasvg13SVGUseElement6renderERNS_14SVGRenderStateE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 70h
cmp byte ptr [rdi+40h], 1
jz short loc_FF44
mov r14, rsi
mov rbx, rdi
mov r15, rsp
mov rdi, r15; this
mov rsi, rbx; lunasvg::SVGElement *
call _ZN7lunasvg12SVGBlendInfoC2EPKNS_10SVGElementE; lunasvg::SVGBlendInfo::SVGBlendInfo(lunasvg::SVGElement const*)
lea r12, [rsp+98h+var_40]
mov rdi, r12; this
mov rsi, rbx
call _ZNK7lunasvg13SVGUseElement14localTransformEv; lunasvg::SVGUseElement::localTransform(void)
lea r13, [rsp+98h+var_80]
mov rdi, r13; this
mov rsi, rbx; lunasvg::SVGElement *
mov rdx, r14; lunasvg::SVGRenderState *
mov rcx, r12; lunasvg::Transform *
call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementERKS0_RKNS_9TransformE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const&,lunasvg::Transform const&)
mov rdi, r13; this
mov rsi, r15; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState10beginGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::beginGroup(lunasvg::SVGBlendInfo const&)
lea rsi, [rsp+98h+var_80]; lunasvg::SVGRenderState *
mov rdi, rbx; this
call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &)
lea rdi, [rsp+98h+var_80]; this
mov rsi, rsp; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState8endGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::endGroup(lunasvg::SVGBlendInfo const&)
lea rdi, [rsp+98h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_FF44:
add rsp, 70h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| long long lunasvg::SVGUseElement::render(lunasvg::SVGUseElement *this, lunasvg::SVGRenderState *a2, float a3)
{
long long result; // rax
_BYTE v4[24]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v5[56]; // [rsp+18h] [rbp-80h] BYREF
long long v6; // [rsp+50h] [rbp-48h] BYREF
_BYTE v7[64]; // [rsp+58h] [rbp-40h] BYREF
if ( *((_BYTE *)this + 64) != 1 )
{
lunasvg::SVGBlendInfo::SVGBlendInfo((lunasvg::SVGBlendInfo *)v4, this);
lunasvg::SVGUseElement::localTransform((lunasvg::SVGUseElement *)v7, (long long)this, a3);
lunasvg::SVGRenderState::SVGRenderState((lunasvg::SVGRenderState *)v5, this, a2, (const lunasvg::Transform *)v7);
lunasvg::SVGRenderState::beginGroup((lunasvg::SVGRenderState *)v5, (const lunasvg::SVGBlendInfo *)v4);
lunasvg::SVGElement::renderChildren(this, (lunasvg::SVGRenderState *)v5);
lunasvg::SVGRenderState::endGroup((lunasvg::SVGRenderState *)v5, (const lunasvg::SVGBlendInfo *)v4);
return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6);
}
return result;
}
| render:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x70
CMP byte ptr [RDI + 0x40],0x1
JZ 0x0010ff44
MOV R14,RSI
MOV RBX,RDI
MOV R15,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0011d60c
LEA R12,[RSP + 0x58]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0010fe3e
LEA R13,[RSP + 0x18]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R12
CALL 0x00111e58
LAB_0010ff15:
MOV RDI,R13
MOV RSI,R15
CALL 0x0011d67a
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0010f25e
LEA RDI,[RSP + 0x18]
MOV RSI,RSP
CALL 0x0011d736
LAB_0010ff3a:
LEA RDI,[RSP + 0x50]
CALL 0x0010bd24
LAB_0010ff44:
ADD RSP,0x70
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* lunasvg::SVGUseElement::render(lunasvg::SVGRenderState&) const */
void __thiscall lunasvg::SVGUseElement::render(SVGUseElement *this,SVGRenderState *param_1)
{
SVGBlendInfo aSStack_98 [24];
SVGRenderState local_80 [56];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
Transform local_40 [24];
if (this[0x40] != (SVGUseElement)0x1) {
SVGBlendInfo::SVGBlendInfo(aSStack_98,(SVGElement *)this);
localTransform();
SVGRenderState::SVGRenderState(local_80,(SVGElement *)this,param_1,local_40);
/* try { // try from 0010ff15 to 0010ff39 has its CatchHandler @ 0010ff52 */
SVGRenderState::beginGroup((SVGBlendInfo *)local_80);
SVGElement::renderChildren((SVGElement *)this,local_80);
SVGRenderState::endGroup(local_80,aSStack_98);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
}
return;
}
| |
28,340 | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | bool SVGElement::setAttribute(int specificity, PropertyID id, const std::string& value)
{
for(auto& attribute : m_attributes) {
if(id == attribute.id()) {
if(specificity < attribute.specificity())
return false;
parseAttribute(id, value);
attribute = Attribute(specificity, id, value);
return true;
}
}
parseAttribute(id, value);
m_attributes.emplace_front(specificity, id, value);
return true;
} | O3 | cpp | lunasvg::SVGSVGElement::render(lunasvg::SVGRenderState&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpb $0x1, 0x40(%rdi)
je 0x11587
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x20c68
movq 0x8c(%rbx), %rax
leaq 0x60(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x7c(%rbx), %xmm0
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x129ce
movq %r12, %rdi
movq %r15, %rsi
callq 0x20cd6
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xfd62
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x20dea
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x11587
callq 0xc37c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x115a5
callq 0xc37c
movq %rbx, %rdi
callq 0xa580
nop
| _ZNK7lunasvg11SVGGElement6renderERNS_14SVGRenderStateE:
push r15
push r14
push r12
push rbx
sub rsp, 78h
cmp byte ptr [rdi+40h], 1
jz short loc_11587
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+98h+var_90]
mov rdi, r15; this
mov rsi, rbx; lunasvg::SVGElement *
call _ZN7lunasvg12SVGBlendInfoC2EPKNS_10SVGElementE; lunasvg::SVGBlendInfo::SVGBlendInfo(lunasvg::SVGElement const*)
mov rax, [rbx+8Ch]
lea rcx, [rsp+98h+var_38]; lunasvg::Transform *
mov [rcx+10h], rax
movups xmm0, xmmword ptr [rbx+7Ch]
movaps xmmword ptr [rcx], xmm0
lea r12, [rsp+98h+var_78]
mov rdi, r12; this
mov rsi, rbx; lunasvg::SVGElement *
mov rdx, r14; lunasvg::SVGRenderState *
call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementERKS0_RKNS_9TransformE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const&,lunasvg::Transform const&)
mov rdi, r12; this
mov rsi, r15; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState10beginGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::beginGroup(lunasvg::SVGBlendInfo const&)
lea rsi, [rsp+98h+var_78]
mov rdi, rbx
call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &)
lea rdi, [rsp+98h+var_78]; this
lea rsi, [rsp+98h+var_90]; lunasvg::SVGBlendInfo *
call _ZN7lunasvg14SVGRenderState8endGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::endGroup(lunasvg::SVGBlendInfo const&)
mov rdi, [rsp+98h+var_40]
test rdi, rdi
jz short loc_11587
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_11587:
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_50]
test rdi, rdi
jz short loc_115A5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_115A5:
mov rdi, rbx
call __Unwind_Resume
| long long lunasvg::SVGGElement::render(lunasvg::SVGGElement *this, lunasvg::SVGRenderState *a2)
{
long long result; // rax
_BYTE v3[24]; // [rsp+8h] [rbp-90h] BYREF
_BYTE v4[56]; // [rsp+20h] [rbp-78h] BYREF
volatile signed __int32 *v5; // [rsp+58h] [rbp-40h]
__int128 v6; // [rsp+60h] [rbp-38h] BYREF
long long v7; // [rsp+70h] [rbp-28h]
if ( *((_BYTE *)this + 64) != 1 )
{
lunasvg::SVGBlendInfo::SVGBlendInfo((lunasvg::SVGBlendInfo *)v3, this);
v7 = *(_QWORD *)((char *)this + 140);
v6 = *(_OWORD *)((char *)this + 124);
lunasvg::SVGRenderState::SVGRenderState((lunasvg::SVGRenderState *)v4, this, a2, (const lunasvg::Transform *)&v6);
lunasvg::SVGRenderState::beginGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v3);
lunasvg::SVGElement::renderChildren(this, (lunasvg::SVGRenderState *)v4);
result = lunasvg::SVGRenderState::endGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v3);
if ( v5 )
return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
}
return result;
}
| render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
CMP byte ptr [RDI + 0x40],0x1
JZ 0x00111587
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,RBX
CALL 0x00120c68
MOV RAX,qword ptr [RBX + 0x8c]
LEA RCX,[RSP + 0x60]
MOV qword ptr [RCX + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX + 0x7c]
MOVAPS xmmword ptr [RCX],XMM0
LEA R12,[RSP + 0x20]
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R14
CALL 0x001129ce
LAB_00111551:
MOV RDI,R12
MOV RSI,R15
CALL 0x00120cd6
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0010fd62
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x8]
CALL 0x00120dea
LAB_00111578:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00111587
CALL 0x0010c37c
LAB_00111587:
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
|
/* lunasvg::SVGGElement::render(lunasvg::SVGRenderState&) const */
void __thiscall lunasvg::SVGGElement::render(SVGGElement *this,SVGRenderState *param_1)
{
SVGBlendInfo local_90 [24];
SVGRenderState local_78 [56];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
if (this[0x40] != (SVGGElement)0x1) {
SVGBlendInfo::SVGBlendInfo(local_90,(SVGElement *)this);
local_28 = *(int8 *)(this + 0x8c);
local_38 = *(int8 *)(this + 0x7c);
uStack_30 = *(int8 *)(this + 0x84);
SVGRenderState::SVGRenderState(local_78,(SVGElement *)this,param_1,(Transform *)&local_38);
/* try { // try from 00111551 to 00111577 has its CatchHandler @ 00111593 */
SVGRenderState::beginGroup(local_78,local_90);
SVGElement::renderChildren((SVGElement *)this,local_78);
SVGRenderState::endGroup(local_78,local_90);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
}
return;
}
| |
28,341 | mysql_close_slow_part_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | MK_ASYNC_CONT_BODY_VOID_RETURN(sock)
}
int STDCALL
mysql_close_start(MYSQL *sock)
{
int res;
/* It is legitimate to have NULL sock argument, which will do nothing. */
if (sock && sock->net.pvio)
{
res= mysql_close_slow_part_start(sock);
/* If we need to block, return now and do the rest in mysql_close_cont(). */
if (res)
return res;
}
mysql_close(sock);
return 0;
} | O0 | c | mysql_close_slow_part_cont:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x15(%rax)
jne 0x3a51d
jmp 0x3a4ae
movq -0x10(%rbp), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x26a12(%rip), %rax # 0x60ee0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
leaq 0x269f8(%rip), %rax # 0x60ef0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x296(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3a5d4
movq -0x20(%rbp), %rax
movb $0x1, 0x14(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x40040
movl %eax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x18(%rbp)
jle 0x3a558
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3a5d4
movq -0x20(%rbp), %rax
movb $0x0, 0x15(%rax)
cmpl $0x0, -0x18(%rbp)
jge 0x3a5cd
jmp 0x3a568
movq -0x10(%rbp), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x26958(%rip), %rax # 0x60ee0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
leaq 0x2693e(%rip), %rax # 0x60ef0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x296(%rax)
jmp 0x3a5cd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_close_slow_part_cont:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp byte ptr [rax+15h], 0
jnz short loc_3A51D
jmp short $+2
loc_3A4AE:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_10]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+296h], 0
mov [rbp+var_4], 0
jmp loc_3A5D4
loc_3A51D:
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 1
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+4], ecx
mov rdi, [rbp+var_20]
add rdi, 38h ; '8'
call my_context_continue
mov [rbp+var_18], eax
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 0
cmp [rbp+var_18], 0
jle short loc_3A558
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_3A5D4
loc_3A558:
mov rax, [rbp+var_20]
mov byte ptr [rax+15h], 0
cmp [rbp+var_18], 0
jge short loc_3A5CD
jmp short $+2
loc_3A568:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_10]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_3A5CD:
mov [rbp+var_4], 0
loc_3A5D4:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mysql_close_slow_part_cont(long long a1, unsigned int a2)
{
unsigned int *v3; // [rsp+0h] [rbp-20h]
int v4; // [rsp+8h] [rbp-18h]
v3 = *(unsigned int **)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( *((_BYTE *)v3 + 21) )
{
*((_BYTE *)v3 + 20) = 1;
v3[1] = a2;
v4 = my_context_continue(v3 + 14);
*((_BYTE *)v3 + 20) = 0;
if ( v4 <= 0 )
{
*((_BYTE *)v3 + 21) = 0;
if ( v4 < 0 )
{
*(_DWORD *)(a1 + 144) = 2008;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[8], 511LL);
*(_BYTE *)(a1 + 662) = 0;
}
return 0;
}
else
{
return *v3;
}
}
else
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[14], 511LL);
*(_BYTE *)(a1 + 662) = 0;
return 0;
}
}
| mysql_close_slow_part_cont:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x15],0x0
JNZ 0x0013a51d
JMP 0x0013a4ae
LAB_0013a4ae:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x297
LEA RAX,[0x160ee0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
LEA RAX,[0x160ef0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x296],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013a5d4
LAB_0013a51d:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x1
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],ECX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x38
CALL 0x00140040
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x18],0x0
JLE 0x0013a558
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013a5d4
LAB_0013a558:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x15],0x0
CMP dword ptr [RBP + -0x18],0x0
JGE 0x0013a5cd
JMP 0x0013a568
LAB_0013a568:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x297
LEA RAX,[0x160ee0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
LEA RAX,[0x160ef0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x0013a5cd
LAB_0013a5cd:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013a5d4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 mysql_close_slow_part_cont(long param_1,int4 param_2)
{
int4 *puVar1;
int iVar2;
int4 local_c;
puVar1 = *(int4 **)(*(long *)(param_1 + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(param_1 + 0x90) = 0x7de;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00160f60,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
local_c = 0;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_2;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(param_1 + 0x90) = 0x7d8;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_00160f30,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
}
local_c = 0;
}
else {
local_c = *puVar1;
}
}
return local_c;
}
| |
28,342 | ma_bitmap_set_pagecache_callbacks | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_set_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share)
{
pagecache_file_set_null_hooks(file);
file->callback_data= (uchar*) share;
file->flush_log_callback= maria_flush_log_for_page_none;
file->post_write_hook= maria_page_write_failure;
if (share->temporary)
{
file->post_read_hook= &maria_page_crc_check_none;
file->pre_write_hook= &maria_page_filler_set_none;
}
else
{
file->post_read_hook= &maria_page_crc_check_bitmap;
if (share->options & HA_OPTION_PAGE_CHECKSUM)
file->pre_write_hook= &maria_page_crc_set_normal;
else
file->pre_write_hook= &maria_page_filler_set_bitmap;
if (share->now_transactional)
file->flush_log_callback= flush_log_for_bitmap;
}
} | O3 | c | ma_bitmap_set_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3d58f
movq %r14, 0x40(%rbx)
leaq -0x142e6(%rip), %rax # 0x3e174
movq %rax, 0x38(%rbx)
leaq -0x14357(%rip), %rax # 0x3e10e
movq %rax, 0x30(%rbx)
cmpb $0x0, 0x7d9(%r14)
je 0x5248b
leaq -0x143b9(%rip), %rax # 0x3e0c1
movq %rax, 0x20(%rbx)
leaq -0x1437f(%rip), %rax # 0x3e106
movq %rax, 0x28(%rbx)
jmp 0x524ca
leaq -0x1444c(%rip), %rax # 0x3e046
movq %rax, 0x20(%rbx)
btl $0xb, 0x720(%r14)
jb 0x524aa
leaq -0x143bf(%rip), %rax # 0x3e0e9
jmp 0x524b1
leaq -0x14526(%rip), %rax # 0x3df8b
movq %rax, 0x28(%rbx)
cmpb $0x0, 0x7e7(%r14)
je 0x524ca
leaq 0x2551(%rip), %rax # 0x54a17
movq %rax, 0x38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| _ma_bitmap_set_pagecache_callbacks:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
call pagecache_file_set_null_hooks
mov [rbx+40h], r14
lea rax, maria_flush_log_for_page_none
mov [rbx+38h], rax
lea rax, maria_page_write_failure
mov [rbx+30h], rax
cmp byte ptr [r14+7D9h], 0
jz short loc_5248B
lea rax, maria_page_crc_check_none
mov [rbx+20h], rax
lea rax, maria_page_filler_set_none
mov [rbx+28h], rax
jmp short loc_524CA
loc_5248B:
lea rax, maria_page_crc_check_bitmap
mov [rbx+20h], rax
bt dword ptr [r14+720h], 0Bh
jb short loc_524AA
lea rax, maria_page_filler_set_bitmap
jmp short loc_524B1
loc_524AA:
lea rax, maria_page_crc_set_normal
loc_524B1:
mov [rbx+28h], rax
cmp byte ptr [r14+7E7h], 0
jz short loc_524CA
lea rax, flush_log_for_bitmap
mov [rbx+38h], rax
loc_524CA:
pop rbx
pop r14
pop rbp
retn
| long long ( * ma_bitmap_set_pagecache_callbacks(_QWORD *a1, long long a2))(long long *a1)
{
long long ( *result)(long long *); // rax
pagecache_file_set_null_hooks((long long)a1);
a1[8] = a2;
a1[7] = maria_flush_log_for_page_none;
a1[6] = maria_page_write_failure;
if ( *(_BYTE *)(a2 + 2009) )
{
a1[4] = maria_page_crc_check_none;
result = (long long ( *)(long long *))maria_page_filler_set_none;
a1[5] = maria_page_filler_set_none;
}
else
{
a1[4] = maria_page_crc_check_bitmap;
if ( _bittest((const signed __int32 *)(a2 + 1824), 0xBu) )
result = maria_page_crc_set_normal;
else
result = maria_page_filler_set_bitmap;
a1[5] = result;
if ( *(_BYTE *)(a2 + 2023) )
{
result = (long long ( *)(long long *))flush_log_for_bitmap;
a1[7] = flush_log_for_bitmap;
}
}
return result;
}
| _ma_bitmap_set_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0013d58f
MOV qword ptr [RBX + 0x40],R14
LEA RAX,[0x13e174]
MOV qword ptr [RBX + 0x38],RAX
LEA RAX,[0x13e10e]
MOV qword ptr [RBX + 0x30],RAX
CMP byte ptr [R14 + 0x7d9],0x0
JZ 0x0015248b
LEA RAX,[0x13e0c1]
MOV qword ptr [RBX + 0x20],RAX
LEA RAX,[0x13e106]
MOV qword ptr [RBX + 0x28],RAX
JMP 0x001524ca
LAB_0015248b:
LEA RAX,[0x13e046]
MOV qword ptr [RBX + 0x20],RAX
BT dword ptr [R14 + 0x720],0xb
JC 0x001524aa
LEA RAX,[0x13e0e9]
JMP 0x001524b1
LAB_001524aa:
LEA RAX,[0x13df8b]
LAB_001524b1:
MOV qword ptr [RBX + 0x28],RAX
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x001524ca
LEA RAX,[0x154a17]
MOV qword ptr [RBX + 0x38],RAX
LAB_001524ca:
POP RBX
POP R14
POP RBP
RET
|
void _ma_bitmap_set_pagecache_callbacks(long param_1,long param_2)
{
code *pcVar1;
pagecache_file_set_null_hooks();
*(long *)(param_1 + 0x40) = param_2;
*(code **)(param_1 + 0x38) = maria_flush_log_for_page_none;
*(code **)(param_1 + 0x30) = maria_page_write_failure;
if (*(char *)(param_2 + 0x7d9) == '\0') {
*(code **)(param_1 + 0x20) = maria_page_crc_check_bitmap;
if ((*(uint *)(param_2 + 0x720) >> 0xb & 1) == 0) {
pcVar1 = maria_page_filler_set_bitmap;
}
else {
pcVar1 = maria_page_crc_set_normal;
}
*(code **)(param_1 + 0x28) = pcVar1;
if (*(char *)(param_2 + 0x7e7) != '\0') {
*(code **)(param_1 + 0x38) = flush_log_for_bitmap;
}
}
else {
*(code **)(param_1 + 0x20) = maria_page_crc_check_none;
*(code **)(param_1 + 0x28) = maria_page_filler_set_none;
}
return;
}
| |
28,343 | mysql_close_slow_part | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void mysql_close_slow_part(MYSQL *mysql)
{
if (mysql->net.pvio)
{
free_old_query(mysql);
mysql->status=MYSQL_STATUS_READY; /* Force command */
mysql->options.reconnect=0;
if (mysql->net.pvio && mysql->net.buff)
ma_simple_command(mysql, COM_QUIT,NullS,0,1,0);
end_server(mysql);
}
/* there is an ongoing async operation */
else if (mysql->options.extension && mysql->options.extension->async_context)
{
if (mysql->options.extension->async_context->pending_gai_res)
{
freeaddrinfo(mysql->options.extension->async_context->pending_gai_res);
mysql->options.extension->async_context->pending_gai_res = 0;
}
if (mysql->options.extension->async_context->pvio)
{
ma_pvio_close(mysql->options.extension->async_context->pvio);
mysql->options.extension->async_context->pvio = 0;
}
}
} | O0 | c | mysql_close_slow_part:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x388a8
movq -0x8(%rbp), %rdi
callq 0x38970
movq -0x8(%rbp), %rax
movl $0x0, 0x488(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x43b(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3889a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3889a
movq -0x8(%rbp), %rdi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rdx
movq %r9, %rcx
callq 0x31620
movq -0x8(%rbp), %rdi
callq 0x30780
jmp 0x3895e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x3895c
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3895c
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x38915
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %rdi
callq 0x145a0
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x3895a
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x3e370
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x18(%rax)
jmp 0x3895c
jmp 0x3895e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_close_slow_part:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_388A8
mov rdi, [rbp+var_8]
call free_old_query
mov rax, [rbp+var_8]
mov dword ptr [rax+488h], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+43Bh], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_3889A
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_3889A
mov rdi, [rbp+var_8]
mov r8d, 1
xor eax, eax
mov r9d, eax
mov esi, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
loc_3889A:
mov rdi, [rbp+var_8]
call end_server
jmp loc_3895E
loc_388A8:
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_3895C
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz loc_3895C
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+30h], 0
jz short loc_38915
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+30h]
call _freeaddrinfo
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov qword ptr [rax+30h], 0
loc_38915:
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+18h], 0
jz short loc_3895A
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+18h]
call ma_pvio_close
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov qword ptr [rax+18h], 0
loc_3895A:
jmp short $+2
loc_3895C:
jmp short $+2
loc_3895E:
add rsp, 10h
pop rbp
retn
| long long mysql_close_slow_part(long long a1)
{
long long result; // rax
if ( *(_QWORD *)a1 )
{
free_old_query(a1);
*(_DWORD *)(a1 + 1160) = 0;
*(_BYTE *)(a1 + 1083) = 0;
if ( *(_QWORD *)a1 )
{
if ( *(_QWORD *)(a1 + 8) )
ma_simple_command(a1, 1u, 0LL, 0LL, 1, 0LL);
}
return end_server((_QWORD *)a1);
}
else
{
result = a1;
if ( *(_QWORD *)(a1 + 1152) )
{
result = *(_QWORD *)(a1 + 1152);
if ( *(_QWORD *)(result + 40) )
{
if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) )
{
freeaddrinfo(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL));
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) = 0LL;
}
result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( *(_QWORD *)(result + 24) )
{
ma_pvio_close(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 24LL));
result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL);
*(_QWORD *)(result + 24) = 0LL;
}
}
}
}
return result;
}
| mysql_close_slow_part:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001388a8
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00138970
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x488],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x43b],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0013889a
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0013889a
MOV RDI,qword ptr [RBP + -0x8]
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
MOV ESI,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x00131620
LAB_0013889a:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00130780
JMP 0x0013895e
LAB_001388a8:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0013895c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0013895c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x00138915
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001145a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x30],0x0
LAB_00138915:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013895a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0013e370
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x18],0x0
LAB_0013895a:
JMP 0x0013895c
LAB_0013895c:
JMP 0x0013895e
LAB_0013895e:
ADD RSP,0x10
POP RBP
RET
|
void mysql_close_slow_part(long *param_1)
{
if (*param_1 == 0) {
if ((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) {
if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x30) != 0) {
freeaddrinfo(*(addrinfo **)(*(long *)(param_1[0x90] + 0x28) + 0x30));
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x30) = 0;
}
if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0) {
ma_pvio_close(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18));
*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18) = 0;
}
}
}
else {
free_old_query(param_1);
*(int4 *)(param_1 + 0x91) = 0;
*(int1 *)((long)param_1 + 0x43b) = 0;
if ((*param_1 != 0) && (param_1[1] != 0)) {
ma_simple_command(param_1,1,0,0);
}
end_server(param_1);
}
return;
}
| |
28,344 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const | monkey531[P]llama/common/json.hpp | JSON_HEDLEY_RETURNS_NON_NULL
const char* type_name() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
return "null";
case value_t::object:
return "object";
case value_t::array:
return "array";
case value_t::string:
return "string";
case value_t::boolean:
return "boolean";
case value_t::binary:
return "binary";
case value_t::discarded:
return "discarded";
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
default:
return "number";
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const:
movzbl (%rdi), %eax
cmpq $0x9, %rax
ja 0x44600
leaq 0x6e968(%rip), %rcx # 0xb2f60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x6da72(%rip), %rax # 0xb2079
retq
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv:
movzx eax, byte ptr [rdi]
cmp rax, 9
ja short loc_44600
lea rcx, unk_B2F60
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_44600:
lea rax, aNumber; "number"
retn
| const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(
unsigned __int8 *a1)
{
unsigned long long v1; // rax
v1 = *a1;
if ( v1 > 9 )
return "number";
else
return (char *)dword_B2F60 + dword_B2F60[v1];
}
| type_name:
MOVZX EAX,byte ptr [RDI]
CMP RAX,0x9
JA 0x00144600
LEA RCX,[0x1b2f60]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_00144600:
LEA RAX,[0x1b2079]
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::type_name() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
if ((ulong)(byte)*this < 10) {
return &DAT_001b2f60 + *(int *)(&DAT_001b2f60 + (ulong)(byte)*this * 4);
}
return "number";
}
| |
28,345 | set_page_bits | eloqsql/storage/maria/ma_bitmap.c | static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page, uint fill_pattern)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp, org_tmp, used_offset;
uchar *data;
DBUG_ENTER("set_page_bits");
DBUG_ASSERT(fill_pattern <= 7);
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
org_tmp= tmp= uint2korr(data);
tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset);
if (tmp == org_tmp)
DBUG_RETURN(0); /* No changes */
/*
Take care to not write bytes outside of bitmap.
fill_pattern is 3 bits, so we need to write two bytes
if bit position we write to is > (8-3)
*/
if (offset > 5)
int2store(data, tmp);
else
data[0]= tmp;
/*
Reset full_head_size or full_tail_size if we are releasing data before
it. Increase used_size if we are allocating data.
*/
used_offset= (uint) (data - bitmap->map);
if (fill_pattern < 4)
set_if_smaller(bitmap->full_head_size, used_offset);
if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7))
set_if_smaller(bitmap->full_tail_size, used_offset);
if (fill_pattern != 0)
{
/* Calulcate which was the last changed byte */
used_offset+= offset > 5 ? 2 : 1;
set_if_bigger(bitmap->used_size, used_offset);
}
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE)
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
/*
Note that if the condition above is false (page is full), and all pages of
this bitmap are now full, and that bitmap page was
first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed
its value still tells us where to start our search for a bitmap with space
(which is for sure after this full one).
That does mean that first_bitmap_with_space is only a lower bound.
*/
DBUG_RETURN(0);
} | O0 | c | set_page_bits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
jmp 0x629f9
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x60(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x62a4f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x61f00
movsbl %al, %eax
cmpl $0x0, %eax
je 0x62a4f
jmp 0x62a46
movb $0x1, -0x1(%rbp)
jmp 0x62bdd
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x10(%rcx), %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
imull $0x3, -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x3c(%rbp)
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl -0x38(%rbp), %ecx
movl $0x7, %edx
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl -0x24(%rbp), %edx
movl -0x38(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x62acc
jmp 0x62ac3
movb $0x0, -0x1(%rbp)
jmp 0x62bdd
cmpl $0x5, -0x38(%rbp)
jbe 0x62aeb
jmp 0x62ad4
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x58(%rbp), %rax
movw %cx, (%rax)
jmp 0x62af6
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
cmpl $0x4, -0x24(%rbp)
jae 0x62b2a
jmp 0x62b10
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x62b26
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x62b28
jmp 0x62b2a
cmpl $0x0, -0x24(%rbp)
je 0x62b3c
cmpl $0x4, -0x24(%rbp)
jbe 0x62b58
cmpl $0x7, -0x24(%rbp)
jae 0x62b58
jmp 0x62b3e
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x62b54
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x62b56
jmp 0x62b58
cmpl $0x0, -0x24(%rbp)
je 0x62b91
movl -0x38(%rbp), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x5, %edx
cmoval %ecx, %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x44(%rbp), %eax
jae 0x62b8d
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x62b8f
jmp 0x62b91
jmp 0x62b93
jmp 0x62b95
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x62b9f
cmpl $0x4, -0x24(%rbp)
je 0x62bd7
cmpl $0x7, -0x24(%rbp)
je 0x62bd7
jmp 0x62bad
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x62bd3
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x62bd5
jmp 0x62bd7
jmp 0x62bd9
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| set_page_bits:
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], ecx
jmp short $+2
loc_629F9:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_60]
sub rax, rdx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_62A4F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_62A4F
jmp short $+2
loc_62A46:
mov [rbp+var_1], 1
jmp loc_62BDD
loc_62A4F:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+10h]
sub rax, 1
mov [rbp+var_34], eax
imul eax, [rbp+var_34], 3
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
and eax, 7
mov [rbp+var_38], eax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_34]
shr ecx, 3
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movzx eax, word ptr [rax]
mov [rbp+var_3C], eax
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, [rbp+var_38]
mov edx, 7
shl edx, cl
mov ecx, edx
xor ecx, 0FFFFFFFFh
and eax, ecx
mov edx, [rbp+var_24]
mov ecx, [rbp+var_38]
shl edx, cl
mov ecx, edx
or eax, ecx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_40]
jnz short loc_62ACC
jmp short $+2
loc_62AC3:
mov [rbp+var_1], 0
jmp loc_62BDD
loc_62ACC:
cmp [rbp+var_38], 5
jbe short loc_62AEB
jmp short $+2
loc_62AD4:
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_58]
mov [rax], cx
jmp short loc_62AF6
loc_62AEB:
mov eax, [rbp+var_3C]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
loc_62AF6:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
sub rax, rcx
mov [rbp+var_44], eax
cmp [rbp+var_24], 4
jnb short loc_62B2A
jmp short $+2
loc_62B10:
mov rax, [rbp+var_18]
mov eax, [rax+28h]
cmp eax, [rbp+var_44]
jbe short loc_62B26
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+28h], ecx
loc_62B26:
jmp short $+2
loc_62B28:
jmp short $+2
loc_62B2A:
cmp [rbp+var_24], 0
jz short loc_62B3C
cmp [rbp+var_24], 4
jbe short loc_62B58
cmp [rbp+var_24], 7
jnb short loc_62B58
loc_62B3C:
jmp short $+2
loc_62B3E:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
cmp eax, [rbp+var_44]
jbe short loc_62B54
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+2Ch], ecx
loc_62B54:
jmp short $+2
loc_62B56:
jmp short $+2
loc_62B58:
cmp [rbp+var_24], 0
jz short loc_62B91
mov edx, [rbp+var_38]
mov eax, 1
mov ecx, 2
cmp edx, 5
cmova eax, ecx
add eax, [rbp+var_44]
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov eax, [rax+24h]
cmp eax, [rbp+var_44]
jnb short loc_62B8D
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+24h], ecx
loc_62B8D:
jmp short $+2
loc_62B8F:
jmp short $+2
loc_62B91:
jmp short $+2
loc_62B93:
jmp short $+2
loc_62B95:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_62B9F:
cmp [rbp+var_24], 4
jz short loc_62BD7
cmp [rbp+var_24], 7
jz short loc_62BD7
jmp short $+2
loc_62BAD:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_30]
jbe short loc_62BD3
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_62BD3:
jmp short $+2
loc_62BD5:
jmp short $+2
loc_62BD7:
jmp short $+2
loc_62BD9:
mov [rbp+var_1], 0
loc_62BDD:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char set_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4)
{
int v4; // eax
_BYTE *v6; // [rsp+10h] [rbp-50h]
unsigned int v7; // [rsp+1Ch] [rbp-44h]
unsigned int v8; // [rsp+1Ch] [rbp-44h]
int v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
unsigned int v11; // [rsp+28h] [rbp-38h]
unsigned int v12; // [rsp+2Ch] [rbp-34h]
unsigned long long v13; // [rsp+30h] [rbp-30h]
int v15; // [rsp+40h] [rbp-20h]
v15 = a3;
v13 = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v13 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v13) )
return 1;
v12 = 3 * (v15 - *(_DWORD *)(a2 + 16) - 1);
v11 = v12 & 7;
v6 = (_BYTE *)((v12 >> 3) + *(_QWORD *)(a2 + 8));
v9 = *(unsigned __int16 *)v6;
v10 = (a4 << (v12 & 7)) | ~(7 << (v12 & 7)) & v9;
if ( v10 == v9 )
return 0;
if ( v11 <= 5 )
*v6 = v10;
else
*(_WORD *)v6 = v10;
v7 = (_DWORD)v6 - *(_QWORD *)(a2 + 8);
if ( a4 < 4 && *(_DWORD *)(a2 + 40) > v7 )
*(_DWORD *)(a2 + 40) = v7;
if ( (!a4 || a4 > 4 && a4 < 7) && *(_DWORD *)(a2 + 44) > v7 )
*(_DWORD *)(a2 + 44) = v7;
if ( a4 )
{
v4 = 1;
if ( v11 > 5 )
v4 = 2;
v8 = v7 + v4;
if ( *(_DWORD *)(a2 + 36) < v8 )
*(_DWORD *)(a2 + 36) = v8;
}
*(_BYTE *)(a2 + 32) = 1;
if ( a4 != 4 && a4 != 7 && *(_QWORD *)(*a1 + 208) > v13 )
*(_QWORD *)(*a1 + 208) = v13;
return 0;
}
| set_page_bits:
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],ECX
JMP 0x001629f9
LAB_001629f9:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00162a4f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00161f00
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00162a4f
JMP 0x00162a46
LAB_00162a46:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00162bdd
LAB_00162a4f:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x10]
SUB RAX,0x1
MOV dword ptr [RBP + -0x34],EAX
IMUL EAX,dword ptr [RBP + -0x34],0x3
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x7
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x34]
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,0x7
SHL EDX,CL
MOV ECX,EDX
XOR ECX,0xffffffff
AND EAX,ECX
MOV EDX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x38]
SHL EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x00162acc
JMP 0x00162ac3
LAB_00162ac3:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00162bdd
LAB_00162acc:
CMP dword ptr [RBP + -0x38],0x5
JBE 0x00162aeb
JMP 0x00162ad4
LAB_00162ad4:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x58]
MOV word ptr [RAX],CX
JMP 0x00162af6
LAB_00162aeb:
MOV EAX,dword ptr [RBP + -0x3c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
LAB_00162af6:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x24],0x4
JNC 0x00162b2a
JMP 0x00162b10
LAB_00162b10:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00162b26
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],ECX
LAB_00162b26:
JMP 0x00162b28
LAB_00162b28:
JMP 0x00162b2a
LAB_00162b2a:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00162b3c
CMP dword ptr [RBP + -0x24],0x4
JBE 0x00162b58
CMP dword ptr [RBP + -0x24],0x7
JNC 0x00162b58
LAB_00162b3c:
JMP 0x00162b3e
LAB_00162b3e:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00162b54
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00162b54:
JMP 0x00162b56
LAB_00162b56:
JMP 0x00162b58
LAB_00162b58:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00162b91
MOV EDX,dword ptr [RBP + -0x38]
MOV EAX,0x1
MOV ECX,0x2
CMP EDX,0x5
CMOVA EAX,ECX
ADD EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x24]
CMP EAX,dword ptr [RBP + -0x44]
JNC 0x00162b8d
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
LAB_00162b8d:
JMP 0x00162b8f
LAB_00162b8f:
JMP 0x00162b91
LAB_00162b91:
JMP 0x00162b93
LAB_00162b93:
JMP 0x00162b95
LAB_00162b95:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x00162b9f
LAB_00162b9f:
CMP dword ptr [RBP + -0x24],0x4
JZ 0x00162bd7
CMP dword ptr [RBP + -0x24],0x7
JZ 0x00162bd7
JMP 0x00162bad
LAB_00162bad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00162bd3
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00162bd3:
JMP 0x00162bd5
LAB_00162bd5:
JMP 0x00162bd7
LAB_00162bd7:
JMP 0x00162bd9
LAB_00162bd9:
MOV byte ptr [RBP + -0x1],0x0
LAB_00162bdd:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
int iVar4;
ulong uVar5;
ushort *puVar6;
int1 local_9;
uVar5 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((uVar5 == *(ulong *)(param_2 + 0x10)) ||
(cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar5), cVar1 == '\0')) {
uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3;
uVar3 = uVar2 & 7;
puVar6 = (ushort *)(*(long *)(param_2 + 8) + (ulong)(uVar2 >> 3));
uVar2 = (uint)*puVar6 & (7 << (sbyte)uVar3 ^ 0xffffffffU) | param_4 << (sbyte)uVar3;
if (uVar2 == *puVar6) {
local_9 = 0;
}
else {
if (uVar3 < 6) {
*(char *)puVar6 = (char)uVar2;
}
else {
*puVar6 = (ushort)uVar2;
}
uVar2 = (int)puVar6 - (int)*(int8 *)(param_2 + 8);
if ((param_4 < 4) && (uVar2 < *(uint *)(param_2 + 0x28))) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (((param_4 == 0) || ((4 < param_4 && (param_4 < 7)))) &&
(uVar2 < *(uint *)(param_2 + 0x2c))) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
if (param_4 != 0) {
iVar4 = 1;
if (5 < uVar3) {
iVar4 = 2;
}
if (*(uint *)(param_2 + 0x24) < iVar4 + uVar2) {
*(uint *)(param_2 + 0x24) = iVar4 + uVar2;
}
}
*(int1 *)(param_2 + 0x20) = 1;
if (((param_4 != 4) && (param_4 != 7)) && (uVar5 < *(ulong *)(*param_1 + 0xd0))) {
*(ulong *)(*param_1 + 0xd0) = uVar5;
}
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
28,346 | gguf_set_val_i64 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_i64(struct gguf_context * ctx, const char * key, int64_t val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O1 | cpp | gguf_set_val_i64:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x18d70
leaq 0x1d1cc(%rip), %rsi # 0x5d061
movq %r14, %rdi
callq 0x18220
testl %eax, %eax
je 0x3fee8
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3febc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x180e0
leaq 0x10(%rsp), %r14
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x186c0
addq $0x8, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17bd0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x1d0fe(%rip), %rdi # 0x5cfed
leaq 0x1dc00(%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 0x3ff20
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x180e0
movq %rbx, %rdi
callq 0x18ea0
| gguf_set_val_i64:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
mov [rsp+48h+var_38], rsi
mov [rsp+48h+var_40], rdx
lea r14, [rsp+48h+var_30]
lea rdx, [rsp+48h+var_41]
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_3FEE8
lea rax, [rsp+48h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3FEBC
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FEBC:
lea r14, [rsp+48h+var_38]
mov rsi, [r14]
mov rdi, rbx
call _gguf_remove_key
add rbx, 8
lea rdx, [rsp+48h+var_40]
mov rdi, rbx
mov rsi, r14
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRlEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,long &>(char const*&,long &)
add rsp, 38h
pop rbx
pop r14
retn
loc_3FEE8:
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_3FF20
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FF20:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_i64(long long a1, long long a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+7h] [rbp-41h] BYREF
long long v8; // [rsp+8h] [rbp-40h] 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;
v8 = a3;
std::string::basic_string<std::allocator<char>>(v10, a2, &v7);
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*&,long &>(a1 + 8, &v9, &v8);
}
| gguf_set_val_i64:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
LEA R14,[RSP + 0x18]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x00118d70
LEA RSI,[0x15d061]
MOV RDI,R14
CALL 0x00118220
TEST EAX,EAX
JZ 0x0013fee8
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013febc
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x001180e0
LAB_0013febc:
LEA R14,[RSP + 0x10]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x001186c0
ADD RBX,0x8
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00117bd0
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_0013fee8:
LEA RDI,[0x15cfed]
LEA RDX,[0x15daf6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00118ce0
|
void gguf_set_val_i64(long param_1,char *param_2,long param_3)
{
int iVar1;
allocator local_41;
long local_40;
char *local_38;
long *local_30 [2];
long local_20 [2];
local_40 = param_3;
local_38 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_2,&local_41);
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*&,long&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_38,&local_40);
return;
}
/* try { // try from 0013fee8 to 0013ff01 has its CatchHandler @ 0013ff02 */
/* 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");
}
| |
28,347 | gguf_set_val_i64 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_i64(struct gguf_context * ctx, const char * key, int64_t val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O3 | cpp | gguf_set_val_i64:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x20(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x17d60
leaq 0x1e010(%rip), %rsi # 0x5d551
movq %r15, %rdi
callq 0x17210
testl %eax, %eax
je 0x3f593
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f568
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x176b0
addq $0x8, %rbx
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x16bd0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1df43(%rip), %rdi # 0x5d4dd
leaq 0x1ea45(%rip), %rdx # 0x5dfe6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x17cd0
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f5cb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %rbx, %rdi
callq 0x17e90
| gguf_set_val_i64:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov [rsp+58h+var_40], rsi
mov [rsp+58h+var_48], rdx
lea r15, [rsp+58h+var_38]
lea rdx, [rsp+58h+var_49]
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_3F593
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F568
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F568:
mov rdi, rbx
mov rsi, r14
call _gguf_remove_key
add rbx, 8
lea rsi, [rsp+58h+var_40]
lea rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRlEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,long &>(char const*&,long &)
add rsp, 40h
pop rbx
pop r14
pop r15
retn
loc_3F593:
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+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F5CB
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F5CB:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_i64(long long a1, long long a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+Fh] [rbp-49h] BYREF
long long v8; // [rsp+10h] [rbp-48h] BYREF
long long v9; // [rsp+18h] [rbp-40h] BYREF
void *v10[2]; // [rsp+20h] [rbp-38h] BYREF
long long v11; // [rsp+30h] [rbp-28h] BYREF
v9 = a2;
v8 = a3;
std::string::basic_string<std::allocator<char>>(v10, a2, &v7);
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*&,long &>(a1 + 8, &v9, &v8);
}
| gguf_set_val_i64:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
LEA R15,[RSP + 0x20]
LEA RDX,[RSP + 0xf]
MOV RDI,R15
CALL 0x00117d60
LEA RSI,[0x15d551]
MOV RDI,R15
CALL 0x00117210
TEST EAX,EAX
JZ 0x0013f593
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013f568
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001170d0
LAB_0013f568:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001176b0
ADD RBX,0x8
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00116bd0
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
LAB_0013f593:
LEA RDI,[0x15d4dd]
LEA RDX,[0x15dfe6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00117cd0
|
void gguf_set_val_i64(long param_1,char *param_2,long param_3)
{
int iVar1;
allocator local_49;
long local_48;
char *local_40;
long *local_38 [2];
long local_28 [2];
local_48 = param_3;
local_40 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_2,&local_49);
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*&,long&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_48);
return;
}
/* try { // try from 0013f593 to 0013f5ac has its CatchHandler @ 0013f5ad */
/* 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");
}
| |
28,348 | js_create_map_iterator | bluesky950520[P]quickjs/quickjs.c | static JSValue js_create_map_iterator(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSIteratorKindEnum kind;
JSMapState *s;
JSMapIteratorData *it;
JSValue enum_obj;
kind = magic >> 2;
magic &= 3;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
if (!s)
return JS_EXCEPTION;
enum_obj = JS_NewObjectClass(ctx, JS_CLASS_MAP_ITERATOR + magic);
if (JS_IsException(enum_obj))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it) {
JS_FreeValue(ctx, enum_obj);
goto fail;
}
it->obj = js_dup(this_val);
it->kind = kind;
it->cur_record = NULL;
JS_SetOpaqueInternal(enum_obj, it);
return enum_obj;
fail:
return JS_EXCEPTION;
} | O0 | c | js_create_map_iterator:
subq $0x88, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %ecx, 0x5c(%rsp)
movq %r8, 0x50(%rsp)
movl %r9d, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
sarl $0x2, %eax
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
andl $0x3, %eax
movl %eax, 0x4c(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %ecx
addl $0x23, %ecx
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x383b0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x8ce3b
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x8cf4c
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %esi
addl $0x2a, %esi
callq 0x2a480
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8ce83
jmp 0x8cf38
movq 0x60(%rsp), %rdi
movl $0x20, %esi
callq 0x21cb0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x8ceb8
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x23c90
jmp 0x8cf38
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x216d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x48(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2a9a0
movq 0x28(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x8cf4c
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| js_create_map_iterator:
sub rsp, 88h
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_28], rdi
mov [rsp+88h+var_2C], ecx
mov [rsp+88h+var_38], r8
mov [rsp+88h+var_3C], r9d
mov eax, [rsp+88h+var_3C]
sar eax, 2
mov [rsp+88h+var_40], eax
mov eax, [rsp+88h+var_3C]
and eax, 3
mov [rsp+88h+var_3C], eax
mov rdi, [rsp+88h+var_28]
mov ecx, [rsp+88h+var_3C]
add ecx, 23h ; '#'
mov rsi, [rsp+88h+var_20]
mov rdx, [rsp+88h+var_18]
call JS_GetOpaque2
mov [rsp+88h+var_48], rax
cmp [rsp+88h+var_48], 0
jnz short loc_8CE3B
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
jmp loc_8CF4C
loc_8CE3B:
mov rdi, [rsp+88h+var_28]
mov esi, [rsp+88h+var_3C]
add esi, 2Ah ; '*'
call JS_NewObjectClass
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_68], rdx
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_58], rax
mov rdi, [rsp+88h+var_60]
mov rsi, [rsp+88h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_8CE83
jmp loc_8CF38
loc_8CE83:
mov rdi, [rsp+88h+var_28]
mov esi, 20h ; ' '
call js_malloc
mov [rsp+88h+var_50], rax
cmp [rsp+88h+var_50], 0
jnz short loc_8CEB8
mov rdi, [rsp+88h+var_28]
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_58]
call JS_FreeValue
jmp loc_8CF38
loc_8CEB8:
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_88], rax
mov rdi, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_18]
call js_dup
mov rcx, rax
mov rax, [rsp+88h+var_88]
mov [rsp+88h+var_80], rcx
mov [rsp+88h+var_78], rdx
mov rcx, [rsp+88h+var_80]
mov [rax], rcx
mov rcx, [rsp+88h+var_78]
mov [rax+8], rcx
mov ecx, [rsp+88h+var_40]
mov rax, [rsp+88h+var_50]
mov [rax+10h], ecx
mov rax, [rsp+88h+var_50]
mov qword ptr [rax+18h], 0
mov rdx, [rsp+88h+var_50]
mov rdi, [rsp+88h+var_60]
mov rsi, [rsp+88h+var_58]
call JS_SetOpaqueInternal
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_8], rax
jmp short loc_8CF4C
loc_8CF38:
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
loc_8CF4C:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long js_create_map_iterator(long long a1, _DWORD *a2, unsigned int a3, long long a4, long long a5, int a6)
{
long long v6; // rdx
long long v7; // rdx
long long v9; // [rsp+18h] [rbp-70h]
long long v10; // [rsp+30h] [rbp-58h]
long long v11; // [rsp+38h] [rbp-50h]
int v12; // [rsp+48h] [rbp-40h]
int v13; // [rsp+4Ch] [rbp-3Ch]
long long v15; // [rsp+78h] [rbp-10h]
v12 = a6 >> 2;
v13 = a6 & 3;
if ( JS_GetOpaque2(a1, (long long)a2, a3, v13 + 35) )
{
v9 = JS_NewObjectClass(a1, v13 + 42);
v10 = v6;
if ( !JS_IsException_1(v9, v6) )
{
v11 = js_malloc(a1, 32LL);
if ( v11 )
{
*(_QWORD *)v11 = js_dup(a2, a3);
*(_QWORD *)(v11 + 8) = v7;
*(_DWORD *)(v11 + 16) = v12;
*(_QWORD *)(v11 + 24) = 0LL;
JS_SetOpaqueInternal(v9, v10, v11);
return v9;
}
JS_FreeValue(a1, v9, v10);
}
LODWORD(v15) = 0;
return v15;
}
LODWORD(v15) = 0;
return v15;
}
| js_create_map_iterator:
SUB RSP,0x88
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ECX
MOV qword ptr [RSP + 0x50],R8
MOV dword ptr [RSP + 0x4c],R9D
MOV EAX,dword ptr [RSP + 0x4c]
SAR EAX,0x2
MOV dword ptr [RSP + 0x48],EAX
MOV EAX,dword ptr [RSP + 0x4c]
AND EAX,0x3
MOV dword ptr [RSP + 0x4c],EAX
MOV RDI,qword ptr [RSP + 0x60]
MOV ECX,dword ptr [RSP + 0x4c]
ADD ECX,0x23
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x001383b0
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x0018ce3b
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0018cf4c
LAB_0018ce3b:
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,dword ptr [RSP + 0x4c]
ADD ESI,0x2a
CALL 0x0012a480
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018ce83
JMP 0x0018cf38
LAB_0018ce83:
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x20
CALL 0x00121cb0
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x0018ceb8
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00123c90
JMP 0x0018cf38
LAB_0018ceb8:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x18],0x0
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0012a9a0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0018cf4c
LAB_0018cf38:
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
LAB_0018cf4c:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16]
js_create_map_iterator
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,uint param_6)
{
int iVar1;
long lVar2;
int1 (*pauVar4) [16];
int1 auVar5 [16];
int1 auVar6 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
lVar2 = JS_GetOpaque2(param_1,param_2,param_3,(param_6 & 3) + 0x23);
if (lVar2 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar5 = JS_NewObjectClass(param_1,(param_6 & 3) + 0x2a);
local_8 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar1 = JS_IsException(uVar3,local_8);
if (iVar1 == 0) {
pauVar4 = (int1 (*) [16])js_malloc(param_1,0x20);
if (pauVar4 != (int1 (*) [16])0x0) {
auVar6 = js_dup(param_2,param_3);
*pauVar4 = auVar6;
*(int *)pauVar4[1] = (int)param_6 >> 2;
*(int8 *)(pauVar4[1] + 8) = 0;
JS_SetOpaqueInternal(uVar3,local_8,pauVar4);
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
goto LAB_0018cf4c;
}
JS_FreeValue(param_1,uVar3,local_8);
}
local_10 = 0;
local_8 = 6;
}
LAB_0018cf4c:
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
| |
28,349 | js_create_map_iterator | bluesky950520[P]quickjs/quickjs.c | static JSValue js_create_map_iterator(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSIteratorKindEnum kind;
JSMapState *s;
JSMapIteratorData *it;
JSValue enum_obj;
kind = magic >> 2;
magic &= 3;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
if (!s)
return JS_EXCEPTION;
enum_obj = JS_NewObjectClass(ctx, JS_CLASS_MAP_ITERATOR + magic);
if (JS_IsException(enum_obj))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it) {
JS_FreeValue(ctx, enum_obj);
goto fail;
}
it->obj = js_dup(this_val);
it->kind = kind;
it->cur_record = NULL;
JS_SetOpaqueInternal(enum_obj, it);
return enum_obj;
fail:
return JS_EXCEPTION;
} | O1 | c | js_create_map_iterator:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl %r9d, %r12d
andl $0x3, %r12d
leal 0x23(%r12), %ecx
callq 0x275b5
testq %rax, %rax
je 0x50001
addl $0x2a, %r12d
movq 0x40(%r13), %rax
movl %r12d, %ecx
shll $0x4, %ecx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r13, %rdi
movl %r12d, %ecx
callq 0x20f05
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x50020
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %r12d
orq %rcx, %rax
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movl $0x20, %esi
movq %r13, %rdi
callq 0xede6
testq %rax, %rax
je 0x50072
sarl $0x2, %ebx
movq %r15, (%rsp)
cmpl $-0x9, %r14d
jb 0x50048
movq (%rsp), %rcx
incl (%rcx)
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq %rax, 0x30(%rbp)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbp, %rcx
andq %rax, %rcx
movl %ebp, %eax
jmp 0x5000b
movq 0x18(%r13), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x50001
| js_create_map_iterator:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r9d
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov r12d, r9d
and r12d, 3
lea ecx, [r12+23h]
call JS_GetOpaque2
test rax, rax
jz short loc_50001
add r12d, 2Ah ; '*'
mov rax, [r13+40h]
mov ecx, r12d
shl ecx, 4
mov rsi, [rax+rcx]
mov rdx, [rax+rcx+8]
mov rdi, r13
mov ecx, r12d
call JS_NewObjectProtoClass
mov r12, rdx
cmp r12d, 6
jnz short loc_50020
loc_50001:
xor eax, eax
loc_50003:
xor ecx, ecx
mov r12d, 6
loc_5000B:
or rax, rcx
mov rdx, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_50020:
mov rbp, rax
mov esi, 20h ; ' '
mov rdi, r13
call js_malloc
test rax, rax
jz short loc_50072
sar ebx, 2
mov [rsp+38h+var_38], r15
cmp r14d, 0FFFFFFF7h
jb short loc_50048
mov rcx, [rsp+38h+var_38]
inc dword ptr [rcx]
loc_50048:
mov [rax], r15
mov [rax+8], r14
mov [rax+10h], ebx
mov qword ptr [rax+18h], 0
mov [rbp+30h], rax
mov rax, 0FFFFFFFF00000000h
mov rcx, rbp
and rcx, rax
mov eax, ebp
jmp short loc_5000B
loc_50072:
mov rdi, [r13+18h]
mov rsi, rbp
mov rdx, r12
call JS_FreeValueRT
jmp loc_50001
| unsigned long long js_create_map_iterator(long long a1, _DWORD *a2, long long a3, long long a4, long long a5, int a6)
{
int v8; // r12d
long long v9; // rax
long long v10; // rdx
long long v11; // r12
long long v12; // rax
unsigned long long v13; // rcx
long long v15; // rbp
long long v16; // rax
int v17; // ebx
v8 = a6 & 3;
if ( !JS_GetOpaque2(a1, (long long)a2, a3, v8 + 35) )
goto LABEL_3;
v9 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + (unsigned int)(16 * (v8 + 42))),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + (unsigned int)(16 * (v8 + 42)) + 8LL),
v8 + 42);
v11 = v10;
if ( (_DWORD)v10 == 6 )
goto LABEL_3;
v15 = v9;
v16 = js_malloc(a1, 32LL);
if ( !v16 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v15, v11);
LABEL_3:
v12 = 0LL;
v13 = 0LL;
return v13 | v12;
}
v17 = a6 >> 2;
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*a2;
*(_QWORD *)v16 = a2;
*(_QWORD *)(v16 + 8) = a3;
*(_DWORD *)(v16 + 16) = v17;
*(_QWORD *)(v16 + 24) = 0LL;
*(_QWORD *)(v15 + 48) = v16;
v13 = v15 & 0xFFFFFFFF00000000LL;
v12 = (unsigned int)v15;
return v13 | v12;
}
| |||
28,350 | mi_find_last_pos | eloqsql/storage/myisam/mi_write.c | static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys, length, UNINIT_VAR(last_length), key_ref_length;
uchar *end,*lastpos,*prevpos;
uchar key_buff[HA_MAX_KEY_BUFF];
DBUG_ENTER("_mi_find_last_pos");
key_ref_length=2;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
keys=length/keyinfo->keylength-2;
*return_key_length=length=keyinfo->keylength;
end=page+keys*length;
*after_key=end+length;
memcpy(key,end,length);
DBUG_RETURN(end);
}
end=page+length-key_ref_length;
DBUG_ASSERT(page < end);
*key='\0';
length=0;
lastpos=page;
do
{
prevpos=lastpos; lastpos=page;
last_length=length;
memcpy(key, key_buff, length); /* previous key */
if (!(length=(*keyinfo->get_key)(keyinfo,0,&page,key_buff)))
{
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
} while (page < end);
*return_key_length=last_length;
*after_key=lastpos;
DBUG_PRINT("exit",("returns: %p page: %p end: %p",
prevpos, page, end));
DBUG_RETURN(prevpos);
} | O0 | c | mi_find_last_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp # imm = 0x520
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdx, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movq %r8, -0x4f0(%rbp)
movl -0x4fc(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movl $0x2, -0x500(%rbp)
movq -0x4d8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x4d8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
subl -0x500(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x500(%rbp), %ecx
movq -0x4d8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x4d8(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0x53c95
movl -0x4f8(%rbp), %eax
movq -0x4d0(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
xorl %edx, %edx
divl %ecx
subl $0x2, %eax
movl %eax, -0x4f4(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0x12(%rax), %ecx
movl %ecx, -0x4f8(%rbp)
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x4d8(%rbp), %rax
movl -0x4f4(%rbp), %ecx
imull -0x4f8(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
movq -0x508(%rbp), %rcx
movl -0x4f8(%rbp), %eax
addq %rax, %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
movq -0x4e0(%rbp), %rdi
movq -0x508(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x292d0
movq -0x508(%rbp), %rax
movq %rax, -0x4c8(%rbp)
jmp 0x53dcd
movq -0x4d8(%rbp), %rax
movl -0x4f8(%rbp), %ecx
addq %rcx, %rax
movl -0x500(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
jmp 0x53cbe
movq -0x4e0(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4f8(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movl -0x4f8(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movq -0x4e0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x292d0
movq -0x4d0(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x4d0(%rbp), %rdi
leaq -0x4c0(%rbp), %rcx
xorl %esi, %esi
leaq -0x4d8(%rbp), %rdx
callq *%rax
movl %eax, -0x4f8(%rbp)
cmpl $0x0, %eax
jne 0x53d85
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x3a810
callq 0x8d620
movl $0x7e, (%rax)
movq $0x0, -0x4c8(%rbp)
jmp 0x53dcd
jmp 0x53d87
movq -0x4d8(%rbp), %rax
cmpq -0x508(%rbp), %rax
jb 0x53ce0
movl -0x4fc(%rbp), %ecx
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x510(%rbp), %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
jmp 0x53dbd
jmp 0x53dbf
movq -0x518(%rbp), %rax
movq %rax, -0x4c8(%rbp)
movq -0x4c8(%rbp), %rax
movq %rax, -0x520(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x53dfd
movq -0x520(%rbp), %rax
addq $0x520, %rsp # imm = 0x520
popq %rbp
retq
callq 0x29420
nopw %cs:(%rax,%rax)
| _mi_find_last_pos:
push rbp
mov rbp, rsp
sub rsp, 520h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_4D0], rdi
mov [rbp+var_4D8], rsi
mov [rbp+var_4E0], rdx
mov [rbp+var_4E8], rcx
mov [rbp+var_4F0], r8
mov eax, [rbp+var_4FC]
mov [rbp+var_4FC], eax
mov [rbp+var_500], 2
mov rax, [rbp+var_4D8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_4D8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
sub eax, [rbp+var_500]
mov [rbp+var_4F8], eax
mov ecx, [rbp+var_500]
mov rax, [rbp+var_4D8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_4D8], rax
mov rax, [rbp+var_4D0]
movzx eax, word ptr [rax+0Ah]
and eax, 2Eh
cmp eax, 0
jnz loc_53C95
mov eax, [rbp+var_4F8]
mov rcx, [rbp+var_4D0]
movzx ecx, word ptr [rcx+12h]
xor edx, edx
div ecx
sub eax, 2
mov [rbp+var_4F4], eax
mov rax, [rbp+var_4D0]
movzx ecx, word ptr [rax+12h]
mov [rbp+var_4F8], ecx
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F4]
imul ecx, [rbp+var_4F8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_508], rax
mov rcx, [rbp+var_508]
mov eax, [rbp+var_4F8]
add rcx, rax
mov rax, [rbp+var_4F0]
mov [rax], rcx
mov rdi, [rbp+var_4E0]
mov rsi, [rbp+var_508]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_508]
mov [rbp+var_4C8], rax
jmp loc_53DCD
loc_53C95:
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F8]
add rax, rcx
mov ecx, [rbp+var_500]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_508], rax
jmp short $+2
loc_53CBE:
mov rax, [rbp+var_4E0]
mov byte ptr [rax], 0
mov [rbp+var_4F8], 0
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
loc_53CE0:
mov rax, [rbp+var_510]
mov [rbp+var_518], rax
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
mov eax, [rbp+var_4F8]
mov [rbp+var_4FC], eax
mov rdi, [rbp+var_4E0]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_4D0]
mov rax, [rax+48h]
mov rdi, [rbp+var_4D0]
lea rcx, [rbp+var_4C0]
xor esi, esi
lea rdx, [rbp+var_4D8]
call rax
mov [rbp+var_4F8], eax
cmp eax, 0
jnz short loc_53D85
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4C8], 0
jmp short loc_53DCD
loc_53D85:
jmp short $+2
loc_53D87:
mov rax, [rbp+var_4D8]
cmp rax, [rbp+var_508]
jb loc_53CE0
mov ecx, [rbp+var_4FC]
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rcx, [rbp+var_510]
mov rax, [rbp+var_4F0]
mov [rax], rcx
jmp short $+2
loc_53DBD:
jmp short $+2
loc_53DBF:
mov rax, [rbp+var_518]
mov [rbp+var_4C8], rax
loc_53DCD:
mov rax, [rbp+var_4C8]
mov [rbp+var_520], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_53DFD
mov rax, [rbp+var_520]
add rsp, 520h
pop rbp
retn
loc_53DFD:
call ___stack_chk_fail
| unsigned __int16 * mi_find_last_pos(
long long a1,
unsigned __int16 *a2,
_BYTE *a3,
unsigned int *a4,
unsigned __int16 **a5)
{
const char *v5; // rsi
unsigned __int16 *v7; // [rsp+8h] [rbp-518h]
unsigned __int16 *v8; // [rsp+10h] [rbp-510h]
char *v9; // [rsp+18h] [rbp-508h]
unsigned long long v10; // [rsp+18h] [rbp-508h]
unsigned int v11; // [rsp+24h] [rbp-4FCh]
unsigned int v12; // [rsp+28h] [rbp-4F8h]
unsigned int v13; // [rsp+28h] [rbp-4F8h]
unsigned int v14; // [rsp+28h] [rbp-4F8h]
unsigned int v15; // [rsp+2Ch] [rbp-4F4h]
unsigned __int16 *v19; // [rsp+48h] [rbp-4D8h] BYREF
long long v20; // [rsp+50h] [rbp-4D0h]
_BYTE v22[1208]; // [rsp+60h] [rbp-4C0h] BYREF
unsigned long long v23; // [rsp+518h] [rbp-8h]
v23 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v12 = (_byteswap_ushort(*a2) & 0x7FFF) - 2;
v19 = a2 + 1;
if ( (*(_WORD *)(a1 + 10) & 0x2E) != 0 )
{
v10 = (unsigned long long)v19 + v12 - 2;
*a3 = 0;
v14 = 0;
v8 = v19;
do
{
v7 = v8;
v8 = v19;
v11 = v14;
memcpy(a3, v22, v14);
v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v20 + 72))(v20, 0LL, &v19, v22);
if ( !v14 )
{
v5 = *(const char **)(*(_QWORD *)v20 + 616LL);
mi_report_error(126, (long long)v5);
*(_DWORD *)my_thread_var(126LL, v5) = 126;
return 0LL;
}
}
while ( (unsigned long long)v19 < v10 );
*a4 = v11;
*a5 = v8;
return v7;
}
else
{
v15 = v12 / *(unsigned __int16 *)(v20 + 18) - 2;
v13 = *(unsigned __int16 *)(v20 + 18);
*a4 = v13;
v9 = (char *)v19 + v13 * v15;
*a5 = (unsigned __int16 *)&v9[v13];
memcpy(a3, v9, v13);
return (unsigned __int16 *)v9;
}
}
| _mi_find_last_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x520
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x4d0],RDI
MOV qword ptr [RBP + -0x4d8],RSI
MOV qword ptr [RBP + -0x4e0],RDX
MOV qword ptr [RBP + -0x4e8],RCX
MOV qword ptr [RBP + -0x4f0],R8
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBP + -0x4fc],EAX
MOV dword ptr [RBP + -0x500],0x2
MOV RAX,qword ptr [RBP + -0x4d8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x4d8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
SUB EAX,dword ptr [RBP + -0x500]
MOV dword ptr [RBP + -0x4f8],EAX
MOV ECX,dword ptr [RBP + -0x500]
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x4d8],RAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x00153c95
MOV EAX,dword ptr [RBP + -0x4f8]
MOV RCX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RCX + 0x12]
XOR EDX,EDX
DIV ECX
SUB EAX,0x2
MOV dword ptr [RBP + -0x4f4],EAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4f8],ECX
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f4]
IMUL ECX,dword ptr [RBP + -0x4f8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
MOV RCX,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x4e0]
MOV RSI,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x001292d0
MOV RAX,qword ptr [RBP + -0x508]
MOV qword ptr [RBP + -0x4c8],RAX
JMP 0x00153dcd
LAB_00153c95:
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f8]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x500]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
JMP 0x00153cbe
LAB_00153cbe:
MOV RAX,qword ptr [RBP + -0x4e0]
MOV byte ptr [RAX],0x0
MOV dword ptr [RBP + -0x4f8],0x0
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
LAB_00153ce0:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x518],RAX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
MOV EAX,dword ptr [RBP + -0x4f8]
MOV dword ptr [RBP + -0x4fc],EAX
MOV RDI,qword ptr [RBP + -0x4e0]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x001292d0
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x4d0]
LEA RCX,[RBP + -0x4c0]
XOR ESI,ESI
LEA RDX,[RBP + -0x4d8]
CALL RAX
MOV dword ptr [RBP + -0x4f8],EAX
CMP EAX,0x0
JNZ 0x00153d85
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0013a810
CALL 0x0018d620
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x4c8],0x0
JMP 0x00153dcd
LAB_00153d85:
JMP 0x00153d87
LAB_00153d87:
MOV RAX,qword ptr [RBP + -0x4d8]
CMP RAX,qword ptr [RBP + -0x508]
JC 0x00153ce0
MOV ECX,dword ptr [RBP + -0x4fc]
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
JMP 0x00153dbd
LAB_00153dbd:
JMP 0x00153dbf
LAB_00153dbf:
MOV RAX,qword ptr [RBP + -0x518]
MOV qword ptr [RBP + -0x4c8],RAX
LAB_00153dcd:
MOV RAX,qword ptr [RBP + -0x4c8]
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00153dfd
MOV RAX,qword ptr [RBP + -0x520]
ADD RSP,0x520
POP RBP
RET
LAB_00153dfd:
CALL 0x00129420
|
byte * _mi_find_last_pos(long *param_1,byte *param_2,int1 *param_3,uint *param_4,
int8 *param_5)
{
ushort uVar1;
byte *pbVar2;
byte *pbVar3;
uint uVar4;
byte *pbVar5;
int4 *puVar6;
uint uVar7;
long in_FS_OFFSET;
byte *local_518;
uint local_500;
byte *local_4e0;
long *local_4d8;
byte *local_4d0;
int1 local_4c8 [1208];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = ((uint)param_2[1] | (*param_2 & 0x7f) << 8) - 2;
local_518 = param_2 + 2;
local_4e0 = local_518;
local_4d8 = param_1;
if ((*(ushort *)((long)param_1 + 10) & 0x2e) == 0) {
uVar1 = *(ushort *)((long)param_1 + 0x12);
uVar7 = (uint)*(ushort *)((long)param_1 + 0x12);
*param_4 = uVar7;
local_518 = local_518 + (uVar4 / uVar1 - 2) * uVar7;
*param_5 = local_518 + uVar7;
memcpy(param_3,local_518,(ulong)uVar7);
local_4d0 = local_518;
}
else {
pbVar5 = local_518 + ((ulong)uVar4 - 2);
*param_3 = 0;
local_500 = 0;
uVar4 = local_500;
do {
local_500 = uVar4;
pbVar3 = local_4e0;
pbVar2 = local_518;
local_518 = local_4e0;
memcpy(param_3,local_4c8,(ulong)local_500);
uVar4 = (*(code *)local_4d8[9])(local_4d8,0,&local_4e0,local_4c8);
if (uVar4 == 0) {
mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
local_4d0 = (byte *)0x0;
goto LAB_00153dcd;
}
} while (local_4e0 < pbVar5);
*param_4 = local_500;
*param_5 = pbVar3;
local_4d0 = pbVar2;
}
LAB_00153dcd:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_4d0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,351 | minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | Value get_named(const std::string & name) {
for (const auto & [key, value] : kwargs) {
if (key == name) return value;
}
return Value();
} | O3 | cpp | minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rsi), %r14
movq 0x20(%rsi), %r13
cmpq %r13, %r14
je 0x81f50
movq (%rdx), %r15
movq 0x8(%rdx), %r12
cmpq %r12, 0x8(%r14)
jne 0x81f47
testq %r12, %r12
je 0x81f8e
movq (%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x19830
testl %eax, %eax
je 0x81f8e
addq $0x70, %r14
cmpq %r13, %r14
jne 0x81f2a
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5099a
movq %r14, %rdi
movl $0x1, %esi
callq 0x5099a
jmp 0x81f9d
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x618b6
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
mov r14, [rsi+18h]
mov r13, [rsi+20h]
cmp r14, r13
jz short loc_81F50
mov r15, [rdx]
mov r12, [rdx+8]
loc_81F2A:
cmp [r14+8], r12
jnz short loc_81F47
test r12, r12
jz short loc_81F8E
mov rdi, [r14]
mov rsi, r15
mov rdx, r12
call _bcmp
test eax, eax
jz short loc_81F8E
loc_81F47:
add r14, 70h ; 'p'
cmp r14, r13
jnz short loc_81F2A
loc_81F50:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_81F9D
loc_81F8E:
add r14, 20h ; ' '
mov rdi, rbx; this
mov rsi, r14; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
loc_81F9D:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, long long *a3)
{
_QWORD *v3; // r14
_QWORD *v4; // r13
long long v5; // r15
long long v6; // r12
v3 = *(_QWORD **)(a2 + 24);
v4 = *(_QWORD **)(a2 + 32);
if ( v3 == v4 )
{
LABEL_7:
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
}
else
{
v5 = *a3;
v6 = a3[1];
while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) )
{
v3 += 14;
if ( v3 == v4 )
goto LABEL_7;
}
minja::Value::Value(this, (const minja::Value *)(v3 + 4));
}
return this;
}
| get_named:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RSI + 0x18]
MOV R13,qword ptr [RSI + 0x20]
CMP R14,R13
JZ 0x00181f50
MOV R15,qword ptr [RDX]
MOV R12,qword ptr [RDX + 0x8]
LAB_00181f2a:
CMP qword ptr [R14 + 0x8],R12
JNZ 0x00181f47
TEST R12,R12
JZ 0x00181f8e
MOV RDI,qword ptr [R14]
MOV RSI,R15
MOV RDX,R12
CALL 0x00119830
TEST EAX,EAX
JZ 0x00181f8e
LAB_00181f47:
ADD R14,0x70
CMP R14,R13
JNZ 0x00181f2a
LAB_00181f50:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015099a
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015099a
JMP 0x00181f9d
LAB_00181f8e:
ADD R14,0x20
MOV RDI,RBX
MOV RSI,R14
CALL 0x001618b6
LAB_00181f9d:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */
string * minja::ArgumentsValue::get_named(string *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
int8 *in_RDX;
long in_RSI;
bool bVar3;
int8 *puVar4;
puVar4 = *(int8 **)(in_RSI + 0x18);
puVar1 = *(int8 **)(in_RSI + 0x20);
if (puVar4 != puVar1) {
__s2 = (void *)*in_RDX;
__n = in_RDX[1];
do {
if ((puVar4[1] == __n) && ((__n == 0 || (iVar2 = bcmp((void *)*puVar4,__s2,__n), iVar2 == 0)))
) {
Value::Value((Value *)param_1,(Value *)(puVar4 + 4));
return param_1;
}
puVar4 = puVar4 + 0xe;
} while (puVar4 != puVar1);
}
bVar3 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (string)0x0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
return param_1;
}
| |
28,352 | js_TA_cmp_generic | bluesky950520[P]quickjs/quickjs.c | static int js_TA_cmp_generic(const void *a, const void *b, void *opaque) {
struct TA_sort_context *psc = opaque;
JSContext *ctx = psc->ctx;
uint32_t a_idx, b_idx;
JSValue argv[2];
JSValue res;
JSObject *p;
int cmp;
p = JS_VALUE_GET_OBJ(psc->arr);
if (typed_array_is_oob(p))
return 0;
cmp = 0;
if (!psc->exception) {
a_idx = *(uint32_t *)a;
b_idx = *(uint32_t *)b;
if (a_idx >= p->u.array.count || b_idx >= p->u.array.count)
return 0;
argv[0] = psc->getfun(ctx, (char *)p->u.array.u.ptr +
a_idx * (size_t)psc->elt_size);
argv[1] = psc->getfun(ctx, (char *)p->u.array.u.ptr +
b_idx * (size_t)(psc->elt_size));
res = JS_Call(ctx, psc->cmp, JS_UNDEFINED, 2, argv);
if (JS_IsException(res)) {
psc->exception = 1;
goto done;
}
if (JS_VALUE_GET_TAG(res) == JS_TAG_INT) {
int val = JS_VALUE_GET_INT(res);
cmp = (val > 0) - (val < 0);
} else {
double val;
if (JS_ToFloat64Free(ctx, &val, res) < 0) {
psc->exception = 1;
goto done;
} else {
cmp = (val > 0) - (val < 0);
}
}
if (cmp == 0) {
/* make sort stable: compare array offsets */
cmp = (a_idx > b_idx) - (a_idx < b_idx);
}
done:
JS_FreeValue(ctx, argv[0]);
JS_FreeValue(ctx, argv[1]);
}
return cmp;
} | O1 | c | js_TA_cmp_generic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq (%rdx), %rbx
movq 0x10(%rdx), %r15
movq %r15, %rdi
callq 0x396c4
xorl %ebp, %ebp
testl %eax, %eax
jne 0x83186
cmpl $0x0, 0x8(%r14)
jne 0x83186
movl (%r13), %r13d
movl (%r12), %eax
movl 0x40(%r15), %ecx
cmpl %ecx, %r13d
setb %dl
cmpl %ecx, %eax
setb %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x83186
movl %eax, %r12d
movslq 0x38(%r14), %rsi
imulq %r13, %rsi
addq 0x38(%r15), %rsi
movq %rbx, %rdi
callq *0x30(%r14)
leaq 0x30(%rsp), %rbp
movq %rax, (%rbp)
movq %rdx, 0x8(%rbp)
movslq 0x38(%r14), %rsi
imulq %r12, %rsi
addq 0x38(%r15), %rsi
movq %rbx, %rdi
callq *0x30(%r14)
movq %rax, 0x10(%rbp)
movq %rdx, 0x18(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movupd 0x20(%rsp), %xmm0
movupd %xmm0, (%rsp)
movq %rbp, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x2, %r9d
callq 0x284ca
movq %rdx, %rcx
testl %ecx, %ecx
je 0x830d7
cmpl $0x6, %ecx
jne 0x830e8
movl $0x1, 0x8(%r14)
xorl %ebp, %ebp
jmp 0x83160
movl %eax, %ecx
sarl $0x1f, %ecx
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
orl %ecx, %ebp
jmp 0x83150
cmpl $0x2, %ecx
ja 0x830fc
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x83106
cmpl $0x7, %ecx
jne 0x8310a
movq %rax, 0x20(%rsp)
xorl %eax, %eax
jmp 0x8311d
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x3df2f
shrl $0x1f, %eax
testb %al, %al
je 0x8312d
movl $0x1, 0x8(%r14)
xorl %ebp, %ebp
jmp 0x8314c
movsd 0x20(%rsp), %xmm0
xorpd %xmm1, %xmm1
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
seta %bpl
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
seta %cl
subl %ecx, %ebp
testb %al, %al
jne 0x83160
testl %ebp, %ebp
jne 0x83160
xorl %ebp, %ebp
cmpl %r12d, %r13d
seta %bpl
sbbl $0x0, %ebp
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_TA_cmp_generic:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov r12, rsi
mov r13, rdi
mov rbx, [rdx]
mov r15, [rdx+10h]
mov rdi, r15
call typed_array_is_oob
xor ebp, ebp
test eax, eax
jnz loc_83186
cmp dword ptr [r14+8], 0
jnz loc_83186
mov r13d, [r13+0]
mov eax, [r12]
mov ecx, [r15+40h]
cmp r13d, ecx
setb dl
cmp eax, ecx
setb cl
and cl, dl
cmp cl, 1
jnz loc_83186
mov r12d, eax
movsxd rsi, dword ptr [r14+38h]
imul rsi, r13
add rsi, [r15+38h]
mov rdi, rbx
call qword ptr [r14+30h]
lea rbp, [rsp+88h+var_58]
mov [rbp+0], rax
mov [rbp+8], rdx
movsxd rsi, dword ptr [r14+38h]
imul rsi, r12
add rsi, [r15+38h]
mov rdi, rbx
call qword ptr [r14+30h]
mov [rbp+10h], rax
mov [rbp+18h], rdx
mov rsi, [r14+20h]
mov rdx, [r14+28h]
mov dword ptr [rsp+88h+var_68], 0
mov qword ptr [rsp+88h+var_68+8], 3
movupd xmm0, [rsp+88h+var_68]
movupd [rsp+88h+var_88], xmm0
mov [rsp+88h+var_78], rbp
mov [rsp+88h+var_70], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 2
call JS_CallInternal
mov rcx, rdx
test ecx, ecx
jz short loc_830D7
cmp ecx, 6
jnz short loc_830E8
mov dword ptr [r14+8], 1
xor ebp, ebp
jmp loc_83160
loc_830D7:
mov ecx, eax
sar ecx, 1Fh
xor ebp, ebp
test eax, eax
setnz bpl
or ebp, ecx
jmp short loc_83150
loc_830E8:
cmp ecx, 2
ja short loc_830FC
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+88h+var_68], xmm0
jmp short loc_83106
loc_830FC:
cmp ecx, 7
jnz short loc_8310A
mov qword ptr [rsp+88h+var_68], rax
loc_83106:
xor eax, eax
jmp short loc_8311D
loc_8310A:
lea rsi, [rsp+88h+var_68]
mov rdi, rbx
mov rdx, rax
call __JS_ToFloat64Free
shr eax, 1Fh
loc_8311D:
test al, al
jz short loc_8312D
mov dword ptr [r14+8], 1
xor ebp, ebp
jmp short loc_8314C
loc_8312D:
movsd xmm0, qword ptr [rsp+88h+var_68]
xorpd xmm1, xmm1
xor ebp, ebp
ucomisd xmm0, xmm1
setnbe bpl
xor ecx, ecx
ucomisd xmm1, xmm0
setnbe cl
sub ebp, ecx
loc_8314C:
test al, al
jnz short loc_83160
loc_83150:
test ebp, ebp
jnz short loc_83160
xor ebp, ebp
cmp r13d, r12d
setnbe bpl
sbb ebp, 0
loc_83160:
mov rsi, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rsp+88h+var_48]
mov rdx, [rsp+88h+var_40]
mov rdi, [rbx+18h]
call JS_FreeValueRT
loc_83186:
mov eax, ebp
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_TA_cmp_generic(
unsigned int *a1,
_DWORD *a2,
long long a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // rbx
long long v13; // r15
unsigned int v14; // ebp
long long v15; // r13
long long v16; // r12
long long v17; // rdx
long long v18; // rdx
long long v19; // rsi
long long v20; // rdx
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned long long v23; // rax
long long v24; // rdx
unsigned int v25; // eax
__m128 v27; // [rsp+20h] [rbp-68h] BYREF
_DWORD *v28; // [rsp+30h] [rbp-58h] BYREF
long long v29; // [rsp+38h] [rbp-50h]
_DWORD *v30; // [rsp+40h] [rbp-48h]
long long v31; // [rsp+48h] [rbp-40h]
v12 = *(_QWORD *)a3;
v13 = *(_QWORD *)(a3 + 16);
v14 = 0;
if ( !typed_array_is_oob(v13) && !*(_DWORD *)(a3 + 8) )
{
v15 = *a1;
if ( (unsigned int)v15 < *(_DWORD *)(v13 + 64) && *a2 < *(_DWORD *)(v13 + 64) )
{
v16 = (unsigned int)*a2;
v28 = (_DWORD *)(*(long long ( **)(long long, long long))(a3 + 48))(
v12,
*(_QWORD *)(v13 + 56) + v15 * *(int *)(a3 + 56));
v29 = v17;
v30 = (_DWORD *)(*(long long ( **)(long long, long long))(a3 + 48))(
v12,
*(_QWORD *)(v13 + 56) + v16 * *(int *)(a3 + 56));
v31 = v18;
v19 = *(_QWORD *)(a3 + 32);
v20 = *(_QWORD *)(a3 + 40);
v27.m128_i32[0] = 0;
v27.m128_u64[1] = 3LL;
v23 = JS_CallInternal(v12, v19, v20, 0LL, 3LL, 2LL, v27, a5, a6, a7, v21, v22, a10, a11, 0, 3, (long long)&v28, 2u);
if ( !(_DWORD)v24 )
{
v14 = ((int)v23 >> 31) | ((_DWORD)v23 != 0);
LABEL_18:
if ( !v14 )
v14 = (__PAIR64__((unsigned int)v15 > (unsigned int)v16, v15) - (unsigned int)v16) >> 32;
goto LABEL_20;
}
if ( (_DWORD)v24 == 6 )
{
*(_DWORD *)(a3 + 8) = 1;
v14 = 0;
LABEL_20:
JS_FreeValueRT(*(_QWORD *)(v12 + 24), v28, v29);
JS_FreeValueRT(*(_QWORD *)(v12 + 24), v30, v31);
return v14;
}
if ( (unsigned int)v24 > 2 )
{
if ( (_DWORD)v24 != 7 )
{
v25 = (unsigned int)_JS_ToFloat64Free(v12, (long long *)&v27, v23, v24) >> 31;
LABEL_14:
if ( (_BYTE)v25 )
{
*(_DWORD *)(a3 + 8) = 1;
v14 = 0;
}
else
{
v14 = (*(double *)v27.m128_u64 > 0.0) - (*(double *)v27.m128_u64 < 0.0);
}
if ( (_BYTE)v25 )
goto LABEL_20;
goto LABEL_18;
}
v27.m128_u64[0] = v23;
}
else
{
*(double *)v27.m128_u64 = (double)(int)v23;
}
LOBYTE(v25) = 0;
goto LABEL_14;
}
}
return v14;
}
| |||
28,353 | js_TA_cmp_generic | bluesky950520[P]quickjs/quickjs.c | static int js_TA_cmp_generic(const void *a, const void *b, void *opaque) {
struct TA_sort_context *psc = opaque;
JSContext *ctx = psc->ctx;
uint32_t a_idx, b_idx;
JSValue argv[2];
JSValue res;
JSObject *p;
int cmp;
p = JS_VALUE_GET_OBJ(psc->arr);
if (typed_array_is_oob(p))
return 0;
cmp = 0;
if (!psc->exception) {
a_idx = *(uint32_t *)a;
b_idx = *(uint32_t *)b;
if (a_idx >= p->u.array.count || b_idx >= p->u.array.count)
return 0;
argv[0] = psc->getfun(ctx, (char *)p->u.array.u.ptr +
a_idx * (size_t)psc->elt_size);
argv[1] = psc->getfun(ctx, (char *)p->u.array.u.ptr +
b_idx * (size_t)(psc->elt_size));
res = JS_Call(ctx, psc->cmp, JS_UNDEFINED, 2, argv);
if (JS_IsException(res)) {
psc->exception = 1;
goto done;
}
if (JS_VALUE_GET_TAG(res) == JS_TAG_INT) {
int val = JS_VALUE_GET_INT(res);
cmp = (val > 0) - (val < 0);
} else {
double val;
if (JS_ToFloat64Free(ctx, &val, res) < 0) {
psc->exception = 1;
goto done;
} else {
cmp = (val > 0) - (val < 0);
}
}
if (cmp == 0) {
/* make sort stable: compare array offsets */
cmp = (a_idx > b_idx) - (a_idx < b_idx);
}
done:
JS_FreeValue(ctx, argv[0]);
JS_FreeValue(ctx, argv[1]);
}
return cmp;
} | O2 | c | js_TA_cmp_generic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq (%rdx), %rbx
movq 0x10(%rdx), %r15
movq %r15, %rdi
callq 0x32836
xorl %ebp, %ebp
testl %eax, %eax
jne 0x6e081
cmpl $0x0, 0x8(%r14)
jne 0x6e081
movl (%r13), %r13d
movl (%r12), %eax
movl 0x40(%r15), %ecx
cmpl %ecx, %r13d
setb %dl
cmpl %ecx, %eax
setb %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x6e081
movl %eax, %r12d
movslq 0x38(%r14), %rsi
imulq %r13, %rsi
addq 0x38(%r15), %rsi
movq %rbx, %rdi
callq *0x30(%r14)
leaq 0x10(%rsp), %rbp
movq %rax, (%rbp)
movq %rdx, 0x8(%rbp)
movslq 0x38(%r14), %rsi
imulq %r12, %rsi
addq 0x38(%r15), %rsi
movq %rbx, %rdi
callq *0x30(%r14)
movq %rax, 0x10(%rbp)
movq %rdx, 0x18(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %rbp, (%rsp)
pushq $0x3
popq %r8
pushq $0x2
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x21eb6
movq %rdx, %rcx
testl %ecx, %ecx
je 0x6e03e
cmpl $0x6, %ecx
je 0x6e032
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x21288
testl %eax, %eax
js 0x6e032
movsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
seta %bpl
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
subl %eax, %ebp
jmp 0x6e04d
movl $0x1, 0x8(%r14)
xorl %ebp, %ebp
jmp 0x6e05d
movl %eax, %ecx
sarl $0x1f, %ecx
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
orl %ecx, %ebp
testl %ebp, %ebp
jne 0x6e05d
xorl %ebp, %ebp
cmpl %r12d, %r13d
seta %bpl
sbbl $0x0, %ebp
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_TA_cmp_generic:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r12, rsi
mov r13, rdi
mov rbx, [rdx]
mov r15, [rdx+10h]
mov rdi, r15
call typed_array_is_oob
xor ebp, ebp
test eax, eax
jnz loc_6E081
cmp dword ptr [r14+8], 0
jnz loc_6E081
mov r13d, [r13+0]
mov eax, [r12]
mov ecx, [r15+40h]
cmp r13d, ecx
setb dl
cmp eax, ecx
setb cl
and cl, dl
cmp cl, 1
jnz loc_6E081
mov r12d, eax
movsxd rsi, dword ptr [r14+38h]
imul rsi, r13
add rsi, [r15+38h]
mov rdi, rbx
call qword ptr [r14+30h]
lea rbp, [rsp+68h+var_58]
mov [rbp+0], rax
mov [rbp+8], rdx
movsxd rsi, dword ptr [r14+38h]
imul rsi, r12
add rsi, [r15+38h]
mov rdi, rbx
call qword ptr [r14+30h]
mov [rbp+10h], rax
mov [rbp+18h], rdx
mov rsi, [r14+20h]
mov rdx, [r14+28h]
mov [rsp+68h+var_68], rbp
push 3
pop r8
push 2
pop r9
mov rdi, rbx
xor ecx, ecx
call JS_Call
mov rcx, rdx
test ecx, ecx
jz short loc_6E03E
cmp ecx, 6
jz short loc_6E032
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, rax
call JS_ToFloat64Free
test eax, eax
js short loc_6E032
movsd xmm0, [rsp+68h+var_60]
xorpd xmm1, xmm1
xor ebp, ebp
ucomisd xmm0, xmm1
setnbe bpl
xor eax, eax
ucomisd xmm1, xmm0
setnbe al
sub ebp, eax
jmp short loc_6E04D
loc_6E032:
mov dword ptr [r14+8], 1
xor ebp, ebp
jmp short loc_6E05D
loc_6E03E:
mov ecx, eax
sar ecx, 1Fh
xor ebp, ebp
test eax, eax
setnz bpl
or ebp, ecx
loc_6E04D:
test ebp, ebp
jnz short loc_6E05D
xor ebp, ebp
cmp r13d, r12d
setnbe bpl
sbb ebp, 0
loc_6E05D:
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
mov rdi, rbx
call JS_FreeValue
loc_6E081:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_TA_cmp_generic(unsigned int *a1, _DWORD *a2, long long a3)
{
const char *v4; // rbx
long long v5; // r15
unsigned int v6; // ebp
long long v7; // r13
long long v8; // r12
long long v9; // rdx
long long v10; // rdx
long long v11; // rax
long long v12; // rdx
double v14; // [rsp+8h] [rbp-60h] BYREF
long long v15; // [rsp+10h] [rbp-58h] BYREF
long long v16; // [rsp+18h] [rbp-50h]
long long v17; // [rsp+20h] [rbp-48h]
long long v18; // [rsp+28h] [rbp-40h]
v4 = *(const char **)a3;
v5 = *(_QWORD *)(a3 + 16);
v6 = 0;
if ( !typed_array_is_oob(v5) && !*(_DWORD *)(a3 + 8) )
{
v7 = *a1;
if ( (unsigned int)v7 < *(_DWORD *)(v5 + 64) && *a2 < *(_DWORD *)(v5 + 64) )
{
v8 = (unsigned int)*a2;
v15 = (*(long long ( **)(const char *, long long))(a3 + 48))(
v4,
*(_QWORD *)(v5 + 56) + v7 * *(int *)(a3 + 56));
v16 = v9;
v17 = (*(long long ( **)(const char *, long long))(a3 + 48))(
v4,
*(_QWORD *)(v5 + 56) + v8 * *(int *)(a3 + 56));
v18 = v10;
v11 = JS_Call((int)v4, *(_QWORD *)(a3 + 32), *(_QWORD *)(a3 + 40), 0, 3, 2, (long long)&v15);
if ( (_DWORD)v12 )
{
if ( (_DWORD)v12 == 6 || (int)JS_ToFloat64Free(v4, &v14, v11, v12) < 0 )
{
*(_DWORD *)(a3 + 8) = 1;
v6 = 0;
LABEL_12:
JS_FreeValue((long long)v4, v15, v16);
JS_FreeValue((long long)v4, v17, v18);
return v6;
}
v6 = (v14 > 0.0) - (v14 < 0.0);
}
else
{
v6 = ((int)v11 >> 31) | ((_DWORD)v11 != 0);
}
if ( !v6 )
v6 = (__PAIR64__((unsigned int)v7 > (unsigned int)v8, v7) - (unsigned int)v8) >> 32;
goto LABEL_12;
}
}
return v6;
}
| js_TA_cmp_generic:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R12,RSI
MOV R13,RDI
MOV RBX,qword ptr [RDX]
MOV R15,qword ptr [RDX + 0x10]
MOV RDI,R15
CALL 0x00132836
XOR EBP,EBP
TEST EAX,EAX
JNZ 0x0016e081
CMP dword ptr [R14 + 0x8],0x0
JNZ 0x0016e081
MOV R13D,dword ptr [R13]
MOV EAX,dword ptr [R12]
MOV ECX,dword ptr [R15 + 0x40]
CMP R13D,ECX
SETC DL
CMP EAX,ECX
SETC CL
AND CL,DL
CMP CL,0x1
JNZ 0x0016e081
MOV R12D,EAX
MOVSXD RSI,dword ptr [R14 + 0x38]
IMUL RSI,R13
ADD RSI,qword ptr [R15 + 0x38]
MOV RDI,RBX
CALL qword ptr [R14 + 0x30]
LEA RBP,[RSP + 0x10]
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],RDX
MOVSXD RSI,dword ptr [R14 + 0x38]
IMUL RSI,R12
ADD RSI,qword ptr [R15 + 0x38]
MOV RDI,RBX
CALL qword ptr [R14 + 0x30]
MOV qword ptr [RBP + 0x10],RAX
MOV qword ptr [RBP + 0x18],RDX
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R14 + 0x28]
MOV qword ptr [RSP],RBP
PUSH 0x3
POP R8
PUSH 0x2
POP R9
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00121eb6
MOV RCX,RDX
TEST ECX,ECX
JZ 0x0016e03e
CMP ECX,0x6
JZ 0x0016e032
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,RAX
CALL 0x00121288
TEST EAX,EAX
JS 0x0016e032
MOVSD XMM0,qword ptr [RSP + 0x8]
XORPD XMM1,XMM1
XOR EBP,EBP
UCOMISD XMM0,XMM1
SETA BPL
XOR EAX,EAX
UCOMISD XMM1,XMM0
SETA AL
SUB EBP,EAX
JMP 0x0016e04d
LAB_0016e032:
MOV dword ptr [R14 + 0x8],0x1
XOR EBP,EBP
JMP 0x0016e05d
LAB_0016e03e:
MOV ECX,EAX
SAR ECX,0x1f
XOR EBP,EBP
TEST EAX,EAX
SETNZ BPL
OR EBP,ECX
LAB_0016e04d:
TEST EBP,EBP
JNZ 0x0016e05d
XOR EBP,EBP
CMP R13D,R12D
SETA BPL
SBB EBP,0x0
LAB_0016e05d:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011801e
LAB_0016e081:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint js_TA_cmp_generic(uint *param_1,uint *param_2,int8 *param_3)
{
uint uVar1;
uint uVar2;
int8 uVar3;
long lVar4;
int iVar5;
uint uVar6;
int1 auVar7 [12];
double local_60;
int1 local_58 [16];
int1 local_48 [16];
uVar3 = *param_3;
lVar4 = param_3[2];
iVar5 = typed_array_is_oob(lVar4);
if (iVar5 != 0) {
return 0;
}
if (*(int *)(param_3 + 1) != 0) {
return 0;
}
uVar1 = *param_1;
uVar2 = *param_2;
if (*(uint *)(lVar4 + 0x40) <= uVar2 || *(uint *)(lVar4 + 0x40) <= uVar1) {
return 0;
}
local_58 = (*(code *)param_3[6])
(uVar3,(long)*(int *)(param_3 + 7) * (ulong)uVar1 + *(long *)(lVar4 + 0x38));
local_48 = (*(code *)param_3[6])
(uVar3,(long)*(int *)(param_3 + 7) * (ulong)uVar2 + *(long *)(lVar4 + 0x38));
auVar7 = JS_Call(uVar3,param_3[4],param_3[5],0,3,2,local_58);
if (auVar7._8_4_ == 0) {
uVar6 = (uint)(auVar7._0_4_ != 0) | auVar7._0_4_ >> 0x1f;
LAB_0016e04d:
if (uVar6 == 0) {
uVar6 = (uint)(uVar2 < uVar1) - (uint)(uVar1 < uVar2);
}
}
else {
if (auVar7._8_4_ != 6) {
iVar5 = JS_ToFloat64Free(uVar3,&local_60,auVar7._0_8_);
if (-1 < iVar5) {
uVar6 = (uint)(0.0 < local_60) - (uint)(local_60 < 0.0);
goto LAB_0016e04d;
}
}
*(int4 *)(param_3 + 1) = 1;
uVar6 = 0;
}
JS_FreeValue(uVar3,local_58._0_8_,local_58._8_8_);
JS_FreeValue(uVar3,local_48._0_8_,local_48._8_8_);
return uVar6;
}
| |
28,354 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O3 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x26097
callq 0x263f4
callq 0x2662e
callq 0x26557
callq 0x267bb
leaq 0x34043e(%rip), %rax # 0x366a4c
movl (%rax), %edi
callq 0x244c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x2687d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x268e7
| my_thread_global_reinit:
push rbp
mov rbp, rsp
push rbx
push rax
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
lea rax, THR_KEY_mysys
mov edi, [rax]
call _pthread_getspecific
mov rbx, rax
mov rdi, rax
call my_thread_destory_thr_mutex
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_thread_init_thr_mutex
| long long my_thread_global_reinit(long long a1)
{
long long v1; // rbx
my_init_mysys_psi_keys(a1);
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CALL 0x00126097
CALL 0x001263f4
CALL 0x0012662e
CALL 0x00126557
CALL 0x001267bb
LEA RAX,[0x466a4c]
MOV EDI,dword ptr [RAX]
CALL 0x001244c0
MOV RBX,RAX
MOV RDI,RAX
CALL 0x0012687d
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001268e7
|
void my_thread_global_reinit(void)
{
void *pvVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
pvVar1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(pvVar1);
my_thread_init_thr_mutex(pvVar1);
return;
}
| |
28,355 | vemit_tap | eloqsql/libmariadb/unittest/mytap/tap.c | static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
} | O0 | c | vemit_tap:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x4a11e(%rip), %rax # 0x65fc8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edx
leaq 0x37018(%rip), %rax # 0x52ed3
leaq 0x36396(%rip), %rcx # 0x52258
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
movl 0x4ca91(%rip), %eax # 0x68964
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl %eax, 0x4ca85(%rip) # 0x68964
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x19(%rbp)
je 0x1befb
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rdi
movb -0x19(%rbp), %sil
leaq 0x36347(%rip), %r8 # 0x52258
leaq 0x36fc0(%rip), %rax # 0x52ed8
testb $0x1, %sil
cmovneq %rax, %r8
leaq 0x36fa2(%rip), %rsi # 0x52ec9
movb $0x0, %al
callq 0x13660
cmpq $0x0, -0x10(%rbp)
je 0x1bf58
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1bf58
movq 0x4a080(%rip), %rax # 0x65fc8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x135e0
addq $0x30, %rsp
popq %rbp
retq
nop
| vemit_tap:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, cs:stdout_ptr
mov rax, [rax]
mov [rbp+var_30], rax
mov edx, [rbp+var_4]
lea rax, aNot; "not "
lea rcx, aDDD+12h; ""
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_28], rax
mov eax, cs:dword_68964
add eax, 1
mov [rbp+var_20], eax
mov cs:dword_68964, eax
xor eax, eax
cmp [rbp+var_10], 0
mov [rbp+var_19], al
jz short loc_1BEFB
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_19], al
loc_1BEFB:
mov ecx, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rdi, [rbp+var_30]
mov sil, [rbp+var_19]
lea r8, aDDD+12h; ""
lea rax, asc_52ED8; " - "
test sil, 1
cmovnz r8, rax
lea rsi, aSokDS; "%sok %d%s"
mov al, 0
call _fprintf
cmp [rbp+var_10], 0
jz short loc_1BF58
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_1BF58
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _vfprintf
loc_1BF58:
add rsp, 30h
pop rbp
retn
| long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rax
const char *v4; // r8
long long result; // rax
int v6; // [rsp+10h] [rbp-20h]
bool v7; // [rsp+17h] [rbp-19h]
v3 = "not ";
if ( a1 )
v3 = "";
v6 = ++dword_68964;
v7 = 0;
if ( a2 )
v7 = *a2 != 0;
v4 = "";
if ( v7 )
v4 = " - ";
result = fprintf(stdout, "%sok %d%s", v3, v6, v4);
if ( a2 )
{
result = (unsigned int)(char)*a2;
if ( *a2 )
return vfprintf(stdout, a2, a3);
}
return result;
}
| vemit_tap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [0x00165fc8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV EDX,dword ptr [RBP + -0x4]
LEA RAX,[0x152ed3]
LEA RCX,[0x152258]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [0x00168964]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [0x00168964],EAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0011befb
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0011befb:
MOV ECX,dword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x30]
MOV SIL,byte ptr [RBP + -0x19]
LEA R8,[0x152258]
LEA RAX,[0x152ed8]
TEST SIL,0x1
CMOVNZ R8,RAX
LEA RSI,[0x152ec9]
MOV AL,0x0
CALL 0x00113660
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0011bf58
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0011bf58
MOV RAX,qword ptr [0x00165fc8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001135e0
LAB_0011bf58:
ADD RSP,0x30
POP RBP
RET
|
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3)
{
int *puVar1;
int *puVar2;
bool bVar3;
puVar1 = &DAT_00152ed3;
if (param_1 != 0) {
puVar1 = &DAT_00152258;
}
DAT_00168964 = DAT_00168964 + 1;
bVar3 = false;
if (param_2 != (char *)0x0) {
bVar3 = *param_2 != '\0';
}
puVar2 = &DAT_00152258;
if (bVar3) {
puVar2 = &DAT_00152ed8;
}
fprintf(*(FILE **)PTR_stdout_00165fc8,"%sok %d%s",puVar1,(ulong)DAT_00168964,puVar2);
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
vfprintf(*(FILE **)PTR_stdout_00165fc8,param_2,param_3);
}
return;
}
| |
28,356 | to_printable_8bit | eloqsql/strings/ctype.c | static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs)
{
/*
This function is used only in context of error messages for now.
All non-BMP characters are currently replaced to question marks
when a message is put into diagnostics area.
*/
DBUG_ASSERT(wc < 0x10000);
*dst++= (char) bs;
*dst++= _dig_vec_upper[(wc >> 12) & 0x0F];
*dst++= _dig_vec_upper[(wc >> 8) & 0x0F];
*dst++= _dig_vec_upper[(wc >> 4) & 0x0F];
*dst++= _dig_vec_upper[wc & 0x0F];
return MY_CS_PRINTABLE_CHAR_LENGTH;
} | O0 | c | to_printable_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
jmp 0x75ce1
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0xc, %rcx
andq $0xf, %rcx
leaq 0x14a7f6(%rip), %rax # 0x1c0500
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0x8, %rcx
andq $0xf, %rcx
leaq 0x14a7cf(%rip), %rax # 0x1c0500
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0x4, %rcx
andq $0xf, %rcx
leaq 0x14a7a8(%rip), %rax # 0x1c0500
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
andq $0xf, %rcx
leaq 0x14a785(%rip), %rax # 0x1c0500
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl $0x5, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| to_printable_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
jmp short $+2
loc_75CE1:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 0Ch
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 8
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 4
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov eax, 5
pop rbp
retn
| long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3)
{
*a1 = a3;
a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12];
a1[2] = dig_vec_upper[(a2 >> 8) & 0xF];
a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4];
a1[4] = dig_vec_upper[a2 & 0xF];
return 5LL;
}
| to_printable_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
JMP 0x00175ce1
LAB_00175ce1:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0xc
AND RCX,0xf
LEA RAX,[0x2c0500]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0x8
AND RCX,0xf
LEA RAX,[0x2c0500]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0x4
AND RCX,0xf
LEA RAX,[0x2c0500]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
AND RCX,0xf
LEA RAX,[0x2c0500]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV EAX,0x5
POP RBP
RET
|
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3)
{
*param_1 = param_3;
param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf];
param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf];
param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf];
param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf];
return 5;
}
| |
28,357 | translog_get_file_max_lsn_stored | eloqsql/storage/maria/ma_loghandler.c | LSN translog_get_file_max_lsn_stored(uint32 file)
{
uint32 limit= FILENO_IMPOSSIBLE;
DBUG_ENTER("translog_get_file_max_lsn_stored");
DBUG_PRINT("enter", ("file: %lu", (ulong)file));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
/* find file with minimum file number "in progress" */
if (log_descriptor.unfinished_files.elements > 0)
{
struct st_file_counter *fc_ptr;
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
0, struct st_file_counter *);
limit= fc_ptr->file; /* minimal file number "in progress" */
}
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
/*
if there is no "in progress file" then unfinished file is in progress
for sure
*/
if (limit == FILENO_IMPOSSIBLE)
{
TRANSLOG_ADDRESS horizon= translog_get_horizon();
limit= LSN_FILE_NO(horizon);
}
if (file >= limit)
{
DBUG_PRINT("info", ("The file in in progress"));
DBUG_RETURN(LSN_IMPOSSIBLE);
}
{
LOGHANDLER_FILE_INFO info;
File fd;
fd= open_logfile_by_number_no_cache(file);
if(fd < 0)
{
DBUG_PRINT("error", ("Can't open file"));
DBUG_RETURN(LSN_ERROR);
}
if (translog_read_file_header(&info, fd))
{
DBUG_PRINT("error", ("Can't read file header"));
info.max_lsn= LSN_ERROR;
}
if (mysql_file_close(fd, MYF(MY_WME)))
{
DBUG_PRINT("error", ("Can't close file"));
info.max_lsn= LSN_ERROR;
}
DBUG_PRINT("info", ("Max lsn: " LSN_FMT, LSN_IN_PARTS(info.max_lsn)));
DBUG_RETURN(info.max_lsn);
}
} | O3 | c | translog_get_file_max_lsn_stored:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edi, %ebx
cmpq $0x0, 0xbd2ec0(%rip) # 0xc07fc8
jne 0x351dd
leaq 0xbd2e73(%rip), %rdi # 0xc07f88
callq 0x2a220
cmpl $0x0, 0xbd2eb7(%rip) # 0xc07fd8
je 0x3512f
movq 0xbd2ea6(%rip), %rax # 0xc07fd0
movl (%rax), %r14d
jmp 0x35132
xorl %r14d, %r14d
movq 0xbd2e8f(%rip), %rdi # 0xc07fc8
testq %rdi, %rdi
jne 0x351e7
leaq 0xbd2e3f(%rip), %rdi # 0xc07f88
callq 0x2a1e0
testl %r14d, %r14d
jne 0x3515f
callq 0x383a0
movq %rax, %r14
shrq $0x20, %r14
cmpl %ebx, %r14d
jbe 0x351c8
movl %ebx, %edi
callq 0x35232
testl %eax, %eax
js 0x351cc
movl %eax, %ebx
leaq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x34fec
testb %al, %al
je 0x35188
movq $0x1, -0x50(%rbp)
leaq 0x35a0c9(%rip), %rax # 0x38f258
movq (%rax), %rax
leaq -0x98(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x351fc
movl $0x10, %esi
movl %ebx, %edi
callq 0xa6bb9
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x351d1
movq -0x50(%rbp), %rax
jmp 0x351d1
xorl %eax, %eax
jmp 0x351d1
movl $0x1, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2c77b
jmp 0x3511a
leaq 0x35a06a(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x35142
leaq -0x14(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2c798
movl (%r14), %ecx
jmp 0x351b9
| translog_get_file_max_lsn_stored:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov ebx, edi
cmp cs:qword_C07FC8, 0
jnz loc_351DD
lea rdi, unk_C07F88
call _pthread_mutex_lock
loc_3511A:
cmp cs:dword_C07FD8, 0
jz short loc_3512F
mov rax, cs:qword_C07FD0
mov r14d, [rax]
jmp short loc_35132
loc_3512F:
xor r14d, r14d
loc_35132:
mov rdi, cs:qword_C07FC8
test rdi, rdi
jnz loc_351E7
loc_35142:
lea rdi, unk_C07F88
call _pthread_mutex_unlock
test r14d, r14d
jnz short loc_3515F
call translog_get_horizon
mov r14, rax
shr r14, 20h
loc_3515F:
cmp r14d, ebx
jbe short loc_351C8
mov edi, ebx
call open_logfile_by_number_no_cache
test eax, eax
js short loc_351CC
mov ebx, eax
lea rdi, [rbp+var_50]
mov esi, eax
call translog_read_file_header
test al, al
jz short loc_35188
mov [rbp+var_50], 1
loc_35188:
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_98]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_351FC
mov esi, 10h
mov edi, ebx
call my_close
mov ecx, eax
loc_351B9:
mov eax, 1
test ecx, ecx
jnz short loc_351D1
mov rax, [rbp+var_50]
jmp short loc_351D1
loc_351C8:
xor eax, eax
jmp short loc_351D1
loc_351CC:
mov eax, 1
loc_351D1:
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
loc_351DD:
call translog_get_file_max_lsn_stored_cold_1
jmp loc_3511A
loc_351E7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_35142
loc_351FC:
lea r14, [rbp+var_14]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call translog_get_file_max_lsn_stored_cold_2
mov ecx, [r14]
jmp short loc_351B9
| unsigned long long translog_get_file_max_lsn_stored(unsigned int a1)
{
unsigned long long v1; // r14
int v2; // eax
unsigned int v3; // ebx
long long v4; // rax
unsigned int v5; // ecx
unsigned long long result; // rax
_BYTE v7[72]; // [rsp+8h] [rbp-98h] BYREF
__m128 v8[3]; // [rsp+50h] [rbp-50h] BYREF
unsigned int v9[5]; // [rsp+8Ch] [rbp-14h] BYREF
if ( qword_C07FC8 )
translog_get_file_max_lsn_stored_cold_1();
else
pthread_mutex_lock(&unk_C07F88);
if ( dword_C07FD8 )
LODWORD(v1) = *(_DWORD *)qword_C07FD0;
else
LODWORD(v1) = 0;
if ( qword_C07FC8 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C07F88);
if ( !(_DWORD)v1 )
v1 = (unsigned long long)translog_get_horizon() >> 32;
if ( (unsigned int)v1 <= a1 )
return 0LL;
v2 = open_logfile_by_number_no_cache(a1);
if ( v2 < 0 )
return 1LL;
v3 = v2;
if ( translog_read_file_header(v8, (unsigned int)v2) )
v8[0].m128_u64[0] = 1LL;
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, v3, 4LL);
if ( v4 )
{
translog_get_file_max_lsn_stored_cold_2(v4, v3, v9);
v5 = v9[0];
}
else
{
v5 = my_close(v3, 16LL);
}
result = 1LL;
if ( !v5 )
return v8[0].m128_u64[0];
return result;
}
| translog_get_file_max_lsn_stored:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV EBX,EDI
CMP qword ptr [0x00d07fc8],0x0
JNZ 0x001351dd
LEA RDI,[0xd07f88]
CALL 0x0012a220
LAB_0013511a:
CMP dword ptr [0x00d07fd8],0x0
JZ 0x0013512f
MOV RAX,qword ptr [0x00d07fd0]
MOV R14D,dword ptr [RAX]
JMP 0x00135132
LAB_0013512f:
XOR R14D,R14D
LAB_00135132:
MOV RDI,qword ptr [0x00d07fc8]
TEST RDI,RDI
JNZ 0x001351e7
LAB_00135142:
LEA RDI,[0xd07f88]
CALL 0x0012a1e0
TEST R14D,R14D
JNZ 0x0013515f
CALL 0x001383a0
MOV R14,RAX
SHR R14,0x20
LAB_0013515f:
CMP R14D,EBX
JBE 0x001351c8
MOV EDI,EBX
CALL 0x00135232
TEST EAX,EAX
JS 0x001351cc
MOV EBX,EAX
LEA RDI,[RBP + -0x50]
MOV ESI,EAX
CALL 0x00134fec
TEST AL,AL
JZ 0x00135188
MOV qword ptr [RBP + -0x50],0x1
LAB_00135188:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x98]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001351fc
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a6bb9
MOV ECX,EAX
LAB_001351b9:
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x001351d1
MOV RAX,qword ptr [RBP + -0x50]
JMP 0x001351d1
LAB_001351c8:
XOR EAX,EAX
JMP 0x001351d1
LAB_001351cc:
MOV EAX,0x1
LAB_001351d1:
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
LAB_001351dd:
CALL 0x0012c77b
JMP 0x0013511a
LAB_001351e7:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00135142
LAB_001351fc:
LEA R14,[RBP + -0x14]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012c798
MOV ECX,dword ptr [R14]
JMP 0x001351b9
|
int8 translog_get_file_max_lsn_stored(uint param_1)
{
char cVar1;
int iVar2;
uint extraout_var;
long lVar3;
int8 uVar4;
uint uVar5;
int1 local_a0 [72];
int8 local_58 [7];
int local_1c;
if (DAT_00d07fc8 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d07f88);
}
else {
translog_get_file_max_lsn_stored_cold_1();
}
if (DAT_00d07fd8 == 0) {
uVar5 = 0;
}
else {
uVar5 = *DAT_00d07fd0;
}
if (DAT_00d07fc8 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d07f88);
if (uVar5 == 0) {
translog_get_horizon();
uVar5 = extraout_var;
}
if (param_1 < uVar5) {
iVar2 = open_logfile_by_number_no_cache(param_1);
if (iVar2 < 0) {
uVar4 = 1;
}
else {
cVar1 = translog_read_file_header(local_58,iVar2);
if (cVar1 != '\0') {
local_58[0] = 1;
}
lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,iVar2,4);
if (lVar3 == 0) {
local_1c = my_close(iVar2,0x10);
}
else {
translog_get_file_max_lsn_stored_cold_2(lVar3,iVar2,&local_1c);
}
uVar4 = 1;
if (local_1c == 0) {
uVar4 = local_58[0];
}
}
}
else {
uVar4 = 0;
}
return uVar4;
}
| |
28,358 | my_mb_wc_utf8mb4_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x68746
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x689c3
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x68773
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x6878a
movl $0x0, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x68800
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x687af
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x689c3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x687cd
movl $0x0, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x688bc
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0x68829
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x689c3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x68867
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x68867
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x68873
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x68873
movl $0x0, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x689b4
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x688e5
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x689c3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6894f
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6894f
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6894f
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x68935
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x6894f
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x68958
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x68958
movl $0x0, -0x4(%rbp)
jmp 0x689c3
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x689c3
jmp 0x689b6
jmp 0x689b8
jmp 0x689ba
jmp 0x689bc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_utf8mb4_quick_0:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_68746
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_689C3
loc_68746:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_68773
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_689C3
loc_68773:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_6878A
mov [rbp+var_4], 0
jmp loc_689C3
loc_6878A:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_68800
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_687AF
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_689C3
loc_687AF:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_687CD
mov [rbp+var_4], 0
jmp loc_689C3
loc_687CD:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_689C3
loc_68800:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_688BC
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_68829
mov [rbp+var_4], 0FFFFFF99h
jmp loc_689C3
loc_68829:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_68867
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_68867
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_68873
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_68873
loc_68867:
mov [rbp+var_4], 0
jmp loc_689C3
loc_68873:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_689C3
loc_688BC:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_689B4
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_688E5
mov [rbp+var_4], 0FFFFFF98h
jmp loc_689C3
loc_688E5:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6894F
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6894F
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6894F
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_68935
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_6894F
loc_68935:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_68958
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_68958
loc_6894F:
mov [rbp+var_4], 0
jmp short loc_689C3
loc_68958:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_689C3
loc_689B4:
jmp short $+2
loc_689B6:
jmp short $+2
loc_689B8:
jmp short $+2
loc_689BA:
jmp short $+2
loc_689BC:
mov [rbp+var_4], 0
loc_689C3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64
&& (a2[2] ^ 0x80) < 64
&& (a2[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a2[1] >= 0x90u)
&& (v4 <= 0xF3u || a2[1] <= 0x8Fu) )
{
*a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00168746
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001689c3
LAB_00168746:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x00168773
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001689c3
LAB_00168773:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x0016878a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001689c3
LAB_0016878a:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x00168800
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001687af
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001689c3
LAB_001687af:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x001687cd
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001689c3
LAB_001687cd:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001689c3
LAB_00168800:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x001688bc
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00168829
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001689c3
LAB_00168829:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00168867
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00168867
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x00168873
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x00168873
LAB_00168867:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001689c3
LAB_00168873:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001689c3
LAB_001688bc:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x001689b4
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001688e5
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x001689c3
LAB_001688e5:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016894f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016894f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016894f
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x00168935
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x0016894f
LAB_00168935:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x00168958
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x00168958
LAB_0016894f:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001689c3
LAB_00168958:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001689c3
LAB_001689b4:
JMP 0x001689b6
LAB_001689b6:
JMP 0x001689b8
LAB_001689b8:
JMP 0x001689ba
LAB_001689ba:
JMP 0x001689bc
LAB_001689bc:
MOV dword ptr [RBP + -0x4],0x0
LAB_001689c3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0x80) {
*param_1 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2[1] ^ 0x80) < 0x40) {
*param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
local_c = 0xffffff99;
}
else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_2[1])))) {
*param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 |
(long)(int)(param_2[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) &&
((bVar1 < 0xf4 || (param_2[1] < 0x90)))) {
*param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc |
(long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
28,359 | coro::ring_buffer<unsigned long, 16ul>::consume_operation::await_ready() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/ring_buffer.hpp | auto await_ready() noexcept -> bool
{
std::unique_lock lk{m_rb.m_mutex};
return m_rb.try_consume_locked(lk, this);
} | O3 | cpp | coro::ring_buffer<unsigned long, 16ul>::consume_operation::await_ready():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x32d8
movq %rsp, %rsi
movb $0x1, 0x8(%rsi)
movq (%rbx), %rdi
movq %rbx, %rdx
callq 0x322e
movl %eax, %ebx
movq %rsp, %rdi
callq 0x32c2
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x3184
| _ZN4coro11ring_bufferImLm16EE17consume_operation11await_readyEv:
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, [rdi]
mov rdi, rsp
mov [rdi], rax
mov byte ptr [rdi+8], 0
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov rsi, rsp
mov byte ptr [rsi+8], 1
mov rdi, [rbx]
mov rdx, rbx
call _ZN4coro11ring_bufferImLm16EE18try_consume_lockedERSt11unique_lockISt5mutexEPNS1_17consume_operationE; coro::ring_buffer<ulong,16ul>::try_consume_locked(std::unique_lock<std::mutex> &,coro::ring_buffer<ulong,16ul>::consume_operation *)
mov ebx, eax
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov eax, ebx
add rsp, 10h
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
| long long coro::ring_buffer<unsigned long,16ul>::consume_operation::await_ready(_QWORD *a1, long long a2)
{
unsigned int v2; // ebx
long long v4; // [rsp+0h] [rbp-18h] BYREF
char v5; // [rsp+8h] [rbp-10h]
v4 = *a1;
v5 = 0;
std::unique_lock<std::mutex>::lock(&v4, a2);
v5 = 1;
v2 = coro::ring_buffer<unsigned long,16ul>::try_consume_locked(*a1, &v4, a1);
std::unique_lock<std::mutex>::~unique_lock(&v4);
return v2;
}
| await_ready:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RDI,RSP
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
LAB_001031a5:
CALL 0x001032d8
MOV RSI,RSP
MOV byte ptr [RSI + 0x8],0x1
MOV RDI,qword ptr [RBX]
MOV RDX,RBX
CALL 0x0010322e
MOV EBX,EAX
MOV RDI,RSP
CALL 0x001032c2
MOV EAX,EBX
ADD RSP,0x10
POP RBX
RET
|
/* coro::ring_buffer<unsigned long, 16ul>::consume_operation::await_ready() */
int4 __thiscall
coro::ring_buffer<unsigned_long,16ul>::consume_operation::await_ready(consume_operation *this)
{
int4 uVar1;
int8 local_18;
int1 local_10;
local_18 = *(int8 *)this;
local_10 = 0;
/* try { // try from 001031a5 to 001031bb has its CatchHandler @ 001031ce */
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_18);
local_10 = 1;
uVar1 = try_consume_locked(*(ring_buffer<unsigned_long,16ul> **)this,(unique_lock *)&local_18,this
);
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_18);
return uVar1;
}
| |
28,360 | ma_crypt_index_post_read_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_index_post_read_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint block_size= share->block_size;
const uint page_used= _ma_get_page_used(share, args->page);
if (res ||
page_used < share->keypage_header ||
page_used >= block_size - CRC_SIZE)
{
res= 1;
my_errno= HA_ERR_DECRYPTION_FAILED;
}
else
{
const uchar *src= args->page;
uchar* dst= args->crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uint head= share->keypage_header;
const uint tail= CRC_SIZE;
const uint32 key_version= _ma_get_key_version(share, src);
/* page_used includes header (but not trailer) */
const uint size= page_used - head;
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - decrypt page */
res= ma_decrypt(share, share->crypt_data,
src + head, dst + head, size, pageno, lsn, key_version);
/* 3 - copy tail */
memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 clear key version to get correct crc */
_ma_store_key_version(share, dst, 0);
}
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
return maria_page_crc_check_index(res, args);
} | O3 | c | ma_crypt_index_post_read_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
testl %edi, %edi
jne 0x51344
movq (%rbx), %r15
movq 0x10(%rbx), %rdx
movl 0x744(%rdx), %r13d
movzwl -0x2(%r15,%r13), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
cmpl %r13d, %r12d
jb 0x51344
movl 0x7bc(%rdx), %ecx
leal -0x4(%rcx), %eax
cmpl %eax, %r12d
jae 0x51344
leaq (%r15,%r13), %rax
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq 0x18(%rbx), %r14
movl 0x8(%rbx), %eax
movl %eax, -0x2c(%rbp)
movzwl (%r15), %eax
shlq $0x20, %rax
movq %rcx, -0x58(%rbp)
movzbl 0x2(%r15), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r15), %eax
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x8(%r15,%r13), %eax
movq %rax, -0x38(%rbp)
subl %r13d, %r12d
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x29080
movq -0x48(%rbp), %rdi
movq 0xc20(%rdi), %rsi
leaq (%r14,%r13), %rcx
movq %rdi, %r13
movq -0x50(%rbp), %rdx
movl %r12d, %r8d
movl -0x2c(%rbp), %r9d
pushq -0x38(%rbp)
pushq -0x40(%rbp)
callq 0x514c0
addq $0x10, %rsp
movl %eax, %r12d
movq -0x58(%rbp), %rdx
movl -0x4(%r15,%rdx), %eax
movl %eax, -0x4(%r14,%rdx)
movl 0x744(%r13), %eax
movl $0x0, -0x8(%r14,%rax)
jmp 0x51355
callq 0xa1afa
movl $0xc0, (%rax)
movl $0x1, %r12d
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x51371
movq (%rbx), %rdi
movq %rax, (%rbx)
movq $0x0, 0x18(%rbx)
callq 0x9ffb6
movl %r12d, %edi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x504f9
| ma_crypt_index_post_read_hook:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
test edi, edi
jnz loc_51344
mov r15, [rbx]
mov rdx, [rbx+10h]
mov r13d, [rdx+744h]
movzx eax, word ptr [r15+r13-2]
rol ax, 8
movzx r12d, ax
cmp r12d, r13d
jb loc_51344
mov ecx, [rdx+7BCh]
lea eax, [rcx-4]
cmp r12d, eax
jnb loc_51344
lea rax, [r15+r13]
mov [rbp+var_50], rax
mov [rbp+var_48], rdx
mov r14, [rbx+18h]
mov eax, [rbx+8]
mov [rbp+var_2C], eax
movzx eax, word ptr [r15]
shl rax, 20h
mov [rbp+var_58], rcx
movzx ecx, byte ptr [r15+2]
shl rcx, 30h
or rcx, rax
mov eax, [r15+3]
or rax, rcx
mov [rbp+var_40], rax
mov eax, [r15+r13-8]
mov [rbp+var_38], rax
sub r12d, r13d
mov rdi, r14
mov rsi, r15
mov rdx, r13
call _memcpy
mov rdi, [rbp+var_48]
mov rsi, [rdi+0C20h]
lea rcx, [r14+r13]
mov r13, rdi
mov rdx, [rbp+var_50]
mov r8d, r12d
mov r9d, [rbp+var_2C]
push [rbp+var_38]
push [rbp+var_40]
call ma_decrypt
add rsp, 10h
mov r12d, eax
mov rdx, [rbp+var_58]
mov eax, [r15+rdx-4]
mov [r14+rdx-4], eax
mov eax, [r13+744h]
mov dword ptr [r14+rax-8], 0
jmp short loc_51355
loc_51344:
call _my_thread_var
mov dword ptr [rax], 0C0h
mov r12d, 1
loc_51355:
mov rax, [rbx+18h]
test rax, rax
jz short loc_51371
mov rdi, [rbx]
mov [rbx], rax
mov qword ptr [rbx+18h], 0
call my_free
loc_51371:
mov edi, r12d
mov rsi, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp maria_page_crc_check_index
| char ma_crypt_index_post_read_hook(long long a1, long long a2)
{
unsigned __int16 *v2; // r15
long long v3; // rdx
long long v4; // r13
unsigned int v5; // r12d
long long v6; // r14
int v7; // r12d
long long v8; // rax
unsigned __int16 *v9; // rdi
long long v11; // [rsp+8h] [rbp-58h]
long long v12; // [rsp+18h] [rbp-48h]
unsigned long long v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+28h] [rbp-38h]
int v15; // [rsp+34h] [rbp-2Ch]
if ( (_DWORD)a1
|| (v2 = *(unsigned __int16 **)a2,
v3 = *(_QWORD *)(a2 + 16),
v4 = *(unsigned int *)(v3 + 1860),
v5 = (unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)a2 + v4 - 2), 8),
v5 < (unsigned int)v4)
|| v5 >= *(_DWORD *)(v3 + 1980) - 4 )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 192;
v7 = 1;
}
else
{
v12 = *(_QWORD *)(a2 + 16);
v6 = *(_QWORD *)(a2 + 24);
v15 = *(_DWORD *)(a2 + 8);
v11 = *(unsigned int *)(v3 + 1980);
v13 = ((unsigned long long)*v2 << 32) | ((unsigned long long)*((unsigned __int8 *)v2 + 2) << 48) | *(unsigned int *)((char *)v2 + 3);
v14 = *(_DWORD *)((char *)v2 + v4 - 8);
memcpy(v6, v2, v4);
v7 = ma_decrypt(
v12,
*(_QWORD *)(v12 + 3104),
(int)v2 + (int)v4,
(int)v6 + (int)v4,
v5 - (unsigned int)v4,
v15,
v13,
v14);
*(_DWORD *)(v6 + v11 - 4) = *(_DWORD *)((char *)v2 + v11 - 4);
*(_DWORD *)(v6 + *(unsigned int *)(v12 + 1860) - 8) = 0;
}
v8 = *(_QWORD *)(a2 + 24);
if ( v8 )
{
v9 = *(unsigned __int16 **)a2;
*(_QWORD *)a2 = v8;
*(_QWORD *)(a2 + 24) = 0LL;
my_free(v9);
}
return maria_page_crc_check_index(v7, a2);
}
| ma_crypt_index_post_read_hook:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
TEST EDI,EDI
JNZ 0x00151344
MOV R15,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x10]
MOV R13D,dword ptr [RDX + 0x744]
MOVZX EAX,word ptr [R15 + R13*0x1 + -0x2]
ROL AX,0x8
MOVZX R12D,AX
CMP R12D,R13D
JC 0x00151344
MOV ECX,dword ptr [RDX + 0x7bc]
LEA EAX,[RCX + -0x4]
CMP R12D,EAX
JNC 0x00151344
LEA RAX,[R15 + R13*0x1]
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],RDX
MOV R14,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [RBX + 0x8]
MOV dword ptr [RBP + -0x2c],EAX
MOVZX EAX,word ptr [R15]
SHL RAX,0x20
MOV qword ptr [RBP + -0x58],RCX
MOVZX ECX,byte ptr [R15 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R15 + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [R15 + R13*0x1 + -0x8]
MOV qword ptr [RBP + -0x38],RAX
SUB R12D,R13D
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL 0x00129080
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RDI + 0xc20]
LEA RCX,[R14 + R13*0x1]
MOV R13,RDI
MOV RDX,qword ptr [RBP + -0x50]
MOV R8D,R12D
MOV R9D,dword ptr [RBP + -0x2c]
PUSH qword ptr [RBP + -0x38]
PUSH qword ptr [RBP + -0x40]
CALL 0x001514c0
ADD RSP,0x10
MOV R12D,EAX
MOV RDX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [R15 + RDX*0x1 + -0x4]
MOV dword ptr [R14 + RDX*0x1 + -0x4],EAX
MOV EAX,dword ptr [R13 + 0x744]
MOV dword ptr [R14 + RAX*0x1 + -0x8],0x0
JMP 0x00151355
LAB_00151344:
CALL 0x001a1afa
MOV dword ptr [RAX],0xc0
MOV R12D,0x1
LAB_00151355:
MOV RAX,qword ptr [RBX + 0x18]
TEST RAX,RAX
JZ 0x00151371
MOV RDI,qword ptr [RBX]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x18],0x0
CALL 0x0019ffb6
LAB_00151371:
MOV EDI,R12D
MOV RSI,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001504f9
|
void ma_crypt_index_post_read_hook(int param_1,long *param_2)
{
ushort uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
ushort *__src;
long lVar5;
void *__dest;
long lVar6;
ushort uVar7;
ushort uVar8;
int4 uVar9;
int4 *puVar10;
ulong __n;
if (param_1 == 0) {
__src = (ushort *)*param_2;
lVar5 = param_2[2];
uVar2 = *(uint *)(lVar5 + 0x744);
__n = (ulong)uVar2;
uVar8 = *(ushort *)((long)__src + (__n - 2));
uVar8 = uVar8 << 8 | uVar8 >> 8;
if ((uVar2 <= uVar8) && (uVar3 = *(uint *)(lVar5 + 0x7bc), (uint)uVar8 < uVar3 - 4)) {
__dest = (void *)param_2[3];
lVar6 = param_2[1];
uVar1 = *__src;
uVar7 = __src[1];
uVar4 = *(uint *)((long)__src + 3);
uVar9 = *(int4 *)((long)__src + (__n - 8));
memcpy(__dest,__src,__n);
uVar9 = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + __n,(long)__dest + __n,
uVar8 - uVar2,(int)lVar6,
(ulong)uVar4 | (ulong)(byte)uVar7 << 0x30 | (ulong)uVar1 << 0x20,uVar9);
*(int4 *)((long)__dest + ((ulong)uVar3 - 4)) =
*(int4 *)((long)__src + ((ulong)uVar3 - 4));
*(int4 *)((long)__dest + ((ulong)*(uint *)(lVar5 + 0x744) - 8)) = 0;
goto LAB_00151355;
}
}
puVar10 = (int4 *)_my_thread_var();
*puVar10 = 0xc0;
uVar9 = 1;
LAB_00151355:
if (param_2[3] != 0) {
lVar5 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar5);
}
maria_page_crc_check_index(uVar9,param_2);
return;
}
| |
28,361 | ps_fetch_int64 | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_int64(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch(r_param->buffer_type)
{
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break;
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break; */
case MYSQL_TYPE_LONGLONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 8);
break;
default:
{
longlong sval= (longlong)sint8korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(ulonglong) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 8;
}
break;
}
} | O3 | c | ps_fetch_int64:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpl $0x8, 0x60(%rdi)
jne 0x2435c
movq %rbx, %rdx
movl $0x8, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x236e8
movq (%rbx), %rax
movq (%rax), %rdx
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
callq 0x24dc3
addq $0x8, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ps_fetch_int64:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
cmp dword ptr [rdi+60h], 8
jnz short loc_2435C
mov rdx, rbx
mov ecx, 8
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_2435C:
mov rax, [rbx]
mov rdx, [rax]
mov ecx, [rsi+64h]
and ecx, 20h
call convert_from_long
add qword ptr [rbx], 8
add rsp, 8
pop rbx
pop rbp
retn
| long long ps_fetch_int64(long long a1, long long a2, _BYTE **a3)
{
long long result; // rax
if ( *(_DWORD *)(a1 + 96) == 8 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 8u);
result = convert_from_long(a1, a2, *(_QWORD *)*a3, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 8;
return result;
}
| ps_fetch_int64:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
CMP dword ptr [RDI + 0x60],0x8
JNZ 0x0012435c
MOV RDX,RBX
MOV ECX,0x8
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001236e8
LAB_0012435c:
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
CALL 0x00124dc3
ADD qword ptr [RBX],0x8
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int64(long param_1,long param_2,long *param_3)
{
if (*(int *)(param_1 + 0x60) == 8) {
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,8);
return;
}
convert_from_long(param_1,param_2,*(int8 *)*param_3,*(uint *)(param_2 + 100) & 0x20);
*param_3 = *param_3 + 8;
return;
}
| |
28,362 | translog_read_record | eloqsql/storage/maria/ma_loghandler.c | translog_size_t translog_read_record(LSN lsn,
translog_size_t offset,
translog_size_t length,
uchar *buffer,
TRANSLOG_READER_DATA *data)
{
translog_size_t requested_length= length;
translog_size_t end= offset + length;
TRANSLOG_READER_DATA internal_data;
DBUG_ENTER("translog_read_record");
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (data == NULL)
{
DBUG_ASSERT(lsn != LSN_IMPOSSIBLE);
data= &internal_data;
}
if (lsn ||
(offset < data->current_offset &&
!(offset < data->read_header && offset + length < data->read_header)))
{
if (translog_init_reader_data(lsn, data))
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Offset: %lu length: %lu "
"Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " "
"Lst: " LSN_FMT " Offset: %u(%x) fixed: %d",
(ulong) offset, (ulong) length,
LSN_IN_PARTS(data->scanner.page_addr),
LSN_IN_PARTS(data->scanner.horizon),
LSN_IN_PARTS(data->scanner.last_file_page),
(uint) data->scanner.page_offset,
(uint) data->scanner.page_offset,
data->scanner.fixed_horizon));
if (offset < data->read_header)
{
uint16 len= MY_MIN(data->read_header, end) - offset;
DBUG_PRINT("info",
("enter header offset: %lu length: %lu",
(ulong) offset, (ulong) length));
memcpy(buffer, data->header.header + offset, len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
/* TODO: find first page which we should read by offset */
/* read the record chunk by chunk */
for(;;)
{
uint page_end= data->current_offset + data->chunk_size;
DBUG_PRINT("info",
("enter body offset: %lu curr: %lu "
"length: %lu page_end: %lu",
(ulong) offset, (ulong) data->current_offset, (ulong) length,
(ulong) page_end));
if (offset < page_end)
{
uint len= page_end - offset;
set_if_smaller(len, length); /* in case we read beyond record's end */
DBUG_ASSERT(offset >= data->current_offset);
memcpy(buffer,
data->scanner.page + data->body_offset +
(offset - data->current_offset), len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
if (translog_record_read_next_chunk(data))
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length - length);
}
}
} | O0 | c | translog_read_record:
pushq %rbp
movq %rsp, %rbp
subq $0x24d0, %rsp # imm = 0x24D0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2498(%rbp)
movl %esi, -0x249c(%rbp)
movl %edx, -0x24a0(%rbp)
movq %rcx, -0x24a8(%rbp)
movq %r8, -0x24b0(%rbp)
movl -0x24a0(%rbp), %eax
movl %eax, -0x24b4(%rbp)
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movl %eax, -0x24b8(%rbp)
jmp 0x54a29
cmpq $0x0, -0x24b0(%rbp)
jne 0x54a45
jmp 0x54a35
jmp 0x54a37
leaq -0x2488(%rbp), %rax
movq %rax, -0x24b0(%rbp)
cmpq $0x0, -0x2498(%rbp)
jne 0x54a9a
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
cmpl 0x246c(%rcx), %eax
jae 0x54ac4
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x54a9a
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jb 0x54ac4
movq -0x2498(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
callq 0x56e20
cmpb $0x0, %al
je 0x54ac2
jmp 0x54ab3
movl $0x0, -0x248c(%rbp)
jmp 0x54d17
jmp 0x54ac4
jmp 0x54ac6
jmp 0x54ac8
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x54bc7
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
cmpl -0x24b8(%rbp), %eax
jae 0x54b10
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
movl %eax, -0x24c8(%rbp)
jmp 0x54b1c
movl -0x24b8(%rbp), %eax
movl %eax, -0x24c8(%rbp)
movl -0x24c8(%rbp), %eax
subl -0x249c(%rbp), %eax
movw %ax, -0x24ba(%rbp)
jmp 0x54b31
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
addq $0x18, %rsi
movl -0x249c(%rbp), %eax
addq %rax, %rsi
movzwl -0x24ba(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movzwl -0x24ba(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x54b95
movq -0x24b0(%rbp), %rdi
callq 0x56f10
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x54d17
movzwl -0x24ba(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movzwl -0x24ba(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x54bc5
jmp 0x54bc7
jmp 0x54bc9
movq -0x24b0(%rbp), %rax
movl 0x246c(%rax), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2472(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x24c0(%rbp)
jmp 0x54bee
movl -0x249c(%rbp), %eax
cmpl -0x24c0(%rbp), %eax
jae 0x54ce2
movl -0x24c0(%rbp), %eax
subl -0x249c(%rbp), %eax
movl %eax, -0x24c4(%rbp)
movl -0x24c4(%rbp), %eax
cmpl -0x24a0(%rbp), %eax
jbe 0x54c2c
movl -0x24a0(%rbp), %eax
movl %eax, -0x24c4(%rbp)
jmp 0x54c2e
jmp 0x54c30
jmp 0x54c32
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rax
movq 0x2450(%rax), %rsi
movq -0x24b0(%rbp), %rax
movl 0x2468(%rax), %eax
addq %rax, %rsi
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
subl 0x246c(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x24c4(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movl -0x24c4(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x54cb3
movq -0x24b0(%rbp), %rdi
callq 0x56f10
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x54d17
movl -0x24c4(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movl -0x24c4(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x54ce0
jmp 0x54ce2
movq -0x24b0(%rbp), %rdi
callq 0x56f40
cmpb $0x0, %al
je 0x54d12
movq -0x24b0(%rbp), %rdi
callq 0x56f10
movl -0x24b4(%rbp), %eax
subl -0x24a0(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x54d17
jmp 0x54bc9
movl -0x248c(%rbp), %eax
movl %eax, -0x24cc(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x54d44
movl -0x24cc(%rbp), %eax
addq $0x24d0, %rsp # imm = 0x24D0
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| translog_read_record:
push rbp
mov rbp, rsp
sub rsp, 24D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2498], rdi
mov [rbp+var_249C], esi
mov [rbp+var_24A0], edx
mov [rbp+var_24A8], rcx
mov [rbp+var_24B0], r8
mov eax, [rbp+var_24A0]
mov [rbp+var_24B4], eax
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov [rbp+var_24B8], eax
jmp short $+2
loc_54A29:
cmp [rbp+var_24B0], 0
jnz short loc_54A45
jmp short $+2
loc_54A35:
jmp short $+2
loc_54A37:
lea rax, [rbp+var_2488]
mov [rbp+var_24B0], rax
loc_54A45:
cmp [rbp+var_2498], 0
jnz short loc_54A9A
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
cmp eax, [rcx+246Ch]
jnb short loc_54AC4
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb short loc_54A9A
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jb short loc_54AC4
loc_54A9A:
mov rdi, [rbp+var_2498]
mov rsi, [rbp+var_24B0]
call translog_init_reader_data
cmp al, 0
jz short loc_54AC2
jmp short $+2
loc_54AB3:
mov [rbp+var_248C], 0
jmp loc_54D17
loc_54AC2:
jmp short $+2
loc_54AC4:
jmp short $+2
loc_54AC6:
jmp short $+2
loc_54AC8:
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb loc_54BC7
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
cmp eax, [rbp+var_24B8]
jnb short loc_54B10
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
mov [rbp+var_24C8], eax
jmp short loc_54B1C
loc_54B10:
mov eax, [rbp+var_24B8]
mov [rbp+var_24C8], eax
loc_54B1C:
mov eax, [rbp+var_24C8]
sub eax, [rbp+var_249C]
mov [rbp+var_24BA], ax
jmp short $+2
loc_54B31:
mov rdi, [rbp+var_24A8]
mov rsi, [rbp+var_24B0]
add rsi, 18h
mov eax, [rbp+var_249C]
add rsi, rax
movzx eax, [rbp+var_24BA]
mov edx, eax
call _memcpy
movzx ecx, [rbp+var_24BA]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_54B95
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp loc_54D17
loc_54B95:
movzx eax, [rbp+var_24BA]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
movzx ecx, [rbp+var_24BA]
mov rax, [rbp+var_24A8]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_54BC5:
jmp short $+2
loc_54BC7:
jmp short $+2
loc_54BC9:
mov rax, [rbp+var_24B0]
mov eax, [rax+246Ch]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2472h]
add eax, ecx
mov [rbp+var_24C0], eax
jmp short $+2
loc_54BEE:
mov eax, [rbp+var_249C]
cmp eax, [rbp+var_24C0]
jnb loc_54CE2
mov eax, [rbp+var_24C0]
sub eax, [rbp+var_249C]
mov [rbp+var_24C4], eax
mov eax, [rbp+var_24C4]
cmp eax, [rbp+var_24A0]
jbe short loc_54C2C
mov eax, [rbp+var_24A0]
mov [rbp+var_24C4], eax
loc_54C2C:
jmp short $+2
loc_54C2E:
jmp short $+2
loc_54C30:
jmp short $+2
loc_54C32:
mov rdi, [rbp+var_24A8]
mov rax, [rbp+var_24B0]
mov rsi, [rax+2450h]
mov rax, [rbp+var_24B0]
mov eax, [rax+2468h]
add rsi, rax
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
sub eax, [rcx+246Ch]
mov eax, eax
add rsi, rax
mov eax, [rbp+var_24C4]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_24C4]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_54CB3
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp short loc_54D17
loc_54CB3:
mov eax, [rbp+var_24C4]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
mov ecx, [rbp+var_24C4]
mov rax, [rbp+var_24A8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_54CE0:
jmp short $+2
loc_54CE2:
mov rdi, [rbp+var_24B0]
call translog_record_read_next_chunk
cmp al, 0
jz short loc_54D12
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
sub eax, [rbp+var_24A0]
mov [rbp+var_248C], eax
jmp short loc_54D17
loc_54D12:
jmp loc_54BC9
loc_54D17:
mov eax, [rbp+var_248C]
mov [rbp+var_24CC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_54D44
mov eax, [rbp+var_24CC]
add rsp, 24D0h
pop rbp
retn
loc_54D44:
call ___stack_chk_fail
| long long translog_read_record(long long a1, unsigned int a2, unsigned int a3, long long a4, char *a5)
{
__int16 v6; // [rsp+8h] [rbp-24C8h]
unsigned int v7; // [rsp+Ch] [rbp-24C4h]
unsigned int v8; // [rsp+10h] [rbp-24C0h]
unsigned __int16 v9; // [rsp+16h] [rbp-24BAh]
unsigned int v10; // [rsp+18h] [rbp-24B8h]
char *v12; // [rsp+20h] [rbp-24B0h]
unsigned int v14; // [rsp+30h] [rbp-24A0h]
unsigned int v15; // [rsp+34h] [rbp-249Ch]
char v17; // [rsp+48h] [rbp-2488h] BYREF
unsigned long long v18; // [rsp+24C8h] [rbp-8h]
v18 = __readfsqword(0x28u);
v15 = a2;
v14 = a3;
v12 = a5;
v10 = a3 + a2;
if ( !a5 )
v12 = &v17;
if ( (a1
|| a2 < *((_DWORD *)v12 + 2331)
&& (a2 >= *((unsigned __int16 *)v12 + 4664) || a3 + a2 >= *((unsigned __int16 *)v12 + 4664)))
&& (unsigned __int8)translog_init_reader_data(a1, v12) )
{
return 0;
}
else
{
if ( a2 >= *((unsigned __int16 *)v12 + 4664) )
goto LABEL_16;
if ( *((unsigned __int16 *)v12 + 4664) >= v10 )
v6 = v10;
else
v6 = *((_WORD *)v12 + 4664);
v9 = v6 - a2;
memcpy(a4, &v12[a2 + 24], (unsigned __int16)(v6 - a2));
v14 -= (unsigned __int16)(v6 - a2);
if ( v14 )
{
v15 = a2 + v9;
a4 += v9;
do
{
LABEL_16:
v8 = *((unsigned __int16 *)v12 + 4665) + *((_DWORD *)v12 + 2331);
if ( v15 < v8 )
{
v7 = v8 - v15;
if ( v8 - v15 > v14 )
v7 = v14;
memcpy(a4, v15 - *((_DWORD *)v12 + 2331) + *((unsigned int *)v12 + 2330) + *((_QWORD *)v12 + 1162), v7);
v14 -= v7;
if ( !v14 )
goto LABEL_14;
v15 += v7;
a4 += v7;
}
}
while ( !(unsigned __int8)translog_record_read_next_chunk(v12) );
translog_destroy_reader_data(v12);
return a3 - v14;
}
else
{
LABEL_14:
translog_destroy_reader_data(v12);
return a3;
}
}
}
| translog_read_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x24d0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2498],RDI
MOV dword ptr [RBP + -0x249c],ESI
MOV dword ptr [RBP + -0x24a0],EDX
MOV qword ptr [RBP + -0x24a8],RCX
MOV qword ptr [RBP + -0x24b0],R8
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b4],EAX
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b8],EAX
JMP 0x00154a29
LAB_00154a29:
CMP qword ptr [RBP + -0x24b0],0x0
JNZ 0x00154a45
JMP 0x00154a35
LAB_00154a35:
JMP 0x00154a37
LAB_00154a37:
LEA RAX,[RBP + -0x2488]
MOV qword ptr [RBP + -0x24b0],RAX
LAB_00154a45:
CMP qword ptr [RBP + -0x2498],0x0
JNZ 0x00154a9a
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
CMP EAX,dword ptr [RCX + 0x246c]
JNC 0x00154ac4
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x00154a9a
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JC 0x00154ac4
LAB_00154a9a:
MOV RDI,qword ptr [RBP + -0x2498]
MOV RSI,qword ptr [RBP + -0x24b0]
CALL 0x00156e20
CMP AL,0x0
JZ 0x00154ac2
JMP 0x00154ab3
LAB_00154ab3:
MOV dword ptr [RBP + -0x248c],0x0
JMP 0x00154d17
LAB_00154ac2:
JMP 0x00154ac4
LAB_00154ac4:
JMP 0x00154ac6
LAB_00154ac6:
JMP 0x00154ac8
LAB_00154ac8:
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x00154bc7
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
CMP EAX,dword ptr [RBP + -0x24b8]
JNC 0x00154b10
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
MOV dword ptr [RBP + -0x24c8],EAX
JMP 0x00154b1c
LAB_00154b10:
MOV EAX,dword ptr [RBP + -0x24b8]
MOV dword ptr [RBP + -0x24c8],EAX
LAB_00154b1c:
MOV EAX,dword ptr [RBP + -0x24c8]
SUB EAX,dword ptr [RBP + -0x249c]
MOV word ptr [RBP + -0x24ba],AX
JMP 0x00154b31
LAB_00154b31:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RSI,qword ptr [RBP + -0x24b0]
ADD RSI,0x18
MOV EAX,dword ptr [RBP + -0x249c]
ADD RSI,RAX
MOVZX EAX,word ptr [RBP + -0x24ba]
MOV EDX,EAX
CALL 0x0012a090
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x00154b95
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00156f10
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x00154d17
LAB_00154b95:
MOVZX EAX,word ptr [RBP + -0x24ba]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV RAX,qword ptr [RBP + -0x24a8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x00154bc5
LAB_00154bc5:
JMP 0x00154bc7
LAB_00154bc7:
JMP 0x00154bc9
LAB_00154bc9:
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x246c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2472]
ADD EAX,ECX
MOV dword ptr [RBP + -0x24c0],EAX
JMP 0x00154bee
LAB_00154bee:
MOV EAX,dword ptr [RBP + -0x249c]
CMP EAX,dword ptr [RBP + -0x24c0]
JNC 0x00154ce2
MOV EAX,dword ptr [RBP + -0x24c0]
SUB EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x24c4],EAX
MOV EAX,dword ptr [RBP + -0x24c4]
CMP EAX,dword ptr [RBP + -0x24a0]
JBE 0x00154c2c
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24c4],EAX
LAB_00154c2c:
JMP 0x00154c2e
LAB_00154c2e:
JMP 0x00154c30
LAB_00154c30:
JMP 0x00154c32
LAB_00154c32:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV RSI,qword ptr [RAX + 0x2450]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x2468]
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
SUB EAX,dword ptr [RCX + 0x246c]
MOV EAX,EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x24c4]
MOV EDX,EAX
CALL 0x0012a090
MOV ECX,dword ptr [RBP + -0x24c4]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x00154cb3
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00156f10
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x00154d17
LAB_00154cb3:
MOV EAX,dword ptr [RBP + -0x24c4]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOV ECX,dword ptr [RBP + -0x24c4]
MOV RAX,qword ptr [RBP + -0x24a8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x00154ce0
LAB_00154ce0:
JMP 0x00154ce2
LAB_00154ce2:
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00156f40
CMP AL,0x0
JZ 0x00154d12
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00156f10
MOV EAX,dword ptr [RBP + -0x24b4]
SUB EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x00154d17
LAB_00154d12:
JMP 0x00154bc9
LAB_00154d17:
MOV EAX,dword ptr [RBP + -0x248c]
MOV dword ptr [RBP + -0x24cc],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00154d44
MOV EAX,dword ptr [RBP + -0x24cc]
ADD RSP,0x24d0
POP RBP
RET
LAB_00154d44:
CALL 0x0012a270
|
uint translog_read_record(long param_1,uint param_2,uint param_3,void *param_4,int1 *param_5)
{
char cVar1;
ushort uVar2;
long in_FS_OFFSET;
uint local_24d0;
uint local_24cc;
int1 *local_24b8;
void *local_24b0;
uint local_24a8;
uint local_24a4;
uint local_2494;
int1 local_2490 [9344];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_24d0 = param_2 + param_3;
local_24b8 = param_5;
if (param_5 == (int1 *)0x0) {
local_24b8 = local_2490;
}
if (((param_1 == 0) &&
((*(uint *)(local_24b8 + 0x246c) <= param_2 ||
((param_2 < *(ushort *)(local_24b8 + 0x2470) &&
(param_2 + param_3 < (uint)*(ushort *)(local_24b8 + 0x2470))))))) ||
(cVar1 = translog_init_reader_data(param_1,local_24b8), cVar1 == '\0')) {
local_24b0 = param_4;
local_24a8 = param_3;
local_24a4 = param_2;
local_2494 = param_3;
if (param_2 < *(ushort *)(local_24b8 + 0x2470)) {
if (*(ushort *)(local_24b8 + 0x2470) < local_24d0) {
local_24d0 = (uint)*(ushort *)(local_24b8 + 0x2470);
}
uVar2 = (short)local_24d0 - (short)param_2;
memcpy(param_4,local_24b8 + (ulong)param_2 + 0x18,(ulong)uVar2);
local_24a8 = param_3 - uVar2;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_00154d17;
}
local_24a4 = uVar2 + param_2;
local_24b0 = (void *)((long)param_4 + (long)(int)(uint)uVar2);
}
do {
if (local_24a4 < *(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) {
local_24cc = (*(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) -
local_24a4;
if (local_24a8 < local_24cc) {
local_24cc = local_24a8;
}
memcpy(local_24b0,
(void *)(*(long *)(local_24b8 + 0x2450) + (ulong)*(uint *)(local_24b8 + 0x2468) +
(ulong)(local_24a4 - *(int *)(local_24b8 + 0x246c))),(ulong)local_24cc);
local_24a8 = local_24a8 - local_24cc;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_00154d17;
}
local_24a4 = local_24cc + local_24a4;
local_24b0 = (void *)((long)local_24b0 + (ulong)local_24cc);
}
cVar1 = translog_record_read_next_chunk(local_24b8);
} while (cVar1 == '\0');
translog_destroy_reader_data(local_24b8);
local_2494 = param_3 - local_24a8;
}
else {
local_2494 = 0;
}
LAB_00154d17:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2494;
}
| |
28,363 | spdlog::logger::err_handler_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger-inl.h | SPDLOG_INLINE void logger::err_handler_(const std::string &msg) {
if (custom_err_handler_) {
custom_err_handler_(msg);
} else {
using std::chrono::system_clock;
static std::mutex mutex;
static std::chrono::system_clock::time_point last_report_time;
static size_t err_counter = 0;
std::lock_guard<std::mutex> lk{mutex};
auto now = system_clock::now();
err_counter++;
if (now - last_report_time < std::chrono::seconds(1)) {
return;
}
last_report_time = now;
auto tm_time = details::os::localtime(system_clock::to_time_t(now));
char date_buf[64];
std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time);
#if defined(USING_R) && defined(R_R_H) // if in R environment
REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(),
msg.c_str());
#else
std::fprintf(stderr, "[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf,
name().c_str(), msg.c_str());
#endif
}
} | O0 | c | spdlog::logger::err_handler_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x48, %rdi
callq 0x7c530
testb $0x1, %al
jne 0x79213
jmp 0x7922e
movq 0x38(%rsp), %rdi
addq $0x48, %rdi
movq 0x108(%rsp), %rsi
callq 0x7d8c0
jmp 0x79418
leaq 0x1578cb(%rip), %rsi # 0x1d0b00
leaq 0x100(%rsp), %rdi
callq 0x390b0
callq 0x15080
movq %rax, 0xf8(%rsp)
movq 0x1578da(%rip), %rax # 0x1d0b30
incq %rax
movq %rax, 0x1578d0(%rip) # 0x1d0b30
leaq 0x1578c1(%rip), %rsi # 0x1d0b28
leaq 0xf8(%rsp), %rdi
callq 0x21fd0
movq %rax, 0x30(%rsp)
jmp 0x7927b
movq 0x30(%rsp), %rax
movq %rax, 0xe8(%rsp)
movl $0x1, 0xcc(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x7d9b0
jmp 0x792aa
leaq 0xe8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x7d900
movb %al, 0x2f(%rsp)
jmp 0x792c5
movb 0x2f(%rsp), %al
movb %al, 0xf7(%rsp)
leaq 0xcb(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x36450
movzbl 0xf7(%rsp), %edi
callq 0x5b380
testb $0x1, %al
jne 0x792f4
jmp 0x7932a
movl $0x1, 0xc4(%rsp)
jmp 0x793fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x390e0
jmp 0x79420
movq 0xf8(%rsp), %rax
movq %rax, 0x1577ef(%rip) # 0x1d0b28
leaq 0xf8(%rsp), %rdi
callq 0x7d9d0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x757f0
leaq 0x40(%rsp), %rdi
movl $0x40, %esi
leaq 0xd6963(%rip), %rdx # 0x14fcd7
leaq 0x88(%rsp), %rcx
callq 0x155f0
movq 0x38(%rsp), %rdi
movq 0x156bf3(%rip), %rax # 0x1cff80
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x157794(%rip), %rax # 0x1d0b30
movq %rax, 0x10(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x76b10
movq %rax, %rdi
callq 0x20e00
movq %rax, 0x20(%rsp)
movq 0x108(%rsp), %rdi
callq 0x20e00
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq %rax, %r9
leaq 0xd6901(%rip), %rsi # 0x14fce9
movb $0x0, %al
callq 0x15b40
movl $0x0, 0xc4(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x390e0
movl 0xc4(%rsp), %eax
testl %eax, %eax
je 0x79416
jmp 0x79414
jmp 0x79418
jmp 0x79418
addq $0x118, %rsp # imm = 0x118
retq
movq 0xe0(%rsp), %rdi
callq 0x15dd0
nopl (%rax)
| _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 118h
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_10], rsi
mov rdi, [rsp+118h+var_8]
mov [rsp+118h+var_E0], rdi
add rdi, 48h ; 'H'
call _ZNKSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcvbEv; std::function<void ()(std::string const&)>::operator bool(void)
test al, 1
jnz short loc_79213
jmp short loc_7922E
loc_79213:
mov rdi, [rsp+118h+var_E0]
add rdi, 48h ; 'H'
mov rsi, [rsp+118h+var_10]
call _ZNKSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEclES7_; std::function<void ()(std::string const&)>::operator()(std::string const&)
jmp loc_79418
loc_7922E:
lea rsi, _ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5mutex; spdlog::logger::err_handler_(std::string const&)::mutex
lea rdi, [rsp+118h+var_18]; this
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rsp+118h+var_20], rax
mov rax, cs:_ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11err_counter; spdlog::logger::err_handler_(std::string const&)::err_counter
inc rax
mov cs:_ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11err_counter, rax; spdlog::logger::err_handler_(std::string const&)::err_counter
lea rsi, _ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE16last_report_time; spdlog::logger::err_handler_(std::string const&)::last_report_time
lea rdi, [rsp+118h+var_20]
call _ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE; std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rsp+118h+var_E8], rax
jmp short $+2
loc_7927B:
mov rax, [rsp+118h+var_E8]
mov [rsp+118h+var_30], rax
mov [rsp+118h+var_4C], 1
lea rdi, [rsp+118h+var_48]
lea rsi, [rsp+118h+var_4C]
call _ZNSt6chrono8durationIlSt5ratioILl1ELl1EEEC2IivEERKT_; std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(int const&)
jmp short $+2
loc_792AA:
lea rdi, [rsp+118h+var_30]
lea rsi, [rsp+118h+var_48]
call _ZNSt6chronossIlSt5ratioILl1ELl1000000000EElS1_ILl1ELl1EEQ20three_way_comparableINSt11common_typeIJT_T1_EE4typeEEEEDaRKNS_8durationIS5_T0_EERKNS9_IS6_T2_EE
mov [rsp+118h+var_E9], al
jmp short $+2
loc_792C5:
mov al, [rsp+118h+var_E9]
mov [rsp+118h+var_21], al
lea rdi, [rsp+118h+var_4D]
xor eax, eax
mov esi, eax
call _ZNSt9__cmp_cat8__unspecC2EPS0_; std::__cmp_cat::__unspec::__unspec(std::__cmp_cat::__unspec*)
movzx edi, [rsp+118h+var_21]
call _ZStltSt15strong_orderingNSt9__cmp_cat8__unspecE; std::operator<(std::strong_ordering,std::__cmp_cat::__unspec)
test al, 1
jnz short loc_792F4
jmp short loc_7932A
loc_792F4:
mov [rsp+118h+var_54], 1
jmp loc_793FA
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
lea rdi, [rsp+arg_F8]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_79420
loc_7932A:
mov rax, [rsp+118h+var_20]
mov cs:_ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE16last_report_time, rax; spdlog::logger::err_handler_(std::string const&)::last_report_time
lea rdi, [rsp+118h+var_20]
call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rsp+118h+var_98], rax
lea rdi, [rsp+118h+var_90]; this
lea rsi, [rsp+118h+var_98]; __int64 *
call _ZN6spdlog7details2os9localtimeERKl; spdlog::details::os::localtime(long const&)
lea rdi, [rsp+118h+var_D8]
mov esi, 40h ; '@'
lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S"
lea rcx, [rsp+118h+var_90]
call _strftime
mov rdi, [rsp+118h+var_E0]
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+118h+var_110], rax
mov rax, cs:_ZZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11err_counter; spdlog::logger::err_handler_(std::string const&)::err_counter
mov [rsp+118h+var_108], rax
lea rax, [rsp+118h+var_D8]
mov [rsp+118h+var_100], rax
call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void)
mov rdi, rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rsp+118h+var_F8], rax
mov rdi, [rsp+118h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+118h+var_110]
mov rdx, [rsp+118h+var_108]
mov rcx, [rsp+118h+var_100]
mov r8, [rsp+118h+var_F8]
mov r9, rax
lea rsi, aLogError04zuSS; "[*** LOG ERROR #%04zu ***] [%s] [%s] %s"...
mov al, 0
call _fprintf
mov [rsp+118h+var_54], 0
loc_793FA:
lea rdi, [rsp+118h+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov eax, [rsp+118h+var_54]
test eax, eax
jz short loc_79416
jmp short $+2
loc_79414:
jmp short loc_79418
loc_79416:
jmp short $+2
loc_79418:
add rsp, 118h
retn
loc_79420:
mov rdi, [rsp+arg_D8]
call __Unwind_Resume
| long long spdlog::logger::err_handler_(long long a1, long long a2)
{
long long v3; // rax
const char *v4; // rax
long long v5; // [rsp+8h] [rbp-110h]
long long v6; // [rsp+10h] [rbp-108h]
const char *v7; // [rsp+20h] [rbp-F8h]
char v8[64]; // [rsp+40h] [rbp-D8h] BYREF
long long v9; // [rsp+80h] [rbp-98h] BYREF
_BYTE v10[60]; // [rsp+88h] [rbp-90h] BYREF
unsigned int v11; // [rsp+C4h] [rbp-54h]
int v12; // [rsp+CCh] [rbp-4Ch] BYREF
_BYTE v13[24]; // [rsp+D0h] [rbp-48h] BYREF
long long v14; // [rsp+E8h] [rbp-30h] BYREF
char v15; // [rsp+F7h] [rbp-21h]
long long v16; // [rsp+F8h] [rbp-20h] BYREF
std::mutex *v17; // [rsp+100h] [rbp-18h] BYREF
long long v18; // [rsp+108h] [rbp-10h]
long long v19; // [rsp+110h] [rbp-8h]
v19 = a1;
v18 = a2;
if ( (std::function<void ()(std::string const&)>::operator bool(a1 + 72) & 1) != 0 )
return std::function<void ()(std::string const&)>::operator()(a1 + 72, v18);
std::lock_guard<std::mutex>::lock_guard(&v17, (std::mutex *)&spdlog::logger::err_handler_(std::string const&)::mutex);
v16 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)&v17);
++spdlog::logger::err_handler_(std::string const&)::err_counter;
v14 = std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(
(long long)&v16,
(long long)&spdlog::logger::err_handler_(std::string const&)::last_report_time);
v12 = 1;
std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(v13, &v12);
v15 = ZNSt6chronossIlSt5ratioILl1ELl1000000000EElS1_ILl1ELl1EEQ20three_way_comparableINSt11common_typeIJT_T1_EE4typeEEEEDaRKNS_8durationIS5_T0_EERKNS9_IS6_T2_EE(
&v14,
v13);
std::__cmp_cat::__unspec::__unspec();
if ( std::operator<(v15) )
{
v11 = 1;
}
else
{
spdlog::logger::err_handler_(std::string const&)::last_report_time = v16;
v9 = std::chrono::_V2::system_clock::to_time_t(&v16, 0LL);
spdlog::details::os::localtime((spdlog::details::os *)v10, &v9);
strftime(v8, 64LL, "%Y-%m-%d %H:%M:%S", v10);
v5 = stderr;
v6 = spdlog::logger::err_handler_(std::string const&)::err_counter;
v3 = spdlog::logger::name[abi:cxx11](a1);
v7 = (const char *)std::string::c_str(v3);
v4 = (const char *)std::string::c_str(v18);
fprintf(v5, "[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", v6, v8, v7, v4);
v11 = 0;
}
std::lock_guard<std::mutex>::~lock_guard(&v17);
return v11;
}
| err_handler_:
SUB RSP,0x118
MOV qword ptr [RSP + 0x110],RDI
MOV qword ptr [RSP + 0x108],RSI
MOV RDI,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x38],RDI
ADD RDI,0x48
CALL 0x0017c530
TEST AL,0x1
JNZ 0x00179213
JMP 0x0017922e
LAB_00179213:
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x48
MOV RSI,qword ptr [RSP + 0x108]
CALL 0x0017d8c0
JMP 0x00179418
LAB_0017922e:
LEA RSI,[0x2d0b00]
LEA RDI,[RSP + 0x100]
CALL 0x001390b0
CALL 0x00115080
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [0x002d0b30]
INC RAX
MOV qword ptr [0x002d0b30],RAX
LAB_00179260:
LEA RSI,[0x2d0b28]
LEA RDI,[RSP + 0xf8]
CALL 0x00121fd0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0017927b
LAB_0017927b:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xe8],RAX
MOV dword ptr [RSP + 0xcc],0x1
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xcc]
CALL 0x0017d9b0
JMP 0x001792aa
LAB_001792aa:
LEA RDI,[RSP + 0xe8]
LEA RSI,[RSP + 0xd0]
CALL 0x0017d900
LAB_001792bf:
MOV byte ptr [RSP + 0x2f],AL
JMP 0x001792c5
LAB_001792c5:
MOV AL,byte ptr [RSP + 0x2f]
MOV byte ptr [RSP + 0xf7],AL
LEA RDI,[RSP + 0xcb]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00136450
MOVZX EDI,byte ptr [RSP + 0xf7]
CALL 0x0015b380
TEST AL,0x1
JNZ 0x001792f4
JMP 0x0017932a
LAB_001792f4:
MOV dword ptr [RSP + 0xc4],0x1
JMP 0x001793fa
LAB_0017932a:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [0x002d0b28],RAX
LEA RDI,[RSP + 0xf8]
CALL 0x0017d9d0
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x80]
CALL 0x001757f0
LEA RDI,[RSP + 0x40]
MOV ESI,0x40
LEA RDX,[0x24fcd7]
LEA RCX,[RSP + 0x88]
CALL 0x001155f0
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [0x002cff80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [0x002d0b30]
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00176b10
MOV RDI,RAX
CALL 0x00120e00
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x00120e00
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,RAX
LEA RSI,[0x24fce9]
MOV AL,0x0
CALL 0x00115b40
MOV dword ptr [RSP + 0xc4],0x0
LAB_001793fa:
LEA RDI,[RSP + 0x100]
CALL 0x001390e0
MOV EAX,dword ptr [RSP + 0xc4]
TEST EAX,EAX
JZ 0x00179416
JMP 0x00179414
LAB_00179414:
JMP 0x00179418
LAB_00179416:
JMP 0x00179418
LAB_00179418:
ADD RSP,0x118
RET
|
/* spdlog::logger::err_handler_(std::__cxx11::string const&) */
void __thiscall spdlog::logger::err_handler_(logger *this,string *param_1)
{
FILE *__stream;
long lVar1;
bool bVar2;
ulong uVar3;
string *this_00;
int8 uVar4;
int8 uVar5;
char local_d8 [64];
long local_98;
tm local_90;
uint local_54;
__unspec local_4d;
int local_4c;
duration<long,std::ratio<1l,1l>> local_48 [24];
int8 local_30;
int1 local_21;
int8 local_20;
lock_guard<std::mutex> local_18 [8];
string *local_10;
logger *local_8;
local_10 = param_1;
local_8 = this;
bVar2 = std::function::operator_cast_to_bool((function *)(this + 0x48));
if (bVar2) {
std::function<void(std::__cxx11::string_const&)>::operator()
((function<void(std::__cxx11::string_const&)> *)(this + 0x48),local_10);
}
else {
std::lock_guard<std::mutex>::lock_guard
(local_18,(mutex *)err_handler_(std::__cxx11::string_const&)::mutex);
local_20 = std::chrono::_V2::system_clock::now();
err_handler_(std::__cxx11::string_const&)::err_counter =
err_handler_(std::__cxx11::string_const&)::err_counter + 1;
/* try { // try from 00179260 to 001792be has its CatchHandler @ 00179304 */
local_30 = std::chrono::operator-
((time_point *)&local_20,
(time_point *)&err_handler_(std::__cxx11::string_const&)::last_report_time
);
local_4c = 1;
std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(local_48,&local_4c);
local_21 = _ZNSt6chronossIlSt5ratioILl1ELl1000000000EElS1_ILl1ELl1EEQ20three_way_comparableINSt11common_typeIJT_T1_EE4typeEEEEDaRKNS_8durationIS5_T0_EERKNS9_IS6_T2_EE
(&local_30,local_48);
std::__cmp_cat::__unspec::__unspec(&local_4d,(__unspec *)0x0);
uVar3 = std::operator<(local_21);
bVar2 = (uVar3 & 1) != 0;
if (!bVar2) {
err_handler_(std::__cxx11::string_const&)::last_report_time = local_20;
local_98 = std::chrono::_V2::system_clock::to_time_t((time_point *)&local_20);
details::os::localtime((os *)&local_90,&local_98);
strftime(local_d8,0x40,"%Y-%m-%d %H:%M:%S",&local_90);
lVar1 = err_handler_(std::__cxx11::string_const&)::err_counter;
__stream = *(FILE **)PTR_stderr_002cff80;
this_00 = (string *)name_abi_cxx11_(this);
uVar4 = std::__cxx11::string::c_str(this_00);
uVar5 = std::__cxx11::string::c_str(local_10);
fprintf(__stream,"[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n",lVar1,local_d8,uVar4,uVar5);
}
local_54 = (uint)bVar2;
std::lock_guard<std::mutex>::~lock_guard(local_18);
}
return;
}
| |
28,364 | rtree_get_first | eloqsql/storage/myisam/rt_index.c | int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{
my_off_t root;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->rtree_recursion_depth = -1;
info->buff_used = 1;
return rtree_get_req(info, keyinfo, key_length, root, 0);
} | O3 | c | rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x8a679
imulq $0x70, %rcx, %rsi
addq 0x218(%rax), %rsi
movl $0xffffffff, 0x3c0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x33d(%rdi)
xorl %ecx, %ecx
jmp 0x8a68f
pushq %rbp
movq %rsp, %rbp
callq 0xa2412
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
| rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+98h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_8A679
imul rsi, rcx, 70h ; 'p'
add rsi, [rax+218h]
mov dword ptr [rdi+3C0h], 0FFFFFFFFh
mov byte ptr [rdi+33Dh], 1
xor ecx, ecx
jmp short rtree_get_req
loc_8A679:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
| long long rtree_get_first(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2;
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return rtree_get_req(a1, v3, v2, 0LL);
}
}
| rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x0018a679
IMUL RSI,RCX,0x70
ADD RSI,qword ptr [RAX + 0x218]
MOV dword ptr [RDI + 0x3c0],0xffffffff
MOV byte ptr [RDI + 0x33d],0x1
XOR ECX,ECX
JMP 0x0018a68f
LAB_0018a679:
PUSH RBP
MOV RBP,RSP
CALL 0x001a2412
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x218);
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
uVar3 = rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x70 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
| |
28,365 | testing::internal::FilePath::CalculateRootLength() const | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-filepath.cc | size_t FilePath::CalculateRootLength() const {
const auto& path = pathname_;
auto s = path.begin();
auto end = path.end();
#ifdef GTEST_OS_WINDOWS
if (end - s >= 2 && s[1] == ':' && (end - s == 2 || IsPathSeparator(s[2])) &&
(('A' <= s[0] && s[0] <= 'Z') || ('a' <= s[0] && s[0] <= 'z'))) {
// A typical absolute path like "C:\Windows" or "D:"
s += 2;
if (s != end) {
++s;
}
} else if (end - s >= 3 && IsPathSeparator(*s) && IsPathSeparator(*(s + 1)) &&
!IsPathSeparator(*(s + 2))) {
// Move past the "\\" prefix in a UNC path like "\\Server\Share\Folder"
s += 2;
// Skip 2 components and their following separators ("Server\" and "Share\")
for (int i = 0; i < 2; ++i) {
while (s != end) {
bool stop = IsPathSeparator(*s);
++s;
if (stop) {
break;
}
}
}
} else if (s != end && IsPathSeparator(*s)) {
// A drive-rooted path like "\Windows"
++s;
}
#else
if (s != end && IsPathSeparator(*s)) {
++s;
}
#endif
return static_cast<size_t>(s - path.begin());
} | O0 | cpp | testing::internal::FilePath::CalculateRootLength() const:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x43bc0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x43b20
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x43a70
xorb $-0x1, %al
testb $0x1, %al
jne 0xbf048
jmp 0xbf06a
leaq 0x10(%rsp), %rdi
callq 0x43ab0
movsbl (%rax), %edi
callq 0xbf090
testb $0x1, %al
jne 0xbf060
jmp 0xbf06a
leaq 0x10(%rsp), %rdi
callq 0x43ac0
movq 0x18(%rsp), %rdi
callq 0x43bc0
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0xebba0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZNK7testing8internal8FilePath19CalculateRootLengthEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_10], rax
mov rdi, [rsp+28h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov qword ptr [rsp+28h+var_20], rax
lea rdi, [rsp+28h+var_18]
lea rsi, [rsp+28h+var_20]; char
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_BF048
jmp short loc_BF06A
loc_BF048:
lea rdi, [rsp+28h+var_18]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movsx edi, byte ptr [rax]; this
call _ZN7testing8internalL15IsPathSeparatorEc; testing::internal::IsPathSeparator(char)
test al, 1
jnz short loc_BF060
jmp short loc_BF06A
loc_BF060:
lea rdi, [rsp+28h+var_18]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
loc_BF06A:
mov rdi, [rsp+28h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+28h+var_28], rax
lea rdi, [rsp+28h+var_18]
mov rsi, rsp
call _ZN9__gnu_cxxmiIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSC_SF_; __gnu_cxx::operator-<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
add rsp, 28h
retn
| long long testing::internal::FilePath::CalculateRootLength(testing::internal::FilePath *this)
{
char *v1; // rax
long long v3; // [rsp+0h] [rbp-28h] BYREF
char v4[8]; // [rsp+8h] [rbp-20h] BYREF
long long v5; // [rsp+10h] [rbp-18h] BYREF
testing::internal::FilePath *v6; // [rsp+18h] [rbp-10h]
testing::internal::FilePath *v7; // [rsp+20h] [rbp-8h]
v7 = this;
v6 = this;
v5 = std::string::begin((long long)this);
*(_QWORD *)v4 = std::string::end((long long)this);
if ( !__gnu_cxx::operator==<char const*,std::string>((long long)&v5, (long long)v4) )
{
v1 = (char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)&v5);
if ( (testing::internal::IsPathSeparator((testing::internal *)(unsigned int)*v1, (char)v4) & 1) != 0 )
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(&v5);
}
v3 = std::string::begin((long long)v6);
return __gnu_cxx::operator-<char const*,std::string>(&v5, &v3);
}
| CalculateRootLength:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00143bc0
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00143b20
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x8]
CALL 0x00143a70
XOR AL,0xff
TEST AL,0x1
JNZ 0x001bf048
JMP 0x001bf06a
LAB_001bf048:
LEA RDI,[RSP + 0x10]
CALL 0x00143ab0
MOVSX EDI,byte ptr [RAX]
CALL 0x001bf090
TEST AL,0x1
JNZ 0x001bf060
JMP 0x001bf06a
LAB_001bf060:
LEA RDI,[RSP + 0x10]
CALL 0x00143ac0
LAB_001bf06a:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00143bc0
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
CALL 0x001ebba0
ADD RSP,0x28
RET
|
/* testing::internal::FilePath::CalculateRootLength() const */
void __thiscall testing::internal::FilePath::CalculateRootLength(FilePath *this)
{
byte bVar1;
char *pcVar2;
ulong uVar3;
int8 local_28;
int8 local_20;
int8 local_18;
string *local_10;
FilePath *local_8;
local_10 = (string *)this;
local_8 = this;
local_18 = std::__cxx11::string::begin((string *)this);
local_20 = std::__cxx11::string::end(local_10);
bVar1 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_18,&local_20);
if (((bVar1 ^ 0xff) & 1) != 0) {
pcVar2 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_18);
uVar3 = IsPathSeparator(*pcVar2);
if ((uVar3 & 1) != 0) {
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_18);
}
}
local_28 = std::__cxx11::string::begin(local_10);
__gnu_cxx::operator-((__normal_iterator *)&local_18,(__normal_iterator *)&local_28);
return;
}
| |
28,366 | ma_ft_parserecord | eloqsql/storage/maria/ma_ft_update.c | FT_WORD * _ma_ft_parserecord(MARIA_HA *info, uint keynr, const uchar *record,
MEM_ROOT *mem_root)
{
TREE ptree;
MYSQL_FTPARSER_PARAM *param;
DBUG_ENTER("_ma_ft_parserecord");
if (! (param= maria_ftparser_call_initializer(info, keynr, 0)))
DBUG_RETURN(NULL);
bzero((char*) &ptree, sizeof(ptree));
param->flags= 0;
if (_ma_ft_parse(&ptree, info, keynr, record, param, mem_root))
DBUG_RETURN(NULL);
DBUG_RETURN(maria_ft_linearize(&ptree, mem_root));
} | O0 | c | ma_ft_parserecord:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp # imm = 0x2D0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
callq 0x747e0
movq %rax, -0x2c8(%rbp)
cmpq $0x0, %rax
jne 0x74e01
jmp 0x74df7
movq $0x0, -0x8(%rbp)
jmp 0x74e6b
leaq -0x2c0(%rbp), %rdi
xorl %esi, %esi
movl $0x298, %edx # imm = 0x298
callq 0x292a0
movq -0x2c8(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x2c8(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x2c0(%rbp), %rdi
callq 0x74ce0
cmpl $0x0, %eax
je 0x74e55
jmp 0x74e4b
movq $0x0, -0x8(%rbp)
jmp 0x74e6b
jmp 0x74e57
movq -0x28(%rbp), %rsi
leaq -0x2c0(%rbp), %rdi
callq 0x73af0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2d0, %rsp # imm = 0x2D0
popq %rbp
retq
nopl (%rax,%rax)
| _ma_ft_parserecord:
push rbp
mov rbp, rsp
sub rsp, 2D0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
xor edx, edx
call maria_ftparser_call_initializer
mov [rbp+var_2C8], rax
cmp rax, 0
jnz short loc_74E01
jmp short $+2
loc_74DF7:
mov [rbp+var_8], 0
jmp short loc_74E6B
loc_74E01:
lea rdi, [rbp+var_2C0]
xor esi, esi
mov edx, 298h
call _memset
mov rax, [rbp+var_2C8]
mov dword ptr [rax+34h], 0
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_2C8]
mov r9, [rbp+var_28]
lea rdi, [rbp+var_2C0]
call _ma_ft_parse
cmp eax, 0
jz short loc_74E55
jmp short $+2
loc_74E4B:
mov [rbp+var_8], 0
jmp short loc_74E6B
loc_74E55:
jmp short $+2
loc_74E57:
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_2C0]
call maria_ft_linearize
mov [rbp+var_8], rax
loc_74E6B:
mov rax, [rbp+var_8]
add rsp, 2D0h
pop rbp
retn
| long long ma_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
unsigned long long v5; // [rsp+8h] [rbp-2C8h]
_QWORD v6[83]; // [rsp+10h] [rbp-2C0h] BYREF
long long v7; // [rsp+2A8h] [rbp-28h]
long long v8; // [rsp+2B0h] [rbp-20h]
unsigned int v9; // [rsp+2BCh] [rbp-14h]
_QWORD *v10; // [rsp+2C0h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = a4;
v5 = maria_ftparser_call_initializer(a1, a2, 0);
if ( !v5 )
return 0LL;
memset(v6, 0LL, sizeof(v6));
*(_DWORD *)(v5 + 52) = 0;
if ( (unsigned int)ma_ft_parse(v6, (long long)v10, v9, v8, (_QWORD *)v5, v7) )
return 0LL;
else
return maria_ft_linearize((long long)v6, v7);
}
| _ma_ft_parserecord:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2d0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
XOR EDX,EDX
CALL 0x001747e0
MOV qword ptr [RBP + -0x2c8],RAX
CMP RAX,0x0
JNZ 0x00174e01
JMP 0x00174df7
LAB_00174df7:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00174e6b
LAB_00174e01:
LEA RDI,[RBP + -0x2c0]
XOR ESI,ESI
MOV EDX,0x298
CALL 0x001292a0
MOV RAX,qword ptr [RBP + -0x2c8]
MOV dword ptr [RAX + 0x34],0x0
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x2c8]
MOV R9,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x2c0]
CALL 0x00174ce0
CMP EAX,0x0
JZ 0x00174e55
JMP 0x00174e4b
LAB_00174e4b:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00174e6b
LAB_00174e55:
JMP 0x00174e57
LAB_00174e57:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x2c0]
CALL 0x00173af0
MOV qword ptr [RBP + -0x8],RAX
LAB_00174e6b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x2d0
POP RBP
RET
|
int8
_ma_ft_parserecord(int8 param_1,int4 param_2,int8 param_3,int8 param_4)
{
int iVar1;
long lVar2;
int1 local_2c8 [664];
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int8 local_10;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
lVar2 = maria_ftparser_call_initializer(param_1,param_2,0);
if (lVar2 == 0) {
local_10 = 0;
}
else {
memset(local_2c8,0,0x298);
*(int4 *)(lVar2 + 0x34) = 0;
iVar1 = _ma_ft_parse(local_2c8,local_18,local_1c,local_28,lVar2,local_30);
if (iVar1 == 0) {
local_10 = maria_ft_linearize(local_2c8,local_30);
}
else {
local_10 = 0;
}
}
return local_10;
}
| |
28,367 | 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 0xb233d
movq -0x78(%rbp), %rsi
addq -0x88(%rbp), %rsi
addq $0x2, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x8a930
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 0xb236e
movq -0x98(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x292d0
movq -0x98(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpq $0x0, -0x88(%rbp)
je 0xb239e
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x292d0
movq -0xa0(%rbp), %rax
movq -0x88(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xb26a0
movq %rax, -0x78(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xb26a0
movq %rax, -0x88(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jae 0xb2406
movq -0x78(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0xb2414
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 0xb249c
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 0xb249a
movq -0x98(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0xa0(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0xb4(%rbp)
jmp 0xb251d
jmp 0xb2433
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0xb24b3
xorl %eax, %eax
movl %eax, -0xcc(%rbp)
jmp 0xb2511
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jae 0xb24e8
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
subq -0xb0(%rbp), %rsi
callq 0xa05a0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0xd0(%rbp)
jmp 0xb2505
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
subq -0xb0(%rbp), %rsi
callq 0xa05a0
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 0xb2533
movq -0xa8(%rbp), %rdi
callq 0x8acb0
movl -0xb4(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2560
movl -0xd4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
callq 0x29420
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_B233D
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_B233D:
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_B236E
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_78]
call _memcpy
loc_B236E:
mov rax, [rbp+var_98]
mov rcx, [rbp+var_78]
mov byte ptr [rax+rcx], 0
cmp [rbp+var_88], 0
jz short loc_B239E
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_88]
call _memcpy
loc_B239E:
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_B2406
mov rax, [rbp+var_78]
mov [rbp+var_C8], rax
jmp short loc_B2414
loc_B2406:
mov rax, [rbp+var_88]
mov [rbp+var_C8], rax
loc_B2414:
mov rax, [rbp+var_C0]
mov rcx, [rbp+var_C8]
mov [rbp+var_B0], rcx
add rax, rcx
mov [rbp+var_90], rax
loc_B2433:
mov rax, [rbp+var_98]
cmp rax, [rbp+var_90]
jnb short loc_B249C
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_B249A
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_B251D
loc_B249A:
jmp short loc_B2433
loc_B249C:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnz short loc_B24B3
xor eax, eax
mov [rbp+var_CC], eax
jmp short loc_B2511
loc_B24B3:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnb short loc_B24E8
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_B2505
loc_B24E8:
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_B2505:
mov eax, [rbp+var_D0]
mov [rbp+var_CC], eax
loc_B2511:
mov eax, [rbp+var_CC]
mov [rbp+var_B4], eax
loc_B251D:
cmp [rbp+var_A8], 0
jz short loc_B2533
mov rdi, [rbp+var_A8]
call my_free
loc_B2533:
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_B2560
mov eax, [rbp+var_D4]
add rsp, 0E0h
pop rbp
retn
loc_B2560:
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, (const char *)(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 0x001b233d
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,qword ptr [RBP + -0x88]
ADD RSI,0x2
XOR EDI,EDI
MOV EDX,0x8
CALL 0x0018a930
MOV qword ptr [RBP + -0x98],RAX
MOV qword ptr [RBP + -0xa8],RAX
LAB_001b233d:
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 0x001b236e
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x001292d0
LAB_001b236e:
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 0x001b239e
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x88]
CALL 0x001292d0
LAB_001b239e:
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 0x001b26a0
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
CALL 0x001b26a0
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 0x001b2406
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x001b2414
LAB_001b2406:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0xc8],RAX
LAB_001b2414:
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_001b2433:
MOV RAX,qword ptr [RBP + -0x98]
CMP RAX,qword ptr [RBP + -0x90]
JNC 0x001b249c
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 0x001b249a
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 0x001b251d
LAB_001b249a:
JMP 0x001b2433
LAB_001b249c:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x001b24b3
XOR EAX,EAX
MOV dword ptr [RBP + -0xcc],EAX
JMP 0x001b2511
LAB_001b24b3:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNC 0x001b24e8
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
SUB RSI,qword ptr [RBP + -0xb0]
CALL 0x001a05a0
MOV ECX,EAX
XOR EAX,EAX
SUB EAX,ECX
MOV dword ptr [RBP + -0xd0],EAX
JMP 0x001b2505
LAB_001b24e8:
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
SUB RSI,qword ptr [RBP + -0xb0]
CALL 0x001a05a0
MOV dword ptr [RBP + -0xd0],EAX
LAB_001b2505:
MOV EAX,dword ptr [RBP + -0xd0]
MOV dword ptr [RBP + -0xcc],EAX
LAB_001b2511:
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0xb4],EAX
LAB_001b251d:
CMP qword ptr [RBP + -0xa8],0x0
JZ 0x001b2533
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x0018acb0
LAB_001b2533:
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 0x001b2560
MOV EAX,dword ptr [RBP + -0xd4]
ADD RSP,0xe0
POP RBP
RET
LAB_001b2560:
CALL 0x00129420
|
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_001b251d;
}
__dest = local_a8 + 1;
pbVar1 = local_a0 + 1;
} while (*local_a0 == *local_a8);
local_bc = (uint)*local_a0 - (uint)*local_a8;
LAB_001b251d:
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;
}
| |
28,368 | my_utf16le_uni | eloqsql/strings/ctype-ucs2.c | static int
my_utf16le_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
my_wc_t lo;
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if ((*pwc= uint2korr(s)) < MY_UTF16_SURROGATE_HIGH_FIRST ||
(*pwc > MY_UTF16_SURROGATE_LOW_LAST))
return 2; /* [0000-D7FF,E000-FFFF] */
if (*pwc >= MY_UTF16_SURROGATE_LOW_FIRST)
return MY_CS_ILSEQ; /* [DC00-DFFF] Low surrogate part without high part */
if (s + 4 > e)
return MY_CS_TOOSMALL4;
s+= 2;
if ((lo= uint2korr(s)) < MY_UTF16_SURROGATE_LOW_FIRST ||
lo > MY_UTF16_SURROGATE_LOW_LAST)
return MY_CS_ILSEQ; /* Expected low surrogate part, got something else */
*pwc= 0x10000 + (((*pwc & 0x3FF) << 10) | (lo & 0x3FF));
return 4;
} | O3 | c | my_utf16le_uni:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x7f051
movzwl (%rdx), %edi
movq %rdi, (%rsi)
leal 0x2000(%rdi), %eax
movzwl %ax, %r9d
movl $0x2, %eax
cmpl $0xf800, %r9d # imm = 0xF800
jb 0x7f051
xorl %eax, %eax
cmpl $0xdbff, %edi # imm = 0xDBFF
ja 0x7f051
addq $0x4, %rdx
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rdx
ja 0x7f051
movzwl (%r8), %ecx
leal 0x2000(%rcx), %eax
movzwl %ax, %edx
movl $0x0, %eax
cmpl $0xfc00, %edx # imm = 0xFC00
jb 0x7f051
shll $0xa, %edi
andl $0xffc00, %edi # imm = 0xFFC00
andl $0x3ff, %ecx # imm = 0x3FF
leaq (%rdi,%rcx), %rax
addq $0x10000, %rax # imm = 0x10000
movq %rax, (%rsi)
movl $0x4, %eax
popq %rbp
retq
| my_utf16le_uni:
push rbp
mov rbp, rsp
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_7F051
movzx edi, word ptr [rdx]
mov [rsi], rdi
lea eax, [rdi+2000h]
movzx r9d, ax
mov eax, 2
cmp r9d, 0F800h
jb short loc_7F051
xor eax, eax
cmp edi, 0DBFFh
ja short loc_7F051
add rdx, 4
mov eax, 0FFFFFF98h
cmp rdx, rcx
ja short loc_7F051
movzx ecx, word ptr [r8]
lea eax, [rcx+2000h]
movzx edx, ax
mov eax, 0
cmp edx, 0FC00h
jb short loc_7F051
shl edi, 0Ah
and edi, 0FFC00h
and ecx, 3FFh
lea rax, [rdi+rcx]
add rax, 10000h
mov [rsi], rax
mov eax, 4
loc_7F051:
pop rbp
retn
| long long my_utf16le_uni(long long a1, _QWORD *a2, unsigned __int16 *a3, unsigned long long a4)
{
_WORD *v4; // r8
long long result; // rax
long long v6; // rdi
v4 = a3 + 1;
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
v6 = *a3;
*a2 = v6;
result = 2LL;
if ( (unsigned __int16)(v6 + 0x2000) >= 0xF800u )
{
result = 0LL;
if ( (unsigned int)v6 <= 0xDBFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int16)(*v4 + 0x2000) >= 0xFC00u )
{
*a2 = (((_DWORD)v6 << 10) & 0xFFC00) + (unsigned long long)(*v4 & 0x3FF) + 0x10000;
return 4LL;
}
}
}
}
}
return result;
}
| my_utf16le_uni:
PUSH RBP
MOV RBP,RSP
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0017f051
MOVZX EDI,word ptr [RDX]
MOV qword ptr [RSI],RDI
LEA EAX,[RDI + 0x2000]
MOVZX R9D,AX
MOV EAX,0x2
CMP R9D,0xf800
JC 0x0017f051
XOR EAX,EAX
CMP EDI,0xdbff
JA 0x0017f051
ADD RDX,0x4
MOV EAX,0xffffff98
CMP RDX,RCX
JA 0x0017f051
MOVZX ECX,word ptr [R8]
LEA EAX,[RCX + 0x2000]
MOVZX EDX,AX
MOV EAX,0x0
CMP EDX,0xfc00
JC 0x0017f051
SHL EDI,0xa
AND EDI,0xffc00
AND ECX,0x3ff
LEA RAX,[RDI + RCX*0x1]
ADD RAX,0x10000
MOV qword ptr [RSI],RAX
MOV EAX,0x4
LAB_0017f051:
POP RBP
RET
|
int8 my_utf16le_uni(int8 param_1,ulong *param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
ushort uVar2;
int8 uVar3;
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
uVar1 = *param_3;
*param_2 = (ulong)uVar1;
uVar3 = 2;
if (((0xf7ff < (ushort)(uVar1 + 0x2000)) && (uVar3 = 0, uVar1 < 0xdc00)) &&
(uVar3 = 0xffffff98, param_3 + 2 <= param_4)) {
uVar2 = param_3[1];
uVar3 = 0;
if (0xfbff < (ushort)(uVar2 + 0x2000)) {
*param_2 = (ulong)((uVar1 & 0x3ff) << 10) + (ulong)(uVar2 & 0x3ff) + 0x10000;
uVar3 = 4;
}
}
}
return uVar3;
}
| |
28,369 | int minja::Value::get<int>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | int minja::Value::get<int>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0x6d729
cmpq $0x0, 0x20(%r14)
jne 0x6d729
cmpq $0x0, 0x30(%r14)
jne 0x6d729
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6d7f7
movl (%rbx), %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1d520
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x65173(%rip), %rsi # 0xd28c2
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x9d843(%rip), %rsi # 0x10afb8
movq 0x9d7f4(%rip), %rdx # 0x10af70
movq %rbx, %rdi
callq 0x1d890
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d7a2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1d160
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d7bd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1d160
testb %bpl, %bpl
jne 0x6d7e7
jmp 0x6d7ef
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d7e7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1d160
jmp 0x6d7e7
movq %rax, %r14
movq %rbx, %rdi
callq 0x1dc90
movq %r14, %rdi
callq 0x1d8e0
| _ZNK5minja5Value3getIiEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_6D729
cmp qword ptr [r14+20h], 0
jnz short loc_6D729
cmp qword ptr [r14+30h], 0
jnz short loc_6D729
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov dword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_6D729:
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, aGetTNotDefined; "get<T> not defined for this value type:"...
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:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6D7A2
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6D7A2:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6D7BD
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6D7BD:
test bpl, bpl
jnz short loc_6D7E7
jmp short loc_6D7EF
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6D7E7
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6D7E7
mov r14, rax
loc_6D7E7:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6D7EF:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<int>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
unsigned int v4[4]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v4);
return v4[0];
}
| get<int>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x0016d729
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x0016d729
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x0016d729
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV dword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0016d7f7
MOV EAX,dword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_0016d729:
MOV EDI,0x10
CALL 0x0011d520
MOV RBX,RAX
LAB_0016d736:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_0016d748:
LEA RSI,[0x1d28c2]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_0016d75f:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,RBX
CALL 0x0011d890
|
/* int minja::Value::get<int>() const */
int __thiscall minja::Value::get<int>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
int local_38 [8];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0;
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016d736 to 0016d747 has its CatchHandler @ 0016d7e4 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 0016d748 to 0016d75b has its CatchHandler @ 0016d7c4 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 0016d75f to 0016d783 has its CatchHandler @ 0016d784 */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
| |
28,370 | coro::detail::sync_wait_task_promise_base::unhandled_exception() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp | auto unhandled_exception() -> void { m_exception = std::current_exception(); } | O3 | cpp | coro::detail::sync_wait_task_promise_base::unhandled_exception():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq $0x0, (%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rbx)
testq %rcx, %rcx
je 0x35e5
leaq 0x10(%rsp), %rdi
callq 0x2130
cmpq $0x0, 0x8(%rsp)
je 0x35e5
leaq 0x8(%rsp), %rdi
callq 0x2130
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN4coro6detail27sync_wait_task_promise_base19unhandled_exceptionEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov rdi, r14
call __ZSt17current_exceptionv; std::current_exception(void)
mov rax, [r14]
mov qword ptr [r14], 0
mov rcx, [rbx+8]
mov [rsp+28h+var_18], rcx
mov [rbx+8], rax
test rcx, rcx
jz short loc_35E5
lea rdi, [rsp+28h+var_18]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
cmp [rsp+28h+var_20], 0
jz short loc_35E5
lea rdi, [rsp+28h+var_20]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
loc_35E5:
add rsp, 18h
pop rbx
pop r14
retn
| long long coro::detail::sync_wait_task_promise_base::unhandled_exception(
coro::detail::sync_wait_task_promise_base *this)
{
long long result; // rax
long long v2; // rcx
long long v3; // [rsp+8h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+10h] [rbp-18h] BYREF
std::current_exception();
result = v3;
v3 = 0LL;
v4[0] = *((_QWORD *)this + 1);
v2 = v4[0];
*((_QWORD *)this + 1) = result;
if ( v2 )
{
result = std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)v4);
if ( v3 )
return std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)&v3);
}
return result;
}
| unhandled_exception:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001021a0
MOV RAX,qword ptr [R14]
MOV qword ptr [R14],0x0
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RBX + 0x8],RAX
TEST RCX,RCX
JZ 0x001035e5
LEA RDI,[RSP + 0x10]
CALL 0x00102130
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001035e5
LEA RDI,[RSP + 0x8]
CALL 0x00102130
LAB_001035e5:
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* WARNING: Removing unreachable block (ram,0x001035db) */
/* coro::detail::sync_wait_task_promise_base::unhandled_exception() */
void __thiscall
coro::detail::sync_wait_task_promise_base::unhandled_exception(sync_wait_task_promise_base *this)
{
long lVar1;
int8 local_20;
std::current_exception();
lVar1 = *(long *)(this + 8);
*(int8 *)(this + 8) = local_20;
if (lVar1 != 0) {
std::__exception_ptr::exception_ptr::_M_release();
}
return;
}
| |
28,371 | js_string_at | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_at(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val, ret;
JSString *p;
int idx, c;
val = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_STRING(val);
if (JS_ToInt32Sat(ctx, &idx, argv[0])) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
if (idx < 0)
idx = p->len + idx;
if (idx < 0 || idx >= p->len) {
ret = JS_UNDEFINED;
} else {
c = string_get(p, idx);
ret = js_new_string_char(ctx, c);
}
JS_FreeValue(ctx, val);
return ret;
} | O2 | c | js_string_at:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r12
movq %rdi, %r15
callq 0x3a290
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x674ce
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x2133d
testl %eax, %eax
je 0x6745e
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
jmp 0x674ce
movl 0xc(%rsp), %ecx
movq 0x4(%r14), %rax
movl %eax, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
pushq $0x3
popq %r12
testl %ecx, %ecx
jns 0x6747a
addl %edx, %ecx
js 0x6748c
cmpl %edx, %ecx
jae 0x6748c
movl %ecx, %ecx
testl %eax, %eax
js 0x67493
movzbl 0x18(%r14,%rcx), %eax
jmp 0x67499
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x674b7
movzwl 0x18(%r14,%rcx,2), %eax
movzwl %ax, %esi
movq %r15, %rdi
callq 0x35e9c
movq %rdx, %r12
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r13d
orq %rcx, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
movq %r13, %r14
movq %r12, %rbx
movq %r14, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_string_at:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r12, r8
mov r15, rdi
call JS_ToStringCheckObject
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz loc_674CE
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+38h+var_2C]
mov rdi, r15
call JS_ToInt32Sat
test eax, eax
jz short loc_6745E
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
jmp short loc_674CE
loc_6745E:
mov ecx, [rsp+38h+var_2C]
mov rax, [r14+4]
mov edx, eax
and edx, 7FFFFFFFh
push 3
pop r12
test ecx, ecx
jns short loc_6747A
add ecx, edx
js short loc_6748C
loc_6747A:
cmp ecx, edx
jnb short loc_6748C
mov ecx, ecx
test eax, eax
js short loc_67493
movzx eax, byte ptr [r14+rcx+18h]
jmp short loc_67499
loc_6748C:
xor r13d, r13d
xor ecx, ecx
jmp short loc_674B7
loc_67493:
movzx eax, word ptr [r14+rcx*2+18h]
loc_67499:
movzx esi, ax
mov rdi, r15
call js_new_string_char
mov r12, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r13d, eax
loc_674B7:
or r13, rcx
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
mov r14, r13
mov rbx, r12
loc_674CE:
mov rax, r14
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_string_at(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // r14
long long v16; // rdx
long long v17; // rbx
unsigned int v18; // ecx
long long v19; // rax
unsigned int v20; // edx
unsigned __int16 v21; // ax
long long v22; // r13
unsigned long long v23; // rcx
long long v24; // rax
unsigned long long v25; // r13
int v27[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v17 = v16;
if ( (_DWORD)v16 != 6 )
{
if ( (unsigned int)JS_ToInt32Sat(a1, (long long)v27, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
JS_FreeValue(a1, v15, v17);
return 0LL;
}
else
{
v18 = v27[0];
v19 = *(_QWORD *)(v15 + 4);
v20 = v19 & 0x7FFFFFFF;
if ( v27[0] < 0 && (v18 = v20 + v27[0], (int)(v20 + v27[0]) < 0) || v18 >= v20 )
{
v22 = 0LL;
v23 = 0LL;
}
else
{
if ( (int)v19 < 0 )
v21 = *(_WORD *)(v15 + 2LL * v18 + 24);
else
v21 = *(unsigned __int8 *)(v15 + v18 + 24);
v24 = js_new_string_char(a1, v21);
v23 = v24 & 0xFFFFFFFF00000000LL;
v22 = (unsigned int)v24;
}
v25 = v23 | v22;
JS_FreeValue(a1, v15, v17);
return v25;
}
}
return v15;
}
| js_string_at:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,R8
MOV R15,RDI
CALL 0x0013a290
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x001674ce
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA RSI,[RSP + 0xc]
MOV RDI,R15
CALL 0x0012133d
TEST EAX,EAX
JZ 0x0016745e
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
JMP 0x001674ce
LAB_0016745e:
MOV ECX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [R14 + 0x4]
MOV EDX,EAX
AND EDX,0x7fffffff
PUSH 0x3
POP R12
TEST ECX,ECX
JNS 0x0016747a
ADD ECX,EDX
JS 0x0016748c
LAB_0016747a:
CMP ECX,EDX
JNC 0x0016748c
MOV ECX,ECX
TEST EAX,EAX
JS 0x00167493
MOVZX EAX,byte ptr [R14 + RCX*0x1 + 0x18]
JMP 0x00167499
LAB_0016748c:
XOR R13D,R13D
XOR ECX,ECX
JMP 0x001674b7
LAB_00167493:
MOVZX EAX,word ptr [R14 + RCX*0x2 + 0x18]
LAB_00167499:
MOVZX ESI,AX
MOV RDI,R15
CALL 0x00135e9c
MOV R12,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV R13D,EAX
LAB_001674b7:
OR R13,RCX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
MOV R14,R13
MOV RBX,R12
LAB_001674ce:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_string_at(int8 param_1)
{
ushort uVar1;
int iVar2;
uint uVar3;
ulong uVar5;
uint uVar6;
int8 *in_R8;
int8 uVar8;
ulong uVar9;
int1 auVar10 [16];
uint local_2c;
long lVar4;
int8 uVar7;
auVar10 = JS_ToStringCheckObject();
uVar7 = auVar10._8_8_;
lVar4 = auVar10._0_8_;
if (auVar10._8_4_ != 6) {
iVar2 = JS_ToInt32Sat(param_1,&local_2c,*in_R8,in_R8[1]);
if (iVar2 == 0) {
uVar3 = (uint)*(int8 *)(lVar4 + 4);
uVar6 = uVar3 & 0x7fffffff;
uVar8 = 3;
if ((((int)local_2c < 0) && (local_2c = local_2c + uVar6, (int)local_2c < 0)) ||
(uVar6 <= local_2c)) {
uVar9 = 0;
uVar5 = 0;
}
else {
if ((int)uVar3 < 0) {
uVar1 = *(ushort *)(lVar4 + 0x18 + (ulong)local_2c * 2);
}
else {
uVar1 = (ushort)*(byte *)(lVar4 + 0x18 + (ulong)local_2c);
}
auVar10 = js_new_string_char(param_1,uVar1);
uVar8 = auVar10._8_8_;
uVar5 = auVar10._0_8_ & 0xffffffff00000000;
uVar9 = auVar10._0_8_ & 0xffffffff;
}
auVar10._8_8_ = uVar8;
auVar10._0_8_ = uVar9 | uVar5;
JS_FreeValue(param_1,lVar4,uVar7);
}
else {
JS_FreeValue(param_1,lVar4,uVar7);
auVar10 = ZEXT816(6) << 0x40;
}
}
return auVar10;
}
| |
28,372 | glfwGetOSMesaDepthBuffer | untodesu[P]riteg/build_O0/_deps/glfw-src/src/osmesa_context.c | GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* handle,
int* width, int* height,
int* bytesPerValue,
void** buffer)
{
void* mesaBuffer;
GLint mesaWidth, mesaHeight, mesaBytes;
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
if (!OSMesaGetDepthBuffer(window->context.osmesa.handle,
&mesaWidth, &mesaHeight,
&mesaBytes, &mesaBuffer))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"OSMesa: Failed to retrieve depth buffer");
return GLFW_FALSE;
}
if (width)
*width = mesaWidth;
if (height)
*height = mesaHeight;
if (bytesPerValue)
*bytesPerValue = mesaBytes;
if (buffer)
*buffer = mesaBuffer;
return GLFW_TRUE;
} | O0 | c | glfwGetOSMesaDepthBuffer:
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 %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x3ae9d
jmp 0x3aebc
leaq 0x6175a(%rip), %rdi # 0x9c5fe
leaq 0x81a3f(%rip), %rsi # 0xbc8ea
movl $0x14c, %edx # imm = 0x14C
leaq 0x81be1(%rip), %rcx # 0xbca98
callq 0xc5a0
leaq 0xa5da5(%rip), %rax # 0xe0c68
cmpl $0x0, (%rax)
jne 0x3aee4
movl $0x10001, %edi # imm = 0x10001
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x221a0
movl $0x0, -0x4(%rbp)
jmp 0x3af79
leaq 0xa5d7d(%rip), %rax # 0xe0c68
movq 0x20980(%rax), %rax
movq -0x50(%rbp), %rcx
movq 0x2a0(%rcx), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x44(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq *%rax
cmpl $0x0, %eax
jne 0x3af30
movl $0x10008, %edi # imm = 0x10008
leaq 0x81bc1(%rip), %rsi # 0xbcae1
movb $0x0, %al
callq 0x221a0
movl $0x0, -0x4(%rbp)
jmp 0x3af79
cmpq $0x0, -0x18(%rbp)
je 0x3af40
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x3af50
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3af60
movl -0x44(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3af72
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| glfwGetOSMesaDepthBuffer:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz short loc_3AE9D
jmp short loc_3AEBC
loc_3AE9D:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
mov edx, 14Ch
lea rcx, aIntGlfwgetosme_0; "int glfwGetOSMesaDepthBuffer(GLFWwindow"...
call ___assert_fail
loc_3AEBC:
lea rax, _glfw
cmp dword ptr [rax], 0
jnz short loc_3AEE4
mov edi, 10001h
xor eax, eax
mov esi, eax
mov al, 0
call _glfwInputError
mov [rbp+var_4], 0
jmp loc_3AF79
loc_3AEE4:
lea rax, _glfw
mov rax, [rax+20980h]
mov rcx, [rbp+var_50]
mov rdi, [rcx+2A0h]
lea rsi, [rbp+var_3C]
lea rdx, [rbp+var_40]
lea rcx, [rbp+var_44]
lea r8, [rbp+var_38]
call rax
cmp eax, 0
jnz short loc_3AF30
mov edi, 10008h
lea rsi, aOsmesaFailedTo_3; "OSMesa: Failed to retrieve depth buffer"
mov al, 0
call _glfwInputError
mov [rbp+var_4], 0
jmp short loc_3AF79
loc_3AF30:
cmp [rbp+var_18], 0
jz short loc_3AF40
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
mov [rax], ecx
loc_3AF40:
cmp [rbp+var_20], 0
jz short loc_3AF50
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
mov [rax], ecx
loc_3AF50:
cmp [rbp+var_28], 0
jz short loc_3AF60
mov ecx, [rbp+var_44]
mov rax, [rbp+var_28]
mov [rax], ecx
loc_3AF60:
cmp [rbp+var_30], 0
jz short loc_3AF72
mov rcx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_3AF72:
mov [rbp+var_4], 1
loc_3AF79:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long glfwGetOSMesaDepthBuffer(long long a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _QWORD *a5)
{
int v6; // [rsp+Ch] [rbp-44h] BYREF
int v7; // [rsp+10h] [rbp-40h] BYREF
int v8; // [rsp+14h] [rbp-3Ch] BYREF
long long v9; // [rsp+18h] [rbp-38h] BYREF
_QWORD *v10; // [rsp+20h] [rbp-30h]
_DWORD *v11; // [rsp+28h] [rbp-28h]
_DWORD *v12; // [rsp+30h] [rbp-20h]
_DWORD *v13; // [rsp+38h] [rbp-18h]
long long v14; // [rsp+40h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = a5;
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/osmesa_context.c",
332LL,
"int glfwGetOSMesaDepthBuffer(GLFWwindow *, int *, int *, int *, void **)");
if ( glfw[0] )
{
if ( (*(unsigned int ( **)(_QWORD, int *, int *, int *, long long *))&glfw[33376])(
*(_QWORD *)(a1 + 672),
&v8,
&v7,
&v6,
&v9) )
{
if ( v13 )
*v13 = v8;
if ( v12 )
*v12 = v7;
if ( v11 )
*v11 = v6;
if ( v10 )
*v10 = v9;
return 1;
}
else
{
glfwInputError(0x10008u, (long long)"OSMesa: Failed to retrieve depth buffer");
return 0;
}
}
else
{
glfwInputError(0x10001u, 0LL);
return 0;
}
}
| glfwGetOSMesaDepthBuffer:
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 qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0013ae9d
JMP 0x0013aebc
LAB_0013ae9d:
LEA RDI,[0x19c5fe]
LEA RSI,[0x1bc8ea]
MOV EDX,0x14c
LEA RCX,[0x1bca98]
CALL 0x0010c5a0
LAB_0013aebc:
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX],0x0
JNZ 0x0013aee4
MOV EDI,0x10001
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001221a0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013af79
LAB_0013aee4:
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x20980]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RCX + 0x2a0]
LEA RSI,[RBP + -0x3c]
LEA RDX,[RBP + -0x40]
LEA RCX,[RBP + -0x44]
LEA R8,[RBP + -0x38]
CALL RAX
CMP EAX,0x0
JNZ 0x0013af30
MOV EDI,0x10008
LEA RSI,[0x1bcae1]
MOV AL,0x0
CALL 0x001221a0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013af79
LAB_0013af30:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013af40
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_0013af40:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013af50
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
LAB_0013af50:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013af60
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
LAB_0013af60:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0013af72
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0013af72:
MOV dword ptr [RBP + -0x4],0x1
LAB_0013af79:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
glfwGetOSMesaDepthBuffer
(long param_1,int4 *param_2,int4 *param_3,int4 *param_4,
int8 *param_5)
{
int iVar1;
int4 local_4c;
int4 local_48;
int4 local_44;
int8 local_40;
int8 *local_38;
int4 *local_30;
int4 *local_28;
int4 *local_20;
long local_18;
int4 local_c;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (param_1 != 0) {
if (_glfw == 0) {
_glfwInputError(0x10001,0);
local_c = 0;
}
else {
iVar1 = (*DAT_002015e8)(*(int8 *)(param_1 + 0x2a0),&local_44,&local_48,&local_4c,
&local_40);
if (iVar1 == 0) {
_glfwInputError(0x10008,"OSMesa: Failed to retrieve depth buffer");
local_c = 0;
}
else {
if (local_20 != (int4 *)0x0) {
*local_20 = local_44;
}
if (local_28 != (int4 *)0x0) {
*local_28 = local_48;
}
if (local_30 != (int4 *)0x0) {
*local_30 = local_4c;
}
if (local_38 != (int8 *)0x0) {
*local_38 = local_40;
}
local_c = 1;
}
}
return local_c;
}
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/osmesa_context.c"
,0x14c,"int glfwGetOSMesaDepthBuffer(GLFWwindow *, int *, int *, int *, void **)");
}
| |
28,373 | my_wc_mb_filename | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
static const char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;
return 1;
}
if (s + 3 > e)
return MY_CS_TOOSMALL3;
*s++= MY_FILENAME_ESCAPE;
if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) ||
(wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) ||
(wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) ||
(wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) ||
(wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20])))
{
*s++= (code / 80) + 0x30;
*s++= (code % 80) + 0x30;
return 3;
}
/* Non letter */
if (s + 4 > e)
return MY_CS_TOOSMALL5;
*s++= hex[(wc >> 12) & 15];
*s++= hex[(wc >> 8) & 15];
*s++= hex[(wc >> 4) & 15];
*s++= hex[(wc) & 15];
return 5;
} | O3 | c | my_wc_mb_filename:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xcef22
cmpq $0x7f, %rsi
ja 0xcee82
leaq 0x288061(%rip), %rax # 0x356ed0
cmpb $0x0, (%rsi,%rax)
je 0xcee82
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0xcef22
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xcef22
movb $0x40, (%rdx)
leaq -0xc0(%rsi), %rax
cmpq $0x53f, %rax # imm = 0x53F
ja 0xceeba
leaq 0x28b5c3(%rip), %rax # 0x35a470
movzwl -0x180(%rax,%rsi,2), %eax
testw %ax, %ax
jne 0xceefd
movq %rsi, %rax
andq $-0x200, %rax # imm = 0xFE00
cmpq $0x1e00, %rax # imm = 0x1E00
jne 0xceedf
leaq 0x28b05e(%rip), %rax # 0x359f30
movzwl -0x3c00(%rax,%rsi,2), %eax
testw %ax, %ax
jne 0xceefd
movq %rsi, %rax
andq $-0x20, %rax
cmpq $0x2160, %rax # imm = 0x2160
jne 0xcef24
leaq 0x28b43b(%rip), %rax # 0x35a330
movzwl -0x42c0(%rax,%rsi,2), %eax
movzwl %ax, %ecx
imull $0xcccd, %ecx, %ecx # imm = 0xCCCD
shrl $0x16, %ecx
leal 0x30(%rcx), %esi
movb %sil, 0x1(%rdx)
shll $0x4, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
addb $0x30, %al
movb %al, 0x2(%rdx)
movl $0x3, %eax
popq %rbp
retq
leaq -0x24b0(%rsi), %rax
cmpq $0x3f, %rax
ja 0xcef4f
leaq -0x24ea(%rsi), %rax
cmpq $-0x34, %rax
jb 0xcef7d
leaq 0x28b42b(%rip), %rax # 0x35a370
movzwl -0x4960(%rax,%rsi,2), %eax
jmp 0xceefd
leaq -0xff20(%rsi), %rax
cmpq $0x3f, %rax
ja 0xcef7d
movabsq $-0x7fffffe07ffffff, %rdi # imm = 0xF8000001F8000001
btq %rax, %rdi
jb 0xcef7d
leaq 0x28b47d(%rip), %rax # 0x35a3f0
movzwl -0x1fe40(%rax,%rsi,2), %eax
jmp 0xceefd
leaq 0x5(%rdx), %rdi
movl $0xffffff97, %eax # imm = 0xFFFFFF97
cmpq %rcx, %rdi
ja 0xcef22
movl %esi, %eax
shrl $0xc, %eax
andl $0xf, %eax
leaq 0x28bf56(%rip), %rcx # 0x35aef0
movb (%rax,%rcx), %al
movb %al, 0x1(%rdx)
movl %esi, %eax
shrl $0x8, %eax
andl $0xf, %eax
movb (%rax,%rcx), %al
movb %al, 0x2(%rdx)
movl %esi, %eax
shrl $0x4, %eax
andl $0xf, %eax
movb (%rax,%rcx), %al
movb %al, 0x3(%rdx)
andl $0xf, %esi
movb (%rsi,%rcx), %al
movb %al, 0x4(%rdx)
movl $0x5, %eax
jmp 0xcef22
| my_wc_mb_filename:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_CEF22
cmp rsi, 7Fh
ja short loc_CEE82
lea rax, filename_safe_char
cmp byte ptr [rsi+rax], 0
jz short loc_CEE82
mov [rdx], sil
mov eax, 1
jmp loc_CEF22
loc_CEE82:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_CEF22
mov byte ptr [rdx], 40h ; '@'
lea rax, [rsi-0C0h]
cmp rax, 53Fh
ja short loc_CEEBA
lea rax, uni_0C00_05FF
movzx eax, word ptr [rax+rsi*2-180h]
test ax, ax
jnz short loc_CEEFD
loc_CEEBA:
mov rax, rsi
and rax, 0FFFFFFFFFFFFFE00h
cmp rax, 1E00h
jnz short loc_CEEDF
lea rax, uni_1E00_1FFF
movzx eax, word ptr [rax+rsi*2-3C00h]
test ax, ax
jnz short loc_CEEFD
loc_CEEDF:
mov rax, rsi
and rax, 0FFFFFFFFFFFFFFE0h
cmp rax, 2160h
jnz short loc_CEF24
lea rax, uni_2160_217F
movzx eax, word ptr [rax+rsi*2-42C0h]
loc_CEEFD:
movzx ecx, ax
imul ecx, 0CCCDh
shr ecx, 16h
lea esi, [rcx+30h]
mov [rdx+1], sil
shl ecx, 4
lea ecx, [rcx+rcx*4]
sub eax, ecx
add al, 30h ; '0'
mov [rdx+2], al
mov eax, 3
loc_CEF22:
pop rbp
retn
loc_CEF24:
lea rax, [rsi-24B0h]
cmp rax, 3Fh ; '?'
ja short loc_CEF4F
lea rax, [rsi-24EAh]
cmp rax, 0FFFFFFFFFFFFFFCCh
jb short loc_CEF7D
lea rax, uni_24B0_24EF
movzx eax, word ptr [rax+rsi*2-4960h]
jmp short loc_CEEFD
loc_CEF4F:
lea rax, [rsi-0FF20h]
cmp rax, 3Fh ; '?'
ja short loc_CEF7D
mov rdi, 0F8000001F8000001h
bt rdi, rax
jb short loc_CEF7D
lea rax, uni_FF20_FF5F
movzx eax, word ptr [rax+rsi*2-1FE40h]
jmp short loc_CEEFD
loc_CEF7D:
lea rdi, [rdx+5]
mov eax, 0FFFFFF97h
cmp rdi, rcx
ja short loc_CEF22
mov eax, esi
shr eax, 0Ch
and eax, 0Fh
lea rcx, my_wc_mb_filename_hex; "0123456789abcdef"
mov al, [rax+rcx]
mov [rdx+1], al
mov eax, esi
shr eax, 8
and eax, 0Fh
mov al, [rax+rcx]
mov [rdx+2], al
mov eax, esi
shr eax, 4
and eax, 0Fh
mov al, [rax+rcx]
mov [rdx+3], al
and esi, 0Fh
mov al, [rsi+rcx]
mov [rdx+4], al
mov eax, 5
jmp loc_CEF22
| long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
unsigned __int16 v5; // ax
unsigned long long v6; // rdi
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 0x7F && filename_safe_char[a2] )
{
*a3 = a2;
return 1LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = 64;
if ( a2 - 192 <= 0x53F )
{
v5 = uni_0C00_05FF[a2 - 192];
if ( v5 )
goto LABEL_12;
}
if ( (a2 & 0xFFFFFFFFFFFFFE00LL) == 0x1E00 )
{
v5 = uni_1E00_1FFF[a2 - 7680];
if ( v5 )
goto LABEL_12;
}
if ( (a2 & 0xFFFFFFFFFFFFFFE0LL) == 0x2160 )
{
v5 = uni_2160_217F[a2 - 8544];
LABEL_12:
a3[1] = v5 / 0x50u + 48;
a3[2] = v5 % 0x50u + 48;
return 3LL;
}
if ( a2 - 9392 > 0x3F )
{
if ( a2 - 65312 <= 0x3F )
{
v6 = 0xF8000001F8000001LL;
if ( !_bittest64((const long long *)&v6, a2 - 65312) )
{
v5 = uni_FF20_FF5F[a2 - 65312];
goto LABEL_12;
}
}
}
else if ( a2 - 9450 >= 0xFFFFFFFFFFFFFFCCLL )
{
v5 = uni_24B0_24EF[a2 - 9392];
goto LABEL_12;
}
result = 4294967191LL;
if ( (unsigned long long)(a3 + 5) <= a4 )
{
a3[1] = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12];
a3[2] = my_wc_mb_filename_hex[((unsigned int)a2 >> 8) & 0xF];
a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4];
a3[4] = my_wc_mb_filename_hex[a2 & 0xF];
return 5LL;
}
}
}
return result;
}
| my_wc_mb_filename:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001cef22
CMP RSI,0x7f
JA 0x001cee82
LEA RAX,[0x456ed0]
CMP byte ptr [RSI + RAX*0x1],0x0
JZ 0x001cee82
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x001cef22
LAB_001cee82:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001cef22
MOV byte ptr [RDX],0x40
LEA RAX,[RSI + -0xc0]
CMP RAX,0x53f
JA 0x001ceeba
LEA RAX,[0x45a470]
MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x180]
TEST AX,AX
JNZ 0x001ceefd
LAB_001ceeba:
MOV RAX,RSI
AND RAX,-0x200
CMP RAX,0x1e00
JNZ 0x001ceedf
LEA RAX,[0x459f30]
MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x3c00]
TEST AX,AX
JNZ 0x001ceefd
LAB_001ceedf:
MOV RAX,RSI
AND RAX,-0x20
CMP RAX,0x2160
JNZ 0x001cef24
LEA RAX,[0x45a330]
MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x42c0]
LAB_001ceefd:
MOVZX ECX,AX
IMUL ECX,ECX,0xcccd
SHR ECX,0x16
LEA ESI,[RCX + 0x30]
MOV byte ptr [RDX + 0x1],SIL
SHL ECX,0x4
LEA ECX,[RCX + RCX*0x4]
SUB EAX,ECX
ADD AL,0x30
MOV byte ptr [RDX + 0x2],AL
MOV EAX,0x3
LAB_001cef22:
POP RBP
RET
LAB_001cef24:
LEA RAX,[RSI + -0x24b0]
CMP RAX,0x3f
JA 0x001cef4f
LEA RAX,[RSI + -0x24ea]
CMP RAX,-0x34
JC 0x001cef7d
LEA RAX,[0x45a370]
MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x4960]
JMP 0x001ceefd
LAB_001cef4f:
LEA RAX,[RSI + -0xff20]
CMP RAX,0x3f
JA 0x001cef7d
MOV RDI,-0x7fffffe07ffffff
BT RDI,RAX
JC 0x001cef7d
LEA RAX,[0x45a3f0]
MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x1fe40]
JMP 0x001ceefd
LAB_001cef7d:
LEA RDI,[RDX + 0x5]
MOV EAX,0xffffff97
CMP RDI,RCX
JA 0x001cef22
MOV EAX,ESI
SHR EAX,0xc
AND EAX,0xf
LEA RCX,[0x45aef0]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDX + 0x1],AL
MOV EAX,ESI
SHR EAX,0x8
AND EAX,0xf
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDX + 0x2],AL
MOV EAX,ESI
SHR EAX,0x4
AND EAX,0xf
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDX + 0x3],AL
AND ESI,0xf
MOV AL,byte ptr [RSI + RCX*0x1]
MOV byte ptr [RDX + 0x4],AL
MOV EAX,0x5
JMP 0x001cef22
|
int8
my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
ushort uVar1;
if (param_4 <= param_3) {
return 0xffffff9b;
}
if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) {
*param_3 = (char)param_2;
return 1;
}
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
*param_3 = 0x40;
if (((0x53f < param_2 - 0xc0) ||
(uVar1 = *(ushort *)(uni_1E00_1FFF + param_2 * 2 + 0x3c0), uVar1 == 0)) &&
(((param_2 & 0xfffffffffffffe00) != 0x1e00 ||
(uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1f780), uVar1 == 0)))) {
if ((param_2 & 0xffffffffffffffe0) == 0x2160) {
uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1f4c0);
}
else if (param_2 - 0x24b0 < 0x40) {
if (param_2 - 0x24ea < 0xffffffffffffffcc) {
LAB_001cef7d:
if (param_4 < param_3 + 5) {
return 0xffffff97;
}
param_3[1] = "0123456789abcdef"[(uint)(param_2 >> 0xc) & 0xf];
param_3[2] = "0123456789abcdef"[(uint)(param_2 >> 8) & 0xf];
param_3[3] = "0123456789abcdef"[(uint)(param_2 >> 4) & 0xf];
param_3[4] = "0123456789abcdef"[(uint)param_2 & 0xf];
return 5;
}
uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1ee60);
}
else {
if ((0x3f < param_2 - 0xff20) || ((0xf8000001f8000001U >> (param_2 - 0xff20 & 0x3f) & 1) != 0)
) goto LAB_001cef7d;
uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x3a00);
}
}
param_3[1] = (char)(uVar1 / 0x50) + '0';
param_3[2] = (char)uVar1 + (char)(uVar1 / 0x50 << 4) * -5 + '0';
return 3;
}
| |
28,374 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/./json.hpp | iterator find(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O0 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xa1ae0
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0xa1b50
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xa1b10
testb $0x1, %al
jne 0xd4326
jmp 0xd4366
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa1b80
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0xcf9a0
testb $0x1, %al
jne 0xd4356
jmp 0xd4358
jmp 0xd4375
jmp 0xd435a
leaq 0x30(%rsp), %rdi
callq 0xa1ef0
jmp 0xd4302
movq 0x10(%rsp), %rdi
callq 0xa1b50
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_28], rdi
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void)
mov [rsp+38h+var_8], rax
loc_D4302:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+38h+var_20], rax
lea rdi, [rsp+38h+var_8]
lea rsi, [rsp+38h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&)
test al, 1
jnz short loc_D4326
jmp short loc_D4366
loc_D4326:
mov rax, [rsp+38h+var_28]
add rax, 18h
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_18]
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEESI_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSJ_OSK_
test al, 1
jnz short loc_D4356
jmp short loc_D4358
loc_D4356:
jmp short loc_D4375
loc_D4358:
jmp short $+2
loc_D435A:
lea rdi, [rsp+38h+var_8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void)
jmp short loc_D4302
loc_D4366:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+38h+var_8], rax
loc_D4375:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find(
long long a1,
long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-20h] BYREF
long long v5; // [rsp+20h] [rbp-18h]
long long v6; // [rsp+28h] [rbp-10h]
long long i; // [rsp+30h] [rbp-8h] BYREF
v6 = a1;
v5 = a2;
for ( i = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) )
{
v4 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>(
(long long)&i,
(long long)&v4) )
break;
v2 = __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
a1 + 24,
v2,
v5) & 1) != 0 )
return i;
}
return std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
}
| find:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001a1ae0
MOV qword ptr [RSP + 0x30],RAX
LAB_001d4302:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a1b50
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x18]
CALL 0x001a1b10
TEST AL,0x1
JNZ 0x001d4326
JMP 0x001d4366
LAB_001d4326:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x18
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x30]
CALL 0x001a1b80
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001cf9a0
TEST AL,0x1
JNZ 0x001d4356
JMP 0x001d4358
LAB_001d4356:
JMP 0x001d4375
LAB_001d4358:
JMP 0x001d435a
LAB_001d435a:
LEA RDI,[RSP + 0x30]
CALL 0x001a1ef0
JMP 0x001d4302
LAB_001d4366:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a1b50
MOV qword ptr [RSP + 0x30],RAX
LAB_001d4375:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::find(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
bool bVar1;
basic_json *pbVar2;
ulong uVar3;
int8 uVar4;
int8 local_20;
basic_json *local_18;
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*local_10;
int8 local_8;
local_18 = param_1;
local_10 = this;
local_8 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::begin((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
while( true ) {
local_20 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::end((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_8,(__normal_iterator *)&local_20);
if (!bVar1) {
uVar4 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::end((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this);
return uVar4;
}
pbVar2 = (basic_json *)
__gnu_cxx::
__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
::operator->((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
*)&local_8);
uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),pbVar2,local_18);
if ((uVar3 & 1) != 0) break;
__gnu_cxx::
__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
::operator++((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
*)&local_8);
}
return local_8;
}
| |
28,375 | ma_search | eloqsql/storage/maria/ma_search.c | int _ma_search(register MARIA_HA *info, MARIA_KEY *key, uint32 nextflag,
my_off_t pos)
{
int error;
MARIA_PINNED_PAGE *page_link;
uchar *page_buff;
info->page_changed= 1; /* If page not saved */
if (!(error= _ma_search_no_save(info, key, nextflag, pos, &page_link,
&page_buff)))
{
if (nextflag & SEARCH_SAVE_BUFF)
{
memcpy(info->keyread_buff, page_buff, info->s->block_size);
/* Save position for a possible read next / previous */
info->int_keypos= info->keyread_buff + info->keypos_offset;
info->int_maxpos= info->keyread_buff + info->maxpos_offset;
info->int_keytree_version= key->keyinfo->version;
info->last_search_keypage= info->last_keypage;
info->page_changed= 0;
info->keyread_buff_used= 0;
}
}
_ma_unpin_all_pages(info, LSN_IMPOSSIBLE);
return (error);
} | O0 | c | ma_search:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x30(%rbp), %r8
leaq -0x38(%rbp), %r9
callq 0x692e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x692c8
movl -0x14(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x692c6
movq -0x8(%rbp), %rax
movq 0x380(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x8(%rbp), %rax
movq 0x380(%rax), %rcx
movq -0x8(%rbp), %rax
movl 0x3c0(%rax), %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x3b0(%rax)
movq -0x8(%rbp), %rax
movq 0x380(%rax), %rcx
movq -0x8(%rbp), %rax
movl 0x3c4(%rax), %eax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x3b8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0xb8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x3d4(%rax)
movq -0x8(%rbp), %rax
movq 0x440(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x448(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x684(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x685(%rax)
jmp 0x692c8
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6ff70
movl -0x24(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
| _ma_search:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
lea r8, [rbp+var_30]
lea r9, [rbp+var_38]
call _ma_search_no_save
mov [rbp+var_24], eax
cmp eax, 0
jnz loc_692C8
mov eax, [rbp+var_14]
and eax, 20h
cmp eax, 0
jz loc_692C6
mov rax, [rbp+var_8]
mov rdi, [rax+380h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+7BCh]
mov edx, eax
call _memcpy
mov rax, [rbp+var_8]
mov rcx, [rax+380h]
mov rax, [rbp+var_8]
mov eax, [rax+3C0h]
add rcx, rax
mov rax, [rbp+var_8]
mov [rax+3B0h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+380h]
mov rax, [rbp+var_8]
mov eax, [rax+3C4h]
add rcx, rax
mov rax, [rbp+var_8]
mov [rax+3B8h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rax+0B8h]
mov rax, [rbp+var_8]
mov [rax+3D4h], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+440h]
mov rax, [rbp+var_8]
mov [rax+448h], rcx
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+685h], 0
loc_692C6:
jmp short $+2
loc_692C8:
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call _ma_unpin_all_pages
mov eax, [rbp+var_24]
add rsp, 40h
pop rbp
retn
| long long ma_search(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-38h] BYREF
_BYTE v6[12]; // [rsp+10h] [rbp-30h] BYREF
unsigned int v7; // [rsp+1Ch] [rbp-24h]
long long v8; // [rsp+20h] [rbp-20h]
unsigned int v9; // [rsp+2Ch] [rbp-14h]
long long v10; // [rsp+30h] [rbp-10h]
long long v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
*(_BYTE *)(a1 + 1668) = 1;
v7 = ma_search_no_save(v11, v10, v9, v8, v6, &v5);
if ( !v7 && (v9 & 0x20) != 0 )
{
memcpy(*(_QWORD *)(v11 + 896), v5, *(unsigned int *)(*(_QWORD *)v11 + 1980LL));
*(_QWORD *)(v11 + 944) = *(unsigned int *)(v11 + 960) + *(_QWORD *)(v11 + 896);
*(_QWORD *)(v11 + 952) = *(unsigned int *)(v11 + 964) + *(_QWORD *)(v11 + 896);
*(_DWORD *)(v11 + 980) = *(_DWORD *)(*(_QWORD *)(v10 + 8) + 184LL);
*(_QWORD *)(v11 + 1096) = *(_QWORD *)(v11 + 1088);
*(_BYTE *)(v11 + 1668) = 0;
*(_BYTE *)(v11 + 1669) = 0;
}
ma_unpin_all_pages(v11, 0LL);
return v7;
}
| _ma_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
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 RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
LEA R8,[RBP + -0x30]
LEA R9,[RBP + -0x38]
CALL 0x001692e0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JNZ 0x001692c8
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001692c6
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x380]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x3c0]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x3b0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x3c4]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x3b8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x3d4],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x440]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x448],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x685],0x0
LAB_001692c6:
JMP 0x001692c8
LAB_001692c8:
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0016ff70
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x40
POP RBP
RET
|
int _ma_search(long *param_1,long param_2,uint param_3,int8 param_4)
{
void *local_40;
int1 local_38 [12];
int local_2c;
int8 local_28;
uint local_1c;
long local_18;
long *local_10;
*(int1 *)((long)param_1 + 0x684) = 1;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_2c = _ma_search_no_save(param_1,param_2,param_3,param_4,local_38,&local_40);
if ((local_2c == 0) && ((local_1c & 0x20) != 0)) {
memcpy((void *)local_10[0x70],local_40,(ulong)*(uint *)(*local_10 + 0x7bc));
local_10[0x76] = local_10[0x70] + (ulong)*(uint *)(local_10 + 0x78);
local_10[0x77] = local_10[0x70] + (ulong)*(uint *)((long)local_10 + 0x3c4);
*(int4 *)((long)local_10 + 0x3d4) = *(int4 *)(*(long *)(local_18 + 8) + 0xb8);
local_10[0x89] = local_10[0x88];
*(int1 *)((long)local_10 + 0x684) = 0;
*(int1 *)((long)local_10 + 0x685) = 0;
}
_ma_unpin_all_pages(local_10,0);
return local_2c;
}
| |
28,376 | stbi__hdr_test(stbi__context*) | llama.cpp/examples/llava/../../common/stb_image.h | static int stbi__hdr_test(stbi__context* s)
{
int r = stbi__hdr_test_core(s, "#?RADIANCE\n");
stbi__rewind(s);
if(!r) {
r = stbi__hdr_test_core(s, "#?RGBE\n");
stbi__rewind(s);
}
return r;
} | O3 | c | stbi__hdr_test(stbi__context*):
pushq %rbx
movq %rdi, %rbx
leaq 0x10922e(%rip), %rsi # 0x138fb4
callq 0x440a2
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
testl %eax, %eax
je 0x2fda4
movl $0x1, %eax
popq %rbx
retq
leaq 0x109215(%rip), %rsi # 0x138fc0
movq %rbx, %rdi
callq 0x440a2
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
popq %rbx
retq
| _ZL14stbi__hdr_testP13stbi__context:
push rbx
mov rbx, rdi
lea rsi, aRadiance; "#?RADIANCE\n"
call _ZL19stbi__hdr_test_coreP13stbi__contextPKc; stbi__hdr_test_core(stbi__context *,char const*)
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
test eax, eax
jz short loc_2FDA4
mov eax, 1
pop rbx
retn
loc_2FDA4:
lea rsi, aRgbe; "#?RGBE\n"
mov rdi, rbx
call _ZL19stbi__hdr_test_coreP13stbi__contextPKc; stbi__hdr_test_core(stbi__context *,char const*)
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
pop rbx
retn
| long long stbi__hdr_test(long long a1)
{
int v1; // eax
long long result; // rax
v1 = stbi__hdr_test_core(a1, "#?RADIANCE\n");
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
if ( v1 )
return 1LL;
result = stbi__hdr_test_core(a1, "#?RGBE\n");
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return result;
}
| stbi__hdr_test:
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x238fb4]
CALL 0x001440a2
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
TEST EAX,EAX
JZ 0x0012fda4
MOV EAX,0x1
POP RBX
RET
LAB_0012fda4:
LEA RSI,[0x238fc0]
MOV RDI,RBX
CALL 0x001440a2
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
POP RBX
RET
|
/* stbi__hdr_test(stbi__context*) */
int8 stbi__hdr_test(stbi__context *param_1)
{
int iVar1;
int8 uVar2;
iVar1 = stbi__hdr_test_core(param_1,"#?RADIANCE\n");
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
if (iVar1 != 0) {
return 1;
}
uVar2 = stbi__hdr_test_core(param_1,"#?RGBE\n");
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
return uVar2;
}
| |
28,377 | init_myisam_psi_keys | eloqsql/storage/myisam/mi_static.c | void init_myisam_psi_keys()
{
const char* category= "myisam";
int count;
count= array_elements(all_myisam_mutexes);
mysql_mutex_register(category, all_myisam_mutexes, count);
count= array_elements(all_myisam_rwlocks);
mysql_rwlock_register(category, all_myisam_rwlocks, count);
count= array_elements(all_myisam_conds);
mysql_cond_register(category, all_myisam_conds, count);
count= array_elements(all_myisam_files);
mysql_file_register(category, all_myisam_files, count);
count= array_elements(all_myisam_threads);
mysql_thread_register(category, all_myisam_threads, count);
count= array_elements(all_myisam_memory);
mysql_memory_register(category, all_myisam_memory, count);
} | O3 | c | init_myisam_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2f1dda(%rip), %r14 # 0x32fe50
movq (%r14), %rax
leaq 0x54cb3(%rip), %rbx # 0x92d33
leaq 0x2f0049(%rip), %rsi # 0x32e0d0
movq %rbx, %rdi
movl $0x3, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x2f0085(%rip), %rsi # 0x32e120
movq %rbx, %rdi
movl $0x2, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x2f00a0(%rip), %rsi # 0x32e150
movq %rbx, %rdi
movl $0x1, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x2f00ab(%rip), %rsi # 0x32e170
movq %rbx, %rdi
movl $0x4, %edx
callq *0x20(%rax)
movq (%r14), %rax
leaq 0x2f00f6(%rip), %rsi # 0x32e1d0
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
movq 0x3d8(%rax), %rax
leaq 0x2f00fa(%rip), %rsi # 0x32e1f0
movq %rbx, %rdi
movl $0x15, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
| init_myisam_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aThrLockMyisam+9; "myisam"
lea rsi, all_myisam_mutexes
mov rdi, rbx
mov edx, 3
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_myisam_rwlocks
mov rdi, rbx
mov edx, 2
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_myisam_conds
mov rdi, rbx
mov edx, 1
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_myisam_files
mov rdi, rbx
mov edx, 4
call qword ptr [rax+20h]
mov rax, [r14]
lea rsi, all_myisam_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
mov rax, [rax+3D8h]
lea rsi, all_myisam_memory
mov rdi, rbx
mov edx, 15h
pop rbx
pop r14
pop rbp
jmp rax
| long long init_myisam_psi_keys()
{
((void ( *)(char *, _UNKNOWN **, long long))*PSI_server)("myisam", &all_myisam_mutexes, 3LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[1])("myisam", &all_myisam_rwlocks, 2LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[2])("myisam", &all_myisam_conds, 1LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[4])("myisam", &all_myisam_files, 4LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[3])("myisam", &all_myisam_threads, 1LL);
return ((long long ( *)(char *, _UNKNOWN **, long long))PSI_server[123])("myisam", &all_myisam_memory, 21LL);
}
| init_myisam_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x42fe50]
MOV RAX,qword ptr [R14]
LEA RBX,[0x192d33]
LEA RSI,[0x42e0d0]
MOV RDI,RBX
MOV EDX,0x3
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x42e120]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x42e150]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x42e170]
MOV RDI,RBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
LEA RSI,[0x42e1d0]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x3d8]
LEA RSI,[0x42e1f0]
MOV RDI,RBX
MOV EDX,0x15
POP RBX
POP R14
POP RBP
JMP RAX
|
void init_myisam_psi_keys(void)
{
(**(code **)PSI_server)("myisam",all_myisam_mutexes,3);
(**(code **)(PSI_server + 8))("myisam",all_myisam_rwlocks,2);
(**(code **)(PSI_server + 0x10))("myisam",all_myisam_conds,1);
(**(code **)(PSI_server + 0x20))("myisam",all_myisam_files,4);
(**(code **)(PSI_server + 0x18))("myisam",all_myisam_threads,1);
/* WARNING: Could not recover jumptable at 0x0013e102. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x3d8))("myisam",all_myisam_memory,0x15);
return;
}
| |
28,378 | ftb_find_relevance_add_word | eloqsql/storage/myisam/ft_boolean_search.c | static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
FT_INFO *ftb= ftb_param->ftb;
FTB_WORD *ftbw;
int a, b, c;
/*
Find right-most element in the array of query words matching this
word from a document.
*/
for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2)
{
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word+1, ftbw->len-1,
(my_bool) (ftbw->flags & FTB_FLAG_TRUNC)) < 0)
b= c;
else
a= c;
}
/*
If there were no words with truncation operator, we iterate to the
beginning of an array until array element is equal to the word from
a document. This is done mainly because the same word may be
mentioned twice (or more) in the query.
In case query has words with truncation operator we must iterate
to the beginning of the array. There may be non-matching query words
between matching word with truncation operator and the right-most
matching element. E.g., if we're looking for 'aaa15' in an array of
'aaa1* aaa14 aaa15 aaa16'.
Worse of that there still may be match even if the binary search
above didn't find matching element. E.g., if we're looking for
'aaa15' in an array of 'aaa1* aaa14 aaa16'. The binary search will
stop at 'aaa16'.
*/
for (; c >= 0; c--)
{
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word + 1,ftbw->len - 1,
(my_bool)(ftbw->flags & FTB_FLAG_TRUNC)))
{
if (ftb->with_scan & FTB_FLAG_TRUNC)
continue;
else
break;
}
if (ftbw->docid[1] == ftb->info->lastpos)
continue;
ftbw->docid[1]= ftb->info->lastpos;
if (unlikely(_ftb_climb_the_tree(ftb, ftbw, ftb_param->ftsi)))
return 1;
}
return(0);
} | O0 | c | ftb_find_relevance_add_word:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
subl -0x44(%rbp), %eax
cmpl $0x1, %eax
jle 0x69e6b
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
movq -0x40(%rbp), %rcx
addq $0x4d, %rcx
addq $0x1, %rcx
movq -0x40(%rbp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %r8d
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movsbl %al, %r9d
callq 0x87580
cmpl $0x0, %eax
jge 0x69e4d
movl -0x4c(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x69e53
movl -0x4c(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x69e55
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x4c(%rbp)
jmp 0x69de3
jmp 0x69e6d
cmpl $0x0, -0x4c(%rbp)
jl 0x69f58
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
movq -0x40(%rbp), %rcx
addq $0x4d, %rcx
addq $0x1, %rcx
movq -0x40(%rbp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %r8d
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movsbl %al, %r9d
callq 0x87580
cmpl $0x0, %eax
je 0x69ee5
movq -0x38(%rbp), %rax
movzbl 0x344(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x69ee3
jmp 0x69f4a
jmp 0x69f58
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x170(%rcx), %rax
jne 0x69f00
jmp 0x69f4a
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x170(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x69590
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x69f48
movl $0x1, -0x4(%rbp)
jmp 0x69f5f
jmp 0x69f4a
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x69e6d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ftb_find_relevance_add_word:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_38], rax
mov [rbp+var_44], 0
mov rax, [rbp+var_38]
mov eax, [rax+80h]
mov [rbp+var_48], eax
mov eax, [rbp+var_44]
add eax, [rbp+var_48]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_4C], eax
loc_69DE3:
mov eax, [rbp+var_48]
sub eax, [rbp+var_44]
cmp eax, 1
jle short loc_69E6B
mov rax, [rbp+var_38]
mov rax, [rax+20h]
movsxd rcx, [rbp+var_4C]
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rdi, [rax+10h]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
mov rcx, [rbp+var_40]
add rcx, 4Dh ; 'M'
add rcx, 1
mov rax, [rbp+var_40]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov r8d, eax
mov rax, [rbp+var_40]
mov eax, [rax+8]
and eax, 1
movsx r9d, al
call ha_compare_text
cmp eax, 0
jge short loc_69E4D
mov eax, [rbp+var_4C]
mov [rbp+var_48], eax
jmp short loc_69E53
loc_69E4D:
mov eax, [rbp+var_4C]
mov [rbp+var_44], eax
loc_69E53:
jmp short $+2
loc_69E55:
mov eax, [rbp+var_44]
add eax, [rbp+var_48]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_4C], eax
jmp loc_69DE3
loc_69E6B:
jmp short $+2
loc_69E6D:
cmp [rbp+var_4C], 0
jl loc_69F58
mov rax, [rbp+var_38]
mov rax, [rax+20h]
movsxd rcx, [rbp+var_4C]
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rdi, [rax+10h]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
mov rcx, [rbp+var_40]
add rcx, 4Dh ; 'M'
add rcx, 1
mov rax, [rbp+var_40]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov r8d, eax
mov rax, [rbp+var_40]
mov eax, [rax+8]
and eax, 1
movsx r9d, al
call ha_compare_text
cmp eax, 0
jz short loc_69EE5
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax+344h]
and eax, 1
cmp eax, 0
jz short loc_69EE3
jmp short loc_69F4A
loc_69EE3:
jmp short loc_69F58
loc_69EE5:
mov rax, [rbp+var_40]
mov rax, [rax+18h]
mov rcx, [rbp+var_38]
mov rcx, [rcx+8]
cmp rax, [rcx+170h]
jnz short loc_69F00
jmp short loc_69F4A
loc_69F00:
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov rcx, [rax+170h]
mov rax, [rbp+var_40]
mov [rax+18h], rcx
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
mov rax, [rbp+var_30]
mov rdx, [rax+8]
call _ftb_climb_the_tree
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_69F48
mov [rbp+var_4], 1
jmp short loc_69F5F
loc_69F48:
jmp short $+2
loc_69F4A:
mov eax, [rbp+var_4C]
add eax, 0FFFFFFFFh
mov [rbp+var_4C], eax
jmp loc_69E6D
loc_69F58:
mov [rbp+var_4], 0
loc_69F5F:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long ftb_find_relevance_add_word(long long a1, long long a2, int a3)
{
int v4; // [rsp+4h] [rbp-4Ch]
int v5; // [rsp+8h] [rbp-48h]
int v6; // [rsp+Ch] [rbp-44h]
long long v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+10h] [rbp-40h]
long long v9; // [rsp+18h] [rbp-38h]
long long *v10; // [rsp+20h] [rbp-30h]
v10 = *(long long **)(a1 + 24);
v9 = *v10;
v6 = 0;
v5 = *(_DWORD *)(*v10 + 128);
v4 = v5 / 2;
while ( v5 - v6 > 1 )
{
v7 = *(_QWORD *)(*(_QWORD *)(v9 + 32) + 8LL * v4);
if ( (int)ha_compare_text(
*(_QWORD *)(v9 + 16),
a2,
a3,
v7 + 78,
(unsigned int)(*(_DWORD *)(v7 + 72) - 1),
*(_BYTE *)(v7 + 8) & 1) >= 0 )
v6 = v4;
else
v5 = v4;
v4 = (v5 + v6) / 2;
}
while ( v4 >= 0 )
{
v8 = *(_QWORD *)(*(_QWORD *)(v9 + 32) + 8LL * v4);
if ( (unsigned int)ha_compare_text(
*(_QWORD *)(v9 + 16),
a2,
a3,
v8 + 78,
(unsigned int)(*(_DWORD *)(v8 + 72) - 1),
*(_BYTE *)(v8 + 8) & 1) )
{
if ( (*(_BYTE *)(v9 + 836) & 1) == 0 )
break;
}
else if ( *(_QWORD *)(v8 + 24) != *(_QWORD *)(*(_QWORD *)(v9 + 8) + 368LL) )
{
*(_QWORD *)(v8 + 24) = *(_QWORD *)(*(_QWORD *)(v9 + 8) + 368LL);
if ( (unsigned int)ftb_climb_the_tree(v9, v8, (_QWORD *)v10[1]) )
return 1;
}
--v4;
}
return 0;
}
| ftb_find_relevance_add_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x44],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x80]
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x48]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x4c],EAX
LAB_00169de3:
MOV EAX,dword ptr [RBP + -0x48]
SUB EAX,dword ptr [RBP + -0x44]
CMP EAX,0x1
JLE 0x00169e6b
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x4d
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV R8D,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x8]
AND EAX,0x1
MOVSX R9D,AL
CALL 0x00187580
CMP EAX,0x0
JGE 0x00169e4d
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x48],EAX
JMP 0x00169e53
LAB_00169e4d:
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x44],EAX
LAB_00169e53:
JMP 0x00169e55
LAB_00169e55:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x48]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00169de3
LAB_00169e6b:
JMP 0x00169e6d
LAB_00169e6d:
CMP dword ptr [RBP + -0x4c],0x0
JL 0x00169f58
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x4d
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV R8D,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x8]
AND EAX,0x1
MOVSX R9D,AL
CALL 0x00187580
CMP EAX,0x0
JZ 0x00169ee5
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX + 0x344]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00169ee3
JMP 0x00169f4a
LAB_00169ee3:
JMP 0x00169f58
LAB_00169ee5:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x8]
CMP RAX,qword ptr [RCX + 0x170]
JNZ 0x00169f00
JMP 0x00169f4a
LAB_00169f00:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x170]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00169590
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00169f48
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00169f5f
LAB_00169f48:
JMP 0x00169f4a
LAB_00169f4a:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00169e6d
LAB_00169f58:
MOV dword ptr [RBP + -0x4],0x0
LAB_00169f5f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4 ftb_find_relevance_add_word(long param_1,int8 param_2,int param_3)
{
long *plVar1;
long lVar2;
long lVar3;
int iVar4;
int local_54;
int local_50;
int local_4c;
plVar1 = *(long **)(param_1 + 0x18);
lVar2 = *plVar1;
local_4c = 0;
local_50 = *(int *)(lVar2 + 0x80);
local_54 = local_50;
while (local_54 = local_54 / 2, 1 < local_50 - local_4c) {
lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + (long)local_54 * 8);
iVar4 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e,
*(int *)(lVar3 + 0x48) + -1,(byte)*(int4 *)(lVar3 + 8) & 1);
if (iVar4 < 0) {
local_50 = local_54;
}
else {
local_4c = local_54;
}
local_54 = local_4c + local_50;
}
do {
if (local_54 < 0) {
return 0;
}
lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + (long)local_54 * 8);
iVar4 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e,
*(int *)(lVar3 + 0x48) + -1,(byte)*(int4 *)(lVar3 + 8) & 1);
if (iVar4 == 0) {
if (*(long *)(lVar3 + 0x18) != *(long *)(*(long *)(lVar2 + 8) + 0x170)) {
*(int8 *)(lVar3 + 0x18) = *(int8 *)(*(long *)(lVar2 + 8) + 0x170);
iVar4 = _ftb_climb_the_tree(lVar2,lVar3,plVar1[1]);
if (iVar4 != 0) {
return 1;
}
}
}
else if ((*(byte *)(lVar2 + 0x344) & 1) == 0) {
return 0;
}
local_54 = local_54 + -1;
} while( true );
}
| |
28,379 | ggml_vec_dot_iq2_xs_q8_K | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c | void ggml_vec_dot_iq2_xs_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) {
assert(n % QK_K == 0);
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_iq2_xs * GGML_RESTRICT x = vx;
const block_q8_K * GGML_RESTRICT y = vy;
const int nb = n / QK_K;
#if defined(__ARM_NEON)
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
ggml_int8x16x4_t q2u;
ggml_int8x16x4_t q2s;
ggml_int8x16x4_t q8b;
int32x4x4_t scales32;
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
const uint8x8_t scales8 = vld1_u8(x[i].scales);
const uint8x8_t scales_l = vand_u8(scales8, vdup_n_u8(0xf));
const uint8x8_t scales_h = vshr_n_u8(scales8, 4);
uint8x16_t scales = vcombine_u8(vzip1_u8(scales_l, scales_h), vzip2_u8(scales_l, scales_h));
scales = vaddq_u8(vshlq_n_u8(scales, 1), vdupq_n_u8(1));
const uint16x8_t scales1 = vmovl_u8(vget_low_u8(scales));
const uint16x8_t scales2 = vmovl_u8(vget_high_u8(scales));
scales32.val[0] = vreinterpretq_s32_u32(vmovl_u16(vget_low_u16(scales1)));
scales32.val[1] = vreinterpretq_s32_u32(vmovl_u16(vget_high_u16(scales1)));
scales32.val[2] = vreinterpretq_s32_u32(vmovl_u16(vget_low_u16(scales2)));
scales32.val[3] = vreinterpretq_s32_u32(vmovl_u16(vget_high_u16(scales2)));
int32x4_t sumi = vdupq_n_s32(0);
for (int ib64 = 0; ib64 < QK_K/64; ++ib64) {
q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
q2u.val[0] = vcombine_s8(vld1_s8((const void *)(iq2xs_grid + (q2[0] & 511))), vld1_s8((const void *)(iq2xs_grid + (q2[1] & 511))));
q2u.val[1] = vcombine_s8(vld1_s8((const void *)(iq2xs_grid + (q2[2] & 511))), vld1_s8((const void *)(iq2xs_grid + (q2[3] & 511))));
q2u.val[2] = vcombine_s8(vld1_s8((const void *)(iq2xs_grid + (q2[4] & 511))), vld1_s8((const void *)(iq2xs_grid + (q2[5] & 511))));
q2u.val[3] = vcombine_s8(vld1_s8((const void *)(iq2xs_grid + (q2[6] & 511))), vld1_s8((const void *)(iq2xs_grid + (q2[7] & 511))));
q2s.val[0] = vcombine_s8(vld1_s8((const void *)(signs64 + (q2[0] >> 9))), vld1_s8((const void *)(signs64 + (q2[1] >> 9))));
q2s.val[1] = vcombine_s8(vld1_s8((const void *)(signs64 + (q2[2] >> 9))), vld1_s8((const void *)(signs64 + (q2[3] >> 9))));
q2s.val[2] = vcombine_s8(vld1_s8((const void *)(signs64 + (q2[4] >> 9))), vld1_s8((const void *)(signs64 + (q2[5] >> 9))));
q2s.val[3] = vcombine_s8(vld1_s8((const void *)(signs64 + (q2[6] >> 9))), vld1_s8((const void *)(signs64 + (q2[7] >> 9))));
q2u.val[0] = vmulq_s8(q2u.val[0], q2s.val[0]);
q2u.val[1] = vmulq_s8(q2u.val[1], q2s.val[1]);
q2u.val[2] = vmulq_s8(q2u.val[2], q2s.val[2]);
q2u.val[3] = vmulq_s8(q2u.val[3], q2s.val[3]);
const int32x4_t p1 = ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[0], q8b.val[0]);
const int32x4_t p2 = ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[1], q8b.val[1]);
const int32x4_t p3 = ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[2], q8b.val[2]);
const int32x4_t p4 = ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[3], q8b.val[3]);
const int32x4_t p = vpaddq_s32(vpaddq_s32(p1, p2), vpaddq_s32(p3, p4));
sumi = vmlaq_s32(sumi, p, scales32.val[ib64]);
q2 += 8;
}
sumf += d*vaddvq_s32(sumi);
}
*s = 0.125f * sumf;
#elif defined(__AVX2__)
const __m256i mone = _mm256_set1_epi8(1);
static const char block_sign_shuffle_mask_1[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
};
static const char block_sign_shuffle_mask_2[32] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
};
static const uint8_t bit_selector_mask_bytes[32] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
};
const __m256i bit_selector_mask = _mm256_loadu_si256((const __m256i*)bit_selector_mask_bytes);
const __m256i block_sign_shuffle_1 = _mm256_loadu_si256((const __m256i*)block_sign_shuffle_mask_1);
const __m256i block_sign_shuffle_2 = _mm256_loadu_si256((const __m256i*)block_sign_shuffle_mask_2);
static const uint8_t k_bit_helper[32] = {
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
};
const __m256i bit_helper = _mm256_loadu_si256((const __m256i*)k_bit_helper);
const __m256i m511 = _mm256_set1_epi16(511);
const __m128i m4 = _mm_set1_epi8(0xf);
const __m128i m1 = _mm_set1_epi8(1);
uint64_t aux64;
// somewhat hacky, but gives a significant boost in performance
__m256i aux_gindex;
const uint16_t * gindex = (const uint16_t *)&aux_gindex;
__m256 accumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
memcpy(&aux64, x[i].scales, 8);
__m128i stmp = _mm_set1_epi64x(aux64);
stmp = _mm_unpacklo_epi8(_mm_and_si128(stmp, m4), _mm_and_si128(_mm_srli_epi16(stmp, 4), m4));
const __m128i scales = _mm_add_epi8(_mm_slli_epi16(stmp, 1), m1);
__m256i sumi1 = _mm256_setzero_si256();
__m256i sumi2 = _mm256_setzero_si256();
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 4) {
const __m256i q2_data = _mm256_loadu_si256((const __m256i*)q2); q2 += 16;
aux_gindex = _mm256_and_si256(q2_data, m511);
const __m256i partial_sign_bits = _mm256_srli_epi16(q2_data, 9);
const __m256i partial_sign_bits_upper = _mm256_srli_epi16(q2_data, 13);
const __m256i partial_sign_bits_for_counting = _mm256_xor_si256(partial_sign_bits, partial_sign_bits_upper);
const __m256i odd_bits = _mm256_shuffle_epi8(bit_helper, partial_sign_bits_for_counting);
const __m256i full_sign_bits = _mm256_or_si256(partial_sign_bits, odd_bits);
const __m256i q8_1 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q8_2 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q8_3 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q8_4 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q2_1 = _mm256_set_epi64x(iq2xs_grid[gindex[ 3]], iq2xs_grid[gindex[ 2]],
iq2xs_grid[gindex[ 1]], iq2xs_grid[gindex[ 0]]);
const __m256i q2_2 = _mm256_set_epi64x(iq2xs_grid[gindex[ 7]], iq2xs_grid[gindex[ 6]],
iq2xs_grid[gindex[ 5]], iq2xs_grid[gindex[ 4]]);
const __m256i q2_3 = _mm256_set_epi64x(iq2xs_grid[gindex[11]], iq2xs_grid[gindex[10]],
iq2xs_grid[gindex[ 9]], iq2xs_grid[gindex[ 8]]);
const __m256i q2_4 = _mm256_set_epi64x(iq2xs_grid[gindex[15]], iq2xs_grid[gindex[14]],
iq2xs_grid[gindex[13]], iq2xs_grid[gindex[12]]);
const __m128i full_signs_l = _mm256_castsi256_si128(full_sign_bits);
const __m128i full_signs_h = _mm256_extractf128_si256(full_sign_bits, 1);
const __m256i full_signs_1 = MM256_SET_M128I(full_signs_l, full_signs_l);
const __m256i full_signs_2 = MM256_SET_M128I(full_signs_h, full_signs_h);
__m256i signs;
signs = _mm256_shuffle_epi8(full_signs_1, block_sign_shuffle_1);
signs = _mm256_cmpeq_epi8(_mm256_and_si256(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_1 = _mm256_sign_epi8(q8_1, _mm256_or_si256(signs, mone));
signs = _mm256_shuffle_epi8(full_signs_1, block_sign_shuffle_2);
signs = _mm256_cmpeq_epi8(_mm256_and_si256(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_2 = _mm256_sign_epi8(q8_2, _mm256_or_si256(signs, mone));
signs = _mm256_shuffle_epi8(full_signs_2, block_sign_shuffle_1);
signs = _mm256_cmpeq_epi8(_mm256_and_si256(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_3 = _mm256_sign_epi8(q8_3, _mm256_or_si256(signs, mone));
signs = _mm256_shuffle_epi8(full_signs_2, block_sign_shuffle_2);
signs = _mm256_cmpeq_epi8(_mm256_and_si256(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_4 = _mm256_sign_epi8(q8_4, _mm256_or_si256(signs, mone));
const __m256i dot1 = _mm256_maddubs_epi16(q2_1, q8s_1);
const __m256i dot2 = _mm256_maddubs_epi16(q2_2, q8s_2);
const __m256i dot3 = _mm256_maddubs_epi16(q2_3, q8s_3);
const __m256i dot4 = _mm256_maddubs_epi16(q2_4, q8s_4);
const __m256i sc1 = _mm256_cvtepi8_epi16(_mm_shuffle_epi8(scales, get_scale_shuffle(ib32+0)));
const __m256i sc2 = _mm256_cvtepi8_epi16(_mm_shuffle_epi8(scales, get_scale_shuffle(ib32+1)));
const __m256i sc3 = _mm256_cvtepi8_epi16(_mm_shuffle_epi8(scales, get_scale_shuffle(ib32+2)));
const __m256i sc4 = _mm256_cvtepi8_epi16(_mm_shuffle_epi8(scales, get_scale_shuffle(ib32+3)));
sumi1 = _mm256_add_epi32(sumi1, _mm256_madd_epi16(dot1, sc1));
sumi2 = _mm256_add_epi32(sumi2, _mm256_madd_epi16(dot2, sc2));
sumi1 = _mm256_add_epi32(sumi1, _mm256_madd_epi16(dot3, sc3));
sumi2 = _mm256_add_epi32(sumi2, _mm256_madd_epi16(dot4, sc4));
}
accumf = _mm256_fmadd_ps(_mm256_set1_ps(d), _mm256_cvtepi32_ps(_mm256_add_epi32(sumi1, sumi2)), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#elif defined(__AVX__)
const __m128i mone = _mm_set1_epi8(1);
static const char block_sign_shuffle_mask_1[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
};
static const char block_sign_shuffle_mask_2[32] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
};
static const uint8_t bit_selector_mask_bytes[32] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
};
const __m128i bit_selector_mask_0 = _mm_loadu_si128((const __m128i*)bit_selector_mask_bytes);
const __m128i bit_selector_mask_1 = _mm_loadu_si128((const __m128i*)bit_selector_mask_bytes + 1);
const __m128i block_sign_shuffle_1_0 = _mm_loadu_si128((const __m128i*)block_sign_shuffle_mask_1);
const __m128i block_sign_shuffle_1_1 = _mm_loadu_si128((const __m128i*)block_sign_shuffle_mask_1 + 1);
const __m128i block_sign_shuffle_2_0 = _mm_loadu_si128((const __m128i*)block_sign_shuffle_mask_2);
const __m128i block_sign_shuffle_2_1 = _mm_loadu_si128((const __m128i*)block_sign_shuffle_mask_2 + 1);
static const uint8_t k_bit_helper[32] = {
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
};
const __m128i bit_helper_0 = _mm_loadu_si128((const __m128i*)k_bit_helper);
const __m128i bit_helper_1 = _mm_loadu_si128((const __m128i*)k_bit_helper + 1);
const __m128i m511 = _mm_set1_epi16(511);
const __m128i m4 = _mm_set1_epi8(0xf);
const __m128i m1 = _mm_set1_epi8(1);
uint64_t aux64;
// somewhat hacky, but gives a significant boost in performance
__m256i aux_gindex;
const uint16_t * gindex = (const uint16_t *)&aux_gindex;
__m256 accumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
memcpy(&aux64, x[i].scales, 8);
__m128i stmp = _mm_set1_epi64x(aux64);
stmp = _mm_unpacklo_epi8(_mm_and_si128(stmp, m4), _mm_and_si128(_mm_srli_epi16(stmp, 4), m4));
const __m128i scales = _mm_add_epi8(_mm_slli_epi16(stmp, 1), m1);
__m128i sumi1_0 = _mm_setzero_si128();
__m128i sumi1_1 = _mm_setzero_si128();
__m128i sumi2_0 = _mm_setzero_si128();
__m128i sumi2_1 = _mm_setzero_si128();
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 4) {
const __m128i q2_data_0 = _mm_loadu_si128((const __m128i*)q2);
const __m128i q2_data_1 = _mm_loadu_si128((const __m128i*)q2 + 1); q2 += 16;
aux_gindex = MM256_SET_M128I(_mm_and_si128(q2_data_1, m511), _mm_and_si128(q2_data_0, m511));
const __m128i partial_sign_bits_0 = _mm_srli_epi16(q2_data_0, 9);
const __m128i partial_sign_bits_1 = _mm_srli_epi16(q2_data_1, 9);
const __m128i partial_sign_bits_upper_0 = _mm_srli_epi16(q2_data_0, 13);
const __m128i partial_sign_bits_upper_1 = _mm_srli_epi16(q2_data_1, 13);
const __m128i partial_sign_bits_for_counting_0 = _mm_xor_si128(partial_sign_bits_0, partial_sign_bits_upper_0);
const __m128i partial_sign_bits_for_counting_1 = _mm_xor_si128(partial_sign_bits_1, partial_sign_bits_upper_1);
const __m128i odd_bits_0 = _mm_shuffle_epi8(bit_helper_0, partial_sign_bits_for_counting_0);
const __m128i odd_bits_1 = _mm_shuffle_epi8(bit_helper_1, partial_sign_bits_for_counting_1);
const __m128i full_sign_bits_0 = _mm_or_si128(partial_sign_bits_0, odd_bits_0);
const __m128i full_sign_bits_1 = _mm_or_si128(partial_sign_bits_1, odd_bits_1);
const __m128i q8_1_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_1_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_2_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_2_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_3_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_3_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_4_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_4_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q2_1_0 = _mm_set_epi64x(iq2xs_grid[gindex[1]], iq2xs_grid[gindex[0]]);
const __m128i q2_1_1 = _mm_set_epi64x(iq2xs_grid[gindex[3]], iq2xs_grid[gindex[2]]);
const __m128i q2_2_0 = _mm_set_epi64x(iq2xs_grid[gindex[5]], iq2xs_grid[gindex[4]]);
const __m128i q2_2_1 = _mm_set_epi64x(iq2xs_grid[gindex[7]], iq2xs_grid[gindex[6]]);
const __m128i q2_3_0 = _mm_set_epi64x(iq2xs_grid[gindex[9]], iq2xs_grid[gindex[8]]);
const __m128i q2_3_1 = _mm_set_epi64x(iq2xs_grid[gindex[11]], iq2xs_grid[gindex[10]]);
const __m128i q2_4_0 = _mm_set_epi64x(iq2xs_grid[gindex[13]], iq2xs_grid[gindex[12]]);
const __m128i q2_4_1 = _mm_set_epi64x(iq2xs_grid[gindex[15]], iq2xs_grid[gindex[14]]);
// AVX2 full_signs_1 is full_sign_bits_0 here
// AVX2 full_signs_2 is full_sign_bits_1 here
__m128i signs_0, signs_1;
signs_0 = _mm_shuffle_epi8(full_sign_bits_0, block_sign_shuffle_1_0);
signs_1 = _mm_shuffle_epi8(full_sign_bits_0, block_sign_shuffle_1_1);
signs_0 = _mm_cmpeq_epi8(_mm_and_si128(signs_0, bit_selector_mask_0), bit_selector_mask_0);
signs_1 = _mm_cmpeq_epi8(_mm_and_si128(signs_1, bit_selector_mask_1), bit_selector_mask_1);
const __m128i q8s_1_0 = _mm_sign_epi8(q8_1_0, _mm_or_si128(signs_0, mone));
const __m128i q8s_1_1 = _mm_sign_epi8(q8_1_1, _mm_or_si128(signs_1, mone));
signs_0 = _mm_shuffle_epi8(full_sign_bits_0, block_sign_shuffle_2_0);
signs_1 = _mm_shuffle_epi8(full_sign_bits_0, block_sign_shuffle_2_1);
signs_0 = _mm_cmpeq_epi8(_mm_and_si128(signs_0, bit_selector_mask_0), bit_selector_mask_0);
signs_1 = _mm_cmpeq_epi8(_mm_and_si128(signs_1, bit_selector_mask_1), bit_selector_mask_1);
const __m128i q8s_2_0 = _mm_sign_epi8(q8_2_0, _mm_or_si128(signs_0, mone));
const __m128i q8s_2_1 = _mm_sign_epi8(q8_2_1, _mm_or_si128(signs_1, mone));
signs_0 = _mm_shuffle_epi8(full_sign_bits_1, block_sign_shuffle_1_0);
signs_1 = _mm_shuffle_epi8(full_sign_bits_1, block_sign_shuffle_1_1);
signs_0 = _mm_cmpeq_epi8(_mm_and_si128(signs_0, bit_selector_mask_0), bit_selector_mask_0);
signs_1 = _mm_cmpeq_epi8(_mm_and_si128(signs_1, bit_selector_mask_1), bit_selector_mask_1);
const __m128i q8s_3_0 = _mm_sign_epi8(q8_3_0, _mm_or_si128(signs_0, mone));
const __m128i q8s_3_1 = _mm_sign_epi8(q8_3_1, _mm_or_si128(signs_1, mone));
signs_0 = _mm_shuffle_epi8(full_sign_bits_1, block_sign_shuffle_2_0);
signs_1 = _mm_shuffle_epi8(full_sign_bits_1, block_sign_shuffle_2_1);
signs_0 = _mm_cmpeq_epi8(_mm_and_si128(signs_0, bit_selector_mask_0), bit_selector_mask_0);
signs_1 = _mm_cmpeq_epi8(_mm_and_si128(signs_1, bit_selector_mask_1), bit_selector_mask_1);
const __m128i q8s_4_0 = _mm_sign_epi8(q8_4_0, _mm_or_si128(signs_0, mone));
const __m128i q8s_4_1 = _mm_sign_epi8(q8_4_1, _mm_or_si128(signs_1, mone));
const __m128i dot1_0 = _mm_maddubs_epi16(q2_1_0, q8s_1_0);
const __m128i dot1_1 = _mm_maddubs_epi16(q2_1_1, q8s_1_1);
const __m128i dot2_0 = _mm_maddubs_epi16(q2_2_0, q8s_2_0);
const __m128i dot2_1 = _mm_maddubs_epi16(q2_2_1, q8s_2_1);
const __m128i dot3_0 = _mm_maddubs_epi16(q2_3_0, q8s_3_0);
const __m128i dot3_1 = _mm_maddubs_epi16(q2_3_1, q8s_3_1);
const __m128i dot4_0 = _mm_maddubs_epi16(q2_4_0, q8s_4_0);
const __m128i dot4_1 = _mm_maddubs_epi16(q2_4_1, q8s_4_1);
__m128i sc_tmp = _mm_shuffle_epi8(scales, get_scale_shuffle(ib32+0));
const __m128i sc1_0 = _mm_cvtepi8_epi16(sc_tmp);
const __m128i sc1_1 = _mm_cvtepi8_epi16(_mm_srli_si128(sc_tmp, 8));
sc_tmp = _mm_shuffle_epi8(scales, get_scale_shuffle(ib32+1));
const __m128i sc2_0 = _mm_cvtepi8_epi16(sc_tmp);
const __m128i sc2_1 = _mm_cvtepi8_epi16(_mm_srli_si128(sc_tmp, 8));
sc_tmp = _mm_shuffle_epi8(scales, get_scale_shuffle(ib32+2));
const __m128i sc3_0 = _mm_cvtepi8_epi16(sc_tmp);
const __m128i sc3_1 = _mm_cvtepi8_epi16(_mm_srli_si128(sc_tmp, 8));
sc_tmp = _mm_shuffle_epi8(scales, get_scale_shuffle(ib32+3));
const __m128i sc4_0 = _mm_cvtepi8_epi16(sc_tmp);
const __m128i sc4_1 = _mm_cvtepi8_epi16(_mm_srli_si128(sc_tmp, 8));
sumi1_0 = _mm_add_epi32(sumi1_0, _mm_madd_epi16(dot1_0, sc1_0));
sumi1_1 = _mm_add_epi32(sumi1_1, _mm_madd_epi16(dot1_1, sc1_1));
sumi2_0 = _mm_add_epi32(sumi2_0, _mm_madd_epi16(dot2_0, sc2_0));
sumi2_1 = _mm_add_epi32(sumi2_1, _mm_madd_epi16(dot2_1, sc2_1));
sumi1_0 = _mm_add_epi32(sumi1_0, _mm_madd_epi16(dot3_0, sc3_0));
sumi1_1 = _mm_add_epi32(sumi1_1, _mm_madd_epi16(dot3_1, sc3_1));
sumi2_0 = _mm_add_epi32(sumi2_0, _mm_madd_epi16(dot4_0, sc4_0));
sumi2_1 = _mm_add_epi32(sumi2_1, _mm_madd_epi16(dot4_1, sc4_1));
}
accumf = _mm256_add_ps(_mm256_mul_ps(_mm256_set1_ps(d), _mm256_cvtepi32_ps(MM256_SET_M128I(_mm_add_epi32(sumi1_1, sumi2_1), _mm_add_epi32(sumi1_0, sumi2_0)))), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#elif defined(__loongarch_asx)
const __m256i mone = __lasx_xvreplgr2vr_b(1);
static const char block_sign_shuffle_mask_1[32] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
};
static const char block_sign_shuffle_mask_2[32] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
};
static const uint8_t bit_selector_mask_bytes[32] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
};
const __m256i bit_selector_mask = __lasx_xvld((const __m256i*)bit_selector_mask_bytes, 0);
const __m256i block_sign_shuffle_1 = __lasx_xvld((const __m256i*)block_sign_shuffle_mask_1, 0);
const __m256i block_sign_shuffle_2 = __lasx_xvld((const __m256i*)block_sign_shuffle_mask_2, 0);
static const uint8_t k_bit_helper[32] = {
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00,
};
const __m256i bit_helper = __lasx_xvld((const __m256i*)k_bit_helper, 0);
const __m256i m511 = __lasx_xvreplgr2vr_h(511);
const __m128i m4 = __lsx_vreplgr2vr_b(0xf);
const __m128i m1 = __lsx_vreplgr2vr_b(1);
uint64_t aux64;
// somewhat hacky, but gives a significant boost in performance
__m256i aux_gindex;
const uint16_t * gindex = (const uint16_t *)&aux_gindex;
__m256 accumf = (__m256)__lasx_xvldi(0);
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
memcpy(&aux64, x[i].scales, 8);
__m128i stmp = __lsx_vreplgr2vr_d(aux64);
stmp = __lsx_vilvl_b( __lsx_vand_v(__lsx_vsrli_h(stmp, 4), m4), __lsx_vand_v(stmp, m4));
const __m128i scales = __lsx_vadd_b(__lsx_vslli_h(stmp, 1), m1);
__m256i sumi1 = __lasx_xvldi(0);
__m256i sumi2 = __lasx_xvldi(0);
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 4) {
const __m256i q2_data = __lasx_xvld((const __m256i*)q2, 0); q2 += 16;
aux_gindex = __lasx_xvand_v(q2_data, m511);
const __m256i partial_sign_bits = __lasx_xvsrli_h(q2_data, 9);
const __m256i partial_sign_bits_upper = __lasx_xvsrli_h(q2_data, 13);
const __m256i partial_sign_bits_for_counting = __lasx_xvxor_v(partial_sign_bits, partial_sign_bits_upper);
const __m256i odd_bits = lasx_shuffle_b(bit_helper, partial_sign_bits_for_counting);
const __m256i full_sign_bits = __lasx_xvor_v(partial_sign_bits, odd_bits);
const __m256i q8_1 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q8_2 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q8_3 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q8_4 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q2_1 = lasx_set_d(iq2xs_grid[gindex[ 3]], iq2xs_grid[gindex[ 2]],
iq2xs_grid[gindex[ 1]], iq2xs_grid[gindex[ 0]]);
const __m256i q2_2 = lasx_set_d(iq2xs_grid[gindex[ 7]], iq2xs_grid[gindex[ 6]],
iq2xs_grid[gindex[ 5]], iq2xs_grid[gindex[ 4]]);
const __m256i q2_3 = lasx_set_d(iq2xs_grid[gindex[11]], iq2xs_grid[gindex[10]],
iq2xs_grid[gindex[ 9]], iq2xs_grid[gindex[ 8]]);
const __m256i q2_4 = lasx_set_d(iq2xs_grid[gindex[15]], iq2xs_grid[gindex[14]],
iq2xs_grid[gindex[13]], iq2xs_grid[gindex[12]]);
const __m128i full_signs_l = lasx_extracti128(full_sign_bits, 0);
const __m128i full_signs_h = lasx_extracti128(full_sign_bits, 1);
const __m256i full_signs_1 = lasx_insertf128(full_signs_l, full_signs_l);
const __m256i full_signs_2 = lasx_insertf128(full_signs_h, full_signs_h);
__m256i signs;
signs = lasx_shuffle_b(full_signs_1, block_sign_shuffle_1);
signs = __lasx_xvseq_b(__lasx_xvand_v(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_1 = __lasx_xvsigncov_b(__lasx_xvor_v(signs, mone), q8_1);
signs = lasx_shuffle_b(full_signs_1, block_sign_shuffle_2);
signs = __lasx_xvseq_b(__lasx_xvand_v(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_2 = __lasx_xvsigncov_b(__lasx_xvor_v(signs, mone), q8_2);
signs = lasx_shuffle_b(full_signs_2, block_sign_shuffle_1);
signs = __lasx_xvseq_b(__lasx_xvand_v(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_3 = __lasx_xvsigncov_b(__lasx_xvor_v(signs, mone), q8_3);
signs = lasx_shuffle_b(full_signs_2, block_sign_shuffle_2);
signs = __lasx_xvseq_b(__lasx_xvand_v(signs, bit_selector_mask), bit_selector_mask);
const __m256i q8s_4 = __lasx_xvsigncov_b(__lasx_xvor_v(signs, mone), q8_4);
const __m256i dot1 = lasx_maddubs_h(q2_1, q8s_1);
const __m256i dot2 = lasx_maddubs_h(q2_2, q8s_2);
const __m256i dot3 = lasx_maddubs_h(q2_3, q8s_3);
const __m256i dot4 = lasx_maddubs_h(q2_4, q8s_4);
const __m256i sc1 = lasx_ext8_16(lsx_shuffle_b(scales, get_scale_shuffle(ib32+0)));
const __m256i sc2 = lasx_ext8_16(lsx_shuffle_b(scales, get_scale_shuffle(ib32+1)));
const __m256i sc3 = lasx_ext8_16(lsx_shuffle_b(scales, get_scale_shuffle(ib32+2)));
const __m256i sc4 = lasx_ext8_16(lsx_shuffle_b(scales, get_scale_shuffle(ib32+3)));
sumi1 = __lasx_xvadd_w(sumi1, lasx_madd_h(dot1, sc1));
sumi2 = __lasx_xvadd_w(sumi2, lasx_madd_h(dot2, sc2));
sumi1 = __lasx_xvadd_w(sumi1, lasx_madd_h(dot3, sc3));
sumi2 = __lasx_xvadd_w(sumi2, lasx_madd_h(dot4, sc4));
}
accumf = __lasx_xvfmadd_s(__lasx_xvreplfr2vr_s(d), __lasx_xvffint_s_w(__lasx_xvadd_w(sumi1, sumi2)), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#elif defined(__POWER9_VECTOR__)
const vector int v0 = vec_splats((int32_t)0);
vector float vsumf0 = vec_splats(0.0f);
vector float vsumf1 = vec_splats(0.0f);
vector float vsumf2 = vec_splats(0.0f);
vector float vsumf3 = vec_splats(0.0f);
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
for (int i = 0; i < nb; ++i) {
vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[i].d));
vector float vyd = vec_splats(y[i].d);
vector float vd = vec_mul(vxd, vyd);
vector signed int vsumi0 = v0;
vector signed int vsumi1 = v0;
vector signed int vsumi2 = v0;
vector signed int vsumi3 = v0;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const uint8_t * GGML_RESTRICT sc = x[i].scales;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
for (int j = 0; j < QK_K/64; ++j) {
__builtin_prefetch(q2, 0, 1);
__builtin_prefetch(q8, 0, 1);
vector signed long long aux64x2_0 = {*(const int64_t *)(iq2xs_grid + (q2[0] & 511)), *(const int64_t *)(iq2xs_grid + (q2[1] & 511))};
vector signed long long aux64x2_1 = {*(const int64_t *)(iq2xs_grid + (q2[2] & 511)), *(const int64_t *)(iq2xs_grid + (q2[3] & 511))};
vector signed long long aux64x2_2 = {*(const int64_t *)(iq2xs_grid + (q2[4] & 511)), *(const int64_t *)(iq2xs_grid + (q2[5] & 511))};
vector signed long long aux64x2_3 = {*(const int64_t *)(iq2xs_grid + (q2[6] & 511)), *(const int64_t *)(iq2xs_grid + (q2[7] & 511))};
vector signed long long vsigns0 = {*(const int64_t *)(signs64 + ((q2[0] >> 9))), *(const int64_t *)(signs64 + ((q2[1] >> 9)))};
vector signed long long vsigns1 = {*(const int64_t *)(signs64 + ((q2[2] >> 9))), *(const int64_t *)(signs64 + ((q2[3] >> 9)))};
vector signed long long vsigns2 = {*(const int64_t *)(signs64 + ((q2[4] >> 9))), *(const int64_t *)(signs64 + ((q2[5] >> 9)))};
vector signed long long vsigns3 = {*(const int64_t *)(signs64 + ((q2[6] >> 9))), *(const int64_t *)(signs64 + ((q2[7] >> 9)))};
q2 += 8;
vector signed char q2x0 = (vector signed char)vec_mul((vector signed char)vsigns0, (vector signed char)aux64x2_0);
vector signed char q2x1 = (vector signed char)vec_mul((vector signed char)vsigns1, (vector signed char)aux64x2_1);
vector signed char q2x2 = (vector signed char)vec_mul((vector signed char)vsigns2, (vector signed char)aux64x2_2);
vector signed char q2x3 = (vector signed char)vec_mul((vector signed char)vsigns3, (vector signed char)aux64x2_3);
vector signed char q8y0 = vec_xl( 0, q8);
vector signed char q8y1 = vec_xl(16, q8);
vector signed char q8y2 = vec_xl(32, q8);
vector signed char q8y3 = vec_xl(48, q8);
q8 += 64;
vector signed short qv0 = vec_add(vec_mule(q2x0, q8y0), vec_mulo(q2x0, q8y0));
vector signed short qv1 = vec_add(vec_mule(q2x1, q8y1), vec_mulo(q2x1, q8y1));
vector signed short qv2 = vec_add(vec_mule(q2x2, q8y2), vec_mulo(q2x2, q8y2));
vector signed short qv3 = vec_add(vec_mule(q2x3, q8y3), vec_mulo(q2x3, q8y3));
const uint16_t ls0 = (uint16_t)(sc[0] & 0xf);
const uint16_t ls1 = (uint16_t)(sc[0] >> 4);
const uint16_t ls2 = (uint16_t)(sc[1] & 0xf);
const uint16_t ls3 = (uint16_t)(sc[1] >> 4);
sc += 2;
vector signed short vscales0 = vec_splats((int16_t)(2*ls0+1));
vector signed short vscales1 = vec_splats((int16_t)(2*ls1+1));
vector signed short vscales2 = vec_splats((int16_t)(2*ls2+1));
vector signed short vscales3 = vec_splats((int16_t)(2*ls3+1));
vsumi0 = vec_msum(qv0, vscales0, vsumi0);
vsumi1 = vec_msum(qv1, vscales1, vsumi1);
vsumi2 = vec_msum(qv2, vscales2, vsumi2);
vsumi3 = vec_msum(qv3, vscales3, vsumi3);
}
vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0);
vsumf1 = vec_madd(vec_ctf(vsumi1, 0), vd, vsumf1);
vsumf2 = vec_madd(vec_ctf(vsumi2, 0), vd, vsumf2);
vsumf3 = vec_madd(vec_ctf(vsumi3, 0), vd, vsumf3);
}
vsumf0 = vec_add(vsumf0, vsumf2);
vsumf1 = vec_add(vsumf1, vsumf3);
vsumf0 = vec_add(vsumf0, vsumf1);
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4));
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8));
*s = 0.125f * vec_extract(vsumf0, 0);
#else
float sumf = 0.f;
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * GGML_RESTRICT q2 = x[i].qs;
const uint8_t * GGML_RESTRICT sc = x[i].scales;
const int8_t * GGML_RESTRICT q8 = y[i].qs;
int32_t bsum = 0;
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
const uint16_t ls1 = 2*(sc[ib32] & 0xf) + 1;
const uint16_t ls2 = 2*(sc[ib32] >> 4) + 1;
int32_t sumi = 0;
for (int l = 0; l < 2; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xs_grid + (q2[l] & 511));
const uint8_t signs = ksigns_iq2xs[q2[l] >> 9];
for (int j = 0; j < 8; ++j) {
sumi += grid[j] * q8[j] * (signs & kmask_iq2xs[j] ? -1 : 1);
}
q8 += 8;
}
bsum += sumi * ls1;
sumi = 0;
for (int l = 2; l < 4; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xs_grid + (q2[l] & 511));
const uint8_t signs = ksigns_iq2xs[q2[l] >> 9];
for (int j = 0; j < 8; ++j) {
sumi += grid[j] * q8[j] * (signs & kmask_iq2xs[j] ? -1 : 1);
}
q8 += 8;
}
bsum += sumi * ls2;
q2 += 4;
}
sumf += d * bsum;
}
*s = 0.125f * sumf;
#endif
} | O1 | c | ggml_vec_dot_iq2_xs_q8_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
vxorps %xmm0, %xmm0, %xmm0
cmpl $0x100, %edi # imm = 0x100
jl 0x1f66d
shrl $0x8, %edi
leaq 0x2(%rcx), %rax
leaq 0x4(%r9), %rdx
vxorps %xmm30, %xmm30, %xmm30
xorl %r8d, %r8d
vpbroadcastb 0x2b59d(%rip), %xmm20 # 0x4a8ae
vpbroadcastb 0x2b594(%rip), %xmm19 # 0x4a8af
vpbroadcastw 0x2b58c(%rip), %ymm2 # 0x4a8b0
vbroadcasti128 0x33f63(%rip), %ymm3 # ymm3 = mem[0,1,0,1]
movq 0x3cc2c(%rip), %r10 # 0x5bf60
leaq 0x2c195(%rip), %r11 # 0x4b4d0
vmovdqa 0x2b35d(%rip), %ymm4 # 0x4a6a0
vpbroadcastq 0x2b514(%rip), %ymm5 # 0x4a860
vpbroadcastb 0x2b55a(%rip), %ymm6 # 0x4a8af
vmovdqa 0x2b363(%rip), %ymm8 # 0x4a6c0
vbroadcasti128 0x33f3a(%rip), %ymm9 # ymm9 = mem[0,1,0,1]
vpcmpeqd %ymm10, %ymm10, %ymm10
vpmovsxbd 0x2b4f4(%rip), %ymm11 # 0x4a868
vbroadcasti128 0x33f33(%rip), %ymm12 # ymm12 = mem[0,1,0,1]
leaq 0x33e4c(%rip), %rbx # 0x531d0
imulq $0x4a, %r8, %r14
movzwl (%rcx,%r14), %r15d
vmovss (%r10,%r15,4), %xmm21
imulq $0x124, %r8, %r15 # imm = 0x124
vmovss (%r9,%r15), %xmm22
vmovq 0x42(%rcx,%r14), %xmm0
vpsrlw $0x4, %xmm0, %xmm1
vpandq %xmm20, %xmm0, %xmm0
vpandq %xmm20, %xmm1, %xmm1
vpunpcklbw %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
vpaddw %xmm0, %xmm0, %xmm0
vporq %xmm19, %xmm0, %xmm15
xorl %r14d, %r14d
vpxord %xmm16, %xmm16, %xmm16
vpxord %xmm17, %xmm17, %xmm17
vmovdqu (%rax,%r14,2), %ymm0
vpandq %ymm2, %ymm0, %ymm23
vpsrlw $0x9, %ymm0, %ymm1
vpsrlw $0xd, %ymm0, %ymm0
vpxor %ymm0, %ymm1, %ymm0
vpshufb %ymm0, %ymm3, %ymm0
vporq %ymm0, %ymm1, %ymm18
vmovdqu (%rdx,%r14,8), %ymm14
vmovdqu 0x20(%rdx,%r14,8), %ymm13
vmovdqu 0x40(%rdx,%r14,8), %ymm0
vmovdqu 0x60(%rdx,%r14,8), %ymm1
vpextrw $0x3, %xmm23, %r15d
vpextrw $0x2, %xmm23, %r12d
vpextrw $0x1, %xmm23, %r13d
vpextrw $0x0, %xmm23, %ebp
vmovq (%r11,%r15,8), %xmm24
vmovq (%r11,%r12,8), %xmm25
vmovq (%r11,%r13,8), %xmm26
vpunpcklqdq %xmm24, %xmm25, %xmm24 # xmm24 = xmm25[0],xmm24[0]
vmovq (%r11,%rbp,8), %xmm25
vpunpcklqdq %xmm26, %xmm25, %xmm25 # xmm25 = xmm25[0],xmm26[0]
vpextrw $0x7, %xmm23, %r15d
vpextrw $0x6, %xmm23, %r12d
vpextrw $0x5, %xmm23, %r13d
vpextrw $0x4, %xmm23, %ebp
vinserti32x4 $0x1, %xmm24, %ymm25, %ymm24
vmovq (%r11,%r15,8), %xmm25
vmovq (%r11,%r12,8), %xmm26
vpunpcklqdq %xmm25, %xmm26, %xmm25 # xmm25 = xmm26[0],xmm25[0]
vmovq (%r11,%r13,8), %xmm26
vmovq (%r11,%rbp,8), %xmm27
vpunpcklqdq %xmm26, %xmm27, %xmm26 # xmm26 = xmm27[0],xmm26[0]
vextracti32x4 $0x1, %ymm23, %xmm23
vpextrw $0x3, %xmm23, %r15d
vpextrw $0x2, %xmm23, %r12d
vpextrw $0x1, %xmm23, %r13d
vpextrw $0x0, %xmm23, %ebp
vmovq (%r11,%r15,8), %xmm27
vmovq (%r11,%r12,8), %xmm28
vinserti32x4 $0x1, %xmm25, %ymm26, %ymm25
vpunpcklqdq %xmm27, %xmm28, %xmm26 # xmm26 = xmm28[0],xmm27[0]
vmovq (%r11,%r13,8), %xmm27
vmovq (%r11,%rbp,8), %xmm28
vpunpcklqdq %xmm27, %xmm28, %xmm27 # xmm27 = xmm28[0],xmm27[0]
vinserti32x4 $0x1, %xmm26, %ymm27, %ymm26
vpextrw $0x7, %xmm23, %r15d
vpextrw $0x6, %xmm23, %r12d
vpextrw $0x5, %xmm23, %r13d
vpextrw $0x4, %xmm23, %ebp
vmovq (%r11,%r15,8), %xmm23
vmovq (%r11,%r12,8), %xmm27
vmovq (%r11,%r13,8), %xmm28
vmovq (%r11,%rbp,8), %xmm29
vpunpcklqdq %xmm23, %xmm27, %xmm23 # xmm23 = xmm27[0],xmm23[0]
vpunpcklqdq %xmm28, %xmm29, %xmm27 # xmm27 = xmm29[0],xmm28[0]
vinserti32x4 $0x1, %xmm23, %ymm27, %ymm23
vpermq $0x44, %ymm18, %ymm27 # ymm27 = ymm18[0,1,0,1]
vpshufb %ymm4, %ymm27, %ymm28
vptestnmb %ymm5, %ymm28, %k1
vpblendmb %ymm6, %ymm10, %ymm7 {%k1}
vpsignb %ymm7, %ymm14, %ymm7
vpshufb %ymm8, %ymm27, %ymm14
vptestnmb %ymm5, %ymm14, %k1
vpblendmb %ymm6, %ymm10, %ymm14 {%k1}
vpsignb %ymm14, %ymm13, %ymm13
vpshufb %ymm9, %ymm18, %ymm14
vpermd %ymm14, %ymm11, %ymm14
vptestnmb %ymm5, %ymm14, %k1
vpblendmb %ymm6, %ymm10, %ymm14 {%k1}
vpsignb %ymm14, %ymm0, %ymm0
vpshufb %ymm12, %ymm18, %ymm14
vpermd %ymm14, %ymm11, %ymm14
vptestnmb %ymm5, %ymm14, %k1
vpblendmb %ymm6, %ymm10, %ymm14 {%k1}
vpsignb %ymm14, %ymm1, %ymm1
vpmaddubsw %ymm7, %ymm24, %ymm7
vpmaddubsw %ymm13, %ymm25, %ymm13
vpmaddubsw %ymm0, %ymm26, %ymm0
vpmaddubsw %ymm1, %ymm23, %ymm1
vpshufb (%rbx,%r14,4), %xmm15, %xmm14
vpmovsxbw %xmm14, %ymm14
vpmaddwd %ymm7, %ymm14, %ymm7
vpaddd %ymm16, %ymm7, %ymm7
vpshufb 0x10(%rbx,%r14,4), %xmm15, %xmm14
vpmovsxbw %xmm14, %ymm14
vpmaddwd %ymm14, %ymm13, %ymm13
vpaddd %ymm17, %ymm13, %ymm13
vpshufb 0x20(%rbx,%r14,4), %xmm15, %xmm14
vpmovsxbw %xmm14, %ymm14
vpmaddwd %ymm0, %ymm14, %ymm0
vpshufb 0x30(%rbx,%r14,4), %xmm15, %xmm14
vpaddd %ymm0, %ymm7, %ymm16
vpmovsxbw %xmm14, %ymm0
vpmaddwd %ymm0, %ymm1, %ymm0
vpaddd %ymm0, %ymm13, %ymm17
addq $0x10, %r14
cmpq $0x10, %r14
je 0x1f3d7
vmulss %xmm22, %xmm21, %xmm0
vbroadcastss %xmm0, %ymm1
vpaddd %ymm17, %ymm16, %ymm0
vcvtdq2ps %ymm0, %ymm0
vfmadd213ps %ymm30, %ymm1, %ymm0 # ymm0 = (ymm1 * ymm0) + ymm30
incq %r8
addq $0x4a, %rax
addq $0x124, %rdx # imm = 0x124
vmovaps %ymm0, %ymm30
cmpq %rdi, %r8
jne 0x1f384
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmulss 0x2aee4(%rip), %xmm0, %xmm0 # 0x4a570
vmovss %xmm0, (%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
| ggml_vec_dot_iq2_xs_q8_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
vxorps xmm0, xmm0, xmm0
cmp edi, 100h
jl loc_1F66D
shr edi, 8
lea rax, [rcx+2]
lea rdx, [r9+4]
vxorps xmm30, xmm30, xmm30
xor r8d, r8d
vpbroadcastb xmm20, cs:byte_4A8AE
vpbroadcastb xmm19, cs:byte_4A8AF
vpbroadcastw ymm2, cs:word_4A8B0
vbroadcasti128 ymm3, cs:xmmword_53290
mov r10, cs:ggml_table_f32_f16_ptr
lea r11, iq2xs_grid
vmovdqa ymm4, cs:ymmword_4A6A0
vpbroadcastq ymm5, cs:qword_4A860
vpbroadcastb ymm6, cs:byte_4A8AF
vmovdqa ymm8, cs:ymmword_4A6C0
vbroadcasti128 ymm9, cs:xmmword_532A0
vpcmpeqd ymm10, ymm10, ymm10
vpmovsxbd ymm11, cs:qword_4A868
vbroadcasti128 ymm12, cs:xmmword_532B0
lea rbx, get_scale_shuffle_k_shuffle
loc_1F384:
imul r14, r8, 4Ah ; 'J'
movzx r15d, word ptr [rcx+r14]
vmovss xmm21, dword ptr [r10+r15*4]
imul r15, r8, 124h
vmovss xmm22, dword ptr [r9+r15]
vmovq xmm0, qword ptr [rcx+r14+42h]
vpsrlw xmm1, xmm0, 4
vpandq xmm0, xmm0, xmm20
vpandq xmm1, xmm1, xmm20
vpunpcklbw xmm0, xmm0, xmm1
vpaddw xmm0, xmm0, xmm0
vporq xmm15, xmm0, xmm19
xor r14d, r14d
vpxord xmm16, xmm16, xmm16
vpxord xmm17, xmm17, xmm17
loc_1F3D7:
vmovdqu ymm0, ymmword ptr [rax+r14*2]
vpandq ymm23, ymm0, ymm2
vpsrlw ymm1, ymm0, 9
vpsrlw ymm0, ymm0, 0Dh
vpxor ymm0, ymm1, ymm0
vpshufb ymm0, ymm3, ymm0
vporq ymm18, ymm1, ymm0
vmovdqu ymm14, ymmword ptr [rdx+r14*8]
vmovdqu ymm13, ymmword ptr [rdx+r14*8+20h]
vmovdqu ymm0, ymmword ptr [rdx+r14*8+40h]
vmovdqu ymm1, ymmword ptr [rdx+r14*8+60h]
vpextrw r15d, xmm23, 3
vpextrw r12d, xmm23, 2
vpextrw r13d, xmm23, 1
vpextrw ebp, xmm23, 0
vmovq xmm24, qword ptr [r11+r15*8]
vmovq xmm25, qword ptr [r11+r12*8]
vmovq xmm26, qword ptr [r11+r13*8]
vpunpcklqdq xmm24, xmm25, xmm24
vmovq xmm25, qword ptr [r11+rbp*8]
vpunpcklqdq xmm25, xmm25, xmm26
vpextrw r15d, xmm23, 7
vpextrw r12d, xmm23, 6
vpextrw r13d, xmm23, 5
vpextrw ebp, xmm23, 4
vinserti32x4 ymm24, ymm25, xmm24, 1
vmovq xmm25, qword ptr [r11+r15*8]
vmovq xmm26, qword ptr [r11+r12*8]
vpunpcklqdq xmm25, xmm26, xmm25
vmovq xmm26, qword ptr [r11+r13*8]
vmovq xmm27, qword ptr [r11+rbp*8]
vpunpcklqdq xmm26, xmm27, xmm26
vextracti32x4 xmm23, ymm23, 1
vpextrw r15d, xmm23, 3
vpextrw r12d, xmm23, 2
vpextrw r13d, xmm23, 1
vpextrw ebp, xmm23, 0
vmovq xmm27, qword ptr [r11+r15*8]
vmovq xmm28, qword ptr [r11+r12*8]
vinserti32x4 ymm25, ymm26, xmm25, 1
vpunpcklqdq xmm26, xmm28, xmm27
vmovq xmm27, qword ptr [r11+r13*8]
vmovq xmm28, qword ptr [r11+rbp*8]
vpunpcklqdq xmm27, xmm28, xmm27
vinserti32x4 ymm26, ymm27, xmm26, 1
vpextrw r15d, xmm23, 7
vpextrw r12d, xmm23, 6
vpextrw r13d, xmm23, 5
vpextrw ebp, xmm23, 4
vmovq xmm23, qword ptr [r11+r15*8]
vmovq xmm27, qword ptr [r11+r12*8]
vmovq xmm28, qword ptr [r11+r13*8]
vmovq xmm29, qword ptr [r11+rbp*8]
vpunpcklqdq xmm23, xmm27, xmm23
vpunpcklqdq xmm27, xmm29, xmm28
vinserti32x4 ymm23, ymm27, xmm23, 1
vpermq ymm27, ymm18, 44h ; 'D'
vpshufb ymm28, ymm27, ymm4
vptestnmb k1, ymm28, ymm5
vpblendmb ymm7{k1}, ymm10, ymm6
vpsignb ymm7, ymm14, ymm7
vpshufb ymm14, ymm27, ymm8
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm13, ymm13, ymm14
vpshufb ymm14, ymm18, ymm9
vpermd ymm14, ymm11, ymm14
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm0, ymm0, ymm14
vpshufb ymm14, ymm18, ymm12
vpermd ymm14, ymm11, ymm14
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm1, ymm1, ymm14
vpmaddubsw ymm7, ymm24, ymm7
vpmaddubsw ymm13, ymm25, ymm13
vpmaddubsw ymm0, ymm26, ymm0
vpmaddubsw ymm1, ymm23, ymm1
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm7, ymm14, ymm7
vpaddd ymm7, ymm7, ymm16
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+10h]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm13, ymm13, ymm14
vpaddd ymm13, ymm13, ymm17
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+20h]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm0, ymm14, ymm0
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+30h]
vpaddd ymm16, ymm7, ymm0
vpmovsxbw ymm0, xmm14
vpmaddwd ymm0, ymm1, ymm0
vpaddd ymm17, ymm13, ymm0
add r14, 10h
cmp r14, 10h
jz loc_1F3D7
vmulss xmm0, xmm21, xmm22
vbroadcastss ymm1, xmm0
vpaddd ymm0, ymm16, ymm17
vcvtdq2ps ymm0, ymm0
vfmadd213ps ymm0, ymm1, ymm30
inc r8
add rax, 4Ah ; 'J'
add rdx, 124h
vmovaps ymm30, ymm0
cmp r8, rdi
jnz loc_1F384
loc_1F66D:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmulss xmm0, xmm0, cs:dword_4A570
vmovss dword ptr [rsi], xmm0
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
| void ggml_vec_dot_iq2_xs_q8_K(
int a1,
long long _RSI,
__m128 _XMM0,
long long a4,
long long _RCX,
long long a6,
long long _R9)
{
long long v17; // rdi
long long v21; // r8
__asm { vxorps xmm0, xmm0, xmm0 }
if ( a1 >= 256 )
{
v17 = (unsigned int)a1 >> 8;
_RAX = _RCX + 2;
_RDX = _R9 + 4;
__asm { vxorps xmm30, xmm30, xmm30 }
v21 = 0LL;
__asm
{
vpbroadcastb xmm20, cs:byte_4A8AE
vpbroadcastb xmm19, cs:byte_4A8AF
vpbroadcastw ymm2, cs:word_4A8B0
vbroadcasti128 ymm3, cs:xmmword_53290
}
_R10 = &ggml_table_f32_f16;
_R11 = &iq2xs_grid;
__asm
{
vmovdqa ymm4, cs:ymmword_4A6A0
vpbroadcastq ymm5, cs:qword_4A860
vpbroadcastb ymm6, cs:byte_4A8AF
vmovdqa ymm8, cs:ymmword_4A6C0
vbroadcasti128 ymm9, cs:xmmword_532A0
vpcmpeqd ymm10, ymm10, ymm10
vpmovsxbd ymm11, cs:qword_4A868
vbroadcasti128 ymm12, cs:xmmword_532B0
}
do
{
_R14 = 74 * v21;
_R15 = *(unsigned __int16 *)(_RCX + 74 * v21);
__asm { vmovss xmm21, dword ptr [r10+r15*4] }
_R15 = 292 * v21;
__asm
{
vmovss xmm22, dword ptr [r9+r15]
vmovq xmm0, qword ptr [rcx+r14+42h]
vpsrlw xmm1, xmm0, 4
vpandq xmm0, xmm0, xmm20
vpandq xmm1, xmm1, xmm20
vpunpcklbw xmm0, xmm0, xmm1
vpaddw xmm0, xmm0, xmm0
vporq xmm15, xmm0, xmm19
}
_R14 = 0LL;
__asm
{
vpxord xmm16, xmm16, xmm16
vpxord xmm17, xmm17, xmm17
}
do
{
__asm
{
vmovdqu ymm0, ymmword ptr [rax+r14*2]
vpandq ymm23, ymm0, ymm2
vpsrlw ymm1, ymm0, 9
vpsrlw ymm0, ymm0, 0Dh
vpxor ymm0, ymm1, ymm0
vpshufb ymm0, ymm3, ymm0
vporq ymm18, ymm1, ymm0
vmovdqu ymm14, ymmword ptr [rdx+r14*8]
vmovdqu ymm13, ymmword ptr [rdx+r14*8+20h]
vmovdqu ymm0, ymmword ptr [rdx+r14*8+40h]
vmovdqu ymm1, ymmword ptr [rdx+r14*8+60h]
vpextrw r15d, xmm23, 3
vpextrw r12d, xmm23, 2
vpextrw r13d, xmm23, 1
vpextrw ebp, xmm23, 0
vmovq xmm24, qword ptr [r11+r15*8]
vmovq xmm25, qword ptr [r11+r12*8]
vmovq xmm26, qword ptr [r11+r13*8]
vpunpcklqdq xmm24, xmm25, xmm24
vmovq xmm25, qword ptr [r11+rbp*8]
vpunpcklqdq xmm25, xmm25, xmm26
vpextrw r15d, xmm23, 7
vpextrw r12d, xmm23, 6
vpextrw r13d, xmm23, 5
vpextrw ebp, xmm23, 4
vinserti32x4 ymm24, ymm25, xmm24, 1
vmovq xmm25, qword ptr [r11+r15*8]
vmovq xmm26, qword ptr [r11+r12*8]
vpunpcklqdq xmm25, xmm26, xmm25
vmovq xmm26, qword ptr [r11+r13*8]
vmovq xmm27, qword ptr [r11+rbp*8]
vpunpcklqdq xmm26, xmm27, xmm26
vextracti32x4 xmm23, ymm23, 1
vpextrw r15d, xmm23, 3
vpextrw r12d, xmm23, 2
vpextrw r13d, xmm23, 1
vpextrw ebp, xmm23, 0
vmovq xmm27, qword ptr [r11+r15*8]
vmovq xmm28, qword ptr [r11+r12*8]
vinserti32x4 ymm25, ymm26, xmm25, 1
vpunpcklqdq xmm26, xmm28, xmm27
vmovq xmm27, qword ptr [r11+r13*8]
vmovq xmm28, qword ptr [r11+rbp*8]
vpunpcklqdq xmm27, xmm28, xmm27
vinserti32x4 ymm26, ymm27, xmm26, 1
vpextrw r15d, xmm23, 7
vpextrw r12d, xmm23, 6
vpextrw r13d, xmm23, 5
vpextrw ebp, xmm23, 4
vmovq xmm23, qword ptr [r11+r15*8]
vmovq xmm27, qword ptr [r11+r12*8]
vmovq xmm28, qword ptr [r11+r13*8]
vmovq xmm29, qword ptr [r11+rbp*8]
vpunpcklqdq xmm23, xmm27, xmm23
vpunpcklqdq xmm27, xmm29, xmm28
vinserti32x4 ymm23, ymm27, xmm23, 1
vpermq ymm27, ymm18, 44h ; 'D'
vpshufb ymm28, ymm27, ymm4
vptestnmb k1, ymm28, ymm5
vpblendmb ymm7{k1}, ymm10, ymm6
vpsignb ymm7, ymm14, ymm7
vpshufb ymm14, ymm27, ymm8
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm13, ymm13, ymm14
vpshufb ymm14, ymm18, ymm9
vpermd ymm14, ymm11, ymm14
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm0, ymm0, ymm14
vpshufb ymm14, ymm18, ymm12
vpermd ymm14, ymm11, ymm14
vptestnmb k1, ymm14, ymm5
vpblendmb ymm14{k1}, ymm10, ymm6
vpsignb ymm1, ymm1, ymm14
vpmaddubsw ymm7, ymm24, ymm7
vpmaddubsw ymm13, ymm25, ymm13
vpmaddubsw ymm0, ymm26, ymm0
vpmaddubsw ymm1, ymm23, ymm1
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm7, ymm14, ymm7
vpaddd ymm7, ymm7, ymm16
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+10h]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm13, ymm13, ymm14
vpaddd ymm13, ymm13, ymm17
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+20h]
vpmovsxbw ymm14, xmm14
vpmaddwd ymm0, ymm14, ymm0
vpshufb xmm14, xmm15, xmmword ptr [rbx+r14*4+30h]
vpaddd ymm16, ymm7, ymm0
vpmovsxbw ymm0, xmm14
vpmaddwd ymm0, ymm1, ymm0
vpaddd ymm17, ymm13, ymm0
}
_R14 += 16LL;
}
while ( _R14 == 16 );
__asm
{
vmulss xmm0, xmm21, xmm22
vbroadcastss ymm1, xmm0
vpaddd ymm0, ymm16, ymm17
vcvtdq2ps ymm0, ymm0
vfmadd213ps ymm0, ymm1, ymm30
}
++v21;
_RAX += 74LL;
_RDX += 292LL;
__asm { vmovaps ymm30, ymm0 }
}
while ( v21 != v17 );
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmulss xmm0, xmm0, cs:dword_4A570
vmovss dword ptr [rsi], xmm0
vzeroupper
}
}
| ggml_vec_dot_iq2_xs_q8_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
VXORPS XMM0,XMM0,XMM0
CMP EDI,0x100
JL 0x0011f66d
SHR EDI,0x8
LEA RAX,[RCX + 0x2]
LEA RDX,[R9 + 0x4]
VXORPS XMM14,XMM14,XMM14
XOR R8D,R8D
VPBROADCASTB XMM4,byte ptr [0x0014a8ae]
VPBROADCASTB XMM3,byte ptr [0x0014a8af]
VPBROADCASTW YMM2,word ptr [0x0014a8b0]
VBROADCASTI128 YMM3,xmmword ptr [0x00153290]
MOV R10,qword ptr [0x0015bf60]
LEA R11,[0x14b4d0]
VMOVDQA YMM4,ymmword ptr [0x0014a6a0]
VPBROADCASTQ YMM5,qword ptr [0x0014a860]
VPBROADCASTB YMM6,byte ptr [0x0014a8af]
VMOVDQA YMM8,ymmword ptr [0x0014a6c0]
VBROADCASTI128 YMM9,xmmword ptr [0x001532a0]
VPCMPEQD YMM10,YMM10,YMM10
VPMOVSXBD YMM11,qword ptr [0x0014a868]
VBROADCASTI128 YMM12,xmmword ptr [0x001532b0]
LEA RBX,[0x1531d0]
LAB_0011f384:
IMUL R14,R8,0x4a
MOVZX R15D,word ptr [RCX + R14*0x1]
VMOVSS XMM5{K0},dword ptr [R10 + R15*0x4]
IMUL R15,R8,0x124
VMOVSS XMM6{K0},dword ptr [R9 + R15*0x1]
VMOVQ XMM0,qword ptr [RCX + R14*0x1 + 0x42]
VPSRLW XMM1,XMM0,0x4
VPANDQ XMM0,XMM0,XMM4
VPANDQ XMM1,XMM1,XMM4
VPUNPCKLBW XMM0,XMM0,XMM1
VPADDW XMM0,XMM0,XMM0
VPORQ XMM15,XMM0,XMM3
XOR R14D,R14D
VPXORD XMM0,XMM0,XMM0
VPXORD XMM1,XMM1,XMM1
LAB_0011f3d7:
VMOVDQU YMM0,ymmword ptr [RAX + R14*0x2]
VPANDQ YMM7,YMM0,YMM2
VPSRLW YMM1,YMM0,0x9
VPSRLW YMM0,YMM0,0xd
VPXOR YMM0,YMM1,YMM0
VPSHUFB YMM0,YMM3,YMM0
VPORQ YMM2,YMM1,YMM0
VMOVDQU YMM14,ymmword ptr [RDX + R14*0x8]
VMOVDQU YMM13,ymmword ptr [RDX + R14*0x8 + 0x20]
VMOVDQU YMM0,ymmword ptr [RDX + R14*0x8 + 0x40]
VMOVDQU YMM1,ymmword ptr [RDX + R14*0x8 + 0x60]
VPEXTRW R15D,XMM7,0x3
VPEXTRW R12D,XMM7,0x2
VPEXTRW R13D,XMM7,0x1
VPEXTRW EBP,XMM7,0x0
VMOVQ XMM8,qword ptr [R11 + R15*0x8]
VMOVQ XMM9,qword ptr [R11 + R12*0x8]
VMOVQ XMM10,qword ptr [R11 + R13*0x8]
VPUNPCKLQDQ XMM8,XMM9,XMM8
VMOVQ XMM9,qword ptr [R11 + RBP*0x8]
VPUNPCKLQDQ XMM9,XMM9,XMM10
VPEXTRW R15D,XMM7,0x7
VPEXTRW R12D,XMM7,0x6
VPEXTRW R13D,XMM7,0x5
VPEXTRW EBP,XMM7,0x4
VINSERTI32X4 YMM8,YMM9,XMM8,0x1
VMOVQ XMM9,qword ptr [R11 + R15*0x8]
VMOVQ XMM10,qword ptr [R11 + R12*0x8]
VPUNPCKLQDQ XMM9,XMM10,XMM9
VMOVQ XMM10,qword ptr [R11 + R13*0x8]
VMOVQ XMM11,qword ptr [R11 + RBP*0x8]
VPUNPCKLQDQ XMM10,XMM11,XMM10
VEXTRACTI32X4 XMM7,YMM7,0x1
VPEXTRW R15D,XMM7,0x3
VPEXTRW R12D,XMM7,0x2
VPEXTRW R13D,XMM7,0x1
VPEXTRW EBP,XMM7,0x0
VMOVQ XMM11,qword ptr [R11 + R15*0x8]
VMOVQ XMM12,qword ptr [R11 + R12*0x8]
VINSERTI32X4 YMM9,YMM10,XMM9,0x1
VPUNPCKLQDQ XMM10,XMM12,XMM11
VMOVQ XMM11,qword ptr [R11 + R13*0x8]
VMOVQ XMM12,qword ptr [R11 + RBP*0x8]
VPUNPCKLQDQ XMM11,XMM12,XMM11
VINSERTI32X4 YMM10,YMM11,XMM10,0x1
VPEXTRW R15D,XMM7,0x7
VPEXTRW R12D,XMM7,0x6
VPEXTRW R13D,XMM7,0x5
VPEXTRW EBP,XMM7,0x4
VMOVQ XMM7,qword ptr [R11 + R15*0x8]
VMOVQ XMM11,qword ptr [R11 + R12*0x8]
VMOVQ XMM12,qword ptr [R11 + R13*0x8]
VMOVQ XMM13,qword ptr [R11 + RBP*0x8]
VPUNPCKLQDQ XMM7,XMM11,XMM7
VPUNPCKLQDQ XMM11,XMM13,XMM12
VINSERTI32X4 YMM7,YMM11,XMM7,0x1
VPERMQ YMM11,YMM2,0x44
VPSHUFB YMM12,YMM11,YMM4
VPTESTNMB K1 {K0},YMM12,YMM5
VPBLENDMB YMM7{K1},YMM10,YMM6
VPSIGNB YMM7,YMM14,YMM7
VPSHUFB YMM14,YMM11,YMM8
VPTESTNMB K1 {K0},YMM14,YMM5
VPBLENDMB YMM14{K1},YMM10,YMM6
VPSIGNB YMM13,YMM13,YMM14
VPSHUFB YMM14,YMM2,YMM9
VPERMD YMM14,YMM11,YMM14
VPTESTNMB K1 {K0},YMM14,YMM5
VPBLENDMB YMM14{K1},YMM10,YMM6
VPSIGNB YMM0,YMM0,YMM14
VPSHUFB YMM14,YMM2,YMM12
VPERMD YMM14,YMM11,YMM14
VPTESTNMB K1 {K0},YMM14,YMM5
VPBLENDMB YMM14{K1},YMM10,YMM6
VPSIGNB YMM1,YMM1,YMM14
VPMADDUBSW YMM7,YMM8,YMM7
VPMADDUBSW YMM13,YMM9,YMM13
VPMADDUBSW YMM0,YMM10,YMM0
VPMADDUBSW YMM1,YMM7,YMM1
VPSHUFB XMM14,XMM15,xmmword ptr [RBX + R14*0x4]
VPMOVSXBW YMM14,XMM14
VPMADDWD YMM7,YMM14,YMM7
VPADDD YMM7,YMM7,YMM0
VPSHUFB XMM14,XMM15,xmmword ptr [RBX + R14*0x4 + 0x10]
VPMOVSXBW YMM14,XMM14
VPMADDWD YMM13,YMM13,YMM14
VPADDD YMM13,YMM13,YMM1
VPSHUFB XMM14,XMM15,xmmword ptr [RBX + R14*0x4 + 0x20]
VPMOVSXBW YMM14,XMM14
VPMADDWD YMM0,YMM14,YMM0
VPSHUFB XMM14,XMM15,xmmword ptr [RBX + R14*0x4 + 0x30]
VPADDD YMM0,YMM7,YMM0
VPMOVSXBW YMM0,XMM14
VPMADDWD YMM0,YMM1,YMM0
VPADDD YMM1,YMM13,YMM0
ADD R14,0x10
CMP R14,0x10
JZ 0x0011f3d7
VMULSS XMM0,XMM5,XMM6
VBROADCASTSS YMM1,XMM0
VPADDD YMM0,YMM0,YMM1
VCVTDQ2PS YMM0,YMM0
VFMADD213PS YMM0,YMM1,YMM14
INC R8
ADD RAX,0x4a
ADD RDX,0x124
VMOVAPS YMM14,YMM0
CMP R8,RDI
JNZ 0x0011f384
LAB_0011f66d:
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM1,XMM0
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMULSS XMM0,XMM0,dword ptr [0x0014a570]
VMOVSS dword ptr [RSI],XMM0
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_vec_dot_iq2_xs_q8_K
(uint param_1,float *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
bool bVar1;
uint uVar2;
byte bVar3;
long lVar4;
long lVar5;
ulong uVar6;
long lVar7;
uint in_K0;
ulong uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar12 [32];
int1 auVar11 [16];
int1 auVar13 [32];
int1 auVar14 [32];
int1 auVar15 [32];
int1 auVar16 [32];
int1 auVar17 [32];
int1 auVar18 [32];
int1 auVar19 [32];
int4 uVar21;
int1 auVar22 [16];
int1 auVar23 [32];
int1 auVar24 [16];
int1 auVar25 [32];
int1 auVar26 [64];
int1 auVar27 [32];
ulong uVar28;
uint uVar29;
int1 auVar30 [16];
int1 auVar31 [16];
int1 auVar32 [16];
int1 auVar33 [16];
int1 auVar34 [16];
int1 auVar35 [16];
int1 auVar36 [16];
int1 in_ZMM10 [64];
int1 auVar37 [16];
int1 auVar38 [16];
int1 auVar39 [16];
int1 auVar40 [16];
int1 auVar41 [16];
int1 auVar42 [16];
int1 auVar43 [16];
int1 auVar44 [16];
int1 in_ZMM14 [64];
int1 auVar20 [32];
auVar23 = ZEXT1632(ZEXT816(0) << 0x40);
if (0xff < (int)param_1) {
lVar4 = param_4 + 2;
lVar5 = param_6 + 4;
vxorps_avx512vl(in_ZMM14._0_16_,in_ZMM14._0_16_);
uVar6 = 0;
vpbroadcastb_avx512vl(ZEXT116(DAT_0014a8ae));
vpbroadcastb_avx512vl(ZEXT116(DAT_0014a8af));
auVar26 = ZEXT3264(CONCAT230(DAT_0014a8b0,
CONCAT228(DAT_0014a8b0,
CONCAT226(DAT_0014a8b0,
CONCAT224(DAT_0014a8b0,
CONCAT222(DAT_0014a8b0,
CONCAT220(DAT_0014a8b0,
CONCAT218(
DAT_0014a8b0,
CONCAT216(DAT_0014a8b0,
CONCAT214(DAT_0014a8b0,
CONCAT212(DAT_0014a8b0,
CONCAT210(
DAT_0014a8b0,
CONCAT28(DAT_0014a8b0,
CONCAT26(DAT_0014a8b0,
CONCAT24(DAT_0014a8b0,
CONCAT22(DAT_0014a8b0,
DAT_0014a8b0))
))))))))))))));
auVar27._16_16_ = _DAT_00153290;
auVar27._0_16_ = _DAT_00153290;
uVar29 = CONCAT13(DAT_0014a8af,CONCAT12(DAT_0014a8af,CONCAT11(DAT_0014a8af,DAT_0014a8af)));
vpcmpeqd_avx2(in_ZMM10._0_32_,in_ZMM10._0_32_);
auVar9._8_8_ = 0;
auVar9._0_8_ = DAT_0014a868;
vpmovsxbd_avx2(auVar9);
uVar28 = DAT_0014a860;
do {
bVar3 = (byte)in_K0;
uVar2 = (uint)(bVar3 & 1) *
*(int *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)(param_4 + uVar6 * 0x4a) * 4) +
(uint)!(bool)(bVar3 & 1) * (int)uVar28;
uVar28 = (ulong)uVar2;
uVar29 = (uint)(bVar3 & 1) * *(int *)(param_6 + uVar6 * 0x124) + !(bool)(bVar3 & 1) * uVar29;
auVar10._8_8_ = 0;
auVar10._0_8_ = *(ulong *)(param_4 + 0x42 + uVar6 * 0x4a);
auVar24 = vpsrlw_avx(auVar10,4);
auVar9 = vpandq_avx512vl(auVar10,SUB3216(_DAT_0014a6a0,0));
auVar10 = vpandq_avx512vl(auVar24,SUB3216(_DAT_0014a6a0,0));
auVar9 = vpunpcklbw_avx(auVar9,auVar10);
auVar9 = vpaddw_avx(auVar9,auVar9);
auVar24 = vporq_avx512vl(auVar9,_DAT_00153290);
lVar7 = 0;
vpxord_avx512vl(auVar9,auVar9);
vpxord_avx512vl(auVar10,auVar10);
do {
auVar23 = *(int1 (*) [32])(lVar4 + lVar7 * 2);
auVar12 = vpandq_avx512vl(auVar23,auVar26._0_32_);
auVar25 = vpsrlw_avx2(auVar23,9);
auVar23 = vpsrlw_avx2(auVar23,0xd);
auVar23 = vpshufb_avx2(auVar27,auVar25 ^ auVar23);
auVar13 = vporq_avx512vl(auVar25,auVar23);
auVar26 = ZEXT3264(auVar13);
auVar11._8_8_ = 0;
auVar11._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._6_2_ * 8);
auVar31._8_8_ = 0;
auVar31._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._4_2_ * 8);
auVar9 = vpunpcklqdq_avx512vl(auVar31,auVar11);
auVar32._8_8_ = 0;
auVar32._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._0_2_ * 8);
auVar34._8_8_ = 0;
auVar34._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._2_2_ * 8);
auVar10 = vpunpcklqdq_avx512vl(auVar32,auVar34);
auVar14 = vinserti32x4_avx512vl(ZEXT1632(auVar10),auVar9,1);
auVar33._8_8_ = 0;
auVar33._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._14_2_ * 8);
auVar35._8_8_ = 0;
auVar35._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._12_2_ * 8);
auVar9 = vpunpcklqdq_avx512vl(auVar35,auVar33);
auVar36._8_8_ = 0;
auVar36._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._10_2_ * 8);
auVar37._8_8_ = 0;
auVar37._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar12._8_2_ * 8);
auVar10 = vpunpcklqdq_avx512vl(auVar37,auVar36);
auVar11 = vextracti32x4_avx512vl(auVar12,1);
auVar15 = vinserti32x4_avx512vl(ZEXT1632(auVar10),auVar9,1);
auVar38._8_8_ = 0;
auVar38._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._6_2_ * 8);
auVar41._8_8_ = 0;
auVar41._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._4_2_ * 8);
auVar9 = vpunpcklqdq_avx512vl(auVar41,auVar38);
auVar39._8_8_ = 0;
auVar39._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._2_2_ * 8);
auVar42._8_8_ = 0;
auVar42._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._0_2_ * 8);
auVar10 = vpunpcklqdq_avx512vl(auVar42,auVar39);
auVar16 = vinserti32x4_avx512vl(ZEXT1632(auVar10),auVar9,1);
auVar30._8_8_ = 0;
auVar30._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._14_2_ * 8);
auVar40._8_8_ = 0;
auVar40._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._12_2_ * 8);
auVar9 = vpunpcklqdq_avx512vl(auVar40,auVar30);
auVar43._8_8_ = 0;
auVar43._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._10_2_ * 8);
auVar44._8_8_ = 0;
auVar44._0_8_ = *(ulong *)(iq2xs_grid + (ulong)auVar11._8_2_ * 8);
auVar10 = vpunpcklqdq_avx512vl(auVar44,auVar43);
auVar23 = vinserti32x4_avx512vl(ZEXT1632(auVar10),auVar9,1);
auVar17 = vpermq_avx512vl(auVar13,0x44);
auVar18 = vpshufb_avx512vl(auVar17,_DAT_0014a6a0);
uVar8 = vptestnmb_avx512vl(auVar18,ZEXT432(uVar2));
uVar8 = in_K0 & uVar8;
auVar25 = vpblendmb_avx512vl(auVar16,ZEXT432(uVar29));
bVar1 = (bool)((byte)uVar8 & 1);
auVar12[0] = bVar1 * auVar25[0] | !bVar1 * auVar23[0];
bVar1 = (bool)((byte)(uVar8 >> 1) & 1);
auVar12[1] = bVar1 * auVar25[1] | !bVar1 * auVar23[1];
bVar1 = (bool)((byte)(uVar8 >> 2) & 1);
auVar12[2] = bVar1 * auVar25[2] | !bVar1 * auVar23[2];
bVar1 = (bool)((byte)(uVar8 >> 3) & 1);
auVar12[3] = bVar1 * auVar25[3] | !bVar1 * auVar23[3];
bVar1 = (bool)((byte)(uVar8 >> 4) & 1);
auVar12[4] = bVar1 * auVar25[4] | !bVar1 * auVar23[4];
bVar1 = (bool)((byte)(uVar8 >> 5) & 1);
auVar12[5] = bVar1 * auVar25[5] | !bVar1 * auVar23[5];
bVar1 = (bool)((byte)(uVar8 >> 6) & 1);
auVar12[6] = bVar1 * auVar25[6] | !bVar1 * auVar23[6];
bVar1 = (bool)((byte)(uVar8 >> 7) & 1);
auVar12[7] = bVar1 * auVar25[7] | !bVar1 * auVar23[7];
bVar1 = (bool)((byte)(uVar8 >> 8) & 1);
auVar12[8] = bVar1 * auVar25[8] | !bVar1 * auVar23[8];
bVar1 = (bool)((byte)(uVar8 >> 9) & 1);
auVar12[9] = bVar1 * auVar25[9] | !bVar1 * auVar23[9];
bVar1 = (bool)((byte)(uVar8 >> 10) & 1);
auVar12[10] = bVar1 * auVar25[10] | !bVar1 * auVar23[10];
bVar1 = (bool)((byte)(uVar8 >> 0xb) & 1);
auVar12[0xb] = bVar1 * auVar25[0xb] | !bVar1 * auVar23[0xb];
bVar1 = (bool)((byte)(uVar8 >> 0xc) & 1);
auVar12[0xc] = bVar1 * auVar25[0xc] | !bVar1 * auVar23[0xc];
bVar1 = (bool)((byte)(uVar8 >> 0xd) & 1);
auVar12[0xd] = bVar1 * auVar25[0xd] | !bVar1 * auVar23[0xd];
bVar1 = (bool)((byte)(uVar8 >> 0xe) & 1);
auVar12[0xe] = bVar1 * auVar25[0xe] | !bVar1 * auVar23[0xe];
bVar1 = (bool)((byte)(uVar8 >> 0xf) & 1);
auVar12[0xf] = bVar1 * auVar25[0xf] | !bVar1 * auVar23[0xf];
bVar1 = (bool)((byte)(uVar8 >> 0x10) & 1);
auVar12[0x10] = bVar1 * auVar25[0x10] | !bVar1 * auVar23[0x10];
bVar1 = (bool)((byte)(uVar8 >> 0x11) & 1);
auVar12[0x11] = bVar1 * auVar25[0x11] | !bVar1 * auVar23[0x11];
bVar1 = (bool)((byte)(uVar8 >> 0x12) & 1);
auVar12[0x12] = bVar1 * auVar25[0x12] | !bVar1 * auVar23[0x12];
bVar1 = (bool)((byte)(uVar8 >> 0x13) & 1);
auVar12[0x13] = bVar1 * auVar25[0x13] | !bVar1 * auVar23[0x13];
bVar1 = (bool)((byte)(uVar8 >> 0x14) & 1);
auVar12[0x14] = bVar1 * auVar25[0x14] | !bVar1 * auVar23[0x14];
bVar1 = (bool)((byte)(uVar8 >> 0x15) & 1);
auVar12[0x15] = bVar1 * auVar25[0x15] | !bVar1 * auVar23[0x15];
bVar1 = (bool)((byte)(uVar8 >> 0x16) & 1);
auVar12[0x16] = bVar1 * auVar25[0x16] | !bVar1 * auVar23[0x16];
bVar1 = (bool)((byte)(uVar8 >> 0x17) & 1);
auVar12[0x17] = bVar1 * auVar25[0x17] | !bVar1 * auVar23[0x17];
bVar1 = (bool)((byte)(uVar8 >> 0x18) & 1);
auVar12[0x18] = bVar1 * auVar25[0x18] | !bVar1 * auVar23[0x18];
bVar1 = (bool)((byte)(uVar8 >> 0x19) & 1);
auVar12[0x19] = bVar1 * auVar25[0x19] | !bVar1 * auVar23[0x19];
bVar1 = (bool)((byte)(uVar8 >> 0x1a) & 1);
auVar12[0x1a] = bVar1 * auVar25[0x1a] | !bVar1 * auVar23[0x1a];
bVar1 = (bool)((byte)(uVar8 >> 0x1b) & 1);
auVar12[0x1b] = bVar1 * auVar25[0x1b] | !bVar1 * auVar23[0x1b];
bVar1 = (bool)((byte)(uVar8 >> 0x1c) & 1);
auVar12[0x1c] = bVar1 * auVar25[0x1c] | !bVar1 * auVar23[0x1c];
bVar1 = (bool)((byte)(uVar8 >> 0x1d) & 1);
auVar12._30_2_ = auVar25._30_2_;
auVar12[0x1d] = bVar1 * auVar25[0x1d] | !bVar1 * auVar23[0x1d];
auVar23 = vpsignb_avx2(*(int1 (*) [32])(lVar5 + lVar7 * 8),auVar12);
auVar12 = vpshufb_avx512vl(auVar17,auVar14);
uVar8 = vptestnmb_avx512vl(auVar12,ZEXT432(uVar2));
uVar8 = in_K0 & uVar8;
auVar25 = vpblendmb_avx512vl(auVar16,ZEXT432(uVar29));
bVar1 = (bool)((byte)uVar8 & 1);
auVar19[0] = bVar1 * auVar25[0] | !bVar1 * auVar12[0];
bVar1 = (bool)((byte)(uVar8 >> 1) & 1);
auVar19[1] = bVar1 * auVar25[1] | !bVar1 * auVar12[1];
bVar1 = (bool)((byte)(uVar8 >> 2) & 1);
auVar19[2] = bVar1 * auVar25[2] | !bVar1 * auVar12[2];
bVar1 = (bool)((byte)(uVar8 >> 3) & 1);
auVar19[3] = bVar1 * auVar25[3] | !bVar1 * auVar12[3];
bVar1 = (bool)((byte)(uVar8 >> 4) & 1);
auVar19[4] = bVar1 * auVar25[4] | !bVar1 * auVar12[4];
bVar1 = (bool)((byte)(uVar8 >> 5) & 1);
auVar19[5] = bVar1 * auVar25[5] | !bVar1 * auVar12[5];
bVar1 = (bool)((byte)(uVar8 >> 6) & 1);
auVar19[6] = bVar1 * auVar25[6] | !bVar1 * auVar12[6];
bVar1 = (bool)((byte)(uVar8 >> 7) & 1);
auVar19[7] = bVar1 * auVar25[7] | !bVar1 * auVar12[7];
bVar1 = (bool)((byte)(uVar8 >> 8) & 1);
auVar19[8] = bVar1 * auVar25[8] | !bVar1 * auVar12[8];
bVar1 = (bool)((byte)(uVar8 >> 9) & 1);
auVar19[9] = bVar1 * auVar25[9] | !bVar1 * auVar12[9];
bVar1 = (bool)((byte)(uVar8 >> 10) & 1);
auVar19[10] = bVar1 * auVar25[10] | !bVar1 * auVar12[10];
bVar1 = (bool)((byte)(uVar8 >> 0xb) & 1);
auVar19[0xb] = bVar1 * auVar25[0xb] | !bVar1 * auVar12[0xb];
bVar1 = (bool)((byte)(uVar8 >> 0xc) & 1);
auVar19[0xc] = bVar1 * auVar25[0xc] | !bVar1 * auVar12[0xc];
bVar1 = (bool)((byte)(uVar8 >> 0xd) & 1);
auVar19[0xd] = bVar1 * auVar25[0xd] | !bVar1 * auVar12[0xd];
bVar1 = (bool)((byte)(uVar8 >> 0xe) & 1);
auVar19[0xe] = bVar1 * auVar25[0xe] | !bVar1 * auVar12[0xe];
bVar1 = (bool)((byte)(uVar8 >> 0xf) & 1);
auVar19[0xf] = bVar1 * auVar25[0xf] | !bVar1 * auVar12[0xf];
bVar1 = (bool)((byte)(uVar8 >> 0x10) & 1);
auVar19[0x10] = bVar1 * auVar25[0x10] | !bVar1 * auVar12[0x10];
bVar1 = (bool)((byte)(uVar8 >> 0x11) & 1);
auVar19[0x11] = bVar1 * auVar25[0x11] | !bVar1 * auVar12[0x11];
bVar1 = (bool)((byte)(uVar8 >> 0x12) & 1);
auVar19[0x12] = bVar1 * auVar25[0x12] | !bVar1 * auVar12[0x12];
bVar1 = (bool)((byte)(uVar8 >> 0x13) & 1);
auVar19[0x13] = bVar1 * auVar25[0x13] | !bVar1 * auVar12[0x13];
bVar1 = (bool)((byte)(uVar8 >> 0x14) & 1);
auVar19[0x14] = bVar1 * auVar25[0x14] | !bVar1 * auVar12[0x14];
bVar1 = (bool)((byte)(uVar8 >> 0x15) & 1);
auVar19[0x15] = bVar1 * auVar25[0x15] | !bVar1 * auVar12[0x15];
bVar1 = (bool)((byte)(uVar8 >> 0x16) & 1);
auVar19[0x16] = bVar1 * auVar25[0x16] | !bVar1 * auVar12[0x16];
bVar1 = (bool)((byte)(uVar8 >> 0x17) & 1);
auVar19[0x17] = bVar1 * auVar25[0x17] | !bVar1 * auVar12[0x17];
bVar1 = (bool)((byte)(uVar8 >> 0x18) & 1);
auVar19[0x18] = bVar1 * auVar25[0x18] | !bVar1 * auVar12[0x18];
bVar1 = (bool)((byte)(uVar8 >> 0x19) & 1);
auVar19[0x19] = bVar1 * auVar25[0x19] | !bVar1 * auVar12[0x19];
bVar1 = (bool)((byte)(uVar8 >> 0x1a) & 1);
auVar19[0x1a] = bVar1 * auVar25[0x1a] | !bVar1 * auVar12[0x1a];
bVar1 = (bool)((byte)(uVar8 >> 0x1b) & 1);
auVar19[0x1b] = bVar1 * auVar25[0x1b] | !bVar1 * auVar12[0x1b];
bVar1 = (bool)((byte)(uVar8 >> 0x1c) & 1);
auVar19[0x1c] = bVar1 * auVar25[0x1c] | !bVar1 * auVar12[0x1c];
bVar1 = (bool)((byte)(uVar8 >> 0x1d) & 1);
auVar19._30_2_ = auVar25._30_2_;
auVar19[0x1d] = bVar1 * auVar25[0x1d] | !bVar1 * auVar12[0x1d];
auVar12 = vpsignb_avx2(ZEXT832(*(ulong *)(iq2xs_grid + (ulong)auVar11._8_2_ * 8)),auVar19);
auVar25 = vpshufb_avx512vl(auVar13,auVar15);
auVar25 = vpermd_avx2(auVar17,auVar25);
uVar8 = vptestnmb_avx512vl(auVar25,ZEXT432(uVar2));
uVar8 = in_K0 & uVar8;
auVar19 = vpblendmb_avx512vl(auVar16,ZEXT432(uVar29));
bVar1 = (bool)((byte)uVar8 & 1);
auVar20[0] = bVar1 * auVar19[0] | !bVar1 * auVar25[0];
bVar1 = (bool)((byte)(uVar8 >> 1) & 1);
auVar20[1] = bVar1 * auVar19[1] | !bVar1 * auVar25[1];
bVar1 = (bool)((byte)(uVar8 >> 2) & 1);
auVar20[2] = bVar1 * auVar19[2] | !bVar1 * auVar25[2];
bVar1 = (bool)((byte)(uVar8 >> 3) & 1);
auVar20[3] = bVar1 * auVar19[3] | !bVar1 * auVar25[3];
bVar1 = (bool)((byte)(uVar8 >> 4) & 1);
auVar20[4] = bVar1 * auVar19[4] | !bVar1 * auVar25[4];
bVar1 = (bool)((byte)(uVar8 >> 5) & 1);
auVar20[5] = bVar1 * auVar19[5] | !bVar1 * auVar25[5];
bVar1 = (bool)((byte)(uVar8 >> 6) & 1);
auVar20[6] = bVar1 * auVar19[6] | !bVar1 * auVar25[6];
bVar1 = (bool)((byte)(uVar8 >> 7) & 1);
auVar20[7] = bVar1 * auVar19[7] | !bVar1 * auVar25[7];
bVar1 = (bool)((byte)(uVar8 >> 8) & 1);
auVar20[8] = bVar1 * auVar19[8] | !bVar1 * auVar25[8];
bVar1 = (bool)((byte)(uVar8 >> 9) & 1);
auVar20[9] = bVar1 * auVar19[9] | !bVar1 * auVar25[9];
bVar1 = (bool)((byte)(uVar8 >> 10) & 1);
auVar20[10] = bVar1 * auVar19[10] | !bVar1 * auVar25[10];
bVar1 = (bool)((byte)(uVar8 >> 0xb) & 1);
auVar20[0xb] = bVar1 * auVar19[0xb] | !bVar1 * auVar25[0xb];
bVar1 = (bool)((byte)(uVar8 >> 0xc) & 1);
auVar20[0xc] = bVar1 * auVar19[0xc] | !bVar1 * auVar25[0xc];
bVar1 = (bool)((byte)(uVar8 >> 0xd) & 1);
auVar20[0xd] = bVar1 * auVar19[0xd] | !bVar1 * auVar25[0xd];
bVar1 = (bool)((byte)(uVar8 >> 0xe) & 1);
auVar20[0xe] = bVar1 * auVar19[0xe] | !bVar1 * auVar25[0xe];
bVar1 = (bool)((byte)(uVar8 >> 0xf) & 1);
auVar20[0xf] = bVar1 * auVar19[0xf] | !bVar1 * auVar25[0xf];
bVar1 = (bool)((byte)(uVar8 >> 0x10) & 1);
auVar20[0x10] = bVar1 * auVar19[0x10] | !bVar1 * auVar25[0x10];
bVar1 = (bool)((byte)(uVar8 >> 0x11) & 1);
auVar20[0x11] = bVar1 * auVar19[0x11] | !bVar1 * auVar25[0x11];
bVar1 = (bool)((byte)(uVar8 >> 0x12) & 1);
auVar20[0x12] = bVar1 * auVar19[0x12] | !bVar1 * auVar25[0x12];
bVar1 = (bool)((byte)(uVar8 >> 0x13) & 1);
auVar20[0x13] = bVar1 * auVar19[0x13] | !bVar1 * auVar25[0x13];
bVar1 = (bool)((byte)(uVar8 >> 0x14) & 1);
auVar20[0x14] = bVar1 * auVar19[0x14] | !bVar1 * auVar25[0x14];
bVar1 = (bool)((byte)(uVar8 >> 0x15) & 1);
auVar20[0x15] = bVar1 * auVar19[0x15] | !bVar1 * auVar25[0x15];
bVar1 = (bool)((byte)(uVar8 >> 0x16) & 1);
auVar20[0x16] = bVar1 * auVar19[0x16] | !bVar1 * auVar25[0x16];
bVar1 = (bool)((byte)(uVar8 >> 0x17) & 1);
auVar20[0x17] = bVar1 * auVar19[0x17] | !bVar1 * auVar25[0x17];
bVar1 = (bool)((byte)(uVar8 >> 0x18) & 1);
auVar20[0x18] = bVar1 * auVar19[0x18] | !bVar1 * auVar25[0x18];
bVar1 = (bool)((byte)(uVar8 >> 0x19) & 1);
auVar20[0x19] = bVar1 * auVar19[0x19] | !bVar1 * auVar25[0x19];
bVar1 = (bool)((byte)(uVar8 >> 0x1a) & 1);
auVar20[0x1a] = bVar1 * auVar19[0x1a] | !bVar1 * auVar25[0x1a];
bVar1 = (bool)((byte)(uVar8 >> 0x1b) & 1);
auVar20[0x1b] = bVar1 * auVar19[0x1b] | !bVar1 * auVar25[0x1b];
bVar1 = (bool)((byte)(uVar8 >> 0x1c) & 1);
auVar20[0x1c] = bVar1 * auVar19[0x1c] | !bVar1 * auVar25[0x1c];
bVar1 = (bool)((byte)(uVar8 >> 0x1d) & 1);
auVar20._30_2_ = auVar19._30_2_;
auVar20[0x1d] = bVar1 * auVar19[0x1d] | !bVar1 * auVar25[0x1d];
auVar25 = vpsignb_avx2(*(int1 (*) [32])(lVar5 + 0x40 + lVar7 * 8),auVar20);
auVar13 = vpshufb_avx512vl(auVar13,auVar18);
auVar13 = vpermd_avx2(auVar17,auVar13);
uVar8 = vptestnmb_avx512vl(auVar13,ZEXT432(uVar2));
uVar8 = in_K0 & uVar8;
auVar17 = vpblendmb_avx512vl(auVar16,ZEXT432(uVar29));
bVar1 = (bool)((byte)uVar8 & 1);
auVar18[0] = bVar1 * auVar17[0] | !bVar1 * auVar13[0];
bVar1 = (bool)((byte)(uVar8 >> 1) & 1);
auVar18[1] = bVar1 * auVar17[1] | !bVar1 * auVar13[1];
bVar1 = (bool)((byte)(uVar8 >> 2) & 1);
auVar18[2] = bVar1 * auVar17[2] | !bVar1 * auVar13[2];
bVar1 = (bool)((byte)(uVar8 >> 3) & 1);
auVar18[3] = bVar1 * auVar17[3] | !bVar1 * auVar13[3];
bVar1 = (bool)((byte)(uVar8 >> 4) & 1);
auVar18[4] = bVar1 * auVar17[4] | !bVar1 * auVar13[4];
bVar1 = (bool)((byte)(uVar8 >> 5) & 1);
auVar18[5] = bVar1 * auVar17[5] | !bVar1 * auVar13[5];
bVar1 = (bool)((byte)(uVar8 >> 6) & 1);
auVar18[6] = bVar1 * auVar17[6] | !bVar1 * auVar13[6];
bVar1 = (bool)((byte)(uVar8 >> 7) & 1);
auVar18[7] = bVar1 * auVar17[7] | !bVar1 * auVar13[7];
bVar1 = (bool)((byte)(uVar8 >> 8) & 1);
auVar18[8] = bVar1 * auVar17[8] | !bVar1 * auVar13[8];
bVar1 = (bool)((byte)(uVar8 >> 9) & 1);
auVar18[9] = bVar1 * auVar17[9] | !bVar1 * auVar13[9];
bVar1 = (bool)((byte)(uVar8 >> 10) & 1);
auVar18[10] = bVar1 * auVar17[10] | !bVar1 * auVar13[10];
bVar1 = (bool)((byte)(uVar8 >> 0xb) & 1);
auVar18[0xb] = bVar1 * auVar17[0xb] | !bVar1 * auVar13[0xb];
bVar1 = (bool)((byte)(uVar8 >> 0xc) & 1);
auVar18[0xc] = bVar1 * auVar17[0xc] | !bVar1 * auVar13[0xc];
bVar1 = (bool)((byte)(uVar8 >> 0xd) & 1);
auVar18[0xd] = bVar1 * auVar17[0xd] | !bVar1 * auVar13[0xd];
bVar1 = (bool)((byte)(uVar8 >> 0xe) & 1);
auVar18[0xe] = bVar1 * auVar17[0xe] | !bVar1 * auVar13[0xe];
bVar1 = (bool)((byte)(uVar8 >> 0xf) & 1);
auVar18[0xf] = bVar1 * auVar17[0xf] | !bVar1 * auVar13[0xf];
bVar1 = (bool)((byte)(uVar8 >> 0x10) & 1);
auVar18[0x10] = bVar1 * auVar17[0x10] | !bVar1 * auVar13[0x10];
bVar1 = (bool)((byte)(uVar8 >> 0x11) & 1);
auVar18[0x11] = bVar1 * auVar17[0x11] | !bVar1 * auVar13[0x11];
bVar1 = (bool)((byte)(uVar8 >> 0x12) & 1);
auVar18[0x12] = bVar1 * auVar17[0x12] | !bVar1 * auVar13[0x12];
bVar1 = (bool)((byte)(uVar8 >> 0x13) & 1);
auVar18[0x13] = bVar1 * auVar17[0x13] | !bVar1 * auVar13[0x13];
bVar1 = (bool)((byte)(uVar8 >> 0x14) & 1);
auVar18[0x14] = bVar1 * auVar17[0x14] | !bVar1 * auVar13[0x14];
bVar1 = (bool)((byte)(uVar8 >> 0x15) & 1);
auVar18[0x15] = bVar1 * auVar17[0x15] | !bVar1 * auVar13[0x15];
bVar1 = (bool)((byte)(uVar8 >> 0x16) & 1);
auVar18[0x16] = bVar1 * auVar17[0x16] | !bVar1 * auVar13[0x16];
bVar1 = (bool)((byte)(uVar8 >> 0x17) & 1);
auVar18[0x17] = bVar1 * auVar17[0x17] | !bVar1 * auVar13[0x17];
bVar1 = (bool)((byte)(uVar8 >> 0x18) & 1);
auVar18[0x18] = bVar1 * auVar17[0x18] | !bVar1 * auVar13[0x18];
bVar1 = (bool)((byte)(uVar8 >> 0x19) & 1);
auVar18[0x19] = bVar1 * auVar17[0x19] | !bVar1 * auVar13[0x19];
bVar1 = (bool)((byte)(uVar8 >> 0x1a) & 1);
auVar18[0x1a] = bVar1 * auVar17[0x1a] | !bVar1 * auVar13[0x1a];
bVar1 = (bool)((byte)(uVar8 >> 0x1b) & 1);
auVar18[0x1b] = bVar1 * auVar17[0x1b] | !bVar1 * auVar13[0x1b];
bVar1 = (bool)((byte)(uVar8 >> 0x1c) & 1);
auVar18[0x1c] = bVar1 * auVar17[0x1c] | !bVar1 * auVar13[0x1c];
bVar1 = (bool)((byte)(uVar8 >> 0x1d) & 1);
auVar18._30_2_ = auVar17._30_2_;
auVar18[0x1d] = bVar1 * auVar17[0x1d] | !bVar1 * auVar13[0x1d];
auVar13 = vpsignb_avx2(*(int1 (*) [32])(lVar5 + 0x60 + lVar7 * 8),auVar18);
auVar14 = vpmaddubsw_avx512vl(auVar14,auVar23);
auVar12 = vpmaddubsw_avx512vl(auVar15,auVar12);
auVar25 = vpmaddubsw_avx512vl(auVar16,auVar25);
auVar13 = vpmaddubsw_avx512vl(auVar14,auVar13);
auVar9 = vpshufb_avx(auVar24,*(int1 (*) [16])(get_scale_shuffle_k_shuffle + lVar7 * 4)
);
auVar23 = vpmovsxbw_avx2(auVar9);
auVar23 = vpmaddwd_avx2(auVar23,auVar14);
auVar14 = vpaddd_avx512vl(auVar23,auVar25);
auVar9 = vpshufb_avx(auVar24,*(int1 (*) [16])
(get_scale_shuffle_k_shuffle + lVar7 * 4 + 0x10));
auVar23 = vpmovsxbw_avx2(auVar9);
auVar23 = vpmaddwd_avx2(auVar12,auVar23);
auVar12 = vpaddd_avx512vl(auVar23,auVar13);
auVar9 = vpshufb_avx(auVar24,*(int1 (*) [16])
(get_scale_shuffle_k_shuffle + lVar7 * 4 + 0x20));
auVar23 = vpmovsxbw_avx2(auVar9);
auVar23 = vpmaddwd_avx2(auVar23,auVar25);
auVar9 = vpshufb_avx(auVar24,*(int1 (*) [16])
(get_scale_shuffle_k_shuffle + lVar7 * 4 + 0x30));
vpaddd_avx512vl(auVar14,auVar23);
auVar23 = vpmovsxbw_avx2(auVar9);
auVar23 = vpmaddwd_avx2(auVar13,auVar23);
vpaddd_avx512vl(auVar12,auVar23);
lVar7 = lVar7 + 0x10;
} while (lVar7 == 0x10);
auVar10 = vmulss_avx512f(ZEXT416(uVar2),ZEXT416(uVar29));
uVar21 = auVar10._0_4_;
auVar25._4_4_ = uVar21;
auVar25._0_4_ = uVar21;
auVar25._8_4_ = uVar21;
auVar25._12_4_ = uVar21;
auVar25._16_4_ = uVar21;
auVar25._20_4_ = uVar21;
auVar25._24_4_ = uVar21;
auVar25._28_4_ = uVar21;
auVar23 = vpaddd_avx512vl(ZEXT1632(auVar10),auVar25);
auVar23 = vcvtdq2ps_avx(auVar23);
auVar23 = vfmadd213ps_avx512vl(auVar23,auVar25,ZEXT1632(auVar9));
uVar6 = uVar6 + 1;
lVar4 = lVar4 + 0x4a;
lVar5 = lVar5 + 0x124;
} while (uVar6 != param_1 >> 8);
}
auVar24._0_4_ = auVar23._16_4_ + auVar23._0_4_;
auVar24._4_4_ = auVar23._20_4_ + auVar23._4_4_;
auVar24._8_4_ = auVar23._24_4_ + auVar23._8_4_;
auVar24._12_4_ = auVar23._28_4_ + auVar23._12_4_;
auVar9 = vshufpd_avx(auVar24,auVar24,1);
auVar22._0_4_ = auVar24._0_4_ + auVar9._0_4_;
auVar22._4_4_ = auVar24._4_4_ + auVar9._4_4_;
auVar22._8_4_ = auVar24._8_4_ + auVar9._8_4_;
auVar22._12_4_ = auVar24._12_4_ + auVar9._12_4_;
auVar9 = vhaddps_avx(auVar22,auVar22);
*param_2 = auVar9._0_4_ * DAT_0014a570;
return;
}
| |
28,380 | my_message_stderr | eloqsql/mysys/my_mess.c | void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
} | O3 | c | my_message_stderr:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq 0x2e3fc4(%rip), %rax # 0x386fa8
movq (%rax), %rdi
callq 0x293a0
testl $0x480, %r14d # imm = 0x480
je 0xa2ffa
popq %rbx
popq %r14
popq %rbp
retq
testb $0x4, %r14b
je 0xa3014
movq 0x2e3fa9(%rip), %rax # 0x386fb0
movq (%rax), %rsi
movl $0x7, %edi
callq 0x29640
leaq 0xb67ad5(%rip), %rax # 0xc0aaf0
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa3028
callq 0x2ede1
movq 0x2e3f81(%rip), %r14 # 0x386fb0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x29290
movq (%r14), %rsi
movl $0xa, %edi
callq 0x29640
movq (%r14), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x293a0
nop
| my_message_stderr:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rsi
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
test r14d, 480h
jz short loc_A2FFA
pop rbx
pop r14
pop rbp
retn
loc_A2FFA:
test r14b, 4
jz short loc_A3014
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_A3014:
lea rax, my_progname
mov rdi, [rax]
test rdi, rdi
jz short loc_A3028
call my_message_stderr_cold_1
loc_A3028:
mov r14, cs:stderr_ptr
mov rsi, [r14]
mov rdi, rbx
call _fputs
mov rsi, [r14]
mov edi, 0Ah
call _fputc
mov rdi, [r14]
pop rbx
pop r14
pop rbp
jmp _fflush
| long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
result = fflush(stdout);
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL, stderr);
if ( my_progname )
my_message_stderr_cold_1((long long)my_progname);
fputs(a2, stderr);
fputc(10LL, stderr);
return fflush(stderr);
}
return result;
}
| my_message_stderr:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RSI
MOV RAX,qword ptr [0x00486fa8]
MOV RDI,qword ptr [RAX]
CALL 0x001293a0
TEST R14D,0x480
JZ 0x001a2ffa
POP RBX
POP R14
POP RBP
RET
LAB_001a2ffa:
TEST R14B,0x4
JZ 0x001a3014
MOV RAX,qword ptr [0x00486fb0]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x00129640
LAB_001a3014:
LEA RAX,[0xd0aaf0]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001a3028
CALL 0x0012ede1
LAB_001a3028:
MOV R14,qword ptr [0x00486fb0]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00129290
MOV RSI,qword ptr [R14]
MOV EDI,0xa
CALL 0x00129640
MOV RDI,qword ptr [R14]
POP RBX
POP R14
POP RBP
JMP 0x001293a0
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
int *puVar1;
fflush(*(FILE **)PTR_stdout_00486fa8);
if ((param_3 & 0x480) != 0) {
return;
}
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_00486fb0);
}
if (my_progname != 0) {
my_message_stderr_cold_1();
}
puVar1 = PTR_stderr_00486fb0;
fputs(param_2,*(FILE **)PTR_stderr_00486fb0);
fputc(10,*(FILE **)puVar1);
fflush(*(FILE **)puVar1);
return;
}
| |
28,381 | void (anonymous namespace)::tinyBLAS<16, float vector[16], float vector[16], ggml_bf16_t, ggml_bf16_t, float>::gemm_bloc<4, 4>(long, long) | monkey531[P]llama/ggml/src/ggml-cpu/llamafile/sgemm.cpp | inline void gemm_bloc(int64_t ii, int64_t jj) {
D Cv[RN][RM] = {};
for (int64_t l = 0; l < k; l += KN) {
// help compiler for op order.
if constexpr (RM <= RN) {
V Av[RM];
for (int64_t i = 0; i < RM; ++i) {
Av[i] = load<V>(A + lda * (ii + i) + l);
}
for (int64_t j = 0; j < RN; ++j) {
V Bv = load<V>(B + ldb * (jj + j) + l);
for (int64_t i = 0; i < RM; ++i) {
Cv[j][i] = madd(Av[i], Bv, Cv[j][i]);
}
}
} else {
V Bv[RN];
for (int64_t j = 0; j < RN; ++j) {
Bv[j] = load<V>(B + ldb * (jj + j) + l);
}
for (int64_t i = 0; i < RM; ++i) {
V Av = load<V>(A + lda * (ii + i) + l);
for (int64_t j = 0; j < RN; ++j) {
Cv[j][i] = madd(Av, Bv[j], Cv[j][i]);
}
}
}
}
for (int64_t j = 0; j < RN; ++j)
for (int64_t i = 0; i < RM; ++i)
C[ldc * (jj + j) + (ii + i)] = hsum(Cv[j][i]);
} | O0 | cpp | void (anonymous namespace)::tinyBLAS<16, float vector[16], float vector[16], ggml_bf16_t, ggml_bf16_t, float>::gemm_bloc<4, 4>(long, long):
pushq %rbp
movq %rsp, %rbp
andq $-0x40, %rsp
subq $0x640, %rsp # imm = 0x640
movq %rdi, 0x628(%rsp)
movq %rsi, 0x620(%rsp)
movq %rdx, 0x618(%rsp)
movq 0x628(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x200(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx # imm = 0x400
callq 0xc4c0
movq $0x0, 0x1f8(%rsp)
movq 0x20(%rsp), %rcx
movq 0x1f8(%rsp), %rax
cmpq 0x20(%rcx), %rax
jge 0x7c993
movq $0x0, 0xb8(%rsp)
cmpq $0x4, 0xb8(%rsp)
jge 0x7c85f
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x28(%rax), %rax
movq 0x620(%rsp), %rcx
addq 0xb8(%rsp), %rcx
imulq %rcx, %rax
shlq %rax
addq %rax, %rdi
movq 0x1f8(%rsp), %rax
shlq %rax
addq %rax, %rdi
callq 0x7c200
movq 0xb8(%rsp), %rcx
leaq 0xc0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
vmovaps %zmm0, (%rax)
movq 0xb8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb8(%rsp)
jmp 0x7c7e7
movq $0x0, 0xb0(%rsp)
cmpq $0x4, 0xb0(%rsp)
jge 0x7c978
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x30(%rax), %rax
movq 0x618(%rsp), %rcx
addq 0xb0(%rsp), %rcx
imulq %rcx, %rax
shlq %rax
addq %rax, %rdi
movq 0x1f8(%rsp), %rax
shlq %rax
addq %rax, %rdi
callq 0x7c200
vmovaps %zmm0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
cmpq $0x4, 0x38(%rsp)
jge 0x7c95d
movq 0x38(%rsp), %rcx
leaq 0xc0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
vmovaps (%rax), %zmm0
vmovaps 0x40(%rsp), %zmm1
movq 0xb0(%rsp), %rcx
leaq 0x200(%rsp), %rax
shlq $0x8, %rcx
addq %rcx, %rax
movq 0x38(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
vmovaps (%rax), %zmm2
callq 0x757a0
movq 0xb0(%rsp), %rcx
leaq 0x200(%rsp), %rax
shlq $0x8, %rcx
addq %rcx, %rax
movq 0x38(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
vmovaps %zmm0, (%rax)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x7c8c5
jmp 0x7c95f
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x7c86b
jmp 0x7c97a
movq 0x1f8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x1f8(%rsp)
jmp 0x7c7c4
movq $0x0, 0x30(%rsp)
cmpq $0x4, 0x30(%rsp)
jge 0x7ca3c
movq $0x0, 0x28(%rsp)
cmpq $0x4, 0x28(%rsp)
jge 0x7ca27
movq 0x30(%rsp), %rcx
leaq 0x200(%rsp), %rax
shlq $0x8, %rcx
addq %rcx, %rax
movq 0x28(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
vmovaps (%rax), %zmm0
callq 0x75820
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rax
movq 0x38(%rcx), %rcx
movq 0x618(%rsp), %rdx
addq 0x30(%rsp), %rdx
imulq %rdx, %rcx
movq 0x620(%rsp), %rdx
addq 0x28(%rsp), %rdx
addq %rdx, %rcx
vmovss %xmm0, (%rax,%rcx,4)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x7c9b1
jmp 0x7ca29
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x7c99c
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
nopw %cs:(%rax,%rax)
| _ZN12_GLOBAL__N_18tinyBLASILi16EDv16_fS1_11ggml_bf16_tS2_fE9gemm_blocILi4ELi4EEEvll:
push rbp
mov rbp, rsp
and rsp, 0FFFFFFFFFFFFFFC0h
sub rsp, 640h
mov [rsp+640h+var_18], rdi
mov [rsp+640h+var_20], rsi
mov [rsp+640h+var_28], rdx
mov rax, [rsp+640h+var_18]
mov [rsp+640h+var_620], rax
lea rdi, [rsp+640h+var_440]
xor esi, esi
mov edx, 400h
call _memset
mov [rsp+640h+var_448], 0
loc_7C7C4:
mov rcx, [rsp+640h+var_620]
mov rax, [rsp+640h+var_448]
cmp rax, [rcx+20h]
jge loc_7C993
mov [rsp+640h+var_588], 0
loc_7C7E7:
cmp [rsp+640h+var_588], 4
jge short loc_7C85F
mov rax, [rsp+640h+var_620]
mov rdi, [rax+8]
mov rax, [rax+28h]
mov rcx, [rsp+640h+var_20]
add rcx, [rsp+640h+var_588]
imul rax, rcx
shl rax, 1
add rdi, rax
mov rax, [rsp+640h+var_448]
shl rax, 1
add rdi, rax
call _ZN12_GLOBAL__N_14loadIDv16_f11ggml_bf16_tEET_PKT0_
mov rcx, [rsp+640h+var_588]
lea rax, [rsp+640h+var_580]
shl rcx, 6
add rax, rcx
vmovaps zmmword ptr [rax], zmm0
mov rax, [rsp+640h+var_588]
add rax, 1
mov [rsp+640h+var_588], rax
jmp short loc_7C7E7
loc_7C85F:
mov [rsp+640h+var_590], 0
loc_7C86B:
cmp [rsp+640h+var_590], 4
jge loc_7C978
mov rax, [rsp+640h+var_620]
mov rdi, [rax+10h]
mov rax, [rax+30h]
mov rcx, [rsp+640h+var_28]
add rcx, [rsp+640h+var_590]
imul rax, rcx
shl rax, 1
add rdi, rax
mov rax, [rsp+640h+var_448]
shl rax, 1
add rdi, rax
call _ZN12_GLOBAL__N_14loadIDv16_f11ggml_bf16_tEET_PKT0_
vmovaps zmmword ptr [rsp+640h+var_600], zmm0
mov [rsp+640h+var_608], 0
loc_7C8C5:
cmp [rsp+640h+var_608], 4
jge loc_7C95D
mov rcx, [rsp+640h+var_608]
lea rax, [rsp+640h+var_580]
shl rcx, 6
add rax, rcx
vmovaps zmm0, zmmword ptr [rax]
vmovaps zmm1, zmmword ptr [rsp+640h+var_600]
mov rcx, [rsp+640h+var_590]
lea rax, [rsp+640h+var_440]
shl rcx, 8
add rax, rcx
mov rcx, [rsp+640h+var_608]
shl rcx, 6
add rax, rcx
vmovaps zmm2, zmmword ptr [rax]
call _ZN12_GLOBAL__N_14maddIDv16_fS1_EET0_T_S3_S2_
mov rcx, [rsp+640h+var_590]
lea rax, [rsp+640h+var_440]
shl rcx, 8
add rax, rcx
mov rcx, [rsp+640h+var_608]
shl rcx, 6
add rax, rcx
vmovaps zmmword ptr [rax], zmm0
mov rax, [rsp+640h+var_608]
add rax, 1
mov [rsp+640h+var_608], rax
jmp loc_7C8C5
loc_7C95D:
jmp short $+2
loc_7C95F:
mov rax, [rsp+640h+var_590]
add rax, 1
mov [rsp+640h+var_590], rax
jmp loc_7C86B
loc_7C978:
jmp short $+2
loc_7C97A:
mov rax, [rsp+640h+var_448]
add rax, 10h
mov [rsp+640h+var_448], rax
jmp loc_7C7C4
loc_7C993:
mov [rsp+640h+var_610], 0
loc_7C99C:
cmp [rsp+640h+var_610], 4
jge loc_7CA3C
mov [rsp+640h+var_618], 0
loc_7C9B1:
cmp [rsp+640h+var_618], 4
jge short loc_7CA27
mov rcx, [rsp+640h+var_610]
lea rax, [rsp+640h+var_440]
shl rcx, 8
add rax, rcx
mov rcx, [rsp+640h+var_618]
shl rcx, 6
add rax, rcx
vmovaps zmm0, zmmword ptr [rax]
call _ZN12_GLOBAL__N_14hsumEDv16_f
mov rcx, [rsp+640h+var_620]
mov rax, [rcx+18h]
mov rcx, [rcx+38h]
mov rdx, [rsp+640h+var_28]
add rdx, [rsp+640h+var_610]
imul rcx, rdx
mov rdx, [rsp+640h+var_20]
add rdx, [rsp+640h+var_618]
add rcx, rdx
vmovss dword ptr [rax+rcx*4], xmm0
mov rax, [rsp+640h+var_618]
add rax, 1
mov [rsp+640h+var_618], rax
jmp short loc_7C9B1
loc_7CA27:
jmp short $+2
loc_7CA29:
mov rax, [rsp+640h+var_610]
add rax, 1
mov [rsp+640h+var_610], rax
jmp loc_7C99C
loc_7CA3C:
mov rsp, rbp
pop rbp
vzeroupper
retn
| long long ZN12_GLOBAL__N_18tinyBLASILi16EDv16_fS1_11ggml_bf16_tS2_fE9gemm_blocILi4ELi4EEEvll(
_QWORD *a1,
long long a2,
long long a3,
__m128 _XMM0)
{
long long result; // rax
long long ii; // [rsp+28h] [rbp-618h]
long long n; // [rsp+30h] [rbp-610h]
long long m; // [rsp+38h] [rbp-608h]
long long k; // [rsp+B0h] [rbp-590h]
long long j; // [rsp+B8h] [rbp-588h]
_BYTE v22[312]; // [rsp+C0h] [rbp-580h] BYREF
long long i; // [rsp+1F8h] [rbp-448h]
_BYTE v24[1048]; // [rsp+200h] [rbp-440h] BYREF
long long v25; // [rsp+618h] [rbp-28h]
long long v26; // [rsp+620h] [rbp-20h]
_QWORD *v27; // [rsp+628h] [rbp-18h]
v27 = a1;
v26 = a2;
v25 = a3;
memset(v24, 0LL, 1024LL);
for ( i = 0LL; ; i += 16LL )
{
result = i;
if ( i >= a1[4] )
break;
for ( j = 0LL; j < 4; ++j )
{
ZN12_GLOBAL__N_14loadIDv16_f11ggml_bf16_tEET_PKT0_(2 * i + 2 * (j + v26) * a1[5] + a1[1]);
_RAX = &v22[64 * j];
__asm { vmovaps zmmword ptr [rax], zmm0 }
}
for ( k = 0LL; k < 4; ++k )
{
ZN12_GLOBAL__N_14loadIDv16_f11ggml_bf16_tEET_PKT0_(2 * i + 2 * (k + v25) * a1[6] + a1[2]);
__asm { vmovaps zmmword ptr [rsp+640h+var_600], zmm0 }
for ( m = 0LL; m < 4; ++m )
{
_RAX = &v22[64 * m];
__asm
{
vmovaps zmm0, zmmword ptr [rax]
vmovaps zmm1, zmmword ptr [rsp+640h+var_600]
}
_RAX = &v24[256 * k + 64 * m];
__asm { vmovaps zmm2, zmmword ptr [rax] }
ZN12_GLOBAL__N_14maddIDv16_fS1_EET0_T_S3_S2_();
_RAX = &v24[256 * k + 64 * m];
__asm { vmovaps zmmword ptr [rax], zmm0 }
}
}
}
for ( n = 0LL; n < 4; ++n )
{
for ( ii = 0LL; ii < 4; ++ii )
{
_RAX = &v24[256 * n + 64 * ii];
__asm { vmovaps zmm0, zmmword ptr [rax] }
`anonymous namespace'::hsum(_XMM0);
_RAX = a1[3];
_RCX = ii + v26 + (n + v25) * a1[7];
__asm { vmovss dword ptr [rax+rcx*4], xmm0 }
}
result = n + 1;
}
__asm { vzeroupper }
return result;
}
| gemm_bloc<4,4>:
PUSH RBP
MOV RBP,RSP
AND RSP,-0x40
SUB RSP,0x640
MOV qword ptr [RSP + 0x628],RDI
MOV qword ptr [RSP + 0x620],RSI
MOV qword ptr [RSP + 0x618],RDX
MOV RAX,qword ptr [RSP + 0x628]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x200]
XOR ESI,ESI
MOV EDX,0x400
CALL 0x0010c4c0
MOV qword ptr [RSP + 0x1f8],0x0
LAB_0017c7c4:
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x1f8]
CMP RAX,qword ptr [RCX + 0x20]
JGE 0x0017c993
MOV qword ptr [RSP + 0xb8],0x0
LAB_0017c7e7:
CMP qword ptr [RSP + 0xb8],0x4
JGE 0x0017c85f
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RSP + 0x620]
ADD RCX,qword ptr [RSP + 0xb8]
IMUL RAX,RCX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RSP + 0x1f8]
SHL RAX,0x1
ADD RDI,RAX
CALL 0x0017c200
MOV RCX,qword ptr [RSP + 0xb8]
LEA RAX,[RSP + 0xc0]
SHL RCX,0x6
ADD RAX,RCX
VMOVAPS zmmword ptr [RAX] ,ZMM0
MOV RAX,qword ptr [RSP + 0xb8]
ADD RAX,0x1
MOV qword ptr [RSP + 0xb8],RAX
JMP 0x0017c7e7
LAB_0017c85f:
MOV qword ptr [RSP + 0xb0],0x0
LAB_0017c86b:
CMP qword ptr [RSP + 0xb0],0x4
JGE 0x0017c978
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RSP + 0x618]
ADD RCX,qword ptr [RSP + 0xb0]
IMUL RAX,RCX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RSP + 0x1f8]
SHL RAX,0x1
ADD RDI,RAX
CALL 0x0017c200
VMOVAPS zmmword ptr [RSP + 0x40] ,ZMM0
MOV qword ptr [RSP + 0x38],0x0
LAB_0017c8c5:
CMP qword ptr [RSP + 0x38],0x4
JGE 0x0017c95d
MOV RCX,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0xc0]
SHL RCX,0x6
ADD RAX,RCX
VMOVAPS ZMM0,zmmword ptr [RAX]
VMOVAPS ZMM1,zmmword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0xb0]
LEA RAX,[RSP + 0x200]
SHL RCX,0x8
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x38]
SHL RCX,0x6
ADD RAX,RCX
VMOVAPS ZMM2,zmmword ptr [RAX]
CALL 0x001757a0
MOV RCX,qword ptr [RSP + 0xb0]
LEA RAX,[RSP + 0x200]
SHL RCX,0x8
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x38]
SHL RCX,0x6
ADD RAX,RCX
VMOVAPS zmmword ptr [RAX] ,ZMM0
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0017c8c5
LAB_0017c95d:
JMP 0x0017c95f
LAB_0017c95f:
MOV RAX,qword ptr [RSP + 0xb0]
ADD RAX,0x1
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x0017c86b
LAB_0017c978:
JMP 0x0017c97a
LAB_0017c97a:
MOV RAX,qword ptr [RSP + 0x1f8]
ADD RAX,0x10
MOV qword ptr [RSP + 0x1f8],RAX
JMP 0x0017c7c4
LAB_0017c993:
MOV qword ptr [RSP + 0x30],0x0
LAB_0017c99c:
CMP qword ptr [RSP + 0x30],0x4
JGE 0x0017ca3c
MOV qword ptr [RSP + 0x28],0x0
LAB_0017c9b1:
CMP qword ptr [RSP + 0x28],0x4
JGE 0x0017ca27
MOV RCX,qword ptr [RSP + 0x30]
LEA RAX,[RSP + 0x200]
SHL RCX,0x8
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x28]
SHL RCX,0x6
ADD RAX,RCX
VMOVAPS ZMM0,zmmword ptr [RAX]
CALL 0x00175820
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x38]
MOV RDX,qword ptr [RSP + 0x618]
ADD RDX,qword ptr [RSP + 0x30]
IMUL RCX,RDX
MOV RDX,qword ptr [RSP + 0x620]
ADD RDX,qword ptr [RSP + 0x28]
ADD RCX,RDX
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0017c9b1
LAB_0017ca27:
JMP 0x0017ca29
LAB_0017ca29:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0017c99c
LAB_0017ca3c:
MOV RSP,RBP
POP RBP
VZEROUPPER
RET
|
/* void (anonymous namespace)::tinyBLAS<16, float __vector(16), float __vector(16), ggml_bf16_t,
ggml_bf16_t, float>::gemm_bloc<4, 4>(long, long) */
void (anonymous_namespace)::
tinyBLAS<16,float__vector(16),float__vector(16),ggml_bf16_t,ggml_bf16_t,float>::gemm_bloc<4,4>
(long param_1,long param_2)
{
ggml_bf16_t *pgVar1;
long in_RDX;
_func_float_int *extraout_RDX;
_func_float_int *p_Var2;
_func_float_int *extraout_RDX_00;
_func_float_int *p_Var3;
ggml_bf16_t *__s;
int4 uVar4;
int8 in_XMM0_Qa;
int8 in_XMM0_Qb;
int8 in_YMM0_H;
int8 in_register_00001218;
int8 in_register_00001220;
int8 in_register_00001228;
int8 in_register_00001230;
int8 in_register_00001238;
long local_658;
long local_650;
long local_648;
long local_5d0;
long local_5c8;
int8 local_5c0 [39];
long local_488;
ggml_bf16_t local_480 [8];
ggml_bf16_t agStack_478 [8];
ggml_bf16_t agStack_470 [8];
ggml_bf16_t agStack_468 [8];
ggml_bf16_t agStack_460 [8];
ggml_bf16_t agStack_458 [8];
ggml_bf16_t agStack_450 [8];
ggml_bf16_t agStack_448 [992];
long local_68;
long local_60;
long local_58;
__s = local_480;
p_Var3 = (_func_float_int *)0x0;
local_68 = in_RDX;
local_60 = param_2;
local_58 = param_1;
memset(__s,0,0x400);
for (local_488 = 0; local_488 < *(long *)(param_1 + 0x20); local_488 = local_488 + 0x10) {
for (local_5c8 = 0; local_5c8 < 4; local_5c8 = local_5c8 + 1) {
__s = (ggml_bf16_t *)
(*(long *)(param_1 + 8) + *(long *)(param_1 + 0x28) * (local_60 + local_5c8) * 2 +
local_488 * 2);
load<float__vector(16),ggml_bf16_t>(__s);
local_5c0[local_5c8 * 8] = in_XMM0_Qa;
local_5c0[local_5c8 * 8 + 1] = in_XMM0_Qb;
local_5c0[local_5c8 * 8 + 2] = in_YMM0_H;
local_5c0[local_5c8 * 8 + 3] = in_register_00001218;
local_5c0[local_5c8 * 8 + 4] = in_register_00001220;
local_5c0[local_5c8 * 8 + 5] = in_register_00001228;
local_5c0[local_5c8 * 8 + 6] = in_register_00001230;
local_5c0[local_5c8 * 8 + 7] = in_register_00001238;
}
for (local_5d0 = 0; local_5d0 < 4; local_5d0 = local_5d0 + 1) {
__s = (ggml_bf16_t *)
(*(long *)(param_1 + 0x10) + *(long *)(param_1 + 0x30) * (local_68 + local_5d0) * 2 +
local_488 * 2);
load<float__vector(16),ggml_bf16_t>(__s);
p_Var2 = extraout_RDX;
for (local_648 = 0; local_648 < 4; local_648 = local_648 + 1) {
in_XMM0_Qa = local_5c0[local_648 * 8];
in_XMM0_Qb = local_5c0[local_648 * 8 + 1];
in_YMM0_H = local_5c0[local_648 * 8 + 2];
in_register_00001218 = local_5c0[local_648 * 8 + 3];
in_register_00001220 = local_5c0[local_648 * 8 + 4];
in_register_00001228 = local_5c0[local_648 * 8 + 5];
in_register_00001230 = local_5c0[local_648 * 8 + 6];
in_register_00001238 = local_5c0[local_648 * 8 + 7];
madd<float__vector(16),float__vector(16)>((_func_float_int *)__s,p_Var3,p_Var2);
pgVar1 = local_480 + local_648 * 0x40 + local_5d0 * 0x100;
*(int8 *)pgVar1 = in_XMM0_Qa;
*(int8 *)(pgVar1 + 8) = in_XMM0_Qb;
*(int8 *)(pgVar1 + 0x10) = in_YMM0_H;
*(int8 *)(pgVar1 + 0x18) = in_register_00001218;
*(int8 *)(pgVar1 + 0x20) = in_register_00001220;
*(int8 *)(pgVar1 + 0x28) = in_register_00001228;
*(int8 *)(pgVar1 + 0x30) = in_register_00001230;
*(int8 *)(pgVar1 + 0x38) = in_register_00001238;
p_Var2 = extraout_RDX_00;
}
}
}
for (local_650 = 0; local_650 < 4; local_650 = local_650 + 1) {
for (local_658 = 0; local_658 < 4; local_658 = local_658 + 1) {
uVar4 = hsum((_func_float_int *)__s);
*(int4 *)
(*(long *)(param_1 + 0x18) +
(*(long *)(param_1 + 0x38) * (local_68 + local_650) + local_60 + local_658) * 4) = uVar4;
}
}
return;
}
| |
28,382 | void (anonymous namespace)::tinyBLAS<16, float vector[16], float vector[16], ggml_bf16_t, ggml_bf16_t, float>::gemm_bloc<4, 4>(long, long) | monkey531[P]llama/ggml/src/ggml-cpu/llamafile/sgemm.cpp | inline void gemm_bloc(int64_t ii, int64_t jj) {
D Cv[RN][RM] = {};
for (int64_t l = 0; l < k; l += KN) {
// help compiler for op order.
if constexpr (RM <= RN) {
V Av[RM];
for (int64_t i = 0; i < RM; ++i) {
Av[i] = load<V>(A + lda * (ii + i) + l);
}
for (int64_t j = 0; j < RN; ++j) {
V Bv = load<V>(B + ldb * (jj + j) + l);
for (int64_t i = 0; i < RM; ++i) {
Cv[j][i] = madd(Av[i], Bv, Cv[j][i]);
}
}
} else {
V Bv[RN];
for (int64_t j = 0; j < RN; ++j) {
Bv[j] = load<V>(B + ldb * (jj + j) + l);
}
for (int64_t i = 0; i < RM; ++i) {
V Av = load<V>(A + lda * (ii + i) + l);
for (int64_t j = 0; j < RN; ++j) {
Cv[j][i] = madd(Av, Bv[j], Cv[j][i]);
}
}
}
}
for (int64_t j = 0; j < RN; ++j)
for (int64_t i = 0; i < RM; ++i)
C[ldc * (jj + j) + (ii + i)] = hsum(Cv[j][i]);
} | O2 | cpp | void (anonymous namespace)::tinyBLAS<16, float vector[16], float vector[16], ggml_bf16_t, ggml_bf16_t, float>::gemm_bloc<4, 4>(long, long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x40, %rsp
subq $0x2c0, %rsp # imm = 0x2C0
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x80(%rsp), %r12
xorl %r13d, %r13d
movl $0x200, %edx # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x8370
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq 0x28(%rbx), %rsi
movq %rdx, %rdi
imulq %r14, %rdi
addq %rdi, %rdi
addq 0x10(%rbx), %rdi
addq %rdx, %rdx
cmpq %rcx, %r13
jge 0x34946
movq %rdi, %r8
xorl %r9d, %r9d
cmpq $0x80, %r9
je 0x348e3
vpmovzxwd (%r8), %zmm0
vpslld $0x10, %zmm0, %zmm0
vmovdqa64 %zmm0, (%rsp,%r9)
addq $0x40, %r9
addq %rdx, %r8
jmp 0x348bd
leaq (%rax,%r13,2), %r8
movq %r12, %r9
xorl %r10d, %r10d
cmpq $0x4, %r10
je 0x34939
leaq (%r10,%r15), %r11
imulq %rsi, %r11
vpmovzxwd (%r8,%r11,2), %zmm0
vpslld $0x10, %zmm0, %zmm0
xorl %r11d, %r11d
cmpq $0x80, %r11
je 0x34930
vmovaps (%rsp,%r11), %zmm1
vfmadd213ps (%r9,%r11,4), %zmm0, %zmm1 # zmm1 = (zmm0 * zmm1) + mem
vmovaps %zmm1, (%r9,%r11,4)
addq $0x40, %r11
jmp 0x3490c
incq %r10
addq $0x40, %r9
jmp 0x348ed
addq $0x10, %r13
addq $0x20, %rdi
jmp 0x348ae
movq 0x38(%rbx), %rax
imulq %rax, %r14
shlq $0x2, %r15
leaq (%r15,%r14,4), %rcx
addq 0x18(%rbx), %rcx
shlq $0x2, %rax
leaq 0x80(%rsp), %rdx
xorl %esi, %esi
cmpq $0x2, %rsi
je 0x349ba
movq %rdx, %rdi
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x349ab
vmovaps 0x20(%rdi), %ymm0
vaddps (%rdi), %zmm0, %zmm0
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm1, %xmm0, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rcx,%r8,4)
incq %r8
addq $0x40, %rdi
jmp 0x34974
incq %rsi
addq %rax, %rcx
addq $0x100, %rdx # imm = 0x100
jmp 0x34968
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
| _ZN12_GLOBAL__N_18tinyBLASILi16EDv16_fS1_11ggml_bf16_tS2_fE9gemm_blocILi4ELi2EEEvll:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
and rsp, 0FFFFFFFFFFFFFFC0h
sub rsp, 2C0h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsp+2E8h+var_268]
xor r13d, r13d
mov edx, 200h
mov rdi, r12
xor esi, esi
call _memset
mov rax, [rbx+8]
mov rcx, [rbx+20h]
mov rdx, [rbx+30h]
mov rsi, [rbx+28h]
mov rdi, rdx
imul rdi, r14
add rdi, rdi
add rdi, [rbx+10h]
add rdx, rdx
loc_348AE:
cmp r13, rcx
jge loc_34946
mov r8, rdi
xor r9d, r9d
loc_348BD:
cmp r9, 80h
jz short loc_348E3
vpmovzxwd zmm0, ymmword ptr [r8]
vpslld zmm0, zmm0, 10h
vmovdqa64 zmmword ptr [rsp+r9+2E8h+var_2E8], zmm0
add r9, 40h ; '@'
add r8, rdx
jmp short loc_348BD
loc_348E3:
lea r8, [rax+r13*2]
mov r9, r12
xor r10d, r10d
loc_348ED:
cmp r10, 4
jz short loc_34939
lea r11, [r10+r15]
imul r11, rsi
vpmovzxwd zmm0, ymmword ptr [r8+r11*2]
vpslld zmm0, zmm0, 10h
xor r11d, r11d
loc_3490C:
cmp r11, 80h
jz short loc_34930
vmovaps zmm1, zmmword ptr [rsp+r11+2E8h+var_2E8]
vfmadd213ps zmm1, zmm0, zmmword ptr [r9+r11*4]
vmovaps zmmword ptr [r9+r11*4], zmm1
add r11, 40h ; '@'
jmp short loc_3490C
loc_34930:
inc r10
add r9, 40h ; '@'
jmp short loc_348ED
loc_34939:
add r13, 10h
add rdi, 20h ; ' '
jmp loc_348AE
loc_34946:
mov rax, [rbx+38h]
imul r14, rax
shl r15, 2
lea rcx, [r15+r14*4]
add rcx, [rbx+18h]
shl rax, 2
lea rdx, [rsp+2E8h+var_268]
xor esi, esi
loc_34968:
cmp rsi, 2
jz short loc_349BA
mov rdi, rdx
xor r8d, r8d
loc_34974:
cmp r8, 4
jz short loc_349AB
vmovaps ymm0, ymmword ptr [rdi+20h]
vaddps zmm0, zmm0, zmmword ptr [rdi]
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm0, xmm1
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rcx+r8*4], xmm0
inc r8
add rdi, 40h ; '@'
jmp short loc_34974
loc_349AB:
inc rsi
add rcx, rax
add rdx, 100h
jmp short loc_34968
loc_349BA:
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
| long long ZN12_GLOBAL__N_18tinyBLASILi16EDv16_fS1_11ggml_bf16_tS2_fE9gemm_blocILi4ELi2EEEvll(
_QWORD *a1,
long long a2,
long long a3,
__m128 _XMM0)
{
long long v7; // r13
long long v8; // rax
long long v9; // rcx
long long v10; // rsi
long long v11; // rdi
long long v12; // rdx
long long i; // r10
long long v26; // rax
long long result; // rax
_BYTE *v29; // rdx
long long j; // rsi
_BYTE v40[616]; // [rsp+80h] [rbp-268h] BYREF
v7 = 0LL;
memset(v40, 0LL, 512LL);
v8 = a1[1];
v9 = a1[4];
v10 = a1[5];
v11 = a1[2] + 2 * a3 * a1[6];
v12 = 2LL * a1[6];
while ( v7 < v9 )
{
_R8 = v11;
for ( _R9 = 0LL; _R9 != 128; _R9 += 64LL )
{
__asm
{
vpmovzxwd zmm0, ymmword ptr [r8]
vpslld zmm0, zmm0, 10h
vmovdqa64 zmmword ptr [rsp+r9+2E8h+var_2E8], zmm0
}
_R8 += v12;
}
_R8 = v8 + 2 * v7;
_R9 = v40;
for ( i = 0LL; i != 4; ++i )
{
_R11 = v10 * (i + a2);
__asm
{
vpmovzxwd zmm0, ymmword ptr [r8+r11*2]
vpslld zmm0, zmm0, 10h
}
for ( _R11 = 0LL; _R11 != 128; _R11 += 64LL )
{
__asm
{
vmovaps zmm1, zmmword ptr [rsp+r11+2E8h+var_2E8]
vfmadd213ps zmm1, zmm0, zmmword ptr [r9+r11*4]
vmovaps zmmword ptr [r9+r11*4], zmm1
}
}
_R9 += 64;
}
v7 += 16LL;
v11 += 32LL;
}
v26 = a1[7];
_RCX = a1[3] + 4 * a2 + 4 * v26 * a3;
result = 4 * v26;
v29 = v40;
for ( j = 0LL; j != 2; ++j )
{
_RDI = v29;
for ( _R8 = 0LL; _R8 != 4; ++_R8 )
{
__asm
{
vmovaps ymm0, ymmword ptr [rdi+20h]
vaddps zmm0, zmm0, zmmword ptr [rdi]
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm0, xmm1
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rcx+r8*4], xmm0
}
_RDI += 64;
}
_RCX += result;
v29 += 256;
}
__asm { vzeroupper }
return result;
}
| gemm_bloc<4,2>:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
AND RSP,-0x40
SUB RSP,0x2c0
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x80]
XOR R13D,R13D
MOV EDX,0x200
MOV RDI,R12
XOR ESI,ESI
CALL 0x00108370
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RBX + 0x30]
MOV RSI,qword ptr [RBX + 0x28]
MOV RDI,RDX
IMUL RDI,R14
ADD RDI,RDI
ADD RDI,qword ptr [RBX + 0x10]
ADD RDX,RDX
LAB_001348ae:
CMP R13,RCX
JGE 0x00134946
MOV R8,RDI
XOR R9D,R9D
LAB_001348bd:
CMP R9,0x80
JZ 0x001348e3
VPMOVZXWD ZMM0,ymmword ptr [R8]
VPSLLD ZMM0,ZMM0,0x10
VMOVDQA64 zmmword ptr [RSP + R9*0x1],ZMM0
ADD R9,0x40
ADD R8,RDX
JMP 0x001348bd
LAB_001348e3:
LEA R8,[RAX + R13*0x2]
MOV R9,R12
XOR R10D,R10D
LAB_001348ed:
CMP R10,0x4
JZ 0x00134939
LEA R11,[R10 + R15*0x1]
IMUL R11,RSI
VPMOVZXWD ZMM0,ymmword ptr [R8 + R11*0x2]
VPSLLD ZMM0,ZMM0,0x10
XOR R11D,R11D
LAB_0013490c:
CMP R11,0x80
JZ 0x00134930
VMOVAPS ZMM1,zmmword ptr [RSP + R11*0x1]
VFMADD213PS ZMM1,ZMM0,zmmword ptr [R9 + R11*0x4]
VMOVAPS zmmword ptr [R9 + R11*0x4] ,ZMM1
ADD R11,0x40
JMP 0x0013490c
LAB_00134930:
INC R10
ADD R9,0x40
JMP 0x001348ed
LAB_00134939:
ADD R13,0x10
ADD RDI,0x20
JMP 0x001348ae
LAB_00134946:
MOV RAX,qword ptr [RBX + 0x38]
IMUL R14,RAX
SHL R15,0x2
LEA RCX,[R15 + R14*0x4]
ADD RCX,qword ptr [RBX + 0x18]
SHL RAX,0x2
LEA RDX,[RSP + 0x80]
XOR ESI,ESI
LAB_00134968:
CMP RSI,0x2
JZ 0x001349ba
MOV RDI,RDX
XOR R8D,R8D
LAB_00134974:
CMP R8,0x4
JZ 0x001349ab
VMOVAPS YMM0,ymmword ptr [RDI + 0x20]
VADDPS ZMM0,ZMM0,zmmword ptr [RDI]
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM0,XMM1
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMOVSS dword ptr [RCX + R8*0x4],XMM0
INC R8
ADD RDI,0x40
JMP 0x00134974
LAB_001349ab:
INC RSI
ADD RCX,RAX
ADD RDX,0x100
JMP 0x00134968
LAB_001349ba:
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
|
/* void (anonymous namespace)::tinyBLAS<16, float __vector(16), float __vector(16), ggml_bf16_t,
ggml_bf16_t, float>::gemm_bloc<4, 2>(long, long) */
void __thiscall
(anonymous_namespace)::
tinyBLAS<16,float__vector(16),float__vector(16),ggml_bf16_t,ggml_bf16_t,float>::gemm_bloc<4,2>
(tinyBLAS<16,float__vector(16),float__vector(16),ggml_bf16_t,ggml_bf16_t,float> *this,
long param_1,long param_2)
{
long lVar1;
int1 auVar2 [16];
long lVar3;
int1 (*pauVar4) [64];
long lVar5;
int1 (*pauVar6) [32];
int1 (*pauVar7) [64];
int1 (*pauVar8) [32];
long lVar9;
long lVar10;
int1 *puVar11;
long lVar12;
long lVar13;
int1 auVar14 [64];
int1 auVar15 [64];
int1 auVar16 [16];
int1 auVar17 [16];
int1 local_300 [128];
int1 local_280 [592];
memset(local_280,0,0x200);
lVar1 = *(long *)(this + 8);
lVar3 = *(long *)(this + 0x20);
lVar5 = *(long *)(this + 0x30);
lVar9 = *(long *)(this + 0x28);
pauVar6 = (int1 (*) [32])(lVar5 * param_2 * 2 + *(long *)(this + 0x10));
for (lVar13 = 0; lVar13 < lVar3; lVar13 = lVar13 + 0x10) {
pauVar8 = pauVar6;
for (lVar10 = 0; lVar10 != 0x80; lVar10 = lVar10 + 0x40) {
auVar14 = vpmovzxwd_avx512f(*pauVar8);
auVar14 = vpslld_avx512f(auVar14,0x10);
auVar14 = vmovdqa64_avx512f(auVar14);
*(int1 (*) [64])(local_300 + lVar10) = auVar14;
pauVar8 = (int1 (*) [32])(*pauVar8 + lVar5 * 2);
}
puVar11 = local_280;
for (lVar10 = 0; lVar10 != 4; lVar10 = lVar10 + 1) {
auVar14 = vpmovzxwd_avx512f(*(int1 (*) [32])
(lVar1 + lVar13 * 2 + (lVar10 + param_1) * lVar9 * 2));
auVar14 = vpslld_avx512f(auVar14,0x10);
for (lVar12 = 0; lVar12 != 0x80; lVar12 = lVar12 + 0x40) {
auVar15 = vfmadd213ps_avx512f(*(int1 (*) [64])(local_300 + lVar12),auVar14,
*(int1 (*) [64])(puVar11 + lVar12 * 4));
*(int1 (*) [64])(puVar11 + lVar12 * 4) = auVar15;
}
puVar11 = puVar11 + 0x40;
}
pauVar6 = pauVar6 + 1;
}
lVar1 = *(long *)(this + 0x38);
lVar3 = param_1 * 4 + param_2 * lVar1 * 4 + *(long *)(this + 0x18);
pauVar4 = (int1 (*) [64])local_280;
for (lVar5 = 0; lVar5 != 2; lVar5 = lVar5 + 1) {
pauVar7 = pauVar4;
for (lVar9 = 0; lVar9 != 4; lVar9 = lVar9 + 1) {
auVar14 = vaddps_avx512f(ZEXT3264(*(int1 (*) [32])(*pauVar7 + 0x20)),*pauVar7);
auVar16._0_4_ = auVar14._0_4_ + auVar14._16_4_;
auVar16._4_4_ = auVar14._4_4_ + auVar14._20_4_;
auVar16._8_4_ = auVar14._8_4_ + auVar14._24_4_;
auVar16._12_4_ = auVar14._12_4_ + auVar14._28_4_;
auVar2 = vshufpd_avx(auVar16,auVar16,1);
auVar17._0_4_ = auVar16._0_4_ + auVar2._0_4_;
auVar17._4_4_ = auVar16._4_4_ + auVar2._4_4_;
auVar17._8_4_ = auVar16._8_4_ + auVar2._8_4_;
auVar17._12_4_ = auVar16._12_4_ + auVar2._12_4_;
auVar2 = vhaddps_avx(auVar17,auVar17);
*(int *)(lVar3 + lVar9 * 4) = auVar2._0_4_;
pauVar7 = pauVar7 + 1;
}
lVar3 = lVar3 + lVar1 * 4;
pauVar4 = pauVar4 + 4;
}
return;
}
| |
28,383 | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {} | O2 | cpp | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x728bc
leaq 0x8591c(%rip), %rax # 0xfb3d8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x23c10
andq $0x0, 0x48(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
andq $0x0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x77536
movq %r14, %rdi
callq 0x23fa0
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov r15, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
and qword ptr [rbx+48h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+40h], xmm0
and qword ptr [r14], 0
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long result; // rax
__int128 v7; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
result = std::string::basic_string(a1 + 32, a3);
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV R15,RDX
MOV RBX,RDI
CALL 0x001728bc
LEA RAX,[0x1fb3d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_00175ac7:
MOV RSI,R15
CALL 0x00123c10
LAB_00175acf:
AND qword ptr [RBX + 0x48],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
AND qword ptr [R14],0x0
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001fb3e8;
/* try { // try from 00175ac7 to 00175ace has its CatchHandler @ 00175aeb */
std::__cxx11::string::string((string *)(this + 0x20),param_2);
*(int8 *)(this + 0x48) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar1;
*(int8 *)param_3 = 0;
return;
}
| |
28,384 | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {} | O3 | cpp | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x8bfdc(%rip), %r15 # 0x129fd8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9e02c
movq 0x8cf6a(%rip), %rcx # 0x12af88
cmpb $0x0, (%rcx)
je 0x9e028
incl 0x8(%rax)
jmp 0x9e02c
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8c39d(%rip), %rax # 0x12a3d8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x213b2
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9e08c
callq 0x6cd76
movq %r14, %rdi
callq 0x1afa0
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov rbx, rdi
lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9E02C
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9E028
inc dword ptr [rax+8]
jmp short loc_9E02C
loc_9E028:
lock inc dword ptr [rax+8]
loc_9E02C:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xor eax, eax
mov [rbx+48h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+40h], xmm0
mov [r14], rax
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9E08C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9E08C:
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
result = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV RBX,RDI
LEA R15,[0x229fd8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019e02c
MOV RCX,qword ptr [0x0022af88]
CMP byte ptr [RCX],0x0
JZ 0x0019e028
INC dword ptr [RAX + 0x8]
JMP 0x0019e02c
LAB_0019e028:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019e02c:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22a3d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_0019e058:
CALL 0x001213b2
LAB_0019e05d:
XOR EAX,EAX
MOV qword ptr [RBX + 0x48],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV qword ptr [R14],RAX
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_00229fe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022af88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022a3e8;
*(SetTemplateNode **)(this + 0x20) = this + 0x30;
/* try { // try from 0019e058 to 0019e05c has its CatchHandler @ 0019e078 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
*(int8 *)(this + 0x48) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)param_3 = 0;
return;
}
| |
28,385 | bitmap_invert | eloqsql/mysys/my_bitmap.c | void bitmap_invert(MY_BITMAP *map)
{
my_bitmap_map *to= map->bitmap, *end;
DBUG_ASSERT(map->bitmap);
end= map->last_word_ptr;
while (to <= end)
*to++ ^= 0xFFFFFFFF;
} | O0 | c | bitmap_invert:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xf0265
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xf0293
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl (%rax), %ecx
xorl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0xf0271
popq %rbp
retq
nopw %cs:(%rax,%rax)
| bitmap_invert:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
jmp short $+2
loc_F0265:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_F0271:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
ja short loc_F0293
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 4
mov [rbp+var_10], rcx
mov ecx, [rax]
xor ecx, 0FFFFFFFFh
mov [rax], ecx
jmp short loc_F0271
loc_F0293:
pop rbp
retn
| int * bitmap_invert(int **a1)
{
int *result; // rax
int *v2; // rax
unsigned long long v3; // [rsp+0h] [rbp-18h]
int *v4; // [rsp+8h] [rbp-10h]
v4 = *a1;
v3 = (unsigned long long)a1[1];
while ( 1 )
{
result = v4;
if ( (unsigned long long)v4 > v3 )
break;
v2 = v4++;
*v2 = ~*v2;
}
return result;
}
| bitmap_invert:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001f0265
LAB_001f0265:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_001f0271:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001f0293
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x10],RCX
MOV ECX,dword ptr [RAX]
XOR ECX,0xffffffff
MOV dword ptr [RAX],ECX
JMP 0x001f0271
LAB_001f0293:
POP RBP
RET
|
void bitmap_invert(int8 *param_1)
{
uint *puVar1;
uint *local_18;
puVar1 = (uint *)param_1[1];
local_18 = (uint *)*param_1;
while (local_18 <= puVar1) {
*local_18 = *local_18 ^ 0xffffffff;
local_18 = local_18 + 1;
}
return;
}
| |
28,386 | strcasestart | bluesky950520[P]quickjs/libbf.c | static int strcasestart(const char *str, const char *val, const char **ptr)
{
const char *p, *q;
p = str;
q = val;
while (*q != '\0') {
if (bf_tolower(*p) != *q)
return 0;
p++;
q++;
}
if (ptr)
*ptr = p;
return 1;
} | O2 | c | strcasestart:
movzbl (%rsi), %eax
testl %eax, %eax
je 0x78b34
movzbl (%rdi), %ecx
leal -0x41(%rcx), %r8d
movl %ecx, %r9d
orl $0x20, %r9d
cmpl $0x1a, %r8d
cmovael %ecx, %r9d
cmpl %eax, %r9d
jne 0x78b40
incq %rdi
incq %rsi
jmp 0x78b0a
pushq $0x1
popq %rax
testq %rdx, %rdx
je 0x78b3f
movq %rdi, (%rdx)
retq
xorl %eax, %eax
retq
| strcasestart:
movzx eax, byte ptr [rsi]
test eax, eax
jz short loc_78B34
movzx ecx, byte ptr [rdi]
lea r8d, [rcx-41h]
mov r9d, ecx
or r9d, 20h
cmp r8d, 1Ah
cmovnb r9d, ecx
cmp r9d, eax
jnz short loc_78B40
inc rdi
inc rsi
jmp short strcasestart
loc_78B34:
push 1
pop rax
test rdx, rdx
jz short locret_78B3F
mov [rdx], rdi
locret_78B3F:
retn
loc_78B40:
xor eax, eax
retn
| long long strcasestart(unsigned __int8 *a1, _BYTE *a2, _QWORD *a3)
{
int v3; // r9d
long long result; // rax
while ( *a2 )
{
v3 = *a1 | 0x20;
if ( (unsigned int)*a1 - 65 >= 0x1A )
v3 = *a1;
if ( v3 != (unsigned __int8)*a2 )
return 0LL;
++a1;
++a2;
}
result = 1LL;
if ( a3 )
*a3 = a1;
return result;
}
| strcasestart:
MOVZX EAX,byte ptr [RSI]
TEST EAX,EAX
JZ 0x00178b34
MOVZX ECX,byte ptr [RDI]
LEA R8D,[RCX + -0x41]
MOV R9D,ECX
OR R9D,0x20
CMP R8D,0x1a
CMOVNC R9D,ECX
CMP R9D,EAX
JNZ 0x00178b40
INC RDI
INC RSI
JMP 0x00178b0a
LAB_00178b34:
PUSH 0x1
POP RAX
TEST RDX,RDX
JZ 0x00178b3f
MOV qword ptr [RDX],RDI
LAB_00178b3f:
RET
LAB_00178b40:
XOR EAX,EAX
RET
|
int8 strcasestart(byte *param_1,byte *param_2,int8 *param_3)
{
byte bVar1;
byte bVar2;
while( true ) {
if (*param_2 == 0) {
if (param_3 != (int8 *)0x0) {
*param_3 = param_1;
}
return 1;
}
bVar1 = *param_1;
bVar2 = bVar1 | 0x20;
if (0x19 < bVar1 - 0x41) {
bVar2 = bVar1;
}
if (bVar2 != *param_2) break;
param_1 = param_1 + 1;
param_2 = param_2 + 1;
}
return 0;
}
| |
28,387 | diag | eloqsql/unittest/mytap/tap.c | void
diag(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "# ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
} | O0 | c | diag:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x248b5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x1a76bc(%rip), %rax # 0x1cbfc0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x5378b(%rip), %rsi # 0x780a0
xorl %eax, %eax
callq 0x243f0
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x243c0
callq 0x25170
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diag:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_248B5
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_248B5:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_D0]
mov [rbp+var_10], rax
lea rax, [rbp+arg_0]
mov [rbp+var_18], rax
mov [rbp+var_1C], 30h ; '0'
mov [rbp+var_20], 8
mov rax, cs:stdout_ptr
mov [rbp+var_D8], rax
mov rdi, [rax]
lea rsi, asc_780A0; "# "
xor eax, eax
call _fprintf
mov rax, [rbp+var_D8]
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
call emit_endl
add rsp, 0E0h
pop rbp
retn
| long long diag(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+10h] [rbp-D0h] BYREF
long long v17; // [rsp+18h] [rbp-C8h]
long long v18; // [rsp+20h] [rbp-C0h]
long long v19; // [rsp+28h] [rbp-B8h]
long long v20; // [rsp+30h] [rbp-B0h]
long long v21; // [rsp+38h] [rbp-A8h]
__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]
__m128 v29; // [rsp+B0h] [rbp-30h]
_DWORD v30[2]; // [rsp+C0h] [rbp-20h] BYREF
char *v31; // [rsp+C8h] [rbp-18h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v21 = a6;
v20 = a5;
v19 = a4;
v18 = a3;
v17 = a2;
v33 = a1;
v32 = &v16;
v31 = &a15;
v30[1] = 48;
v30[0] = 8;
fprintf(stdout, "# ");
vfprintf(stdout, v33, v30);
return emit_endl();
}
| diag:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001248b5
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_001248b5:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0xd0]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x30
MOV dword ptr [RBP + -0x20],0x8
MOV RAX,qword ptr [0x002cbfc0]
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1780a0]
XOR EAX,EAX
CALL 0x001243f0
MOV RAX,qword ptr [RBP + -0xd8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x001243c0
CALL 0x00125170
ADD RSP,0xe0
POP RBP
RET
|
void diag(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,char *param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
puVar1 = PTR_stdout_002cbfc0;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_002cbfc0,"# ");
vfprintf(*(FILE **)puVar1,local_10,&local_28);
emit_endl();
return;
}
| |
28,388 | my_instr_bin | eloqsql/strings/ctype-bin.c | static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
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 */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if ( (*str++) == (*search))
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if ((*i++) != (*j++))
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
} | O0 | c | my_instr_bin:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x36d0b
cmpq $0x0, -0x30(%rbp)
jne 0x36bd6
cmpl $0x0, 0x10(%rbp)
je 0x36bca
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x36d12
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x36c0d
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x36d09
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movzbl (%rax), %eax
movq -0x48(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x36d04
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x36c86
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x68(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x36c84
jmp 0x36c0b
jmp 0x36c50
cmpl $0x0, 0x10(%rbp)
jbe 0x36cfb
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x36cf9
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
subl 0xc(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x36cfb
movl $0x2, -0x4(%rbp)
jmp 0x36d12
jmp 0x36c0d
jmp 0x36d0b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_instr_bin:
push rbp
mov rbp, rsp
mov eax, [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_38], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
ja loc_36D0B
cmp [rbp+var_30], 0
jnz short loc_36BD6
cmp [rbp+arg_0], 0
jz short loc_36BCA
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_36BCA:
mov [rbp+var_4], 1
jmp loc_36D12
loc_36BD6:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_58], rax
loc_36C0B:
jmp short $+2
loc_36C0D:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_50]
jz loc_36D09
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jnz loc_36D04
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_68], rax
loc_36C50:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_58]
jz short loc_36C86
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
mov rdx, rcx
add rdx, 1
mov [rbp+var_68], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_36C84
jmp short loc_36C0B
loc_36C84:
jmp short loc_36C50
loc_36C86:
cmp [rbp+arg_0], 0
jbe short loc_36CFB
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
sub rax, rcx
sub rax, 1
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_36CF9
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+10h]
mov rax, [rbp+var_38]
sub ecx, [rax+0Ch]
mov rax, [rbp+var_38]
mov [rax+14h], ecx
loc_36CF9:
jmp short $+2
loc_36CFB:
mov [rbp+var_4], 2
jmp short loc_36D12
loc_36D04:
jmp loc_36C0D
loc_36D09:
jmp short $+2
loc_36D0B:
mov [rbp+var_4], 0
loc_36D12:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_instr_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
unsigned __int8 *v9; // rcx
unsigned __int8 *v11; // [rsp+0h] [rbp-68h]
unsigned __int8 *v12; // [rsp+8h] [rbp-60h]
unsigned __int8 *v13; // [rsp+10h] [rbp-58h]
unsigned __int8 *v14; // [rsp+28h] [rbp-40h]
if ( a5 > a3 )
return 0;
if ( a5 )
{
v14 = a2;
v13 = &a4[a5];
LABEL_7:
while ( v14 != &a2[a3 - a5 + 1] )
{
v7 = v14++;
if ( *v7 == *a4 )
{
v12 = v14;
v11 = a4 + 1;
while ( v11 != v13 )
{
v8 = v12++;
v9 = v11++;
if ( *v8 != *v9 )
goto LABEL_7;
}
if ( a7 )
{
*a6 = 0;
a6[1] = (_DWORD)v14 - (_DWORD)a2 - 1;
a6[2] = a6[1];
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = a6[4] - a6[3];
}
}
return 2;
}
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
| my_instr_bin:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword 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 qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x00136d0b
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00136bd6
CMP dword ptr [RBP + 0x10],0x0
JZ 0x00136bca
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x0
LAB_00136bca:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00136d12
LAB_00136bd6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
LAB_00136c0b:
JMP 0x00136c0d
LAB_00136c0d:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x00136d09
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x00136d04
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
LAB_00136c50:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x58]
JZ 0x00136c86
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x68],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x00136c84
JMP 0x00136c0b
LAB_00136c84:
JMP 0x00136c50
LAB_00136c86:
CMP dword ptr [RBP + 0x10],0x0
JBE 0x00136cfb
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
SUB RAX,0x1
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + 0x10],0x1
JBE 0x00136cf9
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x4]
ADD RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
SUB ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x14],ECX
LAB_00136cf9:
JMP 0x00136cfb
LAB_00136cfb:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00136d12
LAB_00136d04:
JMP 0x00136c0d
LAB_00136d09:
JMP 0x00136d0b
LAB_00136d0b:
MOV dword ptr [RBP + -0x4],0x0
LAB_00136d12:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5,
int4 *param_6,uint param_7)
{
char cVar1;
char cVar2;
char *pcVar3;
char *local_70;
char *local_68;
char *local_48;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = 0;
param_6[2] = 0;
}
return 1;
}
local_48 = param_2;
while (local_48 != param_2 + (param_3 - param_5) + 1) {
pcVar3 = local_48 + 1;
cVar1 = *local_48;
local_48 = pcVar3;
if (cVar1 == *param_4) {
local_70 = param_4 + 1;
local_68 = pcVar3;
do {
if (local_70 == param_4 + param_5) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = ((int)pcVar3 - (int)param_2) + -1;
param_6[2] = param_6[1];
if (1 < param_7) {
param_6[3] = param_6[1];
param_6[4] = param_6[1] + (int)param_5;
param_6[5] = param_6[4] - param_6[3];
}
}
return 2;
}
cVar1 = *local_68;
cVar2 = *local_70;
local_70 = local_70 + 1;
local_68 = local_68 + 1;
} while (cVar1 == cVar2);
}
}
}
return 0;
}
| |
28,389 | JS_NewCFunctionData | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewCFunctionData(JSContext *ctx, JSCFunctionData *func,
int length, int magic, int data_len,
JSValue *data)
{
JSCFunctionDataRecord *s;
JSValue func_obj;
int i;
func_obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_C_FUNCTION_DATA);
if (JS_IsException(func_obj))
return func_obj;
s = js_malloc(ctx, sizeof(*s) + data_len * sizeof(JSValue));
if (!s) {
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
s->func = func;
s->length = length;
s->data_len = data_len;
s->magic = magic;
for(i = 0; i < data_len; i++)
s->data[i] = js_dup(data[i]);
JS_SetOpaqueInternal(func_obj, s);
js_function_set_properties(ctx, func_obj,
JS_ATOM_empty_string, length);
return func_obj;
} | O0 | c | JS_NewCFunctionData:
subq $0x88, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movl %ecx, 0x60(%rsp)
movl %r8d, 0x5c(%rsp)
movq %r9, 0x50(%rsp)
movq 0x70(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movl $0xf, %ecx
callq 0x29ea0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x2a83d
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x2a989
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x21cb0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2a88e
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x2a989
movq 0x68(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movl 0x64(%rsp), %eax
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x8(%rax)
movl 0x5c(%rsp), %eax
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x9(%rax)
movl 0x60(%rsp), %eax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, 0xa(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x5c(%rsp), %eax
jge 0x2a940
movq 0x48(%rsp), %rax
addq $0x10, %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x2a8cf
movq 0x48(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2a9a0
movq 0x70(%rsp), %rdi
movl 0x64(%rsp), %r8d
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x2f, %ecx
callq 0x2a9d0
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop
| JS_NewCFunctionData:
sub rsp, 88h
mov [rsp+88h+var_18], rdi
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_24], edx
mov [rsp+88h+var_28], ecx
mov [rsp+88h+var_2C], r8d
mov [rsp+88h+var_38], r9
mov rdi, [rsp+88h+var_18]
mov rax, [rsp+88h+var_18]
mov rsi, [rax+48h]
mov rdx, [rax+50h]
mov ecx, 0Fh
call JS_NewObjectProtoClass
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_60], rdx
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_50], rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_48], rax
mov rdi, [rsp+88h+var_50]
mov rsi, [rsp+88h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_2A83D
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_8], rax
jmp loc_2A989
loc_2A83D:
mov rdi, [rsp+88h+var_18]
movsxd rsi, [rsp+88h+var_2C]
shl rsi, 4
add rsi, 10h
call js_malloc
mov [rsp+88h+var_40], rax
cmp [rsp+88h+var_40], 0
jnz short loc_2A88E
mov rdi, [rsp+88h+var_18]
mov rsi, [rsp+88h+var_50]
mov rdx, [rsp+88h+var_48]
call JS_FreeValue
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
jmp loc_2A989
loc_2A88E:
mov rcx, [rsp+88h+var_20]
mov rax, [rsp+88h+var_40]
mov [rax], rcx
mov eax, [rsp+88h+var_24]
mov cl, al
mov rax, [rsp+88h+var_40]
mov [rax+8], cl
mov eax, [rsp+88h+var_2C]
mov cl, al
mov rax, [rsp+88h+var_40]
mov [rax+9], cl
mov eax, [rsp+88h+var_28]
mov cx, ax
mov rax, [rsp+88h+var_40]
mov [rax+0Ah], cx
mov [rsp+88h+var_54], 0
loc_2A8CF:
mov eax, [rsp+88h+var_54]
cmp eax, [rsp+88h+var_2C]
jge short loc_2A940
mov rax, [rsp+88h+var_40]
add rax, 10h
movsxd rcx, [rsp+88h+var_54]
shl rcx, 4
add rax, rcx
mov [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_38]
movsxd rcx, [rsp+88h+var_54]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_78], rcx
mov [rsp+88h+var_70], rdx
mov rcx, [rsp+88h+var_78]
mov [rax], rcx
mov rcx, [rsp+88h+var_70]
mov [rax+8], rcx
mov eax, [rsp+88h+var_54]
add eax, 1
mov [rsp+88h+var_54], eax
jmp short loc_2A8CF
loc_2A940:
mov rdx, [rsp+88h+var_40]
mov rdi, [rsp+88h+var_50]
mov rsi, [rsp+88h+var_48]
call JS_SetOpaqueInternal
mov rdi, [rsp+88h+var_18]
mov r8d, [rsp+88h+var_24]
mov rsi, [rsp+88h+var_50]
mov rdx, [rsp+88h+var_48]
mov ecx, 2Fh ; '/'
call js_function_set_properties
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_8], rax
loc_2A989:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long JS_NewCFunctionData(long long a1, long long a2, unsigned int a3, __int16 a4, int a5, long long a6)
{
long long v6; // rdx
long long v7; // rdx
_QWORD *v9; // [rsp+8h] [rbp-80h]
long long v10; // [rsp+20h] [rbp-68h]
int i; // [rsp+34h] [rbp-54h]
long long v12; // [rsp+40h] [rbp-48h]
long long v13; // [rsp+48h] [rbp-40h]
long long v18; // [rsp+78h] [rbp-10h]
v10 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xFu);
v12 = v6;
if ( JS_IsException_1(v10, v6) )
return v10;
v13 = js_malloc(a1, 16LL * a5 + 16);
if ( v13 )
{
*(_QWORD *)v13 = a2;
*(_BYTE *)(v13 + 8) = a3;
*(_BYTE *)(v13 + 9) = a5;
*(_WORD *)(v13 + 10) = a4;
for ( i = 0; i < a5; ++i )
{
v9 = (_QWORD *)(16LL * i + v13 + 16);
*v9 = js_dup(*(_DWORD **)(16LL * i + a6), *(_QWORD *)(16LL * i + a6 + 8));
v9[1] = v7;
}
JS_SetOpaqueInternal(v10, v12, v13);
js_function_set_properties(a1, v10, v12, 47LL, a3);
return v10;
}
else
{
JS_FreeValue(a1, v10, v12);
LODWORD(v18) = 0;
}
return v18;
}
| JS_NewCFunctionData:
SUB RSP,0x88
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV dword ptr [RSP + 0x64],EDX
MOV dword ptr [RSP + 0x60],ECX
MOV dword ptr [RSP + 0x5c],R8D
MOV qword ptr [RSP + 0x50],R9
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX + 0x48]
MOV RDX,qword ptr [RAX + 0x50]
MOV ECX,0xf
CALL 0x00129ea0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0012a83d
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0012a989
LAB_0012a83d:
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RSI,dword ptr [RSP + 0x5c]
SHL RSI,0x4
ADD RSI,0x10
CALL 0x00121cb0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x0012a88e
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00123c90
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0012a989
LAB_0012a88e:
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + 0x64]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x48]
MOV byte ptr [RAX + 0x8],CL
MOV EAX,dword ptr [RSP + 0x5c]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x48]
MOV byte ptr [RAX + 0x9],CL
MOV EAX,dword ptr [RSP + 0x60]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX + 0xa],CX
MOV dword ptr [RSP + 0x34],0x0
LAB_0012a8cf:
MOV EAX,dword ptr [RSP + 0x34]
CMP EAX,dword ptr [RSP + 0x5c]
JGE 0x0012a940
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0012a8cf
LAB_0012a940:
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0012a9a0
MOV RDI,qword ptr [RSP + 0x70]
MOV R8D,dword ptr [RSP + 0x64]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV ECX,0x2f
CALL 0x0012a9d0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
LAB_0012a989:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16]
JS_NewCFunctionData(long param_1,int8 param_2,int4 param_3,int2 param_4,
int param_5,long param_6)
{
int4 uVar1;
int iVar2;
int8 *puVar4;
int8 *puVar5;
int1 auVar6 [16];
int local_54;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
uVar1 = uStack_c;
auVar6 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),0xf);
local_8 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar2 = JS_IsException(uVar3,local_8);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
if (iVar2 == 0) {
puVar4 = (int8 *)js_malloc(param_1,(long)param_5 * 0x10 + 0x10);
if (puVar4 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar3,local_8);
local_10 = 0;
local_8 = 6;
uStack_c = uVar1;
}
else {
*puVar4 = param_2;
*(char *)(puVar4 + 1) = (char)param_3;
*(char *)((long)puVar4 + 9) = (char)param_5;
*(int2 *)((long)puVar4 + 10) = param_4;
for (local_54 = 0; local_54 < param_5; local_54 = local_54 + 1) {
puVar5 = (int8 *)(param_6 + (long)local_54 * 0x10);
auVar6 = js_dup(*puVar5,puVar5[1]);
*(int1 (*) [16])(puVar4 + (long)local_54 * 2 + 2) = auVar6;
}
JS_SetOpaqueInternal(uVar3,local_8,puVar4);
js_function_set_properties(param_1,uVar3,local_8,0x2f,param_3);
}
}
auVar6._4_4_ = uStack_c;
auVar6._0_4_ = local_10;
auVar6._8_8_ = local_8;
return auVar6;
}
| |
28,390 | JS_NewCFunctionData | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewCFunctionData(JSContext *ctx, JSCFunctionData *func,
int length, int magic, int data_len,
JSValue *data)
{
JSCFunctionDataRecord *s;
JSValue func_obj;
int i;
func_obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_C_FUNCTION_DATA);
if (JS_IsException(func_obj))
return func_obj;
s = js_malloc(ctx, sizeof(*s) + data_len * sizeof(JSValue));
if (!s) {
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
s->func = func;
s->length = length;
s->data_len = data_len;
s->magic = magic;
for(i = 0; i < data_len; i++)
s->data[i] = js_dup(data[i]);
JS_SetOpaqueInternal(func_obj, s);
js_function_set_properties(ctx, func_obj,
JS_ATOM_empty_string, length);
return func_obj;
} | O2 | c | JS_NewCFunctionData:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movl %r8d, %r13d
movl %ecx, (%rsp)
movl %edx, 0x4(%rsp)
movq %rsi, %rbp
movq %rdi, %r15
movq 0x48(%rdi), %rsi
movq 0x50(%rdi), %rdx
pushq $0xf
popq %rcx
callq 0x1b069
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x1b46d
movslq %r13d, %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
movq %r15, %rdi
callq 0x17214
testq %rax, %rax
je 0x1b495
movq %rbp, (%rax)
movl 0x4(%rsp), %r8d
movb %r8b, 0x8(%rax)
movb %r13b, 0x9(%rax)
movl (%rsp), %ecx
movw %cx, 0xa(%rax)
xorl %ecx, %ecx
testl %r13d, %r13d
cmovlel %ecx, %r13d
shlq $0x4, %r13
cmpq %rcx, %r13
je 0x1b458
movq (%r12,%rcx), %rdx
movq 0x8(%r12,%rcx), %rsi
cmpl $-0x9, %esi
jb 0x1b448
incl (%rdx)
movq %rdx, 0x10(%rax,%rcx)
movq %rsi, 0x18(%rax,%rcx)
addq $0x10, %rcx
jmp 0x1b433
movq %rax, 0x30(%r14)
pushq $0x2f
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1b4ad
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x1b47d
| JS_NewCFunctionData:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r9
mov r13d, r8d
mov [rsp+38h+var_38], ecx
mov [rsp+38h+var_34], edx
mov rbp, rsi
mov r15, rdi
mov rsi, [rdi+48h]
mov rdx, [rdi+50h]
push 0Fh
pop rcx
call JS_NewObjectProtoClass
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_1B46D
movsxd rsi, r13d
shl rsi, 4
add rsi, 10h
mov rdi, r15
call js_malloc
test rax, rax
jz loc_1B495
mov [rax], rbp
mov r8d, [rsp+38h+var_34]
mov [rax+8], r8b
mov [rax+9], r13b
mov ecx, [rsp+38h+var_38]
mov [rax+0Ah], cx
xor ecx, ecx
test r13d, r13d
cmovle r13d, ecx
shl r13, 4
loc_1B433:
cmp r13, rcx
jz short loc_1B458
mov rdx, [r12+rcx]
mov rsi, [r12+rcx+8]
cmp esi, 0FFFFFFF7h
jb short loc_1B448
inc dword ptr [rdx]
loc_1B448:
mov [rax+rcx+10h], rdx
mov [rax+rcx+18h], rsi
add rcx, 10h
jmp short loc_1B433
loc_1B458:
mov [r14+30h], rax
push 2Fh ; '/'
pop rcx
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call js_function_set_properties
loc_1B46D:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_1B47D:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1B495:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
jmp short loc_1B47D
| unsigned long long JS_NewCFunctionData(
long long a1,
long long a2,
unsigned int a3,
__int16 a4,
unsigned int a5,
long long a6)
{
long long v7; // r13
long long v8; // r14
long long v9; // rdx
long long v10; // rbx
long long v11; // rax
long long v12; // rcx
long long v13; // r13
_DWORD *v14; // rdx
long long v15; // rsi
unsigned long long v16; // rcx
v7 = a5;
v8 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xFu);
v10 = v9;
if ( (_DWORD)v9 != 6 )
{
v11 = js_malloc(a1, 16LL * (int)v7 + 16);
if ( !v11 )
{
JS_FreeValue(a1, v8, v10);
LODWORD(v8) = 0;
v16 = 0LL;
return v16 | (unsigned int)v8;
}
*(_QWORD *)v11 = a2;
*(_BYTE *)(v11 + 8) = a3;
*(_BYTE *)(v11 + 9) = v7;
*(_WORD *)(v11 + 10) = a4;
v12 = 0LL;
if ( (int)v7 <= 0 )
v7 = 0LL;
v13 = 16 * v7;
while ( v13 != v12 )
{
v14 = *(_DWORD **)(a6 + v12);
v15 = *(_QWORD *)(a6 + v12 + 8);
if ( (unsigned int)v15 >= 0xFFFFFFF7 )
++*v14;
*(_QWORD *)(v11 + v12 + 16) = v14;
*(_QWORD *)(v11 + v12 + 24) = v15;
v12 += 16LL;
}
*(_QWORD *)(v8 + 48) = v11;
js_function_set_properties(a1, v8, v10, 47LL, a3);
}
v16 = v8 & 0xFFFFFFFF00000000LL;
return v16 | (unsigned int)v8;
}
| JS_NewCFunctionData:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R9
MOV R13D,R8D
MOV dword ptr [RSP],ECX
MOV dword ptr [RSP + 0x4],EDX
MOV RBP,RSI
MOV R15,RDI
MOV RSI,qword ptr [RDI + 0x48]
MOV RDX,qword ptr [RDI + 0x50]
PUSH 0xf
POP RCX
CALL 0x0011b069
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0011b46d
MOVSXD RSI,R13D
SHL RSI,0x4
ADD RSI,0x10
MOV RDI,R15
CALL 0x00117214
TEST RAX,RAX
JZ 0x0011b495
MOV qword ptr [RAX],RBP
MOV R8D,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + 0x8],R8B
MOV byte ptr [RAX + 0x9],R13B
MOV ECX,dword ptr [RSP]
MOV word ptr [RAX + 0xa],CX
XOR ECX,ECX
TEST R13D,R13D
CMOVLE R13D,ECX
SHL R13,0x4
LAB_0011b433:
CMP R13,RCX
JZ 0x0011b458
MOV RDX,qword ptr [R12 + RCX*0x1]
MOV RSI,qword ptr [R12 + RCX*0x1 + 0x8]
CMP ESI,-0x9
JC 0x0011b448
INC dword ptr [RDX]
LAB_0011b448:
MOV qword ptr [RAX + RCX*0x1 + 0x10],RDX
MOV qword ptr [RAX + RCX*0x1 + 0x18],RSI
ADD RCX,0x10
JMP 0x0011b433
LAB_0011b458:
MOV qword ptr [R14 + 0x30],RAX
PUSH 0x2f
POP RCX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011b4ad
LAB_0011b46d:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_0011b47d:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011b495:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
JMP 0x0011b47d
|
int1 [16]
JS_NewCFunctionData(long param_1,int8 param_2,int1 param_3,int2 param_4,
uint param_5,long param_6)
{
int *piVar1;
int8 uVar2;
int8 *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
auVar7 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),0xf);
uVar5 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
puVar3 = (int8 *)js_malloc(param_1,(long)(int)param_5 * 0x10 + 0x10);
if (puVar3 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar5,auVar7._8_8_);
auVar7 = ZEXT816(6) << 0x40;
uVar5 = 0;
goto LAB_0011b47d;
}
*puVar3 = param_2;
*(int1 *)(puVar3 + 1) = param_3;
*(char *)((long)puVar3 + 9) = (char)param_5;
*(int2 *)((long)puVar3 + 10) = param_4;
lVar4 = 0;
uVar6 = (ulong)param_5;
if ((int)param_5 < 1) {
uVar6 = 0;
}
for (; uVar6 * 0x10 != lVar4; lVar4 = lVar4 + 0x10) {
piVar1 = *(int **)(param_6 + lVar4);
uVar2 = *(int8 *)(param_6 + 8 + lVar4);
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
*(int **)((long)puVar3 + lVar4 + 0x10) = piVar1;
*(int8 *)((long)puVar3 + lVar4 + 0x18) = uVar2;
}
*(int8 **)(uVar5 + 0x30) = puVar3;
js_function_set_properties(param_1,uVar5,auVar7._8_8_,0x2f);
}
uVar5 = uVar5 & 0xffffffff00000000;
LAB_0011b47d:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar5;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
| |
28,391 | Settings::getLastResult[abi:cxx11]() const | 666mxvbee[P]BattleShip/lib/Settings/Settings.cpp | std::string Settings::getLastResult() const {
std::lock_guard<std::mutex> lock(settings_mutex);
return lastResult;
} | O1 | cpp | Settings::getLastResult[abi:cxx11]() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5520
testl %eax, %eax
jne 0x6f59
leaq 0x10(%r14), %rax
movq %rax, (%r14)
movq 0xd8(%rbx), %rsi
movq 0xe0(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x7572
movq %rbx, %rdi
callq 0x52f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %edi
callq 0x5260
movq %rax, %r14
movq %rbx, %rdi
callq 0x52f0
movq %r14, %rdi
callq 0x5600
nop
| _ZNK8Settings13getLastResultB5cxx11Ev:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz short loc_6F59
lea rax, [r14+10h]
mov [r14], rax
mov rsi, [rbx+0D8h]
mov rdx, [rbx+0E0h]
add rdx, rsi
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_6F59:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| _QWORD * Settings::getLastResult[abi:cxx11](_QWORD *a1, long long a2)
{
int v2; // eax
v2 = pthread_mutex_lock(a2);
if ( v2 )
std::__throw_system_error(v2);
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_QWORD *)(a2 + 216), *(_QWORD *)(a2 + 216) + *(_QWORD *)(a2 + 224));
pthread_mutex_unlock(a2);
return a1;
}
| getLastResult[abi:cxx11]:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00105520
TEST EAX,EAX
JNZ 0x00106f59
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
MOV RSI,qword ptr [RBX + 0xd8]
MOV RDX,qword ptr [RBX + 0xe0]
ADD RDX,RSI
LAB_00106f3e:
MOV RDI,R14
CALL 0x00107572
LAB_00106f46:
MOV RDI,RBX
CALL 0x001052f0
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00106f59:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::getLastResult[abi:cxx11]() const */
void Settings::getLastResult_abi_cxx11_(void)
{
int iVar1;
pthread_mutex_t *in_RSI;
long *in_RDI;
iVar1 = pthread_mutex_lock(in_RSI);
if (iVar1 == 0) {
*in_RDI = (long)(in_RDI + 2);
/* try { // try from 00106f3e to 00106f45 has its CatchHandler @ 00106f60 */
std::__cxx11::string::_M_construct<char*>();
pthread_mutex_unlock(in_RSI);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
| |
28,392 | map_hash_resize | bluesky950520[P]quickjs/quickjs.c | static void map_hash_resize(JSContext *ctx, JSMapState *s)
{
uint32_t new_hash_size, i, h;
size_t slack;
struct list_head *new_hash_table, *el;
JSMapRecord *mr;
/* XXX: no reporting of memory allocation failure */
if (s->hash_size == 1)
new_hash_size = 4;
else
new_hash_size = s->hash_size * 2;
new_hash_table = js_realloc2(ctx, s->hash_table,
sizeof(new_hash_table[0]) * new_hash_size, &slack);
if (!new_hash_table)
return;
new_hash_size += slack / sizeof(*new_hash_table);
for(i = 0; i < new_hash_size; i++)
init_list_head(&new_hash_table[i]);
list_for_each(el, &s->records) {
mr = list_entry(el, JSMapRecord, link);
if (!mr->empty) {
h = map_hash_key(ctx, mr->key) & (new_hash_size - 1);
list_add_tail(&mr->hash_link, &new_hash_table[h]);
}
}
s->hash_table = new_hash_table;
s->hash_size = new_hash_size;
s->record_count_threshold = new_hash_size * 2;
} | O0 | c | map_hash_resize:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x1, 0x28(%rax)
jne 0x7ce13
movl $0x4, 0x34(%rsp)
jmp 0x7ce21
movq 0x38(%rsp), %rax
movl 0x28(%rax), %eax
shll %eax
movl %eax, 0x34(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rsi
movl 0x34(%rsp), %eax
movl %eax, %edx
shlq $0x4, %rdx
leaq 0x20(%rsp), %rcx
callq 0x20bc0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x7ce55
jmp 0x7cf53
movq 0x20(%rsp), %rcx
shrq $0x4, %rcx
movl 0x34(%rsp), %eax
addq %rcx, %rax
movl %eax, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jae 0x7ce9d
movq 0x18(%rsp), %rdi
movl 0x30(%rsp), %eax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x210d0
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x7ce71
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x7cf2b
movq 0x10(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x7cf19
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
callq 0x7cc50
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x2c(%rsp)
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rsi
movl 0x2c(%rsp), %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x22790
jmp 0x7cf1b
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x7ceab
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x20(%rax)
movl 0x34(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x28(%rax)
movl 0x34(%rsp), %ecx
shll %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x2c(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| map_hash_resize:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+28h], 1
jnz short loc_7CE13
mov [rsp+48h+var_14], 4
jmp short loc_7CE21
loc_7CE13:
mov rax, [rsp+48h+var_10]
mov eax, [rax+28h]
shl eax, 1
mov [rsp+48h+var_14], eax
loc_7CE21:
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_10]
mov rsi, [rax+20h]
mov eax, [rsp+48h+var_14]
mov edx, eax
shl rdx, 4
lea rcx, [rsp+48h+var_28]
call js_realloc2
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_30], 0
jnz short loc_7CE55
jmp loc_7CF53
loc_7CE55:
mov rcx, [rsp+48h+var_28]
shr rcx, 4
mov eax, [rsp+48h+var_14]
add rax, rcx
mov [rsp+48h+var_14], eax
mov [rsp+48h+var_18], 0
loc_7CE71:
mov eax, [rsp+48h+var_18]
cmp eax, [rsp+48h+var_14]
jnb short loc_7CE9D
mov rdi, [rsp+48h+var_30]
mov eax, [rsp+48h+var_18]
shl rax, 4
add rdi, rax
call init_list_head_0
mov eax, [rsp+48h+var_18]
add eax, 1
mov [rsp+48h+var_18], eax
jmp short loc_7CE71
loc_7CE9D:
mov rax, [rsp+48h+var_10]
mov rax, [rax+10h]
mov [rsp+48h+var_38], rax
loc_7CEAB:
mov rax, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_10]
add rcx, 8
cmp rax, rcx
jz short loc_7CF2B
mov rax, [rsp+48h+var_38]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_40]
cmp dword ptr [rax+4], 0
jnz short loc_7CF19
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_40]
mov rsi, [rax+30h]
mov rdx, [rax+38h]
call map_hash_key
mov ecx, [rsp+48h+var_14]
sub ecx, 1
and eax, ecx
mov [rsp+48h+var_1C], eax
mov rdi, [rsp+48h+var_40]
add rdi, 20h ; ' '
mov rsi, [rsp+48h+var_30]
mov eax, [rsp+48h+var_1C]
shl rax, 4
add rsi, rax
call list_add_tail_0
loc_7CF19:
jmp short $+2
loc_7CF1B:
mov rax, [rsp+48h+var_38]
mov rax, [rax+8]
mov [rsp+48h+var_38], rax
jmp short loc_7CEAB
loc_7CF2B:
mov rcx, [rsp+48h+var_30]
mov rax, [rsp+48h+var_10]
mov [rax+20h], rcx
mov ecx, [rsp+48h+var_14]
mov rax, [rsp+48h+var_10]
mov [rax+28h], ecx
mov ecx, [rsp+48h+var_14]
shl ecx, 1
mov rax, [rsp+48h+var_10]
mov [rax+2Ch], ecx
loc_7CF53:
add rsp, 48h
retn
| long long map_hash_resize(long long a1, long long a2)
{
long long result; // rax
int v3; // eax
long long v4; // [rsp+8h] [rbp-40h]
long long j; // [rsp+10h] [rbp-38h]
long long v6; // [rsp+18h] [rbp-30h]
unsigned long long v7; // [rsp+20h] [rbp-28h] BYREF
unsigned int v8; // [rsp+2Ch] [rbp-1Ch]
unsigned int i; // [rsp+30h] [rbp-18h]
unsigned int v10; // [rsp+34h] [rbp-14h]
long long v11; // [rsp+38h] [rbp-10h]
long long v12; // [rsp+40h] [rbp-8h]
v12 = a1;
v11 = a2;
if ( *(_DWORD *)(a2 + 40) == 1 )
v10 = 4;
else
v10 = 2 * *(_DWORD *)(v11 + 40);
result = js_realloc2(v12, *(_QWORD *)(v11 + 32), 16LL * v10, &v7);
v6 = result;
if ( result )
{
v10 += v7 >> 4;
for ( i = 0; i < v10; ++i )
init_list_head_0((_QWORD *)(16LL * i + v6));
for ( j = *(_QWORD *)(v11 + 16); j != v11 + 8; j = *(_QWORD *)(j + 8) )
{
v4 = j - 16;
if ( !*(_DWORD *)(j - 16 + 4) )
{
v3 = map_hash_key(v12, *(_QWORD *)(v4 + 48), *(_QWORD *)(v4 + 56));
v8 = (v10 - 1) & v3;
list_add_tail_0(v4 + 32, (_QWORD *)(16LL * v8 + v6));
}
}
*(_QWORD *)(v11 + 32) = v6;
*(_DWORD *)(v11 + 40) = v10;
result = v11;
*(_DWORD *)(v11 + 44) = 2 * v10;
}
return result;
}
| map_hash_resize:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x28],0x1
JNZ 0x0017ce13
MOV dword ptr [RSP + 0x34],0x4
JMP 0x0017ce21
LAB_0017ce13:
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX + 0x28]
SHL EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
LAB_0017ce21:
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RSP + 0x34]
MOV EDX,EAX
SHL RDX,0x4
LEA RCX,[RSP + 0x20]
CALL 0x00120bc0
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x0017ce55
JMP 0x0017cf53
LAB_0017ce55:
MOV RCX,qword ptr [RSP + 0x20]
SHR RCX,0x4
MOV EAX,dword ptr [RSP + 0x34]
ADD RAX,RCX
MOV dword ptr [RSP + 0x34],EAX
MOV dword ptr [RSP + 0x30],0x0
LAB_0017ce71:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x34]
JNC 0x0017ce9d
MOV RDI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x30]
SHL RAX,0x4
ADD RDI,RAX
CALL 0x001210d0
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x0017ce71
LAB_0017ce9d:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_0017ceab:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
ADD RCX,0x8
CMP RAX,RCX
JZ 0x0017cf2b
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,-0x10
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x0017cf19
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RAX + 0x38]
CALL 0x0017cc50
MOV ECX,dword ptr [RSP + 0x34]
SUB ECX,0x1
AND EAX,ECX
MOV dword ptr [RSP + 0x2c],EAX
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x2c]
SHL RAX,0x4
ADD RSI,RAX
CALL 0x00122790
LAB_0017cf19:
JMP 0x0017cf1b
LAB_0017cf1b:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0017ceab
LAB_0017cf2b:
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x20],RCX
MOV ECX,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x28],ECX
MOV ECX,dword ptr [RSP + 0x34]
SHL ECX,0x1
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x2c],ECX
LAB_0017cf53:
ADD RSP,0x48
RET
|
void map_hash_resize(int8 param_1,long param_2)
{
long lVar1;
long local_38;
ulong local_28;
uint local_1c;
uint local_18;
uint local_14;
long local_10;
int8 local_8;
if (*(int *)(param_2 + 0x28) == 1) {
local_14 = 4;
}
else {
local_14 = *(int *)(param_2 + 0x28) << 1;
}
local_10 = param_2;
local_8 = param_1;
lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x20),(ulong)local_14 << 4,&local_28);
if (lVar1 != 0) {
local_14 = local_14 + (int)(local_28 >> 4);
for (local_18 = 0; local_18 < local_14; local_18 = local_18 + 1) {
init_list_head(lVar1 + (ulong)local_18 * 0x10);
}
for (local_38 = *(long *)(local_10 + 0x10); local_38 != local_10 + 8;
local_38 = *(long *)(local_38 + 8)) {
if (*(int *)(local_38 + -0xc) == 0) {
local_1c = map_hash_key(local_8,*(int8 *)(local_38 + 0x20),
*(int8 *)(local_38 + 0x28));
local_1c = local_1c & local_14 - 1;
list_add_tail(local_38 + 0x10,lVar1 + (ulong)local_1c * 0x10);
}
}
*(long *)(local_10 + 0x20) = lVar1;
*(uint *)(local_10 + 0x28) = local_14;
*(uint *)(local_10 + 0x2c) = local_14 << 1;
}
return;
}
| |
28,393 | my_fill_ucs2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)),
char *s, size_t l, int fill)
{
DBUG_ASSERT(fill <= 0xFFFF);
#ifdef WAITING_FOR_GCC_VECTORIZATION_BUG_TO_BE_FIXED
/*
This code with int2store() is known to be faster on some processors,
but crashes on other processors due to a possible bug in GCC's
-ftree-vectorization (which is enabled in -O3) in case of
a non-aligned memory. See here for details:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039
*/
char *last= s + l - 2;
uint16 tmp= (fill >> 8) + ((fill & 0xFF) << 8); /* swap bytes */
DBUG_ASSERT(fill <= 0xFFFF);
for ( ; s <= last; s+= 2)
int2store(s, tmp); /* store little-endian */
#else
for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2);
#endif
} | O0 | c | my_fill_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0x70bb5
jmp 0x70bb7
cmpq $0x2, -0x18(%rbp)
jb 0x70bf9
jmp 0x70bc0
movl -0x1c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x70bb7
popq %rbp
retq
nopl (%rax,%rax)
| my_fill_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
jmp short $+2
loc_70BB5:
jmp short $+2
loc_70BB7:
cmp [rbp+var_18], 2
jb short loc_70BF9
jmp short $+2
loc_70BC0:
mov eax, [rbp+var_1C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov eax, [rbp+var_1C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
sub rax, 2
mov [rbp+var_18], rax
jmp short loc_70BB7
loc_70BF9:
pop rbp
retn
| unsigned long long my_fill_ucs2(long long a1, _BYTE *a2, unsigned long long a3, __int16 a4)
{
unsigned long long result; // rax
while ( a3 >= 2 )
{
*a2 = HIBYTE(a4);
a2[1] = a4;
a2 += 2;
result = a3 - 2;
a3 -= 2LL;
}
return result;
}
| my_fill_ucs2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x00170bb5
LAB_00170bb5:
JMP 0x00170bb7
LAB_00170bb7:
CMP qword ptr [RBP + -0x18],0x2
JC 0x00170bf9
JMP 0x00170bc0
LAB_00170bc0:
MOV EAX,dword ptr [RBP + -0x1c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00170bb7
LAB_00170bf9:
POP RBP
RET
|
void my_fill_ucs2(int8 param_1,int1 *param_2,ulong param_3,int4 param_4)
{
ulong local_20;
int1 *local_18;
local_18 = param_2;
for (local_20 = param_3; 1 < local_20; local_20 = local_20 - 2) {
*local_18 = (char)((uint)param_4 >> 8);
local_18[1] = (char)param_4;
local_18 = local_18 + 2;
}
return;
}
| |
28,394 | minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) | llama.cpp/common/minja/minja.hpp | ForTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter,
std::shared_ptr<Expression> && c, bool r)
: TemplateToken(Type::For, loc, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {} | O3 | cpp | minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rdi, %rbx
leaq 0x725f5(%rip), %r12 # 0x160920
addq $0x10, %r12
movq %r12, (%rdi)
movl $0x6, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0xee362
movq 0x73c44(%rip), %rdi # 0x161f98
cmpb $0x0, (%rdi)
je 0xee35e
incl 0x8(%rax)
jmp 0xee362
lock
incl 0x8(%rax)
leaq 0x18(%rbx), %r15
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
leaq 0x72ddd(%rip), %rax # 0x161158
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x30(%rbx), %rdi
movq %r8, %rsi
callq 0x6523c
movb 0x38(%rsp), %al
movq 0x30(%rsp), %rcx
xorl %edx, %edx
movq %rdx, 0x50(%rbx)
movups (%r14), %xmm0
movq %rdx, 0x8(%r14)
movups %xmm0, 0x48(%rbx)
movq %rdx, (%r14)
movq %rdx, 0x60(%rbx)
movups (%rcx), %xmm0
movq %rdx, 0x8(%rcx)
movups %xmm0, 0x58(%rbx)
movq %rdx, (%rcx)
movb %al, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, (%rbx)
movq %r15, %rdi
callq 0x70a5a
movq %r14, %rdi
callq 0x20af0
nop
| _ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b:
push r15
push r14
push r12
push rbx
push rax
mov r14, r9
mov rbx, rdi
lea r12, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add r12, 10h
mov [rdi], r12
mov dword ptr [rdi+8], 6
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_EE362
mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rdi], 0
jz short loc_EE35E
inc dword ptr [rax+8]
jmp short loc_EE362
loc_EE35E:
lock inc dword ptr [rax+8]
loc_EE362:
lea r15, [rbx+18h]
mov rax, [rsi+10h]
mov [rbx+20h], rax
mov [rbx+28h], edx
mov [rbx+2Ch], ecx
lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+30h]
mov rsi, r8
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov al, [rsp+28h+arg_8]
mov rcx, [rsp+28h+arg_0]
xor edx, edx
mov [rbx+50h], rdx
movups xmm0, xmmword ptr [r14]
mov [r14+8], rdx
movups xmmword ptr [rbx+48h], xmm0
mov [r14], rdx
mov [rbx+60h], rdx
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rdx
movups xmmword ptr [rbx+58h], xmm0
mov [rcx], rdx
mov [rbx+68h], al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r12
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| char minja::ForTemplateToken::ForTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
_QWORD *a5,
__int128 *a6,
__int128 *a7,
char a8)
{
long long v9; // rax
char result; // al
__int128 v11; // xmm0
__int128 v12; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 6;
*(_QWORD *)(a1 + 16) = *a2;
v9 = a2[1];
*(_QWORD *)(a1 + 24) = v9;
if ( v9 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v9 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v9 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2;
std::vector<std::string>::vector(a1 + 48, a5);
result = a8;
*(_QWORD *)(a1 + 80) = 0LL;
v11 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v11;
*(_QWORD *)a6 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v12 = *a7;
*((_QWORD *)a7 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v12;
*(_QWORD *)a7 = 0LL;
*(_BYTE *)(a1 + 104) = a8;
return result;
}
| ForTemplateToken:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV RBX,RDI
LEA R12,[0x260920]
ADD R12,0x10
MOV qword ptr [RDI],R12
MOV dword ptr [RDI + 0x8],0x6
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x001ee362
MOV RDI,qword ptr [0x00261f98]
CMP byte ptr [RDI],0x0
JZ 0x001ee35e
INC dword ptr [RAX + 0x8]
JMP 0x001ee362
LAB_001ee35e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001ee362:
LEA R15,[RBX + 0x18]
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV dword ptr [RBX + 0x28],EDX
MOV dword ptr [RBX + 0x2c],ECX
LEA RAX,[0x261158]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x30]
LAB_001ee386:
MOV RSI,R8
CALL 0x0016523c
LAB_001ee38e:
MOV AL,byte ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
XOR EDX,EDX
MOV qword ptr [RBX + 0x50],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV qword ptr [R14],RDX
MOV qword ptr [RBX + 0x60],RDX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [RCX],RDX
MOV byte ptr [RBX + 0x68],AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */
void __thiscall
minja::ForTemplateToken::ForTemplateToken
(ForTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR__TemplateToken_00260930;
*(int4 *)(this + 8) = 6;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__ForTemplateToken_00261168;
/* try { // try from 001ee386 to 001ee38d has its CatchHandler @ 001ee3cd */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30),
param_5);
*(int8 *)(this + 0x50) = 0;
uVar2 = param_6[1];
param_6[1] = 0;
*(int8 *)(this + 0x48) = *param_6;
*(int8 *)(this + 0x50) = uVar2;
*param_6 = 0;
*(int8 *)(this + 0x60) = 0;
uVar2 = param_7[1];
param_7[1] = 0;
*(int8 *)(this + 0x58) = *param_7;
*(int8 *)(this + 0x60) = uVar2;
*param_7 = 0;
this[0x68] = param_8;
return;
}
| |
28,395 | mysql_data_seek | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void STDCALL
mysql_data_seek(MYSQL_RES *result, unsigned long long row)
{
MYSQL_ROWS *tmp=0;
if (result->data)
for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ;
result->current_row=0;
result->data_cursor = tmp;
} | O0 | c | mysql_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x8495d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x84943
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x8494c
jmp 0x8495b
jmp 0x8494e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8491e
jmp 0x8495d
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| mysql_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_8495D
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax]
mov [rbp+var_18], rax
loc_8491E:
mov rcx, [rbp+var_10]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_19], al
jz short loc_84943
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_19], al
loc_84943:
mov al, [rbp+var_19]
test al, 1
jnz short loc_8494C
jmp short loc_8495B
loc_8494C:
jmp short $+2
loc_8494E:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_8491E
loc_8495B:
jmp short $+2
loc_8495D:
mov rax, [rbp+var_8]
mov qword ptr [rax+68h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+20h], rcx
pop rbp
retn
| long long mysql_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-19h]
_QWORD *i; // [rsp+2h] [rbp-18h]
i = 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
for ( i = **(_QWORD ***)(a1 + 24); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
result = a1;
*(_QWORD *)(a1 + 32) = i;
return result;
}
| mysql_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0018495d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0018491e:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00184943
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_00184943:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0018494c
JMP 0x0018495b
LAB_0018494c:
JMP 0x0018494e
LAB_0018494e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0018491e
LAB_0018495b:
JMP 0x0018495d
LAB_0018495d:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
POP RBP
RET
|
void mysql_data_seek(long param_1,long param_2)
{
int8 *local_20;
long local_18;
local_20 = (int8 *)0x0;
if (*(long *)(param_1 + 0x18) != 0) {
local_18 = param_2;
for (local_20 = (int8 *)**(int8 **)(param_1 + 0x18);
local_18 != 0 && local_20 != (int8 *)0x0; local_20 = (int8 *)*local_20) {
local_18 = local_18 + -1;
}
}
*(int8 *)(param_1 + 0x68) = 0;
*(int8 **)(param_1 + 0x20) = local_20;
return;
}
| |
28,396 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&) | monkey531[P]llama/common/./json.hpp | reference emplace_back(Args&& ... args)
{
// emplace_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (perfect forwarding)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->emplace_back(std::forward<Args>(args)...);
return set_parent(m_data.m_value.array->back(), old_capacity);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x9a72e
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a720
movq %rax, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
jmp 0x9a737
cmpl $0x2, %eax
jne 0x9a754
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x9a872
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
addq $-0x10, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a390
movq %rax, %rbx
movq %r14, %rdi
callq 0x42dd6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x1c4fc(%rip), %rsi # 0xb6c74
leaq 0x10(%rsp), %rdi
callq 0x9a7ea
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x137, %esi # imm = 0x137
movq %r14, %rcx
callq 0x4ea00
xorl %ebp, %ebp
leaq 0x46b25(%rip), %rsi # 0xe12c8
leaq -0x4970e(%rip), %rdx # 0x5109c
movq %rbx, %rdi
callq 0x1acd0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a7d0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a740
testb %bpl, %bpl
jne 0x9a7da
jmp 0x9a7e2
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a530
movq %r14, %rdi
callq 0x1ad30
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_9A72E
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
jmp short loc_9A737
loc_9A72E:
cmp eax, 2
jnz short loc_9A754
mov rdi, [r14+8]
loc_9A737:
mov rsi, rbx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)
mov rax, [r14+8]
mov rax, [rax+8]
add rax, 0FFFFFFFFFFFFFFF0h
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_9A754:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseEmpla; "cannot use emplace_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 137h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9A7D0
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A7D0:
test bpl, bpl
jnz short loc_9A7DA
jmp short loc_9A7E2
mov r14, rax
loc_9A7DA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9A7E2:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
long long a1,
long long a2)
{
long long v3; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
v6,
"cannot use emplace_back() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
311,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD *)(a1 + 8);
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
}
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
v3,
a2);
return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL;
}
| emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x0019a72e
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a720
MOV RDI,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
JMP 0x0019a737
LAB_0019a72e:
CMP EAX,0x2
JNZ 0x0019a754
MOV RDI,qword ptr [R14 + 0x8]
LAB_0019a737:
MOV RSI,RBX
CALL 0x0019a872
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,-0x10
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0019a754:
MOV EDI,0x20
CALL 0x0011a390
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142dd6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0019a771:
LEA RSI,[0x1b6c74]
LEA RDI,[RSP + 0x10]
CALL 0x0019a7ea
MOV BPL,0x1
LAB_0019a785:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x137
MOV RCX,R14
CALL 0x0014ea00
XOR EBP,EBP
LEA RSI,[0x1e12c8]
LEA RDX,[0x15109c]
MOV RDI,RBX
CALL 0x0011acd0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
basic_json * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this_00;
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
this_00 = (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)operator_new(0x18);
*(int8 *)this_00 = 0;
*(int8 *)(this_00 + 8) = 0;
*(int8 *)(this_00 + 0x10) = 0;
*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8) = this_00;
}
else {
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0019a771 to 0019a781 has its CatchHandler @ 0019a7d7 */
detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(local_38,"cannot use emplace_back() with ",&local_40);
/* try { // try from 0019a785 to 0019a7b1 has its CatchHandler @ 0019a7b2 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x137,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(this_00,param_1);
return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10);
}
| |
28,397 | lo0bits | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static int lo0bits(ULong *y)
{
register int k;
register ULong x= *y;
if (x & 7)
{
if (x & 1)
return 0;
if (x & 2)
{
*y= x >> 1;
return 1;
}
*y= x >> 2;
return 2;
}
k= 0;
if (!(x & 0xffff))
{
k= 16;
x>>= 16;
}
if (!(x & 0xff))
{
k+= 8;
x>>= 8;
}
if (!(x & 0xf))
{
k+= 4;
x>>= 4;
}
if (!(x & 0x3))
{
k+= 2;
x>>= 2;
}
if (!(x & 1))
{
k++;
x>>= 1;
if (!x)
return 32;
}
*y= x;
return k;
} | O3 | c | lo0bits:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
testb $0x7, %cl
je 0x84850
xorl %eax, %eax
testb $0x1, %cl
jne 0x848b7
testb $0x2, %cl
jne 0x848ae
shrl $0x2, %ecx
movl $0x2, %eax
jmp 0x848b5
movl %ecx, %eax
shrl $0x10, %eax
xorl %edx, %edx
testl $0xfff8, %ecx # imm = 0xFFF8
cmovnel %ecx, %eax
sete %dl
shll $0x4, %edx
leal 0x8(%rdx), %ecx
movl %eax, %esi
shrl $0x8, %esi
testb %al, %al
cmovnel %edx, %ecx
cmovnel %eax, %esi
leal 0x4(%rcx), %edx
movl %esi, %r8d
shrl $0x4, %r8d
testb $0xf, %sil
cmovnel %ecx, %edx
cmovnel %esi, %r8d
leal 0x2(%rdx), %eax
movl %r8d, %ecx
shrl $0x2, %ecx
testb $0x3, %r8b
cmovnel %edx, %eax
cmovnel %r8d, %ecx
testb $0x1, %cl
jne 0x848b5
testl %ecx, %ecx
je 0x848b9
incl %eax
shrl %ecx
jmp 0x848b5
shrl %ecx
movl $0x1, %eax
movl %ecx, (%rdi)
popq %rbp
retq
movl $0x20, %eax
jmp 0x848b7
| lo0bits:
push rbp
mov rbp, rsp
mov ecx, [rdi]
test cl, 7
jz short loc_84850
xor eax, eax
test cl, 1
jnz short loc_848B7
test cl, 2
jnz short loc_848AE
shr ecx, 2
mov eax, 2
jmp short loc_848B5
loc_84850:
mov eax, ecx
shr eax, 10h
xor edx, edx
test ecx, 0FFF8h
cmovnz eax, ecx
setz dl
shl edx, 4
lea ecx, [rdx+8]
mov esi, eax
shr esi, 8
test al, al
cmovnz ecx, edx
cmovnz esi, eax
lea edx, [rcx+4]
mov r8d, esi
shr r8d, 4
test sil, 0Fh
cmovnz edx, ecx
cmovnz r8d, esi
lea eax, [rdx+2]
mov ecx, r8d
shr ecx, 2
test r8b, 3
cmovnz eax, edx
cmovnz ecx, r8d
test cl, 1
jnz short loc_848B5
test ecx, ecx
jz short loc_848B9
inc eax
shr ecx, 1
jmp short loc_848B5
loc_848AE:
shr ecx, 1
mov eax, 1
loc_848B5:
mov [rdi], ecx
loc_848B7:
pop rbp
retn
loc_848B9:
mov eax, 20h ; ' '
jmp short loc_848B7
| long long lo0bits(unsigned int *a1)
{
unsigned int v1; // ecx
long long result; // rax
unsigned int v3; // ecx
unsigned int v4; // eax
int v5; // edx
int v6; // edx
int v7; // ecx
unsigned int v8; // esi
unsigned int v9; // edx
unsigned int v10; // r8d
v1 = *a1;
if ( (*a1 & 7) != 0 )
{
result = 0LL;
if ( (v1 & 1) != 0 )
return result;
if ( (v1 & 2) != 0 )
{
v3 = v1 >> 1;
result = 1LL;
}
else
{
v3 = v1 >> 2;
result = 2LL;
}
}
else
{
v4 = HIWORD(v1);
v5 = 0;
if ( (v1 & 0xFFF8) != 0 )
v4 = *a1;
LOBYTE(v5) = (*a1 & 0xFFF8) == 0;
v6 = 16 * v5;
v7 = v6 + 8;
v8 = v4 >> 8;
if ( (_BYTE)v4 )
{
v7 = v6;
v8 = v4;
}
v9 = v7 + 4;
v10 = v8 >> 4;
if ( (v8 & 0xF) != 0 )
{
v9 = v7;
v10 = v8;
}
result = v9 + 2;
v3 = v10 >> 2;
if ( (v10 & 3) != 0 )
{
result = v9;
v3 = v10;
}
if ( (v3 & 1) == 0 )
{
if ( !v3 )
return 32LL;
result = (unsigned int)(result + 1);
v3 >>= 1;
}
}
*a1 = v3;
return result;
}
| lo0bits:
PUSH RBP
MOV RBP,RSP
MOV ECX,dword ptr [RDI]
TEST CL,0x7
JZ 0x00184850
XOR EAX,EAX
TEST CL,0x1
JNZ 0x001848b7
TEST CL,0x2
JNZ 0x001848ae
SHR ECX,0x2
MOV EAX,0x2
JMP 0x001848b5
LAB_00184850:
MOV EAX,ECX
SHR EAX,0x10
XOR EDX,EDX
TEST ECX,0xfff8
CMOVNZ EAX,ECX
SETZ DL
SHL EDX,0x4
LEA ECX,[RDX + 0x8]
MOV ESI,EAX
SHR ESI,0x8
TEST AL,AL
CMOVNZ ECX,EDX
CMOVNZ ESI,EAX
LEA EDX,[RCX + 0x4]
MOV R8D,ESI
SHR R8D,0x4
TEST SIL,0xf
CMOVNZ EDX,ECX
CMOVNZ R8D,ESI
LEA EAX,[RDX + 0x2]
MOV ECX,R8D
SHR ECX,0x2
TEST R8B,0x3
CMOVNZ EAX,EDX
CMOVNZ ECX,R8D
TEST CL,0x1
JNZ 0x001848b5
TEST ECX,ECX
JZ 0x001848b9
INC EAX
SHR ECX,0x1
JMP 0x001848b5
LAB_001848ae:
SHR ECX,0x1
MOV EAX,0x1
LAB_001848b5:
MOV dword ptr [RDI],ECX
LAB_001848b7:
POP RBP
RET
LAB_001848b9:
MOV EAX,0x20
JMP 0x001848b7
|
int lo0bits(uint *param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
bool bVar5;
uVar3 = *param_1;
if ((uVar3 & 7) == 0) {
bVar5 = (uVar3 & 0xfff8) == 0;
uVar1 = uVar3 >> 0x10;
if (!bVar5) {
uVar1 = uVar3;
}
iVar4 = (uint)bVar5 * 0x10;
uVar3 = uVar1 >> 8;
iVar2 = iVar4 + 8;
if ((char)uVar1 != '\0') {
uVar3 = uVar1;
iVar2 = iVar4;
}
uVar1 = uVar3 >> 4;
iVar4 = iVar2 + 4;
if ((uVar3 & 0xf) != 0) {
uVar1 = uVar3;
iVar4 = iVar2;
}
uVar3 = uVar1 >> 2;
iVar2 = iVar4 + 2;
if ((uVar1 & 3) != 0) {
uVar3 = uVar1;
iVar2 = iVar4;
}
if ((uVar3 & 1) == 0) {
if (uVar3 == 0) {
return 0x20;
}
iVar2 = iVar2 + 1;
uVar3 = uVar3 >> 1;
}
}
else {
if ((uVar3 & 1) != 0) {
return 0;
}
if ((uVar3 & 2) == 0) {
uVar3 = uVar3 >> 2;
iVar2 = 2;
}
else {
uVar3 = uVar3 >> 1;
iVar2 = 1;
}
}
*param_1 = uVar3;
return iVar2;
}
| |
28,398 | ftxui::align_right(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/composite_decorator.cpp | Element align_right(Element child) {
return hbox(filler(), std::move(child));
} | O1 | cpp | ftxui::align_right(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x237ac
movq (%r14), %rax
movq %rsp, %rdx
movq %rax, (%rdx)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq 0x8(%r14), %rcx
movq %rax, 0x8(%r14)
movq %rcx, 0x8(%rdx)
movq %rax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x150ab
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2343b
callq 0x14c7c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2344a
callq 0x14c7c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x23469
callq 0x14c7c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23478
callq 0x14c7c
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui11align_rightESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+38h+var_28]
mov rdi, r15; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
mov rax, [r14]
mov rdx, rsp
mov [rdx], rax
xor eax, eax
mov [rdx+8], rax
mov rcx, [r14+8]
mov [r14+8], rax
mov [rdx+8], rcx
mov [r14], rax
mov rdi, rbx
mov rsi, r15
call _ZN5ftxui4hboxIJSt10shared_ptrINS_4NodeEES3_EEES3_DpT_; ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>)
mov rdi, [rsp+38h+var_30]
test rdi, rdi
jz short loc_2343B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2343B:
mov rdi, [rsp+38h+var_20]
test rdi, rdi
jz short loc_2344A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2344A:
mov rax, rbx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_23469
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23469:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_23478
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23478:
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::align_right(long long a1, long long *a2)
{
volatile signed __int32 *v2; // rcx
int v3; // r8d
int v4; // r9d
long long v6; // [rsp+0h] [rbp-38h] BYREF
volatile signed __int32 *v7; // [rsp+8h] [rbp-30h]
long long v8; // [rsp+10h] [rbp-28h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-20h]
ftxui::filler((ftxui *)&v8);
v6 = *a2;
v7 = 0LL;
v2 = (volatile signed __int32 *)a2[1];
a2[1] = 0LL;
v7 = v2;
*a2 = 0LL;
ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(a1, &v8, &v6, (_DWORD)v2, v3, v4);
if ( v7 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
return a1;
}
| align_right:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x001237ac
MOV RAX,qword ptr [R14]
MOV RDX,RSP
MOV qword ptr [RDX],RAX
XOR EAX,EAX
MOV qword ptr [RDX + 0x8],RAX
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RDX + 0x8],RCX
MOV qword ptr [R14],RAX
LAB_00123421:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001150ab
LAB_0012342c:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012343b
CALL 0x00114c7c
LAB_0012343b:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012344a
CALL 0x00114c7c
LAB_0012344a:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* ftxui::align_right(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::align_right(ftxui *this,int8 *param_2)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00;
ftxui local_28 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
filler(local_28);
this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00123421 to 0012342b has its CatchHandler @ 00123457 */
hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(this,local_28);
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00);
}
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
return this;
}
| |
28,399 | delete_dynamic_record | eloqsql/storage/myisam/mi_dynrec.c | static int delete_dynamic_record(MI_INFO *info, my_off_t filepos,
uint second_read)
{
uint length,b_type;
MI_BLOCK_INFO block_info,del_block;
int error;
my_bool remove_next_block;
DBUG_ENTER("delete_dynamic_record");
/* First add a link from the last block to the new one */
error= update_backward_delete_link(info, info->s->state.dellink, filepos);
block_info.second_read=second_read;
do
{
/* Remove block at 'filepos' */
if ((b_type=_mi_get_block_info(&block_info,info->dfile,filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR) ||
(length=(uint) (block_info.filepos-filepos) +block_info.block_len) <
MI_MIN_BLOCK_LENGTH)
{
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
/* Check if next block is a delete block */
del_block.second_read=0;
remove_next_block=0;
if (_mi_get_block_info(&del_block,info->dfile,filepos+length) &
BLOCK_DELETED && del_block.block_len+length < MI_DYN_MAX_BLOCK_LENGTH)
{
/* We can't remove this yet as this block may be the head block */
remove_next_block=1;
length+=del_block.block_len;
}
block_info.header[0]=0;
mi_int3store(block_info.header+1,length);
mi_sizestore(block_info.header+4,info->s->state.dellink);
if (b_type & BLOCK_LAST)
bfill(block_info.header+12,8,255);
else
mi_sizestore(block_info.header+12,block_info.next_filepos);
if (info->s->file_write(info,(uchar*) block_info.header,20,filepos,
MYF(MY_NABP)))
DBUG_RETURN(1);
info->s->state.dellink = filepos;
info->state->del++;
info->state->empty+=length;
filepos=block_info.next_filepos;
/* Now it's safe to unlink the deleted block directly after this one */
if (remove_next_block && unlink_deleted_block(info,&del_block))
error=1;
} while (!(b_type & BLOCK_LAST));
DBUG_RETURN(error);
} | O3 | c | delete_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x58(%rax), %rsi
movq %r15, %rdx
callq 0x797f6
movl %eax, -0xe4(%rbp)
leaq -0x88(%rbp), %rax
movl %r13d, 0x50(%rax)
movl 0x1c0(%r14), %esi
leaq -0x88(%rbp), %rdi
movq %r15, %rdx
callq 0x792ef
cmpl $0x3, %eax
ja 0x78bc7
movq -0x50(%rbp), %rbx
subq %r15, %rbx
addq -0x60(%rbp), %rbx
cmpl $0x13, %ebx
jbe 0x78bc7
movl %eax, %r13d
movl $0x0, -0x90(%rbp)
movl 0x1c0(%r14), %esi
movq %r15, %rax
movl %ebx, %r15d
movq %rax, -0xf0(%rbp)
leaq (%r15,%rax), %rdx
leaq -0xe0(%rbp), %rdi
callq 0x792ef
testb $0x4, %al
sete %al
addq -0xb8(%rbp), %r15
cmpq $0xfffffc, %r15 # imm = 0xFFFFFC
setae %r12b
orb %al, %r12b
jne 0x78b00
movq %r15, %rbx
movb $0x0, -0x88(%rbp)
movb %bl, -0x85(%rbp)
movb %bh, -0x86(%rbp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, -0x87(%rbp)
movq (%r14), %rax
movq 0x58(%rax), %rcx
bswapq %rcx
movq %rcx, -0x84(%rbp)
cmpl $0x2, %r13d
jae 0x78b42
movq -0x48(%rbp), %rcx
bswapq %rcx
movq %rcx, -0x7c(%rbp)
jmp 0x78b4a
movq $-0x1, -0x7c(%rbp)
movq -0xf0(%rbp), %r15
movl $0x14, %edx
movl $0x4, %r8d
movq %r14, %rdi
leaq -0x88(%rbp), %rsi
movq %r15, %rcx
callq *0x2e8(%rax)
testq %rax, %rax
jne 0x78bd2
movl %ebx, %eax
movq (%r14), %rcx
movq %r15, 0x58(%rcx)
movq 0x8(%r14), %rcx
incq 0x8(%rcx)
movq 0x8(%r14), %rcx
addq %rax, 0x10(%rcx)
movq -0x48(%rbp), %r15
testb %r12b, %r12b
jne 0x78bbb
movq %r14, %rdi
leaq -0xe0(%rbp), %rsi
callq 0x796c5
testb %al, %al
movl -0xe4(%rbp), %eax
movl $0x1, %ecx
cmovnel %ecx, %eax
movl %eax, -0xe4(%rbp)
cmpl $0x2, %r13d
jb 0x78a7d
jmp 0x78bdc
callq 0xa29fe
movl $0x7f, (%rax)
movl $0x1, -0xe4(%rbp)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x78c03
movl -0xe4(%rbp), %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| delete_dynamic_record_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r13d, edx
mov r15, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov rsi, [rax+58h]
mov rdx, r15
call update_backward_delete_link_0
mov [rbp+var_E4], eax
lea rax, [rbp+var_88]
mov [rax+50h], r13d
loc_78A7D:
mov esi, [r14+1C0h]
lea rdi, [rbp+var_88]
mov rdx, r15
call _mi_get_block_info
cmp eax, 3
ja loc_78BC7
mov rbx, [rbp+var_50]
sub rbx, r15
add rbx, [rbp+var_60]
cmp ebx, 13h
jbe loc_78BC7
mov r13d, eax
mov [rbp+var_90], 0
mov esi, [r14+1C0h]
mov rax, r15
mov r15d, ebx
mov [rbp+var_F0], rax
lea rdx, [r15+rax]
lea rdi, [rbp+var_E0]
call _mi_get_block_info
test al, 4
setz al
add r15, [rbp+var_B8]
cmp r15, 0FFFFFCh
setnb r12b
or r12b, al
jnz short loc_78B00
mov rbx, r15
loc_78B00:
mov [rbp+var_88], 0
mov [rbp+var_85], bl
mov [rbp+var_86], bh
mov eax, ebx
shr eax, 10h
mov [rbp+var_87], al
mov rax, [r14]
mov rcx, [rax+58h]
bswap rcx
mov [rbp+var_84], rcx
cmp r13d, 2
jnb short loc_78B42
mov rcx, [rbp+var_48]
bswap rcx
mov [rbp+var_7C], rcx
jmp short loc_78B4A
loc_78B42:
mov [rbp+var_7C], 0FFFFFFFFFFFFFFFFh
loc_78B4A:
mov r15, [rbp+var_F0]
mov edx, 14h
mov r8d, 4
mov rdi, r14
lea rsi, [rbp+var_88]
mov rcx, r15
call qword ptr [rax+2E8h]
test rax, rax
jnz short loc_78BD2
mov eax, ebx
mov rcx, [r14]
mov [rcx+58h], r15
mov rcx, [r14+8]
inc qword ptr [rcx+8]
mov rcx, [r14+8]
add [rcx+10h], rax
mov r15, [rbp+var_48]
test r12b, r12b
jnz short loc_78BBB
mov rdi, r14
lea rsi, [rbp+var_E0]
call unlink_deleted_block_0
test al, al
mov eax, [rbp+var_E4]
mov ecx, 1
cmovnz eax, ecx
mov [rbp+var_E4], eax
loc_78BBB:
cmp r13d, 2
jb loc_78A7D
jmp short loc_78BDC
loc_78BC7:
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_78BD2:
mov [rbp+var_E4], 1
loc_78BDC:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_78C03
mov eax, [rbp+var_E4]
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_78C03:
call ___stack_chk_fail
| long long delete_dynamic_record_0(unsigned int *a1, unsigned long long a2, int a3)
{
unsigned long long v4; // r15
const char *v5; // rsi
unsigned int block_info; // eax
unsigned int v7; // ebx
unsigned int v8; // r13d
char v9; // al
bool v10; // r12
long long v11; // rax
bool v12; // zf
int v13; // eax
unsigned int v15; // [rsp+Ch] [rbp-E4h]
_BYTE v16[40]; // [rsp+10h] [rbp-E0h] BYREF
long long v17; // [rsp+38h] [rbp-B8h]
int v18; // [rsp+60h] [rbp-90h]
_BYTE v19[4]; // [rsp+68h] [rbp-88h] BYREF
unsigned long long v20; // [rsp+6Ch] [rbp-84h]
unsigned long long v21; // [rsp+74h] [rbp-7Ch]
long long v22; // [rsp+90h] [rbp-60h]
long long v23; // [rsp+A0h] [rbp-50h]
unsigned long long v24; // [rsp+A8h] [rbp-48h]
int v25; // [rsp+B8h] [rbp-38h]
unsigned long long v26; // [rsp+C0h] [rbp-30h]
v4 = a2;
v26 = __readfsqword(0x28u);
v15 = update_backward_delete_link_0(a1, *(_QWORD *)(*(_QWORD *)a1 + 88LL), a2);
v25 = a3;
while ( 1 )
{
v5 = (const char *)a1[112];
block_info = mi_get_block_info(v19, v5, v4);
if ( block_info > 3 )
break;
v7 = v22 + v23 - v4;
if ( v7 <= 0x13 )
break;
v8 = block_info;
v18 = 0;
v9 = mi_get_block_info(v16, a1[112], v7 + v4);
v10 = (v9 & 4) == 0 || v17 + (unsigned long long)v7 >= 0xFFFFFC;
if ( !v10 )
v7 += v17;
v19[0] = 0;
v19[2] = BYTE1(v7);
v19[3] = v7;
v19[1] = BYTE2(v7);
v11 = *(_QWORD *)a1;
v20 = _byteswap_uint64(*(_QWORD *)(*(_QWORD *)a1 + 88LL));
if ( v8 >= 2 )
v21 = -1LL;
else
v21 = _byteswap_uint64(v24);
if ( (*(long long ( **)(unsigned int *, _BYTE *, long long, unsigned long long, long long))(v11 + 744))(
a1,
v19,
20LL,
v4,
4LL) )
{
return 1;
}
*(_QWORD *)(*(_QWORD *)a1 + 88LL) = v4;
++*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
*(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) += v7;
v4 = v24;
if ( !v10 )
{
v12 = (unsigned __int8)unlink_deleted_block_0(a1, v16) == 0;
v13 = v15;
if ( !v12 )
v13 = 1;
v15 = v13;
}
if ( v8 >= 2 )
return v15;
}
*(_DWORD *)my_thread_var(v19, v5) = 127;
return 1;
}
| delete_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R13D,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDX,R15
CALL 0x001797f6
MOV dword ptr [RBP + -0xe4],EAX
LEA RAX,[RBP + -0x88]
MOV dword ptr [RAX + 0x50],R13D
LAB_00178a7d:
MOV ESI,dword ptr [R14 + 0x1c0]
LEA RDI,[RBP + -0x88]
MOV RDX,R15
CALL 0x001792ef
CMP EAX,0x3
JA 0x00178bc7
MOV RBX,qword ptr [RBP + -0x50]
SUB RBX,R15
ADD RBX,qword ptr [RBP + -0x60]
CMP EBX,0x13
JBE 0x00178bc7
MOV R13D,EAX
MOV dword ptr [RBP + -0x90],0x0
MOV ESI,dword ptr [R14 + 0x1c0]
MOV RAX,R15
MOV R15D,EBX
MOV qword ptr [RBP + -0xf0],RAX
LEA RDX,[R15 + RAX*0x1]
LEA RDI,[RBP + -0xe0]
CALL 0x001792ef
TEST AL,0x4
SETZ AL
ADD R15,qword ptr [RBP + -0xb8]
CMP R15,0xfffffc
SETNC R12B
OR R12B,AL
JNZ 0x00178b00
MOV RBX,R15
LAB_00178b00:
MOV byte ptr [RBP + -0x88],0x0
MOV byte ptr [RBP + -0x85],BL
MOV byte ptr [RBP + -0x86],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RBP + -0x87],AL
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [RAX + 0x58]
BSWAP RCX
MOV qword ptr [RBP + -0x84],RCX
CMP R13D,0x2
JNC 0x00178b42
MOV RCX,qword ptr [RBP + -0x48]
BSWAP RCX
MOV qword ptr [RBP + -0x7c],RCX
JMP 0x00178b4a
LAB_00178b42:
MOV qword ptr [RBP + -0x7c],-0x1
LAB_00178b4a:
MOV R15,qword ptr [RBP + -0xf0]
MOV EDX,0x14
MOV R8D,0x4
MOV RDI,R14
LEA RSI,[RBP + -0x88]
MOV RCX,R15
CALL qword ptr [RAX + 0x2e8]
TEST RAX,RAX
JNZ 0x00178bd2
MOV EAX,EBX
MOV RCX,qword ptr [R14]
MOV qword ptr [RCX + 0x58],R15
MOV RCX,qword ptr [R14 + 0x8]
INC qword ptr [RCX + 0x8]
MOV RCX,qword ptr [R14 + 0x8]
ADD qword ptr [RCX + 0x10],RAX
MOV R15,qword ptr [RBP + -0x48]
TEST R12B,R12B
JNZ 0x00178bbb
MOV RDI,R14
LEA RSI,[RBP + -0xe0]
CALL 0x001796c5
TEST AL,AL
MOV EAX,dword ptr [RBP + -0xe4]
MOV ECX,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0xe4],EAX
LAB_00178bbb:
CMP R13D,0x2
JC 0x00178a7d
JMP 0x00178bdc
LAB_00178bc7:
CALL 0x001a29fe
MOV dword ptr [RAX],0x7f
LAB_00178bd2:
MOV dword ptr [RBP + -0xe4],0x1
LAB_00178bdc:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00178c03
MOV EAX,dword ptr [RBP + -0xe4]
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00178c03:
CALL 0x00129270
|
int4 delete_dynamic_record(long *param_1,ulong param_2,int4 param_3)
{
ulong uVar1;
char cVar2;
uint uVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
ulong uVar7;
long in_FS_OFFSET;
bool bVar8;
int4 local_ec;
int1 local_e8 [40];
long local_c0;
int4 local_98;
int1 local_90;
int1 local_8f;
int1 local_8e;
int1 local_8d;
ulong local_8c;
ulong local_84;
long local_68;
long local_58;
ulong local_50;
int4 local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_ec = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 0x58),param_2);
local_40 = param_3;
do {
uVar3 = _mi_get_block_info(&local_90,(int)param_1[0x38],param_2);
if ((3 < uVar3) || (uVar7 = (local_58 - param_2) + local_68, (uint)uVar7 < 0x14)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7f;
LAB_00178bd2:
local_ec = 1;
break;
}
local_98 = 0;
uVar4 = _mi_get_block_info(local_e8,(int)param_1[0x38],(uVar7 & 0xffffffff) + param_2);
bVar8 = (uVar4 & 4) != 0;
uVar4 = (uVar7 & 0xffffffff) + local_c0;
if (uVar4 < 0xfffffc && bVar8) {
uVar7 = uVar4;
}
local_90 = 0;
local_8d = (int1)uVar7;
local_8e = (int1)(uVar7 >> 8);
local_8f = (int1)(uVar7 >> 0x10);
uVar1 = *(ulong *)(*param_1 + 0x58);
local_8c = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18
| (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |
(uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;
if (uVar3 < 2) {
local_84 = local_50 >> 0x38 | (local_50 & 0xff000000000000) >> 0x28 |
(local_50 & 0xff0000000000) >> 0x18 | (local_50 & 0xff00000000) >> 8 |
(local_50 & 0xff000000) << 8 | (local_50 & 0xff0000) << 0x18 |
(local_50 & 0xff00) << 0x28 | local_50 << 0x38;
}
else {
local_84 = 0xffffffffffffffff;
}
lVar5 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_90,0x14,param_2,4);
uVar1 = local_50;
if (lVar5 != 0) goto LAB_00178bd2;
*(ulong *)(*param_1 + 0x58) = param_2;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + (uVar7 & 0xffffffff);
if ((uVar4 < 0xfffffc && bVar8) &&
(cVar2 = unlink_deleted_block(param_1,local_e8), cVar2 != '\0')) {
local_ec = 1;
}
param_2 = uVar1;
} while (uVar3 < 2);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_ec;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.