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
|
---|---|---|---|---|---|---|---|---|---|---|---|
4,000 | uf_prespace | eloqsql/storage/maria/ma_packrec.c | static void uf_prespace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill(to, spaces, ' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
} | O3 | c | uf_prespace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %ecx
movl 0x24(%rdi), %r13d
cmpl %r13d, %ecx
jae 0x45e47
subl %ecx, %r13d
leaq 0x9b20f(%rip), %rax # 0xe1020
movq %rbx, -0x30(%rbp)
movl (%rax,%rcx,4), %ebx
andl (%r14), %ebx
movl %r13d, %ecx
shll %cl, %ebx
movq %r14, %rdi
callq 0x4519c
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %ebx, %eax
movq -0x30(%rbp), %rbx
jmp 0x45e61
movl (%r14), %eax
subl %r13d, %ecx
movl %ecx, 0x4(%r14)
shrl %cl, %eax
movl 0x24(%r15), %ecx
leaq 0x9b1c2(%rip), %rdx # 0xe1020
andl (%rdx,%rcx,4), %eax
movl %eax, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x45e76
movl $0x1, 0x28(%r14)
jmp 0x45ea7
movq %r12, %rdi
movl $0x20, %esi
callq 0x292a0
cmpq %rbx, %r13
je 0x45ea7
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45359
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| uf_prespace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r15, rdi
mov ecx, [rsi+4]
mov r13d, [rdi+24h]
cmp ecx, r13d
jnb short loc_45E47
sub r13d, ecx
lea rax, mask
mov [rbp+var_30], rbx
mov ebx, [rax+rcx*4]
and ebx, [r14]
mov ecx, r13d
shl ebx, cl
mov rdi, r14
call fill_buffer
mov eax, 20h ; ' '
sub eax, r13d
mov [r14+4], eax
mov eax, [r14]
neg r13d
mov ecx, r13d
shr eax, cl
add eax, ebx
mov rbx, [rbp+var_30]
jmp short loc_45E61
loc_45E47:
mov eax, [r14]
sub ecx, r13d
mov [r14+4], ecx
shr eax, cl
mov ecx, [r15+24h]
lea rdx, mask
and eax, [rdx+rcx*4]
loc_45E61:
mov edx, eax
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_45E76
mov dword ptr [r14+28h], 1
jmp short loc_45EA7
loc_45E76:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_45EA7
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes
loc_45EA7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long uf_prespace(long long a1, unsigned int *a2, long long a3, _BYTE *a4)
{
long long v6; // rcx
unsigned int v7; // r13d
int v8; // r13d
int v9; // ebx
long long result; // rax
unsigned int v11; // eax
unsigned int v12; // ecx
_BYTE *v13; // r13
_BYTE *v14; // [rsp+0h] [rbp-30h]
v6 = a2[1];
v7 = *(_DWORD *)(a1 + 36);
if ( (unsigned int)v6 >= v7 )
{
v11 = *a2;
v12 = v6 - v7;
a2[1] = v12;
result = mask[*(unsigned int *)(a1 + 36)] & (v11 >> v12);
}
else
{
v8 = v7 - v6;
v14 = a4;
v9 = (*a2 & mask[v6]) << v8;
fill_buffer((long long)a2);
a2[1] = 32 - v8;
result = v9 + (*a2 >> -(char)v8);
a4 = v14;
}
v13 = (_BYTE *)(a3 + (unsigned int)result);
if ( v13 <= a4 )
{
result = memset(a3, 32LL, (unsigned int)result);
if ( v13 != a4 )
return (long long)decode_bytes(a1, (long long)a2, v13, a4);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_prespace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R15,RDI
MOV ECX,dword ptr [RSI + 0x4]
MOV R13D,dword ptr [RDI + 0x24]
CMP ECX,R13D
JNC 0x00145e47
SUB R13D,ECX
LEA RAX,[0x1e1020]
MOV qword ptr [RBP + -0x30],RBX
MOV EBX,dword ptr [RAX + RCX*0x4]
AND EBX,dword ptr [R14]
MOV ECX,R13D
SHL EBX,CL
MOV RDI,R14
CALL 0x0014519c
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD EAX,EBX
MOV RBX,qword ptr [RBP + -0x30]
JMP 0x00145e61
LAB_00145e47:
MOV EAX,dword ptr [R14]
SUB ECX,R13D
MOV dword ptr [R14 + 0x4],ECX
SHR EAX,CL
MOV ECX,dword ptr [R15 + 0x24]
LEA RDX,[0x1e1020]
AND EAX,dword ptr [RDX + RCX*0x4]
LAB_00145e61:
MOV EDX,EAX
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x00145e76
MOV dword ptr [R14 + 0x28],0x1
JMP 0x00145ea7
LAB_00145e76:
MOV RDI,R12
MOV ESI,0x20
CALL 0x001292a0
CMP R13,RBX
JZ 0x00145ea7
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00145359
LAB_00145ea7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
byte bVar6;
uVar5 = param_2[1];
uVar2 = *(uint *)(param_1 + 0x24);
if (uVar5 < uVar2) {
uVar3 = (&mask)[uVar5];
uVar4 = *param_2;
bVar6 = (byte)(uVar2 - uVar5);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar2 - uVar5);
uVar5 = (*param_2 >> (-bVar6 & 0x1f)) + ((uVar3 & uVar4) << (bVar6 & 0x1f));
}
else {
param_2[1] = uVar5 - uVar2;
uVar5 = *param_2 >> ((byte)(uVar5 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
uVar1 = (long)param_3 + (ulong)uVar5;
if (param_4 < uVar1) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)uVar5);
if (uVar1 != param_4) {
decode_bytes(param_1,param_2,uVar1,param_4);
return;
}
}
return;
}
|
|
4,001 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t&&, bool) | llama.cpp/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O3 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t&&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x6af22
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x6adb5
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x6afbc
movq %r14, %rdi
movl $0x1, %esi
callq 0x60b38
testb %bpl, %bpl
jne 0x6ad62
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x6af43
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x6aef6
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x6adbf
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x6aef6
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x6ae19
cmpl $0x2, %ecx
jne 0x6af48
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6112a
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x6aef2
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x6af12
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x60b38
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x60b38
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x558ba
movq %r15, %rdi
xorl %esi, %esi
callq 0x60b38
movq %r15, %rdi
callq 0x60bd8
movq (%rbx), %r14
jmp 0x6aef2
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x6af56
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x6ae8b
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x6aef6
cmpq $0x0, 0x70(%rbx)
je 0x6af77
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x60b38
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x60b38
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x558ba
movq %r15, %rdi
xorl %esi, %esi
callq 0x60b38
movq %r15, %rdi
callq 0x60bd8
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x6aefb
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x60b38
movq %r15, %rdi
callq 0x60bd8
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x676f1(%rip), %rdi # 0xd261a
leaq 0x66df4(%rip), %rdx # 0xd1d24
leaq 0x67bfe(%rip), %rcx # 0xd2b35
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x1dbf0
callq 0x1dfa0
leaq 0x67bfa(%rip), %rcx # 0xd2b49
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x6af62
leaq 0x67c2a(%rip), %rcx # 0xd2b87
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x676b1(%rip), %rdi # 0xd261a
leaq 0x66db4(%rip), %rdx # 0xd1d24
xorl %eax, %eax
callq 0x1dbf0
leaq 0x6769c(%rip), %rdi # 0xd261a
leaq 0x66d9f(%rip), %rdx # 0xd1d24
leaq 0x67c13(%rip), %rcx # 0xd2b9f
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x1dbf0
jmp 0x6af9a
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x60b38
movq %r14, %rdi
callq 0x60bd8
movq %rbx, %rdi
callq 0x1d8e0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_6AF22
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_6ADB5
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<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> &,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>::number_unsigned_t)
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)
test bpl, bpl
jnz short loc_6AD62
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_6AF43
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_6AEF6
loc_6AD62:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_6ADBF
mov rax, [rax-8]
test rax, rax
jz loc_6AEF6
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_6AE19
cmp ecx, 2
jnz loc_6AF48
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_6AEF2
loc_6ADB5:
xor ebx, ebx
xor r14d, r14d
jmp loc_6AF12
loc_6ADBF:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
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, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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 rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_6AEF2
loc_6AE19:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_6AF56
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_6AE8B
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_6AE8B:
test rdx, rdx
jz short loc_6AEF6
cmp qword ptr [rbx+70h], 0
jz loc_6AF77
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
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, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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 rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_6AEF2:
mov bl, 1
jmp short loc_6AEFB
loc_6AEF6:
xor ebx, ebx
xor r14d, r14d
loc_6AEFB:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_6AF12:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6AF22:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_6AF43:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_6AF48:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_6AF62
loc_6AF56:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_6AF62:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_6AF77:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_6AF9A:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rbx
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v25,
*a2);
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 *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)a1,
(char *)v27);
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 *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
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 *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)(a1 + 112),
(char *)&v26);
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 *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
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 *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0016af22
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0016adb5
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0016afbc
MOV RDI,R14
MOV ESI,0x1
CALL 0x00160b38
TEST BPL,BPL
JNZ 0x0016ad62
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0016af43
LEA RDI,[RBX + 0x80]
LAB_0016ad45:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0016aef6
LAB_0016ad62:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0016adbf
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0016aef6
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0016ae19
CMP ECX,0x2
JNZ 0x0016af48
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0016112a
LAB_0016ad9c:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0016aef2
LAB_0016adb5:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0016af12
LAB_0016adbf:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00160b38
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00160b38
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x001558ba
MOV RDI,R15
XOR ESI,ESI
CALL 0x00160b38
MOV RDI,R15
CALL 0x00160bd8
MOV R14,qword ptr [RBX]
JMP 0x0016aef2
LAB_0016ae19:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0016af56
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0016ae8b
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0016ae8b:
TEST RDX,RDX
JZ 0x0016aef6
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0016af77
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00160b38
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00160b38
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x001558ba
MOV RDI,R15
XOR ESI,ESI
CALL 0x00160b38
MOV RDI,R15
CALL 0x00160bd8
MOV R14,qword ptr [RBX + 0x70]
LAB_0016aef2:
MOV BL,0x1
JMP 0x0016aefb
LAB_0016aef6:
XOR EBX,EBX
XOR R14D,R14D
LAB_0016aefb:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00160b38
MOV RDI,R15
CALL 0x00160bd8
LAB_0016af12:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016af22:
LEA RDI,[0x1d261a]
LEA RDX,[0x1d1d24]
LEA RCX,[0x1d2b35]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x0011dbf0
LAB_0016af43:
CALL 0x0011dfa0
LAB_0016af48:
LEA RCX,[0x1d2b49]
MOV ESI,0x1c4b
JMP 0x0016af62
LAB_0016af56:
LEA RCX,[0x1d2b87]
MOV ESI,0x1c57
LAB_0016af62:
LEA RDI,[0x1d261a]
LEA RDX,[0x1d1d24]
XOR EAX,EAX
CALL 0x0011dbf0
LAB_0016af77:
LEA RDI,[0x1d261a]
LEA RDX,[0x1d1d24]
LEA RCX,[0x1d2b9f]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x0011dbf0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0016af12;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0016ad62:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0016aef6;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0016af62;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0016aef6;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0016af77 to 0016af97 has its CatchHandler @ 0016af98 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60,
"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0016af62:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0016af43 to 0016af76 has its CatchHandler @ 0016af9a */
std::__throw_bad_function_call();
}
/* try { // try from 0016ad45 to 0016ad9b has its CatchHandler @ 0016af9a */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0016ad62;
LAB_0016aef6:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0016af12:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
|
4,002 | my_casefold_ujis | eloqsql/strings/ctype-ujis.c | static size_t
my_casefold_ujis(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar * const map,
size_t is_upper)
{
const char *srcend= src + srclen, *dst0= dst;
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
ch= (mblen == 2) ?
get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) :
get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]);
if (ch)
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= mblen;
if (code > 0xFFFF)
*dst++= (char) (uchar) ((code >> 16) & 0xFF);
if (code > 0xFF)
*dst++= (char) (uchar) ((code >> 8) & 0xFF);
*dst++= (char) (uchar) (code & 0xFF);
}
else
{
if (mblen == 3)
*dst++= *src++;
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
} | O0 | c | my_casefold_ujis:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x6bbeb
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x6bc60
movl %eax, %eax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x6bbbc
cmpq $0x2, -0x48(%rbp)
jne 0x6ba7f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %edx
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
xorl %esi, %esi
callq 0x6bcc0
movq %rax, -0x60(%rbp)
jmp 0x6baa1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %edx
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
movl $0x1, %esi
callq 0x6bcc0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x6bb4d
cmpq $0x0, 0x10(%rbp)
je 0x6bac6
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x6bad0
movq -0x50(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0xffff, -0x54(%rbp) # imm = 0xFFFF
jle 0x6bb09
movl -0x54(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
cmpl $0xff, -0x54(%rbp)
jle 0x6bb30
movl -0x54(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x54(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x6bbba
cmpq $0x3, -0x48(%rbp)
jne 0x6bb76
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x6bbe6
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x6ba28
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| my_casefold_ujis:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
loc_6BA28:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb loc_6BBEB
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
call my_ismbchar_2
mov eax, eax
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz loc_6BBBC
cmp [rbp+var_48], 2
jnz short loc_6BA7F
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
movzx edx, byte ptr [rax]
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
xor esi, esi
call get_case_info_for_ch_0
mov [rbp+var_60], rax
jmp short loc_6BAA1
loc_6BA7F:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
movzx edx, byte ptr [rax+1]
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+2]
mov esi, 1
call get_case_info_for_ch_0
mov [rbp+var_60], rax
loc_6BAA1:
mov rax, [rbp+var_60]
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz loc_6BB4D
cmp [rbp+arg_0], 0
jz short loc_6BAC6
mov rax, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_64], eax
jmp short loc_6BAD0
loc_6BAC6:
mov rax, [rbp+var_50]
mov eax, [rax+4]
mov [rbp+var_64], eax
loc_6BAD0:
mov eax, [rbp+var_64]
mov [rbp+var_54], eax
mov rax, [rbp+var_48]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
cmp [rbp+var_54], 0FFFFh
jle short loc_6BB09
mov eax, [rbp+var_54]
sar eax, 10h
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6BB09:
cmp [rbp+var_54], 0FFh
jle short loc_6BB30
mov eax, [rbp+var_54]
sar eax, 8
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6BB30:
mov eax, [rbp+var_54]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
jmp short loc_6BBBA
loc_6BB4D:
cmp [rbp+var_48], 3
jnz short loc_6BB76
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6BB76:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6BBBA:
jmp short loc_6BBE6
loc_6BBBC:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6BBE6:
jmp loc_6BA28
loc_6BBEB:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
sub rax, rcx
add rsp, 70h
pop rbp
retn
| _BYTE * my_casefold_ujis(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6,
long long a7)
{
unsigned int v7; // eax
unsigned __int8 *v8; // rax
unsigned __int8 *v9; // rax
unsigned __int8 *v10; // rax
unsigned __int8 *v11; // rax
unsigned __int8 v12; // cl
unsigned __int8 *v13; // rax
char *v14; // rax
char v15; // cl
_BYTE *v16; // rax
unsigned __int8 *v17; // rcx
unsigned __int8 *v18; // rax
int v20; // [rsp+Ch] [rbp-64h]
int *case_info_for_ch_0; // [rsp+10h] [rbp-60h]
long long v22; // [rsp+28h] [rbp-48h]
unsigned long long v24; // [rsp+38h] [rbp-38h]
unsigned __int8 *v26; // [rsp+50h] [rbp-20h]
unsigned __int8 *v27; // [rsp+60h] [rbp-10h]
v27 = a2;
v26 = a4;
v24 = (unsigned long long)&a2[a3];
while ( (unsigned long long)v27 < v24 )
{
v7 = my_ismbchar_2(a1, v27, v24);
v22 = v7;
if ( v7 )
{
if ( v7 == 2LL )
case_info_for_ch_0 = (int *)get_case_info_for_ch_0(a1, 0LL, *v27, v27[1]);
else
case_info_for_ch_0 = (int *)get_case_info_for_ch_0(a1, 1LL, v27[1], v27[2]);
if ( case_info_for_ch_0 )
{
if ( a7 )
v20 = *case_info_for_ch_0;
else
v20 = case_info_for_ch_0[1];
v27 += v22;
if ( v20 > 0xFFFF )
{
v8 = v26++;
*v8 = BYTE2(v20);
}
if ( v20 > 255 )
{
v9 = v26++;
*v9 = BYTE1(v20);
}
v10 = v26++;
*v10 = v20;
}
else
{
if ( v22 == 3 )
{
v11 = v27++;
v12 = *v11;
v13 = v26++;
*v13 = v12;
}
*v26 = *v27;
v14 = (char *)(v27 + 1);
v27 += 2;
v15 = *v14;
v16 = v26 + 1;
v26 += 2;
*v16 = v15;
}
}
else
{
v17 = v27++;
v18 = v26++;
*v18 = *(_BYTE *)(a6 + *v17);
}
}
return (_BYTE *)(v26 - a4);
}
| my_casefold_ujis:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
LAB_0016ba28:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0016bbeb
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0016bc60
MOV EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0016bbbc
CMP qword ptr [RBP + -0x48],0x2
JNZ 0x0016ba7f
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EDX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
XOR ESI,ESI
CALL 0x0016bcc0
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016baa1
LAB_0016ba7f:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EDX,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV ESI,0x1
CALL 0x0016bcc0
MOV qword ptr [RBP + -0x60],RAX
LAB_0016baa1:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0016bb4d
CMP qword ptr [RBP + 0x10],0x0
JZ 0x0016bac6
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x0016bad0
LAB_0016bac6:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x64],EAX
LAB_0016bad0:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
CMP dword ptr [RBP + -0x54],0xffff
JLE 0x0016bb09
MOV EAX,dword ptr [RBP + -0x54]
SAR EAX,0x10
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016bb09:
CMP dword ptr [RBP + -0x54],0xff
JLE 0x0016bb30
MOV EAX,dword ptr [RBP + -0x54]
SAR EAX,0x8
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016bb30:
MOV EAX,dword ptr [RBP + -0x54]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
JMP 0x0016bbba
LAB_0016bb4d:
CMP qword ptr [RBP + -0x48],0x3
JNZ 0x0016bb76
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016bb76:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016bbba:
JMP 0x0016bbe6
LAB_0016bbbc:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016bbe6:
JMP 0x0016ba28
LAB_0016bbeb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
ADD RSP,0x70
POP RBP
RET
|
long my_casefold_ujis(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5
,long param_6,long param_7)
{
uint uVar1;
ulong uVar2;
byte *pbVar3;
byte *pbVar4;
int local_6c;
int *local_68;
byte *local_28;
byte *local_18;
local_28 = param_4;
local_18 = param_2;
while (local_18 < param_2 + param_3) {
uVar1 = my_ismbchar(param_1,local_18,param_2 + param_3);
uVar2 = (ulong)uVar1;
if (uVar2 == 0) {
*local_28 = *(byte *)(param_6 + (ulong)*local_18);
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
else {
if (uVar2 == 2) {
local_68 = (int *)get_case_info_for_ch(param_1,0,*local_18,local_18[1]);
}
else {
local_68 = (int *)get_case_info_for_ch(param_1,1,local_18[1],local_18[2]);
}
if (local_68 == (int *)0x0) {
if (uVar2 == 3) {
*local_28 = *local_18;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
pbVar3 = local_18 + 1;
pbVar4 = local_28 + 1;
*local_28 = *local_18;
local_18 = local_18 + 2;
local_28 = local_28 + 2;
*pbVar4 = *pbVar3;
}
else {
if (param_7 == 0) {
local_6c = local_68[1];
}
else {
local_6c = *local_68;
}
local_18 = local_18 + uVar2;
if (0xffff < local_6c) {
*local_28 = (byte)((uint)local_6c >> 0x10);
local_28 = local_28 + 1;
}
if (0xff < local_6c) {
*local_28 = (byte)((uint)local_6c >> 8);
local_28 = local_28 + 1;
}
*local_28 = (byte)local_6c;
local_28 = local_28 + 1;
}
}
}
return (long)local_28 - (long)param_4;
}
|
|
4,003 | uf_space_prespace_selected | eloqsql/storage/myisam/mi_packrec.c | static void uf_space_prespace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill((uchar*) to,(end-to),' ');
else
{
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill((uchar*) to,spaces,' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
else
decode_bytes(rec,bit_buff,to,end);
}
} | O0 | c | uf_space_prespace_selected:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xc0bb7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xc0bdb
jmp 0xc0bf9
movq -0x10(%rbp), %rdi
callq 0xbfa70
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xc0bf9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x292a0
jmp 0xc0d22
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xc0c2b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xc0c53
jmp 0xc0d0b
movq -0x10(%rbp), %rdi
callq 0xbfa70
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xc0d0b
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0xc0c96
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, %edx
leaq 0x2009c2(%rip), %rcx # 0x2c1650
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0xc0ca9
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0xbe220
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0xc0ccb
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0xc0d22
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x292a0
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0xc0d09
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
callq 0xc0180
jmp 0xc0d20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xc0180
jmp 0xc0d22
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| uf_space_prespace_selected_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_C0BB7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_C0BDB
jmp short loc_C0BF9
loc_C0BB7:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_C0BF9
loc_C0BDB:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
mov esi, 20h ; ' '
call _memset
jmp loc_C0D22
loc_C0BF9:
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_C0C2B
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_C0C53
jmp loc_C0D0B
loc_C0C2B:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz loc_C0D0B
loc_C0C53:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+1Ch]
jb short loc_C0C96
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+1Ch]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+1Ch]
mov edx, ecx
lea rcx, mask_0
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_C0CA9
loc_C0C96:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+1Ch]
call fill_and_get_bits_0
mov [rbp+var_28], eax
loc_C0CA9:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_C0CCB
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_C0D22
loc_C0CCB:
mov rdi, [rbp+var_18]
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_C0D09
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_24]
add rdx, rax
mov rcx, [rbp+var_20]
call decode_bytes_0
loc_C0D09:
jmp short loc_C0D20
loc_C0D0B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes_0
loc_C0D20:
jmp short $+2
loc_C0D22:
add rsp, 30h
pop rbp
retn
| long long uf_space_prespace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
int v10; // ecx
unsigned int bits_0; // [rsp+8h] [rbp-28h]
if ( !a2[1] )
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
goto LABEL_6;
return memset(a3, 32LL, a4 - a3);
}
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) != 0 )
return memset(a3, 32LL, a4 - a3);
LABEL_6:
if ( a2[1] )
{
v7 = *a2;
v8 = a2[1] - 1;
a2[1] = v8;
if ( ((1 << v8) & v7) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) )
{
bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28));
}
else
{
v9 = *a2;
v10 = a2[1] - *(_DWORD *)(a1 + 28);
a2[1] = v10;
bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10);
}
if ( &a3[bits_0] <= a4 )
{
memset(a3, 32LL, bits_0);
result = (long long)&a3[bits_0];
if ( (_BYTE *)result != a4 )
return decode_bytes_0(a1, (long long)a2, &a3[bits_0], a4);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
| uf_space_prespace_selected:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001c0bb7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001c0bdb
JMP 0x001c0bf9
LAB_001c0bb7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bfa70
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001c0bf9
LAB_001c0bdb:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV ESI,0x20
CALL 0x001292a0
JMP 0x001c0d22
LAB_001c0bf9:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001c0c2b
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001c0c53
JMP 0x001c0d0b
LAB_001c0c2b:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bfa70
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001c0d0b
LAB_001c0c53:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x1c]
JC 0x001c0c96
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x1c]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x1c]
MOV EDX,ECX
LEA RCX,[0x3c1650]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001c0ca9
LAB_001c0c96:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x1c]
CALL 0x001be220
MOV dword ptr [RBP + -0x28],EAX
LAB_001c0ca9:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001c0ccb
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x001c0d22
LAB_001c0ccb:
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x001292a0
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001c0d09
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001c0180
LAB_001c0d09:
JMP 0x001c0d20
LAB_001c0d0b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001c0180
LAB_001c0d20:
JMP 0x001c0d22
LAB_001c0d22:
ADD RSP,0x30
POP RBP
RET
|
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
decode_bytes(param_1,param_2,param_3,param_4);
}
else {
if (param_2[1] < *(uint *)(param_1 + 0x1c)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x1c);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4);
}
if (param_4 < (long)param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)local_30);
if ((long)param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4);
}
}
}
}
else {
memset(param_3,0x20,param_4 - (long)param_3);
}
return;
}
|
|
4,004 | inline_mysql_rwlock_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_rwlock_init(
#ifdef HAVE_PSI_RWLOCK_INTERFACE
PSI_rwlock_key key,
#endif
mysql_rwlock_t *that)
{
#ifdef HAVE_PSI_RWLOCK_INTERFACE
that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_rwlock);
#else
that->m_psi= NULL;
#endif
/*
pthread_rwlockattr_t is not used in MySQL.
*/
return my_rwlock_init(&that->m_rwlock, NULL);
} | O0 | c | inline_mysql_rwlock_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x237a02(%rip), %rax # 0x2c2028
movq (%rax), %rax
movq 0x50(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rdi
callq 0xfd790
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_rwlock_init_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+50h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+90h], rcx
mov rdi, [rbp+var_10]
call my_rw_init
add rsp, 10h
pop rbp
retn
| long long inline_mysql_rwlock_init_0(unsigned int a1, long long a2)
{
*(_QWORD *)(a2 + 144) = ((long long ( *)(_QWORD, long long))PSI_server[10])(a1, a2);
return my_rw_init(a2);
}
| inline_mysql_rwlock_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x3c2028]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x50]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001fd790
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_rwlock_init(int4 param_1,long param_2)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x50))(param_1,param_2);
*(int8 *)(param_2 + 0x90) = uVar1;
my_rw_init(param_2);
return;
}
|
|
4,005 | ma_crypt_pre_read_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_pre_read_hook(PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0));
if (crypt_buf == NULL)
{
args->crypt_buf= NULL; /* for post-hook */
return 1;
}
/* swap pointers to read into crypt_buf */
args->crypt_buf= args->page;
args->page= crypt_buf;
return 0;
} | O3 | c | ma_crypt_pre_read_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movl 0x7bc(%rax), %esi
xorl %r14d, %r14d
xorl %edi, %edi
xorl %edx, %edx
callq 0x9fd51
testq %rax, %rax
je 0x6720a
movq (%rbx), %r14
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x6720c
movb $0x1, %al
movq %r14, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| ma_crypt_pre_read_hook:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+10h]
mov esi, [rax+7BCh]
xor r14d, r14d
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz short loc_6720A
mov r14, [rbx]
mov [rbx], rax
xor eax, eax
jmp short loc_6720C
loc_6720A:
mov al, 1
loc_6720C:
mov [rbx+18h], r14
pop rbx
pop r14
pop rbp
retn
| long long ma_crypt_pre_read_hook(long long *a1)
{
long long v1; // r14
long long v2; // rax
long long result; // rax
v1 = 0LL;
v2 = my_malloc(0LL, *(unsigned int *)(a1[2] + 1980), 0LL);
if ( v2 )
{
v1 = *a1;
*a1 = v2;
result = 0LL;
}
else
{
result = 1LL;
}
a1[3] = v1;
return result;
}
| ma_crypt_pre_read_hook:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV ESI,dword ptr [RAX + 0x7bc]
XOR R14D,R14D
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x0016720a
MOV R14,qword ptr [RBX]
MOV qword ptr [RBX],RAX
XOR EAX,EAX
JMP 0x0016720c
LAB_0016720a:
MOV AL,0x1
LAB_0016720c:
MOV qword ptr [RBX + 0x18],R14
POP RBX
POP R14
POP RBP
RET
|
bool ma_crypt_pre_read_hook(long *param_1)
{
long lVar1;
long lVar2;
lVar2 = 0;
lVar1 = my_malloc(0,*(int4 *)(param_1[2] + 0x7bc),0);
if (lVar1 != 0) {
lVar2 = *param_1;
*param_1 = lVar1;
}
param_1[3] = lVar2;
return lVar1 == 0;
}
|
|
4,006 | aimrt::logger::LoggerRef::Log(unsigned int, unsigned int, char const*, char const*, char const*, unsigned long) const | aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/logger/logger.h | void Log(
uint32_t lvl,
uint32_t line,
const char* file_name,
const char* function_name,
const char* log_data,
size_t log_data_size) const {
AIMRT_ASSERT(base_ptr_, "Reference is null.");
base_ptr_->log(
base_ptr_->impl,
static_cast<aimrt_log_level_t>(lvl),
line, file_name, function_name,
log_data, log_data_size);
} | O3 | c | aimrt::logger::LoggerRef::Log(unsigned int, unsigned int, char const*, char const*, char const*, unsigned long) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x23c73
movq 0x8(%rax), %r11
movq 0x10(%rax), %rdi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *%r11
movl $0x28, %edi
callq 0x1e7e0
movq %rax, %rbx
leaq 0x5fb82(%rip), %rsi # 0x83809
movq %rsp, %rdi
leaq 0x20(%rsp), %r8
movl $0x12, %edx
xorl %ecx, %ecx
callq 0x25059
leaq 0x8a7ae(%rip), %rax # 0xae450
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rcx
cmpq %r15, %rcx
jne 0x23cc7
movups (%r15), %xmm0
movups %xmm0, (%rax)
jmp 0x23cd4
movq %rcx, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x8a68a(%rip), %rsi # 0xae380
leaq 0x37(%rip), %rdx # 0x23d34
movq %rbx, %rdi
callq 0x1fec0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x23d2b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1f250
jmp 0x23d2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1ebc0
movq %r14, %rdi
callq 0x1ffd0
nop
| _ZNK5aimrt6logger9LoggerRef3LogEjjPKcS3_S3_m:
push r15
push r14
push rbx
sub rsp, 30h
mov rax, [rdi]
test rax, rax
jz short loc_23C73
mov r11, [rax+8]
mov rdi, [rax+10h]
add rsp, 30h
pop rbx
pop r14
pop r15
jmp r11
loc_23C73:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aReferenceIsNul; "Reference is null."
mov rdi, rsp; int
lea r8, [rsp+48h+var_28]; int
mov edx, 12h; int
xor ecx, ecx; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
lea rax, off_AE450
mov [rbx], rax
mov rax, rbx
add rax, 18h
mov [rbx+8], rax
lea r15, [rsp+48h+var_38]
mov rcx, [r15-10h]
cmp rcx, r15
jnz short loc_23CC7
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rax], xmm0
jmp short loc_23CD4
loc_23CC7:
mov [rbx+8], rcx
mov rax, [rsp+48h+var_38]
mov [rbx+18h], rax
loc_23CD4:
mov rax, [rsp+48h+var_40]
mov [rbx+10h], rax
mov [rsp+48h+var_48], r15
mov [rsp+48h+var_40], 0
mov byte ptr [rsp+48h+var_38], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r15
jz short loc_23D2B
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_23D2B
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
loc_23D2B:
mov rdi, r14
call __Unwind_Resume
| long long aimrt::logger::LoggerRef::Log(
aimrt::logger::LoggerRef *this,
long long a2,
long long a3,
const char *a4,
const char *a5,
const char *a6,
unsigned long long a7)
{
char *exception; // rbx
int v9; // r9d
void *v10; // [rsp+0h] [rbp-48h] BYREF
long long v11; // [rsp+8h] [rbp-40h]
__int128 v12; // [rsp+10h] [rbp-38h] BYREF
int v13; // [rsp+20h] [rbp-28h] BYREF
if ( !*(_QWORD *)this )
{
exception = (char *)__cxa_allocate_exception(0x28uLL);
fmt::v10::vformat[abi:cxx11]((int)&v10, (int)"Reference is null.", 18, 0, (int)&v13, v9, v10, v11, v12);
*(_QWORD *)exception = off_AE450;
*((_QWORD *)exception + 1) = exception + 24;
if ( v10 == &v12 )
{
*(_OWORD *)(exception + 24) = v12;
}
else
{
*((_QWORD *)exception + 1) = v10;
*((_QWORD *)exception + 3) = v12;
}
*((_QWORD *)exception + 2) = v11;
v10 = &v12;
v11 = 0LL;
LOBYTE(v12) = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
aimrt::common::util::AimRTException::~AimRTException);
}
return (*(long long ( **)(_QWORD, long long, long long, const char *, const char *, const char *))(*(_QWORD *)this + 8LL))(
*(_QWORD *)(*(_QWORD *)this + 16LL),
a2,
a3,
a4,
a5,
a6);
}
| Log:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00123c73
MOV R11,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
ADD RSP,0x30
POP RBX
POP R14
POP R15
JMP R11
LAB_00123c73:
MOV EDI,0x28
CALL 0x0011e7e0
MOV RBX,RAX
LAB_00123c80:
LEA RSI,[0x183809]
MOV RDI,RSP
LEA R8,[RSP + 0x20]
MOV EDX,0x12
XOR ECX,ECX
CALL 0x00125059
LEA RAX,[0x1ae450]
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RAX,0x18
MOV qword ptr [RBX + 0x8],RAX
LEA R15,[RSP + 0x10]
MOV RCX,qword ptr [R15 + -0x10]
CMP RCX,R15
JNZ 0x00123cc7
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x00123cd4
LAB_00123cc7:
MOV qword ptr [RBX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LAB_00123cd4:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LAB_00123cef:
LEA RSI,[0x1ae380]
LEA RDX,[0x123d34]
MOV RDI,RBX
CALL 0x0011fec0
|
/* aimrt::logger::LoggerRef::Log(unsigned int, unsigned int, char const*, char const*, char const*,
unsigned long) const */
void aimrt::logger::LoggerRef::Log
(uint param_1,uint param_2,char *param_3,char *param_4,char *param_5,ulong param_6)
{
long lVar1;
int8 *puVar2;
int4 in_register_00000034;
int4 in_register_0000003c;
uint *local_48;
int8 local_40;
uint local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int1 local_28 [16];
lVar1 = *(long *)CONCAT44(in_register_0000003c,param_1);
if (lVar1 != 0) {
/* WARNING: Could not recover jumptable at 0x00123c70. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(lVar1 + 8))(*(int8 *)(lVar1 + 0x10));
return;
}
puVar2 = (int8 *)__cxa_allocate_exception(0x28,CONCAT44(in_register_00000034,param_2));
/* try { // try from 00123c80 to 00123c9a has its CatchHandler @ 00123d20 */
fmt::v10::vformat_abi_cxx11_(&local_48,"Reference is null.",0x12,0,local_28);
*puVar2 = &PTR__AimRTException_001ae450;
puVar2[1] = puVar2 + 3;
if (local_48 == &local_38) {
*(uint *)(puVar2 + 3) = local_38;
*(int4 *)((long)puVar2 + 0x1c) = uStack_34;
*(int4 *)(puVar2 + 4) = uStack_30;
*(int4 *)((long)puVar2 + 0x24) = uStack_2c;
}
else {
puVar2[1] = local_48;
puVar2[3] = CONCAT44(uStack_34,local_38);
}
puVar2[2] = local_40;
local_40 = 0;
local_38 = local_38 & 0xffffff00;
local_48 = &local_38;
/* try { // try from 00123cef to 00123d04 has its CatchHandler @ 00123d05 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar2,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
|
|
4,007 | svc_service_start | qoraal-tictactoe/build_O0/_deps/qoraal-src/src/svc/svc_services.c | int32_t
svc_service_start (SCV_SERVICE_HANDLE handle, uintptr_t arg, SVC_SERVICE_COMPLETE_CB cb, uintptr_t cb_parm)
{
int res = E_UNEXP ;
int32_t status ;
SVC_SERVICE_T* pservice ;
if (!_svc_service_list) return E_UNEXP ;
if (handle >= _cfg_service_cnt) return E_NOTFOUND ;
os_mutex_lock (&_svc_service_mutex) ;
pservice = &_svc_service_list[handle] ;
status = _service_status (pservice) ;
if (
(status != SVC_SERVICE_STATUS_RESIDENT) &&
(status != SVC_SERVICE_STATUS_STARTING) &&
(status != SVC_SERVICE_STATUS_STOPPING) &&
(status != SVC_SERVICE_STATUS_DISABLED)
) {
pservice->parm = arg ;
res = _service_start (pservice, cb, cb_parm) ;
}
os_mutex_unlock (&_svc_service_mutex) ;
return res ;
} | O0 | c | svc_service_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0xfffff6fa, -0x24(%rbp) # imm = 0xFFFFF6FA
cmpq $0x0, 0x2f192(%rip) # 0x4edc8
jne 0x1fc44
movl $0xfffff6fa, -0x4(%rbp) # imm = 0xFFFFF6FA
jmp 0x1fccf
movl -0x8(%rbp), %eax
cmpl 0x2f183(%rip), %eax # 0x4edd0
jb 0x1fc58
movl $0xfffff6fc, -0x4(%rbp) # imm = 0xFFFFF6FC
jmp 0x1fccf
leaq 0x2ced9(%rip), %rdi # 0x4cb38
callq 0x1cd80
movq 0x2f15d(%rip), %rax # 0x4edc8
movl -0x8(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1fce0
movl %eax, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
je 0x1fcbd
cmpl $0x2, -0x28(%rbp)
je 0x1fcbd
cmpl $0x1, -0x28(%rbp)
je 0x1fcbd
cmpl $-0x1, -0x28(%rbp)
je 0x1fcbd
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f950
movl %eax, -0x24(%rbp)
leaq 0x2ce74(%rip), %rdi # 0x4cb38
callq 0x1cdd0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| svc_service_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0FFFFF6FAh
cmp cs:_svc_service_list, 0
jnz short loc_1FC44
mov [rbp+var_4], 0FFFFF6FAh
jmp loc_1FCCF
loc_1FC44:
mov eax, [rbp+var_8]
cmp eax, cs:_cfg_service_cnt
jb short loc_1FC58
mov [rbp+var_4], 0FFFFF6FCh
jmp short loc_1FCCF
loc_1FC58:
lea rdi, _svc_service_mutex
call os_mutex_lock
mov rax, cs:_svc_service_list
mov ecx, [rbp+var_8]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
call _service_status
mov [rbp+var_28], eax
cmp [rbp+var_28], 4
jz short loc_1FCBD
cmp [rbp+var_28], 2
jz short loc_1FCBD
cmp [rbp+var_28], 1
jz short loc_1FCBD
cmp [rbp+var_28], 0FFFFFFFFh
jz short loc_1FCBD
mov rcx, [rbp+var_10]
mov rax, [rbp+var_30]
mov [rax+48h], rcx
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _service_start
mov [rbp+var_24], eax
loc_1FCBD:
lea rdi, _svc_service_mutex
call os_mutex_unlock
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_1FCCF:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long svc_service_start(unsigned int a1, long long a2, void ( *a3)(_QWORD, long long), long long a4)
{
long long v5; // [rsp+0h] [rbp-30h]
int v6; // [rsp+8h] [rbp-28h]
unsigned int v7; // [rsp+Ch] [rbp-24h]
v7 = -2310;
if ( svc_service_list )
{
if ( a1 < cfg_service_cnt )
{
os_mutex_lock(&svc_service_mutex);
v5 = 112LL * a1 + svc_service_list;
v6 = service_status(v5);
if ( v6 != 4 && v6 != 2 && v6 != 1 && v6 != -1 )
{
*(_QWORD *)(v5 + 72) = a2;
v7 = service_start(v5, a3, a4);
}
os_mutex_unlock(&svc_service_mutex);
return v7;
}
else
{
return (unsigned int)-2308;
}
}
else
{
return (unsigned int)-2310;
}
}
| svc_service_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0xfffff6fa
CMP qword ptr [0x0014edc8],0x0
JNZ 0x0011fc44
MOV dword ptr [RBP + -0x4],0xfffff6fa
JMP 0x0011fccf
LAB_0011fc44:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x0014edd0]
JC 0x0011fc58
MOV dword ptr [RBP + -0x4],0xfffff6fc
JMP 0x0011fccf
LAB_0011fc58:
LEA RDI,[0x14cb38]
CALL 0x0011cd80
MOV RAX,qword ptr [0x0014edc8]
MOV ECX,dword ptr [RBP + -0x8]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0011fce0
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x4
JZ 0x0011fcbd
CMP dword ptr [RBP + -0x28],0x2
JZ 0x0011fcbd
CMP dword ptr [RBP + -0x28],0x1
JZ 0x0011fcbd
CMP dword ptr [RBP + -0x28],-0x1
JZ 0x0011fcbd
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0011f950
MOV dword ptr [RBP + -0x24],EAX
LAB_0011fcbd:
LEA RDI,[0x14cb38]
CALL 0x0011cdd0
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0011fccf:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 svc_service_start(uint param_1,int8 param_2,int8 param_3,int8 param_4)
{
int iVar1;
long lVar2;
int4 local_2c;
int4 local_c;
local_2c = 0xfffff6fa;
if (_svc_service_list == 0) {
local_c = 0xfffff6fa;
}
else if (param_1 < _cfg_service_cnt) {
os_mutex_lock(&_svc_service_mutex);
lVar2 = _svc_service_list + (ulong)param_1 * 0x70;
iVar1 = _service_status(lVar2);
if ((((iVar1 != 4) && (iVar1 != 2)) && (iVar1 != 1)) && (iVar1 != -1)) {
*(int8 *)(lVar2 + 0x48) = param_2;
local_2c = _service_start(lVar2,param_3,param_4);
}
os_mutex_unlock(&_svc_service_mutex);
local_c = local_2c;
}
else {
local_c = 0xfffff6fc;
}
return local_c;
}
|
|
4,008 | wt_resource_destroy | eloqsql/mysys/waiting_threads.c | static void wt_resource_destroy(uchar *arg)
{
WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
DBUG_ENTER("wt_resource_destroy");
DBUG_ASSERT(rc->owners.elements == 0);
rc_rwlock_destroy(rc);
mysql_cond_destroy(&rc->cond);
delete_dynamic(&rc->owners);
DBUG_VOID_RETURN;
} | O3 | c | wt_resource_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x3ac3e(%rip), %rax # 0xe1fbc
movslq (%rax), %rax
leaq (%rdi,%rax), %rbx
leaq (%rdi,%rax), %r14
addq $0x18, %r14
movq %r14, %rdi
callq 0xa4c7c
movq 0xc0(%r14), %rdi
testq %rdi, %rdi
jne 0xa73c0
leaq 0xa8(%rbx), %rdi
callq 0x29270
addq $0xe0, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x9256c
leaq 0x2dec49(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0xd8(%rbx)
jmp 0xa73a1
| wt_resource_destroy:
push rbp
mov rbp, rsp
push r14
push rbx
lea rax, LF_HASH_OVERHEAD
movsxd rax, dword ptr [rax]
lea rbx, [rdi+rax]
lea r14, [rdi+rax]
add r14, 18h
mov rdi, r14
call my_rw_destroy
mov rdi, [r14+0C0h]
test rdi, rdi
jnz short loc_A73C0
loc_A73A1:
lea rdi, [rbx+0A8h]
call _pthread_cond_destroy
add rbx, 0E0h
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp delete_dynamic
loc_A73C0:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+0D8h], 0
jmp short loc_A73A1
| long long wt_resource_destroy(long long a1)
{
long long v1; // rbx
v1 = a1 + LF_HASH_OVERHEAD;
my_rw_destroy(v1 + 24);
if ( *(_QWORD *)(v1 + 216) )
{
PSI_server[13]();
*(_QWORD *)(v1 + 216) = 0LL;
}
pthread_cond_destroy(v1 + 168);
return delete_dynamic((long long *)(v1 + 224));
}
| wt_resource_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RAX,[0x1e1fbc]
MOVSXD RAX,dword ptr [RAX]
LEA RBX,[RDI + RAX*0x1]
LEA R14,[RDI + RAX*0x1]
ADD R14,0x18
MOV RDI,R14
CALL 0x001a4c7c
MOV RDI,qword ptr [R14 + 0xc0]
TEST RDI,RDI
JNZ 0x001a73c0
LAB_001a73a1:
LEA RDI,[RBX + 0xa8]
CALL 0x00129270
ADD RBX,0xe0
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0019256c
LAB_001a73c0:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0xd8],0x0
JMP 0x001a73a1
|
void wt_resource_destroy(long param_1)
{
long lVar1;
lVar1 = param_1 + LF_HASH_OVERHEAD;
param_1 = param_1 + LF_HASH_OVERHEAD;
my_rw_destroy(param_1 + 0x18);
if (*(long *)(param_1 + 0xd8) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)(lVar1 + 0xd8) = 0;
}
pthread_cond_destroy((pthread_cond_t *)(lVar1 + 0xa8));
delete_dynamic(lVar1 + 0xe0);
return;
}
|
|
4,009 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> cli::integer::parse_string<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, long&) | msxemulator/build_O3/_deps/picotool-src/cli.h | static std::string parse_string(std::string value, T& out) {
size_t pos = 0;
long lvalue = std::numeric_limits<long>::max();
int64_t base = 10;
if (value.find("0x") == 0) {
value = value.substr(2);
base = 16;
} else if (value.find("0b") == 0) {
value = value.substr(2);
base = 2;
}
try {
if (std::is_signed<T>()) {
lvalue = std::stoll(value, &pos, base);
} else {
lvalue = std::stoull(value, &pos, base);
}
if (pos != value.length()) {
return "Garbage after integer value: " + value.substr(pos);
}
} catch (std::invalid_argument&) {
return value + " is not a valid integer";
} catch (std::out_of_range&) {
return value + " is out of range";
}
if (lvalue != (int64_t)lvalue) {
return value + " is too big";
}
out = (int64_t)lvalue;
return "";
} | O3 | c | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> cli::integer::parse_string<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, long&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x30(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x377a4(%rip), %rsi # 0xa8178
movl $0x2, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0xf7c0
testq %rax, %rax
je 0x70a55
leaq 0x35de9(%rip), %rsi # 0xa67d8
movl $0x2, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0xf7c0
movl $0xa, %ebp
testq %rax, %rax
jne 0x70a9c
leaq 0x10(%rsp), %r12
movl $0x2, %edx
movq %r12, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0xf4a0
movq %r14, %rdi
movq %r12, %rsi
callq 0xf580
movq (%r12), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x70a4e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xf470
movl $0x2, %ebp
jmp 0x70a9c
leaq 0x10(%rsp), %r12
movl $0x2, %edx
movq %r12, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0xf4a0
movq %r14, %rdi
movq %r12, %rsi
callq 0xf580
movq (%r12), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x70a97
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xf470
movl $0x10, %ebp
movq %rbx, 0x8(%rsp)
movq (%r14), %r12
callq 0xf060
movq %rax, %r13
movl (%rax), %ebx
movl $0x0, (%rax)
leaq 0x10(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0xf5c0
movq (%r15), %rdx
subq %r12, %rdx
je 0x70bb7
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x70bc3
testl %ecx, %ecx
jne 0x70ae7
movl %ebx, (%r13)
cmpq 0x8(%r14), %rdx
jne 0x70b17
movq 0x30(%rsp), %rcx
movl %eax, (%rcx)
movq 0x8(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x41864(%rip), %rdx # 0xb236b
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5c00c
jmp 0x70ba5
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
movq 0x8(%rsp), %rbx
callq 0xf4a0
leaq 0x35ca4(%rip), %rcx # 0xa67db
leaq 0x10(%rsp), %rdi
movl $0x1d, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0xf4e0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x70b6d
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x70b73
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70ba5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3765a(%rip), %rdi # 0xa8218
callq 0xf2d0
leaq 0x3764e(%rip), %rdi # 0xa8218
callq 0xf650
movq %rdx, %r12
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70c0b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x70c0b
movq %rdx, %r12
movq %rax, %r15
jmp 0x70c0b
movq %rdx, %r12
movq %rax, %r15
cmpl $0x0, (%r13)
jne 0x70c0b
movl %ebx, (%r13)
cmpl $0x2, %r12d
jne 0x70c2f
movq %r15, %rdi
callq 0xf210
leaq 0x35bea(%rip), %rdx # 0xa680a
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x387ff
jmp 0x70c51
cmpl $0x1, %r12d
jne 0x70c72
movq %r15, %rdi
callq 0xf210
leaq 0x35bb5(%rip), %rdx # 0xa67f9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x387ff
callq 0xf740
movq 0x8(%rsp), %rbx
jmp 0x70ba5
movq %rax, %r15
callq 0xf740
jmp 0x70c72
movq %rax, %r15
callq 0xf740
movq %r15, %rdi
callq 0xf7d0
movq %rax, %rdi
callq 0x1d2b2
| _ZN3cli7integer12parse_stringIjEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_RT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_38], rdx
mov r14, rsi
mov rbx, rdi
lea rsi, aIncompleteUtf8+24h; "0x"
mov ecx, 2
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
test rax, rax
jz short loc_70A55
lea rsi, a0b; "0b"
mov ecx, 2
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov ebp, 0Ah
test rax, rax
jnz loc_70A9C
lea r12, [rsp+68h+var_58]
mov edx, 2
mov rdi, r12
mov rsi, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, r14
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea rax, [rsp+68h+var_48]
cmp rdi, rax
jz short loc_70A4E
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_70A4E:
mov ebp, 2
jmp short loc_70A9C
loc_70A55:
lea r12, [rsp+68h+var_58]
mov edx, 2
mov rdi, r12
mov rsi, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, r14
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea rax, [rsp+68h+var_48]
cmp rdi, rax
jz short loc_70A97
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_70A97:
mov ebp, 10h
loc_70A9C:
mov [rsp+68h+var_60], rbx
mov r12, [r14]
call ___errno_location
mov r13, rax
mov ebx, [rax]
mov dword ptr [rax], 0
lea r15, [rsp+68h+var_58]
mov rdi, r12
mov rsi, r15
mov edx, ebp
call _strtoull
mov rdx, [r15]
sub rdx, r12
jz loc_70BB7
mov ecx, [r13+0]
cmp ecx, 22h ; '"'
jz loc_70BC3
test ecx, ecx
jnz short loc_70AE7
mov [r13+0], ebx
loc_70AE7:
cmp rdx, [r14+8]
jnz short loc_70B17
mov rcx, [rsp+68h+var_38]
mov [rcx], eax
mov rbx, [rsp+68h+var_60]
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, unk_B236B
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
jmp loc_70BA5
loc_70B17:
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
mov rbx, [rsp+68h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rcx, aGarbageAfterIn; "Garbage after integer value: "
lea rdi, [rsp+68h+var_58]
mov r8d, 1Dh
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_70B6D
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_70B73
loc_70B6D:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_70B73:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_70BA5
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_70BA5:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70BB7:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_70BC3:
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
mov r12, rdx
mov r15, rax
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_70C0B
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_70C0B
mov r12, rdx
mov r15, rax
jmp short loc_70C0B
mov r12, rdx
mov r15, rax
cmp dword ptr [r13+0], 0
jnz short loc_70C0B
mov [r13+0], ebx
loc_70C0B:
cmp r12d, 2
jnz short loc_70C2F
mov rdi, r15; void *
call ___cxa_begin_catch
lea rdx, aIsNotAValidInt; " is not a valid integer"
mov rdi, [rsp+68h+var_60]
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short loc_70C51
loc_70C2F:
cmp r12d, 1
jnz short loc_70C72
mov rdi, r15; void *
call ___cxa_begin_catch
lea rdx, aIsOutOfRange; " is out of range"
mov rdi, [rsp+68h+var_60]
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
loc_70C51:
call ___cxa_end_catch
mov rbx, [rsp+68h+var_60]
jmp loc_70BA5
mov r15, rax
call ___cxa_end_catch
jmp short loc_70C72
mov r15, rax
call ___cxa_end_catch
loc_70C72:
mov rdi, r15
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long cli::integer::parse_string<unsigned int>(long long a1, long long a2, _DWORD *a3)
{
unsigned int v3; // ebp
void *v4; // r12
int *v5; // r13
int v6; // ebx
int v7; // eax
char *v8; // rdx
long long v9; // rbx
long long v10; // rax
_OWORD *v11; // rcx
void *v13[2]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
_DWORD *v15; // [rsp+30h] [rbp-38h]
v15 = a3;
if ( std::string::find(a2, "0x", 0LL, 2LL) )
{
v3 = 10;
if ( !std::string::find(a2, "0b", 0LL, 2LL) )
{
std::string::substr(v13, a2, 2LL, -1LL);
std::string::operator=(a2, v13);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v3 = 2;
}
}
else
{
std::string::substr(v13, a2, 2LL, -1LL);
std::string::operator=(a2, v13);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v3 = 16;
}
v4 = *(void **)a2;
v5 = (int *)__errno_location();
v6 = *v5;
*v5 = 0;
v7 = strtoull(v4, v13, v3);
v8 = (char *)((char *)v13[0] - (char *)v4);
if ( v13[0] == v4 )
{
std::__throw_invalid_argument("stoull");
LABEL_22:
std::__throw_out_of_range("stoull");
}
if ( *v5 == 34 )
goto LABEL_22;
if ( !*v5 )
*v5 = v6;
if ( v8 == *(char **)(a2 + 8) )
{
*v15 = v7;
v9 = a1;
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char const*>(a1, &unk_B236B, (long long)&unk_B236B);
}
else
{
v9 = a1;
std::string::substr(v13, a2, v8, -1LL);
v10 = std::string::replace(v13, 0LL, 0LL, "Garbage after integer value: ", 29LL);
*(_QWORD *)a1 = a1 + 16;
v11 = (_OWORD *)(v10 + 16);
if ( *(_QWORD *)v10 == v10 + 16 )
{
*(_OWORD *)(a1 + 16) = *v11;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v10;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v11;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v10 + 8);
*(_QWORD *)v10 = v11;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
}
return v9;
}
| parse_string<unsigned_int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x1a8178]
MOV ECX,0x2
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010f7c0
TEST RAX,RAX
JZ 0x00170a55
LEA RSI,[0x1a67d8]
MOV ECX,0x2
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010f7c0
MOV EBP,0xa
TEST RAX,RAX
JNZ 0x00170a9c
LEA R12,[RSP + 0x10]
MOV EDX,0x2
MOV RDI,R12
MOV RSI,R14
MOV RCX,-0x1
CALL 0x0010f4a0
MOV RDI,R14
MOV RSI,R12
CALL 0x0010f580
MOV RDI,qword ptr [R12]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x00170a4e
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010f470
LAB_00170a4e:
MOV EBP,0x2
JMP 0x00170a9c
LAB_00170a55:
LEA R12,[RSP + 0x10]
MOV EDX,0x2
MOV RDI,R12
MOV RSI,R14
MOV RCX,-0x1
CALL 0x0010f4a0
MOV RDI,R14
MOV RSI,R12
CALL 0x0010f580
MOV RDI,qword ptr [R12]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x00170a97
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010f470
LAB_00170a97:
MOV EBP,0x10
LAB_00170a9c:
MOV qword ptr [RSP + 0x8],RBX
MOV R12,qword ptr [R14]
CALL 0x0010f060
MOV R13,RAX
MOV EBX,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R15,[RSP + 0x10]
MOV RDI,R12
MOV RSI,R15
MOV EDX,EBP
CALL 0x0010f5c0
MOV RDX,qword ptr [R15]
SUB RDX,R12
JZ 0x00170bb7
MOV ECX,dword ptr [R13]
CMP ECX,0x22
JZ 0x00170bc3
TEST ECX,ECX
JNZ 0x00170ae7
MOV dword ptr [R13],EBX
LAB_00170ae7:
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x00170b17
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RCX],EAX
MOV RBX,qword ptr [RSP + 0x8]
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x1b236b]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x0015c00c
JMP 0x00170ba5
LAB_00170b17:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV RCX,-0x1
MOV RBX,qword ptr [RSP + 0x8]
CALL 0x0010f4a0
LAB_00170b30:
LEA RCX,[0x1a67db]
LEA RDI,[RSP + 0x10]
MOV R8D,0x1d
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0010f4e0
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x00170b6d
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00170b73
LAB_00170b6d:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00170b73:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00170ba5
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010f470
LAB_00170ba5:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170bb7:
LEA RDI,[0x1a8218]
CALL 0x0010f2d0
LAB_00170bc3:
LEA RDI,[0x1a8218]
CALL 0x0010f650
LAB_00170bcf:
MOV R12,RDX
MOV R15,RAX
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00170c0b
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010f470
JMP 0x00170c0b
LAB_00170c0b:
CMP R12D,0x2
JNZ 0x00170c2f
MOV RDI,R15
CALL 0x0010f210
LAB_00170c19:
LEA RDX,[0x1a680a]
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x001387ff
LAB_00170c2d:
JMP 0x00170c51
LAB_00170c2f:
CMP R12D,0x1
JNZ 0x00170c72
MOV RDI,R15
CALL 0x0010f210
LAB_00170c3d:
LEA RDX,[0x1a67f9]
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x001387ff
LAB_00170c51:
CALL 0x0010f740
MOV RBX,qword ptr [RSP + 0x8]
JMP 0x00170ba5
LAB_00170c72:
MOV RDI,R15
CALL 0x0010f7d0
|
/* std::__cxx11::string cli::integer::parse_string<unsigned int>(std::__cxx11::string, unsigned
int&) */
integer * __thiscall
cli::integer::parse_string<unsigned_int>(integer *this,string *param_2,int4 *param_3)
{
int iVar1;
long lVar2;
int *piVar3;
ulonglong uVar4;
long *plVar5;
int8 uVar6;
long *plVar7;
int __base;
int1 auVar8 [12];
long *local_58 [2];
long local_48 [2];
int4 *local_38;
local_38 = param_3;
lVar2 = std::__cxx11::string::find((char *)param_2,0x1a8178,0);
if (lVar2 == 0) {
std::__cxx11::string::substr((ulong)local_58,(ulong)param_2);
std::__cxx11::string::operator=(param_2,(string *)local_58);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
__base = 0x10;
}
else {
lVar2 = std::__cxx11::string::find((char *)param_2,0x1a67d8,0);
__base = 10;
if (lVar2 == 0) {
std::__cxx11::string::substr((ulong)local_58,(ulong)param_2);
std::__cxx11::string::operator=(param_2,(string *)local_58);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
__base = 2;
}
}
plVar5 = *(long **)param_2;
piVar3 = __errno_location();
iVar1 = *piVar3;
*piVar3 = 0;
uVar4 = strtoull((char *)plVar5,(char **)local_58,__base);
if (local_58[0] == plVar5) {
/* try { // try from 00170bb7 to 00170bce has its CatchHandler @ 00170bfa */
std::__throw_invalid_argument("stoull");
}
else if (*piVar3 != 0x22) {
if (*piVar3 == 0) {
*piVar3 = iVar1;
}
if ((long)local_58[0] - (long)plVar5 == *(long *)(param_2 + 8)) {
*local_38 = (int)uVar4;
*(integer **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>((string *)this,&DAT_001b236b);
return this;
}
/* try { // try from 00170b17 to 00170b2f has its CatchHandler @ 00170bf2 */
std::__cxx11::string::substr((ulong)local_58,(ulong)param_2);
/* try { // try from 00170b30 to 00170b4a has its CatchHandler @ 00170bcf */
plVar5 = (long *)std::__cxx11::string::replace((ulong)local_58,0,(char *)0x0,0x1a67db);
*(integer **)this = this + 0x10;
plVar7 = plVar5 + 2;
if ((long *)*plVar5 == plVar7) {
lVar2 = plVar5[3];
*(long *)(this + 0x10) = *plVar7;
*(long *)(this + 0x18) = lVar2;
}
else {
*(long **)this = (long *)*plVar5;
*(long *)(this + 0x10) = *plVar7;
}
*(long *)(this + 8) = plVar5[1];
*plVar5 = (long)plVar7;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
if (local_58[0] == local_48) {
return this;
}
operator_delete(local_58[0],local_48[0] + 1);
return this;
}
auVar8 = std::__throw_out_of_range("stoull");
uVar6 = auVar8._0_8_;
/* catch(type#2 @ 001f0460, type#1 @ 001f0438, ) { ... } // from try @ 00170b30
with catch @ 00170bcf */
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
if (auVar8._8_4_ == 2) {
__cxa_begin_catch(uVar6);
/* try { // try from 00170c19 to 00170c2c has its CatchHandler @ 00170c6a */
std::operator+((string *)this,(char *)param_2);
}
else {
if (auVar8._8_4_ != 1) {
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar6);
}
__cxa_begin_catch(uVar6);
/* try { // try from 00170c3d to 00170c50 has its CatchHandler @ 00170c60 */
std::operator+((string *)this,(char *)param_2);
}
__cxa_end_catch();
return this;
}
|
|
4,010 | ma_feof | eloqsql/libmariadb/libmariadb/ma_io.c | int ma_feof(MA_FILE *file)
{
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
return feof((FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mfeof(file);
break;
#endif
default:
return -1;
}
} | O0 | c | ma_feof:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3680c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3685c
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x36826
jmp 0x3681c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x36838
jmp 0x36855
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x136a0
movl %eax, -0x4(%rbp)
jmp 0x3685c
leaq 0x2b4d1(%rip), %rax # 0x61d10
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x3685c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_feof:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_3680C
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3685C
loc_3680C:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_14], eax
sub eax, 1
jz short loc_36826
jmp short $+2
loc_3681C:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_36838
jmp short loc_36855
loc_36826:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _feof
mov [rbp+var_4], eax
jmp short loc_3685C
loc_36838:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp short loc_3685C
loc_36855:
mov [rbp+var_4], 0FFFFFFFFh
loc_3685C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_feof(long long a1)
{
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
return (unsigned int)feof(*(_QWORD *)(a1 + 8));
}
else if ( *(_DWORD *)a1 == 2 )
{
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 16LL))(a1);
}
else
{
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
| ma_feof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0013680c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013685c
LAB_0013680c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
SUB EAX,0x1
JZ 0x00136826
JMP 0x0013681c
LAB_0013681c:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x00136838
JMP 0x00136855
LAB_00136826:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001136a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013685c
LAB_00136838:
LEA RAX,[0x161d10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013685c
LAB_00136855:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_0013685c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_feof(int *param_1)
{
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else if (*param_1 == 1) {
local_c = feof(*(FILE **)(param_1 + 2));
}
else if (*param_1 == 2) {
local_c = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x10))(param_1);
}
else {
local_c = -1;
}
return local_c;
}
|
|
4,011 | LefDefParser::defiPinProp::setName(char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinProp.cpp | void defiPinProp::setName(const char* inst, const char* pin) {
int len = strlen(inst) + 1;
if ((strcmp(inst, "PIN") == 0) || (strcmp(inst,"pin") == 0)) {
isPin_ = 1;
instName_[0] = '\0'; /* make sure to clear any prev inst */
} else {
if (instNameSize_ < len) {
instNameSize_ = len;
free(instName_);
instName_ = (char*)malloc(len);
}
strcpy(instName_, defData->DEFCASE(inst));
}
len = strlen(pin) + 1;
if (pinNameSize_ < len) {
pinNameSize_ = len;
free(pinName_);
pinName_ = (char*)malloc(len);
}
strcpy(pinName_, defData->DEFCASE(pin));
} | O3 | cpp | LefDefParser::defiPinProp::setName(char const*, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x60d0
movq %rax, %r12
leaq 0x222a5(%rip), %rsi # 0x470ee
movq %r15, %rdi
callq 0x6280
testl %eax, %eax
je 0x24e8f
leaq 0x234f9(%rip), %rsi # 0x48355
movq %r15, %rdi
callq 0x6280
testl %eax, %eax
je 0x24e8f
incl %r12d
cmpl %r12d, 0x4(%r14)
jge 0x24e9c
movl %r12d, 0x4(%r14)
movq 0x8(%r14), %rdi
callq 0x6220
movslq %r12d, %rdi
callq 0x6270
movq %rax, %r12
movq %rax, 0x8(%r14)
jmp 0x24ea0
movb $0x1, (%r14)
movq 0x8(%r14), %rax
movb $0x0, (%rax)
jmp 0x24eb7
movq 0x8(%r14), %r12
movq 0x48(%r14), %rdi
movq %r15, %rsi
callq 0x18aa0
movq %r12, %rdi
movq %rax, %rsi
callq 0x6190
movq %rbx, %rdi
callq 0x60d0
movq %rax, %r15
incl %r15d
cmpl %r15d, 0x10(%r14)
jge 0x24ee9
movl %r15d, 0x10(%r14)
movq 0x18(%r14), %rdi
callq 0x6220
movslq %r15d, %rdi
callq 0x6270
movq %rax, %r15
movq %rax, 0x18(%r14)
jmp 0x24eed
movq 0x18(%r14), %r15
movq 0x48(%r14), %rdi
movq %rbx, %rsi
callq 0x18aa0
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6190
nop
| _ZN12LefDefParser11defiPinProp7setNameEPKcS2_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov r12, rax
lea rsi, aKFromclockpin+0Bh; "PIN"
mov rdi, r15
call _strcmp
test eax, eax
jz short loc_24E8F
lea rsi, aOptPin+4; "pin"
mov rdi, r15
call _strcmp
test eax, eax
jz short loc_24E8F
inc r12d
cmp [r14+4], r12d
jge short loc_24E9C
mov [r14+4], r12d
mov rdi, [r14+8]
call _free
movsxd rdi, r12d
call _malloc
mov r12, rax
mov [r14+8], rax
jmp short loc_24EA0
loc_24E8F:
mov byte ptr [r14], 1
mov rax, [r14+8]
mov byte ptr [rax], 0
jmp short loc_24EB7
loc_24E9C:
mov r12, [r14+8]
loc_24EA0:
mov rdi, [r14+48h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
loc_24EB7:
mov rdi, rbx
call _strlen
mov r15, rax
inc r15d
cmp [r14+10h], r15d
jge short loc_24EE9
mov [r14+10h], r15d
mov rdi, [r14+18h]
call _free
movsxd rdi, r15d
call _malloc
mov r15, rax
mov [r14+18h], rax
jmp short loc_24EED
loc_24EE9:
mov r15, [r14+18h]
loc_24EED:
mov rdi, [r14+48h]; this
mov rsi, rbx; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _strcpy
| long long LefDefParser::defiPinProp::setName(LefDefParser::defiPinProp *this, const char *a2, const char *a3)
{
int v4; // r12d
int v5; // r12d
long long v6; // r12
const char *v7; // rax
int v8; // r15d
long long v9; // r15
const char *v10; // rax
v4 = strlen(a2);
if ( !(unsigned int)strcmp(a2, "PIN") || !(unsigned int)strcmp(a2, "pin") )
{
*(_BYTE *)this = 1;
**((_BYTE **)this + 1) = 0;
}
else
{
v5 = v4 + 1;
if ( *((_DWORD *)this + 1) >= v5 )
{
v6 = *((_QWORD *)this + 1);
}
else
{
*((_DWORD *)this + 1) = v5;
free(*((_QWORD *)this + 1));
v6 = malloc(v5);
*((_QWORD *)this + 1) = v6;
}
v7 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), a2);
strcpy(v6, v7);
}
v8 = strlen(a3) + 1;
if ( *((_DWORD *)this + 4) >= v8 )
{
v9 = *((_QWORD *)this + 3);
}
else
{
*((_DWORD *)this + 4) = v8;
free(*((_QWORD *)this + 3));
v9 = malloc(v8);
*((_QWORD *)this + 3) = v9;
}
v10 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), a3);
return strcpy(v9, v10);
}
| setName:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x001060d0
MOV R12,RAX
LEA RSI,[0x1470ee]
MOV RDI,R15
CALL 0x00106280
TEST EAX,EAX
JZ 0x00124e8f
LEA RSI,[0x148355]
MOV RDI,R15
CALL 0x00106280
TEST EAX,EAX
JZ 0x00124e8f
INC R12D
CMP dword ptr [R14 + 0x4],R12D
JGE 0x00124e9c
MOV dword ptr [R14 + 0x4],R12D
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x00106220
MOVSXD RDI,R12D
CALL 0x00106270
MOV R12,RAX
MOV qword ptr [R14 + 0x8],RAX
JMP 0x00124ea0
LAB_00124e8f:
MOV byte ptr [R14],0x1
MOV RAX,qword ptr [R14 + 0x8]
MOV byte ptr [RAX],0x0
JMP 0x00124eb7
LAB_00124e9c:
MOV R12,qword ptr [R14 + 0x8]
LAB_00124ea0:
MOV RDI,qword ptr [R14 + 0x48]
MOV RSI,R15
CALL 0x00118aa0
MOV RDI,R12
MOV RSI,RAX
CALL 0x00106190
LAB_00124eb7:
MOV RDI,RBX
CALL 0x001060d0
MOV R15,RAX
INC R15D
CMP dword ptr [R14 + 0x10],R15D
JGE 0x00124ee9
MOV dword ptr [R14 + 0x10],R15D
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x00106220
MOVSXD RDI,R15D
CALL 0x00106270
MOV R15,RAX
MOV qword ptr [R14 + 0x18],RAX
JMP 0x00124eed
LAB_00124ee9:
MOV R15,qword ptr [R14 + 0x18]
LAB_00124eed:
MOV RDI,qword ptr [R14 + 0x48]
MOV RSI,RBX
CALL 0x00118aa0
MOV RDI,R15
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00106190
|
/* LefDefParser::defiPinProp::setName(char const*, char const*) */
void __thiscall LefDefParser::defiPinProp::setName(defiPinProp *this,char *param_1,char *param_2)
{
int iVar1;
size_t sVar2;
char *pcVar3;
char *pcVar4;
sVar2 = strlen(param_1);
iVar1 = strcmp(param_1,"PIN");
if (iVar1 != 0) {
iVar1 = strcmp(param_1,"pin");
if (iVar1 != 0) {
iVar1 = (int)sVar2 + 1;
if (*(int *)(this + 4) < iVar1) {
*(int *)(this + 4) = iVar1;
free(*(void **)(this + 8));
pcVar3 = (char *)malloc((long)iVar1);
*(char **)(this + 8) = pcVar3;
}
else {
pcVar3 = *(char **)(this + 8);
}
pcVar4 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_1);
strcpy(pcVar3,pcVar4);
goto LAB_00124eb7;
}
}
*this = (defiPinProp)0x1;
**(int1 **)(this + 8) = 0;
LAB_00124eb7:
sVar2 = strlen(param_2);
iVar1 = (int)sVar2 + 1;
if (*(int *)(this + 0x10) < iVar1) {
*(int *)(this + 0x10) = iVar1;
free(*(void **)(this + 0x18));
pcVar3 = (char *)malloc((long)iVar1);
*(char **)(this + 0x18) = pcVar3;
}
else {
pcVar3 = *(char **)(this + 0x18);
}
pcVar4 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_2);
strcpy(pcVar3,pcVar4);
return;
}
|
|
4,012 | JS_AtomToCString | bluesky950520[P]quickjs/quickjs.c | const char *JS_AtomToCString(JSContext *ctx, JSAtom atom)
{
JSValue str;
const char *cstr;
str = JS_AtomToString(ctx, atom);
if (JS_IsException(str))
return NULL;
cstr = JS_ToCString(ctx, str);
JS_FreeValue(ctx, str);
return cstr;
} | O0 | c | JS_AtomToCString:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x29000
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x29128
movq $0x0, 0x40(%rsp)
jmp 0x2915f
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x29170
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x23c90
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
| JS_AtomToCString:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_14]
call JS_AtomToString
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_20]
call JS_IsException_1
cmp eax, 0
jz short loc_29128
mov [rsp+48h+var_8], 0
jmp short loc_2915F
loc_29128:
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_28]
mov rdx, [rsp+48h+var_20]
call JS_ToCString_0
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_28]
mov rdx, [rsp+48h+var_20]
call JS_FreeValue
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_8], rax
loc_2915F:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| long long JS_AtomToCString(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+18h] [rbp-30h]
long long v6; // [rsp+28h] [rbp-20h]
v4 = JS_AtomToString(a1, a2);
v6 = v2;
if ( JS_IsException_1(v4, v2) )
return 0LL;
v5 = JS_ToCString_0(a1, v4, v6);
JS_FreeValue(a1, v4, v6);
return v5;
}
| JS_AtomToCString:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00129000
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00129128
MOV qword ptr [RSP + 0x40],0x0
JMP 0x0012915f
LAB_00129128:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00129170
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
LAB_0012915f:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int8 JS_AtomToCString(int8 param_1,int4 param_2)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int8 local_8;
auVar4 = JS_AtomToString(param_1,param_2);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,uVar3);
if (iVar1 == 0) {
local_8 = JS_ToCString(param_1,uVar2,uVar3);
JS_FreeValue(param_1,uVar2,uVar3);
}
else {
local_8 = 0;
}
return local_8;
}
|
|
4,013 | JS_AtomToCString | bluesky950520[P]quickjs/quickjs.c | const char *JS_AtomToCString(JSContext *ctx, JSAtom atom)
{
JSValue str;
const char *cstr;
str = JS_AtomToString(ctx, atom);
if (JS_IsException(str))
return NULL;
cstr = JS_ToCString(ctx, str);
JS_FreeValue(ctx, str);
return cstr;
} | O1 | c | JS_AtomToCString:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edx
callq 0x2075a
movq %rdx, %r15
cmpl $0x6, %r15d
jne 0x20821
xorl %eax, %eax
jmp 0x2084c
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x20bf7
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d8c6
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_AtomToCString:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov edx, 1
call __JS_AtomToValue
mov r15, rdx
cmp r15d, 6
jnz short loc_20821
xor eax, eax
jmp short loc_2084C
loc_20821:
mov r14, rax
mov rdi, rbx
xor esi, esi
mov rdx, rax
mov rcx, r15
xor r8d, r8d
call JS_ToCStringLen2
mov r12, rax
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov rax, r12
loc_2084C:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long JS_AtomToCString(long long a1, int a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // r15
_DWORD *v6; // r14
long long v7; // r12
v2 = _JS_AtomToValue(a1, a2, 1);
v4 = v3;
if ( (_DWORD)v3 == 6 )
return 0LL;
v6 = (_DWORD *)v2;
v7 = JS_ToCStringLen2(a1, 0LL, v2, v3, 0LL);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v6, v4);
return v7;
}
| JS_AtomToCString:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDX,0x1
CALL 0x0012075a
MOV R15,RDX
CMP R15D,0x6
JNZ 0x00120821
XOR EAX,EAX
JMP 0x0012084c
LAB_00120821:
MOV R14,RAX
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,RAX
MOV RCX,R15
XOR R8D,R8D
CALL 0x00120bf7
MOV R12,RAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011d8c6
MOV RAX,R12
LAB_0012084c:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8 JS_AtomToCString(long param_1,int8 param_2)
{
int8 uVar1;
int1 auVar2 [16];
auVar2 = __JS_AtomToValue(param_1,param_2,1);
if (auVar2._8_4_ == 6) {
uVar1 = 0;
}
else {
uVar1 = JS_ToCStringLen2(param_1,0,auVar2._0_8_,auVar2._8_8_,0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar2._0_8_,auVar2._8_8_);
}
return uVar1;
}
|
|
4,014 | JS_AtomToCString | bluesky950520[P]quickjs/quickjs.c | const char *JS_AtomToCString(JSContext *ctx, JSAtom atom)
{
JSValue str;
const char *cstr;
str = JS_AtomToString(ctx, atom);
if (JS_IsException(str))
return NULL;
cstr = JS_ToCString(ctx, str);
JS_FreeValue(ctx, str);
return cstr;
} | O2 | c | JS_AtomToCString:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1a990
movq %rdx, %r15
cmpl $0x6, %r15d
jne 0x1a9dc
xorl %eax, %eax
jmp 0x1aa01
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1aa0d
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1801e
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_AtomToCString:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
call JS_AtomToString
mov r15, rdx
cmp r15d, 6
jnz short loc_1A9DC
xor eax, eax
jmp short loc_1AA01
loc_1A9DC:
mov r14, rax
mov rdi, rbx
mov rsi, rax
mov rdx, r15
call JS_ToCString_0
mov r12, rax
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov rax, r12
loc_1AA01:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long JS_AtomToCString(long long a1, int a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // r15
long long v6; // r14
long long v7; // r12
v2 = JS_AtomToString(a1, a2);
v4 = v3;
if ( (_DWORD)v3 == 6 )
return 0LL;
v6 = v2;
v7 = JS_ToCString_0(a1, v2, v3);
JS_FreeValue(a1, v6, v4);
return v7;
}
| JS_AtomToCString:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0011a990
MOV R15,RDX
CMP R15D,0x6
JNZ 0x0011a9dc
XOR EAX,EAX
JMP 0x0011aa01
LAB_0011a9dc:
MOV R14,RAX
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
CALL 0x0011aa0d
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011801e
MOV RAX,R12
LAB_0011aa01:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8 JS_AtomToCString(int8 param_1)
{
int8 uVar1;
int1 auVar2 [16];
auVar2 = JS_AtomToString();
if (auVar2._8_4_ == 6) {
uVar1 = 0;
}
else {
uVar1 = JS_ToCString(param_1,auVar2._0_8_,auVar2._8_8_);
JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_);
}
return uVar1;
}
|
|
4,015 | print_defaults | eloqsql/mysys/my_default.c | void print_defaults(const char *conf_file, const char **groups)
{
const char **groups_save= groups;
my_print_default_files(conf_file);
fputs("The following groups are read:",stdout);
for ( ; *groups ; groups++)
{
fputc(' ',stdout);
fputs(*groups,stdout);
}
if (my_defaults_group_suffix)
{
groups= groups_save;
for ( ; *groups ; groups++)
{
fputc(' ',stdout);
fputs(*groups,stdout);
fputs(my_defaults_group_suffix,stdout);
}
}
puts("\nThe following options may be given as the first argument:\n\
--print-defaults Print the program argument list and exit.\n\
--no-defaults Don't read default options from any option file.\n\
The following specify which files/extra groups are read (specified before remaining options):\n\
--defaults-file=# Only read default options from the given file #.\n\
--defaults-extra-file=# Read this file after the global files are read.\n\
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.");
} | O3 | c | print_defaults:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x5b633
movq 0x2dd771(%rip), %r14 # 0x338fc0
movq (%r14), %rsi
leaq 0x3cbb1(%rip), %rdi # 0x9840a
callq 0x36340
cmpq $0x0, (%rbx)
je 0x5b88b
leaq 0x8(%rbx), %r15
movq (%r14), %rsi
movl $0x20, %edi
callq 0x368d0
movq -0x8(%r15), %rdi
movq (%r14), %rsi
callq 0x36340
cmpq $0x0, (%r15)
leaq 0x8(%r15), %r15
jne 0x5b868
leaq 0x3afa6e(%rip), %r15 # 0x40b300
cmpq $0x0, (%r15)
je 0x5b8d0
cmpq $0x0, (%rbx)
je 0x5b8d0
addq $0x8, %rbx
movq (%r14), %rsi
movl $0x20, %edi
callq 0x368d0
movq -0x8(%rbx), %rdi
movq (%r14), %rsi
callq 0x36340
movq (%r15), %rdi
movq (%r14), %rsi
callq 0x36340
cmpq $0x0, (%rbx)
leaq 0x8(%rbx), %rbx
jne 0x5b8a2
leaq 0x3cb52(%rip), %rdi # 0x98429
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36a30
| print_defaults:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
call my_print_default_files
mov r14, cs:stdout_ptr
mov rsi, [r14]
lea rdi, aTheFollowingGr; "The following groups are read:"
call _fputs
cmp qword ptr [rbx], 0
jz short loc_5B88B
lea r15, [rbx+8]
loc_5B868:
mov rsi, [r14]
mov edi, 20h ; ' '
call _fputc
mov rdi, [r15-8]
mov rsi, [r14]
call _fputs
cmp qword ptr [r15], 0
lea r15, [r15+8]
jnz short loc_5B868
loc_5B88B:
lea r15, my_defaults_group_suffix
cmp qword ptr [r15], 0
jz short loc_5B8D0
cmp qword ptr [rbx], 0
jz short loc_5B8D0
add rbx, 8
loc_5B8A2:
mov rsi, [r14]
mov edi, 20h ; ' '
call _fputc
mov rdi, [rbx-8]
mov rsi, [r14]
call _fputs
mov rdi, [r15]
mov rsi, [r14]
call _fputs
cmp qword ptr [rbx], 0
lea rbx, [rbx+8]
jnz short loc_5B8A2
loc_5B8D0:
lea rdi, aTheFollowingOp; "\nThe following options may be given as"...
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _puts
| long long print_defaults(long long a1, _QWORD *a2)
{
_QWORD *v2; // r15
bool v3; // zf
_QWORD *v4; // rbx
my_print_default_files(a1);
fputs("The following groups are read:", stdout);
if ( *a2 )
{
v2 = a2 + 1;
do
{
fputc(32LL, stdout);
fputs(*(v2 - 1), stdout);
v3 = *v2++ == 0LL;
}
while ( !v3 );
}
if ( my_defaults_group_suffix && *a2 )
{
v4 = a2 + 1;
do
{
fputc(32LL, stdout);
fputs(*(v4 - 1), stdout);
fputs(my_defaults_group_suffix, stdout);
v3 = *v4++ == 0LL;
}
while ( !v3 );
}
return puts(
"\n"
"The following options may be given as the first argument:\n"
"--print-defaults Print the program argument list and exit.\n"
"--no-defaults Don't read default options from any option file.\n"
"The following specify which files/extra groups are read (specified before remaining options):\n"
"--defaults-file=# Only read default options from the given file #.\n"
"--defaults-extra-file=# Read this file after the global files are read.\n"
"--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.");
}
| print_defaults:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
CALL 0x0015b633
MOV R14,qword ptr [0x00438fc0]
MOV RSI,qword ptr [R14]
LEA RDI,[0x19840a]
CALL 0x00136340
CMP qword ptr [RBX],0x0
JZ 0x0015b88b
LEA R15,[RBX + 0x8]
LAB_0015b868:
MOV RSI,qword ptr [R14]
MOV EDI,0x20
CALL 0x001368d0
MOV RDI,qword ptr [R15 + -0x8]
MOV RSI,qword ptr [R14]
CALL 0x00136340
CMP qword ptr [R15],0x0
LEA R15,[R15 + 0x8]
JNZ 0x0015b868
LAB_0015b88b:
LEA R15,[0x50b300]
CMP qword ptr [R15],0x0
JZ 0x0015b8d0
CMP qword ptr [RBX],0x0
JZ 0x0015b8d0
ADD RBX,0x8
LAB_0015b8a2:
MOV RSI,qword ptr [R14]
MOV EDI,0x20
CALL 0x001368d0
MOV RDI,qword ptr [RBX + -0x8]
MOV RSI,qword ptr [R14]
CALL 0x00136340
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R14]
CALL 0x00136340
CMP qword ptr [RBX],0x0
LEA RBX,[RBX + 0x8]
JNZ 0x0015b8a2
LAB_0015b8d0:
LEA RDI,[0x198429]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00136a30
|
void print_defaults(int8 param_1,long *param_2)
{
long lVar1;
int *puVar2;
long *plVar3;
my_print_default_files();
puVar2 = PTR_stdout_00438fc0;
fputs("The following groups are read:",*(FILE **)PTR_stdout_00438fc0);
if (*param_2 != 0) {
plVar3 = param_2 + 1;
do {
fputc(0x20,*(FILE **)puVar2);
fputs((char *)plVar3[-1],*(FILE **)puVar2);
lVar1 = *plVar3;
plVar3 = plVar3 + 1;
} while (lVar1 != 0);
}
if ((my_defaults_group_suffix != (char *)0x0) && (*param_2 != 0)) {
param_2 = param_2 + 1;
do {
fputc(0x20,*(FILE **)puVar2);
fputs((char *)param_2[-1],*(FILE **)puVar2);
fputs(my_defaults_group_suffix,*(FILE **)puVar2);
lVar1 = *param_2;
param_2 = param_2 + 1;
} while (lVar1 != 0);
}
puts(
"\nThe following options may be given as the first argument:\n--print-defaults Print the program argument list and exit.\n--no-defaults Don\'t read default options from any option file.\nThe following specify which files/extra groups are read (specified before remaining options):\n--defaults-file=# Only read default options from the given file #.\n--defaults-extra-file=# Read this file after the global files are read.\n--defaults-group-suffix=# Additionally read default groups with # appended as a suffix."
);
return;
}
|
|
4,016 | intx::operator>>(intx::uint<128u>, unsigned long) | corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp | inline constexpr uint128 operator>>(uint128 x, uint64_t shift) noexcept
{
return (shift < 64) ?
// Find the part moved from lo to hi.
// For shift == 0 left shift by (64 - shift) is invalid so
// split it into 2 shifts by 1 and (63 - shift).
uint128{(x[0] >> shift) | ((x[1] << 1) << (63 - shift)), x[1] >> shift} :
// Guarantee "defined" behavior for shifts larger than 128.
(shift < 128) ? uint128{x[1] >> (shift - 64)} : 0;
} | O2 | cpp | intx::operator>>(intx::uint<128u>, unsigned long):
movq %rdx, %r8
movq %rsi, %rdx
cmpq $0x3f, %r8
ja 0x3997e
movl %r8d, %ecx
shrq %cl, %rdi
leaq (%rdx,%rdx), %rax
notb %cl
shlq %cl, %rax
orq %rdi, %rax
movl %r8d, %ecx
shrq %cl, %rdx
retq
cmpq $0x7f, %r8
ja 0x3998f
movl %r8d, %ecx
shrq %cl, %rdx
movq %rdx, %rax
jmp 0x39991
xorl %eax, %eax
xorl %edx, %edx
retq
| _ZN4intxrsENS_4uintILj128EEEm:
mov r8, rdx
mov rdx, rsi
cmp r8, 3Fh ; '?'
ja short loc_3997E
mov ecx, r8d
shr rdi, cl
lea rax, [rdx+rdx]
not cl
shl rax, cl
or rax, rdi
mov ecx, r8d
shr rdx, cl
retn
loc_3997E:
cmp r8, 7Fh
ja short loc_3998F
mov ecx, r8d
shr rdx, cl
mov rax, rdx
jmp short loc_39991
loc_3998F:
xor eax, eax
loc_39991:
xor edx, edx
retn
| long long intx::operator>>(unsigned long long a1, unsigned long long a2, unsigned long long a3)
{
if ( a3 <= 0x3F )
return (a1 >> a3) | ((2 * a2) << ~(_BYTE)a3);
if ( a3 > 0x7F )
return 0LL;
return a2 >> a3;
}
| operator>>:
MOV R8,RDX
MOV RDX,RSI
CMP R8,0x3f
JA 0x0013997e
MOV ECX,R8D
SHR RDI,CL
LEA RAX,[RDX + RDX*0x1]
NOT CL
SHL RAX,CL
OR RAX,RDI
MOV ECX,R8D
SHR RDX,CL
RET
LAB_0013997e:
CMP R8,0x7f
JA 0x0013998f
MOV ECX,R8D
SHR RDX,CL
MOV RAX,RDX
JMP 0x00139991
LAB_0013998f:
XOR EAX,EAX
LAB_00139991:
XOR EDX,EDX
RET
|
/* intx::TEMPNAMEPLACEHOLDERVALUE(intx::uint<128u>, unsigned long) */
int1 [16] __thiscall intx::operator>>(intx *this,ulong param_2,ulong param_3)
{
byte bVar1;
int1 auVar2 [16];
int1 auVar3 [16];
bVar1 = (byte)param_3;
if (param_3 < 0x40) {
auVar2._0_8_ = param_2 * 2 << (~bVar1 & 0x3f) | (ulong)this >> (bVar1 & 0x3f);
auVar2._8_8_ = param_2 >> (bVar1 & 0x3f);
return auVar2;
}
if (param_3 < 0x80) {
param_2 = param_2 >> (bVar1 & 0x3f);
}
else {
param_2 = 0;
}
auVar3._8_8_ = 0;
auVar3._0_8_ = param_2;
return auVar3;
}
|
|
4,017 | JS_SetThisTimeValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_SetThisTimeValue(JSContext *ctx, JSValue this_val, double v)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_DATE) {
JS_FreeValue(ctx, p->u.object_data);
p->u.object_data = js_float64(v);
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a Date object");
} | O0 | c | JS_SetThisTimeValue:
subq $0x58, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x40(%rsp), %rax
cmpl $-0x1, %eax
jne 0x9f6df
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0xa, %eax
jne 0x9f6dd
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
callq 0x29f80
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x53950
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x279c0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x9f6fc
jmp 0x9f6df
movq 0x30(%rsp), %rdi
leaq 0x761a6(%rip), %rsi # 0x115891
movb $0x0, %al
callq 0x335f0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x58, %rsp
retq
nopl (%rax,%rax)
| JS_SetThisTimeValue:
sub rsp, 58h
mov [rsp+58h+var_20], rsi
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_28], rdi
movsd [rsp+58h+var_30], xmm0
mov rax, [rsp+58h+var_18]
cmp eax, 0FFFFFFFFh
jnz loc_9F6DF
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_38]
movzx eax, word ptr [rax+6]
cmp eax, 0Ah
jnz short loc_9F6DD
mov rdi, [rsp+58h+var_28]
mov rax, [rsp+58h+var_38]
mov rsi, [rax+30h]
mov rdx, [rax+38h]
call JS_FreeValue
mov rax, [rsp+58h+var_38]
mov [rsp+58h+var_50], rax
movsd xmm0, [rsp+58h+var_30]
call js_float64
mov rcx, rax
mov rax, [rsp+58h+var_50]
mov [rsp+58h+var_48], rcx
mov [rsp+58h+var_40], rdx
mov rcx, [rsp+58h+var_48]
mov [rax+30h], rcx
mov rcx, [rsp+58h+var_40]
mov [rax+38h], rcx
mov rax, [rsp+58h+var_38]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call js_dup
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
jmp short loc_9F6FC
loc_9F6DD:
jmp short $+2
loc_9F6DF:
mov rdi, [rsp+58h+var_28]
lea rsi, aNotADateObject; "not a Date object"
mov al, 0
call JS_ThrowTypeError
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
loc_9F6FC:
mov rax, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_8]
add rsp, 58h
retn
| _DWORD * JS_SetThisTimeValue(
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 v14; // rdx
char v16; // [rsp+0h] [rbp-58h]
if ( (_DWORD)a3 != -1 || *(_WORD *)(a2 + 6) != 10 )
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"not a Date object",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
JS_FreeValue(a1, *(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56));
*(_QWORD *)(a2 + 48) = js_float64(*(double *)a7.m128_u64);
*(_QWORD *)(a2 + 56) = v14;
return js_dup(*(_DWORD **)(a2 + 48), *(_QWORD *)(a2 + 56));
}
| JS_SetThisTimeValue:
SUB RSP,0x58
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOVSD qword ptr [RSP + 0x28],XMM0
MOV RAX,qword ptr [RSP + 0x40]
CMP EAX,-0x1
JNZ 0x0019f6df
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0xa
JNZ 0x0019f6dd
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RAX + 0x38]
CALL 0x00129f80
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOVSD XMM0,qword ptr [RSP + 0x28]
CALL 0x00153950
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 + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x001279c0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x0019f6fc
LAB_0019f6dd:
JMP 0x0019f6df
LAB_0019f6df:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x215891]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
LAB_0019f6fc:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x58
RET
|
int1 [16] JS_SetThisTimeValue(int8 param_1,int8 param_2,long param_3,int param_4)
{
int1 auVar1 [16];
if ((param_4 == -1) && (*(short *)(param_3 + 6) == 10)) {
JS_FreeValue(param_2,*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38));
auVar1 = js_float64(param_1);
*(int1 (*) [16])(param_3 + 0x30) = auVar1;
auVar1 = js_dup(*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38));
}
else {
auVar1 = JS_ThrowTypeError(param_2,"not a Date object");
}
return auVar1;
}
|
|
4,018 | delete_dynamic_with_callback | eloqsql/mysys/array.c | void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) {
uint i;
char *ptr= (char*) array->buffer;
for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) {
f(ptr);
}
delete_dynamic(array);
} | O3 | c | delete_dynamic_with_callback:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x91d06
movq %rsi, %r14
movq (%rbx), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq *%r14
incl %r12d
movl 0x14(%rbx), %eax
addq %rax, %r15
cmpl 0x8(%rbx), %r12d
jb 0x91cf1
testb $0x1, 0x21(%rbx)
jne 0x91d19
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x91d19
callq 0x9ffe2
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| delete_dynamic_with_callback:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz short loc_91D06
mov r14, rsi
mov r15, [rbx]
xor r12d, r12d
loc_91CF1:
mov rdi, r15
call r14
inc r12d
mov eax, [rbx+14h]
add r15, rax
cmp r12d, [rbx+8]
jb short loc_91CF1
loc_91D06:
test byte ptr [rbx+21h], 1
jnz short loc_91D19
mov rdi, [rbx]
test rdi, rdi
jz short loc_91D19
call my_free
loc_91D19:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long delete_dynamic_with_callback(long long *a1, void ( *a2)(long long))
{
long long v2; // r15
unsigned int v3; // r12d
long long result; // rax
if ( *((_DWORD *)a1 + 2) )
{
v2 = *a1;
v3 = 0;
do
{
a2(v2);
++v3;
result = *((unsigned int *)a1 + 5);
v2 += result;
}
while ( v3 < *((_DWORD *)a1 + 2) );
}
if ( (*((_BYTE *)a1 + 33) & 1) == 0 && *a1 )
result = my_free(*a1);
*(_OWORD *)a1 = 0LL;
return result;
}
| delete_dynamic_with_callback:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x00191d06
MOV R14,RSI
MOV R15,qword ptr [RBX]
XOR R12D,R12D
LAB_00191cf1:
MOV RDI,R15
CALL R14
INC R12D
MOV EAX,dword ptr [RBX + 0x14]
ADD R15,RAX
CMP R12D,dword ptr [RBX + 0x8]
JC 0x00191cf1
LAB_00191d06:
TEST byte ptr [RBX + 0x21],0x1
JNZ 0x00191d19
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00191d19
CALL 0x0019ffe2
LAB_00191d19:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void delete_dynamic_with_callback(long *param_1,code *param_2)
{
uint uVar1;
long lVar2;
if ((int)param_1[1] != 0) {
lVar2 = *param_1;
uVar1 = 0;
do {
(*param_2)(lVar2);
uVar1 = uVar1 + 1;
lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14);
} while (uVar1 < *(uint *)(param_1 + 1));
}
if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) {
my_free();
}
*param_1 = 0;
param_1[1] = 0;
return;
}
|
|
4,019 | ftxui::HorizontalContainer::EventHandler(ftxui::Event) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/container.cpp | bool EventHandler(Event event) override {
const int old_selected = *selector_;
if (event == Event::ArrowLeft || event == Event::Character('h')) {
MoveSelector(-1);
}
if (event == Event::ArrowRight || event == Event::Character('l')) {
MoveSelector(+1);
}
if (event == Event::Tab) {
MoveSelectorWrap(+1);
}
if (event == Event::TabReverse) {
MoveSelectorWrap(-1);
}
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
return old_selected != *selector_;
} | O3 | cpp | ftxui::HorizontalContainer::EventHandler(ftxui::Event):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl (%rax), %ebp
leaq 0x3140d(%rip), %rsi # 0x59a80
movq %r14, %rdi
callq 0x28282
testb %al, %al
jne 0x286e3
movq %rsp, %r15
movq %r15, %rdi
movl $0x68, %esi
callq 0x291b4
movq 0x28(%r14), %rdx
cmpq 0x28(%r15), %rdx
jne 0x286b7
movq 0x20(%rsp), %r15
testq %rdx, %rdx
je 0x286c1
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xb410
testl %eax, %eax
sete %r12b
jmp 0x286c4
movq 0x20(%rsp), %r15
xorl %r12d, %r12d
jmp 0x286c4
movb $0x1, %r12b
leaq 0x30(%rsp), %rax
cmpq %rax, %r15
je 0x286de
movq 0x30(%rsp), %rsi
incq %rsi
movq %r15, %rdi
callq 0xb400
testb %r12b, %r12b
je 0x286f0
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x282b0
leaq 0x313c9(%rip), %rsi # 0x59ac0
movq %r14, %rdi
callq 0x28282
testb %al, %al
jne 0x28767
movq %rsp, %r15
movq %r15, %rdi
movl $0x6c, %esi
callq 0x291b4
movq 0x28(%r14), %rdx
cmpq 0x28(%r15), %rdx
jne 0x2873b
movq 0x20(%rsp), %r15
testq %rdx, %rdx
je 0x28745
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xb410
testl %eax, %eax
sete %r12b
jmp 0x28748
movq 0x20(%rsp), %r15
xorl %r12d, %r12d
jmp 0x28748
movb $0x1, %r12b
leaq 0x30(%rsp), %rax
cmpq %rax, %r15
je 0x28762
movq 0x30(%rsp), %rsi
incq %rsi
movq %r15, %rdi
callq 0xb400
testb %r12b, %r12b
je 0x28774
movq %rbx, %rdi
movl $0x1, %esi
callq 0x282b0
leaq 0x31605(%rip), %rsi # 0x59d80
movq %r14, %rdi
callq 0x28282
testb %al, %al
je 0x28794
movq %rbx, %rdi
movl $0x1, %esi
callq 0x282fa
leaq 0x31625(%rip), %rsi # 0x59dc0
movq %r14, %rdi
callq 0x28282
testb %al, %al
je 0x287b4
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x282fa
movq 0x10(%rbx), %rax
movq 0x30(%rbx), %rcx
subq 0x8(%rbx), %rax
shrq $0x4, %rax
decl %eax
movl (%rcx), %edx
cmpl %eax, %edx
cmovll %edx, %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
movl %edx, (%rcx)
cmpl %edx, %ebp
setne %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN5ftxui19HorizontalContainer12EventHandlerENS_5EventE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+30h]
mov ebp, [rax]
lea rsi, _ZN5ftxui5Event9ArrowLeftE; ftxui::Event::ArrowLeft
mov rdi, r14
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, al
jnz short loc_286E3
mov r15, rsp
mov rdi, r15; this
mov esi, 68h ; 'h'; char
call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char)
mov rdx, [r14+28h]
cmp rdx, [r15+28h]
jnz short loc_286B7
mov r15, [rsp+68h+var_48]
test rdx, rdx
jz short loc_286C1
mov rdi, [r14+20h]
mov rsi, r15
call _bcmp
test eax, eax
setz r12b
jmp short loc_286C4
loc_286B7:
mov r15, [rsp+68h+var_48]
xor r12d, r12d
jmp short loc_286C4
loc_286C1:
mov r12b, 1
loc_286C4:
lea rax, [rsp+68h+var_38]
cmp r15, rax
jz short loc_286DE
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_286DE:
test r12b, r12b
jz short loc_286F0
loc_286E3:
mov rdi, rbx; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
loc_286F0:
lea rsi, _ZN5ftxui5Event10ArrowRightE; ftxui::Event::ArrowRight
mov rdi, r14
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, al
jnz short loc_28767
mov r15, rsp
mov rdi, r15; this
mov esi, 6Ch ; 'l'; char
call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char)
mov rdx, [r14+28h]
cmp rdx, [r15+28h]
jnz short loc_2873B
mov r15, [rsp+68h+var_48]
test rdx, rdx
jz short loc_28745
mov rdi, [r14+20h]
mov rsi, r15
call _bcmp
test eax, eax
setz r12b
jmp short loc_28748
loc_2873B:
mov r15, [rsp+68h+var_48]
xor r12d, r12d
jmp short loc_28748
loc_28745:
mov r12b, 1
loc_28748:
lea rax, [rsp+68h+var_38]
cmp r15, rax
jz short loc_28762
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_28762:
test r12b, r12b
jz short loc_28774
loc_28767:
mov rdi, rbx; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
loc_28774:
lea rsi, _ZN5ftxui5Event3TabE; ftxui::Event::Tab
mov rdi, r14
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, al
jz short loc_28794
mov rdi, rbx; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int)
loc_28794:
lea rsi, _ZN5ftxui5Event10TabReverseE; ftxui::Event::TabReverse
mov rdi, r14
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, al
jz short loc_287B4
mov rdi, rbx; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int)
loc_287B4:
mov rax, [rbx+10h]
mov rcx, [rbx+30h]
sub rax, [rbx+8]
shr rax, 4
dec eax
mov edx, [rcx]
cmp edx, eax
cmovl eax, edx
xor edx, edx
test eax, eax
cmovg edx, eax
mov [rcx], edx
cmp ebp, edx
setnz al
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| bool ftxui::HorizontalContainer::EventHandler(long long a1, long long a2)
{
int v2; // ebp
long long v3; // rdx
_QWORD *v4; // r15
bool v5; // r12
long long v6; // rdx
_QWORD *v7; // r15
bool v8; // r12
int *v9; // rcx
int v10; // eax
int v11; // edx
_BYTE v13[32]; // [rsp+0h] [rbp-68h] BYREF
void *v14; // [rsp+20h] [rbp-48h]
long long v15; // [rsp+28h] [rbp-40h]
_QWORD v16[7]; // [rsp+30h] [rbp-38h] BYREF
v2 = **(_DWORD **)(a1 + 48);
if ( ftxui::Event::operator==(a2, (long long)&ftxui::Event::ArrowLeft) )
goto LABEL_10;
ftxui::Event::Character((ftxui::Event *)v13, 104);
v3 = *(_QWORD *)(a2 + 40);
if ( v3 == v15 )
{
v4 = v14;
if ( v3 )
v5 = (unsigned int)bcmp(*(_QWORD *)(a2 + 32), v14) == 0;
else
v5 = 1;
}
else
{
v4 = v14;
v5 = 0;
}
if ( v4 != v16 )
operator delete(v4, v16[0] + 1LL);
if ( v5 )
LABEL_10:
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1);
if ( ftxui::Event::operator==(a2, (long long)&ftxui::Event::ArrowRight) )
goto LABEL_20;
ftxui::Event::Character((ftxui::Event *)v13, 108);
v6 = *(_QWORD *)(a2 + 40);
if ( v6 == v15 )
{
v7 = v14;
if ( v6 )
v8 = (unsigned int)bcmp(*(_QWORD *)(a2 + 32), v14) == 0;
else
v8 = 1;
}
else
{
v7 = v14;
v8 = 0;
}
if ( v7 != v16 )
operator delete(v7, v16[0] + 1LL);
if ( v8 )
LABEL_20:
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1);
if ( ftxui::Event::operator==(a2, (long long)&ftxui::Event::Tab) )
ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, 1);
if ( ftxui::Event::operator==(a2, (long long)&ftxui::Event::TabReverse) )
ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, -1);
v9 = *(int **)(a1 + 48);
v10 = ((*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 4) - 1;
if ( *v9 < v10 )
v10 = *v9;
v11 = 0;
if ( v10 > 0 )
v11 = v10;
*v9 = v11;
return v2 != v11;
}
| EventHandler:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV EBP,dword ptr [RAX]
LEA RSI,[0x159a80]
MOV RDI,R14
CALL 0x00128282
TEST AL,AL
JNZ 0x001286e3
MOV R15,RSP
MOV RDI,R15
MOV ESI,0x68
CALL 0x001291b4
MOV RDX,qword ptr [R14 + 0x28]
CMP RDX,qword ptr [R15 + 0x28]
JNZ 0x001286b7
MOV R15,qword ptr [RSP + 0x20]
TEST RDX,RDX
JZ 0x001286c1
MOV RDI,qword ptr [R14 + 0x20]
MOV RSI,R15
CALL 0x0010b410
TEST EAX,EAX
SETZ R12B
JMP 0x001286c4
LAB_001286b7:
MOV R15,qword ptr [RSP + 0x20]
XOR R12D,R12D
JMP 0x001286c4
LAB_001286c1:
MOV R12B,0x1
LAB_001286c4:
LEA RAX,[RSP + 0x30]
CMP R15,RAX
JZ 0x001286de
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
MOV RDI,R15
CALL 0x0010b400
LAB_001286de:
TEST R12B,R12B
JZ 0x001286f0
LAB_001286e3:
MOV RDI,RBX
MOV ESI,0xffffffff
CALL 0x001282b0
LAB_001286f0:
LEA RSI,[0x159ac0]
MOV RDI,R14
CALL 0x00128282
TEST AL,AL
JNZ 0x00128767
MOV R15,RSP
MOV RDI,R15
MOV ESI,0x6c
CALL 0x001291b4
MOV RDX,qword ptr [R14 + 0x28]
CMP RDX,qword ptr [R15 + 0x28]
JNZ 0x0012873b
MOV R15,qword ptr [RSP + 0x20]
TEST RDX,RDX
JZ 0x00128745
MOV RDI,qword ptr [R14 + 0x20]
MOV RSI,R15
CALL 0x0010b410
TEST EAX,EAX
SETZ R12B
JMP 0x00128748
LAB_0012873b:
MOV R15,qword ptr [RSP + 0x20]
XOR R12D,R12D
JMP 0x00128748
LAB_00128745:
MOV R12B,0x1
LAB_00128748:
LEA RAX,[RSP + 0x30]
CMP R15,RAX
JZ 0x00128762
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
MOV RDI,R15
CALL 0x0010b400
LAB_00128762:
TEST R12B,R12B
JZ 0x00128774
LAB_00128767:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001282b0
LAB_00128774:
LEA RSI,[0x159d80]
MOV RDI,R14
CALL 0x00128282
TEST AL,AL
JZ 0x00128794
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001282fa
LAB_00128794:
LEA RSI,[0x159dc0]
MOV RDI,R14
CALL 0x00128282
TEST AL,AL
JZ 0x001287b4
MOV RDI,RBX
MOV ESI,0xffffffff
CALL 0x001282fa
LAB_001287b4:
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBX + 0x30]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x4
DEC EAX
MOV EDX,dword ptr [RCX]
CMP EDX,EAX
CMOVL EAX,EDX
XOR EDX,EDX
TEST EAX,EAX
CMOVG EDX,EAX
MOV dword ptr [RCX],EDX
CMP EBP,EDX
SETNZ AL
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* ftxui::HorizontalContainer::EventHandler(ftxui::Event) */
int4 __thiscall
ftxui::HorizontalContainer::EventHandler(HorizontalContainer *this,Event *param_2)
{
int iVar1;
size_t sVar2;
long *plVar3;
char cVar4;
int iVar5;
int iVar6;
bool bVar7;
Event aEStack_68 [32];
long *local_48;
size_t local_40;
long local_38 [2];
iVar1 = **(int **)(this + 0x30);
cVar4 = Event::operator==(param_2,(Event *)Event::ArrowLeft);
if (cVar4 == '\0') {
Event::Character(aEStack_68,'h');
plVar3 = local_48;
sVar2 = *(size_t *)(param_2 + 0x28);
if (sVar2 == local_40) {
if (sVar2 == 0) {
bVar7 = true;
}
else {
iVar5 = bcmp(*(void **)(param_2 + 0x20),local_48,sVar2);
bVar7 = iVar5 == 0;
}
}
else {
bVar7 = false;
}
if (plVar3 != local_38) {
operator_delete(plVar3,local_38[0] + 1);
}
if (bVar7) goto LAB_001286e3;
}
else {
LAB_001286e3:
ContainerBase::MoveSelector((ContainerBase *)this,-1);
}
cVar4 = Event::operator==(param_2,(Event *)Event::ArrowRight);
if (cVar4 == '\0') {
Event::Character(aEStack_68,'l');
sVar2 = *(size_t *)(param_2 + 0x28);
if (sVar2 == local_40) {
if (sVar2 == 0) {
bVar7 = true;
}
else {
iVar5 = bcmp(*(void **)(param_2 + 0x20),local_48,sVar2);
bVar7 = iVar5 == 0;
}
}
else {
bVar7 = false;
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
if (!bVar7) goto LAB_00128774;
}
ContainerBase::MoveSelector((ContainerBase *)this,1);
LAB_00128774:
cVar4 = Event::operator==(param_2,(Event *)Event::Tab);
if (cVar4 != '\0') {
ContainerBase::MoveSelectorWrap((ContainerBase *)this,1);
}
cVar4 = Event::operator==(param_2,(Event *)Event::TabReverse);
if (cVar4 != '\0') {
ContainerBase::MoveSelectorWrap((ContainerBase *)this,-1);
}
iVar6 = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 4) + -1;
iVar5 = **(int **)(this + 0x30);
if (iVar5 < iVar6) {
iVar6 = iVar5;
}
iVar5 = 0;
if (0 < iVar6) {
iVar5 = iVar6;
}
**(int **)(this + 0x30) = iVar5;
return CONCAT31((int3)((uint)iVar6 >> 8),iVar1 != iVar5);
}
|
|
4,020 | my_wc_mb_sjis | eloqsql/strings/ctype-sjis.c | static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
} | O3 | c | my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
cmpl $0x7f, %esi
jg 0x5cc66
movl $0x815f, %edi # imm = 0x815F
cmpq $0x5c, %rsi
je 0x5cc9c
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x5ccb6
movb %sil, (%rdx)
jmp 0x5cc95
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x5ccb6
leaq 0x18b838(%rip), %rdi # 0x1e84b0
movzwl (%rdi,%rsi,2), %edi
testl %edi, %edi
je 0x5ccb6
cmpl $0xff, %edi
ja 0x5cc9c
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x5ccb6
movb %dil, (%rdx)
movl $0x1, %eax
jmp 0x5ccb6
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x5ccb6
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
popq %rbp
retq
| my_wc_mb_sjis:
push rbp
mov rbp, rsp
cmp esi, 7Fh
jg short loc_5CC66
mov edi, 815Fh
cmp rsi, 5Ch ; '\'
jz short loc_5CC9C
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_5CCB6
mov [rdx], sil
jmp short loc_5CC95
loc_5CC66:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_5CCB6
lea rdi, unicode_to_sjis
movzx edi, word ptr [rdi+rsi*2]
test edi, edi
jz short loc_5CCB6
cmp edi, 0FFh
ja short loc_5CC9C
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_5CCB6
mov [rdx], dil
loc_5CC95:
mov eax, 1
jmp short loc_5CCB6
loc_5CC9C:
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_5CCB6
rol di, 8
mov [rdx], di
mov eax, 2
loc_5CCB6:
pop rbp
retn
| long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
unsigned int v4; // edi
long long result; // rax
if ( (int)a2 <= 127 )
{
LOWORD(v4) = -32417;
if ( a2 != 92 )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = a2;
return 1LL;
}
LABEL_11:
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*(_WORD *)a3 = __ROL2__(v4, 8);
return 2LL;
}
return result;
}
result = 0LL;
if ( a2 <= 0xFFFF )
{
v4 = unicode_to_sjis[a2];
if ( unicode_to_sjis[a2] )
{
if ( v4 <= 0xFF )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = v4;
return 1LL;
}
goto LABEL_11;
}
}
return result;
}
| my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
CMP ESI,0x7f
JG 0x0015cc66
MOV EDI,0x815f
CMP RSI,0x5c
JZ 0x0015cc9c
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0015ccb6
MOV byte ptr [RDX],SIL
JMP 0x0015cc95
LAB_0015cc66:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x0015ccb6
LEA RDI,[0x2e84b0]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST EDI,EDI
JZ 0x0015ccb6
CMP EDI,0xff
JA 0x0015cc9c
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0015ccb6
MOV byte ptr [RDX],DIL
LAB_0015cc95:
MOV EAX,0x1
JMP 0x0015ccb6
LAB_0015cc9c:
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0015ccb6
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_0015ccb6:
POP RBP
RET
|
int8 my_wc_mb_sjis(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
if ((int)param_2 < 0x80) {
uVar1 = 0x815f;
if (param_2 == 0x5c) {
LAB_0015cc9c:
if (param_4 < param_3 + 1) {
return 0xffffff9a;
}
*param_3 = uVar1 << 8 | uVar1 >> 8;
return 2;
}
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)param_2;
}
else {
if (0xffff < param_2) {
return 0;
}
uVar1 = *(ushort *)(unicode_to_sjis + param_2 * 2);
if (uVar1 == 0) {
return 0;
}
if (0xff < uVar1) goto LAB_0015cc9c;
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)uVar1;
}
return 1;
}
|
|
4,021 | my_like_range_win1250ch | eloqsql/strings/ctype-win1250ch.c | static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
} | O0 | c | my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x50(%rbp)
movl %ecx, %eax
movl -0x50(%rbp), %ecx
movl %eax, -0x4c(%rbp)
movq %rdx, %rax
movl -0x4c(%rbp), %edx
movq %rax, -0x48(%rbp)
movq %rsi, %rax
movq -0x48(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq %rdi, %r8
movq -0x40(%rbp), %rdi
movb %r9b, %al
movq 0x30(%rbp), %r9
movq 0x28(%rbp), %r9
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %dl, -0x19(%rbp)
movb %cl, -0x1a(%rbp)
movb %al, -0x1b(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x51(%rbp)
je 0x6d79c
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x6d7a8
jmp 0x6d866
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6d7d3
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
je 0x6d7d3
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6d7f5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
je 0x6d7f1
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1b(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6d7f3
jmp 0x6d866
jmp 0x6d7f5
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x14a089(%rip), %rax # 0x1b7890
movb (%rax,%rcx), %cl
movq 0x18(%rbp), %rax
movb %cl, (%rax)
movq 0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x6d823
movl $0x0, -0x20(%rbp)
movq 0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x319a5f(%rip), %rax # 0x3872a0
movb (%rax,%rcx), %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6d77f
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6d889
movq 0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6d894
movq 0x10(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x6d8cf
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x20, (%rax)
movq 0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rbp)
movb $-0x1, (%rax)
jmp 0x6d89f
movl -0x20(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| my_like_range_win1250ch:
push rbp
mov rbp, rsp
mov [rbp+var_50], r8d
mov eax, ecx
mov ecx, [rbp+var_50]
mov [rbp+var_4C], eax
mov rax, rdx
mov edx, [rbp+var_4C]
mov [rbp+var_48], rax
mov rax, rsi
mov rsi, [rbp+var_48]
mov [rbp+var_40], rax
mov r8, rdi
mov rdi, [rbp+var_40]
mov al, r9b
mov r9, [rbp+arg_20]
mov r9, [rbp+arg_18]
mov r9, [rbp+arg_10]
mov r9, [rbp+arg_8]
mov r9, [rbp+arg_0]
mov [rbp+var_8], r8
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], dl
mov [rbp+var_1A], cl
mov [rbp+var_1B], al
mov [rbp+var_20], 1
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+arg_8]
mov [rbp+var_30], rax
mov rax, [rbp+arg_8]
add rax, [rbp+arg_0]
mov [rbp+var_38], rax
loc_6D77F:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_51], al
jz short loc_6D79C
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
setnz al
mov [rbp+var_51], al
loc_6D79C:
mov al, [rbp+var_51]
test al, 1
jnz short loc_6D7A8
jmp loc_6D866
loc_6D7A8:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_19]
cmp eax, ecx
jnz short loc_6D7D3
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_28]
jz short loc_6D7D3
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_6D7F5
loc_6D7D3:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1A]
cmp eax, ecx
jz short loc_6D7F1
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1B]
cmp eax, ecx
jnz short loc_6D7F3
loc_6D7F1:
jmp short loc_6D866
loc_6D7F3:
jmp short $+2
loc_6D7F5:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, like_range_prefix_min_win1250ch
mov cl, [rax+rcx]
mov rax, [rbp+arg_8]
mov [rax], cl
mov rax, [rbp+arg_8]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_6D823
mov [rbp+var_20], 0
loc_6D823:
mov rax, [rbp+arg_8]
add rax, 1
mov [rbp+arg_8], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, like_range_prefix_max_win1250ch
mov cl, [rax+rcx]
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_6D77F
loc_6D866:
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
and eax, 10h
cmp eax, 0
jz short loc_6D889
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_30]
sub rcx, rax
mov rax, [rbp+arg_18]
mov [rax], rcx
jmp short loc_6D894
loc_6D889:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_18]
mov [rax], rcx
loc_6D894:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_20]
mov [rax], rcx
loc_6D89F:
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
jz short loc_6D8CF
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 20h ; ' '
mov rax, [rbp+arg_10]
mov rcx, rax
add rcx, 1
mov [rbp+arg_10], rcx
mov byte ptr [rax], 0FFh
jmp short loc_6D89F
loc_6D8CF:
mov eax, [rbp+var_20]
pop rbp
retn
| long long my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
char a4,
char a5,
char a6,
long long a7,
_BYTE *a8,
_BYTE *a9,
_QWORD *a10,
_QWORD *a11)
{
_BYTE *v11; // rax
_BYTE *v12; // rax
_BYTE *v13; // rax
bool v15; // [rsp+1h] [rbp-51h]
_BYTE *v16; // [rsp+1Ah] [rbp-38h]
_BYTE *v17; // [rsp+22h] [rbp-30h]
char *v18; // [rsp+2Ah] [rbp-28h]
unsigned int v19; // [rsp+32h] [rbp-20h]
unsigned __int8 *v20; // [rsp+42h] [rbp-10h]
v20 = a2;
v19 = 1;
v18 = (char *)&a2[a3];
v17 = a8;
v16 = &a8[a7];
while ( 1 )
{
v15 = 0;
if ( v20 != (unsigned __int8 *)v18 )
v15 = a8 != v16;
if ( !v15 )
break;
if ( (char)*v20 != a4 || v20 + 1 == (unsigned __int8 *)v18 )
{
if ( (char)*v20 == a5 || (char)*v20 == a6 )
break;
}
else
{
++v20;
}
*a8 = like_range_prefix_min_win1250ch[*v20];
if ( *a8 != 32 )
v19 = 0;
++a8;
v11 = a9++;
*v11 = like_range_prefix_max_win1250ch[*v20++];
}
if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 )
*a10 = a8 - v17;
else
*a10 = a7;
*a11 = a7;
while ( a8 != v16 )
{
v12 = a8++;
*v12 = 32;
v13 = a9++;
*v13 = -1;
}
return v19;
}
| my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x50],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x4c]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,RSI
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV R8,RDI
MOV RDI,qword ptr [RBP + -0x40]
MOV AL,R9B
MOV R9,qword ptr [RBP + 0x30]
MOV R9,qword ptr [RBP + 0x28]
MOV R9,qword ptr [RBP + 0x20]
MOV R9,qword ptr [RBP + 0x18]
MOV R9,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],DL
MOV byte ptr [RBP + -0x1a],CL
MOV byte ptr [RBP + -0x1b],AL
MOV dword ptr [RBP + -0x20],0x1
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_0016d77f:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x51],AL
JZ 0x0016d79c
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
SETNZ AL
MOV byte ptr [RBP + -0x51],AL
LAB_0016d79c:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x0016d7a8
JMP 0x0016d866
LAB_0016d7a8:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x19]
CMP EAX,ECX
JNZ 0x0016d7d3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x0016d7d3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016d7f5
LAB_0016d7d3:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1a]
CMP EAX,ECX
JZ 0x0016d7f1
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1b]
CMP EAX,ECX
JNZ 0x0016d7f3
LAB_0016d7f1:
JMP 0x0016d866
LAB_0016d7f3:
JMP 0x0016d7f5
LAB_0016d7f5:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x2b7890]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + 0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0016d823
MOV dword ptr [RBP + -0x20],0x0
LAB_0016d823:
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,0x1
MOV qword ptr [RBP + 0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x4872a0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016d77f
LAB_0016d866:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0016d889
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x30]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
JMP 0x0016d894
LAB_0016d889:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
LAB_0016d894:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],RCX
LAB_0016d89f:
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0016d8cf
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x20
MOV RAX,qword ptr [RBP + 0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x20],RCX
MOV byte ptr [RAX],0xff
JMP 0x0016d89f
LAB_0016d8cf:
MOV EAX,dword ptr [RBP + -0x20]
POP RBP
RET
|
int4
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,char *param_8,int1 *param_9,long *param_10,long *param_11)
{
char *pcVar1;
char *pcVar2;
int4 local_28;
byte *local_18;
pcVar1 = param_8;
local_28 = 1;
pcVar2 = param_8 + param_7;
for (local_18 = param_2; local_18 != param_2 + param_3 && param_8 != pcVar2;
local_18 = local_18 + 1) {
if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) {
local_18 = local_18 + 1;
}
else if ((*local_18 == param_5) || (*local_18 == param_6)) break;
*param_8 = like_range_prefix_min_win1250ch[*local_18];
if (*param_8 != ' ') {
local_28 = 0;
}
param_8 = param_8 + 1;
*param_9 = like_range_prefix_max_win1250ch[*local_18];
param_9 = param_9 + 1;
}
if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) {
*param_10 = param_7;
}
else {
*param_10 = (long)param_8 - (long)pcVar1;
}
*param_11 = param_7;
while (param_8 != pcVar2) {
*param_8 = ' ';
*param_9 = 0xff;
param_8 = param_8 + 1;
param_9 = param_9 + 1;
}
return local_28;
}
|
|
4,022 | translog_scanner_set_last_page | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_scanner_set_last_page(TRANSLOG_SCANNER_DATA *scanner)
{
my_bool page_ok;
if (LSN_FILE_NO(scanner->page_addr) == LSN_FILE_NO(scanner->horizon))
{
/* It is last file => we can easy find last page address by horizon */
uint pagegrest= LSN_OFFSET(scanner->horizon) % TRANSLOG_PAGE_SIZE;
scanner->last_file_page= (scanner->horizon -
(pagegrest ? pagegrest : TRANSLOG_PAGE_SIZE));
return (0);
}
scanner->last_file_page= scanner->page_addr;
return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok, 0));
} | O3 | c | translog_scanner_set_last_page:
movq 0x2000(%rdi), %rcx
movq 0x2008(%rdi), %rax
movq %rax, %rdx
xorq %rcx, %rdx
shrq $0x20, %rdx
jne 0x67603
movl %eax, %ecx
andl $0x1fff, %ecx # imm = 0x1FFF
movl $0x2000, %edx # imm = 0x2000
cmovnel %ecx, %edx
subq %rdx, %rax
movq %rax, 0x2010(%rdi)
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rcx, 0x2010(%rdi)
addq $0x2010, %rdi # imm = 0x2010
leaq -0x1(%rbp), %rsi
xorl %edx, %edx
callq 0x658b6
addq $0x10, %rsp
popq %rbp
retq
| translog_scanner_set_last_page:
mov rcx, [rdi+2000h]
mov rax, [rdi+2008h]
mov rdx, rax
xor rdx, rcx
shr rdx, 20h
jnz short loc_67603
mov ecx, eax
and ecx, 1FFFh
mov edx, 2000h
cmovnz edx, ecx
sub rax, rdx
mov [rdi+2010h], rax
xor eax, eax
retn
loc_67603:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rdi+2010h], rcx
add rdi, 2010h
lea rsi, [rbp-1]
xor edx, edx
call translog_get_last_page_addr
add rsp, 10h
pop rbp
retn
| char translog_scanner_set_last_page(_QWORD *a1)
{
long long v1; // rcx
unsigned long long v2; // rax
long long v3; // rdx
bool v5; // [rsp-9h] [rbp-9h] BYREF
v1 = a1[1024];
v2 = a1[1025];
if ( (v1 ^ v2) >> 32 )
{
a1[1026] = v1;
return translog_get_last_page_addr(a1 + 1026, &v5, 0);
}
else
{
v3 = 0x2000LL;
if ( (v2 & 0x1FFF) != 0 )
v3 = v2 & 0x1FFF;
a1[1026] = v2 - v3;
return 0;
}
}
| translog_scanner_set_last_page:
MOV RCX,qword ptr [RDI + 0x2000]
MOV RAX,qword ptr [RDI + 0x2008]
MOV RDX,RAX
XOR RDX,RCX
SHR RDX,0x20
JNZ 0x00167603
MOV ECX,EAX
AND ECX,0x1fff
MOV EDX,0x2000
CMOVNZ EDX,ECX
SUB RAX,RDX
MOV qword ptr [RDI + 0x2010],RAX
XOR EAX,EAX
RET
LAB_00167603:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RDI + 0x2010],RCX
ADD RDI,0x2010
LEA RSI,[RBP + -0x1]
XOR EDX,EDX
CALL 0x001658b6
ADD RSP,0x10
POP RBP
RET
|
int8 translog_scanner_set_last_page(long param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int1 local_9;
uVar1 = *(ulong *)(param_1 + 0x2008);
if ((uVar1 ^ *(ulong *)(param_1 + 0x2000)) >> 0x20 == 0) {
uVar3 = 0x2000;
if ((uVar1 & 0x1fff) != 0) {
uVar3 = uVar1 & 0x1fff;
}
*(ulong *)(param_1 + 0x2010) = uVar1 - uVar3;
return 0;
}
*(ulong *)(param_1 + 0x2010) = *(ulong *)(param_1 + 0x2000);
uVar2 = translog_get_last_page_addr(param_1 + 0x2010,&local_9,0);
return uVar2;
}
|
|
4,023 | CLI::App::add_option(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> ()>) | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE Option *App::add_option(std::string option_name,
callback_t option_callback,
std::string option_description,
bool defaulted,
std::function<std::string()> func) {
Option myopt{option_name, option_description, option_callback, this};
if(std::find_if(std::begin(options_), std::end(options_), [&myopt](const Option_p &v) { return *v == myopt; }) ==
std::end(options_)) {
options_.emplace_back();
Option_p &option = options_.back();
option.reset(new Option(option_name, option_description, option_callback, this));
// Set the default string capture function
option->default_function(func);
// For compatibility with CLI11 1.7 and before, capture the default string here
if(defaulted)
option->capture_default_str();
// Transfer defaults to the new option
option_defaults_.copy_to(option.get());
// Don't bother to capture if we already did
if(!defaulted && option->get_always_capture_default())
option->capture_default_str();
return option.get();
}
// we know something matches now find what it is so we can produce more error information
for(auto &opt : options_) {
const auto &matchname = opt->matching_name(myopt);
if(!matchname.empty()) {
throw(OptionAlreadyAdded("added option matched existing option name: " + matchname));
}
}
// this line should not be reached the above loop should trigger the throw
throw(OptionAlreadyAdded("added option matched existing option name")); // LCOV_EXCL_LINE
} | O3 | cpp | CLI::App::add_option(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> ()>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp # imm = 0x368
movq %r9, 0x30(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x177be
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x177be
leaq 0xb8(%rsp), %rdi
movq %r13, %rsi
callq 0x1b608
leaq 0x118(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq %r14, %r8
callq 0x1b666
movq 0xc8(%rsp), %rax
testq %rax, %rax
je 0x1a5a3
leaq 0xb8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a5ba
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a5d4
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0xd8(%r14), %rdi
movq 0xe0(%r14), %rsi
leaq 0x118(%rsp), %rdx
callq 0x1cd54
leaq 0xd8(%r14), %rdi
movq 0xe0(%r14), %r12
cmpq %r12, %rax
jne 0x1a77e
cmpq 0xe8(%r14), %rax
je 0x1a624
movq $0x0, (%r12)
addq $0x8, %r12
movq %r12, 0xe0(%r14)
jmp 0x1a633
movq %r12, %rsi
callq 0x1ce66
movq 0xe0(%r14), %r12
movl $0x250, %edi # imm = 0x250
callq 0x7420
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x177be
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x177be
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0x1b608
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x98(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %r8
callq 0x1b666
addq $-0x8, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1983a
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x1a6d6
leaq 0x98(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a6ed
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1a709
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7430
movl $0x148, %edi # imm = 0x148
addq (%r12), %rdi
movq 0x30(%rsp), %rsi
callq 0x1cfce
cmpb $0x0, 0xc(%rsp)
je 0x1a72c
movq (%r12), %rdi
callq 0x1bb2e
addq $0xb0, %r14
movq (%r12), %rsi
movq %r14, %rdi
callq 0x1bb8c
movq (%r12), %rbx
cmpb $0x0, 0xc(%rsp)
jne 0x1a75c
cmpb $0x1, 0x26(%rbx)
jne 0x1a75c
movq %rbx, %rdi
callq 0x1bb2e
movq (%r12), %rbx
leaq 0x118(%rsp), %rdi
callq 0x1985e
movq %rbx, %rax
addq $0x368, %rsp # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rdi), %r15
cmpq %r12, %r15
je 0x1a7ac
leaq 0x118(%rsp), %rbx
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x1bc08
movq %rax, %r14
cmpq $0x0, 0x8(%rax)
jne 0x1a80d
addq $0x8, %r15
cmpq %r12, %r15
jne 0x1a78e
movl $0x38, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1ce8e(%rip), %rsi # 0x3765a
leaq 0x1ceb0(%rip), %rdx # 0x37683
leaq 0xd8(%rsp), %rdi
callq 0x11f90
movb $0x1, %bpl
leaq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be52
xorl %ebp, %ebp
leaq 0x2edb4(%rip), %rsi # 0x495b0
leaq 0xf0a3(%rip), %rdx # 0x298a6
movq %rbx, %rdi
callq 0x7750
jmp 0x1a85c
movl $0x38, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x1ce0d(%rip), %rsi # 0x3762e
leaq 0xf8(%rsp), %rdi
movq %r14, %rdx
callq 0x11e48
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be52
xorl %ebp, %ebp
leaq 0x2ed63(%rip), %rsi # 0x495b0
leaq 0xf052(%rip), %rdx # 0x298a6
movq %rbx, %rdi
callq 0x7750
movq %rax, %r14
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a8a1
movq 0x108(%rsp), %rsi
jmp 0x1a899
jmp 0x1a8ab
jmp 0x1a9a8
movq %rax, %r14
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a8a1
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x7430
testb %bpl, %bpl
jne 0x1a8ae
jmp 0x1a9ab
movq %rax, %r14
movq %rbx, %rdi
callq 0x7310
jmp 0x1a9ab
jmp 0x1a9a8
jmp 0x1a965
jmp 0x1a965
movq %rax, %r14
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x1a8f3
leaq 0x98(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1a8f3
jmp 0x1a965
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a90f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1a90f
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1a930
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1a930
movq %rax, %r14
movl $0x250, %esi # imm = 0x250
movq %rbx, %rdi
callq 0x7430
jmp 0x1a9ab
jmp 0x1a9a8
movq %rax, %r14
movq 0xc8(%rsp), %rax
testq %rax, %rax
je 0x1a970
leaq 0xb8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1a970
movq %rax, %rdi
callq 0xc95c
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a98c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1a98c
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a9b8
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1a9b8
movq %rax, %r14
leaq 0x118(%rsp), %rdi
callq 0x1985e
movq %r14, %rdi
callq 0x7780
| _ZN3CLI3App10add_optionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbRKSt6vectorIS6_SaIS6_EEEES6_bS7_IFS6_vEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 368h
mov qword ptr [rsp+398h+var_368], r9; int
mov [rsp+398h+var_38C], r8d
mov rbp, rcx
mov r13, rdx
mov r15, rsi
mov r14, rdi
lea rbx, [rsp+398h+var_310]
mov [rbx-10h], rbx
mov rsi, [rsi]
mov rdx, [r15+8]
add rdx, rsi
lea rdi, [rsp+398h+var_320]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r12, [rsp+398h+var_330]
mov [r12-10h], r12
mov rsi, [rbp+0]
mov rdx, [rbp+8]
add rdx, rsi
lea rdi, [rsp+398h+var_340]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+398h+var_2E0]
mov rsi, r13
call _ZNSt8functionIFbRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEEC2ERKSC_; std::function<bool ()(std::vector<std::string> const&)>::function(std::function<bool ()(std::vector<std::string> const&)> const&)
lea rdi, [rsp+398h+var_280]
lea rsi, [rsp+398h+var_320]
lea rdx, [rsp+398h+var_340]
lea rcx, [rsp+398h+var_2E0]
mov r8, r14
call _ZN3CLI6OptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_St8functionIFbRKSt6vectorIS6_SaIS6_EEEEPNS_3AppE; CLI::Option::Option(std::string,std::string,std::function<bool ()(std::vector<std::string> const&)>,CLI::App *)
mov rax, [rsp+398h+var_2D0]
test rax, rax
jz short loc_1A5A3
lea rdi, [rsp+398h+var_2E0]
mov rsi, rdi
mov edx, 3
call rax
loc_1A5A3:
mov rdi, [rsp+398h+var_340]; void *
cmp rdi, r12
jz short loc_1A5BA
mov rsi, [rsp+398h+var_330]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A5BA:
mov rdi, [rsp+398h+var_320]; void *
cmp rdi, rbx
jz short loc_1A5D4
mov rsi, [rsp+398h+var_310]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A5D4:
mov rdi, [r14+0D8h]
mov rsi, [r14+0E0h]
lea rdx, [rsp+398h+var_280]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZNS3_3App10add_optionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbRKS9_ISL_SaISL_EEEESL_bSM_IFSL_vEEEUlRKS7_E_EEET_SZ_SZ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::add_option(std::string,std::function<bool ()(std::vector const&<std::string,std::allocator<std::string>>)>,std::string,bool,std::function<std::string ()(void)>)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::add_option(std::string,std::function<bool ()(std::vector const&<std::string,std::allocator<std::string>>)>,std::string,bool,std::function<std::string ()(void)>)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>,std::random_access_iterator_tag)
lea rdi, [r14+0D8h]
mov r12, [r14+0E0h]
cmp rax, r12
jnz loc_1A77E
cmp rax, [r14+0E8h]
jz short loc_1A624
mov qword ptr [r12], 0
add r12, 8
mov [r14+0E0h], r12
jmp short loc_1A633
loc_1A624:
mov rsi, r12
call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_; std::vector<std::unique_ptr<CLI::Option>>::_M_realloc_insert<>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option>*,std::vector<std::unique_ptr<CLI::Option>>>)
mov r12, [r14+0E0h]
loc_1A633:
mov edi, 250h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rax, [rsp+398h+var_378]
mov [rax-10h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
lea rdi, [rsp+398h+var_388]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r15, [rsp+398h+var_350]
mov [r15-10h], r15
mov rsi, [rbp+0]
mov rdx, [rbp+8]
add rdx, rsi
lea rdi, [rsp+398h+var_360]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+398h+var_300]
mov rsi, r13
call _ZNSt8functionIFbRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEEC2ERKSC_; std::function<bool ()(std::vector<std::string> const&)>::function(std::function<bool ()(std::vector<std::string> const&)> const&)
lea rsi, [rsp+398h+var_388]
lea rdx, [rsp+398h+var_360]
lea rcx, [rsp+398h+var_300]
mov rdi, rbx
mov r8, r14
call _ZN3CLI6OptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_St8functionIFbRKSt6vectorIS6_SaIS6_EEEEPNS_3AppE; CLI::Option::Option(std::string,std::string,std::function<bool ()(std::vector<std::string> const&)>,CLI::App *)
add r12, 0FFFFFFFFFFFFFFF8h
mov rdi, r12
mov rsi, rbx
call _ZNSt15__uniq_ptr_implIN3CLI6OptionESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<CLI::Option,std::default_delete<CLI::Option>>::reset(CLI::Option*)
mov rax, [rsp+398h+var_2F0]
test rax, rax
jz short loc_1A6D6
lea rdi, [rsp+398h+var_300]
mov rsi, rdi
mov edx, 3
call rax
loc_1A6D6:
mov rdi, [rsp+398h+var_360]; void *
cmp rdi, r15
jz short loc_1A6ED
mov rsi, [rsp+398h+var_350]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A6ED:
mov rdi, [rsp+398h+var_388]; void *
lea rax, [rsp+398h+var_378]
cmp rdi, rax
jz short loc_1A709
mov rsi, [rsp+398h+var_378]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A709:
mov edi, 148h
add rdi, [r12]
mov rsi, qword ptr [rsp+398h+var_368]
call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEaSERKS7_; std::function<std::string ()(void)>::operator=(std::function<std::string ()(void)> const&)
cmp byte ptr [rsp+398h+var_38C], 0
jz short loc_1A72C
mov rdi, [r12]; this
call _ZN3CLI6Option19capture_default_strEv; CLI::Option::capture_default_str(void)
loc_1A72C:
add r14, 0B0h
mov rsi, [r12]
mov rdi, r14
call _ZNK3CLI10OptionBaseINS_14OptionDefaultsEE7copy_toINS_6OptionEEEvPT_; CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(CLI::Option *)
mov rbx, [r12]
cmp byte ptr [rsp+398h+var_38C], 0
jnz short loc_1A75C
cmp byte ptr [rbx+26h], 1
jnz short loc_1A75C
mov rdi, rbx; this
call _ZN3CLI6Option19capture_default_strEv; CLI::Option::capture_default_str(void)
mov rbx, [r12]
loc_1A75C:
lea rdi, [rsp+398h+var_280]; this
call _ZN3CLI6OptionD2Ev; CLI::Option::~Option()
mov rax, rbx
add rsp, 368h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1A77E:
mov r15, [rdi]
cmp r15, r12
jz short loc_1A7AC
lea rbx, [rsp+398h+var_280]
loc_1A78E:
mov rdi, [r15]; int
mov rsi, rbx; int
call _ZNK3CLI6Option13matching_nameB5cxx11ERKS0_; CLI::Option::matching_name(CLI::Option const&)
mov r14, rax
cmp qword ptr [rax+8], 0
jnz short loc_1A80D
add r15, 8
cmp r15, r12
jnz short loc_1A78E
loc_1A7AC:
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+398h+var_2B0]
mov [r15-10h], r15
lea rsi, aAddedOptionMat; "added option matched existing option na"...
lea rdx, aAddedOptionMat+29h; ""
lea rdi, [rsp+398h+var_2C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rsi, [rsp+398h+var_2C0]
mov rdi, rbx; int
call _ZN3CLI18OptionAlreadyAddedC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::string)
xor ebp, ebp
lea rsi, _ZTIN3CLI18OptionAlreadyAddedE; lptinfo
lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_1A85C
loc_1A80D:
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aAddedOptionMat_0; "added option matched existing option na"...
lea rdi, [rsp+398h+var_2A0]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+398h+var_2A0]
mov rdi, rbx; int
call _ZN3CLI18OptionAlreadyAddedC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::string)
xor ebp, ebp
lea rsi, _ZTIN3CLI18OptionAlreadyAddedE; lptinfo
lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_1A85C:
mov r14, rax
lea rax, [rsp+398h+var_290]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_1A8A1
mov rsi, [rsp+398h+var_290]
jmp short loc_1A899
jmp short loc_1A8AB
jmp loc_1A9A8
mov r14, rax
mov rdi, [rsp+398h+var_2C0]; void *
cmp rdi, r15
jz short loc_1A8A1
mov rsi, [rsp+398h+var_2B0]
loc_1A899:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A8A1:
test bpl, bpl
jnz short loc_1A8AE
jmp loc_1A9AB
loc_1A8AB:
mov r14, rax
loc_1A8AE:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp loc_1A9AB
jmp loc_1A9A8
jmp loc_1A965
jmp loc_1A965
mov r14, rax
mov rax, [rsp+398h+var_2F0]
test rax, rax
jz short loc_1A8F3
lea rdi, [rsp+398h+var_300]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_1A8F3
jmp short loc_1A965
mov r14, rax
loc_1A8F3:
mov rdi, [rsp+398h+var_360]; void *
cmp rdi, r15
jz short loc_1A90F
mov rsi, [rsp+398h+var_350]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A90F
mov r14, rax
loc_1A90F:
mov rdi, [rsp+398h+var_388]; void *
lea rax, [rsp+398h+var_378]
cmp rdi, rax
jz short loc_1A930
mov rsi, [rsp+398h+var_378]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A930
mov r14, rax
loc_1A930:
mov esi, 250h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A9AB
jmp short loc_1A9A8
mov r14, rax
mov rax, [rsp+398h+var_2D0]
test rax, rax
jz short loc_1A970
lea rdi, [rsp+398h+var_2E0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_1A970
loc_1A965:
mov rdi, rax
call __clang_call_terminate
mov r14, rax
loc_1A970:
mov rdi, [rsp+398h+var_340]; void *
cmp rdi, r12
jz short loc_1A98C
mov rsi, [rsp+398h+var_330]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A98C
mov r14, rax
loc_1A98C:
mov rdi, [rsp+398h+var_320]; void *
cmp rdi, rbx
jz short loc_1A9B8
mov rsi, [rsp+398h+var_310]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A9B8
loc_1A9A8:
mov r14, rax
loc_1A9AB:
lea rdi, [rsp+398h+var_280]; this
call _ZN3CLI6OptionD2Ev; CLI::Option::~Option()
loc_1A9B8:
mov rdi, r14
call __Unwind_Resume
| CLI::Option * CLI::App::add_option(_QWORD *a1, _BYTE **a2, long long a3, _BYTE **a4, int a5, long long a6)
{
long long v9; // rax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
_QWORD **v14; // rdi
_QWORD *v15; // r12
_QWORD *v16; // r12
CLI::Option *v17; // rbx
CLI::Option **v18; // r12
CLI::Option *v19; // rbx
_QWORD *i; // r15
_QWORD *v22; // r14
void *v23; // rbx
void *exception; // rbx
long long v25; // [rsp+0h] [rbp-398h]
long long v26; // [rsp+8h] [rbp-390h]
void *v27; // [rsp+10h] [rbp-388h] BYREF
int v28; // [rsp+18h] [rbp-380h]
long long v29; // [rsp+20h] [rbp-378h] BYREF
int v30; // [rsp+28h] [rbp-370h]
int v31[2]; // [rsp+30h] [rbp-368h]
void *v32[2]; // [rsp+38h] [rbp-360h] BYREF
long long v33; // [rsp+48h] [rbp-350h] BYREF
int v34; // [rsp+50h] [rbp-348h]
void *v35[2]; // [rsp+58h] [rbp-340h] BYREF
_QWORD v36[2]; // [rsp+68h] [rbp-330h] BYREF
void *v37[2]; // [rsp+78h] [rbp-320h] BYREF
_QWORD v38[2]; // [rsp+88h] [rbp-310h] BYREF
_BYTE v39[16]; // [rsp+98h] [rbp-300h] BYREF
void ( *v40)(_BYTE *, _BYTE *, long long); // [rsp+A8h] [rbp-2F0h]
_BYTE v41[16]; // [rsp+B8h] [rbp-2E0h] BYREF
void ( *v42)(_BYTE *, _BYTE *, long long); // [rsp+C8h] [rbp-2D0h]
void *v43; // [rsp+D8h] [rbp-2C0h] BYREF
long long v44; // [rsp+E8h] [rbp-2B0h] BYREF
_BYTE v45[16]; // [rsp+F8h] [rbp-2A0h] BYREF
int v46[160]; // [rsp+118h] [rbp-280h] BYREF
*(_QWORD *)v31 = a6;
HIDWORD(v26) = a5;
v37[0] = v38;
std::string::_M_construct<char *>((long long)v37, *a2, (long long)&a2[1][(_QWORD)*a2]);
v35[0] = v36;
std::string::_M_construct<char *>((long long)v35, *a4, (long long)&a4[1][(_QWORD)*a4]);
std::function<bool ()(std::vector<std::string> const&)>::function(v41, a3);
CLI::Option::Option(v46, v37, v35, v41, a1);
if ( v42 )
v42(v41, v41, 3LL);
if ( v35[0] != v36 )
operator delete(v35[0], v36[0] + 1LL);
if ( v37[0] != v38 )
operator delete(v37[0], v38[0] + 1LL);
v9 = std::__find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::add_option(std::string,std::function<bool ()(std::vector const&<std::string,std::allocator<std::string>>)>,std::string,bool,std::function<std::string ()(void)>)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>>(
a1[27],
a1[28],
v46);
v14 = (_QWORD **)(a1 + 27);
v15 = (_QWORD *)a1[28];
if ( (_QWORD *)v9 != v15 )
{
for ( i = *v14; i != v15; ++i )
{
v22 = (_QWORD *)CLI::Option::matching_name[abi:cxx11](
*i,
(int)v46,
v10,
v11,
v12,
v13,
v25,
v26,
(int)v27,
v28,
v29,
v30,
v31[0],
(int)v32[0],
(long long)v32[1],
v33,
v34,
(int)v35[0],
v35[1]);
if ( v22[1] )
{
exception = __cxa_allocate_exception(0x38uLL);
std::operator+<char>((long long)v45, (long long)"added option matched existing option name: ", v22);
CLI::OptionAlreadyAdded::OptionAlreadyAdded((int)exception, v25, v26);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::OptionAlreadyAdded, CLI::Error::~Error);
}
}
v23 = __cxa_allocate_exception(0x38uLL);
v43 = &v44;
std::string::_M_construct<char const*>((long long)&v43, "added option matched existing option name", (long long)"");
CLI::OptionAlreadyAdded::OptionAlreadyAdded((int)v23, v25, v26);
__cxa_throw(v23, (struct type_info *)&`typeinfo for'CLI::OptionAlreadyAdded, CLI::Error::~Error);
}
if ( v9 == a1[29] )
{
std::vector<std::unique_ptr<CLI::Option>>::_M_realloc_insert<>(v14, a1[28]);
v16 = (_QWORD *)a1[28];
}
else
{
*v15 = 0LL;
v16 = v15 + 1;
a1[28] = v16;
}
v17 = (CLI::Option *)operator new(0x250uLL);
v27 = &v29;
std::string::_M_construct<char *>((long long)&v27, *a2, (long long)&a2[1][(_QWORD)*a2]);
v32[0] = &v33;
std::string::_M_construct<char *>((long long)v32, *a4, (long long)&a4[1][(_QWORD)*a4]);
std::function<bool ()(std::vector<std::string> const&)>::function(v39, a3);
CLI::Option::Option(v17, &v27, v32, v39, a1);
v18 = (CLI::Option **)(v16 - 1);
std::__uniq_ptr_impl<CLI::Option,std::default_delete<CLI::Option>>::reset(v18, v17);
if ( v40 )
v40(v39, v39, 3LL);
if ( v32[0] != &v33 )
operator delete(v32[0], v33 + 1);
if ( v27 != &v29 )
operator delete(v27, v29 + 1);
std::function<std::string ()(void)>::operator=((char *)*v18 + 328, *(_QWORD *)v31);
if ( BYTE4(v26) )
CLI::Option::capture_default_str(*v18);
CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(a1 + 22, *v18);
v19 = *v18;
if ( !BYTE4(v26) && *((_BYTE *)v19 + 38) == 1 )
{
CLI::Option::capture_default_str(*v18);
v19 = *v18;
}
CLI::Option::~Option((CLI::Option *)v46);
return v19;
}
| add_option:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x368
MOV qword ptr [RSP + 0x30],R9
MOV dword ptr [RSP + 0xc],R8D
MOV RBP,RCX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RSP + 0x88]
MOV qword ptr [RBX + -0x10],RBX
MOV RSI,qword ptr [RSI]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LEA RDI,[RSP + 0x78]
CALL 0x001177be
LEA R12,[RSP + 0x68]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
ADD RDX,RSI
LAB_0011a548:
LEA RDI,[RSP + 0x58]
CALL 0x001177be
LAB_0011a552:
LEA RDI,[RSP + 0xb8]
MOV RSI,R13
CALL 0x0011b608
LAB_0011a562:
LEA RDI,[RSP + 0x118]
LEA RSI,[RSP + 0x78]
LEA RDX,[RSP + 0x58]
LEA RCX,[RSP + 0xb8]
MOV R8,R14
CALL 0x0011b666
MOV RAX,qword ptr [RSP + 0xc8]
TEST RAX,RAX
JZ 0x0011a5a3
LAB_0011a591:
LEA RDI,[RSP + 0xb8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0011a5a3:
MOV RDI,qword ptr [RSP + 0x58]
CMP RDI,R12
JZ 0x0011a5ba
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x00107430
LAB_0011a5ba:
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,RBX
JZ 0x0011a5d4
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x00107430
LAB_0011a5d4:
MOV RDI,qword ptr [R14 + 0xd8]
MOV RSI,qword ptr [R14 + 0xe0]
LAB_0011a5e2:
LEA RDX,[RSP + 0x118]
CALL 0x0011cd54
LEA RDI,[R14 + 0xd8]
MOV R12,qword ptr [R14 + 0xe0]
CMP RAX,R12
JNZ 0x0011a77e
CMP RAX,qword ptr [R14 + 0xe8]
JZ 0x0011a624
MOV qword ptr [R12],0x0
ADD R12,0x8
MOV qword ptr [R14 + 0xe0],R12
JMP 0x0011a633
LAB_0011a624:
MOV RSI,R12
CALL 0x0011ce66
MOV R12,qword ptr [R14 + 0xe0]
LAB_0011a633:
MOV EDI,0x250
CALL 0x00107420
MOV RBX,RAX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_0011a653:
LEA RDI,[RSP + 0x10]
CALL 0x001177be
LEA R15,[RSP + 0x48]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
ADD RDX,RSI
LAB_0011a671:
LEA RDI,[RSP + 0x38]
CALL 0x001177be
LAB_0011a67b:
LEA RDI,[RSP + 0x98]
MOV RSI,R13
CALL 0x0011b608
LAB_0011a68b:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x38]
LEA RCX,[RSP + 0x98]
MOV RDI,RBX
MOV R8,R14
CALL 0x0011b666
ADD R12,-0x8
MOV RDI,R12
MOV RSI,RBX
CALL 0x0011983a
MOV RAX,qword ptr [RSP + 0xa8]
TEST RAX,RAX
JZ 0x0011a6d6
LAB_0011a6c4:
LEA RDI,[RSP + 0x98]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0011a6d6:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x0011a6ed
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00107430
LAB_0011a6ed:
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x0011a709
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00107430
LAB_0011a709:
MOV EDI,0x148
ADD RDI,qword ptr [R12]
LAB_0011a712:
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0011cfce
CMP byte ptr [RSP + 0xc],0x0
JZ 0x0011a72c
MOV RDI,qword ptr [R12]
CALL 0x0011bb2e
LAB_0011a72c:
ADD R14,0xb0
MOV RSI,qword ptr [R12]
MOV RDI,R14
CALL 0x0011bb8c
MOV RBX,qword ptr [R12]
CMP byte ptr [RSP + 0xc],0x0
JNZ 0x0011a75c
CMP byte ptr [RBX + 0x26],0x1
JNZ 0x0011a75c
MOV RDI,RBX
CALL 0x0011bb2e
MOV RBX,qword ptr [R12]
LAB_0011a75c:
LEA RDI,[RSP + 0x118]
CALL 0x0011985e
MOV RAX,RBX
ADD RSP,0x368
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011a77e:
MOV R15,qword ptr [RDI]
CMP R15,R12
JZ 0x0011a7ac
LEA RBX,[RSP + 0x118]
LAB_0011a78e:
MOV RDI,qword ptr [R15]
LAB_0011a791:
MOV RSI,RBX
CALL 0x0011bc08
LAB_0011a799:
MOV R14,RAX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0011a80d
ADD R15,0x8
CMP R15,R12
JNZ 0x0011a78e
LAB_0011a7ac:
MOV EDI,0x38
CALL 0x001071d0
MOV RBX,RAX
LEA R15,[RSP + 0xe8]
MOV qword ptr [R15 + -0x10],R15
LAB_0011a7c5:
LEA RSI,[0x13765a]
LEA RDX,[0x137683]
LEA RDI,[RSP + 0xd8]
CALL 0x00111f90
MOV BPL,0x1
LAB_0011a7e3:
LEA RSI,[RSP + 0xd8]
MOV RDI,RBX
CALL 0x0011be52
XOR EBP,EBP
LEA RSI,[0x1495b0]
LEA RDX,[0x1298a6]
MOV RDI,RBX
CALL 0x00107750
LAB_0011a80d:
MOV EDI,0x38
CALL 0x001071d0
MOV RBX,RAX
LAB_0011a81a:
LEA RSI,[0x13762e]
LEA RDI,[RSP + 0xf8]
MOV RDX,R14
CALL 0x00111e48
MOV BPL,0x1
LAB_0011a834:
LEA RSI,[RSP + 0xf8]
MOV RDI,RBX
CALL 0x0011be52
XOR EBP,EBP
LEA RSI,[0x1495b0]
LEA RDX,[0x1298a6]
MOV RDI,RBX
CALL 0x00107750
|
/* CLI::App::add_option(std::__cxx11::string, std::function<bool (std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&)>, std::__cxx11::string, bool,
std::function<std::__cxx11::string ()>) */
Option * __thiscall
CLI::App::add_option
(App *this,long *param_2,function *param_3,long *param_4,char param_5,function *param_6)
{
int8 *puVar1;
Option *pOVar2;
long lVar3;
OptionAlreadyAdded *pOVar4;
int8 *puVar5;
__uniq_ptr_impl<CLI::Option,std::default_delete<CLI::Option>> *this_00;
long *local_388 [2];
long local_378 [2];
function *local_368;
long *local_360 [2];
long local_350 [2];
long *local_340 [2];
long local_330 [2];
long *local_320 [2];
long local_310 [2];
function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>
local_300 [16];
code *local_2f0;
function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>
local_2e0 [16];
code *local_2d0;
int1 *local_2c0 [2];
int1 local_2b0 [16];
char local_2a0 [32];
Option local_280 [592];
local_368 = param_6;
local_320[0] = local_310;
std::__cxx11::string::_M_construct<char*>(local_320,*param_2,param_2[1] + *param_2);
/* try { // try from 0011a548 to 0011a551 has its CatchHandler @ 0011a989 */
local_340[0] = local_330;
std::__cxx11::string::_M_construct<char*>(local_340,*param_4,param_4[1] + *param_4);
/* try { // try from 0011a552 to 0011a561 has its CatchHandler @ 0011a96d */
std::function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>
::function(local_2e0,param_3);
/* try { // try from 0011a562 to 0011a583 has its CatchHandler @ 0011a941 */
Option::Option(local_280,local_320,local_340,local_2e0,this);
if (local_2d0 != (code *)0x0) {
/* try { // try from 0011a591 to 0011a5a2 has its CatchHandler @ 0011a8c5 */
(*local_2d0)(local_2e0,local_2e0,3);
}
if (local_340[0] != local_330) {
operator_delete(local_340[0],local_330[0] + 1);
}
if (local_320[0] != local_310) {
operator_delete(local_320[0],local_310[0] + 1);
}
/* try { // try from 0011a5e2 to 0011a5ee has its CatchHandler @ 0011a93f */
puVar1 = (int8 *)
std::
__find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::add_option(std::__cxx11::string,std::function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>,std::__cxx11::string,bool,std::function<std::__cxx11::string()>)::_lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)_1_>>
(*(int8 *)(this + 0xd8),*(int8 *)(this + 0xe0),local_280);
puVar5 = *(int8 **)(this + 0xe0);
if (puVar1 == puVar5) {
if (puVar1 == *(int8 **)(this + 0xe8)) {
/* try { // try from 0011a624 to 0011a62b has its CatchHandler @ 0011a8bb */
std::
vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
::_M_realloc_insert<>
((vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
*)(this + 0xd8),puVar5);
puVar5 = *(int8 **)(this + 0xe0);
}
else {
*puVar5 = 0;
puVar5 = puVar5 + 1;
*(int8 **)(this + 0xe0) = puVar5;
}
/* try { // try from 0011a633 to 0011a63c has its CatchHandler @ 0011a9a8 */
pOVar2 = (Option *)operator_new(0x250);
local_388[0] = local_378;
/* try { // try from 0011a653 to 0011a65c has its CatchHandler @ 0011a92d */
std::__cxx11::string::_M_construct<char*>(local_388,*param_2,param_2[1] + *param_2);
/* try { // try from 0011a671 to 0011a67a has its CatchHandler @ 0011a90c */
local_360[0] = local_350;
std::__cxx11::string::_M_construct<char*>(local_360,*param_4,param_4[1] + *param_4);
/* try { // try from 0011a67b to 0011a68a has its CatchHandler @ 0011a8f0 */
std::
function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>::
function(local_300,param_3);
/* try { // try from 0011a68b to 0011a6a7 has its CatchHandler @ 0011a8ca */
Option::Option(pOVar2,local_388,local_360,local_300,this);
this_00 = (__uniq_ptr_impl<CLI::Option,std::default_delete<CLI::Option>> *)(puVar5 + -1);
std::__uniq_ptr_impl<CLI::Option,std::default_delete<CLI::Option>>::reset(this_00,pOVar2);
if (local_2f0 != (code *)0x0) {
/* try { // try from 0011a6c4 to 0011a6d5 has its CatchHandler @ 0011a8c0 */
(*local_2f0)(local_300,local_300,3);
}
if (local_360[0] != local_350) {
operator_delete(local_360[0],local_350[0] + 1);
}
if (local_388[0] != local_378) {
operator_delete(local_388[0],local_378[0] + 1);
}
/* try { // try from 0011a712 to 0011a757 has its CatchHandler @ 0011a9a8 */
std::function<std::__cxx11::string()>::operator=
((function<std::__cxx11::string()> *)(*(long *)this_00 + 0x148),local_368);
if (param_5 != '\0') {
Option::capture_default_str(*(Option **)this_00);
}
OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>
((OptionBase<CLI::OptionDefaults> *)(this + 0xb0),*(Option **)this_00);
pOVar2 = *(Option **)this_00;
if ((param_5 == '\0') && (pOVar2[0x26] == (Option)0x1)) {
Option::capture_default_str(pOVar2);
pOVar2 = *(Option **)this_00;
}
Option::~Option(local_280);
return pOVar2;
}
puVar1 = *(int8 **)(this + 0xd8);
if (puVar1 != puVar5) {
do {
/* try { // try from 0011a791 to 0011a798 has its CatchHandler @ 0011a87c */
lVar3 = Option::matching_name_abi_cxx11_((Option *)*puVar1,local_280);
if (*(long *)(lVar3 + 8) != 0) {
pOVar4 = (OptionAlreadyAdded *)__cxa_allocate_exception(0x38);
/* try { // try from 0011a81a to 0011a830 has its CatchHandler @ 0011a87a */
std::operator+(local_2a0,(string *)"added option matched existing option name: ");
/* try { // try from 0011a834 to 0011a85b has its CatchHandler @ 0011a85c */
OptionAlreadyAdded::OptionAlreadyAdded(pOVar4,local_2a0);
/* WARNING: Subroutine does not return */
__cxa_throw(pOVar4,&OptionAlreadyAdded::typeinfo,Error::~Error);
}
puVar1 = puVar1 + 1;
} while (puVar1 != puVar5);
}
pOVar4 = (OptionAlreadyAdded *)__cxa_allocate_exception(0x38);
local_2c0[0] = local_2b0;
/* try { // try from 0011a7c5 to 0011a7df has its CatchHandler @ 0011a8ab */
std::__cxx11::string::_M_construct<char_const*>
(local_2c0,"added option matched existing option name","");
/* try { // try from 0011a7e3 to 0011a80a has its CatchHandler @ 0011a881 */
OptionAlreadyAdded::OptionAlreadyAdded(pOVar4,local_2c0);
/* WARNING: Subroutine does not return */
__cxa_throw(pOVar4,&OptionAlreadyAdded::typeinfo,Error::~Error);
}
|
|
4,024 | my_fprintf | eloqsql/strings/my_vsnprintf.c | int my_fprintf(FILE *stream, const char* format, ...)
{
int result;
va_list args;
va_start(args, format);
result= my_vfprintf(stream, format, args);
va_end(args);
return result;
} | O0 | c | my_fprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xd8bb8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xd89d0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
| my_fprintf:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_D8BB8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_D8BB8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_E0]
mov [rbp+var_20], rax
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_2C], 30h ; '0'
mov [rbp+var_30], 10h
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call my_vfprintf
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 0E0h
pop rbp
retn
| long long my_fprintf(
long long a1,
char *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
int v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
return (unsigned int)my_vfprintf(a1, a2, v29);
}
| my_fprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001d8bb8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001d8bb8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0xe0]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x2c],0x30
MOV dword ptr [RBP + -0x30],0x10
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x001d89d0
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0xe0
POP RBP
RET
|
int4
my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 uVar1;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vfprintf(param_9,param_10,&local_38);
return uVar1;
}
|
|
4,025 | GenImageGradientSquare | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer)
{
Color *pixels = (Color *)RL_MALLOC(width*height*sizeof(Color));
float centerX = (float)width/2.0f;
float centerY = (float)height/2.0f;
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
// Calculate the Manhattan distance from the center
float distX = fabsf(x - centerX);
float distY = fabsf(y - centerY);
// Normalize the distances by the dimensions of the gradient rectangle
float normalizedDistX = distX/centerX;
float normalizedDistY = distY/centerY;
// Calculate the total normalized Manhattan distance
float manhattanDist = fmaxf(normalizedDistX, normalizedDistY);
// Subtract the density from the manhattanDist, then divide by (1 - density)
// This makes the gradient start from the center when density is 0, and from the edge when density is 1
float factor = (manhattanDist - density)/(1.0f - density);
// Clamp the factor between 0 and 1
factor = fminf(fmaxf(factor, 0.0f), 1.0f);
// Blend the colors based on the calculated factor
pixels[y*width + x].r = (int)((float)outer.r*factor + (float)inner.r*(1.0f - factor));
pixels[y*width + x].g = (int)((float)outer.g*factor + (float)inner.g*(1.0f - factor));
pixels[y*width + x].b = (int)((float)outer.b*factor + (float)inner.b*(1.0f - factor));
pixels[y*width + x].a = (int)((float)outer.a*factor + (float)inner.a*(1.0f - factor));
}
}
Image image = {
.data = pixels,
.width = width,
.height = height,
.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8,
.mipmaps = 1
};
return image;
} | O3 | c | GenImageGradientSquare:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r12d
movl %ecx, %r15d
movss %xmm0, 0xc(%rsp)
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %edx, %eax
imull %esi, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0xa6f0
movss 0xc(%rsp), %xmm13
testl %ebp, %ebp
jle 0x936c2
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movss 0x405bc(%rip), %xmm2 # 0xd3b58
mulss %xmm2, %xmm0
cvtsi2ss %ebp, %xmm1
mulss %xmm2, %xmm1
movd %r12d, %xmm4
movd %r15d, %xmm5
movss 0x40562(%rip), %xmm2 # 0xd3b1c
movaps %xmm2, %xmm3
subss %xmm13, %xmm3
pxor %xmm6, %xmm6
punpcklbw %xmm6, %xmm4 # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1],xmm4[2],xmm6[2],xmm4[3],xmm6[3],xmm4[4],xmm6[4],xmm4[5],xmm6[5],xmm4[6],xmm6[6],xmm4[7],xmm6[7]
punpcklwd %xmm6, %xmm4 # xmm4 = xmm4[0],xmm6[0],xmm4[1],xmm6[1],xmm4[2],xmm6[2],xmm4[3],xmm6[3]
cvtdq2ps %xmm4, %xmm4
punpcklbw %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3],xmm5[4],xmm6[4],xmm5[5],xmm6[5],xmm5[6],xmm6[6],xmm5[7],xmm6[7]
punpcklwd %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1],xmm5[2],xmm6[2],xmm5[3],xmm6[3]
cvtdq2ps %xmm5, %xmm5
movl %r14d, %ecx
movl %ebp, %edx
leaq (,%rcx,4), %rsi
xorl %edi, %edi
movaps 0x3bf6e(%rip), %xmm6 # 0xcf560
xorps %xmm7, %xmm7
movdqa 0x49e42(%rip), %xmm8 # 0xdd440
movq %rax, %r8
testl %r14d, %r14d
jle 0x936b3
xorps %xmm9, %xmm9
cvtsi2ss %edi, %xmm9
subss %xmm1, %xmm9
andps %xmm6, %xmm9
divss %xmm1, %xmm9
xorl %r9d, %r9d
xorps %xmm10, %xmm10
cvtsi2ss %r9d, %xmm10
subss %xmm0, %xmm10
andps %xmm6, %xmm10
divss %xmm0, %xmm10
movaps %xmm9, %xmm11
maxss %xmm10, %xmm11
cmpunordss %xmm10, %xmm10
movaps %xmm10, %xmm12
andnps %xmm11, %xmm12
andps %xmm9, %xmm10
orps %xmm12, %xmm10
subss %xmm13, %xmm10
divss %xmm3, %xmm10
maxss %xmm7, %xmm10
minss %xmm2, %xmm10
movaps %xmm2, %xmm11
subss %xmm10, %xmm11
shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0]
mulps %xmm4, %xmm10
shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0]
mulps %xmm5, %xmm11
addps %xmm10, %xmm11
cvttps2dq %xmm11, %xmm10
pand %xmm8, %xmm10
packuswb %xmm10, %xmm10
packuswb %xmm10, %xmm10
movd %xmm10, (%r8,%r9,4)
incq %r9
cmpq %r9, %rcx
jne 0x93624
incq %rdi
addq %rsi, %r8
cmpq %rdx, %rdi
jne 0x93601
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
movl %ebp, 0xc(%rbx)
movabsq $0x700000001, %rax # imm = 0x700000001
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| GenImageGradientSquare:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12d, r8d
mov r15d, ecx
movss [rsp+38h+var_2C], xmm0
mov ebp, edx
mov r14d, esi
mov rbx, rdi
mov eax, edx
imul eax, esi
movsxd rdi, eax
shl rdi, 2
call _malloc
movss xmm13, [rsp+38h+var_2C]
test ebp, ebp
jle loc_936C2
xorps xmm0, xmm0
cvtsi2ss xmm0, r14d
movss xmm2, cs:dword_D3B58
mulss xmm0, xmm2
cvtsi2ss xmm1, ebp
mulss xmm1, xmm2
movd xmm4, r12d
movd xmm5, r15d
movss xmm2, cs:dword_D3B1C
movaps xmm3, xmm2
subss xmm3, xmm13
pxor xmm6, xmm6
punpcklbw xmm4, xmm6
punpcklwd xmm4, xmm6
cvtdq2ps xmm4, xmm4
punpcklbw xmm5, xmm6
punpcklwd xmm5, xmm6
cvtdq2ps xmm5, xmm5
mov ecx, r14d
mov edx, ebp
lea rsi, ds:0[rcx*4]
xor edi, edi
movaps xmm6, cs:xmmword_CF560
xorps xmm7, xmm7
movdqa xmm8, cs:xmmword_DD440
mov r8, rax
loc_93601:
test r14d, r14d
jle loc_936B3
xorps xmm9, xmm9
cvtsi2ss xmm9, edi
subss xmm9, xmm1
andps xmm9, xmm6
divss xmm9, xmm1
xor r9d, r9d
loc_93624:
xorps xmm10, xmm10
cvtsi2ss xmm10, r9d
subss xmm10, xmm0
andps xmm10, xmm6
divss xmm10, xmm0
movaps xmm11, xmm9
maxss xmm11, xmm10
cmpunordss xmm10, xmm10
movaps xmm12, xmm10
andnps xmm12, xmm11
andps xmm10, xmm9
orps xmm10, xmm12
subss xmm10, xmm13
divss xmm10, xmm3
maxss xmm10, xmm7
minss xmm10, xmm2
movaps xmm11, xmm2
subss xmm11, xmm10
shufps xmm10, xmm10, 0
mulps xmm10, xmm4
shufps xmm11, xmm11, 0
mulps xmm11, xmm5
addps xmm11, xmm10
cvttps2dq xmm10, xmm11
pand xmm10, xmm8
packuswb xmm10, xmm10
packuswb xmm10, xmm10
movd dword ptr [r8+r9*4], xmm10
inc r9
cmp rcx, r9
jnz loc_93624
loc_936B3:
inc rdi
add r8, rsi
cmp rdi, rdx
jnz loc_93601
loc_936C2:
mov [rbx], rax
mov [rbx+8], r14d
mov [rbx+0Ch], ebp
mov rax, 700000001h
mov [rbx+10h], rax
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long GenImageGradientSquare(long long a1, int a2, int a3, unsigned int a4, unsigned int a5, float a6)
{
long long v10; // rax
float v12; // xmm0_4
float v13; // xmm1_4
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // rdi
__m128i si128; // xmm8
long long v18; // r8
__m128 v19; // xmm9
__m128 v20; // xmm9
long long i; // r9
__m128 v22; // xmm10
__m128 v23; // xmm10
__m128 v24; // xmm11
__m128 v25; // xmm10
__m128 v26; // xmm10
__m128 v27; // xmm11
__m128i v28; // xmm10
__m128i v29; // xmm10
v10 = malloc(4LL * a2 * a3);
if ( a3 > 0 )
{
v12 = (float)a2 * 0.5;
v13 = (float)a3 * 0.5;
v14 = _mm_cvtepi32_ps(_mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(a5), (__m128i)0LL), (__m128i)0LL));
v15 = _mm_cvtepi32_ps(_mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(a4), (__m128i)0LL), (__m128i)0LL));
v16 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_DD440);
v18 = v10;
do
{
if ( a2 > 0 )
{
v19 = 0LL;
v19.m128_f32[0] = (float)(int)v16 - v13;
v20 = _mm_and_ps(v19, (__m128)xmmword_CF560);
v20.m128_f32[0] = v20.m128_f32[0] / v13;
for ( i = 0LL; i != a2; *(_DWORD *)(v18 + 4 * i++) = _mm_cvtsi128_si32(_mm_packus_epi16(v29, v29)) )
{
v22 = 0LL;
v22.m128_f32[0] = (float)(int)i - v12;
v23 = _mm_and_ps(v22, (__m128)xmmword_CF560);
v23.m128_f32[0] = v23.m128_f32[0] / v12;
v24 = v20;
v24.m128_f32[0] = fmaxf(v20.m128_f32[0], v23.m128_f32[0]);
v25 = _mm_cmpunord_ss(v23, v23);
v26 = _mm_or_ps(_mm_and_ps(v25, v20), _mm_andnot_ps(v25, v24));
v26.m128_f32[0] = fminf(fmaxf((float)(v26.m128_f32[0] - a6) / (float)(1.0 - a6), 0.0), 1.0);
v27 = (__m128)0x3F800000u;
v27.m128_f32[0] = 1.0 - v26.m128_f32[0];
v28 = _mm_and_si128(
_mm_cvttps_epi32(
_mm_add_ps(
_mm_mul_ps(_mm_shuffle_ps(v27, v27, 0), v15),
_mm_mul_ps(_mm_shuffle_ps(v26, v26, 0), v14))),
si128);
v29 = _mm_packus_epi16(v28, v28);
}
}
++v16;
v18 += 4LL * (unsigned int)a2;
}
while ( v16 != a3 );
}
*(_QWORD *)a1 = v10;
*(_DWORD *)(a1 + 8) = a2;
*(_DWORD *)(a1 + 12) = a3;
*(_QWORD *)(a1 + 16) = 0x700000001LL;
return a1;
}
| GenImageGradientSquare:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12D,R8D
MOV R15D,ECX
MOVSS dword ptr [RSP + 0xc],XMM0
MOV EBP,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV EAX,EDX
IMUL EAX,ESI
MOVSXD RDI,EAX
SHL RDI,0x2
CALL 0x0010a6f0
MOVSS XMM13,dword ptr [RSP + 0xc]
TEST EBP,EBP
JLE 0x001936c2
XORPS XMM0,XMM0
CVTSI2SS XMM0,R14D
MOVSS XMM2,dword ptr [0x001d3b58]
MULSS XMM0,XMM2
CVTSI2SS XMM1,EBP
MULSS XMM1,XMM2
MOVD XMM4,R12D
MOVD XMM5,R15D
MOVSS XMM2,dword ptr [0x001d3b1c]
MOVAPS XMM3,XMM2
SUBSS XMM3,XMM13
PXOR XMM6,XMM6
PUNPCKLBW XMM4,XMM6
PUNPCKLWD XMM4,XMM6
CVTDQ2PS XMM4,XMM4
PUNPCKLBW XMM5,XMM6
PUNPCKLWD XMM5,XMM6
CVTDQ2PS XMM5,XMM5
MOV ECX,R14D
MOV EDX,EBP
LEA RSI,[RCX*0x4]
XOR EDI,EDI
MOVAPS XMM6,xmmword ptr [0x001cf560]
XORPS XMM7,XMM7
MOVDQA XMM8,xmmword ptr [0x001dd440]
MOV R8,RAX
LAB_00193601:
TEST R14D,R14D
JLE 0x001936b3
XORPS XMM9,XMM9
CVTSI2SS XMM9,EDI
SUBSS XMM9,XMM1
ANDPS XMM9,XMM6
DIVSS XMM9,XMM1
XOR R9D,R9D
LAB_00193624:
XORPS XMM10,XMM10
CVTSI2SS XMM10,R9D
SUBSS XMM10,XMM0
ANDPS XMM10,XMM6
DIVSS XMM10,XMM0
MOVAPS XMM11,XMM9
MAXSS XMM11,XMM10
CMPUNORDSS XMM10,XMM10
MOVAPS XMM12,XMM10
ANDNPS XMM12,XMM11
ANDPS XMM10,XMM9
ORPS XMM10,XMM12
SUBSS XMM10,XMM13
DIVSS XMM10,XMM3
MAXSS XMM10,XMM7
MINSS XMM10,XMM2
MOVAPS XMM11,XMM2
SUBSS XMM11,XMM10
SHUFPS XMM10,XMM10,0x0
MULPS XMM10,XMM4
SHUFPS XMM11,XMM11,0x0
MULPS XMM11,XMM5
ADDPS XMM11,XMM10
CVTTPS2DQ XMM10,XMM11
PAND XMM10,XMM8
PACKUSWB XMM10,XMM10
PACKUSWB XMM10,XMM10
MOVD dword ptr [R8 + R9*0x4],XMM10
INC R9
CMP RCX,R9
JNZ 0x00193624
LAB_001936b3:
INC RDI
ADD R8,RSI
CMP RDI,RDX
JNZ 0x00193601
LAB_001936c2:
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x8],R14D
MOV dword ptr [RBX + 0xc],EBP
MOV RAX,0x700000001
MOV qword ptr [RBX + 0x10],RAX
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 *
GenImageGradientSquare
(float param_1,int8 *param_2,uint param_3,uint param_4,int4 param_5,
uint param_6)
{
char *pcVar1;
char cVar2;
short sVar6;
short sVar7;
short sVar8;
int1 auVar9 [13];
int1 auVar10 [13];
int1 auVar11 [13];
int1 auVar12 [13];
ulong uVar13;
int1 auVar14 [13];
uint uVar15;
float fVar16;
int1 auVar17 [16];
void *pvVar18;
ulong uVar19;
void *pvVar20;
ulong uVar21;
float fVar22;
float fVar23;
float fVar24;
float fVar25;
short sVar26;
float fVar27;
float fVar28;
int1 auVar31 [16];
char cVar3;
char cVar4;
char cVar5;
int4 uVar29;
int6 uVar30;
pvVar18 = malloc((long)(int)(param_4 * param_3) << 2);
auVar17 = _DAT_001dd440;
fVar16 = DAT_001d3b1c;
uVar15 = _DAT_001cf560;
if (0 < (int)param_4) {
fVar22 = (float)(int)param_3 * DAT_001d3b58;
fVar23 = (float)(int)param_4 * DAT_001d3b58;
fVar24 = DAT_001d3b1c - param_1;
auVar9[0xc] = (char)(param_6 >> 0x18);
auVar9._0_12_ = ZEXT712(0);
uVar13 = (ulong)(ushort)param_5 & 0xffffffffffff00ff;
auVar10._8_4_ = 0;
auVar10._0_8_ = uVar13;
auVar10[0xc] = (char)((uint)param_5 >> 0x18);
auVar11[8] = (char)((uint)param_5 >> 0x10);
auVar11._0_8_ = uVar13;
auVar11[9] = 0;
auVar11._10_3_ = auVar10._10_3_;
auVar14._5_8_ = 0;
auVar14._0_5_ = auVar11._8_5_;
auVar12[4] = (char)((uint)param_5 >> 8);
auVar12._0_4_ = (int)uVar13;
auVar12[5] = 0;
auVar12._6_7_ = SUB137(auVar14 << 0x40,6);
uVar19 = 0;
pvVar20 = pvVar18;
do {
if (0 < (int)param_3) {
fVar25 = (float)((uint)((float)(int)uVar19 - fVar23) & uVar15) / fVar23;
uVar21 = 0;
do {
fVar27 = (float)((uint)((float)(int)uVar21 - fVar22) & uVar15) / fVar22;
fVar28 = fVar25;
if (fVar25 <= fVar27) {
fVar28 = fVar27;
}
fVar28 = ((float)(-(uint)NAN(fVar27) & (uint)fVar25 | ~-(uint)NAN(fVar27) & (uint)fVar28)
- param_1) / fVar24;
if (fVar28 <= 0.0) {
fVar28 = 0.0;
}
if (fVar16 <= fVar28) {
fVar28 = fVar16;
}
fVar27 = fVar16 - fVar28;
auVar31._0_4_ = (int)(fVar27 * (float)(int)uVar13 + fVar28 * (float)(param_6 & 0xff));
auVar31._4_4_ =
(int)(fVar27 * (float)auVar12._4_4_ + fVar28 * (float)(param_6 >> 8 & 0xff));
auVar31._8_4_ =
(int)(fVar27 * (float)auVar11._8_4_ +
fVar28 * (float)(int)CONCAT32(auVar9._10_3_,(ushort)(byte)(param_6 >> 0x10)));
auVar31._12_4_ =
(int)(fVar27 * (float)(uint3)(auVar10._10_3_ >> 0x10) +
fVar28 * (float)(uint3)(auVar9._10_3_ >> 0x10));
auVar31 = auVar31 & auVar17;
sVar6 = auVar31._0_2_;
cVar2 = (0 < sVar6) * (sVar6 < 0x100) * auVar31[0] - (0xff < sVar6);
sVar6 = auVar31._2_2_;
sVar26 = CONCAT11((0 < sVar6) * (sVar6 < 0x100) * auVar31[2] - (0xff < sVar6),cVar2);
sVar6 = auVar31._4_2_;
cVar3 = (0 < sVar6) * (sVar6 < 0x100) * auVar31[4] - (0xff < sVar6);
sVar6 = auVar31._6_2_;
uVar29 = CONCAT13((0 < sVar6) * (sVar6 < 0x100) * auVar31[6] - (0xff < sVar6),
CONCAT12(cVar3,sVar26));
sVar6 = auVar31._8_2_;
cVar4 = (0 < sVar6) * (sVar6 < 0x100) * auVar31[8] - (0xff < sVar6);
sVar6 = auVar31._10_2_;
uVar30 = CONCAT15((0 < sVar6) * (sVar6 < 0x100) * auVar31[10] - (0xff < sVar6),
CONCAT14(cVar4,uVar29));
sVar6 = auVar31._12_2_;
cVar5 = (0 < sVar6) * (sVar6 < 0x100) * auVar31[0xc] - (0xff < sVar6);
sVar8 = auVar31._14_2_;
sVar6 = (short)((uint)uVar29 >> 0x10);
sVar7 = (short)((uint6)uVar30 >> 0x20);
sVar8 = (short)(CONCAT17((0 < sVar8) * (sVar8 < 0x100) * auVar31[0xe] - (0xff < sVar8),
CONCAT16(cVar5,uVar30)) >> 0x30);
pcVar1 = (char *)((long)pvVar20 + uVar21 * 4);
*pcVar1 = (0 < sVar26) * (sVar26 < 0x100) * cVar2 - (0xff < sVar26);
pcVar1[1] = (0 < sVar6) * (sVar6 < 0x100) * cVar3 - (0xff < sVar6);
pcVar1[2] = (0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7);
pcVar1[3] = (0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8);
uVar21 = uVar21 + 1;
} while (param_3 != uVar21);
}
uVar19 = uVar19 + 1;
pvVar20 = (void *)((long)pvVar20 + (ulong)param_3 * 4);
} while (uVar19 != param_4);
}
*param_2 = pvVar18;
*(uint *)(param_2 + 1) = param_3;
*(uint *)((long)param_2 + 0xc) = param_4;
param_2[2] = 0x700000001;
return param_2;
}
|
|
4,026 | init_tree | eloqsql/mysys/tree.c | void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
int size, qsort_cmp2 compare,
tree_element_free free_element, void *custom_arg,
myf my_flags)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
tree->free=free_element;
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
{
/*
We know that the data doesn't have to be aligned (like if the key
contains a double), so we can store the data combined with the
TREE_ELEMENT.
*/
tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */
/* Fix allocation size so that we don't lose any memory */
default_alloc_size/=(sizeof(TREE_ELEMENT)+size);
if (!default_alloc_size)
default_alloc_size=1;
default_alloc_size*=(sizeof(TREE_ELEMENT)+size);
}
else
{
tree->offset_to_key=0; /* use key through pointer */
tree->size_of_element+=sizeof(void*);
}
if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE)))
{
init_alloc_root(key_memory_TREE, &tree->mem_root, default_alloc_size, 0,
MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
} | O3 | c | init_tree:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rdi, %rbx
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %rdi
cmpq $0x2001, %rsi # imm = 0x2001
movl $0x2000, %r10d # imm = 0x2000
cmovaeq %rsi, %r10
addq $0x1fff, %r10 # imm = 0x1FFF
andq $-0x2000, %r10 # imm = 0xE000
leaq 0x2e1436(%rip), %rsi # 0x385bc0
movq %rsi, (%rbx)
movq %rax, 0x228(%rbx)
testq %r9, %r9
setne %sil
xorl %r11d, %r11d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movl %eax, 0x210(%rbx)
movq %rdx, 0x218(%rbx)
movq %r9, 0x280(%rbx)
movq $0x0, 0x220(%rbx)
movl %r11d, 0x20c(%rbx)
movq %rdi, 0x230(%rbx)
movq %r8, 0x288(%rbx)
movl %r11d, 0x290(%rbx)
sets %dl
orb %sil, %dl
jne 0xa47fd
cmpl $0x9, %ecx
setae %dl
testb $0x7, %cl
sete %sil
testb %sil, %dl
je 0xa4812
movl $0x0, 0x208(%rbx)
addl $0x8, %eax
movl %eax, 0x210(%rbx)
jmp 0xa4838
movl $0x18, 0x208(%rbx)
addl $0x18, %ecx
movq %r10, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r10
movl $0x1, %r10d
cmovaeq %rax, %r10
imulq %rcx, %r10
movl %r8d, %eax
shrl $0x12, %eax
andb $0x1, %al
movb %al, 0x278(%rbx)
jne 0xa4873
leaq 0xb639cd(%rip), %rax # 0xc0821c
movl (%rax), %edi
leaq 0x238(%rbx), %rsi
movq %r10, %rdx
xorl %ecx, %ecx
callq 0x9cab0
movl 0x210(%rbx), %eax
addq $0x18, %rax
movq %rax, 0x250(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| init_tree:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, r8
mov rbx, rdi
mov r8, [rbp+arg_8]
mov rdi, [rbp+arg_0]
cmp rsi, 2001h
mov r10d, 2000h
cmovnb r10, rsi
add r10, 1FFFh
and r10, 0FFFFFFFFFFFFE000h
lea rsi, null_element
mov [rbx], rsi
mov [rbx+228h], rax
test r9, r9
setnz sil
xor r11d, r11d
test ecx, ecx
mov eax, 0
cmovg eax, ecx
mov [rbx+210h], eax
mov [rbx+218h], rdx
mov [rbx+280h], r9
mov qword ptr [rbx+220h], 0
mov [rbx+20Ch], r11d
mov [rbx+230h], rdi
mov [rbx+288h], r8
mov [rbx+290h], r11d
sets dl
or dl, sil
jnz short loc_A47FD
cmp ecx, 9
setnb dl
test cl, 7
setz sil
test dl, sil
jz short loc_A4812
loc_A47FD:
mov dword ptr [rbx+208h], 0
add eax, 8
mov [rbx+210h], eax
jmp short loc_A4838
loc_A4812:
mov dword ptr [rbx+208h], 18h
add ecx, 18h
mov rax, r10
xor edx, edx
div rcx
cmp r10, rcx
mov r10d, 1
cmovnb r10, rax
imul r10, rcx
loc_A4838:
mov eax, r8d
shr eax, 12h
and al, 1
mov [rbx+278h], al
jnz short loc_A4873
lea rax, key_memory_TREE
mov edi, [rax]
lea rsi, [rbx+238h]
mov rdx, r10
xor ecx, ecx
call init_alloc_root
mov eax, [rbx+210h]
add rax, 18h
mov [rbx+250h], rax
loc_A4873:
add rsp, 8
pop rbx
pop rbp
retn
| char init_tree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long v8; // r10
unsigned long long v9; // r10
int v10; // eax
unsigned long long v11; // rcx
unsigned long long v12; // rax
bool v13; // cf
long long v14; // r10
long long v15; // rax
v8 = 0x2000LL;
if ( a2 >= 0x2001 )
v8 = a2;
v9 = (v8 + 0x1FFF) & 0xFFFFFFFFFFFFE000LL;
*(_QWORD *)a1 = &null_element;
*(_QWORD *)(a1 + 552) = a5;
v10 = 0;
if ( a4 > 0 )
v10 = a4;
*(_DWORD *)(a1 + 528) = v10;
*(_QWORD *)(a1 + 536) = a3;
*(_QWORD *)(a1 + 640) = a6;
*(_QWORD *)(a1 + 544) = 0LL;
*(_DWORD *)(a1 + 524) = 0;
*(_QWORD *)(a1 + 560) = a7;
*(_QWORD *)(a1 + 648) = a8;
*(_DWORD *)(a1 + 656) = 0;
if ( a6 != 0 || a4 < 0 || (a4 & 7) == 0 && (unsigned int)a4 >= 9 )
{
*(_DWORD *)(a1 + 520) = 0;
*(_DWORD *)(a1 + 528) = v10 + 8;
}
else
{
*(_DWORD *)(a1 + 520) = 24;
v11 = (unsigned int)(a4 + 24);
v12 = v9 / v11;
v13 = v9 < v11;
v14 = 1LL;
if ( !v13 )
v14 = v12;
v9 = v11 * v14;
}
LOBYTE(v15) = (a8 & 0x40000) != 0;
*(_BYTE *)(a1 + 632) = v15;
if ( (a8 & 0x40000) == 0 )
{
init_alloc_root(key_memory_TREE, (long long *)(a1 + 568), v9, 0LL, a8);
v15 = *(unsigned int *)(a1 + 528) + 24LL;
*(_QWORD *)(a1 + 592) = v15;
}
return v15;
}
| init_tree:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,R8
MOV RBX,RDI
MOV R8,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
CMP RSI,0x2001
MOV R10D,0x2000
CMOVNC R10,RSI
ADD R10,0x1fff
AND R10,-0x2000
LEA RSI,[0x485bc0]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x228],RAX
TEST R9,R9
SETNZ SIL
XOR R11D,R11D
TEST ECX,ECX
MOV EAX,0x0
CMOVG EAX,ECX
MOV dword ptr [RBX + 0x210],EAX
MOV qword ptr [RBX + 0x218],RDX
MOV qword ptr [RBX + 0x280],R9
MOV qword ptr [RBX + 0x220],0x0
MOV dword ptr [RBX + 0x20c],R11D
MOV qword ptr [RBX + 0x230],RDI
MOV qword ptr [RBX + 0x288],R8
MOV dword ptr [RBX + 0x290],R11D
SETS DL
OR DL,SIL
JNZ 0x001a47fd
CMP ECX,0x9
SETNC DL
TEST CL,0x7
SETZ SIL
TEST DL,SIL
JZ 0x001a4812
LAB_001a47fd:
MOV dword ptr [RBX + 0x208],0x0
ADD EAX,0x8
MOV dword ptr [RBX + 0x210],EAX
JMP 0x001a4838
LAB_001a4812:
MOV dword ptr [RBX + 0x208],0x18
ADD ECX,0x18
MOV RAX,R10
XOR EDX,EDX
DIV RCX
CMP R10,RCX
MOV R10D,0x1
CMOVNC R10,RAX
IMUL R10,RCX
LAB_001a4838:
MOV EAX,R8D
SHR EAX,0x12
AND AL,0x1
MOV byte ptr [RBX + 0x278],AL
JNZ 0x001a4873
LEA RAX,[0xd0821c]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x238]
MOV RDX,R10
XOR ECX,ECX
CALL 0x0019cab0
MOV EAX,dword ptr [RBX + 0x210]
ADD RAX,0x18
MOV qword ptr [RBX + 0x250],RAX
LAB_001a4873:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void init_tree(int8 *param_1,ulong param_2,int8 param_3,uint param_4,int8 param_5,
long param_6,int8 param_7,ulong param_8)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
uVar3 = 0x2000;
if (0x2000 < param_2) {
uVar3 = param_2;
}
uVar3 = uVar3 + 0x1fff & 0xffffffffffffe000;
*param_1 = null_element;
param_1[0x45] = param_5;
uVar1 = 0;
if (0 < (int)param_4) {
uVar1 = param_4;
}
*(uint *)(param_1 + 0x42) = uVar1;
param_1[0x43] = param_3;
param_1[0x50] = param_6;
param_1[0x44] = 0;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x46] = param_7;
param_1[0x51] = param_8;
*(int4 *)(param_1 + 0x52) = 0;
if (((int)param_4 < 0 || param_6 != 0) || (8 < param_4 && (param_4 & 7) == 0)) {
*(int4 *)(param_1 + 0x41) = 0;
*(uint *)(param_1 + 0x42) = uVar1 + 8;
}
else {
*(int4 *)(param_1 + 0x41) = 0x18;
uVar2 = (ulong)(param_4 + 0x18);
uVar4 = 1;
if (uVar2 <= uVar3) {
uVar4 = uVar3 / uVar2;
}
uVar3 = uVar4 * uVar2;
}
*(byte *)(param_1 + 0x4f) = (byte)(param_8 >> 0x12) & 1;
if ((param_8 >> 0x12 & 1) == 0) {
init_alloc_root(key_memory_TREE,param_1 + 0x47,uVar3,0);
param_1[0x4a] = (ulong)*(uint *)(param_1 + 0x42) + 0x18;
}
return;
}
|
|
4,027 | free_block | eloqsql/mysys/mf_keycache.c | static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block)
{
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block %u to be freed, hash_link %p status: %u",
BLOCK_NUMBER(block), block->hash_link,
block->status));
/*
Assert that the block is not free already. And that it is in a clean
state. Note that the block might just be assigned to a hash_link and
not yet read (BLOCK_READ may not be set here). In this case a reader
is registered in the hash_link and free_block() will wait for it
below.
*/
DBUG_ASSERT((block->status & BLOCK_IN_USE) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_REASSIGNED | BLOCK_IN_FLUSH |
BLOCK_CHANGED | BLOCK_FOR_UPDATE)));
/* Assert that the block is in a file_blocks chain. */
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
/* Assert that the block is not in the LRU ring. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/*
IMHO the below condition (if()) makes no sense. I can't see how it
could be possible that free_block() is entered with a NULL hash_link
pointer. The only place where it can become NULL is in free_block()
(or before its first use ever, but for those blocks free_block() is
not called). I don't remove the conditional as it cannot harm, but
place an DBUG_ASSERT to confirm my hypothesis. Eventually the
condition (if()) can be removed.
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
if (block->hash_link)
{
/*
While waiting for readers to finish, new readers might request the
block. But since we set block->status|= BLOCK_REASSIGNED, they
will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled
later.
*/
block->status|= BLOCK_REASSIGNED;
wait_for_readers(keycache, block);
/*
The block must not have been freed by another thread. Repeat some
checks. An additional requirement is that it must be read now
(BLOCK_READ).
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE |
BLOCK_REASSIGNED)) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_IN_FLUSH | BLOCK_CHANGED |
BLOCK_FOR_UPDATE)));
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->prev_used);
/*
Unset BLOCK_REASSIGNED again. If we hand the block to an evicting
thread (through unreg_request() below), other threads must not see
this flag. They could become confused.
*/
block->status&= ~BLOCK_REASSIGNED;
/*
Do not release the hash_link until the block is off all lists.
At least not if we hand it over for eviction in unreg_request().
*/
}
/*
Unregister the block request and link the block into the LRU ring.
This enables eviction for the block. If the LRU ring was empty and
threads are waiting for a block, then the block wil be handed over
for eviction immediately. Otherwise we will unlink it from the LRU
ring again, without releasing the lock in between. So decrementing
the request counter and updating statistics are the only relevant
operation in this case. Assert that there are no other requests
registered.
*/
DBUG_ASSERT(block->requests == 1);
unreg_request(keycache, block, 0);
/*
Note that even without releasing the cache lock it is possible that
the block is immediately selected for eviction by link_block() and
thus not added to the LRU ring. In this case we must not touch the
block any more.
*/
if (block->status & BLOCK_IN_EVICTION)
return;
/* Error blocks are not put into the LRU ring. */
if (!(block->status & BLOCK_ERROR))
{
/* Here the block must be in the LRU ring. Unlink it again. */
DBUG_ASSERT(block->next_used && block->prev_used &&
*block->prev_used == block);
unlink_block(keycache, block);
}
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_COLD;
/* Remove from file_blocks hash. */
unlink_changed(block);
/* Remove reference to block from hash table. */
unlink_hash(keycache, block->hash_link);
block->hash_link= NULL;
block->status= 0;
block->length= 0;
block->offset= keycache->key_cache_block_size;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block", ("block is freed"));
/* Enforced by unlink_changed(), but just to be sure. */
DBUG_ASSERT(!block->next_changed && !block->prev_changed);
/* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/* Insert the free block in the free list. */
block->next_used= keycache->free_block_list;
keycache->free_block_list= block;
/* Keep track of the number of currently unused blocks. */
keycache->blocks_unused++;
/* All pending requests for this page must be resubmitted. */
release_whole_queue(&block->wqueue[COND_FOR_SAVED]);
} | O0 | c | free_block:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xe43e2
jmp 0xe43e4
jmp 0xe43e6
jmp 0xe43e8
jmp 0xe43ea
jmp 0xe43ec
jmp 0xe43ee
jmp 0xe43f0
jmp 0xe43f2
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xe4432
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe54d0
jmp 0xe4419
jmp 0xe441b
jmp 0xe441d
jmp 0xe441f
jmp 0xe4421
jmp 0xe4423
jmp 0xe4425
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
andl $-0x9, %ecx
movl %ecx, 0x50(%rax)
jmp 0xe4434
jmp 0xe4436
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0xe4240
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xe445b
jmp 0xe4536
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe447b
jmp 0xe446c
jmp 0xe446e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe5700
movq -0x10(%rbp), %rax
cmpl $0x1, 0x54(%rax)
jne 0xe4495
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x10(%rbp), %rdi
callq 0xe5570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xe50d0
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x48(%rax)
jmp 0xe44ec
jmp 0xe44ee
jmp 0xe44f0
jmp 0xe44f2
jmp 0xe44f4
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
addq $0x8, %rdi
callq 0xe5440
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| free_block_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_E43E2:
jmp short $+2
loc_E43E4:
jmp short $+2
loc_E43E6:
jmp short $+2
loc_E43E8:
jmp short $+2
loc_E43EA:
jmp short $+2
loc_E43EC:
jmp short $+2
loc_E43EE:
jmp short $+2
loc_E43F0:
jmp short $+2
loc_E43F2:
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_E4432
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
or ecx, 8
mov [rax+50h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call wait_for_readers_0
jmp short $+2
loc_E4419:
jmp short $+2
loc_E441B:
jmp short $+2
loc_E441D:
jmp short $+2
loc_E441F:
jmp short $+2
loc_E4421:
jmp short $+2
loc_E4423:
jmp short $+2
loc_E4425:
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
and ecx, 0FFFFFFF7h
mov [rax+50h], ecx
loc_E4432:
jmp short $+2
loc_E4434:
jmp short $+2
loc_E4436:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
xor edx, edx
call unreg_request_0
mov rax, [rbp+var_10]
mov eax, [rax+50h]
and eax, 80h
cmp eax, 0
jz short loc_E445B
jmp loc_E4536
loc_E445B:
mov rax, [rbp+var_10]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_E447B
jmp short $+2
loc_E446C:
jmp short $+2
loc_E446E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call unlink_block_0
loc_E447B:
mov rax, [rbp+var_10]
cmp dword ptr [rax+54h], 1
jnz short loc_E4495
mov rax, [rbp+var_8]
mov rcx, [rax+68h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+68h], rcx
loc_E4495:
mov rax, [rbp+var_10]
mov dword ptr [rax+54h], 0
mov rdi, [rbp+var_10]
call unlink_changed_0
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
call unlink_hash_0
mov rax, [rbp+var_10]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+4Ch], 0
mov rax, [rbp+var_8]
mov ecx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+48h], ecx
jmp short $+2
loc_E44EC:
jmp short $+2
loc_E44EE:
jmp short $+2
loc_E44F0:
jmp short $+2
loc_E44F2:
jmp short $+2
loc_E44F4:
mov rax, [rbp+var_8]
mov rcx, [rax+98h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+58h]
add rcx, 1
mov [rax+58h], rcx
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
add rdi, 8
call release_whole_queue
loc_E4536:
add rsp, 10h
pop rbp
retn
| long long free_block_0(long long a1, long long a2)
{
long long result; // rax
if ( *(_QWORD *)(a2 + 32) )
{
*(_DWORD *)(a2 + 80) |= 8u;
wait_for_readers_0(a1, a2);
*(_DWORD *)(a2 + 80) &= ~8u;
}
unreg_request_0((_QWORD *)a1, a2, 0);
result = *(_DWORD *)(a2 + 80) & 0x80;
if ( !(_DWORD)result )
{
if ( (*(_DWORD *)(a2 + 80) & 1) == 0 )
unlink_block_0(a1, a2);
if ( *(_DWORD *)(a2 + 84) == 1 )
--*(_QWORD *)(a1 + 104);
*(_DWORD *)(a2 + 84) = 0;
unlink_changed_0(a2);
unlink_hash_0(a1, *(_QWORD *)(a2 + 32));
*(_QWORD *)(a2 + 32) = 0LL;
*(_DWORD *)(a2 + 80) = 0;
*(_DWORD *)(a2 + 76) = 0;
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24);
*(_QWORD *)a2 = *(_QWORD *)(a1 + 152);
*(_QWORD *)(a1 + 152) = a2;
++*(_QWORD *)(a1 + 88);
return release_whole_queue(a2 + 48);
}
return result;
}
| free_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001e43e2
LAB_001e43e2:
JMP 0x001e43e4
LAB_001e43e4:
JMP 0x001e43e6
LAB_001e43e6:
JMP 0x001e43e8
LAB_001e43e8:
JMP 0x001e43ea
LAB_001e43ea:
JMP 0x001e43ec
LAB_001e43ec:
JMP 0x001e43ee
LAB_001e43ee:
JMP 0x001e43f0
LAB_001e43f0:
JMP 0x001e43f2
LAB_001e43f2:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001e4432
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x8
MOV dword ptr [RAX + 0x50],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001e54d0
JMP 0x001e4419
LAB_001e4419:
JMP 0x001e441b
LAB_001e441b:
JMP 0x001e441d
LAB_001e441d:
JMP 0x001e441f
LAB_001e441f:
JMP 0x001e4421
LAB_001e4421:
JMP 0x001e4423
LAB_001e4423:
JMP 0x001e4425
LAB_001e4425:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
AND ECX,0xfffffff7
MOV dword ptr [RAX + 0x50],ECX
LAB_001e4432:
JMP 0x001e4434
LAB_001e4434:
JMP 0x001e4436
LAB_001e4436:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR EDX,EDX
CALL 0x001e4240
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001e445b
JMP 0x001e4536
LAB_001e445b:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e447b
JMP 0x001e446c
LAB_001e446c:
JMP 0x001e446e
LAB_001e446e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001e5700
LAB_001e447b:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x54],0x1
JNZ 0x001e4495
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x68]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x68],RCX
LAB_001e4495:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x54],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e5570
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x001e50d0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x48],ECX
JMP 0x001e44ec
LAB_001e44ec:
JMP 0x001e44ee
LAB_001e44ee:
JMP 0x001e44f0
LAB_001e44f0:
JMP 0x001e44f2
LAB_001e44f2:
JMP 0x001e44f4
LAB_001e44f4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0x1
MOV qword ptr [RAX + 0x58],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
ADD RDI,0x8
CALL 0x001e5440
LAB_001e4536:
ADD RSP,0x10
POP RBP
RET
|
void free_block(long param_1,int8 *param_2)
{
if (param_2[4] != 0) {
*(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) | 8;
wait_for_readers(param_1,param_2);
*(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) & 0xfffffff7;
}
unreg_request(param_1,param_2,0);
if ((*(uint *)(param_2 + 10) & 0x80) == 0) {
if ((*(uint *)(param_2 + 10) & 1) == 0) {
unlink_block(param_1,param_2);
}
if (*(int *)((long)param_2 + 0x54) == 1) {
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1;
}
*(int4 *)((long)param_2 + 0x54) = 0;
unlink_changed(param_2);
unlink_hash(param_1,param_2[4]);
param_2[4] = 0;
*(int4 *)(param_2 + 10) = 0;
*(int4 *)((long)param_2 + 0x4c) = 0;
*(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18);
*param_2 = *(int8 *)(param_1 + 0x98);
*(int8 **)(param_1 + 0x98) = param_2;
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1;
release_whole_queue(param_2 + 6);
}
return;
}
|
|
4,028 | el::Configurations::Parser::isComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | opengl-water/src/easylogging++.cc | bool Configurations::Parser::isComment(const std::string& line) {
return base::utils::Str::startsWith(line, std::string(base::consts::kConfigurationComment));
} | O3 | cpp | el::Configurations::Parser::isComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x254de(%rip), %rsi # 0x4f01d
leaq 0x254d9(%rip), %rdx # 0x4f01f
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x26c7e
movq 0x8(%r14), %rdx
cmpq %rdx, 0x8(%rbx)
jae 0x29b60
xorl %ebx, %ebx
jmp 0x29b73
leaq -0x38(%rbp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x33c3c
testl %eax, %eax
sete %bl
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x29b88
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x23140
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x29bad
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x23140
movq %rbx, %rdi
callq 0x234d0
nop
| _ZN2el14Configurations6Parser9isCommentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r15, [rbp+var_28]
mov [r15-10h], r15
lea rsi, asc_4F01D; "##"
lea rdx, asc_4F01D+2; ""
lea r14, [rbp+var_38]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdx, [r14+8]
cmp [rbx+8], rdx
jnb short loc_29B60
xor ebx, ebx
jmp short loc_29B73
loc_29B60:
lea rcx, [rbp+var_38]
mov rdi, rbx
xor esi, esi
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_; std::string::compare(ulong,ulong,std::string const&)
test eax, eax
setz bl
loc_29B73:
mov rdi, [rbp+var_38]; void *
cmp rdi, r15
jz short loc_29B88
mov rsi, [rbp+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29B88:
mov eax, ebx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rbp+var_38]; void *
cmp rdi, r15
jz short loc_29BAD
mov rsi, [rbp+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29BAD:
mov rdi, rbx
call __Unwind_Resume
| long long el::Configurations::Parser::isComment(long long a1)
{
unsigned int v1; // ebx
void *v3; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v4; // [rsp+10h] [rbp-30h]
_QWORD v5[5]; // [rsp+18h] [rbp-28h] BYREF
v1 = a1;
v3 = v5;
std::string::_M_construct<char const*>((long long)&v3, "##", (long long)"");
if ( *(_QWORD *)(a1 + 8) >= v4 )
LOBYTE(v1) = (unsigned int)std::string::compare(a1, 0LL, v4, &v3) == 0;
else
v1 = 0;
if ( v3 != v5 )
operator delete(v3, v5[0] + 1LL);
return v1;
}
| isComment:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R15,[RBP + -0x28]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[0x14f01d]
LEA RDX,[0x14f01f]
LEA R14,[RBP + -0x38]
MOV RDI,R14
CALL 0x00126c7e
MOV RDX,qword ptr [R14 + 0x8]
CMP qword ptr [RBX + 0x8],RDX
JNC 0x00129b60
XOR EBX,EBX
JMP 0x00129b73
LAB_00129b60:
LEA RCX,[RBP + -0x38]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00133c3c
LAB_00129b6e:
TEST EAX,EAX
SETZ BL
LAB_00129b73:
MOV RDI,qword ptr [RBP + -0x38]
CMP RDI,R15
JZ 0x00129b88
MOV RSI,qword ptr [RBP + -0x28]
INC RSI
CALL 0x00123140
LAB_00129b88:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* el::Configurations::Parser::isComment(std::__cxx11::string const&) */
ulong el::Configurations::Parser::isComment(string *param_1)
{
int iVar1;
ulong uVar2;
long *local_40;
ulong local_38;
long local_30 [2];
local_40 = local_30;
std::__cxx11::string::_M_construct<char_const*>(&local_40,&DAT_0014f01d,&DAT_0014f01f);
if (*(ulong *)(param_1 + 8) < local_38) {
uVar2 = 0;
}
else {
/* try { // try from 00129b60 to 00129b6d has its CatchHandler @ 00129b95 */
iVar1 = std::__cxx11::string::compare(param_1,0,local_38,(string *)&local_40);
uVar2 = CONCAT71((int7)((ulong)param_1 >> 8),iVar1 == 0);
}
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
return uVar2 & 0xffffffff;
}
|
|
4,029 | blst_uint64_from_fr | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c | void blst_uint64_from_fr(unsigned long long ret[4], const vec256 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
if (sizeof(limb_t) == 8 || is_endian.little) {
from_mont_256((limb_t *)ret, a, BLS12_381_r, r0);
} else {
vec256 out;
int i;
from_mont_256(out, a, BLS12_381_r, r0);
for (i = 0; i < 4; i++)
ret[i] = out[2*i] | ((unsigned long long)out[2*i+1] << 32);
vec_zero(out, sizeof(out));
}
} | O3 | c | blst_uint64_from_fr:
pushq %rbp
movq %rsp, %rbp
leaq 0x26e73(%rip), %rdx # 0x8ca40
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
popq %rbp
jmp 0x76460
| blst_uint64_from_fr:
push rbp
mov rbp, rsp
lea rdx, BLS12_381_r
mov rcx, 0FFFFFFFEFFFFFFFFh
pop rbp
jmp from_mont_256
| long long blst_uint64_from_fr(long long a1, long long a2)
{
return from_mont_256(a1, a2, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
}
| blst_uint64_from_fr:
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x18ca40]
MOV RCX,-0x100000001
POP RBP
JMP 0x00176460
|
void blst_uint64_from_fr(int8 param_1,int8 param_2)
{
from_mont_256(param_1,param_2,BLS12_381_r,0xfffffffeffffffff);
return;
}
|
|
4,030 | ma_ft_cmp | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_cmp(MARIA_HA *info, uint keynr, const uchar *rec1, const uchar *rec2)
{
FT_SEG_ITERATOR ftsi1, ftsi2;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
DBUG_ENTER("_ma_ft_cmp");
_ma_ft_segiterator_init(info, keynr, rec1, &ftsi1);
_ma_ft_segiterator_init(info, keynr, rec2, &ftsi2);
while (_ma_ft_segiterator(&ftsi1) && _ma_ft_segiterator(&ftsi2))
{
if ((ftsi1.pos != ftsi2.pos) &&
(!ftsi1.pos || !ftsi2.pos ||
ha_compare_text(cs, ftsi1.pos,ftsi1.len,
ftsi2.pos,ftsi2.len,0)))
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
}
DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL);
} | O3 | c | ma_ft_cmp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq (%rdi), %rax
movq 0x570(%rax), %rax
movl %esi, %esi
imulq $0x118, %rsi, %rsi # imm = 0x118
movq 0xc0(%rax,%rsi), %r8
movq (%r8), %rbx
movzwl 0xa0(%rax,%rsi), %eax
leaq -0x60(%rbp), %rdi
movl %eax, (%rdi)
movq %r8, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorl %r14d, %r14d
movq %r14, 0x18(%rdi)
movl %r14d, 0x4(%rdi)
movl %eax, -0x40(%rbp)
movq %r8, -0x38(%rbp)
movq %rcx, -0x30(%rbp)
movq %r14, -0x28(%rbp)
movl %r14d, -0x3c(%rbp)
callq 0x5fa9f
testl %eax, %eax
je 0x5fd8a
leaq -0x40(%rbp), %r15
leaq -0x60(%rbp), %r12
movq %r15, %rdi
callq 0x5fa9f
testl %eax, %eax
je 0x5fd87
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rcx
cmpq %rcx, %rsi
je 0x5fd7b
movl $0x1, %r14d
testq %rsi, %rsi
je 0x5fd8a
testq %rcx, %rcx
je 0x5fd8a
movl -0x5c(%rbp), %edx
movl -0x3c(%rbp), %r8d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x9e804
testl %eax, %eax
jne 0x5fd8a
movq %r12, %rdi
callq 0x5fa9f
testl %eax, %eax
jne 0x5fd3c
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_ft_cmp:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rax, [rdi]
mov rax, [rax+570h]
mov esi, esi
imul rsi, 118h
mov r8, [rax+rsi+0C0h]
mov rbx, [r8]
movzx eax, word ptr [rax+rsi+0A0h]
lea rdi, [rbp+var_60]
mov [rdi], eax
mov [rdi+8], r8
mov [rdi+10h], rdx
xor r14d, r14d
mov [rdi+18h], r14
mov [rdi+4], r14d
mov [rbp+var_40], eax
mov [rbp+var_38], r8
mov [rbp+var_30], rcx
mov [rbp+var_28], r14
mov [rbp+var_3C], r14d
call _ma_ft_segiterator
test eax, eax
jz short loc_5FD8A
lea r15, [rbp+var_40]
lea r12, [rbp+var_60]
loc_5FD3C:
mov rdi, r15
call _ma_ft_segiterator
test eax, eax
jz short loc_5FD87
mov rsi, [rbp+var_48]
mov rcx, [rbp+var_28]
cmp rsi, rcx
jz short loc_5FD7B
mov r14d, 1
test rsi, rsi
jz short loc_5FD8A
test rcx, rcx
jz short loc_5FD8A
mov edx, [rbp+var_5C]
mov r8d, [rbp+var_3C]
mov rdi, rbx
xor r9d, r9d
call ha_compare_text
test eax, eax
jnz short loc_5FD8A
loc_5FD7B:
mov rdi, r12
call _ma_ft_segiterator
test eax, eax
jnz short loc_5FD3C
loc_5FD87:
xor r14d, r14d
loc_5FD8A:
mov eax, r14d
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rsi
_QWORD *v6; // r8
long long v7; // rbx
unsigned int v8; // r14d
int v10; // [rsp+0h] [rbp-60h] BYREF
unsigned int v11; // [rsp+4h] [rbp-5Ch]
_QWORD *v12; // [rsp+8h] [rbp-58h]
long long v13; // [rsp+10h] [rbp-50h]
long long v14; // [rsp+18h] [rbp-48h]
int v15; // [rsp+20h] [rbp-40h] BYREF
unsigned int v16; // [rsp+24h] [rbp-3Ch]
_QWORD *v17; // [rsp+28h] [rbp-38h]
long long v18; // [rsp+30h] [rbp-30h]
long long v19; // [rsp+38h] [rbp-28h]
v4 = *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v5 = 280LL * a2;
v6 = *(_QWORD **)(v4 + v5 + 192);
v7 = *v6;
v10 = *(unsigned __int16 *)(v4 + v5 + 160);
v12 = v6;
v13 = a3;
v8 = 0;
v14 = 0LL;
v11 = 0;
v15 = v10;
v17 = v6;
v18 = a4;
v19 = 0LL;
v16 = 0;
if ( (unsigned int)ma_ft_segiterator((long long)&v10) )
{
do
{
if ( !(unsigned int)ma_ft_segiterator((long long)&v15) )
break;
if ( v14 != v19 )
{
v8 = 1;
if ( !v14 || !v19 || (unsigned int)ha_compare_text(v7, v14, v11, v19, v16, 0LL) )
return v8;
}
}
while ( (unsigned int)ma_ft_segiterator((long long)&v10) );
return 0;
}
return v8;
}
| _ma_ft_cmp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x570]
MOV ESI,ESI
IMUL RSI,RSI,0x118
MOV R8,qword ptr [RAX + RSI*0x1 + 0xc0]
MOV RBX,qword ptr [R8]
MOVZX EAX,word ptr [RAX + RSI*0x1 + 0xa0]
LEA RDI,[RBP + -0x60]
MOV dword ptr [RDI],EAX
MOV qword ptr [RDI + 0x8],R8
MOV qword ptr [RDI + 0x10],RDX
XOR R14D,R14D
MOV qword ptr [RDI + 0x18],R14
MOV dword ptr [RDI + 0x4],R14D
MOV dword ptr [RBP + -0x40],EAX
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x28],R14
MOV dword ptr [RBP + -0x3c],R14D
CALL 0x0015fa9f
TEST EAX,EAX
JZ 0x0015fd8a
LEA R15,[RBP + -0x40]
LEA R12,[RBP + -0x60]
LAB_0015fd3c:
MOV RDI,R15
CALL 0x0015fa9f
TEST EAX,EAX
JZ 0x0015fd87
MOV RSI,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
CMP RSI,RCX
JZ 0x0015fd7b
MOV R14D,0x1
TEST RSI,RSI
JZ 0x0015fd8a
TEST RCX,RCX
JZ 0x0015fd8a
MOV EDX,dword ptr [RBP + -0x5c]
MOV R8D,dword ptr [RBP + -0x3c]
MOV RDI,RBX
XOR R9D,R9D
CALL 0x0019e804
TEST EAX,EAX
JNZ 0x0015fd8a
LAB_0015fd7b:
MOV RDI,R12
CALL 0x0015fa9f
TEST EAX,EAX
JNZ 0x0015fd3c
LAB_0015fd87:
XOR R14D,R14D
LAB_0015fd8a:
MOV EAX,R14D
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _ma_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
uint local_68;
int4 local_64;
int8 *local_60;
int8 local_58;
long local_50;
uint local_48;
int4 local_44;
int8 *local_40;
int8 local_38;
long local_30;
local_60 = *(int8 **)(*(long *)(*param_1 + 0x570) + 0xc0 + (ulong)param_2 * 0x118);
uVar1 = *local_60;
local_68 = (uint)*(ushort *)(*(long *)(*param_1 + 0x570) + 0xa0 + (ulong)param_2 * 0x118);
local_50 = 0;
local_64 = 0;
local_30 = 0;
local_44 = 0;
local_58 = param_3;
local_48 = local_68;
local_40 = local_60;
local_38 = param_4;
iVar2 = _ma_ft_segiterator();
if (iVar2 != 0) {
do {
iVar2 = _ma_ft_segiterator(&local_48);
if (iVar2 == 0) {
return 0;
}
if (local_50 != local_30) {
if (local_50 == 0) {
return 1;
}
if (local_30 == 0) {
return 1;
}
iVar2 = ha_compare_text(uVar1,local_50,local_64,local_30,local_44,0);
if (iVar2 != 0) {
return 1;
}
}
iVar2 = _ma_ft_segiterator(&local_68);
} while (iVar2 != 0);
}
return 0;
}
|
|
4,031 | ggml_mul_mat | monkey531[P]llama/ggml/src/ggml.c | struct ggml_tensor * ggml_mul_mat(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(ggml_can_mul_mat(a, b));
GGML_ASSERT(!ggml_is_transposed(a));
const int64_t ne[4] = { a->ne[1], b->ne[1], b->ne[2], b->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
result->op = GGML_OP_MUL_MAT;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_mul_mat:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x211f5
testb %al, %al
je 0x211b8
movq 0x30(%r14), %rax
cmpq 0x38(%r14), %rax
ja 0x211d4
movq 0x18(%r14), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movups 0x18(%rbx), %xmm0
movups %xmm0, 0x8(%rcx)
movq 0x28(%rbx), %rax
movq %rax, 0x18(%rcx)
pushq $0x4
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1c230
movl $0x1a, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2a3c4(%rip), %rdi # 0x4b583
leaq 0x2a407(%rip), %rdx # 0x4b5cd
leaq 0x2a5ca(%rip), %rcx # 0x4b797
movl $0xa8a, %esi # imm = 0xA8A
jmp 0x211ee
leaq 0x2a3a8(%rip), %rdi # 0x4b583
leaq 0x2a3eb(%rip), %rdx # 0x4b5cd
leaq 0x2a5c5(%rip), %rcx # 0x4b7ae
movl $0xa8b, %esi # imm = 0xA8B
xorl %eax, %eax
callq 0x1e760
| ggml_mul_mat:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rsi
mov rsi, rdx
call ggml_can_mul_mat
test al, al
jz short loc_211B8
mov rax, [r14+30h]
cmp rax, [r14+38h]
ja short loc_211D4
mov rax, [r14+18h]
mov rcx, rsp
mov [rcx], rax
movups xmm0, xmmword ptr [rbx+18h]
movups xmmword ptr [rcx+8], xmm0
mov rax, [rbx+28h]
mov [rcx+18h], rax
push 4
pop rdx
mov rdi, r15
xor esi, esi
call _ggml_new_tensor
mov dword ptr [rax+50h], 1Ah
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
loc_211B8:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanMulMatA; "ggml_can_mul_mat(a, b)"
mov esi, 0A8Ah
jmp short loc_211EE
loc_211D4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsTranspos_0; "!ggml_is_transposed(a)"
mov esi, 0A8Bh
loc_211EE:
xor eax, eax
call _ggml_abort
| long long ggml_mul_mat(
long long a1,
_QWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
long long result; // rax
const char *v17; // rcx
int v18; // esi
long long v19; // [rsp+0h] [rbp-38h] BYREF
__int128 v20; // [rsp+8h] [rbp-30h]
long long v21; // [rsp+18h] [rbp-20h]
if ( !(unsigned __int8)ggml_can_mul_mat(a2, a3) )
{
v17 = "ggml_can_mul_mat(a, b)";
v18 = 2698;
goto LABEL_6;
}
if ( a2[6] > a2[7] )
{
v17 = "!ggml_is_transposed(a)";
v18 = 2699;
LABEL_6:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
v18,
(long long)"GGML_ASSERT(%s) failed",
(long long)v17,
v12,
v13,
a4,
a5,
a6,
a7,
v14,
v15,
a10,
a11,
v19);
}
v19 = a2[3];
v20 = *(_OWORD *)(a3 + 24);
v21 = *(_QWORD *)(a3 + 40);
result = ggml_new_tensor(a1, 0LL, 4LL, (long long)&v19);
*(_DWORD *)(result + 80) = 26;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_mul_mat:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x001211f5
TEST AL,AL
JZ 0x001211b8
MOV RAX,qword ptr [R14 + 0x30]
CMP RAX,qword ptr [R14 + 0x38]
JA 0x001211d4
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOVUPS XMM0,xmmword ptr [RBX + 0x18]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
MOV RAX,qword ptr [RBX + 0x28]
MOV qword ptr [RCX + 0x18],RAX
PUSH 0x4
POP RDX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0011c230
MOV dword ptr [RAX + 0x50],0x1a
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
LAB_001211b8:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5cd]
LEA RCX,[0x14b797]
MOV ESI,0xa8a
JMP 0x001211ee
LAB_001211d4:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5cd]
LEA RCX,[0x14b7ae]
MOV ESI,0xa8b
LAB_001211ee:
XOR EAX,EAX
CALL 0x0011e760
|
void ggml_mul_mat(int8 param_1,long param_2,int8 param_3)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
cVar1 = ggml_can_mul_mat(param_2,param_3);
if (cVar1 == '\0') {
pcVar3 = "ggml_can_mul_mat(a, b)";
uVar4 = 0xa8a;
}
else {
if (*(ulong *)(param_2 + 0x30) <= *(ulong *)(param_2 + 0x38)) {
lVar2 = ggml_new_tensor(param_1,0,4);
*(int4 *)(lVar2 + 0x50) = 0x1a;
*(long *)(lVar2 + 0x98) = param_2;
*(int8 *)(lVar2 + 0xa0) = param_3;
return;
}
pcVar3 = "!ggml_is_transposed(a)";
uVar4 = 0xa8b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
4,032 | ma_net_init | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_init(NET *net, MARIADB_PVIO* pvio)
{
if (!(net->buff=(uchar*) malloc(net_buffer_length)))
return 1;
if (!net->extension)
return 1;
memset(net->buff, 0, net_buffer_length);
net->max_packet_size= MAX(net_buffer_length, max_allowed_packet);
net->buff_end=net->buff+(net->max_packet=net_buffer_length);
net->pvio = pvio;
net->error=0; net->return_status=0;
net->read_timeout=(uint) net_read_timeout; /* Timeout for read */
net->compress_pkt_nr= net->pkt_nr= 0;
net->write_pos=net->read_pos = net->buff;
net->last_error[0]= net->sqlstate[0] =0;
net->compress=0; net->reading_or_writing=0;
net->where_b = net->remain_in_buf=0;
net->last_errno=0;
if (pvio != 0) /* If real connection */
{
ma_pvio_get_handle(pvio, &net->fd);
ma_pvio_blocking(pvio, 1, 0);
ma_pvio_fast_send(pvio);
}
return 0;
} | O3 | c | ma_net_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2e50d9(%rip), %rax # 0x339d80
movq (%rax), %r13
movq %r13, %rdi
callq 0x36950
movq %rax, 0x8(%r14)
movl $0x1, %r15d
testq %rax, %rax
je 0x54d8d
cmpq $0x0, 0x2a0(%r14)
je 0x54d8d
movq %rax, %r12
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x36300
leaq 0x2e507b(%rip), %rax # 0x339d68
movq (%rax), %rax
cmpq %rax, %r13
cmovaq %r13, %rax
movq %rax, 0x58(%r14)
movq %r13, 0x50(%r14)
movq %r12, %rax
addq %r13, %rax
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
movb %r15b, 0x94(%r14)
movq %r15, 0x78(%r14)
leaq 0x2e5052(%rip), %rax # 0x339d70
movl (%rax), %eax
movl %eax, 0x6c(%r14)
movq %r15, 0x60(%r14)
movq %r12, 0x20(%r14)
movq %r12, 0x18(%r14)
movb %r15b, 0x297(%r14)
movb %r15b, 0x97(%r14)
movb %r15b, 0x84(%r14)
movb %r15b, 0x80(%r14)
movq %r15, 0x30(%r14)
movq %r15, 0x48(%r14)
movl $0x0, 0x90(%r14)
testq %rbx, %rbx
je 0x54d8d
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x412cb
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x40ff8
movq %rbx, %rdi
callq 0x40da4
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_net_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, net_buffer_length
mov r13, [rax]
mov rdi, r13
call _malloc
mov [r14+8], rax
mov r15d, 1
test rax, rax
jz loc_54D8D
cmp qword ptr [r14+2A0h], 0
jz loc_54D8D
mov r12, rax
xor r15d, r15d
mov rdi, rax
xor esi, esi
mov rdx, r13
call _memset
lea rax, max_allowed_packet
mov rax, [rax]
cmp r13, rax
cmova rax, r13
mov [r14+58h], rax
mov [r14+50h], r13
mov rax, r12
add rax, r13
mov [r14+10h], rax
mov [r14], rbx
mov [r14+94h], r15b
mov [r14+78h], r15
lea rax, net_read_timeout
mov eax, [rax]
mov [r14+6Ch], eax
mov [r14+60h], r15
mov [r14+20h], r12
mov [r14+18h], r12
mov [r14+297h], r15b
mov [r14+97h], r15b
mov [r14+84h], r15b
mov [r14+80h], r15b
mov [r14+30h], r15
mov [r14+48h], r15
mov dword ptr [r14+90h], 0
test rbx, rbx
jz short loc_54D8D
add r14, 28h ; '('
mov rdi, rbx
mov rsi, r14
call ma_pvio_get_handle
xor r15d, r15d
mov rdi, rbx
mov esi, 1
xor edx, edx
call ma_pvio_blocking
mov rdi, rbx
call ma_pvio_fast_send
loc_54D8D:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_net_init(long long a1, long long a2)
{
unsigned long long v2; // r13
long long v3; // rax
unsigned int v4; // r15d
long long v5; // r12
unsigned long long v6; // rax
v2 = net_buffer_length;
v3 = malloc(net_buffer_length);
*(_QWORD *)(a1 + 8) = v3;
v4 = 1;
if ( v3 && *(_QWORD *)(a1 + 672) )
{
v5 = v3;
v4 = 0;
memset(v3, 0LL, v2);
v6 = max_allowed_packet;
if ( v2 > max_allowed_packet )
v6 = v2;
*(_QWORD *)(a1 + 88) = v6;
*(_QWORD *)(a1 + 80) = v2;
*(_QWORD *)(a1 + 16) = v2 + v5;
*(_QWORD *)a1 = a2;
*(_BYTE *)(a1 + 148) = 0;
*(_QWORD *)(a1 + 120) = 0LL;
*(_DWORD *)(a1 + 108) = net_read_timeout;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 32) = v5;
*(_QWORD *)(a1 + 24) = v5;
*(_BYTE *)(a1 + 663) = 0;
*(_BYTE *)(a1 + 151) = 0;
*(_BYTE *)(a1 + 132) = 0;
*(_BYTE *)(a1 + 128) = 0;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 144) = 0;
if ( a2 )
{
ma_pvio_get_handle(a2);
v4 = 0;
ma_pvio_blocking(a2, 1);
ma_pvio_fast_send(a2);
}
}
return v4;
}
| ma_net_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0x439d80]
MOV R13,qword ptr [RAX]
MOV RDI,R13
CALL 0x00136950
MOV qword ptr [R14 + 0x8],RAX
MOV R15D,0x1
TEST RAX,RAX
JZ 0x00154d8d
CMP qword ptr [R14 + 0x2a0],0x0
JZ 0x00154d8d
MOV R12,RAX
XOR R15D,R15D
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00136300
LEA RAX,[0x439d68]
MOV RAX,qword ptr [RAX]
CMP R13,RAX
CMOVA RAX,R13
MOV qword ptr [R14 + 0x58],RAX
MOV qword ptr [R14 + 0x50],R13
MOV RAX,R12
ADD RAX,R13
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14],RBX
MOV byte ptr [R14 + 0x94],R15B
MOV qword ptr [R14 + 0x78],R15
LEA RAX,[0x439d70]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R14 + 0x6c],EAX
MOV qword ptr [R14 + 0x60],R15
MOV qword ptr [R14 + 0x20],R12
MOV qword ptr [R14 + 0x18],R12
MOV byte ptr [R14 + 0x297],R15B
MOV byte ptr [R14 + 0x97],R15B
MOV byte ptr [R14 + 0x84],R15B
MOV byte ptr [R14 + 0x80],R15B
MOV qword ptr [R14 + 0x30],R15
MOV qword ptr [R14 + 0x48],R15
MOV dword ptr [R14 + 0x90],0x0
TEST RBX,RBX
JZ 0x00154d8d
ADD R14,0x28
MOV RDI,RBX
MOV RSI,R14
CALL 0x001412cb
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
CALL 0x00140ff8
MOV RDI,RBX
CALL 0x00140da4
LAB_00154d8d:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_net_init(long *param_1,long param_2)
{
size_t __n;
void *__s;
ulong uVar1;
int8 uVar2;
__n = net_buffer_length;
__s = malloc(net_buffer_length);
param_1[1] = (long)__s;
uVar2 = 1;
if ((__s != (void *)0x0) && (param_1[0x54] != 0)) {
uVar2 = 0;
memset(__s,0,__n);
uVar1 = max_allowed_packet;
if (max_allowed_packet < __n) {
uVar1 = __n;
}
param_1[0xb] = uVar1;
param_1[10] = __n;
param_1[2] = (long)__s + __n;
*param_1 = param_2;
*(int1 *)((long)param_1 + 0x94) = 0;
param_1[0xf] = 0;
*(int4 *)((long)param_1 + 0x6c) = net_read_timeout;
param_1[0xc] = 0;
param_1[4] = (long)__s;
param_1[3] = (long)__s;
*(int1 *)((long)param_1 + 0x297) = 0;
*(int1 *)((long)param_1 + 0x97) = 0;
*(int1 *)((long)param_1 + 0x84) = 0;
*(int1 *)(param_1 + 0x10) = 0;
param_1[6] = 0;
param_1[9] = 0;
*(int4 *)(param_1 + 0x12) = 0;
if (param_2 != 0) {
ma_pvio_get_handle(param_2,param_1 + 5);
uVar2 = 0;
ma_pvio_blocking(param_2,1,0);
ma_pvio_fast_send(param_2);
}
}
return uVar2;
}
|
|
4,033 | uf_endspace_selected | eloqsql/storage/myisam/mi_packrec.c | static void uf_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill((uchar*) end-spaces,spaces,' ');
}
else
decode_bytes(rec,bit_buff,to,end);
} | O3 | c | uf_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x82f99
movl (%r15), %r14d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r14d
jb 0x82fd8
jmp 0x82fb7
movq %r15, %rdi
movq %rdx, %r14
callq 0x821b9
movq %r14, %rdx
movl $0x1f, 0x4(%r15)
movl (%r15), %r14d
testl %r14d, %r14d
js 0x82fd3
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82aaa
movl $0x1f, %eax
movl 0x1c(%r12), %r13d
movl %eax, %ecx
subl %r13d, %ecx
jae 0x8302c
subl %eax, %r13d
movl %eax, %eax
leaq 0x5e8b0(%rip), %rcx # 0xe18a0
andl (%rcx,%rax,4), %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %r15, %rdi
movq %r12, -0x30(%rbp)
movq %rdx, %r12
callq 0x821b9
movq %r12, %rdx
movq -0x30(%rbp), %r12
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r14d
jmp 0x83043
movl %ecx, 0x4(%r15)
shrl %cl, %r14d
movl 0x1c(%r12), %eax
leaq 0x5e861(%rip), %rcx # 0xe18a0
andl (%rcx,%rax,4), %r14d
movl %r14d, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x83066
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
negq %r14
cmpq %rbx, %rax
je 0x83080
leaq (%rbx,%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x82aaa
addq %r14, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292a0
| uf_endspace_selected_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r15, rsi
mov r12, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_82F99
mov r14d, [r15]
dec eax
mov [r15+4], eax
bt r14d, eax
jb short loc_82FD8
jmp short loc_82FB7
loc_82F99:
mov rdi, r15
mov r14, rdx
call fill_buffer_0
mov rdx, r14
mov dword ptr [r15+4], 1Fh
mov r14d, [r15]
test r14d, r14d
js short loc_82FD3
loc_82FB7:
mov rdi, r12
mov rsi, r15
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_82FD3:
mov eax, 1Fh
loc_82FD8:
mov r13d, [r12+1Ch]
mov ecx, eax
sub ecx, r13d
jnb short loc_8302C
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r14d, [rcx+rax*4]
mov ecx, r13d
shl r14d, cl
mov rdi, r15
mov [rbp+var_30], r12
mov r12, rdx
call fill_buffer_0
mov rdx, r12
mov r12, [rbp+var_30]
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r14d, eax
jmp short loc_83043
loc_8302C:
mov [r15+4], ecx
shr r14d, cl
mov eax, [r12+1Ch]
lea rcx, mask_0
and r14d, [rcx+rax*4]
loc_83043:
mov r13d, r14d
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_83066
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83066:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_83080
lea rcx, [rbx+r14]
mov rdi, r12
mov rsi, r15
call decode_bytes_0
loc_83080:
add rbx, r14
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
| _BYTE * uf_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
long long v5; // r12
unsigned int v6; // eax
unsigned int v7; // r14d
unsigned int v8; // eax
_BYTE *v9; // r14
_BYTE *result; // rax
unsigned int v11; // r13d
unsigned int v12; // ecx
int v13; // r13d
int v14; // r14d
_BYTE *v15; // r12
unsigned int v16; // r14d
v5 = a1;
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( !_bittest((const int *)&v7, v8) )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
v9 = a3;
fill_buffer_0((long long)a2);
a3 = v9;
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
v8 = 31;
}
v11 = *(_DWORD *)(a1 + 28);
v12 = v8 - v11;
if ( v8 >= v11 )
{
a2[1] = v12;
v16 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v12);
}
else
{
v13 = v11 - v8;
v14 = (mask_0[v8] & v7) << v13;
v15 = a3;
fill_buffer_0((long long)a2);
a3 = v15;
v5 = a1;
a2[1] = 32 - v13;
v16 = (*a2 >> -(char)v13) + v14;
}
result = &a3[v16];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes_0(v5, (long long)a2, a3, &a4[-v16]);
return (_BYTE *)memset(&a4[-v16], 32LL, v16);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R15,RSI
MOV R12,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00182f99
MOV R14D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R14D,EAX
JC 0x00182fd8
JMP 0x00182fb7
LAB_00182f99:
MOV RDI,R15
MOV R14,RDX
CALL 0x001821b9
MOV RDX,R14
MOV dword ptr [R15 + 0x4],0x1f
MOV R14D,dword ptr [R15]
TEST R14D,R14D
JS 0x00182fd3
LAB_00182fb7:
MOV RDI,R12
MOV RSI,R15
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00182aaa
LAB_00182fd3:
MOV EAX,0x1f
LAB_00182fd8:
MOV R13D,dword ptr [R12 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
JNC 0x0018302c
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18a0]
AND R14D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R14D,CL
MOV RDI,R15
MOV qword ptr [RBP + -0x30],R12
MOV R12,RDX
CALL 0x001821b9
MOV RDX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R14D,EAX
JMP 0x00183043
LAB_0018302c:
MOV dword ptr [R15 + 0x4],ECX
SHR R14D,CL
MOV EAX,dword ptr [R12 + 0x1c]
LEA RCX,[0x1e18a0]
AND R14D,dword ptr [RCX + RAX*0x4]
LAB_00183043:
MOV R13D,R14D
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x00183066
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183066:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x00183080
LEA RCX,[RBX + R14*0x1]
MOV RDI,R12
MOV RSI,R15
CALL 0x00182aaa
LAB_00183080:
ADD RBX,R14
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292a0
|
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
ulong __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if ((int)uVar5 < 0) {
uVar3 = 0x1f;
goto LAB_00182fd8;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_00182fd8:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
__n = (ulong)uVar5;
if (param_3 + __n <= param_4) {
if (param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
memset((void *)(param_4 + -__n),0x20,__n);
return;
}
param_2[10] = 1;
return;
}
}
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
|
|
4,034 | pfs_start_cond_wait_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_cond_locker*
pfs_start_cond_wait_v1(PSI_cond_locker_state *state,
PSI_cond *cond, PSI_mutex *mutex,
PSI_cond_operation op,
const char *src_file, uint src_line)
{
/*
Note about the unused PSI_mutex *mutex parameter:
In the pthread library, a call to pthread_cond_wait()
causes an unlock() + lock() on the mutex associated with the condition.
This mutex operation is not instrumented, so the mutex will still
appear as locked when a thread is waiting on a condition.
This has no impact now, as unlock_mutex() is not recording events.
When unlock_mutex() is implemented by later work logs,
this parameter here will be used to adjust the mutex state,
in start_cond_wait_v1() and end_cond_wait_v1().
*/
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
assert(static_cast<int> (op) >= 0);
assert(static_cast<uint> (op) < array_elements(cond_operation_map));
assert(state != NULL);
assert(pfs_cond != NULL);
assert(pfs_cond->m_class != NULL);
if (! pfs_cond->m_enabled)
return NULL;
uint flags;
ulonglong timer_start= 0;
if (flag_thread_instrumentation)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (! pfs_thread->m_enabled)
return NULL;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD;
if (pfs_cond->m_timed)
{
timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
state->m_timer_start= timer_start;
flags|= STATE_FLAG_TIMED;
}
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
PFS_events_waits *parent_event= wait - 1;
wait->m_event_type= EVENT_TYPE_WAIT;
wait->m_nesting_event_id= parent_event->m_event_id;
wait->m_nesting_event_type= parent_event->m_event_type;
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= pfs_cond->m_class;
wait->m_timer_start= timer_start;
wait->m_timer_end= 0;
wait->m_object_instance_addr= pfs_cond->m_identity;
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= cond_operation_map[static_cast<int> (op)];
wait->m_source_file= src_file;
wait->m_source_line= src_line;
wait->m_wait_class= WAIT_CLASS_COND;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (pfs_cond->m_timed)
{
timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
state->m_timer_start= timer_start;
flags= STATE_FLAG_TIMED;
}
else
{
/*
Complete shortcut.
*/
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */
pfs_cond->m_cond_stat.m_wait_stat.aggregate_counted();
return NULL;
}
}
state->m_flags= flags;
state->m_cond= cond;
state->m_mutex= mutex;
return reinterpret_cast<PSI_cond_locker*> (state);
} | O3 | cpp | pfs_start_cond_wait_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x1, 0x4(%rsi)
jne 0x28f2f
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x3a7d8f(%rip), %rax # 0x3d0c40
cmpb $0x1, (%rax)
jne 0x28f06
movq %r8, %r13
movl %ecx, %r14d
movl %r9d, -0x2c(%rbp)
movq %r12, -0x38(%rbp)
movl 0x3a73a2(%rip), %edi # 0x3d026c
callq 0x26540
testq %rax, %rax
je 0x28f2f
movq %rax, %r12
cmpb $0x1, 0x7e0(%rax)
jne 0x28f2f
movq %r12, 0x18(%rbx)
cmpb $0x1, 0x5(%r15)
jne 0x28f36
leaq 0x2ee1c2(%rip), %rax # 0x3170b4
movl (%rax), %edi
leaq 0x28(%rbx), %rsi
callq 0x3a78f
movq %rax, 0x20(%rbx)
pushq $0x3
popq %rcx
jmp 0x28f3b
cmpb $0x1, 0x5(%r15)
jne 0x28f2b
leaq 0x2ee1a0(%rip), %rax # 0x3170b4
movl (%rax), %edi
leaq 0x28(%rbx), %rsi
callq 0x3a78f
movq %rax, 0x20(%rbx)
pushq $0x1
popq %rcx
jmp 0x29000
incq 0x20(%r15)
xorl %ebx, %ebx
jmp 0x2900a
pushq $0x2
popq %rcx
xorl %eax, %eax
movl -0x2c(%rbp), %edi
leaq 0x3a7bfb(%rip), %rdx # 0x3d0b40
cmpb $0x1, (%rdx)
jne 0x28ffc
movq 0x7f0(%r12), %rdx
movq %r12, %rsi
addq $0xc98, %rsi # imm = 0xC98
cmpq %rsi, %rdx
jae 0x2901c
movq %rdx, 0x30(%rbx)
movl $0x4, 0x18(%rdx)
movq -0xa8(%rdx), %rsi
movq %rsi, 0x20(%rdx)
movl -0x98(%rdx), %esi
movl %esi, 0x28(%rdx)
movq 0x850(%r12), %rsi
movq %rsi, (%rdx)
movq 0x18(%r15), %rsi
movq %rsi, 0x30(%rdx)
movq %rax, 0x38(%rdx)
andq $0x0, 0x40(%rdx)
movq 0x10(%r15), %rax
movq %rax, 0x88(%rdx)
movq 0x7f8(%r12), %rax
leaq 0x1(%rax), %rsi
movq %rsi, 0x7f8(%r12)
movq %rax, 0x8(%rdx)
andq $0x0, 0x10(%rdx)
orl $0x4, %ecx
movslq %r14d, %rax
leaq 0x580cf(%rip), %rsi # 0x810a8
movl (%rsi,%rax,4), %eax
movl %eax, 0x90(%rdx)
movq %r13, 0x48(%rdx)
movl %edi, 0x50(%rdx)
movl $0x3, 0x58(%rdx)
addq $0xb0, 0x7f0(%r12)
movq -0x38(%rbp), %r12
movl %ecx, (%rbx)
movq %r15, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3a3e6d(%rip), %rax # 0x3cce90
incq (%rax)
jmp 0x28f2f
| pfs_start_cond_wait_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp byte ptr [rsi+4], 1
jnz loc_28F2F
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea rax, flag_thread_instrumentation
cmp byte ptr [rax], 1
jnz short loc_28F06
mov r13, r8
mov r14d, ecx
mov [rbp+var_2C], r9d
mov [rbp+var_38], r12
mov edi, cs:THR_PFS
call _pthread_getspecific
test rax, rax
jz short loc_28F2F
mov r12, rax
cmp byte ptr [rax+7E0h], 1
jnz short loc_28F2F
mov [rbx+18h], r12
cmp byte ptr [r15+5], 1
jnz short loc_28F36
lea rax, wait_timer
mov edi, [rax]
lea rsi, [rbx+28h]
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbx+20h], rax
push 3
pop rcx
jmp short loc_28F3B
loc_28F06:
cmp byte ptr [r15+5], 1
jnz short loc_28F2B
lea rax, wait_timer
mov edi, [rax]
lea rsi, [rbx+28h]
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbx+20h], rax
push 1
pop rcx
jmp loc_29000
loc_28F2B:
inc qword ptr [r15+20h]
loc_28F2F:
xor ebx, ebx
jmp loc_2900A
loc_28F36:
push 2
pop rcx
xor eax, eax
loc_28F3B:
mov edi, [rbp+var_2C]
lea rdx, flag_events_waits_current
cmp byte ptr [rdx], 1
jnz loc_28FFC
mov rdx, [r12+7F0h]
mov rsi, r12
add rsi, 0C98h
cmp rdx, rsi
jnb loc_2901C
mov [rbx+30h], rdx
mov dword ptr [rdx+18h], 4
mov rsi, [rdx-0A8h]
mov [rdx+20h], rsi
mov esi, [rdx-98h]
mov [rdx+28h], esi
mov rsi, [r12+850h]
mov [rdx], rsi
mov rsi, [r15+18h]
mov [rdx+30h], rsi
mov [rdx+38h], rax
and qword ptr [rdx+40h], 0
mov rax, [r15+10h]
mov [rdx+88h], rax
mov rax, [r12+7F8h]
lea rsi, [rax+1]
mov [r12+7F8h], rsi
mov [rdx+8], rax
and qword ptr [rdx+10h], 0
or ecx, 4
movsxd rax, r14d
lea rsi, _ZL18cond_operation_map; cond_operation_map
mov eax, [rsi+rax*4]
mov [rdx+90h], eax
mov [rdx+48h], r13
mov [rdx+50h], edi
mov dword ptr [rdx+58h], 3
add qword ptr [r12+7F0h], 0B0h
loc_28FFC:
mov r12, [rbp+var_38]
loc_29000:
mov [rbx], ecx
mov [rbx+8], r15
mov [rbx+10h], r12
loc_2900A:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2901C:
lea rax, locker_lost
inc qword ptr [rax]
jmp loc_28F2F
| long long pfs_start_cond_wait_v1(long long a1, long long a2, long long a3, int a4, long long a5, int a6)
{
long long v6; // r12
long long v7; // rbx
long long v10; // rax
_QWORD *v11; // r12
long long timer_raw_value_and_function; // rax
int v13; // ecx
unsigned long long v14; // rdx
long long v15; // rax
if ( *(_BYTE *)(a2 + 4) == 1 )
{
v6 = a3;
v7 = a1;
if ( flag_thread_instrumentation[0] == 1 )
{
v10 = pthread_getspecific((unsigned int)THR_PFS);
if ( v10 )
{
v11 = (_QWORD *)v10;
if ( *(_BYTE *)(v10 + 2016) == 1 )
{
*(_QWORD *)(a1 + 24) = v10;
if ( *(_BYTE *)(a2 + 5) == 1 )
{
timer_raw_value_and_function = get_timer_raw_value_and_function((unsigned int)wait_timer, a1 + 40);
*(_QWORD *)(a1 + 32) = timer_raw_value_and_function;
v13 = 3;
}
else
{
v13 = 2;
timer_raw_value_and_function = 0LL;
}
if ( flag_events_waits_current != 1 )
goto LABEL_15;
v14 = v11[254];
if ( v14 < (unsigned long long)(v11 + 403) )
{
*(_QWORD *)(a1 + 48) = v14;
*(_DWORD *)(v14 + 24) = 4;
*(_QWORD *)(v14 + 32) = *(_QWORD *)(v14 - 168);
*(_DWORD *)(v14 + 40) = *(_DWORD *)(v14 - 152);
*(_QWORD *)v14 = v11[266];
*(_QWORD *)(v14 + 48) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(v14 + 56) = timer_raw_value_and_function;
*(_QWORD *)(v14 + 64) = 0LL;
*(_QWORD *)(v14 + 136) = *(_QWORD *)(a2 + 16);
v15 = v11[255];
v11[255] = v15 + 1;
*(_QWORD *)(v14 + 8) = v15;
*(_QWORD *)(v14 + 16) = 0LL;
v13 |= 4u;
*(_DWORD *)(v14 + 144) = cond_operation_map[a4];
*(_QWORD *)(v14 + 72) = a5;
*(_DWORD *)(v14 + 80) = a6;
*(_DWORD *)(v14 + 88) = 3;
v11[254] += 176LL;
LABEL_15:
v6 = a3;
goto LABEL_16;
}
++locker_lost;
}
}
}
else
{
if ( *(_BYTE *)(a2 + 5) == 1 )
{
*(_QWORD *)(a1 + 32) = get_timer_raw_value_and_function((unsigned int)wait_timer, a1 + 40);
v13 = 1;
LABEL_16:
*(_DWORD *)a1 = v13;
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = v6;
return v7;
}
++*(_QWORD *)(a2 + 32);
}
}
return 0LL;
}
| pfs_start_cond_wait_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP byte ptr [RSI + 0x4],0x1
JNZ 0x00128f2f
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[0x4d0c40]
CMP byte ptr [RAX],0x1
JNZ 0x00128f06
MOV R13,R8
MOV R14D,ECX
MOV dword ptr [RBP + -0x2c],R9D
MOV qword ptr [RBP + -0x38],R12
MOV EDI,dword ptr [0x004d026c]
CALL 0x00126540
TEST RAX,RAX
JZ 0x00128f2f
MOV R12,RAX
CMP byte ptr [RAX + 0x7e0],0x1
JNZ 0x00128f2f
MOV qword ptr [RBX + 0x18],R12
CMP byte ptr [R15 + 0x5],0x1
JNZ 0x00128f36
LEA RAX,[0x4170b4]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x28]
CALL 0x0013a78f
MOV qword ptr [RBX + 0x20],RAX
PUSH 0x3
POP RCX
JMP 0x00128f3b
LAB_00128f06:
CMP byte ptr [R15 + 0x5],0x1
JNZ 0x00128f2b
LEA RAX,[0x4170b4]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x28]
CALL 0x0013a78f
MOV qword ptr [RBX + 0x20],RAX
PUSH 0x1
POP RCX
JMP 0x00129000
LAB_00128f2b:
INC qword ptr [R15 + 0x20]
LAB_00128f2f:
XOR EBX,EBX
JMP 0x0012900a
LAB_00128f36:
PUSH 0x2
POP RCX
XOR EAX,EAX
LAB_00128f3b:
MOV EDI,dword ptr [RBP + -0x2c]
LEA RDX,[0x4d0b40]
CMP byte ptr [RDX],0x1
JNZ 0x00128ffc
MOV RDX,qword ptr [R12 + 0x7f0]
MOV RSI,R12
ADD RSI,0xc98
CMP RDX,RSI
JNC 0x0012901c
MOV qword ptr [RBX + 0x30],RDX
MOV dword ptr [RDX + 0x18],0x4
MOV RSI,qword ptr [RDX + -0xa8]
MOV qword ptr [RDX + 0x20],RSI
MOV ESI,dword ptr [RDX + -0x98]
MOV dword ptr [RDX + 0x28],ESI
MOV RSI,qword ptr [R12 + 0x850]
MOV qword ptr [RDX],RSI
MOV RSI,qword ptr [R15 + 0x18]
MOV qword ptr [RDX + 0x30],RSI
MOV qword ptr [RDX + 0x38],RAX
AND qword ptr [RDX + 0x40],0x0
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RDX + 0x88],RAX
MOV RAX,qword ptr [R12 + 0x7f8]
LEA RSI,[RAX + 0x1]
MOV qword ptr [R12 + 0x7f8],RSI
MOV qword ptr [RDX + 0x8],RAX
AND qword ptr [RDX + 0x10],0x0
OR ECX,0x4
MOVSXD RAX,R14D
LEA RSI,[0x1810a8]
MOV EAX,dword ptr [RSI + RAX*0x4]
MOV dword ptr [RDX + 0x90],EAX
MOV qword ptr [RDX + 0x48],R13
MOV dword ptr [RDX + 0x50],EDI
MOV dword ptr [RDX + 0x58],0x3
ADD qword ptr [R12 + 0x7f0],0xb0
LAB_00128ffc:
MOV R12,qword ptr [RBP + -0x38]
LAB_00129000:
MOV dword ptr [RBX],ECX
MOV qword ptr [RBX + 0x8],R15
MOV qword ptr [RBX + 0x10],R12
LAB_0012900a:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012901c:
LEA RAX,[0x4cce90]
INC qword ptr [RAX]
JMP 0x00128f2f
|
uint * pfs_start_cond_wait_v1
(uint *param_1,long param_2,int8 param_3,int param_4,int8 param_5,
int4 param_6)
{
int8 *puVar1;
long lVar2;
void *pvVar3;
int8 uVar4;
uint uVar5;
if (*(char *)(param_2 + 4) == '\x01') {
if (flag_thread_instrumentation == '\x01') {
pvVar3 = pthread_getspecific(THR_PFS);
if ((pvVar3 != (void *)0x0) && (*(char *)((long)pvVar3 + 0x7e0) == '\x01')) {
*(void **)(param_1 + 6) = pvVar3;
if (*(char *)(param_2 + 5) == '\x01') {
uVar4 = get_timer_raw_value_and_function(wait_timer,param_1 + 10);
*(int8 *)(param_1 + 8) = uVar4;
uVar5 = 3;
}
else {
uVar5 = 2;
uVar4 = 0;
}
if (flag_events_waits_current == '\x01') {
puVar1 = *(int8 **)((long)pvVar3 + 0x7f0);
if ((int8 *)((long)pvVar3 + 0xc98) <= puVar1) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
*(int8 **)(param_1 + 0xc) = puVar1;
*(int4 *)(puVar1 + 3) = 4;
puVar1[4] = puVar1[-0x15];
*(int4 *)(puVar1 + 5) = *(int4 *)(puVar1 + -0x13);
*puVar1 = *(int8 *)((long)pvVar3 + 0x850);
puVar1[6] = *(int8 *)(param_2 + 0x18);
puVar1[7] = uVar4;
puVar1[8] = 0;
puVar1[0x11] = *(int8 *)(param_2 + 0x10);
lVar2 = *(long *)((long)pvVar3 + 0x7f8);
*(long *)((long)pvVar3 + 0x7f8) = lVar2 + 1;
puVar1[1] = lVar2;
puVar1[2] = 0;
uVar5 = uVar5 | 4;
*(int4 *)(puVar1 + 0x12) =
*(int4 *)((long)&cond_operation_map + (long)param_4 * 4);
puVar1[9] = param_5;
*(int4 *)(puVar1 + 10) = param_6;
*(int4 *)(puVar1 + 0xb) = 3;
*(long *)((long)pvVar3 + 0x7f0) = *(long *)((long)pvVar3 + 0x7f0) + 0xb0;
}
LAB_00129000:
*param_1 = uVar5;
*(long *)(param_1 + 2) = param_2;
*(int8 *)(param_1 + 4) = param_3;
return param_1;
}
}
else {
if (*(char *)(param_2 + 5) == '\x01') {
uVar4 = get_timer_raw_value_and_function(wait_timer,param_1 + 10);
*(int8 *)(param_1 + 8) = uVar4;
uVar5 = 1;
goto LAB_00129000;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + 1;
}
}
return (uint *)0x0;
}
|
|
4,035 | my_append_fix_badly_formed_tail | eloqsql/strings/ctype-mb.c | static size_t
my_append_fix_badly_formed_tail(CHARSET_INFO *cs,
char *to, char *to_end,
const char *from, const char *from_end,
size_t nchars,
MY_STRCOPY_STATUS *status)
{
char *to0= to;
for ( ; nchars; nchars--)
{
int chlen;
if ((chlen= my_ci_charlen(cs, (const uchar*) from,
(const uchar *) from_end)) > 0)
{
/* Found a valid character */ /* chlen == 1..MBMAXLEN */
DBUG_ASSERT(chlen <= (int) cs->mbmaxlen);
if (to + chlen > to_end)
goto end; /* Does not fit to "to" */
memcpy(to, from, (size_t) chlen);
from+= chlen;
to+= chlen;
continue;
}
if (chlen == MY_CS_ILSEQ) /* chlen == 0 */
{
DBUG_ASSERT(from < from_end); /* Shouldn't get MY_CS_ILSEQ if empty */
goto bad;
}
/* Got an incomplete character */ /* chlen == MY_CS_TOOSMALLXXX */
DBUG_ASSERT(chlen >= MY_CS_TOOSMALL6);
DBUG_ASSERT(chlen <= MY_CS_TOOSMALL);
if (from >= from_end)
break; /* End of the source string */
bad:
/* Bad byte sequence, or incomplete character found */
if (!status->m_well_formed_error_pos)
status->m_well_formed_error_pos= from;
if ((chlen= my_ci_wc_mb(cs, '?', (uchar*) to, (uchar *) to_end)) <= 0)
break; /* Question mark does not fit into the destination */
to+= chlen;
from++;
}
end:
status->m_source_end_pos= from;
return to - to0;
} | O0 | c | my_append_fix_badly_formed_tail:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xd62d5
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xd58e0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jle 0xd6242
jmp 0xd61f2
jmp 0xd61f4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
cmpq -0x18(%rbp), %rax
jbe 0xd620a
jmp 0xd62d7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x3b0c0
movl -0x3c(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xd62c4
cmpl $0x0, -0x3c(%rbp)
jne 0xd624e
jmp 0xd624a
jmp 0xd624c
jmp 0xd6264
jmp 0xd6250
jmp 0xd6252
jmp 0xd6254
jmp 0xd6256
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xd6262
jmp 0xd62d5
jmp 0xd6264
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xd627b
movq -0x20(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x3f, %esi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jg 0xd62a7
jmp 0xd62d5
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xd61cc
jmp 0xd62d7
movq -0x20(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_append_fix_badly_formed_tail:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_D61CC:
cmp [rbp+var_30], 0
jz loc_D62D5
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_ci_charlen_2
mov [rbp+var_3C], eax
cmp eax, 0
jle short loc_D6242
jmp short $+2
loc_D61F2:
jmp short $+2
loc_D61F4:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
add rax, rcx
cmp rax, [rbp+var_18]
jbe short loc_D620A
jmp loc_D62D7
loc_D620A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
movsxd rdx, [rbp+var_3C]
call _memcpy
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_D62C4
loc_D6242:
cmp [rbp+var_3C], 0
jnz short loc_D624E
jmp short $+2
loc_D624A:
jmp short $+2
loc_D624C:
jmp short loc_D6264
loc_D624E:
jmp short $+2
loc_D6250:
jmp short $+2
loc_D6252:
jmp short $+2
loc_D6254:
jmp short $+2
loc_D6256:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_D6262
jmp short loc_D62D5
loc_D6262:
jmp short $+2
loc_D6264:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_D627B
mov rcx, [rbp+var_20]
mov rax, [rbp+arg_0]
mov [rax+8], rcx
loc_D627B:
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov esi, 3Fh ; '?'
call rax
mov [rbp+var_3C], eax
cmp eax, 0
jg short loc_D62A7
jmp short loc_D62D5
loc_D62A7:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
loc_D62C4:
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
jmp loc_D61CC
loc_D62D5:
jmp short $+2
loc_D62D7:
mov rcx, [rbp+var_20]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| long long my_append_fix_badly_formed_tail(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
int v8; // [rsp+4h] [rbp-3Ch]
int v9; // [rsp+4h] [rbp-3Ch]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a2;
while ( a6 )
{
v8 = my_ci_charlen_2(a1, a4, a5);
if ( v8 <= 0 )
{
if ( v8 && a4 >= a5 )
break;
if ( !a7[1] )
a7[1] = a4;
v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v14,
a3);
if ( v9 <= 0 )
break;
v14 += v9;
++a4;
}
else
{
if ( v8 + v14 > a3 )
break;
memcpy(v14, a4, v8);
a4 += v8;
v14 += v8;
}
--a6;
}
*a7 = a4;
return v14 - a2;
}
| my_append_fix_badly_formed_tail:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_001d61cc:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001d62d5
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001d58e0
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JLE 0x001d6242
JMP 0x001d61f2
LAB_001d61f2:
JMP 0x001d61f4
LAB_001d61f4:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001d620a
JMP 0x001d62d7
LAB_001d620a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOVSXD RDX,dword ptr [RBP + -0x3c]
CALL 0x0013b0c0
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001d62c4
LAB_001d6242:
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x001d624e
JMP 0x001d624a
LAB_001d624a:
JMP 0x001d624c
LAB_001d624c:
JMP 0x001d6264
LAB_001d624e:
JMP 0x001d6250
LAB_001d6250:
JMP 0x001d6252
LAB_001d6252:
JMP 0x001d6254
LAB_001d6254:
JMP 0x001d6256
LAB_001d6256:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001d6262
JMP 0x001d62d5
LAB_001d6262:
JMP 0x001d6264
LAB_001d6264:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001d627b
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001d627b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV ESI,0x3f
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JG 0x001d62a7
JMP 0x001d62d5
LAB_001d62a7:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
LAB_001d62c4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001d61cc
LAB_001d62d5:
JMP 0x001d62d7
LAB_001d62d7:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_append_fix_badly_formed_tail
(long param_1,void *param_2,ulong param_3,void *param_4,void *param_5,long param_6,
int8 *param_7)
{
int iVar1;
long local_38;
void *local_28;
void *local_18;
local_28 = param_4;
local_18 = param_2;
for (local_38 = param_6; local_38 != 0; local_38 = local_38 + -1) {
iVar1 = my_ci_charlen(param_1,local_28,param_5);
if (iVar1 < 1) {
if ((iVar1 != 0) && (param_5 <= local_28)) break;
if (param_7[1] == 0) {
param_7[1] = local_28;
}
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,0x3f,local_18,param_3);
if (iVar1 < 1) break;
local_28 = (void *)((long)local_28 + 1);
}
else {
if (param_3 < (ulong)((long)local_18 + (long)iVar1)) break;
memcpy(local_18,local_28,(long)iVar1);
local_28 = (void *)((long)local_28 + (long)iVar1);
}
local_18 = (void *)((long)local_18 + (long)iVar1);
}
*param_7 = local_28;
return (long)local_18 - (long)param_2;
}
|
|
4,036 | js_dump_obj | bluesky950520[P]quickjs/quickjs-libc.c | static void js_dump_obj(JSContext *ctx, FILE *f, JSValue val)
{
const char *str;
str = JS_ToCString(ctx, val);
if (str) {
fprintf(f, "%s\n", str);
JS_FreeCString(ctx, str);
} else {
fprintf(f, "[exception]\n");
}
} | O0 | c | js_dump_obj:
subq $0x28, %rsp
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x147e0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x1190e
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
leaq 0xfc18d(%rip), %rsi # 0x10da84
movb $0x0, %al
callq 0xe550
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x29e50
jmp 0x11921
movq 0x8(%rsp), %rdi
leaq 0xf894a(%rip), %rsi # 0x10a264
movb $0x0, %al
callq 0xe550
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_dump_obj:
sub rsp, 28h
mov [rsp+28h+var_10], rdx
mov [rsp+28h+var_8], rcx
mov [rsp+28h+var_18], rdi
mov [rsp+28h+var_20], rsi
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_8]
call JS_ToCString
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jz short loc_1190E
mov rdi, [rsp+28h+var_20]
mov rdx, [rsp+28h+var_28]
lea rsi, a3u2uS+0Eh; "%s\n"
mov al, 0
call _fprintf
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_28]
call JS_FreeCString
jmp short loc_11921
loc_1190E:
mov rdi, [rsp+28h+var_20]
lea rsi, aException; "[exception]\n"
mov al, 0
call _fprintf
loc_11921:
add rsp, 28h
retn
| long long js_dump_obj(long long a1, long long a2, long long a3, long long a4)
{
const char *v5; // [rsp+0h] [rbp-28h]
v5 = (const char *)JS_ToCString(a1, a3, a4);
if ( !v5 )
return fprintf(a2, "[exception]\n");
fprintf(a2, "%s\n", v5);
return JS_FreeCString(a1, v5);
}
| js_dump_obj:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001147e0
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JZ 0x0011190e
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x20da84]
MOV AL,0x0
CALL 0x0010e550
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP]
CALL 0x00129e50
JMP 0x00111921
LAB_0011190e:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x20a264]
MOV AL,0x0
CALL 0x0010e550
LAB_00111921:
ADD RSP,0x28
RET
|
void js_dump_obj(int8 param_1,FILE *param_2,int8 param_3,int8 param_4)
{
long lVar1;
lVar1 = JS_ToCString(param_1,param_3,param_4);
if (lVar1 == 0) {
fprintf(param_2,"[exception]\n");
}
else {
fprintf(param_2,"%s\n",lVar1);
JS_FreeCString(param_1,lVar1);
}
return;
}
|
|
4,037 | js_dump_obj | bluesky950520[P]quickjs/quickjs-libc.c | static void js_dump_obj(JSContext *ctx, FILE *f, JSValue val)
{
const char *str;
str = JS_ToCString(ctx, val);
if (str) {
fprintf(f, "%s\n", str);
JS_FreeCString(ctx, str);
} else {
fprintf(f, "[exception]\n");
}
} | O1 | c | js_dump_obj:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x154fb
movq %rax, %r15
leaq 0x89542(%rip), %rsi # 0x9ea20
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe550
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x20edd
leaq 0x86c4a(%rip), %rdi # 0x9c14c
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0xe8d0
| js_dump_obj:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_154FB
mov r15, rax
lea rsi, a3u2uS+0Eh; "%s\n"
mov rdi, rbx
mov rdx, rax
xor eax, eax
call _fprintf
mov rdi, r14
mov rsi, r15
pop rbx
pop r14
pop r15
jmp JS_FreeCString
loc_154FB:
lea rdi, aException; "[exception]\n"
mov esi, 0Ch
mov edx, 1
mov rcx, rbx
pop rbx
pop r14
pop r15
jmp _fwrite
| long long js_dump_obj(long long a1, long long a2, long long a3, long long a4)
{
const char *v4; // rax
const char *v5; // r15
v4 = (const char *)JS_ToCStringLen2(a1, 0LL, a3, a4, 0LL);
if ( !v4 )
return fwrite("[exception]\n", 12LL, 1LL, a2);
v5 = v4;
fprintf(a2, "%s\n", v4);
return JS_FreeCString(a1, v5);
}
| |||
4,038 | my_mutex_init | eloqsql/mysys/thr_mutex.c | void my_mutex_init()
{
/* Initialize mutex attributes */
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
Set mutex type to "fast" a.k.a "adaptive"
In this case the thread may steal the mutex from some other thread
that is waiting for the same mutex. This will save us some
context switches but may cause a thread to 'starve forever' while
waiting for the mutex (not likely if the code within the mutex is
short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,
PTHREAD_MUTEX_ADAPTIVE_NP);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
Set mutex type to "errorcheck"
*/
pthread_mutexattr_init(&my_errorcheck_mutexattr);
pthread_mutexattr_settype(&my_errorcheck_mutexattr,
PTHREAD_MUTEX_ERRORCHECK);
#endif
#if defined(SAFE_MUTEX_DEFINED)
safe_mutex_global_init();
#endif
} | O0 | c | my_mutex_init:
pushq %rbp
movq %rsp, %rbp
leaq 0x3751f5(%rip), %rdi # 0x3f3bb0
callq 0x369f0
leaq 0x3751e9(%rip), %rdi # 0x3f3bb0
movl $0x3, %esi
callq 0x36520
leaq 0x3751dc(%rip), %rdi # 0x3f3bb4
callq 0x369f0
leaq 0x3751d0(%rip), %rdi # 0x3f3bb4
movl $0x2, %esi
callq 0x36520
popq %rbp
retq
| my_mutex_init:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_init
lea rdi, my_fast_mutexattr
mov esi, 3
call _pthread_mutexattr_settype
lea rdi, my_errorcheck_mutexattr
call _pthread_mutexattr_init
lea rdi, my_errorcheck_mutexattr
mov esi, 2
call _pthread_mutexattr_settype
pop rbp
retn
| long long my_mutex_init()
{
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr, 3LL);
pthread_mutexattr_init(&my_errorcheck_mutexattr);
return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL);
}
| my_mutex_init:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x4f3bb0]
CALL 0x001369f0
LEA RDI,[0x4f3bb0]
MOV ESI,0x3
CALL 0x00136520
LEA RDI,[0x4f3bb4]
CALL 0x001369f0
LEA RDI,[0x4f3bb4]
MOV ESI,0x2
CALL 0x00136520
POP RBP
RET
|
void my_mutex_init(void)
{
pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3);
pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2);
return;
}
|
|
4,039 | MNN::Extra::UnPackTo(MNN::ExtraT*, std::__1::function<void (void**, unsigned long)> const*) const | mnn-tts/MNN/schema/current/MNN_generated.h | inline void Extra::UnPackTo(ExtraT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = type(); if (_e) _o->type = _e->str(); };
{ auto _e = engine(); if (_e) _o->engine = _e->str(); };
{ auto _e = info(); if (_e) { _o->info.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->info[_i] = _e->Get(_i); } } };
{ auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr<AttributeT>(_e->Get(_i)->UnPack(_resolver)); } } };
{ auto _e = vector(); _o->vector = _e; };
} | O0 | c | MNN::Extra::UnPackTo(MNN::ExtraT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x27190
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x26f9b
movq 0x98(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x8540
movq 0xa8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x85a0
leaq 0x80(%rsp), %rdi
callq 0x6230
movq 0x28(%rsp), %rdi
callq 0x271b0
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x26fe1
movq 0x78(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x8540
movq 0xa8(%rsp), %rdi
addq $0x18, %rdi
leaq 0x60(%rsp), %rsi
callq 0x85a0
leaq 0x60(%rsp), %rdi
callq 0x6230
movq 0x28(%rsp), %rdi
callq 0x271d0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x27087
movq 0xa8(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
callq 0xb740
movq 0x20(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xb6d0
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x58(%rsp), %rdi
callq 0xb740
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jae 0x27085
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0xb760
movb %al, 0x1b(%rsp)
movq 0xa8(%rsp), %rdi
addq $0x30, %rdi
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0xb7d0
movb 0x1b(%rsp), %cl
movb %cl, (%rax)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x2702d
jmp 0x27087
movq 0x28(%rsp), %rdi
callq 0x271f0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x2715a
movq 0xa8(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
callq 0x1a1b0
movq 0x10(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x1a140
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rdi
callq 0x1a1b0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jae 0x27158
movq 0x48(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x1a1d0
movq %rax, %rdi
movq 0xa0(%rsp), %rsi
callq 0x1a240
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x1a2a0
movq 0xa8(%rsp), %rdi
addq $0x48, %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0x1a2c0
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x1a2e0
leaq 0x38(%rsp), %rdi
callq 0x1a320
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x270d3
jmp 0x2715a
movq 0x28(%rsp), %rdi
callq 0x27210
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %cl
movq 0xa8(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x60(%rax)
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZNK3MNN5Extra8UnPackToEPNS_6ExtraTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rdi, [rsp+0B8h+var_8]; this
mov [rsp+0B8h+var_90], rdi
call _ZNK3MNN5Extra4typeEv; MNN::Extra::type(void)
mov [rsp+0B8h+var_20], rax
cmp [rsp+0B8h+var_20], 0
jz short loc_26F9B
mov rsi, [rsp+0B8h+var_20]
lea rdi, [rsp+0B8h+var_38]; this
call _ZNK11flatbuffers6String3strEv; flatbuffers::String::str(void)
mov rdi, [rsp+0B8h+var_10]
lea rsi, [rsp+0B8h+var_38]
call _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8nn200100EOS5_; std::string::operator=(std::string&&)
lea rdi, [rsp+0B8h+var_38]
call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev; std::string::~string()
loc_26F9B:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN5Extra6engineEv; MNN::Extra::engine(void)
mov [rsp+0B8h+var_40], rax
cmp [rsp+0B8h+var_40], 0
jz short loc_26FE1
mov rsi, [rsp+0B8h+var_40]
lea rdi, [rsp+0B8h+var_58]; this
call _ZNK11flatbuffers6String3strEv; flatbuffers::String::str(void)
mov rdi, [rsp+0B8h+var_10]
add rdi, 18h
lea rsi, [rsp+0B8h+var_58]
call _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8nn200100EOS5_; std::string::operator=(std::string&&)
lea rdi, [rsp+0B8h+var_58]
call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev; std::string::~string()
loc_26FE1:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN5Extra4infoEv; MNN::Extra::info(void)
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_60], 0
jz loc_27087
mov rax, [rsp+0B8h+var_10]
add rax, 30h ; '0'
mov [rsp+0B8h+var_98], rax
mov rdi, [rsp+0B8h+var_60]
call _ZNK11flatbuffers6VectorIaE4sizeEv; flatbuffers::Vector<signed char>::size(void)
mov rdi, [rsp+0B8h+var_98]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIaNS_9allocatorIaEEE6resizeEm; std::vector<signed char>::resize(ulong)
mov [rsp+0B8h+var_64], 0
loc_2702D:
mov eax, [rsp+0B8h+var_64]
mov [rsp+0B8h+var_9C], eax
mov rdi, [rsp+0B8h+var_60]
call _ZNK11flatbuffers6VectorIaE4sizeEv; flatbuffers::Vector<signed char>::size(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_9C]
cmp eax, ecx
jnb short loc_27085
mov rdi, [rsp+0B8h+var_60]
mov esi, [rsp+0B8h+var_64]
call _ZNK11flatbuffers6VectorIaE3GetEj; flatbuffers::Vector<signed char>::Get(uint)
mov [rsp+0B8h+var_9D], al
mov rdi, [rsp+0B8h+var_10]
add rdi, 30h ; '0'
mov eax, [rsp+0B8h+var_64]
mov esi, eax
call _ZNSt3__16vectorIaNS_9allocatorIaEEEixB8nn200100Em; std::vector<signed char>::operator[](ulong)
mov cl, [rsp+0B8h+var_9D]
mov [rax], cl
mov eax, [rsp+0B8h+var_64]
add eax, 1
mov [rsp+0B8h+var_64], eax
jmp short loc_2702D
loc_27085:
jmp short $+2
loc_27087:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN5Extra4attrEv; MNN::Extra::attr(void)
mov [rsp+0B8h+var_70], rax
cmp [rsp+0B8h+var_70], 0
jz loc_2715A
mov rax, [rsp+0B8h+var_10]
add rax, 48h ; 'H'
mov [rsp+0B8h+var_A8], rax
mov rdi, [rsp+0B8h+var_70]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9AttributeEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(void)
mov rdi, [rsp+0B8h+var_A8]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10AttributeTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE6resizeEm; std::vector<std::unique_ptr<MNN::AttributeT>>::resize(ulong)
mov [rsp+0B8h+var_74], 0
loc_270D3:
mov eax, [rsp+0B8h+var_74]
mov [rsp+0B8h+var_AC], eax
mov rdi, [rsp+0B8h+var_70]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9AttributeEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_AC]
cmp eax, ecx
jnb short loc_27158
mov rdi, [rsp+0B8h+var_70]
mov esi, [rsp+0B8h+var_74]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9AttributeEEEE3GetEj; flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::Get(uint)
mov rdi, rax
mov rsi, [rsp+0B8h+var_18]
call _ZNK3MNN9Attribute6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::Attribute::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0B8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN10AttributeTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::AttributeT>::unique_ptr<true,void>(MNN::AttributeT*)
mov rdi, [rsp+0B8h+var_10]
add rdi, 48h ; 'H'
mov eax, [rsp+0B8h+var_74]
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10AttributeTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEEixB8nn200100Em; std::vector<std::unique_ptr<MNN::AttributeT>>::operator[](ulong)
mov rdi, rax
lea rsi, [rsp+0B8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN10AttributeTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::AttributeT>::operator=(std::unique_ptr<MNN::AttributeT>&&)
lea rdi, [rsp+0B8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN10AttributeTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::AttributeT>::~unique_ptr()
mov eax, [rsp+0B8h+var_74]
add eax, 1
mov [rsp+0B8h+var_74], eax
jmp loc_270D3
loc_27158:
jmp short $+2
loc_2715A:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN5Extra6vectorEv; MNN::Extra::vector(void)
and al, 1
mov [rsp+0B8h+var_81], al
mov cl, [rsp+0B8h+var_81]
mov rax, [rsp+0B8h+var_10]
and cl, 1
mov [rax+60h], cl
add rsp, 0B8h
retn
| long long MNN::Extra::UnPackTo(MNN::Extra *a1, long long a2, long long a3)
{
unsigned int v3; // eax
unsigned int v4; // eax
long long v5; // rax
MNN::AttributeT *v6; // rax
long long v7; // rax
char v8; // cl
long long result; // rax
unsigned int v10; // [rsp+Ch] [rbp-ACh]
_QWORD *v11; // [rsp+10h] [rbp-A8h]
char v12; // [rsp+1Bh] [rbp-9Dh]
_QWORD *v13; // [rsp+20h] [rbp-98h]
long long v14; // [rsp+38h] [rbp-80h] BYREF
unsigned int j; // [rsp+44h] [rbp-74h]
unsigned int *v16; // [rsp+48h] [rbp-70h]
unsigned int i; // [rsp+54h] [rbp-64h]
unsigned int *v18; // [rsp+58h] [rbp-60h]
_BYTE v19[24]; // [rsp+60h] [rbp-58h] BYREF
flatbuffers::String *v20; // [rsp+78h] [rbp-40h]
_BYTE v21[24]; // [rsp+80h] [rbp-38h] BYREF
flatbuffers::String *v22; // [rsp+98h] [rbp-20h]
long long v23; // [rsp+A0h] [rbp-18h]
long long v24; // [rsp+A8h] [rbp-10h]
MNN::Extra *v25; // [rsp+B0h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = (flatbuffers::String *)MNN::Extra::type(a1);
if ( v22 )
{
flatbuffers::String::str((flatbuffers::String *)v21, v22);
std::string::operator=[abi:nn200100](v24, (long long)v21);
std::string::~string(v21);
}
v20 = (flatbuffers::String *)MNN::Extra::engine(a1);
if ( v20 )
{
flatbuffers::String::str((flatbuffers::String *)v19, v20);
std::string::operator=[abi:nn200100](v24 + 24, (long long)v19);
std::string::~string(v19);
}
v18 = (unsigned int *)MNN::Extra::info(a1);
if ( v18 )
{
v13 = (_QWORD *)(v24 + 48);
v3 = flatbuffers::Vector<signed char>::size(v18);
std::vector<signed char>::resize(v13, v3);
for ( i = 0; i < (unsigned int)flatbuffers::Vector<signed char>::size(v18); ++i )
{
v12 = flatbuffers::Vector<signed char>::Get(v18, i);
*(_BYTE *)std::vector<signed char>::operator[][abi:nn200100]((_QWORD *)(v24 + 48), i) = v12;
}
}
v16 = (unsigned int *)MNN::Extra::attr(a1);
if ( v16 )
{
v11 = (_QWORD *)(v24 + 72);
v4 = flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(v16);
std::vector<std::unique_ptr<MNN::AttributeT>>::resize(v11, v4);
for ( j = 0; ; ++j )
{
v10 = j;
if ( v10 >= (unsigned int)flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(v16) )
break;
v5 = flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::Get(v16, j);
v6 = MNN::Attribute::UnPack(v5, v23);
std::unique_ptr<MNN::AttributeT>::unique_ptr[abi:nn200100]<true,void>(&v14, (long long)v6);
v7 = std::vector<std::unique_ptr<MNN::AttributeT>>::operator[][abi:nn200100]((_QWORD *)(v24 + 72), j);
std::unique_ptr<MNN::AttributeT>::operator=[abi:nn200100](v7, (long long)&v14);
std::unique_ptr<MNN::AttributeT>::~unique_ptr[abi:nn200100]((long long)&v14);
}
}
v8 = MNN::Extra::vector(a1) & 1;
result = v24;
*(_BYTE *)(v24 + 96) = v8 & 1;
return result;
}
| UnPackTo:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV RDI,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00127190
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],0x0
JZ 0x00126f9b
MOV RSI,qword ptr [RSP + 0x98]
LEA RDI,[RSP + 0x80]
CALL 0x00108540
MOV RDI,qword ptr [RSP + 0xa8]
LEA RSI,[RSP + 0x80]
CALL 0x001085a0
LEA RDI,[RSP + 0x80]
CALL 0x00106230
LAB_00126f9b:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001271b0
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x00126fe1
MOV RSI,qword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x60]
CALL 0x00108540
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x18
LEA RSI,[RSP + 0x60]
CALL 0x001085a0
LEA RDI,[RSP + 0x60]
CALL 0x00106230
LAB_00126fe1:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001271d0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JZ 0x00127087
MOV RAX,qword ptr [RSP + 0xa8]
ADD RAX,0x30
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0010b740
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0010b6d0
MOV dword ptr [RSP + 0x54],0x0
LAB_0012702d:
MOV EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0010b740
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JNC 0x00127085
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x54]
CALL 0x0010b760
MOV byte ptr [RSP + 0x1b],AL
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x30
MOV EAX,dword ptr [RSP + 0x54]
MOV ESI,EAX
CALL 0x0010b7d0
MOV CL,byte ptr [RSP + 0x1b]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RSP + 0x54]
ADD EAX,0x1
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0012702d
LAB_00127085:
JMP 0x00127087
LAB_00127087:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001271f0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0012715a
MOV RAX,qword ptr [RSP + 0xa8]
ADD RAX,0x48
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0011a1b0
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0011a140
MOV dword ptr [RSP + 0x44],0x0
LAB_001270d3:
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0011a1b0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JNC 0x00127158
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RSP + 0x44]
CALL 0x0011a1d0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x0011a240
MOV RSI,RAX
LEA RDI,[RSP + 0x38]
CALL 0x0011a2a0
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x48
MOV EAX,dword ptr [RSP + 0x44]
MOV ESI,EAX
CALL 0x0011a2c0
MOV RDI,RAX
LEA RSI,[RSP + 0x38]
CALL 0x0011a2e0
LEA RDI,[RSP + 0x38]
CALL 0x0011a320
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
JMP 0x001270d3
LAB_00127158:
JMP 0x0012715a
LAB_0012715a:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00127210
AND AL,0x1
MOV byte ptr [RSP + 0x37],AL
MOV CL,byte ptr [RSP + 0x37]
MOV RAX,qword ptr [RSP + 0xa8]
AND CL,0x1
MOV byte ptr [RAX + 0x60],CL
ADD RSP,0xb8
RET
|
/* MNN::Extra::UnPackTo(MNN::ExtraT*, std::function<void (void**, unsigned long)> const*) const */
void __thiscall MNN::Extra::UnPackTo(Extra *this,ExtraT *param_1,function *param_2)
{
int1 uVar1;
byte bVar2;
uint uVar3;
uint uVar4;
vector<signed_char,std::allocator<signed_char>> *this_00;
int1 *puVar5;
vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>>
*this_01;
Attribute *this_02;
int8 uVar6;
unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>> *this_03;
unique_ptr local_80 [12];
uint local_74;
Vector<flatbuffers::Offset<MNN::Attribute>> *local_70;
uint local_64;
Vector<signed_char> *local_60;
string local_58 [24];
long local_40;
string local_38 [24];
long local_20;
function *local_18;
ExtraT *local_10;
Extra *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
local_20 = type(this);
if (local_20 != 0) {
flatbuffers::String::str();
std::string::operator=[abi_nn200100_((string *)local_10,local_38);
std::string::~string(local_38);
}
local_40 = engine(this);
if (local_40 != 0) {
flatbuffers::String::str();
std::string::operator=[abi_nn200100_((string *)(local_10 + 0x18),local_58);
std::string::~string(local_58);
}
local_60 = (Vector<signed_char> *)info(this);
if (local_60 != (Vector<signed_char> *)0x0) {
this_00 = (vector<signed_char,std::allocator<signed_char>> *)(local_10 + 0x30);
uVar3 = flatbuffers::Vector<signed_char>::size(local_60);
std::vector<signed_char,std::allocator<signed_char>>::resize(this_00,(ulong)uVar3);
for (local_64 = 0; uVar3 = local_64, uVar4 = flatbuffers::Vector<signed_char>::size(local_60),
uVar3 < uVar4; local_64 = local_64 + 1) {
uVar1 = flatbuffers::Vector<signed_char>::Get(local_60,local_64);
puVar5 = (int1 *)
std::vector<signed_char,std::allocator<signed_char>>::operator[][abi_nn200100_
((vector<signed_char,std::allocator<signed_char>> *)(local_10 + 0x30),
(ulong)local_64);
*puVar5 = uVar1;
}
}
local_70 = (Vector<flatbuffers::Offset<MNN::Attribute>> *)attr(this);
if (local_70 != (Vector<flatbuffers::Offset<MNN::Attribute>> *)0x0) {
this_01 = (vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>>
*)(local_10 + 0x48);
uVar3 = flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(local_70);
std::
vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>>
::resize(this_01,(ulong)uVar3);
for (local_74 = 0; uVar3 = local_74,
uVar4 = flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::size(local_70),
uVar3 < uVar4; local_74 = local_74 + 1) {
this_02 = (Attribute *)
flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>::Get(local_70,local_74);
uVar6 = Attribute::UnPack(this_02,local_18);
_ZNSt3__110unique_ptrIN3MNN10AttributeTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_80,uVar6);
this_03 = (unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>> *)
std::
vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>>
::operator[][abi_nn200100_
((vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>>
*)(local_10 + 0x48),(ulong)local_74);
std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>::operator=[abi_nn200100_
(this_03,local_80);
std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>> *)local_80);
}
}
bVar2 = vector(this);
local_10[0x60] = (ExtraT)(bVar2 & 1);
return;
}
|
|
4,040 | engine_port_event_queue | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/port/engine_qoraal.c | int32_t
engine_port_event_queue (PENGINE_EVENT_T event, uint16_t event_id,
int32_t reg, uintptr_t parm, int32_t timeout)
{
if (event) {
ENGINE_EVENT_T * task = (ENGINE_EVENT_T*)event ;
if (timeout>= 0) {
task->event = event_id ;
task->event_register = reg ;
if (svc_tasks_schedule (&task->task, port_event_queue_callback, parm,
SERVICE_ENGINE_TASK_QUEUE, timeout ? SVC_TASK_MS2TICKS(timeout) : 0) == EOK) {
return EOK ;
}
}
engine_task_free (task) ;
}
return ENGINE_FAIL ;
} | O3 | c | engine_port_event_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xdc47
movq %rdi, %rbx
testl %r8d, %r8d
js 0xdbb1
movzwl %si, %eax
movl %eax, 0x28(%rbx)
movl %edx, 0x2c(%rbx)
xorl %r14d, %r14d
movl $0x0, %eax
testl %r8d, %r8d
je 0xdb8f
imull $0x3e8, %r8d, %eax # imm = 0x3E8
addq $0x3e7, %rax # imm = 0x3E7
movabsq $0x4189374bc6a7f0, %rdx # imm = 0x4189374BC6A7F0
mulq %rdx
movq %rdx, %rax
leaq 0xb9(%rip), %rsi # 0xdc4f
movq %rbx, %rdi
movq %rcx, %rdx
movl $0x2, %ecx
movl %eax, %r8d
callq 0x19122
testl %eax, %eax
je 0xdc47
leaq 0x31548(%rip), %rdi # 0x3f100
callq 0x14ff0
decl 0x31b55(%rip) # 0x3f718
movq %rbx, %rdi
callq 0x195b2
testb $0x1, %al
jne 0xdbea
leaq 0x3152a(%rip), %rdi # 0x3f100
callq 0x15015
movl $0x1, %edi
movq %rbx, %rsi
callq 0x14243
jmp 0xdc41
movl 0x30784(%rip), %eax # 0x3e374
cmpl $0x14, %eax
jl 0xdc1c
leaq 0x32d4c(%rip), %rcx # 0x40948
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xdc1c
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0xdc1c
leaq 0x18494(%rip), %rdi # 0x260a8
callq *%rcx
movl 0x30758(%rip), %eax # 0x3e374
incl %eax
movl %eax, 0x30750(%rip) # 0x3e374
movq 0x31ae5(%rip), %rax # 0x3f710
movq %rax, (%rbx)
movq %rbx, 0x31adb(%rip) # 0x3f710
leaq 0x314c4(%rip), %rdi # 0x3f100
callq 0x15015
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
| engine_port_event_queue:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14d, 0FFFFFFFFh
test rdi, rdi
jz loc_DC47
mov rbx, rdi
test r8d, r8d
js short loc_DBB1
movzx eax, si
mov [rbx+28h], eax
mov [rbx+2Ch], edx
xor r14d, r14d
mov eax, 0
test r8d, r8d
jz short loc_DB8F
imul eax, r8d, 3E8h
add rax, 3E7h
mov rdx, 4189374BC6A7F0h
mul rdx
mov rax, rdx
loc_DB8F:
lea rsi, port_event_queue_callback
mov rdi, rbx
mov rdx, rcx
mov ecx, 2
mov r8d, eax
call svc_tasks_schedule
test eax, eax
jz loc_DC47
loc_DBB1:
lea rdi, _engine_task_mutex
call os_mutex_lock
dec cs:_engine_task_store_alloc
mov rdi, rbx
call svc_tasks_get_flags
test al, 1
jnz short loc_DBEA
lea rdi, _engine_task_mutex
call os_mutex_unlock
mov edi, 1
mov rsi, rbx
call qoraal_free
jmp short loc_DC41
loc_DBEA:
mov eax, cs:_engine_task_store_cnt
cmp eax, 14h
jl short loc_DC1C
lea rcx, _qoraal_instance
mov rcx, [rcx]
test rcx, rcx
jz short loc_DC1C
mov rcx, [rcx+18h]
test rcx, rcx
jz short loc_DC1C
lea rdi, aErrEngineTaskF; "[err] ---> engine_task_free\r\n"
call rcx
mov eax, cs:_engine_task_store_cnt
loc_DC1C:
inc eax
mov cs:_engine_task_store_cnt, eax
mov rax, cs:_engine_task_store_0
mov [rbx], rax
mov cs:_engine_task_store_0, rbx
lea rdi, _engine_task_mutex
call os_mutex_unlock
loc_DC41:
mov r14d, 0FFFFFFFFh
loc_DC47:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long engine_port_event_queue(long long a1, unsigned __int16 a2, int a3, long long a4, int a5)
{
unsigned int v5; // r14d
long long v6; // rax
int v7; // eax
void ( *v8)(char *); // rcx
v5 = -1;
if ( a1 )
{
if ( a5 < 0 )
goto LABEL_6;
*(_DWORD *)(a1 + 40) = a2;
*(_DWORD *)(a1 + 44) = a3;
v5 = 0;
LODWORD(v6) = 0;
if ( a5 )
v6 = (0x4189374BC6A7F0LL * (unsigned __int128)((unsigned long long)(unsigned int)(1000 * a5) + 999)) >> 64;
if ( (unsigned int)svc_tasks_schedule(a1, port_event_queue_callback, a4, 2LL, (unsigned int)v6) )
{
LABEL_6:
os_mutex_lock(&engine_task_mutex);
--engine_task_store_alloc;
if ( (svc_tasks_get_flags(a1) & 1) != 0 )
{
v7 = engine_task_store_cnt;
if ( engine_task_store_cnt >= 20 )
{
if ( qoraal_instance )
{
v8 = *(void ( **)(char *))(qoraal_instance + 24);
if ( v8 )
{
v8(aErrEngineTaskF);
v7 = engine_task_store_cnt;
}
}
}
engine_task_store_cnt = v7 + 1;
*(_QWORD *)a1 = engine_task_store_0;
engine_task_store_0 = a1;
os_mutex_unlock(&engine_task_mutex);
}
else
{
os_mutex_unlock(&engine_task_mutex);
qoraal_free(1LL, a1);
}
return (unsigned int)-1;
}
}
return v5;
}
| engine_port_event_queue:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14D,0xffffffff
TEST RDI,RDI
JZ 0x0010dc47
MOV RBX,RDI
TEST R8D,R8D
JS 0x0010dbb1
MOVZX EAX,SI
MOV dword ptr [RBX + 0x28],EAX
MOV dword ptr [RBX + 0x2c],EDX
XOR R14D,R14D
MOV EAX,0x0
TEST R8D,R8D
JZ 0x0010db8f
IMUL EAX,R8D,0x3e8
ADD RAX,0x3e7
MOV RDX,0x4189374bc6a7f0
MUL RDX
MOV RAX,RDX
LAB_0010db8f:
LEA RSI,[0x10dc4f]
MOV RDI,RBX
MOV RDX,RCX
MOV ECX,0x2
MOV R8D,EAX
CALL 0x00119122
TEST EAX,EAX
JZ 0x0010dc47
LAB_0010dbb1:
LEA RDI,[0x13f100]
CALL 0x00114ff0
DEC dword ptr [0x0013f718]
MOV RDI,RBX
CALL 0x001195b2
TEST AL,0x1
JNZ 0x0010dbea
LEA RDI,[0x13f100]
CALL 0x00115015
MOV EDI,0x1
MOV RSI,RBX
CALL 0x00114243
JMP 0x0010dc41
LAB_0010dbea:
MOV EAX,dword ptr [0x0013e374]
CMP EAX,0x14
JL 0x0010dc1c
LEA RCX,[0x140948]
MOV RCX,qword ptr [RCX]
TEST RCX,RCX
JZ 0x0010dc1c
MOV RCX,qword ptr [RCX + 0x18]
TEST RCX,RCX
JZ 0x0010dc1c
LEA RDI,[0x1260a8]
CALL RCX
MOV EAX,dword ptr [0x0013e374]
LAB_0010dc1c:
INC EAX
MOV dword ptr [0x0013e374],EAX
MOV RAX,qword ptr [0x0013f710]
MOV qword ptr [RBX],RAX
MOV qword ptr [0x0013f710],RBX
LEA RDI,[0x13f100]
CALL 0x00115015
LAB_0010dc41:
MOV R14D,0xffffffff
LAB_0010dc47:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8
engine_port_event_queue
(int8 *param_1,ushort param_2,int4 param_3,int8 param_4,int param_5)
{
int4 uVar1;
int iVar2;
ulong uVar3;
if (param_1 != (int8 *)0x0) {
if (-1 < param_5) {
*(uint *)(param_1 + 5) = (uint)param_2;
*(int4 *)((long)param_1 + 0x2c) = param_3;
uVar1 = 0;
if (param_5 != 0) {
uVar1 = (int4)(((ulong)(uint)(param_5 * 1000) + 999) / 1000);
}
iVar2 = svc_tasks_schedule(param_1,port_event_queue_callback,param_4,2,uVar1);
if (iVar2 == 0) {
return 0;
}
}
os_mutex_lock(&_engine_task_mutex);
_engine_task_store_alloc = _engine_task_store_alloc + -1;
uVar3 = svc_tasks_get_flags(param_1);
if ((uVar3 & 1) == 0) {
os_mutex_unlock(&_engine_task_mutex);
qoraal_free(1,param_1);
}
else {
if (((0x13 < _engine_task_store_cnt) && (_qoraal_instance != 0)) &&
(*(code **)(_qoraal_instance + 0x18) != (code *)0x0)) {
(**(code **)(_qoraal_instance + 0x18))(s__err_____>_engine_task_free_001260a8);
}
_engine_task_store_cnt = _engine_task_store_cnt + 1;
*param_1 = _engine_task_store_0;
_engine_task_store_0 = param_1;
os_mutex_unlock(&_engine_task_mutex);
}
}
return 0xffffffff;
}
|
|
4,041 | my_coll_parser_exec | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_exec(MY_COLL_RULE_PARSER *p)
{
if (!my_coll_parser_scan_settings(p))
return 0;
while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_RESET)
{
if (!my_coll_parser_scan_rule(p))
return 0;
}
/* Make sure no unparsed input data left */
return my_coll_parser_scan_term(p, MY_COLL_LEXEM_EOF);
} | O0 | c | my_coll_parser_exec:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ea70
cmpl $0x0, %eax
jne 0x9e443
movl $0x0, -0x4(%rbp)
jmp 0x9e47a
jmp 0x9e445
movq -0x10(%rbp), %rdi
callq 0x9e5a0
cmpl $0x4, (%rax)
jne 0x9e46c
movq -0x10(%rbp), %rdi
callq 0x9eac0
cmpl $0x0, %eax
jne 0x9e46a
movl $0x0, -0x4(%rbp)
jmp 0x9e47a
jmp 0x9e445
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x9eb70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_exec:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_scan_settings
cmp eax, 0
jnz short loc_9E443
mov [rbp+var_4], 0
jmp short loc_9E47A
loc_9E443:
jmp short $+2
loc_9E445:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 4
jnz short loc_9E46C
mov rdi, [rbp+var_10]
call my_coll_parser_scan_rule
cmp eax, 0
jnz short loc_9E46A
mov [rbp+var_4], 0
jmp short loc_9E47A
loc_9E46A:
jmp short loc_9E445
loc_9E46C:
mov rdi, [rbp+var_10]
xor esi, esi
call my_coll_parser_scan_term
mov [rbp+var_4], eax
loc_9E47A:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| long long my_coll_parser_exec(long long a1)
{
if ( (unsigned int)my_coll_parser_scan_settings(a1) )
{
while ( *(_DWORD *)my_coll_parser_curr(a1) == 4 )
{
if ( !(unsigned int)my_coll_parser_scan_rule(a1) )
return 0;
}
return (unsigned int)my_coll_parser_scan_term(a1, 0LL);
}
else
{
return 0;
}
}
| my_coll_parser_exec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019ea70
CMP EAX,0x0
JNZ 0x0019e443
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019e47a
LAB_0019e443:
JMP 0x0019e445
LAB_0019e445:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019e5a0
CMP dword ptr [RAX],0x4
JNZ 0x0019e46c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019eac0
CMP EAX,0x0
JNZ 0x0019e46a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019e47a
LAB_0019e46a:
JMP 0x0019e445
LAB_0019e46c:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x0019eb70
MOV dword ptr [RBP + -0x4],EAX
LAB_0019e47a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_exec(int8 param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
iVar1 = my_coll_parser_scan_settings(param_1);
while( true ) {
if (iVar1 == 0) {
return 0;
}
piVar3 = (int *)my_coll_parser_curr(param_1);
if (*piVar3 != 4) break;
iVar1 = my_coll_parser_scan_rule(param_1);
}
uVar2 = my_coll_parser_scan_term(param_1,0);
return uVar2;
}
|
|
4,042 | my_like_range_simple | eloqsql/strings/ctype-simple.c | my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str,char *max_str,
size_t *min_length, size_t *max_length)
{
const char *end= ptr + ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
size_t charlen= res_length / cs->mbmaxlen;
for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--)
{
if (*ptr == escape && ptr+1 != end)
{
ptr++; /* Skip escape */
*min_str++= *max_str++ = *ptr;
continue;
}
if (*ptr == w_one) /* '_' in SQL */
{
*min_str++='\0'; /* This should be min char */
*max_str++= (char) cs->max_sort_char;
continue;
}
if (*ptr == w_many) /* '%' in SQL */
{
/* Calculate length of keys */
*min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ?
(size_t) (min_str - min_org) :
res_length;
*max_length= res_length;
do
{
*min_str++= 0;
*max_str++= (char) cs->max_sort_char;
} while (min_str != min_end);
return 0;
}
*min_str++= *max_str++ = *ptr;
}
*min_length= *max_length = (size_t) (min_str - min_org);
while (min_str != min_end)
*min_str++= *max_str++ = ' '; /* Because if key compression */
return 0;
} | O3 | c | my_like_range_simple:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r10
movq 0x30(%rbp), %rdx
movq 0x28(%rbp), %r12
movq 0x20(%rbp), %rbx
movq 0x18(%rbp), %r14
movq 0x10(%rbp), %r11
testq %r10, %r10
je 0x58b79
addq %rsi, %r10
movl 0x9c(%rdi), %r15d
xorl %r13d, %r13d
movq %r11, %rax
xorl %edx, %edx
divq %r15
addq $-0x1, %rax
setb %dl
cmpq %r13, %r11
je 0x58b6c
testb %dl, %dl
je 0x58b6c
movb (%rsi), %r15b
cmpb %cl, %r15b
jne 0x58b38
leaq 0x1(%rsi), %rdx
cmpq %r10, %rdx
je 0x58b38
movb (%rdx), %sil
movb %sil, (%rbx,%r13)
movb %sil, (%r14,%r13)
jmp 0x58b5e
cmpb %r8b, %r15b
jne 0x58b4e
movb $0x0, (%r14,%r13)
movb 0xa8(%rdi), %dl
movb %dl, (%rbx,%r13)
jmp 0x58b5b
cmpb %r9b, %r15b
je 0x58baf
movb %r15b, (%rbx,%r13)
movb %r15b, (%r14,%r13)
movq %rsi, %rdx
incq %rdx
incq %r13
movq %rdx, %rsi
cmpq %r10, %rdx
jne 0x58b0a
leaq (%r14,%r13), %rax
addq %r13, %rbx
movq 0x30(%rbp), %rdx
jmp 0x58b7c
movq %r14, %rax
addq %r14, %r11
movq %rax, %rcx
subq %r14, %rcx
movq %rcx, (%rdx)
movq %rcx, (%r12)
cmpq %r11, %rax
je 0x58ba2
movb $0x20, %cl
movb %cl, (%rbx)
incq %rbx
movb %cl, (%rax)
incq %rax
cmpq %r11, %rax
jne 0x58b93
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl $0x20010, 0xc(%rdi) # imm = 0x20010
movq %r13, %rax
cmoveq %r11, %rax
movq %rax, (%r12)
movq 0x30(%rbp), %rax
movq %r11, (%rax)
movb $0x0, (%r14,%r13)
movb 0xa8(%rdi), %al
movb %al, (%rbx,%r13)
incq %r13
cmpq %r13, %r11
jne 0x58bc8
jmp 0x58ba2
| my_like_range_simple:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r10, rdx
mov rdx, [rbp+arg_20]
mov r12, [rbp+arg_18]
mov rbx, [rbp+arg_10]
mov r14, [rbp+arg_8]
mov r11, [rbp+arg_0]
test r10, r10
jz loc_58B79
add r10, rsi
mov r15d, [rdi+9Ch]
xor r13d, r13d
mov rax, r11
xor edx, edx
div r15
loc_58B0A:
add rax, 0FFFFFFFFFFFFFFFFh
setb dl
cmp r11, r13
jz short loc_58B6C
test dl, dl
jz short loc_58B6C
mov r15b, [rsi]
cmp r15b, cl
jnz short loc_58B38
lea rdx, [rsi+1]
cmp rdx, r10
jz short loc_58B38
mov sil, [rdx]
mov [rbx+r13], sil
mov [r14+r13], sil
jmp short loc_58B5E
loc_58B38:
cmp r15b, r8b
jnz short loc_58B4E
mov byte ptr [r14+r13], 0
mov dl, [rdi+0A8h]
mov [rbx+r13], dl
jmp short loc_58B5B
loc_58B4E:
cmp r15b, r9b
jz short loc_58BAF
mov [rbx+r13], r15b
mov [r14+r13], r15b
loc_58B5B:
mov rdx, rsi
loc_58B5E:
inc rdx
inc r13
mov rsi, rdx
cmp rdx, r10
jnz short loc_58B0A
loc_58B6C:
lea rax, [r14+r13]
add rbx, r13
mov rdx, [rbp+arg_20]
jmp short loc_58B7C
loc_58B79:
mov rax, r14
loc_58B7C:
add r11, r14
mov rcx, rax
sub rcx, r14
mov [rdx], rcx
mov [r12], rcx
cmp rax, r11
jz short loc_58BA2
mov cl, 20h ; ' '
loc_58B93:
mov [rbx], cl
inc rbx
mov [rax], cl
inc rax
cmp rax, r11
jnz short loc_58B93
loc_58BA2:
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_58BAF:
test dword ptr [rdi+0Ch], 20010h
mov rax, r13
cmovz rax, r11
mov [r12], rax
mov rax, [rbp+arg_20]
mov [rax], r11
loc_58BC8:
mov byte ptr [r14+r13], 0
mov al, [rdi+0A8h]
mov [rbx+r13], al
inc r13
cmp r11, r13
jnz short loc_58BC8
jmp short loc_58BA2
| long long my_like_range_simple(
long long a1,
char *a2,
long long a3,
char a4,
char a5,
char a6,
unsigned long long a7,
long long a8,
_BYTE *a9,
unsigned long long *a10,
_QWORD *a11)
{
_QWORD *v12; // rdx
_BYTE *v13; // rbx
char *v14; // r10
unsigned long long v15; // r13
unsigned long long v16; // rax
bool v17; // cf
char v18; // r15
char *v19; // rdx
char v20; // si
_BYTE *v21; // rax
unsigned long long v23; // rax
v12 = a11;
v13 = a9;
if ( a3 )
{
v14 = &a2[a3];
v15 = 0LL;
v16 = a7 / *(unsigned int *)(a1 + 156);
while ( 1 )
{
v17 = v16-- != 0;
if ( a7 == v15 || !v17 )
{
LABEL_14:
v21 = (_BYTE *)(a8 + v15);
v13 = &a9[v15];
v12 = a11;
goto LABEL_16;
}
v18 = *a2;
if ( *a2 != a4 || (v19 = a2 + 1, a2 + 1 == v14) )
{
if ( v18 == a5 )
{
*(_BYTE *)(a8 + v15) = 0;
a9[v15] = *(_BYTE *)(a1 + 168);
}
else
{
if ( v18 == a6 )
{
v23 = v15;
if ( (*(_DWORD *)(a1 + 12) & 0x20010) == 0 )
v23 = a7;
*a10 = v23;
*a11 = a7;
do
{
*(_BYTE *)(a8 + v15) = 0;
a9[v15++] = *(_BYTE *)(a1 + 168);
}
while ( a7 != v15 );
return 0LL;
}
a9[v15] = v18;
*(_BYTE *)(a8 + v15) = v18;
}
v19 = a2;
}
else
{
v20 = *v19;
a9[v15] = *v19;
*(_BYTE *)(a8 + v15) = v20;
}
++v15;
a2 = v19 + 1;
if ( v19 + 1 == v14 )
goto LABEL_14;
}
}
v21 = (_BYTE *)a8;
LABEL_16:
*v12 = &v21[-a8];
for ( *a10 = (unsigned long long)&v21[-a8]; v21 != (_BYTE *)(a8 + a7); ++v21 )
{
*v13++ = 32;
*v21 = 32;
}
return 0LL;
}
| my_like_range_simple:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R10,RDX
MOV RDX,qword ptr [RBP + 0x30]
MOV R12,qword ptr [RBP + 0x28]
MOV RBX,qword ptr [RBP + 0x20]
MOV R14,qword ptr [RBP + 0x18]
MOV R11,qword ptr [RBP + 0x10]
TEST R10,R10
JZ 0x00158b79
ADD R10,RSI
MOV R15D,dword ptr [RDI + 0x9c]
XOR R13D,R13D
MOV RAX,R11
XOR EDX,EDX
DIV R15
LAB_00158b0a:
ADD RAX,-0x1
SETC DL
CMP R11,R13
JZ 0x00158b6c
TEST DL,DL
JZ 0x00158b6c
MOV R15B,byte ptr [RSI]
CMP R15B,CL
JNZ 0x00158b38
LEA RDX,[RSI + 0x1]
CMP RDX,R10
JZ 0x00158b38
MOV SIL,byte ptr [RDX]
MOV byte ptr [RBX + R13*0x1],SIL
MOV byte ptr [R14 + R13*0x1],SIL
JMP 0x00158b5e
LAB_00158b38:
CMP R15B,R8B
JNZ 0x00158b4e
MOV byte ptr [R14 + R13*0x1],0x0
MOV DL,byte ptr [RDI + 0xa8]
MOV byte ptr [RBX + R13*0x1],DL
JMP 0x00158b5b
LAB_00158b4e:
CMP R15B,R9B
JZ 0x00158baf
MOV byte ptr [RBX + R13*0x1],R15B
MOV byte ptr [R14 + R13*0x1],R15B
LAB_00158b5b:
MOV RDX,RSI
LAB_00158b5e:
INC RDX
INC R13
MOV RSI,RDX
CMP RDX,R10
JNZ 0x00158b0a
LAB_00158b6c:
LEA RAX,[R14 + R13*0x1]
ADD RBX,R13
MOV RDX,qword ptr [RBP + 0x30]
JMP 0x00158b7c
LAB_00158b79:
MOV RAX,R14
LAB_00158b7c:
ADD R11,R14
MOV RCX,RAX
SUB RCX,R14
MOV qword ptr [RDX],RCX
MOV qword ptr [R12],RCX
CMP RAX,R11
JZ 0x00158ba2
MOV CL,0x20
LAB_00158b93:
MOV byte ptr [RBX],CL
INC RBX
MOV byte ptr [RAX],CL
INC RAX
CMP RAX,R11
JNZ 0x00158b93
LAB_00158ba2:
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00158baf:
TEST dword ptr [RDI + 0xc],0x20010
MOV RAX,R13
CMOVZ RAX,R11
MOV qword ptr [R12],RAX
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],R11
LAB_00158bc8:
MOV byte ptr [R14 + R13*0x1],0x0
MOV AL,byte ptr [RDI + 0xa8]
MOV byte ptr [RBX + R13*0x1],AL
INC R13
CMP R11,R13
JNZ 0x00158bc8
JMP 0x00158ba2
|
int8
my_like_range_simple
(long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6,
ulong param_7,int1 *param_8,int1 *param_9,ulong *param_10,ulong *param_11)
{
char *pcVar1;
char cVar2;
ulong uVar3;
int1 *puVar4;
char *pcVar5;
ulong uVar6;
bool bVar7;
puVar4 = param_8;
if (param_3 != 0) {
pcVar5 = param_2 + param_3;
uVar6 = 0;
uVar3 = param_7 / *(uint *)(param_1 + 0x9c);
do {
bVar7 = uVar3 == 0;
uVar3 = uVar3 - 1;
if ((param_7 == uVar6) || (bVar7)) break;
cVar2 = *param_2;
if ((cVar2 == param_4) && (pcVar1 = param_2 + 1, pcVar1 != pcVar5)) {
cVar2 = *pcVar1;
param_9[uVar6] = cVar2;
param_8[uVar6] = cVar2;
param_2 = pcVar1;
}
else if (cVar2 == param_5) {
param_8[uVar6] = 0;
param_9[uVar6] = *(int1 *)(param_1 + 0xa8);
}
else {
if (cVar2 == param_6) {
uVar3 = uVar6;
if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) {
uVar3 = param_7;
}
*param_10 = uVar3;
*param_11 = param_7;
do {
param_8[uVar6] = 0;
param_9[uVar6] = *(int1 *)(param_1 + 0xa8);
uVar6 = uVar6 + 1;
} while (param_7 != uVar6);
return 0;
}
param_9[uVar6] = cVar2;
param_8[uVar6] = cVar2;
}
param_2 = param_2 + 1;
uVar6 = uVar6 + 1;
} while (param_2 != pcVar5);
param_9 = param_9 + uVar6;
puVar4 = param_8 + uVar6;
}
*param_11 = (long)puVar4 - (long)param_8;
*param_10 = (long)puVar4 - (long)param_8;
for (; puVar4 != param_8 + param_7; puVar4 = puVar4 + 1) {
*param_9 = 0x20;
param_9 = param_9 + 1;
*puVar4 = 0x20;
}
return 0;
}
|
|
4,043 | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)0>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp | [[release_inline]] inline Position invoke(const CostTable& cost_table, const uint256* stack_bottom,
Position pos, int64_t& gas, ExecutionState& state) noexcept
{
if (const auto status = check_requirements<Op>(cost_table, gas, pos.stack_top, stack_bottom);
status != EVMC_SUCCESS)
{
state.status = status;
return {nullptr, pos.stack_top};
}
const auto new_pos = invoke(instr::core::impl<Op>, pos, gas, state);
const auto new_stack_top = pos.stack_top + instr::traits[Op].stack_height_change;
return {new_pos, new_stack_top};
} | O0 | cpp | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)0>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdx, -0x20(%rbp)
movq %rcx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x5e640
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x57c5a
movl -0x44(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x78(%rax)
movq $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x57cbf
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq 0x1847f(%rip), %rdi # 0x70100
callq 0x57d40
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0xccdc7(%rip), %rdi # 0x124a60
movl $0xff, %esi
callq 0x5fa30
movq -0x70(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN6evmone8baseline12_GLOBAL__N_16invokeILNS_6OpcodeE255EEENS1_8PositionERKSt5arrayIsLm256EEPKN4intx4uintILj256EEES4_RlRNS_14ExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_20], rdx
mov [rbp+var_18], rcx
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], r8
mov [rbp+var_40], r9
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_30]
call _ZN6evmone8baseline12_GLOBAL__N_118check_requirementsILNS_6OpcodeE255EEE16evmc_status_codeRKSt5arrayIsLm256EERlPKN4intx4uintILj256EEESE_; evmone::baseline::`anonymous namespace'::check_requirements<(evmone::Opcode)255>(std::array<short,256ul> const&,long &,intx::uint<256u> const*,intx::uint<256u> const*)
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jz short loc_57C5A
mov ecx, [rbp+var_44]
mov rax, [rbp+var_40]
mov [rax+78h], ecx
mov [rbp+var_10], 0
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_57CBF
loc_57C5A:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
mov rcx, [rbp+var_38]
mov r8, [rbp+var_40]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_58]
lea rdi, _ZN6evmone5instr4core12selfdestructENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::selfdestruct(evmone::StackTop,long,evmone::ExecutionState &)
call _ZN6evmone8baseline12_GLOBAL__N_16invokeEPDoFNS_10TermResultENS_8StackTopElRNS_14ExecutionStateEENS1_8PositionERlS5_
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
lea rdi, _ZN6evmone5instr6traitsE; evmone::instr::traits
mov esi, 0FFh
call _ZNKSt5arrayIN6evmone5instr6TraitsELm256EEixEm; std::array<evmone::instr::Traits,256ul>::operator[](ulong)
mov rax, [rbp+var_70]
add rax, 0FFFFFFFFFFFFFFE0h
mov [rbp+var_68], rax
mov rax, [rbp+var_50]
mov [rbp+var_10], rax
mov rax, [rbp+var_68]
mov [rbp+var_8], rax
loc_57CBF:
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long evmone::baseline::`anonymous namespace'::invoke<(evmone::Opcode)255>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+20h] [rbp-50h]
int v8; // [rsp+2Ch] [rbp-44h]
v8 = evmone::baseline::`anonymous namespace'::check_requirements<(evmone::Opcode)255>(a1, a5, a4, a2);
if ( v8 )
{
*(_DWORD *)(a6 + 120) = v8;
return 0LL;
}
else
{
v7 = evmone::baseline::`anonymous namespace'::invoke(&evmone::instr::core::selfdestruct, a3, a4, a5, a6);
std::array<evmone::instr::Traits,256ul>::operator[](&evmone::instr::traits, 255LL);
return v7;
}
}
| invoke<(evmone::Opcode)255>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x40],R9
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015e640
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JZ 0x00157c5a
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX + 0x78],ECX
MOV qword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00157cbf
LAB_00157c5a:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x58]
LEA RDI,[0x170100]
CALL 0x00157d40
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[0x224a60]
MOV ESI,0xff
CALL 0x0015fa30
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,-0x20
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x8],RAX
LAB_00157cbf:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
/* evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous
namespace)::invoke<(evmone::Opcode)255>(std::array<short, 256ul> const&, intx::uint<256u> const*,
evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) */
int1 [16] __thiscall
evmone::baseline::(anonymous_namespace)::invoke<(evmone::Opcode)255>
(_anonymous_namespace_ *this,uint *param_1,int8 param_2,uint *param_4,long *param_5,
long param_6)
{
int1 auVar1 [16];
int iVar2;
int8 local_18;
uint *local_10;
iVar2 = check_requirements<(evmone::Opcode)255>((array *)this,param_5,param_4,param_1);
if (iVar2 == 0) {
local_18 = invoke((_anonymous_namespace_ *)instr::core::selfdestruct,param_2,param_4,param_5,
param_6);
std::array<evmone::instr::Traits,256ul>::operator[]
((array<evmone::instr::Traits,256ul> *)instr::traits,0xff);
local_10 = param_4 + -0x20;
}
else {
*(int *)(param_6 + 0x78) = iVar2;
local_18 = 0;
local_10 = param_4;
}
auVar1._8_8_ = local_10;
auVar1._0_8_ = local_18;
return auVar1;
}
|
|
4,044 | minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | llama.cpp/common/minja/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
// https://jinja.palletsprojects.com/en/3.0.x/templates/#for
if (!iterable) throw std::runtime_error("ForNode.iterable is null");
if (!body) throw std::runtime_error("ForNode.body is null");
auto iterable_value = iterable->evaluate(context);
Value::CallableType loop_function;
std::function<void(Value&)> visit = [&](Value& iter) {
auto filtered_items = Value::array();
if (!iter.is_null()) {
if (!iterable_value.is_iterable()) {
throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump());
}
iterable_value.for_each([&](Value & item) {
destructuring_assign(var_names, context, item);
if (!condition || condition->evaluate(context).to_bool()) {
filtered_items.push_back(item);
}
});
}
if (filtered_items.empty()) {
if (else_body) {
else_body->render(out, context);
}
} else {
auto loop = recursive ? Value::callable(loop_function) : Value::object();
loop.set("length", (int64_t) filtered_items.size());
size_t cycle_index = 0;
loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.empty() || !args.kwargs.empty()) {
throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg");
}
auto item = args.args[cycle_index];
cycle_index = (cycle_index + 1) % args.args.size();
return item;
}));
auto loop_context = Context::make(Value::object(), context);
loop_context->set("loop", loop);
for (size_t i = 0, n = filtered_items.size(); i < n; ++i) {
auto & item = filtered_items.at(i);
destructuring_assign(var_names, loop_context, item);
loop.set("index", (int64_t) i + 1);
loop.set("index0", (int64_t) i);
loop.set("revindex", (int64_t) (n - i));
loop.set("revindex0", (int64_t) (n - i - 1));
loop.set("length", (int64_t) n);
loop.set("first", i == 0);
loop.set("last", i == (n - 1));
loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value());
loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value());
try {
body->render(out, loop_context);
} catch (const LoopControlException & e) {
if (e.control_type == LoopControlType::Break) break;
if (e.control_type == LoopControlType::Continue) continue;
}
}
}
};
if (recursive) {
loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) {
throw std::runtime_error("loop() expects exactly 1 positional iterable argument");
}
auto & items = args.args[0];
visit(items);
return Value();
};
}
visit(iterable_value);
} | O3 | cpp | minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0xfdfc7
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
je 0xfdfe5
movq %rdx, %r15
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0xeec7c
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x28, %edi
callq 0x21220
movq %r12, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
leaq 0x20(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq %rax, (%rsp)
leaq 0x2e9(%rip), %rax # 0xfe1b8
movq %rax, 0x18(%rsp)
leaq 0x2e5(%rip), %rcx # 0xfe1c0
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x68(%rbx)
je 0xfdf0b
movq %rsp, %rbx
leaq 0x40(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0xfe142
cmpq $0x0, 0x10(%rbx)
je 0xfe017
movq 0x18(%rsp), %rax
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xfdf2c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xfdf45
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x92a5c
movq %rbx, %rdi
callq 0x97176
leaq 0x80(%rsp), %rdi
callq 0x7e132
leaq 0x70(%rsp), %rdi
callq 0x7e132
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x7e132
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xfdfb8
movq 0x74005(%rip), %rax # 0x171f98
cmpb $0x0, (%rax)
je 0xfdfa3
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xfdfad
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xfdfb8
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x21690
movq %rax, %r14
leaq 0x31ed3(%rip), %rsi # 0x12feae
movq %rax, %rdi
callq 0x21450
jmp 0xfe001
movl $0x10, %edi
callq 0x21690
movq %rax, %r14
leaq 0x31ece(%rip), %rsi # 0x12fec7
movq %rax, %rdi
callq 0x21450
movq 0x73fb8(%rip), %rsi # 0x171fc0
movq 0x73f71(%rip), %rdx # 0x171f80
movq %r14, %rdi
callq 0x21ad0
callq 0x22350
jmp 0xfe01e
movq %rax, %rbx
movq %r14, %rdi
callq 0x21f80
jmp 0xfe071
jmp 0xfe07b
jmp 0xfe07b
movq %rax, %rbx
jmp 0xfe04e
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xfe04e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xfe067
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x48(%rsp), %rdi
callq 0xc3a5c
movq %rbx, %rdi
callq 0x21b70
jmp 0xfe07b
movq %rax, %rdi
callq 0x33a55
nop
| _ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 98h
mov r14, rsi
mov rsi, [rdi+38h]
test rsi, rsi
jz loc_FDFC7
mov rbx, rdi
cmp qword ptr [rdi+58h], 0
jz loc_FDFE5
mov r15, rdx
lea r12, [rsp+0B8h+var_70]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+0B8h+var_88], xmm0
movaps [rsp+0B8h+var_98], xmm0
mov [rsp+0B8h+var_B0], 0
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r12
mov [rax+8], rbx
mov [rax+10h], r15
mov [rax+18h], r14
lea rcx, [rsp+0B8h+var_98]
mov [rax+20h], rcx
mov [rsp+0B8h+var_B8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov [rsp+0B8h+var_A0], rax
lea rcx, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+0B8h+var_A8], rcx
cmp byte ptr [rbx+68h], 0
jz short loc_FDF0B
mov rbx, rsp
lea rsi, [rsp+0B8h+var_78]
mov [rsi], rbx
lea rdi, [rsp+0B8h+var_98]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_
cmp qword ptr [rbx+10h], 0
jz loc_FE017
mov rax, [rsp+0B8h+var_A0]
loc_FDF0B:
mov rdi, rsp
lea rsi, [rsp+0B8h+var_70]
call rax ; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &); std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov rax, [rsp+0B8h+var_A8]
test rax, rax
jz short loc_FDF2C
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_FDF2C:
mov rax, qword ptr [rsp+0B8h+var_88]
test rax, rax
jz short loc_FDF45
lea rdi, [rsp+0B8h+var_98]
mov rsi, rdi
mov edx, 3
call rax
loc_FDF45:
lea rbx, [rsp+0B8h+var_30]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0B8h+var_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rbx, [rsp+0B8h+var_58]
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rbx-10h]
test rdi, rdi
jz short loc_FDFB8
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_FDFA3
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_FDFAD
loc_FDFA3:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_FDFAD:
cmp eax, 1
jnz short loc_FDFB8
mov rax, [rdi]
call qword ptr [rax+18h]
loc_FDFB8:
add rsp, 98h
pop rbx
pop r12
pop r14
pop r15
retn
loc_FDFC7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeIterabl; "ForNode.iterable is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_FE001
loc_FDFE5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeBodyIsN; "ForNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_FE001:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_FE017:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short $+2
loc_FE01E:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_FE071
jmp short loc_FE07B
jmp short loc_FE07B
mov rbx, rax
jmp short loc_FE04E
mov rbx, rax
mov rax, [rsp+0B8h+var_A8]
test rax, rax
jz short loc_FE04E
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_FE04E:
mov rax, qword ptr [rsp+0B8h+var_88]
test rax, rax
jz short loc_FE067
lea rdi, [rsp+0B8h+var_98]
mov rsi, rdi
mov edx, 3
call rax
loc_FE067:
lea rdi, [rsp+0B8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_FE071:
mov rdi, rbx
call __Unwind_Resume
jmp short $+2
loc_FE07B:
mov rdi, rax
call __clang_call_terminate
| void minja::ForNode::do_render(long long a1, long long a2, long long a3)
{
void (***v4)(void); // rsi
_QWORD *v6; // rax
void ( *v7)(_QWORD *, _BYTE *); // rax
long long v8; // rdi
signed __int32 v9; // eax
std::runtime_error *exception; // r14
_QWORD v11[2]; // [rsp+0h] [rbp-B8h] BYREF
long long ( *v12)(); // [rsp+10h] [rbp-A8h]
void ( *v13)(_QWORD *, _BYTE *); // [rsp+18h] [rbp-A0h]
__int128 v14; // [rsp+20h] [rbp-98h] BYREF
__int128 v15; // [rsp+30h] [rbp-88h]
_QWORD *v16; // [rsp+40h] [rbp-78h]
_BYTE v17[8]; // [rsp+48h] [rbp-70h] BYREF
long long v18; // [rsp+50h] [rbp-68h]
volatile signed __int32 *v19; // [rsp+60h] [rbp-58h] BYREF
volatile signed __int32 *v20; // [rsp+70h] [rbp-48h] BYREF
volatile signed __int32 *v21; // [rsp+80h] [rbp-38h] BYREF
char v22[48]; // [rsp+88h] [rbp-30h] BYREF
v4 = *(void (****)(void))(a1 + 56);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.iterable is null");
goto LABEL_19;
}
if ( !*(_QWORD *)(a1 + 88) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.body is null");
LABEL_19:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v17, v4);
v15 = 0LL;
v14 = 0LL;
v11[1] = 0LL;
v6 = (_QWORD *)operator new(0x28uLL);
*v6 = v17;
v6[1] = a1;
v6[2] = a3;
v6[3] = a2;
v6[4] = &v14;
v11[0] = v6;
v7 = (void ( *)(_QWORD *, _BYTE *))std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke;
v13 = (void ( *)(_QWORD *, _BYTE *))std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke;
v12 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager;
if ( *(_BYTE *)(a1 + 104) )
{
v16 = v11;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(&v14);
if ( !v12 )
std::__throw_bad_function_call();
v7 = v13;
}
v7(v11, v17);
if ( v12 )
((void ( *)(_QWORD *, _QWORD *, long long))v12)(v11, v11, 3LL);
if ( (_QWORD)v15 )
((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v19);
v8 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v9 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
| do_render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R14,RSI
MOV RSI,qword ptr [RDI + 0x38]
TEST RSI,RSI
JZ 0x001fdfc7
MOV RBX,RDI
CMP qword ptr [RDI + 0x58],0x0
JZ 0x001fdfe5
MOV R15,RDX
LEA R12,[RSP + 0x48]
MOV RDI,R12
CALL 0x001eec7c
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x8],0x0
LAB_001fdea2:
MOV EDI,0x28
CALL 0x00121220
MOV qword ptr [RAX],R12
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x18],R14
LEA RCX,[RSP + 0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RSP],RAX
LEA RAX,[0x1fe1b8]
MOV qword ptr [RSP + 0x18],RAX
LEA RCX,[0x1fe1c0]
MOV qword ptr [RSP + 0x10],RCX
CMP byte ptr [RBX + 0x68],0x0
JZ 0x001fdf0b
MOV RBX,RSP
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],RBX
LEA RDI,[RSP + 0x20]
CALL 0x001fe142
CMP qword ptr [RBX + 0x10],0x0
JZ 0x001fe017
MOV RAX,qword ptr [RSP + 0x18]
LAB_001fdf0b:
MOV RDI,RSP
LEA RSI,[RSP + 0x48]
CALL RAX
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001fdf2c
LAB_001fdf1f:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fdf2c:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001fdf45
LAB_001fdf36:
LEA RDI,[RSP + 0x20]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fdf45:
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00192a5c
MOV RDI,RBX
CALL 0x00197176
LEA RDI,[RSP + 0x80]
CALL 0x0017e132
LEA RDI,[RSP + 0x70]
CALL 0x0017e132
LEA RBX,[RSP + 0x60]
MOV RDI,RBX
CALL 0x0017e132
MOV RDI,qword ptr [RBX + -0x10]
TEST RDI,RDI
JZ 0x001fdfb8
MOV RAX,qword ptr [0x00271f98]
CMP byte ptr [RAX],0x0
JZ 0x001fdfa3
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001fdfad
LAB_001fdfa3:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001fdfad:
CMP EAX,0x1
JNZ 0x001fdfb8
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001fdfb8:
ADD RSP,0x98
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001fdfc7:
MOV EDI,0x10
CALL 0x00121690
MOV R14,RAX
LAB_001fdfd4:
LEA RSI,[0x22feae]
MOV RDI,RAX
CALL 0x00121450
LAB_001fdfe3:
JMP 0x001fe001
LAB_001fdfe5:
MOV EDI,0x10
CALL 0x00121690
MOV R14,RAX
LAB_001fdff2:
LEA RSI,[0x22fec7]
MOV RDI,RAX
CALL 0x00121450
LAB_001fe001:
MOV RSI,qword ptr [0x00271fc0]
MOV RDX,qword ptr [0x00271f80]
MOV RDI,R14
CALL 0x00121ad0
LAB_001fe017:
CALL 0x00122350
|
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *this_00;
int8 *local_b8;
int8 local_b0;
code *local_a8;
code *local_a0;
int8 local_98;
int8 uStack_90;
code *local_88;
int8 uStack_80;
int1 *local_78;
Expression local_70 [8];
long *local_68;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8];
data local_30 [16];
if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001fdfd4 to 001fdfe2 has its CatchHandler @ 001fe01e */
std::runtime_error::runtime_error(this_00,"ForNode.iterable is null");
}
else {
if (*(long *)(this + 0x58) != 0) {
Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38));
local_88 = (code *)0x0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_b0 = 0;
/* try { // try from 001fdea2 to 001fdeab has its CatchHandler @ 001fe02f */
local_b8 = (int8 *)operator_new(0x28);
*local_b8 = local_70;
local_b8[1] = this;
local_b8[2] = param_2;
local_b8[3] = param_1;
local_b8[4] = &local_98;
local_a0 = std::
_Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_invoke;
local_a8 = std::
_Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_manager;
if ((this[0x68] != (ForNode)0x0) &&
(local_78 = (int1 *)&local_b8,
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>
*)&local_98,
(_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *)
&local_78), local_a8 == (code *)0x0)) {
/* WARNING: Subroutine does not return */
/* try { // try from 001fe017 to 001fe01b has its CatchHandler @ 001fe034 */
std::__throw_bad_function_call();
}
/* try { // try from 001fdf0b to 001fdf14 has its CatchHandler @ 001fe034 */
(*local_a0)(&local_b8,local_70);
if (local_a8 != (code *)0x0) {
/* try { // try from 001fdf1f to 001fdf2b has its CatchHandler @ 001fe02d */
(*local_a8)(&local_b8,&local_b8,3);
}
if (local_88 != (code *)0x0) {
/* try { // try from 001fdf36 to 001fdf44 has its CatchHandler @ 001fe02b */
(*local_88)(&local_98,&local_98,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_30,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_00271f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_68 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001fdff2 to 001fe000 has its CatchHandler @ 001fe01c */
std::runtime_error::runtime_error(this_00,"ForNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00271fc0,PTR__runtime_error_00271f80);
}
|
|
4,045 | js_string_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
return js_thisStringValue(ctx, this_val);
} | O1 | c | js_string_toString:
pushq %rbx
subq $0x10, %rsp
movq %rsi, (%rsp)
cmpl $-0x1, %edx
je 0x7cdf2
cmpl $-0x7, %edx
jne 0x7ce16
movq %rsi, %rbx
movq %rsi, 0x8(%rsp)
cmpl $-0x9, %edx
jb 0x7ce2b
movq 0x8(%rsp), %rax
incl (%rax)
jmp 0x7ce2b
movq (%rsp), %rcx
movb $0x1, %al
cmpw $0x5, 0x6(%rcx)
jne 0x7ce12
movq 0x38(%rcx), %rdx
cmpl $-0x7, %edx
jne 0x7ce12
movq 0x30(%rcx), %rbx
incl (%rbx)
xorl %eax, %eax
jmp 0x7ce12
testb %al, %al
je 0x7ce2b
leaq 0x22ddf(%rip), %rsi # 0x9fbfc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| js_string_toString:
push rbx
sub rsp, 10h
mov [rsp+18h+var_18], rsi
cmp edx, 0FFFFFFFFh
jz short loc_7CDF2
cmp edx, 0FFFFFFF9h
jnz short loc_7CE16
mov rbx, rsi
mov [rsp+18h+var_10], rsi
cmp edx, 0FFFFFFF7h
jb short loc_7CE2B
mov rax, [rsp+18h+var_10]
inc dword ptr [rax]
jmp short loc_7CE2B
loc_7CDF2:
mov rcx, [rsp+18h+var_18]
mov al, 1
cmp word ptr [rcx+6], 5
jnz short loc_7CE12
mov rdx, [rcx+38h]
cmp edx, 0FFFFFFF9h
jnz short loc_7CE12
mov rbx, [rcx+30h]
inc dword ptr [rbx]
xor eax, eax
jmp short $+2
loc_7CE12:
test al, al
jz short loc_7CE2B
loc_7CE16:
lea rsi, aNotAString; "not a string"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_7CE2B:
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _DWORD * js_string_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v14; // rbx
char v15; // al
if ( (_DWORD)a3 != -1 )
{
if ( (_DWORD)a3 == -7 )
{
v14 = (_DWORD *)a2;
++*(_DWORD *)a2;
return v14;
}
LABEL_8:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a2);
return v14;
}
a4 = a2;
v15 = 1;
if ( *(_WORD *)(a2 + 6) == 5 )
{
a3 = *(_QWORD *)(a2 + 56);
if ( (_DWORD)a3 == -7 )
{
v14 = *(_DWORD **)(a2 + 48);
++*v14;
v15 = 0;
}
}
if ( v15 )
goto LABEL_8;
return v14;
}
| |||
4,046 | js_string_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
return js_thisStringValue(ctx, this_val);
} | O2 | c | js_string_toString:
pushq %rbx
movq %rsi, %rbx
cmpl $-0x1, %edx
je 0x68e19
cmpl $-0x7, %edx
jne 0x68e2f
incl (%rbx)
jmp 0x68e42
cmpw $0x5, 0x6(%rbx)
jne 0x68e2f
movq 0x38(%rbx), %rdx
cmpl $-0x7, %edx
jne 0x68e2f
movq 0x30(%rbx), %rbx
jmp 0x68e15
leaq 0x1dd16(%rip), %rsi # 0x86b4c
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
movq %rbx, %rax
popq %rbx
retq
| js_string_toString:
push rbx
mov rbx, rsi
cmp edx, 0FFFFFFFFh
jz short loc_68E19
cmp edx, 0FFFFFFF9h
jnz short loc_68E2F
loc_68E15:
inc dword ptr [rbx]
jmp short loc_68E42
loc_68E19:
cmp word ptr [rbx+6], 5
jnz short loc_68E2F
mov rdx, [rbx+38h]
cmp edx, 0FFFFFFF9h
jnz short loc_68E2F
mov rbx, [rbx+30h]
jmp short loc_68E15
loc_68E2F:
lea rsi, aNotAString; "not a string"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
loc_68E42:
mov rax, rbx
pop rbx
retn
| _DWORD * js_string_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v14; // rbx
char v16; // [rsp+0h] [rbp-8h]
v14 = (_DWORD *)a2;
if ( (_DWORD)a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 5 )
{
a3 = *(_QWORD *)(a2 + 56);
if ( (_DWORD)a3 == -7 )
{
v14 = *(_DWORD **)(a2 + 48);
goto LABEL_3;
}
}
LABEL_7:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16);
return v14;
}
if ( (_DWORD)a3 != -7 )
goto LABEL_7;
LABEL_3:
++*v14;
return v14;
}
| js_string_toString:
PUSH RBX
MOV RBX,RSI
CMP EDX,-0x1
JZ 0x00168e19
CMP EDX,-0x7
JNZ 0x00168e2f
LAB_00168e15:
INC dword ptr [RBX]
JMP 0x00168e42
LAB_00168e19:
CMP word ptr [RBX + 0x6],0x5
JNZ 0x00168e2f
MOV RDX,qword ptr [RBX + 0x38]
CMP EDX,-0x7
JNZ 0x00168e2f
MOV RBX,qword ptr [RBX + 0x30]
JMP 0x00168e15
LAB_00168e2f:
LEA RSI,[0x186b4c]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
LAB_00168e42:
MOV RAX,RBX
POP RBX
RET
|
int1 [16] js_string_toString(int8 param_1,int *param_2,int8 param_3)
{
int1 auVar1 [16];
if ((int)param_3 == -1) {
if ((*(short *)((long)param_2 + 6) != 5) ||
(param_3 = *(int8 *)(param_2 + 0xe), (int)param_3 != -7)) goto LAB_00168e2f;
param_2 = *(int **)(param_2 + 0xc);
}
else if ((int)param_3 != -7) {
LAB_00168e2f:
param_2 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a string");
param_3 = 6;
goto LAB_00168e42;
}
*param_2 = *param_2 + 1;
LAB_00168e42:
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
return auVar1;
}
|
|
4,047 | translog_purge_at_flush | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_purge_at_flush()
{
uint32 i, min_file;
int rc= 0;
DBUG_ENTER("translog_purge_at_flush");
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (unlikely(translog_status == TRANSLOG_READONLY))
{
DBUG_PRINT("info", ("The log is read only => exit"));
DBUG_RETURN(0);
}
if (log_purge_type != TRANSLOG_PURGE_ONDEMAND)
{
DBUG_PRINT("info", ("It is not \"at_flush\" => exit"));
DBUG_RETURN(0);
}
mysql_mutex_lock(&log_descriptor.purger_lock);
if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled))
{
DBUG_PRINT("info", ("No info about min need file => exit"));
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(0);
}
min_file= translog_first_file(translog_get_horizon(), 1);
DBUG_ASSERT(min_file != 0); /* log is already started */
for(i= min_file; i < log_descriptor.min_need_file && rc == 0; i++)
{
char path[FN_REFLEN], *file_name;
DBUG_PRINT("info", ("purge file %lu\n", (ulong) i));
file_name= translog_filename_by_fileno(i, path);
rc= MY_TEST(mysql_file_delete(key_file_translog,
file_name, MYF(MY_WME)));
}
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(rc);
} | O3 | c | translog_purge_at_flush:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
cmpl $0x2, 0x396164(%rip) # 0x3ff590
je 0x69542
cmpq $0x2, 0x39613e(%rip) # 0x3ff578
jne 0x69542
cmpq $0x0, 0xb98218(%rip) # 0xc01660
jne 0x69565
leaq 0xb981cb(%rip), %rdi # 0xc01620
callq 0x291d0
cmpl $0x0, 0xb981b7(%rip) # 0xc01618
je 0x6956f
cmpl $0x0, 0x396102(%rip) # 0x3ff570
jne 0x6956f
callq 0x67570
movq %rax, %rdi
movl $0x1, %esi
callq 0x659f8
cmpl 0xb9818c(%rip), %eax # 0xc01618
jae 0x69521
movl %eax, %ebx
leaq -0x230(%rbp), %r14
leaq 0x31dbae(%rip), %r13 # 0x387050
leaq -0x288(%rbp), %r15
leaq -0x240(%rbp), %r12
movl %ebx, %edi
movq %r14, %rsi
callq 0x640d9
leaq 0x395c33(%rip), %rax # 0x3ff0f4
movl (%rax), %esi
movq (%r13), %rax
movq %r15, %rdi
movl $0xe, %edx
movq %r14, %rcx
movq %r12, %r8
callq *0x148(%rax)
movq %rax, -0x240(%rbp)
testq %rax, %rax
jne 0x69504
movl $0x10, %esi
movq %r14, %rdi
callq 0x9f508
incl %ebx
cmpl 0xb9811c(%rip), %ebx # 0xc01618
jae 0x69525
testl %eax, %eax
je 0x694b0
jmp 0x69525
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
leaq -0x234(%rbp), %rcx
callq 0x2d0f3
movl -0x234(%rbp), %eax
jmp 0x694f4
xorl %ebx, %ebx
jmp 0x6952a
testl %eax, %eax
setne %bl
movq 0xb9812f(%rip), %rdi # 0xc01660
testq %rdi, %rdi
jne 0x69578
leaq 0xb980e3(%rip), %rdi # 0xc01620
callq 0x291a0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x6958a
movl %ebx, %eax
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2d0d6
jmp 0x6945a
callq 0x2d14a
xorl %ebx, %ebx
jmp 0x69542
leaq 0x31dad1(%rip), %rax # 0x387050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x69536
callq 0x29220
| translog_purge_at_flush:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov rax, fs:28h
mov [rbp+var_30], rax
xor ebx, ebx
cmp cs:translog_status, 2
jz loc_69542
cmp cs:log_purge_type, 2
jnz loc_69542
cmp cs:qword_C01660, 0
jnz loc_69565
lea rdi, unk_C01620
call _pthread_mutex_lock
loc_6945A:
cmp dword ptr cs:qword_C01618, 0
jz loc_6956F
cmp cs:log_purge_disabled, 0
jnz loc_6956F
call translog_get_horizon
mov rdi, rax
mov esi, 1
call translog_first_file
cmp eax, dword ptr cs:qword_C01618
jnb loc_69521
mov ebx, eax
lea r14, [rbp+var_230]
lea r13, PSI_server
lea r15, [rbp+var_288]
lea r12, [rbp+var_240]
loc_694B0:
mov edi, ebx
mov rsi, r14
call translog_filename_by_fileno
lea rax, key_file_translog
mov esi, [rax]
mov rax, [r13+0]
mov rdi, r15
mov edx, 0Eh
mov rcx, r14
mov r8, r12
call qword ptr [rax+148h]
mov [rbp+var_240], rax
test rax, rax
jnz short loc_69504
mov esi, 10h
mov rdi, r14
call my_delete
loc_694F4:
inc ebx
cmp ebx, dword ptr cs:qword_C01618
jnb short loc_69525
test eax, eax
jz short loc_694B0
jmp short loc_69525
loc_69504:
mov rdi, rax
mov rsi, r14
mov rdx, r12
lea rcx, [rbp+var_234]
call translog_purge_at_flush_cold_2
mov eax, [rbp+var_234]
jmp short loc_694F4
loc_69521:
xor ebx, ebx
jmp short loc_6952A
loc_69525:
test eax, eax
setnz bl
loc_6952A:
mov rdi, cs:qword_C01660
test rdi, rdi
jnz short loc_69578
loc_69536:
lea rdi, unk_C01620
call _pthread_mutex_unlock
loc_69542:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_6958A
mov eax, ebx
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_69565:
call translog_purge_at_flush_cold_1
jmp loc_6945A
loc_6956F:
call translog_purge_at_flush_cold_3
xor ebx, ebx
jmp short loc_69542
loc_69578:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_69536
loc_6958A:
call ___stack_chk_fail
| long long translog_purge_at_flush()
{
unsigned int v0; // ebx
unsigned long long horizon; // rax
unsigned int file; // eax
long long v3; // rdx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
long long v7; // rax
unsigned int v8; // eax
_BYTE v10[72]; // [rsp+8h] [rbp-288h] BYREF
long long v11; // [rsp+50h] [rbp-240h] BYREF
unsigned int v12; // [rsp+5Ch] [rbp-234h] BYREF
_BYTE v13[512]; // [rsp+60h] [rbp-230h] BYREF
unsigned long long v14; // [rsp+260h] [rbp-30h]
v14 = __readfsqword(0x28u);
v0 = 0;
if ( translog_status != 2 && log_purge_type == 2 )
{
if ( qword_C01660 )
translog_purge_at_flush_cold_1();
else
pthread_mutex_lock(&unk_C01620);
if ( !(_DWORD)qword_C01618 || log_purge_disabled )
{
translog_purge_at_flush_cold_3();
return 0;
}
else
{
horizon = translog_get_horizon();
file = translog_first_file(horizon, 1);
if ( file >= (unsigned int)qword_C01618 )
{
v0 = 0;
}
else
{
v0 = file;
do
{
translog_filename_by_fileno(v0, (long long)v13, v3, v4, v5, v6);
v7 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])(
v10,
key_file_translog,
14LL,
v13,
&v11);
v11 = v7;
if ( v7 )
{
translog_purge_at_flush_cold_2(v7, (long long)v13, &v11, &v12);
v8 = v12;
}
else
{
v8 = my_delete(v13, 16LL);
}
++v0;
}
while ( v0 < (unsigned int)qword_C01618 && !v8 );
LOBYTE(v0) = v8 != 0;
}
if ( qword_C01660 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C01620);
}
}
return v0;
}
| translog_purge_at_flush:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR EBX,EBX
CMP dword ptr [0x004ff590],0x2
JZ 0x00169542
CMP qword ptr [0x004ff578],0x2
JNZ 0x00169542
CMP qword ptr [0x00d01660],0x0
JNZ 0x00169565
LEA RDI,[0xd01620]
CALL 0x001291d0
LAB_0016945a:
CMP dword ptr [0x00d01618],0x0
JZ 0x0016956f
CMP dword ptr [0x004ff570],0x0
JNZ 0x0016956f
CALL 0x00167570
MOV RDI,RAX
MOV ESI,0x1
CALL 0x001659f8
CMP EAX,dword ptr [0x00d01618]
JNC 0x00169521
MOV EBX,EAX
LEA R14,[RBP + -0x230]
LEA R13,[0x487050]
LEA R15,[RBP + -0x288]
LEA R12,[RBP + -0x240]
LAB_001694b0:
MOV EDI,EBX
MOV RSI,R14
CALL 0x001640d9
LEA RAX,[0x4ff0f4]
MOV ESI,dword ptr [RAX]
MOV RAX,qword ptr [R13]
MOV RDI,R15
MOV EDX,0xe
MOV RCX,R14
MOV R8,R12
CALL qword ptr [RAX + 0x148]
MOV qword ptr [RBP + -0x240],RAX
TEST RAX,RAX
JNZ 0x00169504
MOV ESI,0x10
MOV RDI,R14
CALL 0x0019f508
LAB_001694f4:
INC EBX
CMP EBX,dword ptr [0x00d01618]
JNC 0x00169525
TEST EAX,EAX
JZ 0x001694b0
JMP 0x00169525
LAB_00169504:
MOV RDI,RAX
MOV RSI,R14
MOV RDX,R12
LEA RCX,[RBP + -0x234]
CALL 0x0012d0f3
MOV EAX,dword ptr [RBP + -0x234]
JMP 0x001694f4
LAB_00169521:
XOR EBX,EBX
JMP 0x0016952a
LAB_00169525:
TEST EAX,EAX
SETNZ BL
LAB_0016952a:
MOV RDI,qword ptr [0x00d01660]
TEST RDI,RDI
JNZ 0x00169578
LAB_00169536:
LEA RDI,[0xd01620]
CALL 0x001291a0
LAB_00169542:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0016958a
MOV EAX,EBX
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00169565:
CALL 0x0012d0d6
JMP 0x0016945a
LAB_0016956f:
CALL 0x0012d14a
XOR EBX,EBX
JMP 0x00169542
LAB_00169578:
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00169536
LAB_0016958a:
CALL 0x00129220
|
int4 translog_purge_at_flush(void)
{
uint uVar1;
int iVar2;
int8 uVar3;
int4 uVar4;
long in_FS_OFFSET;
int1 local_290 [72];
long local_248;
int local_23c;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = 0;
if ((translog_status != 2) && (log_purge_type == 2)) {
if (DAT_00d01660 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d01620);
}
else {
translog_purge_at_flush_cold_1();
}
if ((DAT_00d01618 == 0) || (log_purge_disabled != 0)) {
translog_purge_at_flush_cold_3();
uVar4 = 0;
}
else {
uVar3 = translog_get_horizon();
uVar1 = translog_first_file(uVar3,1);
if (uVar1 < DAT_00d01618) {
do {
translog_filename_by_fileno(uVar1,local_238);
local_248 = (**(code **)(PSI_server + 0x148))
(local_290,key_file_translog,0xe,local_238,&local_248);
if (local_248 == 0) {
iVar2 = my_delete(local_238,0x10);
}
else {
translog_purge_at_flush_cold_2(local_248,local_238,&local_248,&local_23c);
iVar2 = local_23c;
}
uVar1 = uVar1 + 1;
} while ((uVar1 < DAT_00d01618) && (iVar2 == 0));
uVar4 = CONCAT31((int3)(uVar1 >> 8),iVar2 != 0);
}
else {
uVar4 = 0;
}
if (DAT_00d01660 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d01620);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
|
|
4,048 | spdlog::logger::swap(spdlog::logger&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/logger-inl.h | SPDLOG_INLINE void logger::swap(spdlog::logger &other) SPDLOG_NOEXCEPT {
name_.swap(other.name_);
sinks_.swap(other.sinks_);
// swap level_
auto other_level = other.level_.load();
auto my_level = level_.exchange(other_level);
other.level_.store(my_level);
// swap flush level_
other_level = other.flush_level_.load();
my_level = flush_level_.exchange(other_level);
other.flush_level_.store(my_level);
custom_err_handler_.swap(other.custom_err_handler_);
std::swap(tracer_, other.tracer_);
} | O3 | c | spdlog::logger::swap(spdlog::logger&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x2fe66
movq 0x38(%r14), %rax
movups 0x28(%rbx), %xmm0
movups 0x28(%r14), %xmm1
movups %xmm0, 0x28(%r14)
movq 0x38(%rbx), %rcx
movq %rcx, 0x38(%r14)
movups %xmm1, 0x28(%rbx)
movq %rax, 0x38(%rbx)
movl 0x40(%rbx), %eax
xchgl %eax, 0x40(%r14)
xchgl %eax, 0x40(%rbx)
movl 0x44(%rbx), %eax
xchgl %eax, 0x44(%r14)
xchgl %eax, 0x44(%rbx)
movups 0x48(%r14), %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movups 0x48(%rbx), %xmm0
movups %xmm0, 0x48(%r14)
movaps (%rdi), %xmm0
movups %xmm0, 0x48(%rbx)
movq 0x58(%r14), %rax
movq 0x58(%rbx), %rcx
movq %rcx, 0x58(%r14)
movq %rax, 0x58(%rbx)
movq 0x60(%r14), %rax
movq 0x60(%rbx), %rcx
movq %rcx, 0x60(%r14)
movq %rax, 0x60(%rbx)
addq $0x68, %r14
addq $0x68, %rbx
movq %r14, %rsi
callq 0x2c500
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2c500
leaq 0x120(%rsp), %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x2c570
leaq 0xb8(%rsp), %r14
movq %r15, %rdi
callq 0x32bcc
leaq 0x68(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x2c500
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2c570
movq %r14, %rdi
callq 0x32bcc
leaq 0x50(%rsp), %rdi
callq 0x32bcc
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %r15
jmp 0x2e51f
movq %rax, %rbx
movq %r15, %rdi
callq 0x32bcc
leaq 0x50(%rsp), %rdi
callq 0x32bcc
movq %rbx, %rdi
callq 0x18a8f
| _ZN6spdlog6logger4swapERS0_:
push r15
push r14
push r12
push rbx
sub rsp, 138h
mov rbx, rsi
mov r14, rdi
add rdi, 8
add rsi, 8
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_; std::string::swap(std::string&)
mov rax, [r14+38h]
movups xmm0, xmmword ptr [rbx+28h]
movups xmm1, xmmword ptr [r14+28h]
movups xmmword ptr [r14+28h], xmm0
mov rcx, [rbx+38h]
mov [r14+38h], rcx
movups xmmword ptr [rbx+28h], xmm1
mov [rbx+38h], rax
mov eax, [rbx+40h]
xchg eax, [r14+40h]
xchg eax, [rbx+40h]
mov eax, [rbx+44h]
xchg eax, [r14+44h]
xchg eax, [rbx+44h]
movups xmm0, xmmword ptr [r14+48h]
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
movups xmm0, xmmword ptr [rbx+48h]
movups xmmword ptr [r14+48h], xmm0
movaps xmm0, xmmword ptr [rdi]
movups xmmword ptr [rbx+48h], xmm0
mov rax, [r14+58h]
mov rcx, [rbx+58h]
mov [r14+58h], rcx
mov [rbx+58h], rax
mov rax, [r14+60h]
mov rcx, [rbx+60h]
mov [r14+60h], rcx
mov [rbx+60h], rax
add r14, 68h ; 'h'
add rbx, 68h ; 'h'
mov rsi, r14
call _ZN6spdlog7details10backtracerC2EOS1_; spdlog::details::backtracer::backtracer(spdlog::details::backtracer&&)
lea r12, [rsp+158h+var_88]
mov rdi, r12
mov rsi, rbx
call _ZN6spdlog7details10backtracerC2EOS1_; spdlog::details::backtracer::backtracer(spdlog::details::backtracer&&)
lea r15, [rsp+158h+var_38]
mov rdi, r14
mov rsi, r12
call _ZN6spdlog7details10backtraceraSES1_; spdlog::details::backtracer::operator=(spdlog::details::backtracer)
lea r14, [rsp+158h+var_A0]
mov rdi, r15
call _ZNSt6vectorIN6spdlog7details14log_msg_bufferESaIS2_EED2Ev; std::vector<spdlog::details::log_msg_buffer>::~vector()
lea r15, [rsp+158h+var_F0]
mov rsi, rsp
mov rdi, r15
call _ZN6spdlog7details10backtracerC2EOS1_; spdlog::details::backtracer::backtracer(spdlog::details::backtracer&&)
mov rdi, rbx
mov rsi, r15
call _ZN6spdlog7details10backtraceraSES1_; spdlog::details::backtracer::operator=(spdlog::details::backtracer)
mov rdi, r14
call _ZNSt6vectorIN6spdlog7details14log_msg_bufferESaIS2_EED2Ev; std::vector<spdlog::details::log_msg_buffer>::~vector()
lea rdi, [rsp+158h+var_108]
call _ZNSt6vectorIN6spdlog7details14log_msg_bufferESaIS2_EED2Ev; std::vector<spdlog::details::log_msg_buffer>::~vector()
add rsp, 138h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov r15, r14
jmp short loc_2E51F
mov rbx, rax
loc_2E51F:
mov rdi, r15
call _ZNSt6vectorIN6spdlog7details14log_msg_bufferESaIS2_EED2Ev; std::vector<spdlog::details::log_msg_buffer>::~vector()
lea rdi, [rsp+158h+var_108]
call _ZNSt6vectorIN6spdlog7details14log_msg_bufferESaIS2_EED2Ev; std::vector<spdlog::details::log_msg_buffer>::~vector()
mov rdi, rbx
call __clang_call_terminate
| long long spdlog::logger::swap(spdlog::logger *this, spdlog::logger *a2)
{
long long v3; // rax
__int128 v4; // xmm1
long long v5; // rax
long long v6; // rax
_OWORD v8[5]; // [rsp+0h] [rbp-158h] BYREF
_BYTE v9[24]; // [rsp+50h] [rbp-108h] BYREF
_BYTE v10[80]; // [rsp+68h] [rbp-F0h] BYREF
_BYTE v11[24]; // [rsp+B8h] [rbp-A0h] BYREF
_BYTE v12[80]; // [rsp+D0h] [rbp-88h] BYREF
_BYTE v13[56]; // [rsp+120h] [rbp-38h] BYREF
std::string::swap((char *)this + 8, (char *)a2 + 8);
v3 = *((_QWORD *)this + 7);
v4 = *(_OWORD *)((char *)this + 40);
*(_OWORD *)((char *)this + 40) = *(_OWORD *)((char *)a2 + 40);
*((_QWORD *)this + 7) = *((_QWORD *)a2 + 7);
*(_OWORD *)((char *)a2 + 40) = v4;
*((_QWORD *)a2 + 7) = v3;
_InterlockedExchange(
(volatile __int32 *)a2 + 16,
_InterlockedExchange((volatile __int32 *)this + 16, *((_DWORD *)a2 + 16)));
_InterlockedExchange(
(volatile __int32 *)a2 + 17,
_InterlockedExchange((volatile __int32 *)this + 17, *((_DWORD *)a2 + 17)));
v8[0] = *(_OWORD *)((char *)this + 72);
*(_OWORD *)((char *)this + 72) = *(_OWORD *)((char *)a2 + 72);
*(_OWORD *)((char *)a2 + 72) = v8[0];
v5 = *((_QWORD *)this + 11);
*((_QWORD *)this + 11) = *((_QWORD *)a2 + 11);
*((_QWORD *)a2 + 11) = v5;
v6 = *((_QWORD *)this + 12);
*((_QWORD *)this + 12) = *((_QWORD *)a2 + 12);
*((_QWORD *)a2 + 12) = v6;
spdlog::details::backtracer::backtracer((long long)v8, (long long)this + 104);
spdlog::details::backtracer::backtracer((long long)v12, (long long)a2 + 104);
spdlog::details::backtracer::operator=((long long)this + 104, (long long)v12);
std::vector<spdlog::details::log_msg_buffer>::~vector(v13);
spdlog::details::backtracer::backtracer((long long)v10, (long long)v8);
spdlog::details::backtracer::operator=((long long)a2 + 104, (long long)v10);
std::vector<spdlog::details::log_msg_buffer>::~vector(v11);
return std::vector<spdlog::details::log_msg_buffer>::~vector(v9);
}
| swap:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x8
ADD RSI,0x8
CALL 0x0012fe66
MOV RAX,qword ptr [R14 + 0x38]
MOVUPS XMM0,xmmword ptr [RBX + 0x28]
MOVUPS XMM1,xmmword ptr [R14 + 0x28]
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RCX,qword ptr [RBX + 0x38]
MOV qword ptr [R14 + 0x38],RCX
MOVUPS xmmword ptr [RBX + 0x28],XMM1
MOV qword ptr [RBX + 0x38],RAX
MOV EAX,dword ptr [RBX + 0x40]
XCHG dword ptr [R14 + 0x40],EAX
XCHG dword ptr [RBX + 0x40],EAX
MOV EAX,dword ptr [RBX + 0x44]
XCHG dword ptr [R14 + 0x44],EAX
XCHG dword ptr [RBX + 0x44],EAX
MOVUPS XMM0,xmmword ptr [R14 + 0x48]
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM0
MOVUPS XMM0,xmmword ptr [RBX + 0x48]
MOVUPS xmmword ptr [R14 + 0x48],XMM0
MOVAPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV RAX,qword ptr [R14 + 0x58]
MOV RCX,qword ptr [RBX + 0x58]
MOV qword ptr [R14 + 0x58],RCX
MOV qword ptr [RBX + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x60]
MOV RCX,qword ptr [RBX + 0x60]
MOV qword ptr [R14 + 0x60],RCX
MOV qword ptr [RBX + 0x60],RAX
ADD R14,0x68
ADD RBX,0x68
MOV RSI,R14
CALL 0x0012c500
LEA R12,[RSP + 0xd0]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0012c500
LEA R15,[RSP + 0x120]
LAB_0012e4bd:
MOV RDI,R14
MOV RSI,R12
CALL 0x0012c570
LAB_0012e4c8:
LEA R14,[RSP + 0xb8]
MOV RDI,R15
CALL 0x00132bcc
LEA R15,[RSP + 0x68]
MOV RSI,RSP
MOV RDI,R15
CALL 0x0012c500
LAB_0012e4e8:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0012c570
MOV RDI,R14
CALL 0x00132bcc
LEA RDI,[RSP + 0x50]
CALL 0x00132bcc
ADD RSP,0x138
POP RBX
POP R12
POP R14
POP R15
RET
|
/* spdlog::logger::swap(spdlog::logger&) */
void __thiscall spdlog::logger::swap(logger *this,logger *param_1)
{
int4 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 local_158;
int8 uStack_150;
vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>
local_108 [24];
backtracer local_f0 [80];
vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>
local_a0 [24];
backtracer local_88 [80];
vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>
local_38 [24];
std::__cxx11::string::swap((string *)(this + 8),(string *)(param_1 + 8));
uVar2 = *(int8 *)(this + 0x38);
uVar3 = *(int8 *)(param_1 + 0x30);
uVar4 = *(int8 *)(this + 0x28);
uVar5 = *(int8 *)(this + 0x30);
*(int8 *)(this + 0x28) = *(int8 *)(param_1 + 0x28);
*(int8 *)(this + 0x30) = uVar3;
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x28) = uVar4;
*(int8 *)(param_1 + 0x30) = uVar5;
*(int8 *)(param_1 + 0x38) = uVar2;
LOCK();
uVar1 = *(int4 *)(this + 0x40);
*(int4 *)(this + 0x40) = *(int4 *)(param_1 + 0x40);
UNLOCK();
LOCK();
*(int4 *)(param_1 + 0x40) = uVar1;
UNLOCK();
LOCK();
uVar1 = *(int4 *)(this + 0x44);
*(int4 *)(this + 0x44) = *(int4 *)(param_1 + 0x44);
UNLOCK();
LOCK();
*(int4 *)(param_1 + 0x44) = uVar1;
UNLOCK();
local_158 = *(int8 *)(this + 0x48);
uStack_150 = *(int8 *)(this + 0x50);
uVar2 = *(int8 *)(param_1 + 0x50);
*(int8 *)(this + 0x48) = *(int8 *)(param_1 + 0x48);
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)(param_1 + 0x48) = local_158;
*(int8 *)(param_1 + 0x50) = uStack_150;
uVar2 = *(int8 *)(this + 0x58);
*(int8 *)(this + 0x58) = *(int8 *)(param_1 + 0x58);
*(int8 *)(param_1 + 0x58) = uVar2;
uVar2 = *(int8 *)(this + 0x60);
*(int8 *)(this + 0x60) = *(int8 *)(param_1 + 0x60);
*(int8 *)(param_1 + 0x60) = uVar2;
details::backtracer::backtracer((backtracer *)&local_158,(backtracer *)(this + 0x68));
details::backtracer::backtracer(local_88,(backtracer *)(param_1 + 0x68));
/* try { // try from 0012e4bd to 0012e4c7 has its CatchHandler @ 0012e51c */
details::backtracer::operator=((backtracer *)(this + 0x68),local_88);
std::vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>::
~vector(local_38);
details::backtracer::backtracer(local_f0,(backtracer *)&local_158);
/* try { // try from 0012e4e8 to 0012e4f2 has its CatchHandler @ 0012e514 */
details::backtracer::operator=((backtracer *)(param_1 + 0x68),local_f0);
std::vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>::
~vector(local_a0);
std::vector<spdlog::details::log_msg_buffer,std::allocator<spdlog::details::log_msg_buffer>>::
~vector(local_108);
return;
}
|
|
4,049 | uf_varchar2 | eloqsql/storage/myisam/mi_packrec.c | static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+length);
}
} | O3 | c | uf_varchar2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0xa303b
movl (%r14), %r13d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r13d
jae 0xa3058
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0xa18dd
movl $0x1f, 0x4(%r14)
movl (%r14), %r13d
movl $0x1f, %eax
testl %r13d, %r13d
js 0xa3027
movl 0x1c(%r15), %r12d
movl %eax, %ecx
subl %r12d, %ecx
jae 0xa309d
subl %eax, %r12d
movl %eax, %eax
leaq 0x6b5c1(%rip), %rcx # 0x10e630
andl (%rcx,%rax,4), %r13d
movl %r12d, %ecx
shll %cl, %r13d
movq %r14, %rdi
callq 0xa18dd
movl $0x20, %eax
subl %r12d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r12d
movl %r12d, %ecx
shrl %cl, %eax
addl %eax, %r13d
jmp 0xa30b3
movl %ecx, 0x4(%r14)
shrl %cl, %r13d
movl 0x1c(%r15), %eax
leaq 0x6b581(%rip), %rcx # 0x10e630
andl (%rcx,%rax,4), %r13d
movl %r13d, %eax
movw %r13w, (%rbx)
leaq (%rbx,%rax), %rcx
addq $0x2, %rcx
addq $0x2, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa21ce
| uf_varchar2_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_A303B
mov r13d, [r14]
dec eax
mov [r14+4], eax
bt r13d, eax
jnb short loc_A3058
loc_A3027:
mov word ptr [rbx], 0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A303B:
mov rdi, r14
call fill_buffer_0
mov dword ptr [r14+4], 1Fh
mov r13d, [r14]
mov eax, 1Fh
test r13d, r13d
js short loc_A3027
loc_A3058:
mov r12d, [r15+1Ch]
mov ecx, eax
sub ecx, r12d
jnb short loc_A309D
sub r12d, eax
mov eax, eax
lea rcx, mask_0
and r13d, [rcx+rax*4]
mov ecx, r12d
shl r13d, cl
mov rdi, r14
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r12d
mov [r14+4], eax
mov eax, [r14]
neg r12d
mov ecx, r12d
shr eax, cl
add r13d, eax
jmp short loc_A30B3
loc_A309D:
mov [r14+4], ecx
shr r13d, cl
mov eax, [r15+1Ch]
lea rcx, mask_0
and r13d, [rcx+rax*4]
loc_A30B3:
mov eax, r13d
mov [rbx], r13w
lea rcx, [rbx+rax]
add rcx, 2
add rbx, 2
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
| long long uf_varchar2_0(long long a1, unsigned int *a2, long long a3)
{
unsigned int v4; // eax
unsigned int v5; // r13d
long long result; // rax
unsigned int v7; // r12d
unsigned int v8; // ecx
int v9; // r12d
int v10; // r13d
unsigned int v11; // r13d
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
result = v4 - 1;
a2[1] = result;
if ( _bittest((const int *)&v5, result) )
{
LABEL_3:
*(_WORD *)a3 = 0;
return result;
}
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
v5 = *a2;
result = 31LL;
if ( (*a2 & 0x80000000) != 0 )
goto LABEL_3;
}
v7 = *(_DWORD *)(a1 + 28);
v8 = result - v7;
if ( (unsigned int)result >= v7 )
{
a2[1] = v8;
v11 = mask_0[*(unsigned int *)(a1 + 28)] & (v5 >> v8);
}
else
{
v9 = v7 - result;
v10 = (mask_0[(unsigned int)result] & v5) << v9;
fill_buffer_0((long long)a2);
a2[1] = 32 - v9;
v11 = (*a2 >> -(char)v9) + v10;
}
*(_WORD *)a3 = v11;
return (long long)decode_bytes_0(a1, (long long)a2, (_BYTE *)(a3 + 2), (_BYTE *)(a3 + v11 + 2));
}
| uf_varchar2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x001a303b
MOV R13D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R13D,EAX
JNC 0x001a3058
LAB_001a3027:
MOV word ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a303b:
MOV RDI,R14
CALL 0x001a18dd
MOV dword ptr [R14 + 0x4],0x1f
MOV R13D,dword ptr [R14]
MOV EAX,0x1f
TEST R13D,R13D
JS 0x001a3027
LAB_001a3058:
MOV R12D,dword ptr [R15 + 0x1c]
MOV ECX,EAX
SUB ECX,R12D
JNC 0x001a309d
SUB R12D,EAX
MOV EAX,EAX
LEA RCX,[0x20e630]
AND R13D,dword ptr [RCX + RAX*0x4]
MOV ECX,R12D
SHL R13D,CL
MOV RDI,R14
CALL 0x001a18dd
MOV EAX,0x20
SUB EAX,R12D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R12D
MOV ECX,R12D
SHR EAX,CL
ADD R13D,EAX
JMP 0x001a30b3
LAB_001a309d:
MOV dword ptr [R14 + 0x4],ECX
SHR R13D,CL
MOV EAX,dword ptr [R15 + 0x1c]
LEA RCX,[0x20e630]
AND R13D,dword ptr [RCX + RAX*0x4]
LAB_001a30b3:
MOV EAX,R13D
MOV word ptr [RBX],R13W
LEA RCX,[RBX + RAX*0x1]
ADD RCX,0x2
ADD RBX,0x2
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a21ce
|
void uf_varchar2(long param_1,uint *param_2,int2 *param_3)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if (-1 < (int)uVar5) goto LAB_001a3058;
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_001a3058:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
*param_3 = (short)uVar5;
decode_bytes(param_1,param_2,param_3 + 1,(long)param_3 + (ulong)uVar5 + 2);
return;
}
}
*param_3 = 0;
return;
}
|
|
4,050 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O0 | c | set_object_name:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0xadcb0
movl %eax, 0x1c(%rsp)
cmpl $0x4d, 0x1c(%rsp)
jne 0xa6efc
movq 0x20(%rsp), %rax
movslq 0x168(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x20(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
movq 0x30(%rsp), %rdi
movl $0x4d, %esi
callq 0x9cf20
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x9e490
jmp 0xa6fc9
cmpl $0xc3, 0x1c(%rsp)
jne 0xa6fc7
movq 0x20(%rsp), %rax
movl 0x168(%rax), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rdi
movq 0x20(%rsp), %rax
movslq 0x168(%rax), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, %ecx
movl 0x4(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rdi
movslq 0x18(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x29040
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0x18(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0x27fa0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x68270
movq 0x20(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
jmp 0xa6fc9
addq $0x38, %rsp
retq
nop
| set_object_name:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_C], esi
mov rax, [rsp+38h+var_8]
mov rax, [rax+90h]
mov [rsp+38h+var_18], rax
mov rdi, [rsp+38h+var_18]
call get_prev_opcode
mov [rsp+38h+var_1C], eax
cmp [rsp+38h+var_1C], 4Dh ; 'M'
jnz short loc_A6EFC
mov rax, [rsp+38h+var_18]
movsxd rcx, dword ptr [rax+168h]
mov rax, [rsp+38h+var_18]
mov [rax+140h], rcx
mov rax, [rsp+38h+var_18]
mov dword ptr [rax+168h], 0FFFFFFFFh
mov rdi, [rsp+38h+var_8]
mov esi, 4Dh ; 'M'
call emit_op
mov rdi, [rsp+38h+var_8]
mov esi, [rsp+38h+var_C]
call emit_atom
jmp loc_A6FC9
loc_A6EFC:
cmp [rsp+38h+var_1C], 0C3h
jnz loc_A6FC7
mov rax, [rsp+38h+var_18]
mov eax, [rax+168h]
add eax, 1
mov [rsp+38h+var_34], eax
mov rax, [rsp+38h+var_18]
mov rdi, [rax+138h]
mov rax, [rsp+38h+var_18]
movsxd rax, dword ptr [rax+168h]
add rdi, rax
add rdi, 1
call get_u32
mov ecx, eax
mov eax, [rsp+38h+var_34]
sub eax, ecx
mov [rsp+38h+var_20], eax
mov rax, [rsp+38h+var_18]
mov rdi, [rax+138h]
movsxd rax, [rsp+38h+var_20]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+38h+var_24], eax
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov esi, [rsp+38h+var_24]
call JS_FreeAtom
mov rax, [rsp+38h+var_18]
mov rax, [rax+138h]
movsxd rcx, [rsp+38h+var_20]
add rax, rcx
add rax, 1
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov esi, [rsp+38h+var_C]
call JS_DupAtom
mov rdi, [rsp+38h+var_30]
mov esi, eax
call put_u32
mov rax, [rsp+38h+var_18]
mov dword ptr [rax+168h], 0FFFFFFFFh
loc_A6FC7:
jmp short $+2
loc_A6FC9:
add rsp, 38h
retn
| long long set_object_name(long long *a1, unsigned int a2)
{
long long result; // rax
unsigned int u32; // eax
int v4; // eax
int v5; // [rsp+4h] [rbp-34h]
_DWORD *v6; // [rsp+8h] [rbp-30h]
int v7; // [rsp+18h] [rbp-20h]
long long v8; // [rsp+20h] [rbp-18h]
v8 = a1[18];
result = get_prev_opcode(v8);
if ( (_DWORD)result == 77 )
{
*(_QWORD *)(v8 + 320) = *(int *)(v8 + 360);
*(_DWORD *)(v8 + 360) = -1;
emit_op((long long)a1, 77);
return emit_atom(a1, a2);
}
else if ( (_DWORD)result == 195 )
{
v5 = *(_DWORD *)(v8 + 360) + 1;
v7 = v5 - get_u32((unsigned int *)(*(int *)(v8 + 360) + *(_QWORD *)(v8 + 312) + 1LL));
u32 = get_u32((unsigned int *)(v7 + *(_QWORD *)(v8 + 312) + 1LL));
JS_FreeAtom(*a1, u32);
v6 = (_DWORD *)(v7 + *(_QWORD *)(v8 + 312) + 1LL);
v4 = JS_DupAtom(*a1, a2);
put_u32(v6, v4);
result = v8;
*(_DWORD *)(v8 + 360) = -1;
}
return result;
}
| set_object_name:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ESI
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001adcb0
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x4d
JNZ 0x001a6efc
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RAX + 0x168]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x140],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x168],0xffffffff
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,0x4d
CALL 0x0019cf20
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x0019e490
JMP 0x001a6fc9
LAB_001a6efc:
CMP dword ptr [RSP + 0x1c],0xc3
JNZ 0x001a6fc7
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0x168]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RAX + 0x168]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,ECX
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x138]
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x00129040
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0x18]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00127fa0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x00168270
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x168],0xffffffff
LAB_001a6fc7:
JMP 0x001a6fc9
LAB_001a6fc9:
ADD RSP,0x38
RET
|
void set_object_name(int8 *param_1,int4 param_2)
{
long lVar1;
long lVar2;
int iVar3;
int iVar4;
int4 uVar5;
lVar1 = param_1[0x12];
iVar3 = get_prev_opcode(lVar1);
if (iVar3 == 0x4d) {
*(long *)(lVar1 + 0x140) = (long)*(int *)(lVar1 + 0x168);
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4d);
emit_atom(param_1,param_2);
}
else if (iVar3 == 0xc3) {
iVar3 = *(int *)(lVar1 + 0x168);
iVar4 = get_u32(*(long *)(lVar1 + 0x138) + (long)*(int *)(lVar1 + 0x168) + 1);
iVar4 = (iVar3 + 1) - iVar4;
uVar5 = get_u32(*(long *)(lVar1 + 0x138) + (long)iVar4 + 1);
JS_FreeAtom(*param_1,uVar5);
lVar2 = *(long *)(lVar1 + 0x138);
uVar5 = JS_DupAtom(*param_1,param_2);
put_u32(lVar2 + iVar4 + 1,uVar5);
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
return;
}
|
|
4,051 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O1 | c | set_object_name:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
movq 0x90(%rdi), %r14
movslq 0x168(%r14), %rax
testq %rax, %rax
js 0x64e4a
movq 0x138(%r14), %rcx
movb (%rcx,%rax), %cl
jmp 0x64e4c
xorl %ecx, %ecx
cmpb $-0x3d, %cl
je 0x64e94
movzbl %cl, %ecx
cmpl $0x4d, %ecx
jne 0x64ee5
movq %rax, 0x140(%r14)
movl %eax, 0x168(%r14)
addq $0x138, %r14 # imm = 0x138
movq %r14, %rdi
movl $0x4d, %esi
callq 0x1b4d0
movq %r15, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5ebfa
movq 0x138(%r14), %rcx
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
movslq %eax, %r12
movl 0x1(%rcx,%r12), %esi
movq (%r15), %rdi
callq 0x207d8
movq 0x138(%r14), %rax
cmpl $0xe0, %ebx
jl 0x64ed5
movq (%r15), %rcx
movq 0x18(%rcx), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x1(%rax,%r12)
movl $0xffffffff, 0x168(%r14) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| set_object_name:
push r15
push r14
push r12
push rbx
push rax
mov ebx, esi
mov r15, rdi
mov r14, [rdi+90h]
movsxd rax, dword ptr [r14+168h]
test rax, rax
js short loc_64E4A
mov rcx, [r14+138h]
mov cl, [rcx+rax]
jmp short loc_64E4C
loc_64E4A:
xor ecx, ecx
loc_64E4C:
cmp cl, 0C3h
jz short loc_64E94
movzx ecx, cl
cmp ecx, 4Dh ; 'M'
jnz loc_64EE5
mov [r14+140h], rax
mov [r14+168h], eax
add r14, 138h
mov rdi, r14
mov esi, 4Dh ; 'M'
call dbuf_putc
mov rdi, r15
mov esi, ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp emit_atom
loc_64E94:
mov rcx, [r14+138h]
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
movsxd r12, eax
mov esi, [rcx+r12+1]
mov rdi, [r15]
call JS_FreeAtom
mov rax, [r14+138h]
cmp ebx, 0E0h
jl short loc_64ED5
mov rcx, [r15]
mov rcx, [rcx+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_64ED5:
mov [rax+r12+1], ebx
mov dword ptr [r14+168h], 0FFFFFFFFh
loc_64EE5:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long set_object_name(long long *a1, int a2)
{
long long v2; // r14
long long result; // rax
char v4; // cl
long long v5; // rcx
long long v6; // r12
_DWORD *v7; // rcx
v2 = a1[18];
result = *(int *)(v2 + 360);
if ( result < 0 )
v4 = 0;
else
v4 = *(_BYTE *)(*(_QWORD *)(v2 + 312) + result);
if ( v4 == -61 )
{
v5 = *(_QWORD *)(v2 + 312);
v6 = (int)result - *(_DWORD *)(v5 + result + 1) + 1;
JS_FreeAtom(*a1, *(_DWORD *)(v5 + v6 + 1));
result = *(_QWORD *)(v2 + 312);
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)(result + v6 + 1) = a2;
*(_DWORD *)(v2 + 360) = -1;
}
else if ( v4 == 77 )
{
*(_QWORD *)(v2 + 320) = result;
*(_DWORD *)(v2 + 360) = result;
dbuf_putc((_QWORD *)(v2 + 312), 77);
return (long long)emit_atom(a1, a2);
}
return result;
}
| |||
4,052 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O2 | c | set_object_name:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x90(%rdi), %r15
movslq 0x168(%r15), %rax
testq %rax, %rax
js 0x56170
movl %esi, %ebx
movq %rdi, %r14
movq 0x138(%r15), %rcx
movzbl (%rcx,%rax), %edx
cmpl $0xc3, %edx
je 0x56129
cmpl $0x4d, %edx
jne 0x56170
movq %rax, 0x140(%r15)
orl $-0x1, 0x168(%r15)
pushq $0x4d
popq %rsi
movq %r14, %rdi
callq 0x4fa1b
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x510fc
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
movslq %eax, %r12
movl 0x1(%rcx,%r12), %esi
movq (%r14), %rdi
callq 0x1a995
movq 0x138(%r15), %rax
cmpl $0xe0, %ebx
jl 0x56163
movq (%r14), %rcx
movq 0x18(%rcx), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x1(%rax,%r12)
orl $-0x1, 0x168(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| set_object_name:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+90h]
movsxd rax, dword ptr [r15+168h]
test rax, rax
js loc_56170
mov ebx, esi
mov r14, rdi
mov rcx, [r15+138h]
movzx edx, byte ptr [rcx+rax]
cmp edx, 0C3h
jz short loc_56129
cmp edx, 4Dh ; 'M'
jnz short loc_56170
mov [r15+140h], rax
or dword ptr [r15+168h], 0FFFFFFFFh
push 4Dh ; 'M'
pop rsi
mov rdi, r14
call emit_op
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp emit_atom
loc_56129:
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
movsxd r12, eax
mov esi, [rcx+r12+1]
mov rdi, [r14]
call JS_FreeAtom
mov rax, [r15+138h]
cmp ebx, 0E0h
jl short loc_56163
mov rcx, [r14]
mov rcx, [rcx+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_56163:
mov [rax+r12+1], ebx
or dword ptr [r15+168h], 0FFFFFFFFh
loc_56170:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long set_object_name(long long *a1, int a2)
{
long long v2; // r15
long long result; // rax
long long v4; // rcx
int v5; // edx
long long v6; // r12
_DWORD *v7; // rcx
v2 = a1[18];
result = *(int *)(v2 + 360);
if ( result >= 0 )
{
v4 = *(_QWORD *)(v2 + 312);
v5 = *(unsigned __int8 *)(v4 + result);
if ( v5 == 195 )
{
v6 = (int)result - *(_DWORD *)(v4 + result + 1) + 1;
JS_FreeAtom(*a1, *(_DWORD *)(v4 + v6 + 1));
result = *(_QWORD *)(v2 + 312);
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)(result + v6 + 1) = a2;
*(_DWORD *)(v2 + 360) = -1;
}
else if ( v5 == 77 )
{
*(_QWORD *)(v2 + 320) = result;
*(_DWORD *)(v2 + 360) = -1;
emit_op((long long)a1, 77);
return emit_atom((long long)a1, (unsigned int)a2);
}
}
return result;
}
| set_object_name:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0x90]
MOVSXD RAX,dword ptr [R15 + 0x168]
TEST RAX,RAX
JS 0x00156170
MOV EBX,ESI
MOV R14,RDI
MOV RCX,qword ptr [R15 + 0x138]
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP EDX,0xc3
JZ 0x00156129
CMP EDX,0x4d
JNZ 0x00156170
MOV qword ptr [R15 + 0x140],RAX
OR dword ptr [R15 + 0x168],0xffffffff
PUSH 0x4d
POP RSI
MOV RDI,R14
CALL 0x0014fa1b
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001510fc
LAB_00156129:
MOV EDX,dword ptr [RCX + RAX*0x1 + 0x1]
SUB EAX,EDX
INC EAX
MOVSXD R12,EAX
MOV ESI,dword ptr [RCX + R12*0x1 + 0x1]
MOV RDI,qword ptr [R14]
CALL 0x0011a995
MOV RAX,qword ptr [R15 + 0x138]
CMP EBX,0xe0
JL 0x00156163
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00156163:
MOV dword ptr [RAX + R12*0x1 + 0x1],EBX
OR dword ptr [R15 + 0x168],0xffffffff
LAB_00156170:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void set_object_name(long *param_1,uint param_2)
{
long lVar1;
long lVar2;
int *piVar3;
long lVar4;
long lVar5;
lVar1 = param_1[0x12];
lVar4 = (long)*(int *)(lVar1 + 0x168);
if (-1 < lVar4) {
lVar2 = *(long *)(lVar1 + 0x138);
if (*(char *)(lVar2 + lVar4) == -0x3d) {
lVar5 = (long)((*(int *)(lVar1 + 0x168) - *(int *)(lVar2 + 1 + lVar4)) + 1);
JS_FreeAtom(*param_1,*(int4 *)(lVar2 + 1 + lVar5));
lVar4 = *(long *)(lVar1 + 0x138);
if (0xdf < (int)param_2) {
piVar3 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar4 + 1 + lVar5) = param_2;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
else if (*(char *)(lVar2 + lVar4) == 'M') {
*(long *)(lVar1 + 0x140) = lVar4;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4d);
emit_atom(param_1,param_2);
return;
}
}
return;
}
|
|
4,053 | stbi_is_16_bit_from_memory | monkey531[P]llama/examples/llava/../../common/stb_image.h | STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len)
{
stbi__context s;
stbi__start_mem(&s,buffer,len);
return stbi__is_16_main(&s);
} | O2 | c | stbi_is_16_bit_from_memory:
subq $0xe8, %rsp
leaq 0x8(%rsp), %rax
andq $0x0, 0x10(%rax)
andl $0x0, 0x30(%rax)
andl $0x0, 0xb8(%rax)
movq %rdi, 0xd0(%rax)
movq %rdi, 0xc0(%rax)
movslq %esi, %rcx
addq %rdi, %rcx
movq %rcx, 0xd8(%rax)
movq %rcx, 0xc8(%rax)
movq %rax, %rdi
callq 0x2fd84
addq $0xe8, %rsp
retq
| stbi_is_16_bit_from_memory:
sub rsp, 0E8h
lea rax, [rsp+0E8h+var_E0]
and qword ptr [rax+10h], 0
and dword ptr [rax+30h], 0
and dword ptr [rax+0B8h], 0
mov [rax+0D0h], rdi
mov [rax+0C0h], rdi
movsxd rcx, esi
add rcx, rdi
mov [rax+0D8h], rcx
mov [rax+0C8h], rcx
mov rdi, rax
call _ZL16stbi__is_16_mainP13stbi__context; stbi__is_16_main(stbi__context *)
add rsp, 0E8h
retn
| _BOOL8 stbi_is_16_bit_from_memory(long long a1, int a2)
{
_BYTE v3[16]; // [rsp+8h] [rbp-E0h] BYREF
long long v4; // [rsp+18h] [rbp-D0h]
int v5; // [rsp+38h] [rbp-B0h]
int v6; // [rsp+C0h] [rbp-28h]
long long v7; // [rsp+C8h] [rbp-20h]
long long v8; // [rsp+D0h] [rbp-18h]
long long v9; // [rsp+D8h] [rbp-10h]
long long v10; // [rsp+E0h] [rbp-8h]
v4 = 0LL;
v5 = 0;
v6 = 0;
v9 = a1;
v7 = a1;
v10 = a1 + a2;
v8 = v10;
return stbi__is_16_main((long long)v3);
}
| stbi_is_16_bit_from_memory:
SUB RSP,0xe8
LEA RAX,[RSP + 0x8]
AND qword ptr [RAX + 0x10],0x0
AND dword ptr [RAX + 0x30],0x0
AND dword ptr [RAX + 0xb8],0x0
MOV qword ptr [RAX + 0xd0],RDI
MOV qword ptr [RAX + 0xc0],RDI
MOVSXD RCX,ESI
ADD RCX,RDI
MOV qword ptr [RAX + 0xd8],RCX
MOV qword ptr [RAX + 0xc8],RCX
MOV RDI,RAX
CALL 0x0012fd84
ADD RSP,0xe8
RET
|
void stbi_is_16_bit_from_memory(long param_1,int param_2)
{
stbi__context local_e0 [16];
int8 local_d0;
int4 local_b0;
int4 local_28;
long local_20;
long local_18;
long local_10;
long local_8;
local_d0 = 0;
local_b0 = 0;
local_28 = 0;
local_18 = param_2 + param_1;
local_20 = param_1;
local_10 = param_1;
local_8 = local_18;
stbi__is_16_main(local_e0);
return;
}
|
|
4,054 | JS_ToIntegerFree | bluesky950520[P]quickjs/quickjs.c | static __maybe_unused JSValue JS_ToIntegerFree(JSContext *ctx, JSValue val)
{
uint32_t tag;
JSValue ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = js_int32(JS_VALUE_GET_INT(val));
break;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
ret = js_int32(0);
} else {
/* convert -0 to +0 */
d = trunc(d) + 0.0;
ret = js_number(d);
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val))
return val;
goto redo;
}
return ret;
} | O0 | c | JS_ToIntegerFree:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl 0x80(%rsp), %eax
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x4, %eax
jb 0xcb841
jmp 0xcb833
movl 0xc(%rsp), %eax
subl $0x7, %eax
je 0xcb86d
jmp 0xcb8f6
movl 0x78(%rsp), %edi
callq 0x39fb0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xcb969
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0xcb88c
jmp 0xcb8b3
xorl %edi, %edi
callq 0x39fb0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xcb8f4
movsd 0x40(%rsp), %xmm0
callq 0xe150
xorps %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x27920
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xcb969
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x56da0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0xcb964
movq 0x78(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0xcb983
jmp 0xcb819
movq 0x58(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax,%rax)
| JS_ToIntegerFree:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
loc_CB819:
mov eax, dword ptr [rsp+98h+var_18]
mov [rsp+98h+var_2C], eax
mov eax, [rsp+98h+var_2C]
mov [rsp+98h+var_8C], eax
sub eax, 4
jb short loc_CB841
jmp short $+2
loc_CB833:
mov eax, [rsp+98h+var_8C]
sub eax, 7
jz short loc_CB86D
jmp loc_CB8F6
loc_CB841:
mov edi, dword ptr [rsp+98h+var_20]
call js_int32
mov [rsp+98h+var_50], rax
mov [rsp+98h+var_48], rdx
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_38], rax
jmp loc_CB969
loc_CB86D:
movsd xmm0, [rsp+98h+var_20]
movsd [rsp+98h+var_58], xmm0
movsd xmm0, [rsp+98h+var_58]
ucomisd xmm0, xmm0
setp al
test al, 1
jnz short loc_CB88C
jmp short loc_CB8B3
loc_CB88C:
xor edi, edi
call js_int32
mov [rsp+98h+var_68], rax
mov [rsp+98h+var_60], rdx
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_60]
mov [rsp+98h+var_38], rax
jmp short loc_CB8F4
loc_CB8B3:
movsd xmm0, [rsp+98h+var_58]
call _trunc
xorps xmm1, xmm1
addsd xmm0, xmm1
movsd [rsp+98h+var_58], xmm0
movsd xmm0, [rsp+98h+var_58]
call js_number
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], rdx
mov rax, [rsp+98h+var_78]
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_70]
mov [rsp+98h+var_38], rax
loc_CB8F4:
jmp short loc_CB969
loc_CB8F6:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
call JS_ToNumberFree
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_20], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_18], rax
mov rdi, [rsp+98h+var_20]
mov rsi, [rsp+98h+var_18]
call JS_IsException_1
cmp eax, 0
jz short loc_CB964
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_8], rax
jmp short loc_CB983
loc_CB964:
jmp loc_CB819
loc_CB969:
mov rax, [rsp+98h+var_40]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_38]
mov [rsp+98h+var_8], rax
loc_CB983:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long JS_ToIntegerFree(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rdx
long long v9; // [rsp+10h] [rbp-88h]
double v10; // [rsp+40h] [rbp-58h]
while ( 1 )
{
if ( (unsigned int)a3 < 4 )
return js_int32(a2);
if ( (_DWORD)a3 == 7 )
break;
v9 = JS_ToNumberFree(a1, a2, a3, a4, a5, a6);
a2 = v9;
a3 = v6;
if ( JS_IsException_1(v9, v6) )
return v9;
}
v10 = trunc(*(double *)&a2) + 0.0;
return js_number(v10);
}
| JS_ToIntegerFree:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
LAB_001cb819:
MOV EAX,dword ptr [RSP + 0x80]
MOV dword ptr [RSP + 0x6c],EAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x4
JC 0x001cb841
JMP 0x001cb833
LAB_001cb833:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x7
JZ 0x001cb86d
JMP 0x001cb8f6
LAB_001cb841:
MOV EDI,dword ptr [RSP + 0x78]
CALL 0x00139fb0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001cb969
LAB_001cb86d:
MOVSD XMM0,qword ptr [RSP + 0x78]
MOVSD qword ptr [RSP + 0x40],XMM0
MOVSD XMM0,qword ptr [RSP + 0x40]
UCOMISD XMM0,XMM0
SETP AL
TEST AL,0x1
JNZ 0x001cb88c
JMP 0x001cb8b3
LAB_001cb88c:
XOR EDI,EDI
CALL 0x00139fb0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001cb8f4
LAB_001cb8b3:
MOVSD XMM0,qword ptr [RSP + 0x40]
CALL 0x0010e150
XORPS XMM1,XMM1
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
MOVSD XMM0,qword ptr [RSP + 0x40]
CALL 0x00127920
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x60],RAX
LAB_001cb8f4:
JMP 0x001cb969
LAB_001cb8f6:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x00156da0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x80]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001cb964
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001cb983
LAB_001cb964:
JMP 0x001cb819
LAB_001cb969:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x90],RAX
LAB_001cb983:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16] JS_ToIntegerFree(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
int iVar2;
double dVar3;
int1 auVar4 [16];
double local_20;
int8 local_18;
auVar4._8_8_ = param_3;
auVar4._0_8_ = param_2;
while( true ) {
local_18 = auVar4._8_8_;
uVar1 = local_18;
local_20 = auVar4._0_8_;
local_18._0_4_ = auVar4._8_4_;
if ((uint)local_18 < 4) {
auVar4 = js_int32((ulong)local_20 & 0xffffffff);
return auVar4;
}
if ((uint)local_18 == 7) break;
auVar4 = JS_ToNumberFree(param_1,local_20,uVar1);
iVar2 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar2 != 0) {
return auVar4;
}
}
if (!NAN(local_20)) {
dVar3 = trunc(local_20);
auVar4 = js_number(dVar3 + 0.0);
return auVar4;
}
auVar4 = js_int32(0);
return auVar4;
}
|
|
4,055 | JS_ToIntegerFree | bluesky950520[P]quickjs/quickjs.c | static __maybe_unused JSValue JS_ToIntegerFree(JSContext *ctx, JSValue val)
{
uint32_t tag;
JSValue ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = js_int32(JS_VALUE_GET_INT(val));
break;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
ret = js_int32(0);
} else {
/* convert -0 to +0 */
d = trunc(d) + 0.0;
ret = js_number(d);
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val))
return val;
goto redo;
}
return ret;
} | O2 | c | JS_ToIntegerFree:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
cmpl $0x4, %edx
jb 0x649ef
cmpl $0x7, %edx
je 0x649f5
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31dc6
cmpl $0x6, %edx
jne 0x649d3
jmp 0x649f3
movl %eax, %eax
xorl %edx, %edx
popq %rbx
retq
movq %rax, %xmm0
ucomisd %xmm0, %xmm0
jp 0x64a14
callq 0xe160
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
callq 0x1ab4e
jmp 0x649f3
xorl %eax, %eax
jmp 0x649f1
| JS_ToIntegerFree:
push rbx
mov rax, rsi
mov rbx, rdi
loc_649D3:
cmp edx, 4
jb short loc_649EF
cmp edx, 7
jz short loc_649F5
mov rdi, rbx
mov rsi, rax
call JS_ToNumberFree
cmp edx, 6
jnz short loc_649D3
jmp short loc_649F3
loc_649EF:
mov eax, eax
loc_649F1:
xor edx, edx
loc_649F3:
pop rbx
retn
loc_649F5:
movq xmm0, rax
ucomisd xmm0, xmm0
jp short loc_64A14
call _trunc
xorpd xmm1, xmm1
addsd xmm0, xmm1
call js_number
jmp short loc_649F3
loc_64A14:
xor eax, eax
jmp short loc_649F1
| long long JS_ToIntegerFree(long long a1, long long a2, long long a3)
{
long long result; // rax
double v4; // xmm0_8
result = a2;
while ( 1 )
{
if ( (unsigned int)a3 < 4 )
return (unsigned int)result;
if ( (_DWORD)a3 == 7 )
break;
result = JS_ToNumberFree(a1, result, a3);
if ( (_DWORD)a3 == 6 )
return result;
}
v4 = trunc(*(double *)&result);
return js_number(v4 + 0.0);
}
| JS_ToIntegerFree:
PUSH RBX
MOV RAX,RSI
MOV RBX,RDI
LAB_001649d3:
CMP EDX,0x4
JC 0x001649ef
CMP EDX,0x7
JZ 0x001649f5
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00131dc6
CMP EDX,0x6
JNZ 0x001649d3
JMP 0x001649f3
LAB_001649ef:
MOV EAX,EAX
LAB_001649f1:
XOR EDX,EDX
LAB_001649f3:
POP RBX
RET
LAB_001649f5:
MOVQ XMM0,RAX
UCOMISD XMM0,XMM0
JP 0x00164a14
CALL 0x0010e160
XORPD XMM1,XMM1
ADDSD XMM0,XMM1
CALL 0x0011ab4e
JMP 0x001649f3
LAB_00164a14:
XOR EAX,EAX
JMP 0x001649f1
|
ulong JS_ToIntegerFree(int8 param_1,int8 param_2,int8 param_3)
{
ulong uVar1;
double dVar2;
int1 auVar3 [16];
auVar3._8_8_ = param_3;
auVar3._0_8_ = param_2;
while( true ) {
dVar2 = auVar3._0_8_;
if (auVar3._8_4_ < 4) {
return (ulong)dVar2 & 0xffffffff;
}
if (auVar3._8_4_ == 7) break;
auVar3 = JS_ToNumberFree(param_1,dVar2);
if (auVar3._8_4_ == 6) {
return auVar3._0_8_;
}
}
if (!NAN(dVar2)) {
dVar2 = trunc(dVar2);
uVar1 = js_number(dVar2 + 0.0);
return uVar1;
}
return 0;
}
|
|
4,056 | JS_ToIntegerFree | bluesky950520[P]quickjs/quickjs.c | static __maybe_unused JSValue JS_ToIntegerFree(JSContext *ctx, JSValue val)
{
uint32_t tag;
JSValue ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = js_int32(JS_VALUE_GET_INT(val));
break;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
ret = js_int32(0);
} else {
/* convert -0 to +0 */
d = trunc(d) + 0.0;
ret = js_number(d);
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val))
return val;
goto redo;
}
return ret;
} | O3 | c | JS_ToIntegerFree:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
cmpl $0x4, %edx
jb 0x79a47
cmpl $0x7, %edx
je 0x79a4d
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x486a1
cmpl $0x6, %edx
jne 0x79a29
jmp 0x79a4b
movl %eax, %eax
xorl %edx, %edx
popq %rbx
retq
movq %rax, %xmm0
ucomisd %xmm0, %xmm0
jp 0x79ac5
callq 0xe150
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movq %xmm1, %rax
movq %rax, %rcx
shrq $0x34, %rcx
andl $0x7ff, %ecx # imm = 0x7FF
addq $-0x3ff, %rcx # imm = 0xFC01
cmpq $0x1f, %rcx
jb 0x79a9e
testq %rax, %rax
sete %dl
movabsq $-0x3e20000000000000, %rcx # imm = 0xC1E0000000000000
cmpq %rcx, %rax
sete %cl
orb %dl, %cl
jmp 0x79aae
movq %rax, %rdx
shlq $0xc, %rdx
shlq %cl, %rdx
testq %rdx, %rdx
sete %cl
cvttsd2si %xmm1, %edx
xorl %esi, %esi
testb %cl, %cl
cmovneq %rdx, %rax
movl $0x7, %edx
cmovneq %rsi, %rdx
jmp 0x79a4b
xorl %eax, %eax
jmp 0x79a49
| JS_ToIntegerFree:
push rbx
mov rax, rsi
mov rbx, rdi
loc_79A29:
cmp edx, 4
jb short loc_79A47
cmp edx, 7
jz short loc_79A4D
mov rdi, rbx
mov rsi, rax
xor ecx, ecx
call JS_ToNumberHintFree
cmp edx, 6
jnz short loc_79A29
jmp short loc_79A4B
loc_79A47:
mov eax, eax
loc_79A49:
xor edx, edx
loc_79A4B:
pop rbx
retn
loc_79A4D:
movq xmm0, rax
ucomisd xmm0, xmm0
jp short loc_79AC5
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
movq rax, xmm1
mov rcx, rax
shr rcx, 34h
and ecx, 7FFh
add rcx, 0FFFFFFFFFFFFFC01h
cmp rcx, 1Fh
jb short loc_79A9E
test rax, rax
setz dl
mov rcx, 0C1E0000000000000h
cmp rax, rcx
setz cl
or cl, dl
jmp short loc_79AAE
loc_79A9E:
mov rdx, rax
shl rdx, 0Ch
shl rdx, cl
test rdx, rdx
setz cl
loc_79AAE:
cvttsd2si edx, xmm1
xor esi, esi
test cl, cl
cmovnz rax, rdx
mov edx, 7
cmovnz rdx, rsi
jmp short loc_79A4B
loc_79AC5:
xor eax, eax
jmp short loc_79A49
| int * JS_ToIntegerFree(
long long a1,
int *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
int *result; // rax
long long v15; // rbx
double v16; // xmm0_8
bool v17; // cl
result = a2;
v15 = a1;
while ( 1 )
{
if ( (unsigned int)a3 < 4 )
return (int *)(unsigned int)result;
if ( (_DWORD)a3 == 7 )
break;
a1 = v15;
a2 = result;
*(double *)&result = COERCE_DOUBLE(JS_ToNumberHintFree(v15, result, a3, 0, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11));
if ( (_DWORD)a3 == 6 )
return result;
}
v16 = trunc(a1, a2, a3);
*(double *)&result = v16 + 0.0;
if ( ((COERCE_UNSIGNED_INT64(v16 + 0.0) >> 52) & 0x7FF) - 1023 < 0x1F )
v17 = (_QWORD)result << 12 << ((unsigned __int8)(COERCE_UNSIGNED_INT64(v16 + 0.0) >> 52) + 1) == 0LL;
else
v17 = result == 0LL || result == (int *)0xC1E0000000000000LL;
if ( v17 )
return (int *)(unsigned int)(int)(v16 + 0.0);
return result;
}
| JS_ToIntegerFree:
PUSH RBX
MOV RAX,RSI
MOV RBX,RDI
LAB_00179a29:
CMP EDX,0x4
JC 0x00179a47
CMP EDX,0x7
JZ 0x00179a4d
MOV RDI,RBX
MOV RSI,RAX
XOR ECX,ECX
CALL 0x001486a1
CMP EDX,0x6
JNZ 0x00179a29
JMP 0x00179a4b
LAB_00179a47:
MOV EAX,EAX
LAB_00179a49:
XOR EDX,EDX
LAB_00179a4b:
POP RBX
RET
LAB_00179a4d:
MOVQ XMM0,RAX
UCOMISD XMM0,XMM0
JP 0x00179ac5
CALL 0x0010e150
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
MOVQ RAX,XMM1
MOV RCX,RAX
SHR RCX,0x34
AND ECX,0x7ff
ADD RCX,-0x3ff
CMP RCX,0x1f
JC 0x00179a9e
TEST RAX,RAX
SETZ DL
MOV RCX,-0x3e20000000000000
CMP RAX,RCX
SETZ CL
OR CL,DL
JMP 0x00179aae
LAB_00179a9e:
MOV RDX,RAX
SHL RDX,0xc
SHL RDX,CL
TEST RDX,RDX
SETZ CL
LAB_00179aae:
CVTTSD2SI EDX,XMM1
XOR ESI,ESI
TEST CL,CL
CMOVNZ RAX,RDX
MOV EDX,0x7
CMOVNZ RDX,RSI
JMP 0x00179a4b
LAB_00179ac5:
XOR EAX,EAX
JMP 0x00179a49
|
double JS_ToIntegerFree(int8 param_1,int8 param_2,int8 param_3)
{
bool bVar1;
ulong uVar2;
int8 extraout_RDX;
long lVar3;
double dVar4;
int1 auVar5 [16];
auVar5._8_8_ = param_3;
auVar5._0_8_ = param_2;
while( true ) {
dVar4 = auVar5._0_8_;
if (auVar5._8_4_ < 4) {
return (double)((ulong)dVar4 & 0xffffffff);
}
if (auVar5._8_4_ == 7) break;
auVar5 = JS_ToNumberHintFree(param_1,dVar4,auVar5._8_8_,0);
if (auVar5._8_4_ == 6) {
return auVar5._0_8_;
}
}
if (NAN(dVar4)) {
return 0.0;
}
dVar4 = trunc(dVar4);
dVar4 = dVar4 + 0.0;
uVar2 = (ulong)((uint)((ulong)dVar4 >> 0x34) & 0x7ff) - 0x3ff;
if (uVar2 < 0x1f) {
lVar3 = ((long)dVar4 << 0xc) << ((byte)uVar2 & 0x3f);
bVar1 = lVar3 == 0;
}
else {
lVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),dVar4 == 0.0);
bVar1 = dVar4 == -2147483648.0 || dVar4 == 0.0;
}
if (!bVar1) {
return dVar4;
}
return (double)CONCAT44((int)((ulong)lVar3 >> 0x20),(int)dVar4);
}
|
|
4,057 | nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t, nlohmann::json_abi_v3_11_3::detail::value_t) | hkr04[P]cpp-mcp/common/json.hpp | inline bool operator<(const value_t lhs, const value_t rhs) noexcept
#endif
{
static constexpr std::array<std::uint8_t, 9> order = {{
0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */,
1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */,
6 /* binary */
}
};
const auto l_index = static_cast<std::size_t>(lhs);
const auto r_index = static_cast<std::size_t>(rhs);
#if JSON_HAS_THREE_WAY_COMPARISON
if (l_index < order.size() && r_index < order.size())
{
return order[l_index] <=> order[r_index]; // *NOPAD*
}
return std::partial_ordering::unordered;
#else
return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index];
#endif
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t, nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x38, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, 0x37(%rsp)
movb %al, 0x36(%rsp)
movzbl 0x37(%rsp), %eax
movq %rax, 0x28(%rsp)
movzbl 0x36(%rsp), %eax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xc8ea(%rip), %rdi # 0x516b1
callq 0x45810
movq 0x10(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x1f(%rsp)
jae 0x44e44
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xc8c1(%rip), %rdi # 0x516b1
callq 0x45810
movq 0x8(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x1f(%rsp)
jae 0x44e44
movq 0x28(%rsp), %rsi
leaq 0xc89d(%rip), %rdi # 0x516b1
callq 0x45820
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rsi
leaq 0xc885(%rip), %rdi # 0x516b1
callq 0x45820
movq %rax, %rcx
movl 0x4(%rsp), %eax
movzbl (%rcx), %ecx
cmpl %ecx, %eax
setl %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_:
sub rsp, 38h
mov al, sil
mov cl, dil
mov [rsp+38h+var_1], cl
mov [rsp+38h+var_2], al
movzx eax, [rsp+38h+var_1]
mov [rsp+38h+var_10], rax
movzx eax, [rsp+38h+var_2]
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_28], rax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_E5order; nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order
call _ZNKSt5arrayIhLm9EE4sizeEv; std::array<uchar,9ul>::size(void)
mov rcx, [rsp+38h+var_28]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rsp+38h+var_19], al
jnb short loc_44E44
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_E5order; nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order
call _ZNKSt5arrayIhLm9EE4sizeEv; std::array<uchar,9ul>::size(void)
mov rcx, [rsp+38h+var_30]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rsp+38h+var_19], al
jnb short loc_44E44
mov rsi, [rsp+38h+var_10]
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_E5order; nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order
call _ZNKSt5arrayIhLm9EEixEm; std::array<uchar,9ul>::operator[](ulong)
movzx eax, byte ptr [rax]
mov [rsp+38h+var_34], eax
mov rsi, [rsp+38h+var_18]
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_E5order; nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order
call _ZNKSt5arrayIhLm9EEixEm; std::array<uchar,9ul>::operator[](ulong)
mov rcx, rax
mov eax, [rsp+38h+var_34]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
setl al
mov [rsp+38h+var_19], al
loc_44E44:
mov al, [rsp+38h+var_19]
and al, 1
add rsp, 38h
retn
| bool nlohmann::json_abi_v3_11_3::detail::operator<(unsigned __int8 a1, unsigned __int8 a2)
{
int v3; // [rsp+4h] [rbp-34h]
bool v4; // [rsp+1Fh] [rbp-19h]
v4 = 0;
if ( a1 < (unsigned long long)std::array<unsigned char,9ul>::size(&nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order) )
{
v4 = 0;
if ( a2 < (unsigned long long)std::array<unsigned char,9ul>::size(&nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order) )
{
v3 = *(unsigned __int8 *)std::array<unsigned char,9ul>::operator[](
&nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order,
a1);
return v3 < *(unsigned __int8 *)std::array<unsigned char,9ul>::operator[](
&nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order,
a2);
}
}
return v4;
}
| operator<:
SUB RSP,0x38
MOV AL,SIL
MOV CL,DIL
MOV byte ptr [RSP + 0x37],CL
MOV byte ptr [RSP + 0x36],AL
MOVZX EAX,byte ptr [RSP + 0x37]
MOV qword ptr [RSP + 0x28],RAX
MOVZX EAX,byte ptr [RSP + 0x36]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[0x1516b1]
CALL 0x00145810
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RSP + 0x1f],AL
JNC 0x00144e44
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[0x1516b1]
CALL 0x00145810
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RSP + 0x1f],AL
JNC 0x00144e44
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[0x1516b1]
CALL 0x00145820
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[0x1516b1]
CALL 0x00145820
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x4]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
SETL AL
MOV byte ptr [RSP + 0x1f],AL
LAB_00144e44:
MOV AL,byte ptr [RSP + 0x1f]
AND AL,0x1
ADD RSP,0x38
RET
|
/* nlohmann::json_abi_v3_11_3::detail::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::detail::value_t,
nlohmann::json_abi_v3_11_3::detail::value_t) */
bool nlohmann::json_abi_v3_11_3::detail::operator<(byte param_1,byte param_2)
{
byte bVar1;
ulong uVar2;
byte *pbVar3;
bool local_19;
uVar2 = std::array<unsigned_char,9ul>::size();
local_19 = false;
if (param_1 < uVar2) {
uVar2 = std::array<unsigned_char,9ul>::size();
local_19 = false;
if (param_2 < uVar2) {
pbVar3 = (byte *)std::array<unsigned_char,9ul>::operator[]
((array<unsigned_char,9ul> *)
operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)
::order,(ulong)param_1);
bVar1 = *pbVar3;
pbVar3 = (byte *)std::array<unsigned_char,9ul>::operator[]
((array<unsigned_char,9ul> *)
operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)
::order,(ulong)param_2);
local_19 = bVar1 < *pbVar3;
}
}
return local_19;
}
|
|
4,058 | nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t, nlohmann::json_abi_v3_11_3::detail::value_t) | hkr04[P]cpp-mcp/common/json.hpp | inline bool operator<(const value_t lhs, const value_t rhs) noexcept
#endif
{
static constexpr std::array<std::uint8_t, 9> order = {{
0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */,
1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */,
6 /* binary */
}
};
const auto l_index = static_cast<std::size_t>(lhs);
const auto r_index = static_cast<std::size_t>(rhs);
#if JSON_HAS_THREE_WAY_COMPARISON
if (l_index < order.size() && r_index < order.size())
{
return order[l_index] <=> order[r_index]; // *NOPAD*
}
return std::partial_ordering::unordered;
#else
return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index];
#endif
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t, nlohmann::json_abi_v3_11_3::detail::value_t):
cmpb $0x9, %dil
setae %al
cmpb $0x9, %sil
setae %cl
orb %al, %cl
jne 0x18834
movzbl %sil, %eax
movzbl %dil, %ecx
leaq 0x55d3(%rip), %rdx # 0x1ddfd
movb (%rcx,%rdx), %cl
cmpb (%rax,%rdx), %cl
setb %al
retq
xorl %eax, %eax
retq
| _ZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_:
cmp dil, 9
setnb al
cmp sil, 9
setnb cl
or cl, al
jnz short loc_18834
movzx eax, sil
movzx ecx, dil
lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detailltENS1_7value_tES2_E5order; nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order
mov cl, [rcx+rdx]
cmp cl, [rax+rdx]
setb al
retn
loc_18834:
xor eax, eax
retn
| bool nlohmann::json_abi_v3_11_3::detail::operator<(unsigned __int8 a1, unsigned __int8 a2)
{
return a1 < 9u
&& a2 < 9u
&& nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order[a1] < nlohmann::json_abi_v3_11_3::detail::operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)::order[a2];
}
| operator<:
CMP DIL,0x9
SETNC AL
CMP SIL,0x9
SETNC CL
OR CL,AL
JNZ 0x00118834
MOVZX EAX,SIL
MOVZX ECX,DIL
LEA RDX,[0x11ddfd]
MOV CL,byte ptr [RCX + RDX*0x1]
CMP CL,byte ptr [RAX + RDX*0x1]
SETC AL
RET
LAB_00118834:
XOR EAX,EAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::detail::value_t,
nlohmann::json_abi_v3_11_3::detail::value_t) */
bool nlohmann::json_abi_v3_11_3::detail::operator<(byte param_1,byte param_2)
{
if (param_2 < 9 && param_1 < 9) {
return (byte)operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)
::order[param_1] <
(byte)operator<(nlohmann::json_abi_v3_11_3::detail::value_t,nlohmann::json_abi_v3_11_3::detail::value_t)
::order[param_2];
}
return false;
}
|
|
4,059 | minja::Context::get(minja::Value const&) | monkey531[P]llama/common/minja.hpp | virtual Value get(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->get(key);
return Value();
} | O3 | cpp | minja::Context::get(minja::Value const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xb75cc
testb %al, %al
je 0xc0c4c
movq %r12, %rdi
movq %r14, %rsi
callq 0xb73ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb1a06
jmp 0xc0c9f
movq 0x68(%r15), %rsi
testq %rsi, %rsi
je 0xc0c63
movq (%rsi), %rax
movq %rbx, %rdi
movq %r14, %rdx
callq *0x10(%rax)
jmp 0xc0c9f
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 0x89876
movq %r14, %rdi
movl $0x1, %esi
callq 0x89876
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN5minja7Context3getERKNS_5ValueE:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsi+18h]
mov rdi, r12; this
mov rsi, rdx; minja::Value *
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_C0C4C
mov rdi, r12; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short loc_C0C9F
loc_C0C4C:
mov rsi, [r15+68h]
test rsi, rsi
jz short loc_C0C63
mov rax, [rsi]
mov rdi, rbx
mov rdx, r14
call qword ptr [rax+10h]
jmp short loc_C0C9F
loc_C0C63:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_C0C9F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| minja::Context * minja::Context::get(
minja::Context *this,
const minja::Value *a2,
const minja::Value *a3,
__m128d a4)
{
const minja::Value *v5; // rax
long long v6; // rsi
if ( minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) )
{
v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3);
minja::Value::Value(this, v5);
}
else
{
v6 = *((_QWORD *)a2 + 13);
if ( v6 )
{
(*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3);
}
else
{
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
}
}
return this;
}
| get:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSI + 0x18]
MOV RDI,R12
MOV RSI,RDX
CALL 0x001b75cc
TEST AL,AL
JZ 0x001c0c4c
MOV RDI,R12
MOV RSI,R14
CALL 0x001b73ba
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001b1a06
JMP 0x001c0c9f
LAB_001c0c4c:
MOV RSI,qword ptr [R15 + 0x68]
TEST RSI,RSI
JZ 0x001c0c63
MOV RAX,qword ptr [RSI]
MOV RDI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x10]
JMP 0x001c0c9f
LAB_001c0c63:
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 0x00189876
MOV RDI,R14
MOV ESI,0x1
CALL 0x00189876
LAB_001c0c9f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Context::get(minja::Value const&) */
Value * minja::Context::get(Value *param_1)
{
char cVar1;
Value *pVVar2;
Value *in_RDX;
long in_RSI;
bool bVar3;
cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX);
if (cVar1 == '\0') {
if (*(long **)(in_RSI + 0x68) == (long *)0x0) {
bVar3 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (Value)0x0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
}
else {
(**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1);
}
}
else {
pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX);
Value::Value(param_1,pVVar2);
}
return param_1;
}
|
|
4,060 | PAIRING_Aggregate_PK_in_G1 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c | static BLST_ERROR PAIRING_Aggregate_PK_in_G1(PAIRING *ctx,
const POINTonE1_affine *PK,
size_t pk_groupcheck,
const POINTonE2_affine *sig,
size_t sig_groupcheck,
const byte *scalar, size_t nbits,
const void *msg, size_t msg_len,
const void *aug, size_t aug_len)
{
if (ctx->ctrl & AGGR_MIN_SIG)
return BLST_AGGR_TYPE_MISMATCH;
ctx->ctrl |= AGGR_MIN_PK;
/*
* Since we don't know if the signature is individual or aggregated,
* the only sensible thing to do is to skip over infinite one and
* count on the corresponding infinite public key to be rejected,
* in case the signature is non-aggregated that is.
*/
if (sig != NULL && !vec_is_zero(sig, sizeof(*sig))) {
POINTonE2 *S = &ctx->AggrSign.e2;
POINTonE2 P[1];
FROM_AFFINE(P, sig);
if (sig_groupcheck && !POINTonE2_in_G2(P))
return BLST_POINT_NOT_IN_GROUP;
if (ctx->ctrl & AGGR_SIGN_SET) {
if (nbits != 0 && scalar != NULL) {
POINTonE2_mult_w5(P, P, scalar, nbits);
POINTonE2_dadd(S, S, P, NULL);
} else {
POINTonE2_dadd_affine(S, S, sig);
}
} else {
ctx->ctrl |= AGGR_SIGN_SET;
if (nbits != 0 && scalar != NULL)
POINTonE2_mult_w5(S, P, scalar, nbits);
else
vec_copy(S, P, sizeof(P));
}
}
if (PK != NULL) {
unsigned int n;
POINTonE2 H[1];
POINTonE1 pk[1];
const void *DST = pairing_get_dst(ctx);
/*
* Reject infinite public keys.
*/
if (vec_is_zero(PK, sizeof(*PK)))
return BLST_PK_IS_INFINITY;
if (pk_groupcheck) {
POINTonE1 P[1];
FROM_AFFINE(P, PK);
if (!POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
}
if (ctx->ctrl & AGGR_HASH_OR_ENCODE)
Hash_to_G2(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
else
Encode_to_G2(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
POINTonE2_from_Jacobian(H, H);
if (nbits != 0 && scalar != NULL) {
FROM_AFFINE(pk, PK);
POINTonE1_mult_w5(pk, pk, scalar, nbits);
POINTonE1_from_Jacobian(pk, pk);
PK = (const POINTonE1_affine *)pk;
}
n = ctx->nelems;
vec_copy(ctx->Q + n, H, sizeof(POINTonE2_affine));
vec_copy(ctx->P + n, PK, sizeof(POINTonE1_affine));
if (++n == N_MAX) {
if (ctx->ctrl & AGGR_GT_SET) {
vec384fp12 GT;
miller_loop_n(GT, ctx->Q, ctx->P, n);
mul_fp12(ctx->GT, ctx->GT, GT);
} else {
miller_loop_n(ctx->GT, ctx->Q, ctx->P, n);
ctx->ctrl |= AGGR_GT_SET;
}
n = 0;
}
ctx->nelems = n;
}
return BLST_SUCCESS;
} | O0 | c | PAIRING_Aggregate_PK_in_G1:
pushq %rbp
movq %rsp, %rbp
subq $0x640, %rsp # imm = 0x640
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
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 -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xafa21
movl $0x4, -0x4(%rbp)
jmp 0xafeb5
movq -0x10(%rbp), %rax
movl (%rax), %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0xafb96
movq -0x28(%rbp), %rdi
movl $0xc0, %esi
callq 0xa7680
cmpq $0x0, %rax
jne 0xafb96
movq -0x10(%rbp), %rax
addq $0x258, %rax # imm = 0x258
movq %rax, -0x40(%rbp)
leaq -0x160(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0xc0, %edx
callq 0xa7480
leaq -0x160(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x610(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x608(%rbp)
movq -0x28(%rbp), %rdi
movl $0xc0, %esi
callq 0xa7680
movq -0x610(%rbp), %rdi
movq -0x608(%rbp), %rsi
movq %rax, %r8
leaq 0x365e1(%rip), %rdx # 0xe6098
movl $0x60, %ecx
callq 0xa74f0
cmpq $0x0, -0x30(%rbp)
je 0xafae6
leaq -0x160(%rbp), %rdi
callq 0xad1c0
cmpq $0x0, %rax
jne 0xafae6
movl $0x3, -0x4(%rbp)
jmp 0xafeb5
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xafb4a
cmpq $0x0, 0x10(%rbp)
je 0xafb37
cmpq $0x0, -0x38(%rbp)
je 0xafb37
leaq -0x160(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq 0xacb80
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x160(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0xab220
jmp 0xafb48
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xabaf0
jmp 0xafb94
movq -0x10(%rbp), %rax
movl (%rax), %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0xafb7d
cmpq $0x0, -0x38(%rbp)
je 0xafb7d
movq -0x40(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq 0xacb80
jmp 0xafb92
movq -0x40(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0x120, %edx # imm = 0x120
callq 0xa7480
jmp 0xafb94
jmp 0xafb96
cmpq $0x0, -0x18(%rbp)
je 0xafeae
movq -0x10(%rbp), %rdi
callq 0xaf280
movq %rax, -0x328(%rbp)
movq -0x18(%rbp), %rdi
movl $0x60, %esi
callq 0xa7680
cmpq $0x0, %rax
je 0xafbd1
movl $0x6, -0x4(%rbp)
jmp 0xafeb5
cmpq $0x0, -0x20(%rbp)
je 0xafc60
jmp 0xafbde
leaq -0x3c0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x60, %edx
callq 0xa7480
leaq -0x3c0(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x620(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x618(%rbp)
movq -0x18(%rbp), %rdi
movl $0x60, %esi
callq 0xa7680
movq -0x620(%rbp), %rdi
movq -0x618(%rbp), %rsi
movq %rax, %r8
leaq 0x36462(%rip), %rdx # 0xe6098
movl $0x30, %ecx
callq 0xa74f0
leaq -0x3c0(%rbp), %rdi
callq 0xaa240
cmpq $0x0, %rax
jne 0xafc5e
movl $0x3, -0x4(%rbp)
jmp 0xafeb5
jmp 0xafc60
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xafc9f
leaq -0x290(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq -0x328(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %r8
movq 0x28(%rbp), %r9
movq 0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0xad120
jmp 0xafcce
leaq -0x290(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq -0x328(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %r8
movq 0x28(%rbp), %r9
movq 0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0xad050
leaq -0x290(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0xaa3f0
cmpq $0x0, 0x10(%rbp)
je 0xafd94
cmpq $0x0, -0x38(%rbp)
je 0xafd94
jmp 0xafcf9
leaq -0x320(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x60, %edx
callq 0xa7480
leaq -0x320(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x630(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x628(%rbp)
movq -0x18(%rbp), %rdi
movl $0x60, %esi
callq 0xa7680
movq -0x630(%rbp), %rdi
movq -0x628(%rbp), %rsi
movq %rax, %r8
leaq 0x36347(%rip), %rdx # 0xe6098
movl $0x30, %ecx
callq 0xa74f0
leaq -0x320(%rbp), %rdi
leaq -0x320(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq 0xa9b30
leaq -0x320(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0xa72b0
leaq -0x320(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x164(%rbp)
movq -0x10(%rbp), %rdi
addq $0x378, %rdi # imm = 0x378
movl -0x164(%rbp), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdi
leaq -0x290(%rbp), %rsi
movl $0xc0, %edx
callq 0xa7480
movq -0x10(%rbp), %rdi
addq $0x978, %rdi # imm = 0x978
movl -0x164(%rbp), %eax
imulq $0x60, %rax, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movl $0x60, %edx
callq 0xa7480
movl -0x164(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x164(%rbp)
cmpl $0x8, %eax
jne 0xafea1
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xafe61
leaq -0x600(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x378, %rsi # imm = 0x378
movq -0x10(%rbp), %rdx
addq $0x978, %rdx # imm = 0x978
movl -0x164(%rbp), %eax
movl %eax, %ecx
callq 0xae160
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
leaq -0x600(%rbp), %rdx
callq 0xad840
jmp 0xafe97
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
addq $0x378, %rsi # imm = 0x378
movq -0x10(%rbp), %rdx
addq $0x978, %rdx # imm = 0x978
movl -0x164(%rbp), %eax
movl %eax, %ecx
callq 0xae160
movq -0x10(%rbp), %rax
movl (%rax), %ecx
orl $0x20, %ecx
movl %ecx, (%rax)
movl $0x0, -0x164(%rbp)
movl -0x164(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x640, %rsp # imm = 0x640
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| PAIRING_Aggregate_PK_in_G1:
push rbp
mov rbp, rsp
sub rsp, 640h
mov rax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_AFA21
mov [rbp+var_4], 4
jmp loc_AFEB5
loc_AFA21:
mov rax, [rbp+var_10]
mov ecx, [rax]
or ecx, 2
mov [rax], ecx
cmp [rbp+var_28], 0
jz loc_AFB96
mov rdi, [rbp+var_28]
mov esi, 0C0h
call vec_is_zero
cmp rax, 0
jnz loc_AFB96
mov rax, [rbp+var_10]
add rax, 258h
mov [rbp+var_40], rax
lea rdi, [rbp+var_160]
mov rsi, [rbp+var_28]
mov edx, 0C0h
call vec_copy
lea rax, [rbp+var_160]
add rax, 0C0h
mov [rbp+var_610], rax
mov rax, [rbp+var_28]
mov [rbp+var_608], rax
mov rdi, [rbp+var_28]
mov esi, 0C0h
call vec_is_zero
mov rdi, [rbp+var_610]
mov rsi, [rbp+var_608]
mov r8, rax
lea rdx, BLS12_381_Rx
mov ecx, 60h ; '`'
call vec_select
cmp [rbp+var_30], 0
jz short loc_AFAE6
lea rdi, [rbp+var_160]
call POINTonE2_in_G2
cmp rax, 0
jnz short loc_AFAE6
mov [rbp+var_4], 3
jmp loc_AFEB5
loc_AFAE6:
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 10h
cmp eax, 0
jz short loc_AFB4A
cmp [rbp+arg_0], 0
jz short loc_AFB37
cmp [rbp+var_38], 0
jz short loc_AFB37
lea rdi, [rbp+var_160]
lea rsi, [rbp+var_160]
mov rdx, [rbp+var_38]
mov rcx, [rbp+arg_0]
call POINTonE2_mult_w5
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_40]
lea rdx, [rbp+var_160]
xor eax, eax
mov ecx, eax
call POINTonE2_dadd
jmp short loc_AFB48
loc_AFB37:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_28]
call POINTonE2_dadd_affine
loc_AFB48:
jmp short loc_AFB94
loc_AFB4A:
mov rax, [rbp+var_10]
mov ecx, [rax]
or ecx, 10h
mov [rax], ecx
cmp [rbp+arg_0], 0
jz short loc_AFB7D
cmp [rbp+var_38], 0
jz short loc_AFB7D
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_160]
mov rdx, [rbp+var_38]
mov rcx, [rbp+arg_0]
call POINTonE2_mult_w5
jmp short loc_AFB92
loc_AFB7D:
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_160]
mov edx, 120h
call vec_copy
loc_AFB92:
jmp short $+2
loc_AFB94:
jmp short $+2
loc_AFB96:
cmp [rbp+var_18], 0
jz loc_AFEAE
mov rdi, [rbp+var_10]
call pairing_get_dst
mov [rbp+var_328], rax
mov rdi, [rbp+var_18]
mov esi, 60h ; '`'
call vec_is_zero
cmp rax, 0
jz short loc_AFBD1
mov [rbp+var_4], 6
jmp loc_AFEB5
loc_AFBD1:
cmp [rbp+var_20], 0
jz loc_AFC60
jmp short $+2
loc_AFBDE:
lea rdi, [rbp+var_3C0]
mov rsi, [rbp+var_18]
mov edx, 60h ; '`'
call vec_copy
lea rax, [rbp+var_3C0]
add rax, 60h ; '`'
mov [rbp+var_620], rax
mov rax, [rbp+var_18]
mov [rbp+var_618], rax
mov rdi, [rbp+var_18]
mov esi, 60h ; '`'
call vec_is_zero
mov rdi, [rbp+var_620]
mov rsi, [rbp+var_618]
mov r8, rax
lea rdx, BLS12_381_Rx
mov ecx, 30h ; '0'
call vec_select
lea rdi, [rbp+var_3C0]
call POINTonE1_in_G1
cmp rax, 0
jnz short loc_AFC5E
mov [rbp+var_4], 3
jmp loc_AFEB5
loc_AFC5E:
jmp short $+2
loc_AFC60:
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 40h
cmp eax, 0
jz short loc_AFC9F
lea rdi, [rbp+var_290]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+arg_10]
mov rcx, [rbp+var_328]
mov rax, [rbp+var_10]
mov r8, [rax+10h]
mov r9, [rbp+arg_18]
mov rax, [rbp+arg_20]
mov [rsp+640h+var_640], rax
call Hash_to_G2
jmp short loc_AFCCE
loc_AFC9F:
lea rdi, [rbp+var_290]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+arg_10]
mov rcx, [rbp+var_328]
mov rax, [rbp+var_10]
mov r8, [rax+10h]
mov r9, [rbp+arg_18]
mov rax, [rbp+arg_20]
mov [rsp+640h+var_640], rax
call Encode_to_G2
loc_AFCCE:
lea rdi, [rbp+var_290]
lea rsi, [rbp+var_290]
call POINTonE2_from_Jacobian
cmp [rbp+arg_0], 0
jz loc_AFD94
cmp [rbp+var_38], 0
jz loc_AFD94
jmp short $+2
loc_AFCF9:
lea rdi, [rbp+var_320]
mov rsi, [rbp+var_18]
mov edx, 60h ; '`'
call vec_copy
lea rax, [rbp+var_320]
add rax, 60h ; '`'
mov [rbp+var_630], rax
mov rax, [rbp+var_18]
mov [rbp+var_628], rax
mov rdi, [rbp+var_18]
mov esi, 60h ; '`'
call vec_is_zero
mov rdi, [rbp+var_630]
mov rsi, [rbp+var_628]
mov r8, rax
lea rdx, BLS12_381_Rx
mov ecx, 30h ; '0'
call vec_select
lea rdi, [rbp+var_320]
lea rsi, [rbp+var_320]
mov rdx, [rbp+var_38]
mov rcx, [rbp+arg_0]
call POINTonE1_mult_w5
lea rdi, [rbp+var_320]
lea rsi, [rbp+var_320]
call POINTonE1_from_Jacobian
lea rax, [rbp+var_320]
mov [rbp+var_18], rax
loc_AFD94:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov [rbp+var_164], eax
mov rdi, [rbp+var_10]
add rdi, 378h
mov eax, [rbp+var_164]
imul rax, 0C0h
add rdi, rax
lea rsi, [rbp+var_290]
mov edx, 0C0h
call vec_copy
mov rdi, [rbp+var_10]
add rdi, 978h
mov eax, [rbp+var_164]
imul rax, 60h ; '`'
add rdi, rax
mov rsi, [rbp+var_18]
mov edx, 60h ; '`'
call vec_copy
mov eax, [rbp+var_164]
add eax, 1
mov [rbp+var_164], eax
cmp eax, 8
jnz loc_AFEA1
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 20h
cmp eax, 0
jz short loc_AFE61
lea rdi, [rbp+var_600]
mov rsi, [rbp+var_10]
add rsi, 378h
mov rdx, [rbp+var_10]
add rdx, 978h
mov eax, [rbp+var_164]
mov ecx, eax
call miller_loop_n
mov rdi, [rbp+var_10]
add rdi, 18h
mov rsi, [rbp+var_10]
add rsi, 18h
lea rdx, [rbp+var_600]
call mul_fp12
jmp short loc_AFE97
loc_AFE61:
mov rdi, [rbp+var_10]
add rdi, 18h
mov rsi, [rbp+var_10]
add rsi, 378h
mov rdx, [rbp+var_10]
add rdx, 978h
mov eax, [rbp+var_164]
mov ecx, eax
call miller_loop_n
mov rax, [rbp+var_10]
mov ecx, [rax]
or ecx, 20h
mov [rax], ecx
loc_AFE97:
mov [rbp+var_164], 0
loc_AFEA1:
mov ecx, [rbp+var_164]
mov rax, [rbp+var_10]
mov [rax+4], ecx
loc_AFEAE:
mov [rbp+var_4], 0
loc_AFEB5:
mov eax, [rbp+var_4]
add rsp, 640h
pop rbp
retn
| long long PAIRING_Aggregate_PK_in_G1(
_DWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
unsigned __int8 *a6,
unsigned long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
unsigned long long is_zero; // rax
unsigned long long v12; // rax
unsigned long long v13; // rax
long long v15; // [rsp+18h] [rbp-628h]
long long v16; // [rsp+28h] [rbp-618h]
long long v17; // [rsp+38h] [rbp-608h]
_BYTE v18[576]; // [rsp+40h] [rbp-600h] BYREF
_BYTE v19[96]; // [rsp+280h] [rbp-3C0h] BYREF
long long v20; // [rsp+2E0h] [rbp-360h] BYREF
long long dst; // [rsp+318h] [rbp-328h]
_BYTE v22[96]; // [rsp+320h] [rbp-320h] BYREF
long long v23; // [rsp+380h] [rbp-2C0h] BYREF
_BYTE v24[300]; // [rsp+3B0h] [rbp-290h] BYREF
unsigned int v25; // [rsp+4DCh] [rbp-164h]
_BYTE v26[192]; // [rsp+4E0h] [rbp-160h] BYREF
long long v27; // [rsp+5A0h] [rbp-A0h] BYREF
_DWORD *v28; // [rsp+600h] [rbp-40h]
unsigned __int8 *v29; // [rsp+608h] [rbp-38h]
long long v30; // [rsp+610h] [rbp-30h]
long long v31; // [rsp+618h] [rbp-28h]
long long v32; // [rsp+620h] [rbp-20h]
_BYTE *v33; // [rsp+628h] [rbp-18h]
_DWORD *v34; // [rsp+630h] [rbp-10h]
v34 = a1;
v33 = (_BYTE *)a2;
v32 = a3;
v31 = a4;
v30 = a5;
v29 = a6;
if ( (*a1 & 1) == 0 )
{
*v34 |= 2u;
if ( v31 && !vec_is_zero(v31, 0xC0uLL) )
{
v28 = v34 + 150;
vec_copy((long long)v26, v31, 0xC0uLL);
v17 = v31;
is_zero = vec_is_zero(v31, 0xC0uLL);
vec_select((long long)&v27, v17, (long long)&BLS12_381_Rx, 0x60uLL, is_zero);
if ( v30 && !POINTonE2_in_G2((long long)v26) )
return 3;
if ( (*v34 & 0x10) != 0 )
{
if ( a7 && v29 )
{
POINTonE2_mult_w5((long long)v26, (long long)v26, v29, a7);
POINTonE2_dadd((long long)v28, (long long)v28, (long long)v26, 0LL);
}
else
{
POINTonE2_dadd_affine((long long)v28, (long long)v28, v31);
}
}
else
{
*v34 |= 0x10u;
if ( a7 && v29 )
POINTonE2_mult_w5((long long)v28, (long long)v26, v29, a7);
else
vec_copy((long long)v28, (long long)v26, 0x120uLL);
}
}
if ( v33 )
{
dst = pairing_get_dst((long long)v34);
if ( vec_is_zero((long long)v33, 0x60uLL) )
return 6;
if ( v32 )
{
vec_copy((long long)v19, (long long)v33, 0x60uLL);
v16 = (long long)v33;
v12 = vec_is_zero((long long)v33, 0x60uLL);
vec_select((long long)&v20, v16, (long long)&BLS12_381_Rx, 0x30uLL, v12);
if ( !POINTonE1_in_G1((long long)v19) )
return 3;
}
if ( (*v34 & 0x40) != 0 )
Hash_to_G2((long long)v24, a8, a9, dst, *((_QWORD *)v34 + 2), a10, a11);
else
Encode_to_G2((long long)v24, a8, a9, dst, *((_QWORD *)v34 + 2), a10, a11);
POINTonE2_from_Jacobian((long long)v24, (long long)v24);
if ( a7 && v29 )
{
vec_copy((long long)v22, (long long)v33, 0x60uLL);
v15 = (long long)v33;
v13 = vec_is_zero((long long)v33, 0x60uLL);
vec_select((long long)&v23, v15, (long long)&BLS12_381_Rx, 0x30uLL, v13);
POINTonE1_mult_w5((long long)v22, (long long)v22, v29, a7);
POINTonE1_from_Jacobian((long long)v22, (long long)v22);
v33 = v22;
}
v25 = v34[1];
vec_copy((long long)&v34[48 * v25 + 222], (long long)v24, 0xC0uLL);
vec_copy((long long)&v34[24 * v25++ + 606], (long long)v33, 0x60uLL);
if ( v25 == 8 )
{
if ( (*v34 & 0x20) != 0 )
{
miller_loop_n((long long)v18, (long long)(v34 + 222), (long long)(v34 + 606), v25);
mul_fp12((long long)(v34 + 6), (long long)(v34 + 6), (long long)v18);
}
else
{
miller_loop_n((long long)(v34 + 6), (long long)(v34 + 222), (long long)(v34 + 606), v25);
*v34 |= 0x20u;
}
v25 = 0;
}
v34[1] = v25;
}
return 0;
}
return 4;
}
| PAIRING_Aggregate_PK_in_G1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x640
MOV RAX,qword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001afa21
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001afeb5
LAB_001afa21:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
OR ECX,0x2
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001afb96
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,0xc0
CALL 0x001a7680
CMP RAX,0x0
JNZ 0x001afb96
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x258
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x160]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0xc0
CALL 0x001a7480
LEA RAX,[RBP + -0x160]
ADD RAX,0xc0
MOV qword ptr [RBP + -0x610],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x608],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,0xc0
CALL 0x001a7680
MOV RDI,qword ptr [RBP + -0x610]
MOV RSI,qword ptr [RBP + -0x608]
MOV R8,RAX
LEA RDX,[0x1e6098]
MOV ECX,0x60
CALL 0x001a74f0
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001afae6
LEA RDI,[RBP + -0x160]
CALL 0x001ad1c0
CMP RAX,0x0
JNZ 0x001afae6
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001afeb5
LAB_001afae6:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001afb4a
CMP qword ptr [RBP + 0x10],0x0
JZ 0x001afb37
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001afb37
LEA RDI,[RBP + -0x160]
LEA RSI,[RBP + -0x160]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001acb80
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x40]
LEA RDX,[RBP + -0x160]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001ab220
JMP 0x001afb48
LAB_001afb37:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001abaf0
LAB_001afb48:
JMP 0x001afb94
LAB_001afb4a:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
OR ECX,0x10
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + 0x10],0x0
JZ 0x001afb7d
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001afb7d
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x160]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001acb80
JMP 0x001afb92
LAB_001afb7d:
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x160]
MOV EDX,0x120
CALL 0x001a7480
LAB_001afb92:
JMP 0x001afb94
LAB_001afb94:
JMP 0x001afb96
LAB_001afb96:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001afeae
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001af280
MOV qword ptr [RBP + -0x328],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x60
CALL 0x001a7680
CMP RAX,0x0
JZ 0x001afbd1
MOV dword ptr [RBP + -0x4],0x6
JMP 0x001afeb5
LAB_001afbd1:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001afc60
JMP 0x001afbde
LAB_001afbde:
LEA RDI,[RBP + -0x3c0]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x60
CALL 0x001a7480
LEA RAX,[RBP + -0x3c0]
ADD RAX,0x60
MOV qword ptr [RBP + -0x620],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x618],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x60
CALL 0x001a7680
MOV RDI,qword ptr [RBP + -0x620]
MOV RSI,qword ptr [RBP + -0x618]
MOV R8,RAX
LEA RDX,[0x1e6098]
MOV ECX,0x30
CALL 0x001a74f0
LEA RDI,[RBP + -0x3c0]
CALL 0x001aa240
CMP RAX,0x0
JNZ 0x001afc5e
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001afeb5
LAB_001afc5e:
JMP 0x001afc60
LAB_001afc60:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001afc9f
LEA RDI,[RBP + -0x290]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + -0x328]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x10]
MOV R9,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RSP],RAX
CALL 0x001ad120
JMP 0x001afcce
LAB_001afc9f:
LEA RDI,[RBP + -0x290]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + -0x328]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x10]
MOV R9,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RSP],RAX
CALL 0x001ad050
LAB_001afcce:
LEA RDI,[RBP + -0x290]
LEA RSI,[RBP + -0x290]
CALL 0x001aa3f0
CMP qword ptr [RBP + 0x10],0x0
JZ 0x001afd94
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001afd94
JMP 0x001afcf9
LAB_001afcf9:
LEA RDI,[RBP + -0x320]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x60
CALL 0x001a7480
LEA RAX,[RBP + -0x320]
ADD RAX,0x60
MOV qword ptr [RBP + -0x630],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x628],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x60
CALL 0x001a7680
MOV RDI,qword ptr [RBP + -0x630]
MOV RSI,qword ptr [RBP + -0x628]
MOV R8,RAX
LEA RDX,[0x1e6098]
MOV ECX,0x30
CALL 0x001a74f0
LEA RDI,[RBP + -0x320]
LEA RSI,[RBP + -0x320]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001a9b30
LEA RDI,[RBP + -0x320]
LEA RSI,[RBP + -0x320]
CALL 0x001a72b0
LEA RAX,[RBP + -0x320]
MOV qword ptr [RBP + -0x18],RAX
LAB_001afd94:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x164],EAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x378
MOV EAX,dword ptr [RBP + -0x164]
IMUL RAX,RAX,0xc0
ADD RDI,RAX
LEA RSI,[RBP + -0x290]
MOV EDX,0xc0
CALL 0x001a7480
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x978
MOV EAX,dword ptr [RBP + -0x164]
IMUL RAX,RAX,0x60
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x60
CALL 0x001a7480
MOV EAX,dword ptr [RBP + -0x164]
ADD EAX,0x1
MOV dword ptr [RBP + -0x164],EAX
CMP EAX,0x8
JNZ 0x001afea1
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001afe61
LEA RDI,[RBP + -0x600]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x378
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x978
MOV EAX,dword ptr [RBP + -0x164]
MOV ECX,EAX
CALL 0x001ae160
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x18
LEA RDX,[RBP + -0x600]
CALL 0x001ad840
JMP 0x001afe97
LAB_001afe61:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x378
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x978
MOV EAX,dword ptr [RBP + -0x164]
MOV ECX,EAX
CALL 0x001ae160
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
OR ECX,0x20
MOV dword ptr [RAX],ECX
LAB_001afe97:
MOV dword ptr [RBP + -0x164],0x0
LAB_001afea1:
MOV ECX,dword ptr [RBP + -0x164]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],ECX
LAB_001afeae:
MOV dword ptr [RBP + -0x4],0x0
LAB_001afeb5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x640
POP RBP
RET
|
int4
PAIRING_Aggregate_PK_in_G1
(uint *param_1,int1 *param_2,long param_3,long param_4,long param_5,long param_6,
long param_7,int8 param_8,int8 param_9,int8 param_10,int8 param_11
)
{
int1 *puVar1;
long lVar2;
int8 uVar3;
int1 local_608 [576];
int1 local_3c8 [96];
int1 auStack_368 [56];
int8 local_330;
int1 local_328 [96];
int1 auStack_2c8 [48];
int1 local_298 [300];
uint local_16c;
int1 local_168 [192];
int1 auStack_a8 [96];
uint *local_48;
long local_40;
long local_38;
long local_30;
long local_28;
int1 *local_20;
uint *local_18;
int4 local_c;
if ((*param_1 & 1) == 0) {
*param_1 = *param_1 | 2;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((param_4 != 0) && (lVar2 = vec_is_zero(param_4,0xc0), lVar2 == 0)) {
local_48 = local_18 + 0x96;
vec_copy(local_168,local_30,0xc0);
lVar2 = local_30;
uVar3 = vec_is_zero(local_30,0xc0);
vec_select(auStack_a8,lVar2,BLS12_381_Rx,0x60,uVar3);
if ((local_38 != 0) && (lVar2 = POINTonE2_in_G2(local_168), lVar2 == 0)) {
return 3;
}
if ((*local_18 & 0x10) == 0) {
*local_18 = *local_18 | 0x10;
if ((param_7 == 0) || (local_40 == 0)) {
vec_copy(local_48,local_168,0x120);
}
else {
POINTonE2_mult_w5(local_48,local_168,local_40,param_7);
}
}
else if ((param_7 == 0) || (local_40 == 0)) {
POINTonE2_dadd_affine(local_48,local_48,local_30);
}
else {
POINTonE2_mult_w5(local_168,local_168,local_40,param_7);
POINTonE2_dadd(local_48,local_48,local_168,0);
}
}
if (local_20 != (int1 *)0x0) {
local_330 = pairing_get_dst(local_18);
lVar2 = vec_is_zero(local_20,0x60);
if (lVar2 != 0) {
return 6;
}
if (local_28 != 0) {
vec_copy(local_3c8,local_20,0x60);
puVar1 = local_20;
uVar3 = vec_is_zero(local_20,0x60);
vec_select(auStack_368,puVar1,BLS12_381_Rx,0x30,uVar3);
lVar2 = POINTonE1_in_G1(local_3c8);
if (lVar2 == 0) {
return 3;
}
}
if ((*local_18 & 0x40) == 0) {
Encode_to_G2(local_298,param_8,param_9,local_330,*(int8 *)(local_18 + 4),param_10,
param_11);
}
else {
Hash_to_G2(local_298,param_8,param_9,local_330,*(int8 *)(local_18 + 4),param_10,
param_11);
}
POINTonE2_from_Jacobian(local_298,local_298);
if ((param_7 != 0) && (local_40 != 0)) {
vec_copy(local_328,local_20,0x60);
puVar1 = local_20;
uVar3 = vec_is_zero(local_20,0x60);
vec_select(auStack_2c8,puVar1,BLS12_381_Rx,0x30,uVar3);
POINTonE1_mult_w5(local_328,local_328,local_40,param_7);
POINTonE1_from_Jacobian(local_328,local_328);
local_20 = local_328;
}
local_16c = local_18[1];
vec_copy(local_18 + (ulong)local_16c * 0x30 + 0xde,local_298,0xc0);
vec_copy(local_18 + (ulong)local_16c * 0x18 + 0x25e,local_20,0x60);
local_16c = local_16c + 1;
if (local_16c == 8) {
if ((*local_18 & 0x20) == 0) {
miller_loop_n(local_18 + 6,local_18 + 0xde,local_18 + 0x25e,8);
*local_18 = *local_18 | 0x20;
}
else {
miller_loop_n(local_608,local_18 + 0xde,local_18 + 0x25e,8);
mul_fp12(local_18 + 6,local_18 + 6,local_608);
}
local_16c = 0;
}
local_18[1] = local_16c;
}
local_c = 0;
}
else {
local_c = 4;
}
return local_c;
}
|
|
4,061 | js_alloc_string | bluesky950520[P]quickjs/quickjs.c | static JSString *js_alloc_string(JSContext *ctx, int max_len, int is_wide_char)
{
JSString *p;
p = js_alloc_string_rt(ctx->rt, max_len, is_wide_char);
if (unlikely(!p)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return p;
} | O2 | c | js_alloc_string:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x34a65
movq %rax, %r14
testq %rax, %rax
je 0x1ad68
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x171e0
jmp 0x1ad5d
| js_alloc_string:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
call js_alloc_string_rt
mov r14, rax
test rax, rax
jz short loc_1AD68
loc_1AD5D:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_1AD68:
mov rdi, rbx
call JS_ThrowOutOfMemory
jmp short loc_1AD5D
| long long js_alloc_string(long long a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // r14
v7 = js_alloc_string_rt(*(_QWORD *)(a1 + 24), a2, a3);
if ( !v7 )
JS_ThrowOutOfMemory(a1, a2, v3, v4, v5, v6);
return v7;
}
| js_alloc_string:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x00134a65
MOV R14,RAX
TEST RAX,RAX
JZ 0x0011ad68
LAB_0011ad5d:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011ad68:
MOV RDI,RBX
CALL 0x001171e0
JMP 0x0011ad5d
|
long js_alloc_string(long param_1)
{
long lVar1;
lVar1 = js_alloc_string_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
}
return lVar1;
}
|
|
4,062 | minja::Parser::unterminated(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O1 | cpp | minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x9b7c4
leaq 0x58f95(%rip), %rcx # 0xf3c71
movl $0xd, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b9e0
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9ad16
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9ad1e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x78bd8
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x9ad69
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ad88
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x9ad83
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ad99
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1b270
jmp 0x9ada7
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b9e0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9adcb
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9add1
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be20
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ae16
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ae31
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9ae48
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ae63
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ae98
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x9ae98
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9aeb8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x9aeb8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9aed4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x9aed4
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9aeef
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bf90
nop
| _ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnterminated; "Unterminated "
mov r8d, 0Dh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_9AD16
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_9AD1E
loc_9AD16:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_9AD1E:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r12
jz short loc_9AD69
mov rsi, [rsp+0A8h+var_70]
loc_9AD69:
cmp rax, rsi
jbe short loc_9AD88
lea rdi, [rsp+0A8h+var_50]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_9AD83
mov rsi, [rsp+0A8h+var_50]
loc_9AD83:
cmp rax, rsi
jbe short loc_9AD99
loc_9AD88:
mov rsi, qword ptr [rsp+0A8h+var_60]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_9ADA7
loc_9AD99:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_9ADA7:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_9ADCB
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_9ADD1
loc_9ADCB:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_9ADD1:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AE16
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE16:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AE31
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE31:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_9AE48
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE48:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AE63
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AE63:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AE98
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AE98
mov rbx, rax
loc_9AE98:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AEB8
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AEB8
mov rbx, rax
loc_9AEB8:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_9AED4
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AED4
mov rbx, rax
loc_9AED4:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AEEF
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AEEF:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
unsigned long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rsi
void **v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v13; // [rsp+18h] [rbp-90h] BYREF
void *v14; // [rsp+28h] [rbp-80h] BYREF
int v15[2]; // [rsp+30h] [rbp-78h]
__int128 v16; // [rsp+38h] [rbp-70h] BYREF
int v17[2]; // [rsp+48h] [rbp-60h] BYREF
long long v18; // [rsp+50h] [rbp-58h]
_QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF
void *v20[2]; // [rsp+68h] [rbp-40h] BYREF
long long v21; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8));
v4 = std::string::replace(v20, 0LL, 0LL, "Unterminated ", 13LL);
v14 = &v16;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v16 = *v5;
}
else
{
v14 = *(void **)v4;
*(_QWORD *)&v16 = *(_QWORD *)v5;
}
*(_QWORD *)v15 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
minja::error_location_suffix((long long)v17, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
v6 = v18 + *(_QWORD *)v15;
v7 = 15LL;
if ( v14 != &v16 )
v7 = v16;
if ( v6 <= v7 )
goto LABEL_10;
v8 = 15LL;
if ( *(_QWORD **)v17 != v19 )
v8 = v19[0];
if ( v6 <= v8 )
v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15);
else
LABEL_10:
v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17, v18);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 2);
if ( *v9 == v9 + 2 )
{
v13 = *v10;
}
else
{
v12[0] = *v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = v9[1];
*v9 = v10;
v9[1] = 0LL;
*(_BYTE *)v10 = 0;
std::runtime_error::runtime_error(this, v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( *(_QWORD **)v17 != v19 )
operator delete(*(void **)v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
return this;
}
| unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0019b7c4
LAB_0019acd5:
LEA RCX,[0x1f3c71]
MOV R8D,0xd
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011b9e0
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0019ad16
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0019ad1e
LAB_0019ad16:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0019ad1e:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0019ad3d:
LEA RDI,[RSP + 0x48]
CALL 0x00178bd8
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R12
JZ 0x0019ad69
MOV RSI,qword ptr [RSP + 0x38]
LAB_0019ad69:
CMP RAX,RSI
JBE 0x0019ad88
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0019ad83
MOV RSI,qword ptr [RSP + 0x58]
LAB_0019ad83:
CMP RAX,RSI
JBE 0x0019ad99
LAB_0019ad88:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0019ad8d:
LEA RDI,[RSP + 0x28]
CALL 0x0011b270
JMP 0x0019ada7
LAB_0019ad99:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011b9e0
LAB_0019ada7:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0019adcb
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0019add1
LAB_0019adcb:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0019add1:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0019adee:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011be20
LAB_0019adfb:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019ae16
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0019ae16:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019ae31
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8e0
LAB_0019ae31:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0019ae48
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8e0
LAB_0019ae48:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019ae63
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8e0
LAB_0019ae63:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 0019acd5 to 0019aced has its CatchHandler @ 0019aed1 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f3c71);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0019ad3d to 0019ad46 has its CatchHandler @ 0019aeb5 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_0019ada7;
}
}
/* try { // try from 0019ad8d to 0019ada6 has its CatchHandler @ 0019ae95 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_0019ada7:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0019adee to 0019adfa has its CatchHandler @ 0019ae75 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
|
|
4,063 | ma_get_host_list | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_get_host_list(char *host_list, struct st_host *host_info, int default_port)
{
char *token, *start, *save;
int host_nr= 0;
start= host_list;
while ((token= strtok_r(start, ",", &save)))
{
char *p;
/* ipv6 hostname */
if ((p= strchr(token, ']')))
{
host_info[host_nr].host= token + 1;
*p++= 0;
token= p;
}
else
host_info[host_nr].host= token;
/* check if port was specified */
if ((p= strchr(token, ':')))
{
*p++= 0;
host_info[host_nr].port= atoi(p);
}
else
host_info[host_nr].port= default_port;
host_nr++;
start= NULL;
}
return;
} | O0 | c | ma_get_host_list:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x2e758(%rip), %rsi # 0x48575
leaq -0x30(%rbp), %rdx
callq 0x12750
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x19f0c
movq -0x20(%rbp), %rdi
movl $0x5d, %esi
callq 0x12150
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x19e82
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x19e98
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x12150
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x19ee1
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, (%rax)
movq -0x40(%rbp), %rdi
callq 0x12680
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0x19ef6
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x19e12
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_host_list:
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_34], 0
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_19E12:
mov rdi, [rbp+var_28]
lea rsi, asc_48575; ","
lea rdx, [rbp+var_30]
call _strtok_r
mov [rbp+var_20], rax
cmp rax, 0
jz loc_19F0C
mov rdi, [rbp+var_20]
mov esi, 5Dh ; ']'
call _strchr
mov [rbp+var_40], rax
cmp rax, 0
jz short loc_19E82
mov rcx, [rbp+var_20]
add rcx, 1
mov rax, [rbp+var_10]
movsxd rdx, [rbp+var_34]
shl rdx, 4
add rax, rdx
mov [rax], rcx
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
jmp short loc_19E98
loc_19E82:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
movsxd rdx, [rbp+var_34]
shl rdx, 4
add rax, rdx
mov [rax], rcx
loc_19E98:
mov rdi, [rbp+var_20]
mov esi, 3Ah ; ':'
call _strchr
mov [rbp+var_40], rax
cmp rax, 0
jz short loc_19EE1
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
mov byte ptr [rax], 0
mov rdi, [rbp+var_40]
call _atoi
mov ecx, eax
mov rax, [rbp+var_10]
movsxd rdx, [rbp+var_34]
shl rdx, 4
add rax, rdx
mov [rax+8], ecx
jmp short loc_19EF6
loc_19EE1:
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
movsxd rdx, [rbp+var_34]
shl rdx, 4
add rax, rdx
mov [rax+8], ecx
loc_19EF6:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
mov [rbp+var_28], 0
jmp loc_19E12
loc_19F0C:
add rsp, 40h
pop rbp
retn
| long long ma_get_host_list(long long a1, long long a2, int a3)
{
long long result; // rax
int v4; // eax
_BYTE *v5; // [rsp+0h] [rbp-40h]
_BYTE *v6; // [rsp+0h] [rbp-40h]
int v7; // [rsp+Ch] [rbp-34h]
_BYTE v8[8]; // [rsp+10h] [rbp-30h] BYREF
long long i; // [rsp+18h] [rbp-28h]
_BYTE *v10; // [rsp+20h] [rbp-20h]
int v11; // [rsp+2Ch] [rbp-14h]
long long v12; // [rsp+30h] [rbp-10h]
long long v13; // [rsp+38h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v7 = 0;
for ( i = a1; ; i = 0LL )
{
result = strtok_r(i, ",", v8);
v10 = (_BYTE *)result;
if ( !result )
break;
v5 = (_BYTE *)strchr(v10, 93LL);
if ( v5 )
{
*(_QWORD *)(16LL * v7 + v12) = v10 + 1;
*v5 = 0;
v10 = v5 + 1;
}
else
{
*(_QWORD *)(16LL * v7 + v12) = v10;
}
v6 = (_BYTE *)strchr(v10, 58LL);
if ( v6 )
{
*v6 = 0;
v4 = atoi(v6 + 1);
*(_DWORD *)(16LL * v7 + v12 + 8) = v4;
}
else
{
*(_DWORD *)(16LL * v7 + v12 + 8) = v11;
}
++v7;
}
return result;
}
| ma_get_host_list:
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 dword ptr [RBP + -0x34],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00119e12:
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[0x148575]
LEA RDX,[RBP + -0x30]
CALL 0x00112750
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x00119f0c
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x5d
CALL 0x00112150
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x00119e82
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x34]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00119e98
LAB_00119e82:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x34]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LAB_00119e98:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x3a
CALL 0x00112150
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x00119ee1
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00112680
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x34]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x8],ECX
JMP 0x00119ef6
LAB_00119ee1:
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x34]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x8],ECX
LAB_00119ef6:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
MOV qword ptr [RBP + -0x28],0x0
JMP 0x00119e12
LAB_00119f0c:
ADD RSP,0x40
POP RBP
RET
|
void ma_get_host_list(char *param_1,long param_2,int4 param_3)
{
int iVar1;
char *pcVar2;
int local_3c;
char *local_38;
char *local_30;
char *local_28;
int4 local_1c;
long local_18;
char *local_10;
local_3c = 0;
local_30 = param_1;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
local_28 = strtok_r(local_30,",",&local_38);
if (local_28 == (char *)0x0) break;
pcVar2 = strchr(local_28,0x5d);
if (pcVar2 == (char *)0x0) {
*(char **)(local_18 + (long)local_3c * 0x10) = local_28;
}
else {
*(char **)(local_18 + (long)local_3c * 0x10) = local_28 + 1;
local_28 = pcVar2 + 1;
*pcVar2 = '\0';
}
pcVar2 = strchr(local_28,0x3a);
if (pcVar2 == (char *)0x0) {
*(int4 *)(local_18 + (long)local_3c * 0x10 + 8) = local_1c;
}
else {
*pcVar2 = '\0';
iVar1 = atoi(pcVar2 + 1);
*(int *)(local_18 + (long)local_3c * 0x10 + 8) = iVar1;
}
local_3c = local_3c + 1;
local_30 = (char *)0x0;
}
return;
}
|
|
4,064 | Catch::StringMaker<std::basic_string_view<wchar_t, std::char_traits<wchar_t>>, void>::convert[abi:cxx11](std::basic_string_view<wchar_t, std::char_traits<wchar_t>>) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | std::string StringMaker<std::wstring_view>::convert(std::wstring_view str) {
return StringMaker<std::wstring>::convert(std::wstring(str));
} | O3 | cpp | Catch::StringMaker<std::basic_string_view<wchar_t, std::char_traits<wchar_t>>, void>::convert[abi:cxx11](std::basic_string_view<wchar_t, std::char_traits<wchar_t>>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq (%rdx,%rsi,4), %rax
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x8207a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58048
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x58176
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x17150
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x581a1
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x17150
movq %rbx, %rdi
callq 0x17740
nop
| _ZN5Catch11StringMakerISt17basic_string_viewIwSt11char_traitsIwEEvE7convertB5cxx11ES4_:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
lea r15, [rsp+38h+var_28]
mov [r15-10h], r15
lea rax, [rdx+rsi*4]
mov r14, rsp
mov rdi, r14
mov rsi, rdx
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag; std::wstring::_M_construct<wchar_t const*>(wchar_t const*,wchar_t const*,std::forward_iterator_tag)
mov rdi, rbx; int
mov rsi, r14; int
call _ZN5Catch11StringMakerINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEvE7convertERKS6_; Catch::StringMaker<std::wstring,void>::convert(std::wstring const&)
mov rdi, [rsp+38h+var_38]; void *
cmp rdi, r15
jz short loc_58176
mov rax, [rsp+38h+var_28]
lea rsi, ds:4[rax*4]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_58176:
mov rax, rbx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r15
jz short loc_581A1
mov rax, [rsp+arg_8]
lea rsi, ds:4[rax*4]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_581A1:
mov rdi, rbx
call __Unwind_Resume
| long long Catch::StringMaker<std::wstring_view,void>::convert[abi:cxx11](long long a1, long long a2, long long a3)
{
void *v4[2]; // [rsp+0h] [rbp-38h] BYREF
_QWORD v5[5]; // [rsp+10h] [rbp-28h] BYREF
v4[0] = v5;
std::wstring::_M_construct<wchar_t const*>(v4, a3, a3 + 4 * a2);
Catch::StringMaker<std::wstring,void>::convert(a1, (long long *)v4);
if ( v4[0] != v5 )
operator delete(v4[0], 4LL * v5[0] + 4);
return a1;
}
| convert[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
LEA RAX,[RDX + RSI*0x4]
MOV R14,RSP
MOV RDI,R14
MOV RSI,RDX
MOV RDX,RAX
CALL 0x0018207a
LAB_00158150:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00158048
LAB_0015815b:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00158176
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[0x4 + RAX*0x4]
CALL 0x00117150
LAB_00158176:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* Catch::StringMaker<std::basic_string_view<wchar_t, std::char_traits<wchar_t> >,
void>::convert[abi:cxx11](std::basic_string_view<wchar_t, std::char_traits<wchar_t> >) */
StringMaker<std::__cxx11::wstring,void> *
Catch::StringMaker<std::basic_string_view<wchar_t,std::char_traits<wchar_t>>,void>::
convert_abi_cxx11_(StringMaker<std::__cxx11::wstring,void> *param_1,long param_2,long param_3)
{
long *local_38 [2];
long local_28 [2];
local_38[0] = local_28;
std::__cxx11::wstring::_M_construct<wchar_t_const*>(local_38,param_3,param_3 + param_2 * 4);
/* try { // try from 00158150 to 0015815a has its CatchHandler @ 00158183 */
StringMaker<std::__cxx11::wstring,void>::convert(param_1,(wstring *)local_38);
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] * 4 + 4);
}
return param_1;
}
|
|
4,065 | ma_soft_sync_background | eloqsql/storage/maria/ma_loghandler.c | static pthread_handler_t
ma_soft_sync_background( void *arg __attribute__((unused)))
{
my_thread_init();
{
DBUG_ENTER("ma_soft_sync_background");
for(;;)
{
ulonglong prev_loop= microsecond_interval_timer();
ulonglong time, sleep;
uint32 min, max, sync_request;
min= soft_sync_min;
max= soft_sync_max;
sync_request= soft_need_sync;
soft_sync_min= max;
soft_need_sync= 0;
sleep= group_commit_wait;
if (sync_request)
translog_sync_files(min, max, FALSE);
time= microsecond_interval_timer() - prev_loop;
if (time > sleep)
sleep= 0;
else
sleep-= time;
if (my_service_thread_sleep(&soft_sync_control, sleep))
break;
}
my_thread_end();
DBUG_RETURN(0);
}
} | O0 | c | ma_soft_sync_background:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0x122660
callq 0x11bed0
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
movl 0xc61952(%rip), %eax # 0xcaf66c
movl %eax, -0x24(%rbp)
movl 0xc6194d(%rip), %eax # 0xcaf670
movl %eax, -0x28(%rbp)
movl 0x2a59f8(%rip), %eax # 0x2f3724
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, 0xc61934(%rip) # 0xcaf66c
movl $0x0, 0x2a59e2(%rip) # 0x2f3724
movl 0xc6191c(%rip), %eax # 0xcaf664
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x4dd5f
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
xorl %edx, %edx
callq 0x4c8a0
callq 0x11bed0
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
subq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x4dd8a
movq $0x0, -0x20(%rbp)
jmp 0x4dd99
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq 0x2a5984(%rip), %rdi # 0x2f3728
callq 0x63490
cmpb $0x0, %al
je 0x4ddaf
jmp 0x4ddb4
jmp 0x4dd01
callq 0x122a00
jmp 0x4ddbb
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_soft_sync_background:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
call my_thread_init
loc_4DD01:
call my_interval_timer
mov ecx, 3E8h
xor edx, edx
div rcx
mov [rbp+var_10], rax
mov eax, cs:soft_sync_min
mov [rbp+var_24], eax
mov eax, cs:soft_sync_max
mov [rbp+var_28], eax
mov eax, cs:soft_need_sync
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
mov cs:soft_sync_min, eax
mov cs:soft_need_sync, 0
mov eax, cs:group_commit_wait
mov [rbp+var_20], rax
cmp [rbp+var_2C], 0
jz short loc_4DD5F
mov edi, [rbp+var_24]
mov esi, [rbp+var_28]
xor edx, edx
call translog_sync_files
loc_4DD5F:
call my_interval_timer
mov ecx, 3E8h
xor edx, edx
div rcx
sub rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jbe short loc_4DD8A
mov [rbp+var_20], 0
jmp short loc_4DD99
loc_4DD8A:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
loc_4DD99:
mov rsi, [rbp+var_20]
lea rdi, soft_sync_control
call my_service_thread_sleep
cmp al, 0
jz short loc_4DDAF
jmp short loc_4DDB4
loc_4DDAF:
jmp loc_4DD01
loc_4DDB4:
call my_thread_end
jmp short $+2
loc_4DDBB:
xor eax, eax
add rsp, 30h
pop rbp
retn
| long long ma_soft_sync_background(void *a1, unsigned long long a2)
{
long long v2; // rdx
unsigned long long v3; // rax
unsigned long long v4; // rdx
unsigned long long v5; // rax
int v7; // [rsp+4h] [rbp-2Ch]
unsigned int v8; // [rsp+Ch] [rbp-24h]
unsigned long long v9; // [rsp+10h] [rbp-20h]
unsigned long long v10; // [rsp+10h] [rbp-20h]
unsigned long long v11; // [rsp+20h] [rbp-10h]
my_thread_init();
do
{
v3 = my_interval_timer(a1, a2, v2);
v4 = v3 % 0x3E8;
v11 = v3 / 0x3E8;
v8 = soft_sync_min;
v7 = soft_need_sync;
soft_sync_min = soft_sync_max;
soft_need_sync = 0;
v9 = (unsigned int)group_commit_wait;
if ( v7 )
{
a1 = (void *)v8;
a2 = (unsigned int)soft_sync_max;
translog_sync_files(v8, soft_sync_max, 0);
}
v5 = my_interval_timer(a1, a2, v4);
if ( v5 / 0x3E8 - v11 <= v9 )
v10 = v9 - (v5 / 0x3E8 - v11);
else
v10 = 0LL;
a2 = v10;
a1 = &soft_sync_control;
}
while ( !(unsigned __int8)my_service_thread_sleep(&soft_sync_control, v10, v5 % 0x3E8) );
my_thread_end();
return 0LL;
}
| ma_soft_sync_background:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
CALL 0x00222660
LAB_0014dd01:
CALL 0x0021bed0
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [0x00daf66c]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [0x00daf670]
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [0x003f3724]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [0x00daf66c],EAX
MOV dword ptr [0x003f3724],0x0
MOV EAX,dword ptr [0x00daf664]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0014dd5f
MOV EDI,dword ptr [RBP + -0x24]
MOV ESI,dword ptr [RBP + -0x28]
XOR EDX,EDX
CALL 0x0014c8a0
LAB_0014dd5f:
CALL 0x0021bed0
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0014dd8a
MOV qword ptr [RBP + -0x20],0x0
JMP 0x0014dd99
LAB_0014dd8a:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0014dd99:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x3f3728]
CALL 0x00163490
CMP AL,0x0
JZ 0x0014ddaf
JMP 0x0014ddb4
LAB_0014ddaf:
JMP 0x0014dd01
LAB_0014ddb4:
CALL 0x00222a00
JMP 0x0014ddbb
LAB_0014ddbb:
XOR EAX,EAX
ADD RSP,0x30
POP RBP
RET
|
int8 ma_soft_sync_background(void)
{
int iVar1;
int4 uVar2;
char cVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long local_28;
my_thread_init();
do {
uVar4 = my_interval_timer();
uVar2 = soft_sync_min;
iVar1 = soft_need_sync;
soft_sync_min = soft_sync_max;
soft_need_sync = 0;
uVar5 = (ulong)group_commit_wait;
if (iVar1 != 0) {
translog_sync_files(uVar2,soft_sync_max,0);
}
uVar6 = my_interval_timer();
uVar4 = uVar6 / 1000 - uVar4 / 1000;
if (uVar5 < uVar4) {
local_28 = 0;
}
else {
local_28 = uVar5 - uVar4;
}
cVar3 = my_service_thread_sleep(soft_sync_control,local_28,uVar6 % 1000);
} while (cVar3 == '\0');
my_thread_end();
return 0;
}
|
|
4,066 | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static std::vector<ggml_backend_dev_t> parse_device_list(const std::string & value) {
std::vector<ggml_backend_dev_t> devices;
auto dev_names = string_split<std::string>(value, ',');
if (dev_names.empty()) {
throw std::invalid_argument("no devices specified");
}
if (dev_names.size() == 1 && dev_names[0] == "none") {
devices.push_back(nullptr);
} else {
for (const auto & device : dev_names) {
auto * dev = ggml_backend_dev_by_name(device.c_str());
if (!dev || ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_GPU) {
throw std::invalid_argument(string_format("invalid device: %s", device.c_str()));
}
devices.push_back(dev);
}
devices.push_back(nullptr);
}
return devices;
} | O2 | cpp | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsp, %rdi
pushq $0x2c
popq %rdx
callq 0x34cd5
movq (%rsp), %r14
movq 0x8(%rsp), %r12
cmpq %r12, %r14
je 0x36516
movq %r12, %rax
subq %r14, %rax
cmpq $0x20, %rax
jne 0x36468
leaq 0x74b17(%rip), %rsi # 0xaaf57
movq %r14, %rdi
callq 0x38a22
testb %al, %al
je 0x3645f
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x454aa
jmp 0x364b3
movq (%rsp), %r14
movq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r15
cmpq %r12, %r14
je 0x364a2
movq (%r14), %rdi
callq 0x230f0
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x364cb
movq %rax, %rdi
callq 0x23170
cmpl $0x1, %eax
jne 0x364cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4548c
addq $0x20, %r14
jmp 0x3646d
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x454aa
movq %rsp, %rdi
callq 0x26bfa
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
movq (%r14), %rdx
leaq 0x79af8(%rip), %rsi # 0xaffd8
leaq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0x52c77
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x23eb0
xorl %ebp, %ebp
movq 0xc5acb(%rip), %rsi # 0xfbfd0
movq 0xc5aa4(%rip), %rdx # 0xfbfb0
movq %r15, %rdi
callq 0x23e90
jmp 0x36546
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x79a9b(%rip), %rsi # 0xaffc3
movq %rax, %rdi
callq 0x24040
movq 0xc5a99(%rip), %rsi # 0xfbfd0
movq 0xc5a72(%rip), %rdx # 0xfbfb0
movq %r15, %rdi
callq 0x23e90
jmp 0x36574
jmp 0x36574
jmp 0x36567
jmp 0x36574
movq %rax, %r14
jmp 0x3657f
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x3656a
jmp 0x36577
movq %rax, %r14
movq %r15, %rdi
callq 0x23660
jmp 0x36577
movq %rax, %r14
movq %rsp, %rdi
callq 0x26bfa
movq %rbx, %rdi
callq 0x27236
movq %r14, %rdi
callq 0x23f10
nop
| _ZL17parse_device_listRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rdi, rsp
push 2Ch ; ','
pop rdx
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov r14, [rsp+68h+var_68]
mov r12, [rsp+68h+var_60]
cmp r14, r12
jz loc_36516
mov rax, r12
sub rax, r14
cmp rax, 20h ; ' '
jnz short loc_36468
lea rsi, aNone; "none"
mov rdi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3645F
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
jmp short loc_364B3
loc_3645F:
mov r14, [rsp+68h+var_68]
mov r12, [rsp+68h+var_60]
loc_36468:
lea r15, [rsp+68h+var_50]
loc_3646D:
cmp r14, r12
jz short loc_364A2
mov rdi, [r14]
call _ggml_backend_dev_by_name
mov [rsp+68h+var_50], rax
test rax, rax
jz short loc_364CB
mov rdi, rax
call _ggml_backend_dev_type
cmp eax, 1
jnz short loc_364CB
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE9push_backERKS1_; std::vector<ggml_backend_device *>::push_back(ggml_backend_device * const&)
add r14, 20h ; ' '
jmp short loc_3646D
loc_364A2:
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
loc_364B3:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_364CB:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
mov rdx, [r14]
lea rsi, aInvalidDeviceS; "invalid device: %s"
lea rdi, [rsp+68h+var_48]
xor eax, eax
call _Z13string_formatB5cxx11PKcz; string_format(char const*,...)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_36546
loc_36516:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aNoDevicesSpeci; "no devices specified"
mov rdi, rax; this
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_36546:
jmp short loc_36574
jmp short loc_36574
jmp short loc_36567
jmp short loc_36574
mov r14, rax
jmp short loc_3657F
mov r14, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_3656A
jmp short loc_36577
loc_36567:
mov r14, rax
loc_3656A:
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_36577
loc_36574:
mov r14, rax
loc_36577:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_3657F:
mov rdi, rbx
call _ZNSt12_Vector_baseIP19ggml_backend_deviceSaIS1_EED2Ev; std::_Vector_base<ggml_backend_device *>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long parse_device_list(long long a1, long long a2)
{
_QWORD *v2; // r14
_QWORD *v3; // r12
long long v4; // rax
void *v6; // r15
int v7; // ecx
int v8; // r8d
int v9; // r9d
std::invalid_argument *exception; // r15
_QWORD *v11; // [rsp+0h] [rbp-68h] BYREF
_QWORD *v12; // [rsp+8h] [rbp-60h]
long long v13; // [rsp+18h] [rbp-50h] BYREF
_QWORD v14[9]; // [rsp+20h] [rbp-48h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
string_split<std::string>((long long)&v11, a2, 0x2Cu);
v2 = v11;
v3 = v12;
if ( v11 == v12 )
{
exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(exception, "no devices specified");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
if ( (char *)v12 - (char *)v11 == 32 )
{
if ( (unsigned __int8)std::operator==<char>(v11, "none") )
goto LABEL_9;
v2 = v11;
v3 = v12;
}
while ( v2 != v3 )
{
v4 = ggml_backend_dev_by_name(*v2);
v13 = v4;
if ( !v4 || (unsigned int)ggml_backend_dev_type(v4) != 1 )
{
v6 = __cxa_allocate_exception(0x10uLL);
string_format[abi:cxx11]((unsigned int)v14, (unsigned int)"invalid device: %s", *v2, v7, v8, v9);
std::invalid_argument::invalid_argument(v6, v14);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
std::vector<ggml_backend_device *>::push_back(a1, &v13);
v2 += 4;
}
LABEL_9:
v14[0] = 0LL;
std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(a1, v14);
std::vector<std::string>::~vector((long long)&v11);
return a1;
}
| parse_device_list:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LAB_00136410:
MOV RDI,RSP
PUSH 0x2c
POP RDX
CALL 0x00134cd5
MOV R14,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
CMP R14,R12
JZ 0x00136516
MOV RAX,R12
SUB RAX,R14
CMP RAX,0x20
JNZ 0x00136468
LEA RSI,[0x1aaf57]
MOV RDI,R14
CALL 0x00138a22
TEST AL,AL
JZ 0x0013645f
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_00136455:
MOV RDI,RBX
CALL 0x001454aa
JMP 0x001364b3
LAB_0013645f:
MOV R14,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
LAB_00136468:
LEA R15,[RSP + 0x18]
LAB_0013646d:
CMP R14,R12
JZ 0x001364a2
MOV RDI,qword ptr [R14]
LAB_00136475:
CALL 0x001230f0
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001364cb
MOV RDI,RAX
CALL 0x00123170
CMP EAX,0x1
JNZ 0x001364cb
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014548c
ADD R14,0x20
JMP 0x0013646d
LAB_001364a2:
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_001364ab:
MOV RDI,RBX
CALL 0x001454aa
LAB_001364b3:
MOV RDI,RSP
CALL 0x00126bfa
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001364cb:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
MOV RDX,qword ptr [R14]
LAB_001364d9:
LEA RSI,[0x1affd8]
LEA RDI,[RSP + 0x20]
XOR EAX,EAX
CALL 0x00152c77
MOV BPL,0x1
LAB_001364ef:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00123eb0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbfd0]
MOV RDX,qword ptr [0x001fbfb0]
MOV RDI,R15
CALL 0x00123e90
LAB_00136516:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_00136521:
LEA RSI,[0x1affc3]
MOV RDI,RAX
CALL 0x00124040
LAB_00136530:
MOV RSI,qword ptr [0x001fbfd0]
MOV RDX,qword ptr [0x001fbfb0]
MOV RDI,R15
CALL 0x00123e90
|
/* parse_device_list(std::__cxx11::string const&) */
string * parse_device_list(string *param_1)
{
bool bVar1;
int iVar2;
invalid_argument *piVar3;
char in_SIL;
string *psVar4;
string *psVar5;
string *local_68;
string *local_60;
ggml_backend_device *local_50;
ggml_backend_device *local_48 [4];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 00136410 to 0013641a has its CatchHandler @ 0013654e */
string_split<std::__cxx11::string>((string *)&local_68,in_SIL);
if (local_68 == local_60) {
piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00136521 to 0013652f has its CatchHandler @ 0013654a */
std::invalid_argument::invalid_argument(piVar3,"no devices specified");
/* try { // try from 00136530 to 00136545 has its CatchHandler @ 00136548 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar3,PTR_typeinfo_001fbfd0,PTR__invalid_argument_001fbfb0);
}
psVar4 = local_60;
psVar5 = local_68;
if (((long)local_60 - (long)local_68 == 0x20) &&
(bVar1 = std::operator==(local_68,"none"), psVar4 = local_60, psVar5 = local_68, bVar1)) {
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 00136455 to 0013645c has its CatchHandler @ 00136546 */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
else {
for (; psVar5 != psVar4; psVar5 = psVar5 + 0x20) {
/* try { // try from 00136475 to 0013649b has its CatchHandler @ 00136574 */
local_50 = (ggml_backend_device *)ggml_backend_dev_by_name(*(int8 *)psVar5);
if ((local_50 == (ggml_backend_device *)0x0) ||
(iVar2 = ggml_backend_dev_type(local_50), iVar2 != 1)) {
piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 001364d9 to 001364eb has its CatchHandler @ 00136567 */
string_format_abi_cxx11_((char *)local_48,"invalid device: %s",*(int8 *)psVar5);
/* try { // try from 001364ef to 00136513 has its CatchHandler @ 00136553 */
std::invalid_argument::invalid_argument(piVar3,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(piVar3,PTR_typeinfo_001fbfd0,PTR__invalid_argument_001fbfb0);
}
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::push_back
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,
&local_50);
}
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 001364ab to 001364b2 has its CatchHandler @ 0013654c */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return param_1;
}
|
|
4,067 | OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp | PatchBuilder::PatchBuilder(
TopologyRefiner const& refiner, Options const& options) :
_refiner(refiner), _options(options) {
//
// Initialize members with properties of the subdivision scheme and patch
// choices for quick retrieval:
//
_schemeType = refiner.GetSchemeType();
_schemeRegFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(_schemeType);
_schemeIsLinear = Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(_schemeType) == 0;
// Initialization of members involving patch types is deferred to the
// subclass for the scheme
} | O0 | cpp | OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x10b835(%rip), %rcx # 0x240fc8
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rdi
callq 0xd0110
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl 0x1c(%rax), %edi
callq 0xc8880
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20(%rax)
movl 0x1c(%rax), %edi
callq 0xc5820
movl %eax, %ecx
movq -0x20(%rbp), %rax
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x24(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Far12PatchBuilderC2ERKNS1_15TopologyRefinerERKNS2_7OptionsE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rcx, cs:_ZTVN10OpenSubdiv6v3_6_03Far12PatchBuilderE_ptr
add rcx, 10h
mov [rax], rcx
mov rcx, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax+10h], rdx
mov ecx, [rcx+8]
mov [rax+18h], ecx
mov rdi, [rbp+var_10]; this
call __ZNK10OpenSubdiv6v3_6_03Far15TopologyRefiner13GetSchemeTypeEv; OpenSubdiv::v3_6_0::Far::TopologyRefiner::GetSchemeType(void)
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+1Ch], ecx
mov edi, [rax+1Ch]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+20h], ecx
mov edi, [rax+1Ch]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits24GetLocalNeighborhoodSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ecx, eax
mov rax, [rbp+var_20]
cmp ecx, 0
setz cl
and cl, 1
mov [rax+24h], cl
add rsp, 20h
pop rbp
retn
| OpenSubdiv::v3_6_0::Far::PatchBuilder * OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(
OpenSubdiv::v3_6_0::Far::PatchBuilder *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2,
const OpenSubdiv::v3_6_0::Far::PatchBuilder::Options *a3)
{
int LocalNeighborhoodSize; // ecx
OpenSubdiv::v3_6_0::Far::PatchBuilder *result; // rax
*(_QWORD *)this = &`vtable for'OpenSubdiv::v3_6_0::Far::PatchBuilder + 2;
*((_QWORD *)this + 1) = a2;
*((_QWORD *)this + 2) = *(_QWORD *)a3;
*((_DWORD *)this + 6) = *((_DWORD *)a3 + 2);
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Far::TopologyRefiner::GetSchemeType(a2);
*((_DWORD *)this + 8) = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(*((_DWORD *)this + 7));
LocalNeighborhoodSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(*((_DWORD *)this + 7));
result = this;
*((_BYTE *)this + 36) = LocalNeighborhoodSize == 0;
return result;
}
| |||
4,068 | OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp | PatchBuilder::PatchBuilder(
TopologyRefiner const& refiner, Options const& options) :
_refiner(refiner), _options(options) {
//
// Initialize members with properties of the subdivision scheme and patch
// choices for quick retrieval:
//
_schemeType = refiner.GetSchemeType();
_schemeRegFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(_schemeType);
_schemeIsLinear = Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(_schemeType) == 0;
// Initialization of members involving patch types is deferred to the
// subclass for the scheme
} | O1 | cpp | OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&):
pushq %rbx
movq %rdi, %rbx
movq 0x78a31(%rip), %rax # 0xddfc8
addq $0x10, %rax
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movq (%rdx), %rax
movq %rax, 0x10(%rdi)
movl 0x8(%rdx), %eax
movl %eax, 0x18(%rdi)
movl (%rsi), %edi
movl %edi, 0x1c(%rbx)
callq 0x39360
movl %eax, 0x20(%rbx)
movl 0x1c(%rbx), %edi
callq 0x38810
testl %eax, %eax
sete 0x24(%rbx)
popq %rbx
retq
| _ZN10OpenSubdiv6v3_6_03Far12PatchBuilderC2ERKNS1_15TopologyRefinerERKNS2_7OptionsE:
push rbx
mov rbx, rdi
mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Far12PatchBuilderE_ptr
add rax, 10h
mov [rdi], rax
mov [rdi+8], rsi
mov rax, [rdx]
mov [rdi+10h], rax
mov eax, [rdx+8]
mov [rdi+18h], eax
mov edi, [rsi]
mov [rbx+1Ch], edi
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov [rbx+20h], eax
mov edi, [rbx+1Ch]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits24GetLocalNeighborhoodSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
test eax, eax
setz byte ptr [rbx+24h]
pop rbx
retn
| long long OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(long long a1, unsigned int *a2, long long a3)
{
unsigned int v4; // edi
long long result; // rax
*(_QWORD *)a1 = &`vtable for'OpenSubdiv::v3_6_0::Far::PatchBuilder + 2;
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = *(_QWORD *)a3;
*(_DWORD *)(a1 + 24) = *(_DWORD *)(a3 + 8);
v4 = *a2;
*(_DWORD *)(a1 + 28) = *a2;
*(_DWORD *)(a1 + 32) = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(v4);
result = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(*(_DWORD *)(a1 + 28));
*(_BYTE *)(a1 + 36) = (_DWORD)result == 0;
return result;
}
| PatchBuilder:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [0x001ddfc8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],RSI
MOV RAX,qword ptr [RDX]
MOV qword ptr [RDI + 0x10],RAX
MOV EAX,dword ptr [RDX + 0x8]
MOV dword ptr [RDI + 0x18],EAX
MOV EDI,dword ptr [RSI]
MOV dword ptr [RBX + 0x1c],EDI
CALL 0x00139360
MOV dword ptr [RBX + 0x20],EAX
MOV EDI,dword ptr [RBX + 0x1c]
CALL 0x00138810
TEST EAX,EAX
SETZ byte ptr [RBX + 0x24]
POP RBX
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&, OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchBuilder::PatchBuilder
(PatchBuilder *this,TopologyRefiner *param_1,Options *param_2)
{
int4 uVar1;
int iVar2;
*(int **)this = PTR_vtable_001ddfc8 + 0x10;
*(TopologyRefiner **)(this + 8) = param_1;
*(int8 *)(this + 0x10) = *(int8 *)param_2;
*(int4 *)(this + 0x18) = *(int4 *)(param_2 + 8);
*(int4 *)(this + 0x1c) = *(int4 *)param_1;
uVar1 = Sdc::SchemeTypeTraits::GetRegularFaceSize();
*(int4 *)(this + 0x20) = uVar1;
iVar2 = Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize(*(int4 *)(this + 0x1c));
this[0x24] = (PatchBuilder)(iVar2 == 0);
return;
}
|
|
4,069 | my_strnncoll_simple | eloqsql/strings/ctype-simple.c | int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
} | O3 | c | my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %r10
cmovbq %rdx, %r10
movq 0x58(%rdi), %rdi
testb %r9b, %r9b
cmovneq %r10, %rdx
xorl %r9d, %r9d
cmpq %r9, %r10
je 0xb4f06
movzbl (%rsi,%r9), %eax
movzbl (%rdi,%rax), %eax
movzbl (%rcx,%r9), %r11d
movzbl (%rdi,%r11), %r11d
incq %r9
cmpb %r11b, %al
je 0xb4ee1
subl %r11d, %eax
jmp 0xb4f18
xorl %ecx, %ecx
cmpq %r8, %rdx
sbbl %ecx, %ecx
cmpq %r8, %rdx
movl $0x1, %eax
cmovbel %ecx, %eax
popq %rbp
retq
| my_strnncoll_simple:
push rbp
mov rbp, rsp
cmp rdx, r8
mov r10, r8
cmovb r10, rdx
mov rdi, [rdi+58h]
test r9b, r9b
cmovnz rdx, r10
xor r9d, r9d
loc_B4EE1:
cmp r10, r9
jz short loc_B4F06
movzx eax, byte ptr [rsi+r9]
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx+r9]
movzx r11d, byte ptr [rdi+r11]
inc r9
cmp al, r11b
jz short loc_B4EE1
sub eax, r11d
jmp short loc_B4F18
loc_B4F06:
xor ecx, ecx
cmp rdx, r8
sbb ecx, ecx
cmp rdx, r8
mov eax, 1
cmovbe eax, ecx
loc_B4F18:
pop rbp
retn
| long long my_strnncoll_simple(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v6; // r10
long long v7; // rdi
long long v8; // r9
int v9; // eax
int v10; // r11d
long long result; // rax
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = *(_QWORD *)(a1 + 88);
if ( a6 )
a3 = v6;
v8 = 0LL;
while ( v6 != v8 )
{
v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8));
v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++));
if ( (_BYTE)v9 != (_BYTE)v10 )
return (unsigned int)(v9 - v10);
}
result = 1LL;
if ( a3 <= a5 )
return (unsigned int)-(a3 < a5);
return result;
}
| my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV R10,R8
CMOVC R10,RDX
MOV RDI,qword ptr [RDI + 0x58]
TEST R9B,R9B
CMOVNZ RDX,R10
XOR R9D,R9D
LAB_001b4ee1:
CMP R10,R9
JZ 0x001b4f06
MOVZX EAX,byte ptr [RSI + R9*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX + R9*0x1]
MOVZX R11D,byte ptr [RDI + R11*0x1]
INC R9
CMP AL,R11B
JZ 0x001b4ee1
SUB EAX,R11D
JMP 0x001b4f18
LAB_001b4f06:
XOR ECX,ECX
CMP RDX,R8
SBB ECX,ECX
CMP RDX,R8
MOV EAX,0x1
CMOVBE EAX,ECX
LAB_001b4f18:
POP RBP
RET
|
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5,
char param_6)
{
byte bVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
if (param_6 != '\0') {
param_3 = uVar4;
}
uVar3 = 0;
do {
if (uVar4 == uVar3) {
if (param_5 < param_3) {
return 1;
}
return -(uint)(param_3 < param_5);
}
bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3));
bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3));
uVar3 = uVar3 + 1;
} while (bVar1 == bVar2);
return (uint)bVar1 - (uint)bVar2;
}
|
|
4,070 | alaya::RawSpaceTest_TestFit_Test::RawSpaceTest_TestFit_Test() | AlayaLite/tests/space/raw_space_test.cpp | TEST_F(RawSpaceTest, TestFit) {
// Here's some test data: 3 points in 3D space.
std::vector<float> data = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0};
// We call the fit method to load this data into our RawSpace.
space_->fit(data.data(), 3);
// Now, let's check if the number of data points has been correctly updated.
// We expect it to be 3 since we inserted 3 points.
ASSERT_EQ(space_->get_data_num(), 3);
// The dimensionality of each data point should be 3 as well.
ASSERT_EQ(space_->get_dim(), 3);
} | O0 | cpp | alaya::RawSpaceTest_TestFit_Test::RawSpaceTest_TestFit_Test():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x26d10
movq 0x8(%rsp), %rax
leaq 0x1599d4(%rip), %rcx # 0x1806d8
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x18, %rsp
retq
| _ZN5alaya25RawSpaceTest_TestFit_TestC2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
mov [rsp+18h+var_10], rdi
call _ZN5alaya12RawSpaceTestC2Ev; alaya::RawSpaceTest::RawSpaceTest(void)
mov rax, [rsp+18h+var_10]
lea rcx, _ZTVN5alaya25RawSpaceTest_TestFit_TestE; `vtable for'alaya::RawSpaceTest_TestFit_Test
add rcx, 10h
mov [rax], rcx
add rsp, 18h
retn
| alaya::RawSpaceTest_TestFit_Test * alaya::RawSpaceTest_TestFit_Test::RawSpaceTest_TestFit_Test(
alaya::RawSpaceTest_TestFit_Test *this)
{
alaya::RawSpaceTest_TestFit_Test *result; // rax
alaya::RawSpaceTest::RawSpaceTest(this);
result = this;
*(_QWORD *)this = &`vtable for'alaya::RawSpaceTest_TestFit_Test + 2;
return result;
}
| RawSpaceTest_TestFit_Test:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00126d10
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x2806d8]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x18
RET
|
/* alaya::RawSpaceTest_TestFit_Test::RawSpaceTest_TestFit_Test() */
void __thiscall
alaya::RawSpaceTest_TestFit_Test::RawSpaceTest_TestFit_Test(RawSpaceTest_TestFit_Test *this)
{
RawSpaceTest::RawSpaceTest((RawSpaceTest *)this);
*(int ***)this = &PTR__RawSpaceTest_TestFit_Test_002806e8;
return;
}
|
|
4,071 | my_strxfrm_pad_nweights_unicode | eloqsql/strings/ctype-utf8.c | size_t
my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
{
uchar *str0;
DBUG_ASSERT(str && str <= strend);
for (str0= str; str < strend && nweights; nweights--)
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
} | O3 | c | my_strxfrm_pad_nweights_unicode:
cmpq %rsi, %rdi
setae %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
movq %rdi, %rax
jne 0xcb7bd
pushq %rbp
movq %rsp, %rbp
decq %rdx
movq %rdi, %rcx
leaq 0x1(%rcx), %rax
movb $0x0, (%rcx)
cmpq %rsi, %rax
jae 0xcb7a7
movb $0x20, 0x1(%rcx)
addq $0x2, %rcx
movq %rcx, %rax
addq $-0x1, %rdx
setb %r8b
cmpq %rsi, %rax
jae 0xcb7bc
movq %rax, %rcx
testb %r8b, %r8b
jne 0xcb790
popq %rbp
subq %rdi, %rax
retq
| my_strxfrm_pad_nweights_unicode:
cmp rdi, rsi
setnb al
test rdx, rdx
setz cl
or cl, al
mov rax, rdi
jnz short loc_CB7BD
push rbp
mov rbp, rsp
dec rdx
mov rcx, rdi
loc_CB790:
lea rax, [rcx+1]
mov byte ptr [rcx], 0
cmp rax, rsi
jnb short loc_CB7A7
mov byte ptr [rcx+1], 20h ; ' '
add rcx, 2
mov rax, rcx
loc_CB7A7:
add rdx, 0FFFFFFFFFFFFFFFFh
setb r8b
cmp rax, rsi
jnb short loc_CB7BC
mov rcx, rax
test r8b, r8b
jnz short loc_CB790
loc_CB7BC:
pop rbp
loc_CB7BD:
sub rax, rdi
retn
| long long my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rax
long long v4; // rdx
_BYTE *v5; // rcx
bool v6; // cf
v3 = a1;
if ( (unsigned long long)a1 < a2 && a3 != 0 )
{
v4 = a3 - 1;
v5 = a1;
do
{
v3 = v5 + 1;
*v5 = 0;
if ( (unsigned long long)(v5 + 1) < a2 )
{
v5[1] = 32;
v3 = v5 + 2;
}
v6 = v4-- != 0;
if ( (unsigned long long)v3 >= a2 )
break;
v5 = v3;
}
while ( v6 );
}
return v3 - a1;
}
| my_strxfrm_pad_nweights_unicode:
CMP RDI,RSI
SETNC AL
TEST RDX,RDX
SETZ CL
OR CL,AL
MOV RAX,RDI
JNZ 0x001cb7bd
PUSH RBP
MOV RBP,RSP
DEC RDX
MOV RCX,RDI
LAB_001cb790:
LEA RAX,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP RAX,RSI
JNC 0x001cb7a7
MOV byte ptr [RCX + 0x1],0x20
ADD RCX,0x2
MOV RAX,RCX
LAB_001cb7a7:
ADD RDX,-0x1
SETC R8B
CMP RAX,RSI
JNC 0x001cb7bc
MOV RCX,RAX
TEST R8B,R8B
JNZ 0x001cb790
LAB_001cb7bc:
POP RBP
LAB_001cb7bd:
SUB RAX,RDI
RET
|
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3)
{
int1 *puVar1;
int1 *puVar2;
bool bVar3;
puVar2 = param_1;
if (param_3 != 0 && param_1 < param_2) {
param_3 = param_3 + -1;
puVar1 = param_1;
do {
puVar2 = puVar1 + 1;
*puVar1 = 0;
if (puVar2 < param_2) {
puVar1[1] = 0x20;
puVar2 = puVar1 + 2;
}
bVar3 = param_3 != 0;
param_3 = param_3 + -1;
} while ((puVar2 < param_2) && (puVar1 = puVar2, bVar3));
}
return (long)puVar2 - (long)param_1;
}
|
|
4,072 | google::protobuf::internal::ExtensionSet::GetEnum(int, int) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc | int ExtensionSet::GetEnum(int number, int default_value) const {
const Extension* extension = FindOrNull(number);
if (extension == nullptr || extension->is_cleared) {
// Not present. Return the default value.
return default_value;
} else {
GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, ENUM);
return extension->enum_value;
}
} | O3 | cpp | google::protobuf::internal::ExtensionSet::GetEnum(int, int) const:
pushq %rbx
movl %edx, %ebx
callq 0xb3166
testq %rax, %rax
je 0xb4ddd
testb $0x1, 0xa(%rax)
jne 0xb4ddd
movl (%rax), %ebx
movl %ebx, %eax
popq %rbx
retq
nop
| _ZNK6google8protobuf8internal12ExtensionSet7GetEnumEii:
push rbx
mov ebx, edx
call _ZNK6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int)
test rax, rax
jz short loc_B4DDD
test byte ptr [rax+0Ah], 1
jnz short loc_B4DDD
mov ebx, [rax]
loc_B4DDD:
mov eax, ebx
pop rbx
retn
| long long google::protobuf::internal::ExtensionSet::GetEnum(
google::protobuf::internal::ExtensionSet *this,
int a2,
unsigned int a3)
{
_BYTE *v4; // rax
v4 = (_BYTE *)google::protobuf::internal::ExtensionSet::FindOrNull(this, a2);
if ( v4 && (v4[10] & 1) == 0 )
return *(unsigned int *)v4;
return a3;
}
| GetEnum:
PUSH RBX
MOV EBX,EDX
CALL 0x001b3166
TEST RAX,RAX
JZ 0x001b4ddd
TEST byte ptr [RAX + 0xa],0x1
JNZ 0x001b4ddd
MOV EBX,dword ptr [RAX]
LAB_001b4ddd:
MOV EAX,EBX
POP RBX
RET
|
/* google::protobuf::internal::ExtensionSet::GetEnum(int, int) const */
int __thiscall
google::protobuf::internal::ExtensionSet::GetEnum(ExtensionSet *this,int param_1,int param_2)
{
int *piVar1;
piVar1 = (int *)FindOrNull(this,param_1);
if ((piVar1 != (int *)0x0) && ((*(byte *)((long)piVar1 + 10) & 1) == 0)) {
param_2 = *piVar1;
}
return param_2;
}
|
|
4,073 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1a4c6
cmpl $0x2f, %eax
je 0x58005
cmpl $0x2a, %eax
jne 0x58022
movq %rbx, %rdi
callq 0x1a4c6
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x5802b
cmpl $0x2a, %eax
jne 0x57fd9
movq %rbx, %rdi
callq 0x1a4c6
cmpl $0x2f, %eax
je 0x5801e
movq %rbx, %rdi
callq 0x58894
jmp 0x57fd9
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x1a4c6
incl %eax
cmpl $0xf, %eax
jae 0x5800a
btl %eax, %ebp
jae 0x5800a
movb $0x1, %al
jmp 0x58038
leaq 0x633e7(%rip), %rax # 0xbb410
jmp 0x58032
leaq 0x633b8(%rip), %rax # 0xbb3ea
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_58005
cmp eax, 2Ah ; '*'
jnz short loc_58022
loc_57FD9:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_5802B
cmp eax, 2Ah ; '*'
jnz short loc_57FD9
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_5801E
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_57FD9
loc_58005:
mov ebp, 4803h
loc_5800A:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_5800A
bt ebp, eax
jnb short loc_5800A
loc_5801E:
mov al, 1
jmp short loc_58038
loc_58022:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_58032
loc_5802B:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_58032:
mov [rbx+70h], rax
xor eax, eax
loc_58038:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0011a4c6
CMP EAX,0x2f
JZ 0x00158005
CMP EAX,0x2a
JNZ 0x00158022
LAB_00157fd9:
MOV RDI,RBX
CALL 0x0011a4c6
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x0015802b
CMP EAX,0x2a
JNZ 0x00157fd9
MOV RDI,RBX
CALL 0x0011a4c6
CMP EAX,0x2f
JZ 0x0015801e
MOV RDI,RBX
CALL 0x00158894
JMP 0x00157fd9
LAB_00158005:
MOV EBP,0x4803
LAB_0015800a:
MOV RDI,RBX
CALL 0x0011a4c6
INC EAX
CMP EAX,0xf
JNC 0x0015800a
BT EBP,EAX
JNC 0x0015800a
LAB_0015801e:
MOV AL,0x1
JMP 0x00158038
LAB_00158022:
LEA RAX,[0x1bb410]
JMP 0x00158032
LAB_0015802b:
LEA RAX,[0x1bb3ea]
LAB_00158032:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00158038:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_0015801e:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_0015801e;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
|
|
4,074 | JS_NewUint8ArrayCopy | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewUint8ArrayCopy(JSContext *ctx, const uint8_t *buf, size_t len)
{
JSValue buffer = js_array_buffer_constructor3(ctx, JS_UNDEFINED, len, NULL,
JS_CLASS_ARRAY_BUFFER,
(uint8_t *)buf,
js_array_buffer_free, NULL,
TRUE);
return js_new_uint8array(ctx, buffer);
} | O1 | c | JS_NewUint8ArrayCopy:
pushq %rbx
movq %rdx, %rcx
movq %rsi, %rax
movq %rdi, %rbx
leaq -0xa0c(%rip), %r10 # 0x382a5
movl $0x3, %edx
xorl %esi, %esi
xorl %r8d, %r8d
movl $0x13, %r9d
pushq $0x1
pushq $0x0
pushq %r10
pushq %rax
callq 0x38005
addq $0x20, %rsp
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x38bfd
| JS_NewUint8ArrayCopy:
push rbx
mov rcx, rdx
mov rax, rsi
mov rbx, rdi
lea r10, js_array_buffer_free
mov edx, 3
xor esi, esi
xor r8d, r8d
mov r9d, 13h
push 1
push 0
push r10
push rax
call js_array_buffer_constructor3
add rsp, 20h
mov rdi, rbx
mov rsi, rax
pop rbx
jmp js_new_uint8array
| long long JS_NewUint8ArrayCopy(
long long a1,
long long a2,
unsigned long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11)
{
_DWORD *v11; // rax
long long v12; // rdx
double v13; // xmm4_8
double v14; // xmm5_8
v11 = (_DWORD *)js_array_buffer_constructor3(
a1,
0LL,
3LL,
a3,
0LL,
19LL,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a2,
(long long ( *)())js_array_buffer_free,
0LL,
1);
return js_new_uint8array(a1, v11, v12, a4, a5, a6, a7, v13, v14, a10, a11);
}
| JS_NewUint8ArrayCopy:
PUSH RBX
MOV RCX,RDX
MOV RAX,RSI
MOV RBX,RDI
LEA R10,[0x1382a5]
MOV EDX,0x3
XOR ESI,ESI
XOR R8D,R8D
MOV R9D,0x13
PUSH 0x1
PUSH 0x0
PUSH R10
PUSH RAX
CALL 0x00138005
ADD RSP,0x20
MOV RDI,RBX
MOV RSI,RAX
POP RBX
JMP 0x00138bfd
|
void JS_NewUint8ArrayCopy(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
uVar1 = js_array_buffer_constructor3(param_1,0,3,param_3,0,0x13,param_2,js_array_buffer_free,0,1);
js_new_uint8array(param_1,uVar1);
return;
}
|
|
4,075 | my_readlink | eloqsql/mysys/my_symlink.c | int my_readlink(char *to, const char *filename, myf MyFlags)
{
#ifndef HAVE_READLINK
strmov(to,filename);
return 1;
#else
int result=0;
int length;
DBUG_ENTER("my_readlink");
if ((length=readlink(filename, to, FN_REFLEN-1)) < 0)
{
/* Don't give an error if this wasn't a symlink */
if ((my_errno=errno) == EINVAL)
{
result= 1;
strmov(to,filename);
}
else
{
if (MyFlags & MY_WME)
my_error(EE_CANT_READLINK, MYF(0), filename, errno);
result= -1;
}
}
else
to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_readlink:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x29220
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0xf6991
callq 0x296d0
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0xf7b30
movq %rax, %rcx
movl -0x24(%rbp), %eax
movl %eax, (%rcx)
cmpl $0x16, %eax
jne 0xf6957
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x296a0
jmp 0xf698f
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xf6988
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x296d0
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0x18, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0xf14a0
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0xf699d
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xf699f
jmp 0xf69a1
jmp 0xf69a3
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_readlink:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 1FFh
call _readlink
mov [rbp+var_20], eax
cmp eax, 0
jge short loc_F6991
call ___errno_location
mov eax, [rax]
mov [rbp+var_24], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_24]
mov [rcx], eax
cmp eax, 16h
jnz short loc_F6957
mov [rbp+var_1C], 1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _stpcpy
jmp short loc_F698F
loc_F6957:
mov rax, [rbp+var_18]
and rax, 10h
cmp rax, 0
jz short loc_F6988
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 18h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_F6988:
mov [rbp+var_1C], 0FFFFFFFFh
loc_F698F:
jmp short loc_F699D
loc_F6991:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_20]
mov byte ptr [rax+rcx], 0
loc_F699D:
jmp short $+2
loc_F699F:
jmp short $+2
loc_F69A1:
jmp short $+2
loc_F69A3:
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_readlink(const char *a1, long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+1Ch] [rbp-24h]
int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
v7 = 0;
v6 = readlink(a2, a1, 511LL);
if ( v6 >= 0 )
{
a1[v6] = 0;
}
else
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a2, a1) = v5;
if ( v5 == 22 )
{
v7 = 1;
stpcpy(a1, a2);
}
else
{
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)__errno_location();
my_error(0x18u, 0LL, a2, *v3);
}
return (unsigned int)-1;
}
}
return v7;
}
| my_readlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x1ff
CALL 0x00129220
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JGE 0x001f6991
CALL 0x001296d0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x001f7b30
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RCX],EAX
CMP EAX,0x16
JNZ 0x001f6957
MOV dword ptr [RBP + -0x1c],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001296a0
JMP 0x001f698f
LAB_001f6957:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001f6988
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x001296d0
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0x18
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001f14a0
LAB_001f6988:
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_001f698f:
JMP 0x001f699d
LAB_001f6991:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001f699d:
JMP 0x001f699f
LAB_001f699f:
JMP 0x001f69a1
LAB_001f69a1:
JMP 0x001f69a3
LAB_001f69a3:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int4 my_readlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
ssize_t sVar2;
int *piVar3;
int4 local_24;
local_24 = 0;
sVar2 = readlink(param_2,param_1,0x1ff);
if ((int)sVar2 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if (iVar1 == 0x16) {
local_24 = 1;
stpcpy(param_1,param_2);
}
else {
if ((param_3 & 0x10) != 0) {
piVar3 = __errno_location();
my_error(0x18,0,param_2,*piVar3);
}
local_24 = 0xffffffff;
}
}
else {
param_1[(int)sVar2] = '\0';
}
return local_24;
}
|
|
4,076 | ma_close | eloqsql/libmariadb/libmariadb/ma_io.c | int ma_close(MA_FILE *file)
{
int rc;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
rc= fclose((FILE *)file->ptr);
free(file);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
rc= rio_plugin->methods->mclose(file);
break;
#endif
default:
return -1;
}
return rc;
} | O3 | c | ma_close:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x27c78
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
je 0x27c82
cmpl $0x1, %eax
jne 0x27c78
movq 0x8(%rbx), %rdi
callq 0x13460
movl %eax, %r14d
movq %rbx, %rdi
callq 0x13570
movl %r14d, %eax
jmp 0x27c7d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x22bf7(%rip), %rax # 0x4a880
movq (%rax), %rax
movq 0x58(%rax), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *0x8(%rax)
| ma_close:
push rbp
mov rbp, rsp
push r14
push rbx
test rdi, rdi
jz short loc_27C78
mov rbx, rdi
mov eax, [rdi]
cmp eax, 2
jz short loc_27C82
cmp eax, 1
jnz short loc_27C78
mov rdi, [rbx+8]
call _fclose
mov r14d, eax
mov rdi, rbx
call _free
mov eax, r14d
jmp short loc_27C7D
loc_27C78:
mov eax, 0FFFFFFFFh
loc_27C7D:
pop rbx
pop r14
pop rbp
retn
loc_27C82:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp qword ptr [rax+8]
| long long ma_close(long long a1)
{
unsigned int v1; // r14d
if ( !a1 )
return 0xFFFFFFFFLL;
if ( *(_DWORD *)a1 != 2 )
{
if ( *(_DWORD *)a1 == 1 )
{
v1 = fclose(*(_QWORD *)(a1 + 8));
free(a1);
return v1;
}
return 0xFFFFFFFFLL;
}
return (*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1);
}
| ma_close:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x00127c78
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
CMP EAX,0x2
JZ 0x00127c82
CMP EAX,0x1
JNZ 0x00127c78
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x00113460
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00113570
MOV EAX,R14D
JMP 0x00127c7d
LAB_00127c78:
MOV EAX,0xffffffff
LAB_00127c7d:
POP RBX
POP R14
POP RBP
RET
LAB_00127c82:
LEA RAX,[0x14a880]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP qword ptr [RAX + 0x8]
|
ulong ma_close(int *param_1)
{
uint uVar1;
ulong uVar2;
if (param_1 != (int *)0x0) {
if (*param_1 == 2) {
/* WARNING: Could not recover jumptable at 0x00127c97. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1);
return uVar2;
}
if (*param_1 == 1) {
uVar1 = fclose(*(FILE **)(param_1 + 2));
free(param_1);
return (ulong)uVar1;
}
}
return 0xffffffff;
}
|
|
4,077 | inline_mysql_rwlock_unlock | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_rwlock_unlock(
mysql_rwlock_t *that)
{
int result;
#ifdef HAVE_PSI_RWLOCK_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
#endif
result= rw_unlock(&that->m_rwlock);
return result;
} | O0 | c | inline_mysql_rwlock_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%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 0x62381
leaq 0x25ecae(%rip), %rax # 0x2c1018
movq (%rax), %rax
movq 0x168(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0xfbbc0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_rwlock_unlock_1:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 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_62381
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+168h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+90h]
call rax
loc_62381:
mov rdi, [rbp+var_8]
call my_rw_unlock
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_rwlock_unlock_1(long long a1)
{
if ( *(_QWORD *)(a1 + 144) )
((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144));
return (unsigned int)my_rw_unlock(a1);
}
| inline_mysql_rwlock_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],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 0x00162381
LEA RAX,[0x3c1018]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x168]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x90]
CALL RAX
LAB_00162381:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fbbc0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 inline_mysql_rwlock_unlock(long param_1)
{
int4 uVar1;
if (*(long *)(param_1 + 0x90) != 0) {
(**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90));
}
uVar1 = my_rw_unlock(param_1);
return uVar1;
}
|
|
4,078 | Json::Reader::~Reader() | aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/../../include/json/reader.h | class JSON_API Reader {
public:
using Char = char;
using Location = const Char*;
/** \brief An error tagged with where in the JSON text it was encountered.
*
* The offsets give the [start, limit) range of bytes within the text. Note
* that this is bytes, not codepoints.
*/
struct StructuredError {
ptrdiff_t offset_start;
ptrdiff_t offset_limit;
String message;
};
/** \brief Constructs a Reader allowing all features for parsing.
* \deprecated Use CharReader and CharReaderBuilder.
*/
Reader();
/** \brief Constructs a Reader allowing the specified feature set for parsing.
* \deprecated Use CharReader and CharReaderBuilder.
*/
Reader(const Features& features);
/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
* document.
*
* \param document UTF-8 encoded string containing the document
* to read.
* \param[out] root Contains the root value of the document if it
* was successfully parsed.
* \param collectComments \c true to collect comment and allow writing
* them back during serialization, \c false to
* discard comments. This parameter is ignored
* if Features::allowComments_ is \c false.
* \return \c true if the document was successfully parsed, \c false if an
* error occurred.
*/
bool parse(const std::string& document, Value& root,
bool collectComments = true);
/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
* document.
*
* \param beginDoc Pointer on the beginning of the UTF-8 encoded
* string of the document to read.
* \param endDoc Pointer on the end of the UTF-8 encoded string
* of the document to read. Must be >= beginDoc.
* \param[out] root Contains the root value of the document if it
* was successfully parsed.
* \param collectComments \c true to collect comment and allow writing
* them back during serialization, \c false to
* discard comments. This parameter is ignored
* if Features::allowComments_ is \c false.
* \return \c true if the document was successfully parsed, \c false if an
* error occurred.
*/
bool parse(const char* beginDoc, const char* endDoc, Value& root,
bool collectComments = true);
/// \brief Parse from input stream.
/// \see Json::operator>>(std::istream&, Json::Value&).
bool parse(IStream& is, Value& root, bool collectComments = true);
/** \brief Returns a user friendly string that list errors in the parsed
* document.
*
* \return Formatted error message with the list of errors with their
* location in the parsed document. An empty string is returned if no error
* occurred during parsing.
* \deprecated Use getFormattedErrorMessages() instead (typo fix).
*/
JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
String getFormatedErrorMessages() const;
/** \brief Returns a user friendly string that list errors in the parsed
* document.
*
* \return Formatted error message with the list of errors with their
* location in the parsed document. An empty string is returned if no error
* occurred during parsing.
*/
String getFormattedErrorMessages() const;
/** \brief Returns a vector of structured errors encountered while parsing.
*
* \return A (possibly empty) vector of StructuredError objects. Currently
* only one error can be returned, but the caller should tolerate multiple
* errors. This can occur if the parser recovers from a non-fatal parse
* error and then encounters additional errors.
*/
std::vector<StructuredError> getStructuredErrors() const;
/** \brief Add a semantic error message.
*
* \param value JSON Value location associated with the error
* \param message The error message.
* \return \c true if the error was successfully added, \c false if the Value
* offset exceeds the document size.
*/
bool pushError(const Value& value, const String& message);
/** \brief Add a semantic error message with extra context.
*
* \param value JSON Value location associated with the error
* \param message The error message.
* \param extra Additional JSON Value location to contextualize the error
* \return \c true if the error was successfully added, \c false if either
* Value offset exceeds the document size.
*/
bool pushError(const Value& value, const String& message, const Value& extra);
/** \brief Return whether there are any errors.
*
* \return \c true if there are no errors to report \c false if errors have
* occurred.
*/
bool good() const;
private:
enum TokenType {
tokenEndOfStream = 0,
tokenObjectBegin,
tokenObjectEnd,
tokenArrayBegin,
tokenArrayEnd,
tokenString,
tokenNumber,
tokenTrue,
tokenFalse,
tokenNull,
tokenArraySeparator,
tokenMemberSeparator,
tokenComment,
tokenError
};
class Token {
public:
TokenType type_;
Location start_;
Location end_;
};
class ErrorInfo {
public:
Token token_;
String message_;
Location extra_;
};
using Errors = std::deque<ErrorInfo>;
bool readToken(Token& token);
bool readTokenSkippingComments(Token& token);
void skipSpaces();
bool match(const Char* pattern, int patternLength);
bool readComment();
bool readCStyleComment();
bool readCppStyleComment();
bool readString();
void readNumber();
bool readValue();
bool readObject(Token& token);
bool readArray(Token& token);
bool decodeNumber(Token& token);
bool decodeNumber(Token& token, Value& decoded);
bool decodeString(Token& token);
bool decodeString(Token& token, String& decoded);
bool decodeDouble(Token& token);
bool decodeDouble(Token& token, Value& decoded);
bool decodeUnicodeCodePoint(Token& token, Location& current, Location end,
unsigned int& unicode);
bool decodeUnicodeEscapeSequence(Token& token, Location& current,
Location end, unsigned int& unicode);
bool addError(const String& message, Token& token, Location extra = nullptr);
bool recoverFromError(TokenType skipUntilToken);
bool addErrorAndRecover(const String& message, Token& token,
TokenType skipUntilToken);
void skipUntilSpace();
Value& currentValue();
Char getNextChar();
void getLocationLineAndColumn(Location location, int& line,
int& column) const;
String getLocationLineAndColumn(Location location) const;
void addComment(Location begin, Location end, CommentPlacement placement);
static bool containsNewLine(Location begin, Location end);
static String normalizeEOL(Location begin, Location end);
using Nodes = std::stack<Value*>;
Nodes nodes_;
Errors errors_;
String document_;
Location begin_{};
Location end_{};
Location current_{};
Location lastValueEnd_{};
Value* lastValue_{};
String commentsBefore_;
Features features_;
bool collectComments_{};
} | O3 | c | Json::Reader::~Reader():
pushq %rbx
movq %rdi, %rbx
movq 0xe8(%rdi), %rdi
leaq 0xf8(%rbx), %rax
cmpq %rax, %rdi
je 0x23f8a
movq (%rax), %rsi
incq %rsi
callq 0x1f250
movq 0xa0(%rbx), %rdi
leaq 0xb0(%rbx), %rax
cmpq %rax, %rdi
je 0x23fa8
movq (%rax), %rsi
incq %rsi
callq 0x1f250
leaq 0x50(%rbx), %rdi
callq 0x24a3a
movq %rbx, %rdi
popq %rbx
jmp 0x24be6
| _ZN4Json6ReaderD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+0E8h]; void *
lea rax, [rbx+0F8h]
cmp rdi, rax
jz short loc_23F8A
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23F8A:
mov rdi, [rbx+0A0h]; void *
lea rax, [rbx+0B0h]
cmp rdi, rax
jz short loc_23FA8
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23FA8:
lea rdi, [rbx+50h]
call _ZNSt5dequeIN4Json6Reader9ErrorInfoESaIS2_EED2Ev; std::deque<Json::Reader::ErrorInfo>::~deque()
mov rdi, rbx
pop rbx
jmp _ZNSt11_Deque_baseIPN4Json5ValueESaIS2_EED2Ev; std::_Deque_base<Json::Value *>::~_Deque_base()
| void Json::Reader::~Reader(Json::Reader *this, unsigned long long a2)
{
char *v3; // rdi
char *v4; // rdi
v3 = (char *)*((_QWORD *)this + 29);
if ( v3 != (char *)this + 248 )
{
a2 = *((_QWORD *)this + 31) + 1LL;
operator delete(v3, a2);
}
v4 = (char *)*((_QWORD *)this + 20);
if ( v4 != (char *)this + 176 )
{
a2 = *((_QWORD *)this + 22) + 1LL;
operator delete(v4, a2);
}
std::deque<Json::Reader::ErrorInfo>::~deque((char *)this + 80, a2);
std::_Deque_base<Json::Value *>::~_Deque_base(this);
}
| ~Reader:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xe8]
LEA RAX,[RBX + 0xf8]
CMP RDI,RAX
JZ 0x00123f8a
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011f250
LAB_00123f8a:
MOV RDI,qword ptr [RBX + 0xa0]
LEA RAX,[RBX + 0xb0]
CMP RDI,RAX
JZ 0x00123fa8
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011f250
LAB_00123fa8:
LEA RDI,[RBX + 0x50]
CALL 0x00124a3a
MOV RDI,RBX
POP RBX
JMP 0x00124be6
|
/* Json::Reader::~Reader() */
void __thiscall Json::Reader::~Reader(Reader *this)
{
if (*(Reader **)(this + 0xe8) != this + 0xf8) {
operator_delete(*(Reader **)(this + 0xe8),*(long *)(this + 0xf8) + 1);
}
if (*(Reader **)(this + 0xa0) != this + 0xb0) {
operator_delete(*(Reader **)(this + 0xa0),*(long *)(this + 0xb0) + 1);
}
std::deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>>::~deque
((deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>> *)(this + 0x50)
);
std::_Deque_base<Json::Value*,std::allocator<Json::Value*>>::~_Deque_base
((_Deque_base<Json::Value*,std::allocator<Json::Value*>> *)this);
return;
}
|
|
4,079 | YAML::DecodeBase64(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/yaml-cpp-src/src/binary.cpp | std::vector<unsigned char> DecodeBase64(const std::string &input) {
using ret_type = std::vector<unsigned char>;
if (input.empty())
return ret_type();
ret_type ret(3 * input.size() / 4 + 1);
unsigned char *out = &ret[0];
unsigned value = 0;
for (std::size_t i = 0, cnt = 0; i < input.size(); i++) {
if (std::isspace(static_cast<unsigned char>(input[i]))) {
// skip newlines
continue;
}
unsigned char d = decoding[static_cast<unsigned char>(input[i])];
if (d == 255)
return ret_type();
value = (value << 6) | d;
if (cnt % 4 == 3) {
*out++ = value >> 16;
if (i > 0 && input[i - 1] != '=')
*out++ = value >> 8;
if (input[i] != '=')
*out++ = value;
}
++cnt;
}
ret.resize(out - &ret[0]);
return ret;
} | O3 | cpp | YAML::DecodeBase64(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x7fd64
movq %rsi, %r14
leaq (%rax,%rax,2), %rsi
shrq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x1fd20
movq (%r15), %rsi
movq 0x8(%r14), %rbp
testq %rbp, %rbp
je 0x7fd74
movq %rsi, 0x8(%rsp)
movq %rbx, 0x30(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
movq (%r14), %rax
movzbl (%rax,%r13), %r15d
movl %r15d, %edi
callq 0x1e150
testl %eax, %eax
jne 0x7fd47
leaq 0x9ff1(%rip), %rax # 0x89cd0
movzbl (%r15,%rax), %eax
cmpl $0xff, %eax
je 0x7fda7
shll $0x6, %ebx
orl %ebx, %eax
movl %r12d, %ecx
notl %ecx
testb $0x3, %cl
jne 0x7fd3e
movl %ebx, %edx
shrl $0x10, %edx
movq 0x8(%rsp), %rsi
leaq 0x1(%rsi), %rcx
movb %dl, (%rsi)
movq (%r14), %rdx
testq %r13, %r13
je 0x7fd2d
cmpb $0x3d, -0x1(%rdx,%r13)
je 0x7fd2d
movq 0x8(%rsp), %rcx
movb %bh, 0x1(%rcx)
addq $0x2, %rcx
movq (%r14), %rdx
cmpb $0x3d, (%rdx,%r13)
je 0x7fd39
movb %al, (%rcx)
incq %rcx
movq %rcx, 0x8(%rsp)
incq %r12
movq 0x8(%r14), %rbp
movl %eax, %ebx
incq %r13
cmpq %rbp, %r13
jb 0x7fcc4
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rbx
movq 0x8(%rsp), %rsi
jmp 0x7fd77
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x7fd95
movq %rsi, %rax
subq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x1f300
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
movq 0x30(%rsp), %rbx
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7fd95
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1f250
jmp 0x7fd95
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7fded
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1f250
movq %rbx, %rdi
callq 0x1ffd0
nop
| _ZN4YAML12DecodeBase64ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov rax, [rsi+8]
test rax, rax
jz loc_7FD64
mov r14, rsi
lea rsi, [rax+rax*2]
shr rsi, 2
inc rsi
lea r15, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_61]
mov rdi, r15
call __ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
mov rsi, [r15]
mov rbp, [r14+8]
test rbp, rbp
jz loc_7FD74
mov [rsp+68h+var_60], rsi
mov [rsp+68h+var_38], rbx
xor r12d, r12d
xor r13d, r13d
xor ebx, ebx
loc_7FCC4:
mov rax, [r14]
movzx r15d, byte ptr [rax+r13]
mov edi, r15d
call _isspace
test eax, eax
jnz short loc_7FD47
lea rax, _ZN4YAMLL8decodingE; YAML::decoding
movzx eax, byte ptr [r15+rax]
cmp eax, 0FFh
jz loc_7FDA7
shl ebx, 6
or eax, ebx
mov ecx, r12d
not ecx
test cl, 3
jnz short loc_7FD3E
mov edx, ebx
shr edx, 10h
mov rsi, [rsp+68h+var_60]
lea rcx, [rsi+1]
mov [rsi], dl
mov rdx, [r14]
test r13, r13
jz short loc_7FD2D
cmp byte ptr [rdx+r13-1], 3Dh ; '='
jz short loc_7FD2D
mov rcx, [rsp+68h+var_60]
mov [rcx+1], bh
add rcx, 2
mov rdx, [r14]
loc_7FD2D:
cmp byte ptr [rdx+r13], 3Dh ; '='
jz short loc_7FD39
mov [rcx], al
inc rcx
loc_7FD39:
mov [rsp+68h+var_60], rcx
loc_7FD3E:
inc r12
mov rbp, [r14+8]
mov ebx, eax
loc_7FD47:
inc r13
cmp r13, rbp
jb loc_7FCC4
mov rax, [rsp+68h+var_58]
mov rbx, [rsp+68h+var_38]
mov rsi, [rsp+68h+var_60]
jmp short loc_7FD77
loc_7FD64:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
jmp short loc_7FD95
loc_7FD74:
mov rax, rsi
loc_7FD77:
sub rsi, rax
lea rdi, [rsp+68h+var_58]
call __ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
movaps xmm0, xmmword ptr [rsp+68h+var_58]
movups xmmword ptr [rbx], xmm0
mov rax, [rsp+68h+var_48]
mov [rbx+10h], rax
loc_7FD95:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7FDA7:
xorps xmm0, xmm0
mov rbx, [rsp+68h+var_38]
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov rdi, [rsp+68h+var_58]; void *
test rdi, rdi
jz short loc_7FD95
mov rsi, [rsp+68h+var_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7FD95
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_7FDED
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7FDED:
mov rdi, rbx
call __Unwind_Resume
| _OWORD * YAML::DecodeBase64(long long a1, long long *a2)
{
_OWORD *v2; // rbx
long long v3; // rax
_BYTE *v5; // rsi
unsigned long long v6; // rbp
char v7; // r12
long long v8; // r13
int v9; // ebx
long long v10; // r15
int v11; // eax
int v12; // ebx
int v13; // eax
_BYTE *v14; // rcx
long long v15; // rdx
_BYTE *v16; // rcx
_BYTE *v17; // rax
char v19; // [rsp+7h] [rbp-61h] BYREF
_BYTE *v20; // [rsp+8h] [rbp-60h]
void *v21[2]; // [rsp+10h] [rbp-58h] BYREF
long long v22; // [rsp+20h] [rbp-48h]
_OWORD *v23; // [rsp+30h] [rbp-38h]
v2 = (_OWORD *)a1;
v3 = a2[1];
if ( !v3 )
{
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
return v2;
}
std::vector<unsigned char>::vector(v21, ((unsigned long long)(3 * v3) >> 2) + 1, &v19);
v5 = v21[0];
v6 = a2[1];
if ( v6 )
{
v20 = v21[0];
v23 = (_OWORD *)a1;
v7 = 0;
v8 = 0LL;
v9 = 0;
while ( 1 )
{
v10 = *(unsigned __int8 *)(*a2 + v8);
if ( !(unsigned int)isspace(v10, v5) )
{
v11 = YAML::decoding[v10];
if ( v11 == 255 )
{
v2 = v23;
*v23 = 0LL;
*((_QWORD *)v2 + 2) = 0LL;
if ( v21[0] )
operator delete(v21[0], v22 - (unsigned long long)v21[0]);
return v2;
}
v12 = v9 << 6;
v13 = v12 | v11;
if ( (~v7 & 3) == 0 )
{
v5 = v20;
v14 = v20 + 1;
*v20 = BYTE2(v12);
v15 = *a2;
if ( v8 && *(_BYTE *)(v15 + v8 - 1) != 61 )
{
v16 = v20;
v20[1] = BYTE1(v12);
v14 = v16 + 2;
v15 = *a2;
}
if ( *(_BYTE *)(v15 + v8) != 61 )
*v14++ = v13;
v20 = v14;
}
++v7;
v6 = a2[1];
v9 = v13;
}
if ( ++v8 >= v6 )
{
v17 = v21[0];
v2 = v23;
v5 = v20;
goto LABEL_18;
}
}
}
v17 = v21[0];
LABEL_18:
std::vector<unsigned char>::resize(v21, v5 - v17);
*v2 = *(_OWORD *)v21;
*((_QWORD *)v2 + 2) = v22;
return v2;
}
| DecodeBase64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x0017fd64
MOV R14,RSI
LEA RSI,[RAX + RAX*0x2]
SHR RSI,0x2
INC RSI
LEA R15,[RSP + 0x10]
LEA RDX,[RSP + 0x7]
MOV RDI,R15
CALL 0x0011fd20
MOV RSI,qword ptr [R15]
MOV RBP,qword ptr [R14 + 0x8]
TEST RBP,RBP
JZ 0x0017fd74
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x30],RBX
XOR R12D,R12D
XOR R13D,R13D
XOR EBX,EBX
LAB_0017fcc4:
MOV RAX,qword ptr [R14]
MOVZX R15D,byte ptr [RAX + R13*0x1]
MOV EDI,R15D
CALL 0x0011e150
TEST EAX,EAX
JNZ 0x0017fd47
LEA RAX,[0x189cd0]
MOVZX EAX,byte ptr [R15 + RAX*0x1]
CMP EAX,0xff
JZ 0x0017fda7
SHL EBX,0x6
OR EAX,EBX
MOV ECX,R12D
NOT ECX
TEST CL,0x3
JNZ 0x0017fd3e
MOV EDX,EBX
SHR EDX,0x10
MOV RSI,qword ptr [RSP + 0x8]
LEA RCX,[RSI + 0x1]
MOV byte ptr [RSI],DL
MOV RDX,qword ptr [R14]
TEST R13,R13
JZ 0x0017fd2d
CMP byte ptr [RDX + R13*0x1 + -0x1],0x3d
JZ 0x0017fd2d
MOV RCX,qword ptr [RSP + 0x8]
MOV byte ptr [RCX + 0x1],BH
ADD RCX,0x2
MOV RDX,qword ptr [R14]
LAB_0017fd2d:
CMP byte ptr [RDX + R13*0x1],0x3d
JZ 0x0017fd39
MOV byte ptr [RCX],AL
INC RCX
LAB_0017fd39:
MOV qword ptr [RSP + 0x8],RCX
LAB_0017fd3e:
INC R12
MOV RBP,qword ptr [R14 + 0x8]
MOV EBX,EAX
LAB_0017fd47:
INC R13
CMP R13,RBP
JC 0x0017fcc4
MOV RAX,qword ptr [RSP + 0x10]
MOV RBX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x8]
JMP 0x0017fd77
LAB_0017fd64:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
JMP 0x0017fd95
LAB_0017fd74:
MOV RAX,RSI
LAB_0017fd77:
SUB RSI,RAX
LAB_0017fd7a:
LEA RDI,[RSP + 0x10]
CALL 0x0011f300
LAB_0017fd84:
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVUPS xmmword ptr [RBX],XMM0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RBX + 0x10],RAX
LAB_0017fd95:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017fda7:
XORPS XMM0,XMM0
MOV RBX,qword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0017fd95
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011f250
JMP 0x0017fd95
|
/* YAML::DecodeBase64(std::__cxx11::string const&) */
YAML * __thiscall YAML::DecodeBase64(YAML *this,string *param_1)
{
byte bVar1;
YAML *pYVar2;
int iVar3;
uint uVar4;
int1 *puVar5;
long lVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
ulong uVar10;
int1 *local_60;
int1 *local_58;
int8 uStack_50;
long local_48;
YAML *local_38;
if (*(long *)(param_1 + 8) == 0) {
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
}
else {
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
((ulong)&local_58,(allocator *)(((ulong)(*(long *)(param_1 + 8) * 3) >> 2) + 1));
uVar8 = *(ulong *)(param_1 + 8);
local_60 = local_58;
if (uVar8 != 0) {
uVar9 = 0;
uVar10 = 0;
uVar4 = 0;
local_38 = this;
do {
bVar1 = *(byte *)(*(long *)param_1 + uVar10);
iVar3 = isspace((uint)bVar1);
pYVar2 = local_38;
if (iVar3 == 0) {
if ((byte)decoding[bVar1] == 0xff) {
*(int8 *)local_38 = 0;
*(int8 *)(local_38 + 8) = 0;
*(int8 *)(local_38 + 0x10) = 0;
if (local_58 == (int1 *)0x0) {
return local_38;
}
operator_delete(local_58,local_48 - (long)local_58);
return pYVar2;
}
uVar7 = uVar4 << 6;
uVar4 = (byte)decoding[bVar1] | uVar7;
if ((~uVar9 & 3) == 0) {
puVar5 = local_60 + 1;
*local_60 = (char)(uVar7 >> 0x10);
lVar6 = *(long *)param_1;
if ((uVar10 != 0) && (*(char *)(lVar6 + -1 + uVar10) != '=')) {
local_60[1] = (char)(uVar7 >> 8);
puVar5 = local_60 + 2;
lVar6 = *(long *)param_1;
}
local_60 = puVar5;
if (*(char *)(lVar6 + uVar10) != '=') {
*puVar5 = (char)uVar4;
local_60 = puVar5 + 1;
}
}
uVar9 = uVar9 + 1;
uVar8 = *(ulong *)(param_1 + 8);
}
uVar10 = uVar10 + 1;
this = local_38;
} while (uVar10 < uVar8);
}
/* try { // try from 0017fd7a to 0017fd83 has its CatchHandler @ 0017fdd3 */
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize
((vector<unsigned_char,std::allocator<unsigned_char>> *)&local_58,
(long)local_60 - (long)local_58);
*(int1 **)this = local_58;
*(int8 *)(this + 8) = uStack_50;
*(long *)(this + 0x10) = local_48;
}
return this;
}
|
|
4,080 | ggml_visit_parents | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
// check if already visited
if (ggml_hash_insert(&cgraph->visited_hash_set, node) == GGML_HASHSET_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && !(node->flags & GGML_TENSOR_FLAG_PARAM)) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
cgraph->n_nodes++;
}
} | O0 | c | ggml_visit_parents:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
callq 0x58500
cmpq $-0x2, %rax
jne 0x5a3fc
jmp 0x5a5ae
movl $0x0, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jge 0x5a47d
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x5a41b
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x5a43e
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0x5a432
movl $0x9, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x5a438
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpq $0x0, 0x98(%rax,%rcx,8)
je 0x5a470
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq 0x98(%rax,%rcx,8), %rsi
callq 0x5a3d0
jmp 0x5a472
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5a403
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jne 0x5a52a
movq -0x10(%rbp), %rax
movl 0x94(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x5a52a
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x5a4d1
leaq 0x57100(%rip), %rdi # 0xb15b7
movl $0x1656, %esi # imm = 0x1656
leaq 0x57146(%rip), %rdx # 0xb1609
leaq 0x598f5(%rip), %rcx # 0xb3dbf
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
callq 0x438d0
cmpq $0x0, %rax
jne 0x5a500
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x598e5(%rip), %rsi # 0xb3dde
movb $0x0, %al
callq 0x481b0
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x5a5ae
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x5a55a
leaq 0x57077(%rip), %rdi # 0xb15b7
movl $0x165f, %esi # imm = 0x165F
leaq 0x570bd(%rip), %rdx # 0xb1609
leaq 0x59893(%rip), %rcx # 0xb3de6
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
callq 0x438d0
cmpq $0x0, %rax
jne 0x5a589
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x59883(%rip), %rsi # 0xb3e05
movb $0x0, %al
callq 0x481b0
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_visit_parents:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_10]
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jnz short loc_5A3FC
jmp loc_5A5AE
loc_5A3FC:
mov [rbp+var_14], 0
loc_5A403:
cmp [rbp+var_14], 0Ah
jge short loc_5A47D
mov rax, [rbp+var_8]
cmp dword ptr [rax+48h], 0
jnz short loc_5A41B
mov eax, [rbp+var_14]
mov [rbp+var_1C], eax
jmp short loc_5A43E
loc_5A41B:
mov rax, [rbp+var_8]
cmp dword ptr [rax+48h], 1
jnz short loc_5A432
mov eax, 9
sub eax, [rbp+var_14]
mov [rbp+var_20], eax
jmp short loc_5A438
loc_5A432:
mov eax, [rbp+var_14]
mov [rbp+var_20], eax
loc_5A438:
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
loc_5A43E:
mov eax, [rbp+var_1C]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_18]
cmp qword ptr [rax+rcx*8+98h], 0
jz short loc_5A470
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_18]
mov rsi, [rax+rcx*8+98h]
call ggml_visit_parents
loc_5A470:
jmp short $+2
loc_5A472:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_5A403
loc_5A47D:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 0
jnz loc_5A52A
mov rax, [rbp+var_10]
mov eax, [rax+94h]
and eax, 4
cmp eax, 0
jnz loc_5A52A
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov rcx, [rbp+var_8]
cmp eax, [rcx]
jl short loc_5A4D1
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1656h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNLeafsCg; "cgraph->n_leafs < cgraph->size"
mov al, 0
call _ggml_abort
loc_5A4D1:
mov rdi, [rbp+var_10]
add rdi, 100h
call _strlen
cmp rax, 0
jnz short loc_5A500
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov edx, [rax+8]
lea rsi, aLeafD; "leaf_%d"
mov al, 0
call _ggml_format_name
loc_5A500:
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+8]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_8]
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
jmp loc_5A5AE
loc_5A52A:
mov rax, [rbp+var_8]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx]
jl short loc_5A55A
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 165Fh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNNodesCg; "cgraph->n_nodes < cgraph->size"
mov al, 0
call _ggml_abort
loc_5A55A:
mov rdi, [rbp+var_10]
add rdi, 100h
call _strlen
cmp rax, 0
jnz short loc_5A589
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov edx, [rax+4]
lea rsi, aNodeD; "node_%d"
mov al, 0
call _ggml_format_name
loc_5A589:
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+4]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_8]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
loc_5A5AE:
add rsp, 20h
pop rbp
retn
| long long ggml_visit_parents(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long result; // rax
long long v11; // rcx
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
int v21; // [rsp+0h] [rbp-20h]
int v22; // [rsp+4h] [rbp-1Ch]
int i; // [rsp+Ch] [rbp-14h]
result = ggml_hash_insert((_QWORD *)(a1 + 48), a2);
if ( result != -2 )
{
for ( i = 0; i < 10; ++i )
{
if ( *(_DWORD *)(a1 + 72) )
{
if ( *(_DWORD *)(a1 + 72) == 1 )
v21 = 9 - i;
else
v21 = i;
v22 = v21;
}
else
{
v22 = i;
}
if ( *(_QWORD *)(a2 + 8LL * v22 + 152) )
ggml_visit_parents(a1, *(_QWORD *)(a2 + 8LL * v22 + 152));
}
if ( *(_DWORD *)(a2 + 80) || (*(_DWORD *)(a2 + 148) & 4) != 0 )
{
if ( *(_DWORD *)(a1 + 4) >= *(_DWORD *)a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
5727,
(long long)"GGML_ASSERT(%s) failed",
"cgraph->n_nodes < cgraph->size");
if ( !strlen(a2 + 256) )
ggml_format_name(
a2,
(long long)"node_%d",
*(unsigned int *)(a1 + 4),
v16,
v17,
v18,
a3,
a4,
a5,
a6,
v19,
v20,
a9,
a10,
v21);
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * *(int *)(a1 + 4)) = a2;
result = a1;
++*(_DWORD *)(a1 + 4);
}
else
{
if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
5718,
(long long)"GGML_ASSERT(%s) failed",
"cgraph->n_leafs < cgraph->size");
if ( !strlen(a2 + 256) )
ggml_format_name(
a2,
(long long)"leaf_%d",
*(unsigned int *)(a1 + 8),
v11,
v12,
v13,
a3,
a4,
a5,
a6,
v14,
v15,
a9,
a10,
v21);
*(_QWORD *)(*(_QWORD *)(a1 + 40) + 8LL * *(int *)(a1 + 8)) = a2;
result = a1;
++*(_DWORD *)(a1 + 8);
}
}
return result;
}
| ggml_visit_parents:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00158500
CMP RAX,-0x2
JNZ 0x0015a3fc
JMP 0x0015a5ae
LAB_0015a3fc:
MOV dword ptr [RBP + -0x14],0x0
LAB_0015a403:
CMP dword ptr [RBP + -0x14],0xa
JGE 0x0015a47d
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x48],0x0
JNZ 0x0015a41b
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0015a43e
LAB_0015a41b:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x48],0x1
JNZ 0x0015a432
MOV EAX,0x9
SUB EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0015a438
LAB_0015a432:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x20],EAX
LAB_0015a438:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0015a43e:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x18]
CMP qword ptr [RAX + RCX*0x8 + 0x98],0x0
JZ 0x0015a470
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + RCX*0x8 + 0x98]
CALL 0x0015a3d0
LAB_0015a470:
JMP 0x0015a472
LAB_0015a472:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0015a403
LAB_0015a47d:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x0
JNZ 0x0015a52a
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x94]
AND EAX,0x4
CMP EAX,0x0
JNZ 0x0015a52a
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX]
JL 0x0015a4d1
LEA RDI,[0x1b15b7]
MOV ESI,0x1656
LEA RDX,[0x1b1609]
LEA RCX,[0x1b3dbf]
MOV AL,0x0
CALL 0x00148a00
LAB_0015a4d1:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x100
CALL 0x001438d0
CMP RAX,0x0
JNZ 0x0015a500
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x8]
LEA RSI,[0x1b3dde]
MOV AL,0x0
CALL 0x001481b0
LAB_0015a500:
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x8]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
JMP 0x0015a5ae
LAB_0015a52a:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX]
JL 0x0015a55a
LEA RDI,[0x1b15b7]
MOV ESI,0x165f
LEA RDX,[0x1b1609]
LEA RCX,[0x1b3de6]
MOV AL,0x0
CALL 0x00148a00
LAB_0015a55a:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x100
CALL 0x001438d0
CMP RAX,0x0
JNZ 0x0015a589
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x4]
LEA RSI,[0x1b3e05]
MOV AL,0x0
CALL 0x001481b0
LAB_0015a589:
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x4]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
LAB_0015a5ae:
ADD RSP,0x20
POP RBP
RET
|
void ggml_visit_parents(int *param_1,long param_2)
{
long lVar1;
size_t sVar2;
int local_28;
int local_24;
int local_1c;
lVar1 = ggml_hash_insert(param_1 + 0xc,param_2);
if (lVar1 != -2) {
for (local_1c = 0; local_1c < 10; local_1c = local_1c + 1) {
if (param_1[0x12] == 0) {
local_24 = local_1c;
}
else {
if (param_1[0x12] == 1) {
local_28 = 9 - local_1c;
}
else {
local_28 = local_1c;
}
local_24 = local_28;
}
if (*(long *)(param_2 + 0x98 + (long)local_24 * 8) != 0) {
ggml_visit_parents(param_1,*(int8 *)(param_2 + 0x98 + (long)local_24 * 8));
}
}
if ((*(int *)(param_2 + 0x50) == 0) && ((*(uint *)(param_2 + 0x94) & 4) == 0)) {
if (*param_1 <= param_1[2]) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,0x1656,"GGML_ASSERT(%s) failed","cgraph->n_leafs < cgraph->size");
}
sVar2 = strlen((char *)(param_2 + 0x100));
if (sVar2 == 0) {
ggml_format_name(param_2,"leaf_%d",param_1[2]);
}
*(long *)(*(long *)(param_1 + 10) + (long)param_1[2] * 8) = param_2;
param_1[2] = param_1[2] + 1;
}
else {
if (*param_1 <= param_1[1]) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,0x165f,"GGML_ASSERT(%s) failed","cgraph->n_nodes < cgraph->size");
}
sVar2 = strlen((char *)(param_2 + 0x100));
if (sVar2 == 0) {
ggml_format_name(param_2,"node_%d",param_1[1]);
}
*(long *)(*(long *)(param_1 + 4) + (long)param_1[1] * 8) = param_2;
param_1[1] = param_1[1] + 1;
}
}
return;
}
|
|
4,081 | ggml_visit_parents | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
// check if already visited
if (ggml_hash_insert(&cgraph->visited_hash_set, node) == GGML_HASHSET_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && !(node->flags & GGML_TENSOR_FLAG_PARAM)) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
cgraph->n_nodes++;
}
} | O1 | c | ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x30, %rdi
callq 0x238e2
cmpq $-0x2, %rax
je 0x24d84
xorl %ebp, %ebp
movl $0x9, %r15d
movl 0x48(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0x98(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x24cfd
movq %rbx, %rdi
callq 0x24caf
incl %ebp
addl $-0x1, %r15d
jb 0x24cd7
cmpl $0x0, 0x50(%r14)
jne 0x24d50
testb $0x4, 0x94(%r14)
jne 0x24d50
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x24db0
cmpb $0x0, 0x100(%r14)
jne 0x24d3c
leaq 0x29d95(%rip), %rsi # 0x4eac7
movq %r14, %rdi
xorl %eax, %eax
callq 0x18a70
movq 0x28(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
jmp 0x24d84
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x24d8f
cmpb $0x0, 0x100(%r14)
jne 0x24d72
leaq 0x29d86(%rip), %rsi # 0x4eaee
movq %r14, %rdi
xorl %eax, %eax
callq 0x18a70
movq 0x10(%rbx), %rax
movslq 0x4(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x277d9(%rip), %rdi # 0x4c56f
leaq 0x27824(%rip), %rdx # 0x4c5c1
leaq 0x29d2b(%rip), %rcx # 0x4eacf
movl $0x165f, %esi # imm = 0x165F
xorl %eax, %eax
callq 0x18ce0
leaq 0x277b8(%rip), %rdi # 0x4c56f
leaq 0x27803(%rip), %rdx # 0x4c5c1
leaq 0x29ce3(%rip), %rcx # 0x4eaa8
movl $0x1656, %esi # imm = 0x1656
jmp 0x24da9
| ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
add rdi, 30h ; '0'
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_24D84
xor ebp, ebp
mov r15d, 9
loc_24CD7:
mov eax, [rbx+48h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+98h]
test rsi, rsi
jz short loc_24CFD
mov rdi, rbx
call ggml_visit_parents
loc_24CFD:
inc ebp
add r15d, 0FFFFFFFFh
jb short loc_24CD7
cmp dword ptr [r14+50h], 0
jnz short loc_24D50
test byte ptr [r14+94h], 4
jnz short loc_24D50
mov edx, [rbx+8]
cmp edx, [rbx]
jge loc_24DB0
cmp byte ptr [r14+100h], 0
jnz short loc_24D3C
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
loc_24D3C:
mov rax, [rbx+28h]
movsxd rcx, dword ptr [rbx+8]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+8], eax
jmp short loc_24D84
loc_24D50:
mov edx, [rbx+4]
cmp edx, [rbx]
jge short loc_24D8F
cmp byte ptr [r14+100h], 0
jnz short loc_24D72
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
loc_24D72:
mov rax, [rbx+10h]
movsxd rcx, dword ptr [rbx+4]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+4], eax
loc_24D84:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_24D8F:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNNodesCg; "cgraph->n_nodes < cgraph->size"
mov esi, 165Fh
loc_24DA9:
xor eax, eax
call _ggml_abort
loc_24DB0:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNLeafsCg; "cgraph->n_leafs < cgraph->size"
mov esi, 1656h
jmp short loc_24DA9
| long long ggml_visit_parents(long long a1, unsigned long long a2)
{
long long result; // rax
int v3; // r8d
int v4; // r9d
unsigned int v5; // ebp
unsigned int v6; // r15d
int v7; // eax
long long v8; // rcx
long long v10; // rcx
long long v11; // rcx
const char *v12; // rcx
int v13; // esi
result = ggml_hash_insert((long long *)(a1 + 48), a2);
if ( result == -2 )
return result;
v5 = 0;
v6 = 9;
do
{
v7 = *(_DWORD *)(a1 + 72);
v8 = v5;
if ( v7 == 1 )
v8 = v6;
if ( !v7 )
v8 = v5;
if ( *(_QWORD *)(a2 + 8 * v8 + 152) )
ggml_visit_parents(a1);
++v5;
}
while ( v6-- != 0 );
if ( !*(_DWORD *)(a2 + 80) && (*(_BYTE *)(a2 + 148) & 4) == 0 )
{
if ( *(_DWORD *)(a1 + 8) < *(_DWORD *)a1 )
{
if ( !*(_BYTE *)(a2 + 256) )
ggml_format_name(a2, (long long)"leaf_%d");
v10 = *(int *)(a1 + 8);
*(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * v10) = a2;
result = (unsigned int)(v10 + 1);
*(_DWORD *)(a1 + 8) = result;
return result;
}
v12 = "cgraph->n_leafs < cgraph->size";
v13 = 5718;
LABEL_22:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v13,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v12,
v3,
v4);
}
if ( *(_DWORD *)(a1 + 4) >= *(_DWORD *)a1 )
{
v12 = "cgraph->n_nodes < cgraph->size";
v13 = 5727;
goto LABEL_22;
}
if ( !*(_BYTE *)(a2 + 256) )
ggml_format_name(a2, (long long)"node_%d");
v11 = *(int *)(a1 + 4);
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v11) = a2;
result = (unsigned int)(v11 + 1);
*(_DWORD *)(a1 + 4) = result;
return result;
}
| ggml_visit_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x30
CALL 0x001238e2
CMP RAX,-0x2
JZ 0x00124d84
XOR EBP,EBP
MOV R15D,0x9
LAB_00124cd7:
MOV EAX,dword ptr [RBX + 0x48]
CMP EAX,0x1
MOV ECX,EBP
CMOVZ ECX,R15D
TEST EAX,EAX
CMOVZ ECX,EBP
MOV RSI,qword ptr [R14 + RCX*0x8 + 0x98]
TEST RSI,RSI
JZ 0x00124cfd
MOV RDI,RBX
CALL 0x00124caf
LAB_00124cfd:
INC EBP
ADD R15D,-0x1
JC 0x00124cd7
CMP dword ptr [R14 + 0x50],0x0
JNZ 0x00124d50
TEST byte ptr [R14 + 0x94],0x4
JNZ 0x00124d50
MOV EDX,dword ptr [RBX + 0x8]
CMP EDX,dword ptr [RBX]
JGE 0x00124db0
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x00124d3c
LEA RSI,[0x14eac7]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00118a70
LAB_00124d3c:
MOV RAX,qword ptr [RBX + 0x28]
MOVSXD RCX,dword ptr [RBX + 0x8]
MOV qword ptr [RAX + RCX*0x8],R14
LEA EAX,[RCX + 0x1]
MOV dword ptr [RBX + 0x8],EAX
JMP 0x00124d84
LAB_00124d50:
MOV EDX,dword ptr [RBX + 0x4]
CMP EDX,dword ptr [RBX]
JGE 0x00124d8f
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x00124d72
LEA RSI,[0x14eaee]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00118a70
LAB_00124d72:
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,dword ptr [RBX + 0x4]
MOV qword ptr [RAX + RCX*0x8],R14
LEA EAX,[RCX + 0x1]
MOV dword ptr [RBX + 0x4],EAX
LAB_00124d84:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00124d8f:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14eacf]
MOV ESI,0x165f
LAB_00124da9:
XOR EAX,EAX
CALL 0x00118ce0
LAB_00124db0:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14eaa8]
MOV ESI,0x1656
JMP 0x00124da9
|
void ggml_visit_parents(int *param_1,long param_2)
{
long lVar1;
ulong uVar2;
char *pcVar3;
uint uVar4;
int8 uVar5;
int iVar6;
ulong uVar7;
lVar1 = ggml_hash_insert(param_1 + 0xc);
if (lVar1 != -2) {
uVar4 = 0;
uVar7 = 9;
do {
iVar6 = (int)uVar7;
uVar2 = (ulong)uVar4;
if (param_1[0x12] == 1) {
uVar2 = uVar7;
}
if (param_1[0x12] == 0) {
uVar2 = (ulong)uVar4;
}
if (*(long *)(param_2 + 0x98 + uVar2 * 8) != 0) {
ggml_visit_parents(param_1);
}
uVar4 = uVar4 + 1;
uVar7 = (ulong)(iVar6 - 1);
} while (iVar6 != 0);
if ((*(int *)(param_2 + 0x50) == 0) && ((*(byte *)(param_2 + 0x94) & 4) == 0)) {
if (*param_1 <= param_1[2]) {
pcVar3 = "cgraph->n_leafs < cgraph->size";
uVar5 = 0x1656;
LAB_00124da9:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,uVar5,"GGML_ASSERT(%s) failed",pcVar3);
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"leaf_%d");
}
iVar6 = param_1[2];
*(long *)(*(long *)(param_1 + 10) + (long)iVar6 * 8) = param_2;
param_1[2] = iVar6 + 1;
}
else {
if (*param_1 <= param_1[1]) {
pcVar3 = "cgraph->n_nodes < cgraph->size";
uVar5 = 0x165f;
goto LAB_00124da9;
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"node_%d");
}
iVar6 = param_1[1];
*(long *)(*(long *)(param_1 + 4) + (long)iVar6 * 8) = param_2;
param_1[1] = iVar6 + 1;
}
}
return;
}
|
|
4,082 | ggml_visit_parents | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
// check if already visited
if (ggml_hash_insert(&cgraph->visited_hash_set, node) == GGML_HASHSET_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && !(node->flags & GGML_TENSOR_FLAG_PARAM)) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
cgraph->n_nodes++;
}
} | O2 | c | ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x30, %rdi
callq 0x28385
cmpq $-0x2, %rax
je 0x2976b
xorl %ebp, %ebp
pushq $0x9
popq %r15
cmpl $0xa, %ebp
je 0x296ea
movl 0x48(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0x98(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x296e3
movq %rbx, %rdi
callq 0x29692
incl %ebp
decl %r15d
jmp 0x296b8
cmpl $0x0, 0x50(%r14)
jne 0x29736
testb $0x4, 0x94(%r14)
jne 0x29736
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x29797
cmpb $0x0, 0x100(%r14)
jne 0x29724
leaq 0x273c4(%rip), %rsi # 0x50adb
movq %r14, %rdi
xorl %eax, %eax
callq 0x1f650
movl 0x8(%rbx), %edx
movq 0x28(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x8(%rbx)
jmp 0x2976b
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x29776
cmpb $0x0, 0x100(%r14)
jne 0x2975b
leaq 0x273b4(%rip), %rsi # 0x50b02
movq %r14, %rdi
xorl %eax, %eax
callq 0x1f650
movl 0x4(%rbx), %edx
movq 0x10(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24e06(%rip), %rdi # 0x4e583
leaq 0x24e51(%rip), %rdx # 0x4e5d5
leaq 0x27358(%rip), %rcx # 0x50ae3
movl $0x165f, %esi # imm = 0x165F
xorl %eax, %eax
callq 0x1f9b0
leaq 0x24de5(%rip), %rdi # 0x4e583
leaq 0x24e30(%rip), %rdx # 0x4e5d5
leaq 0x27310(%rip), %rcx # 0x50abc
movl $0x1656, %esi # imm = 0x1656
jmp 0x29790
| ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
add rdi, 30h ; '0'
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_2976B
xor ebp, ebp
push 9
pop r15
loc_296B8:
cmp ebp, 0Ah
jz short loc_296EA
mov eax, [rbx+48h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+98h]
test rsi, rsi
jz short loc_296E3
mov rdi, rbx
call ggml_visit_parents
loc_296E3:
inc ebp
dec r15d
jmp short loc_296B8
loc_296EA:
cmp dword ptr [r14+50h], 0
jnz short loc_29736
test byte ptr [r14+94h], 4
jnz short loc_29736
mov edx, [rbx+8]
cmp edx, [rbx]
jge loc_29797
cmp byte ptr [r14+100h], 0
jnz short loc_29724
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
mov edx, [rbx+8]
loc_29724:
mov rax, [rbx+28h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+8], ecx
jmp short loc_2976B
loc_29736:
mov edx, [rbx+4]
cmp edx, [rbx]
jge short loc_29776
cmp byte ptr [r14+100h], 0
jnz short loc_2975B
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
mov edx, [rbx+4]
loc_2975B:
mov rax, [rbx+10h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+4], ecx
loc_2976B:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_29776:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNNodesCg; "cgraph->n_nodes < cgraph->size"
mov esi, 165Fh
loc_29790:
xor eax, eax
call _ggml_abort
loc_29797:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNLeafsCg; "cgraph->n_leafs < cgraph->size"
mov esi, 1656h
jmp short loc_29790
| long long ggml_visit_parents(
long long a1,
unsigned long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10)
{
char v10; // al
long long result; // rax
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
unsigned int v16; // ebp
unsigned int v17; // r15d
int v18; // eax
long long v19; // rcx
int v20; // edx
int v21; // edx
const char *v22; // rcx
int v23; // esi
char v24; // [rsp-8h] [rbp-28h]
v24 = v10;
result = ggml_hash_insert((long long *)(a1 + 48), a2, a3, a4, a5, a6, a7, a8, a9, a10);
if ( result == -2 )
return result;
v16 = 0;
v17 = 9;
while ( v16 != 10 )
{
v18 = *(_DWORD *)(a1 + 72);
v19 = v16;
if ( v18 == 1 )
v19 = v17;
if ( !v18 )
v19 = v16;
if ( *(_QWORD *)(a2 + 8 * v19 + 152) )
ggml_visit_parents(a1);
++v16;
--v17;
}
if ( !*(_DWORD *)(a2 + 80) && (*(_BYTE *)(a2 + 148) & 4) == 0 )
{
v20 = *(_DWORD *)(a1 + 8);
if ( v20 < *(_DWORD *)a1 )
{
if ( !*(_BYTE *)(a2 + 256) )
{
ggml_format_name(a2, (long long)"leaf_%d");
v20 = *(_DWORD *)(a1 + 8);
}
result = *(_QWORD *)(a1 + 40);
*(_QWORD *)(result + 8LL * v20) = a2;
*(_DWORD *)(a1 + 8) = v20 + 1;
return result;
}
v22 = "cgraph->n_leafs < cgraph->size";
v23 = 5718;
LABEL_23:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v23,
(long long)"GGML_ASSERT(%s) failed",
(long long)v22,
v12,
v13,
a3,
a4,
a5,
a6,
v14,
v15,
a9,
a10,
v24);
}
v21 = *(_DWORD *)(a1 + 4);
if ( v21 >= *(_DWORD *)a1 )
{
v22 = "cgraph->n_nodes < cgraph->size";
v23 = 5727;
goto LABEL_23;
}
if ( !*(_BYTE *)(a2 + 256) )
{
ggml_format_name(a2, (long long)"node_%d");
v21 = *(_DWORD *)(a1 + 4);
}
result = *(_QWORD *)(a1 + 16);
*(_QWORD *)(result + 8LL * v21) = a2;
*(_DWORD *)(a1 + 4) = v21 + 1;
return result;
}
| ggml_visit_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x30
CALL 0x00128385
CMP RAX,-0x2
JZ 0x0012976b
XOR EBP,EBP
PUSH 0x9
POP R15
LAB_001296b8:
CMP EBP,0xa
JZ 0x001296ea
MOV EAX,dword ptr [RBX + 0x48]
CMP EAX,0x1
MOV ECX,EBP
CMOVZ ECX,R15D
TEST EAX,EAX
CMOVZ ECX,EBP
MOV RSI,qword ptr [R14 + RCX*0x8 + 0x98]
TEST RSI,RSI
JZ 0x001296e3
MOV RDI,RBX
CALL 0x00129692
LAB_001296e3:
INC EBP
DEC R15D
JMP 0x001296b8
LAB_001296ea:
CMP dword ptr [R14 + 0x50],0x0
JNZ 0x00129736
TEST byte ptr [R14 + 0x94],0x4
JNZ 0x00129736
MOV EDX,dword ptr [RBX + 0x8]
CMP EDX,dword ptr [RBX]
JGE 0x00129797
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x00129724
LEA RSI,[0x150adb]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011f650
MOV EDX,dword ptr [RBX + 0x8]
LAB_00129724:
MOV RAX,qword ptr [RBX + 0x28]
MOVSXD RCX,EDX
MOV qword ptr [RAX + RCX*0x8],R14
INC ECX
MOV dword ptr [RBX + 0x8],ECX
JMP 0x0012976b
LAB_00129736:
MOV EDX,dword ptr [RBX + 0x4]
CMP EDX,dword ptr [RBX]
JGE 0x00129776
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x0012975b
LEA RSI,[0x150b02]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011f650
MOV EDX,dword ptr [RBX + 0x4]
LAB_0012975b:
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,EDX
MOV qword ptr [RAX + RCX*0x8],R14
INC ECX
MOV dword ptr [RBX + 0x4],ECX
LAB_0012976b:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00129776:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x150ae3]
MOV ESI,0x165f
LAB_00129790:
XOR EAX,EAX
CALL 0x0011f9b0
LAB_00129797:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x150abc]
MOV ESI,0x1656
JMP 0x00129790
|
void ggml_visit_parents(int *param_1,long param_2)
{
long lVar1;
ulong uVar2;
char *pcVar3;
int iVar4;
uint uVar5;
int8 uVar6;
ulong uVar7;
lVar1 = ggml_hash_insert(param_1 + 0xc);
if (lVar1 != -2) {
uVar7 = 9;
for (uVar5 = 0; uVar5 != 10; uVar5 = uVar5 + 1) {
uVar2 = (ulong)uVar5;
if (param_1[0x12] == 1) {
uVar2 = uVar7;
}
if (param_1[0x12] == 0) {
uVar2 = (ulong)uVar5;
}
if (*(long *)(param_2 + 0x98 + uVar2 * 8) != 0) {
ggml_visit_parents(param_1);
}
uVar7 = (ulong)((int)uVar7 - 1);
}
if ((*(int *)(param_2 + 0x50) == 0) && ((*(byte *)(param_2 + 0x94) & 4) == 0)) {
iVar4 = param_1[2];
if (*param_1 <= iVar4) {
pcVar3 = "cgraph->n_leafs < cgraph->size";
uVar6 = 0x1656;
LAB_00129790:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,uVar6,"GGML_ASSERT(%s) failed",pcVar3);
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"leaf_%d");
iVar4 = param_1[2];
}
*(long *)(*(long *)(param_1 + 10) + (long)iVar4 * 8) = param_2;
param_1[2] = iVar4 + 1;
}
else {
iVar4 = param_1[1];
if (*param_1 <= iVar4) {
pcVar3 = "cgraph->n_nodes < cgraph->size";
uVar6 = 0x165f;
goto LAB_00129790;
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"node_%d");
iVar4 = param_1[1];
}
*(long *)(*(long *)(param_1 + 4) + (long)iVar4 * 8) = param_2;
param_1[1] = iVar4 + 1;
}
}
return;
}
|
|
4,083 | ggml_visit_parents | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
// check if already visited
if (ggml_hash_insert(&cgraph->visited_hash_set, node) == GGML_HASHSET_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && !(node->flags & GGML_TENSOR_FLAG_PARAM)) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
cgraph->n_nodes++;
}
} | O3 | c | ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x30, %rdi
callq 0x225e5
cmpq $-0x2, %rax
je 0x23a36
xorl %ebp, %ebp
movl $0x9, %r15d
movl 0x48(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0x98(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x239ad
movq %rbx, %rdi
callq 0x2395f
incl %ebp
addl $-0x1, %r15d
jb 0x23987
cmpl $0x0, 0x50(%r14)
jne 0x23a01
testb $0x4, 0x94(%r14)
jne 0x23a01
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x23a62
cmpb $0x0, 0x100(%r14)
jne 0x239ef
leaq 0x2b189(%rip), %rsi # 0x4eb6b
movq %r14, %rdi
xorl %eax, %eax
callq 0x17a60
movl 0x8(%rbx), %edx
movq 0x28(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x8(%rbx)
jmp 0x23a36
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x23a41
cmpb $0x0, 0x100(%r14)
jne 0x23a26
leaq 0x2b179(%rip), %rsi # 0x4eb92
movq %r14, %rdi
xorl %eax, %eax
callq 0x17a60
movl 0x4(%rbx), %edx
movq 0x10(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28bcb(%rip), %rdi # 0x4c613
leaq 0x28c16(%rip), %rdx # 0x4c665
leaq 0x2b11d(%rip), %rcx # 0x4eb73
movl $0x165f, %esi # imm = 0x165F
xorl %eax, %eax
callq 0x17cd0
leaq 0x28baa(%rip), %rdi # 0x4c613
leaq 0x28bf5(%rip), %rdx # 0x4c665
leaq 0x2b0d5(%rip), %rcx # 0x4eb4c
movl $0x1656, %esi # imm = 0x1656
jmp 0x23a5b
| ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
add rdi, 30h ; '0'
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_23A36
xor ebp, ebp
mov r15d, 9
loc_23987:
mov eax, [rbx+48h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+98h]
test rsi, rsi
jz short loc_239AD
mov rdi, rbx
call ggml_visit_parents
loc_239AD:
inc ebp
add r15d, 0FFFFFFFFh
jb short loc_23987
cmp dword ptr [r14+50h], 0
jnz short loc_23A01
test byte ptr [r14+94h], 4
jnz short loc_23A01
mov edx, [rbx+8]
cmp edx, [rbx]
jge loc_23A62
cmp byte ptr [r14+100h], 0
jnz short loc_239EF
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
mov edx, [rbx+8]
loc_239EF:
mov rax, [rbx+28h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+8], ecx
jmp short loc_23A36
loc_23A01:
mov edx, [rbx+4]
cmp edx, [rbx]
jge short loc_23A41
cmp byte ptr [r14+100h], 0
jnz short loc_23A26
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call _ggml_format_name
mov edx, [rbx+4]
loc_23A26:
mov rax, [rbx+10h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+4], ecx
loc_23A36:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_23A41:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNNodesCg; "cgraph->n_nodes < cgraph->size"
mov esi, 165Fh
loc_23A5B:
xor eax, eax
call _ggml_abort
loc_23A62:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNLeafsCg; "cgraph->n_leafs < cgraph->size"
mov esi, 1656h
jmp short loc_23A5B
| long long ggml_visit_parents(long long a1, unsigned long long a2)
{
long long result; // rax
int v3; // r8d
int v4; // r9d
unsigned int v5; // ebp
unsigned int v6; // r15d
int v7; // eax
long long v8; // rcx
int v10; // edx
int v11; // edx
const char *v12; // rcx
int v13; // esi
result = ggml_hash_insert((long long *)(a1 + 48), a2);
if ( result == -2 )
return result;
v5 = 0;
v6 = 9;
do
{
v7 = *(_DWORD *)(a1 + 72);
v8 = v5;
if ( v7 == 1 )
v8 = v6;
if ( !v7 )
v8 = v5;
if ( *(_QWORD *)(a2 + 8 * v8 + 152) )
ggml_visit_parents(a1);
++v5;
}
while ( v6-- != 0 );
if ( !*(_DWORD *)(a2 + 80) && (*(_BYTE *)(a2 + 148) & 4) == 0 )
{
v10 = *(_DWORD *)(a1 + 8);
if ( v10 < *(_DWORD *)a1 )
{
if ( !*(_BYTE *)(a2 + 256) )
{
ggml_format_name(a2, (long long)"leaf_%d");
v10 = *(_DWORD *)(a1 + 8);
}
result = *(_QWORD *)(a1 + 40);
*(_QWORD *)(result + 8LL * v10) = a2;
*(_DWORD *)(a1 + 8) = v10 + 1;
return result;
}
v12 = "cgraph->n_leafs < cgraph->size";
v13 = 5718;
LABEL_22:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v13,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v12,
v3,
v4);
}
v11 = *(_DWORD *)(a1 + 4);
if ( v11 >= *(_DWORD *)a1 )
{
v12 = "cgraph->n_nodes < cgraph->size";
v13 = 5727;
goto LABEL_22;
}
if ( !*(_BYTE *)(a2 + 256) )
{
ggml_format_name(a2, (long long)"node_%d");
v11 = *(_DWORD *)(a1 + 4);
}
result = *(_QWORD *)(a1 + 16);
*(_QWORD *)(result + 8LL * v11) = a2;
*(_DWORD *)(a1 + 4) = v11 + 1;
return result;
}
| ggml_visit_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x30
CALL 0x001225e5
CMP RAX,-0x2
JZ 0x00123a36
XOR EBP,EBP
MOV R15D,0x9
LAB_00123987:
MOV EAX,dword ptr [RBX + 0x48]
CMP EAX,0x1
MOV ECX,EBP
CMOVZ ECX,R15D
TEST EAX,EAX
CMOVZ ECX,EBP
MOV RSI,qword ptr [R14 + RCX*0x8 + 0x98]
TEST RSI,RSI
JZ 0x001239ad
MOV RDI,RBX
CALL 0x0012395f
LAB_001239ad:
INC EBP
ADD R15D,-0x1
JC 0x00123987
CMP dword ptr [R14 + 0x50],0x0
JNZ 0x00123a01
TEST byte ptr [R14 + 0x94],0x4
JNZ 0x00123a01
MOV EDX,dword ptr [RBX + 0x8]
CMP EDX,dword ptr [RBX]
JGE 0x00123a62
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x001239ef
LEA RSI,[0x14eb6b]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00117a60
MOV EDX,dword ptr [RBX + 0x8]
LAB_001239ef:
MOV RAX,qword ptr [RBX + 0x28]
MOVSXD RCX,EDX
MOV qword ptr [RAX + RCX*0x8],R14
INC ECX
MOV dword ptr [RBX + 0x8],ECX
JMP 0x00123a36
LAB_00123a01:
MOV EDX,dword ptr [RBX + 0x4]
CMP EDX,dword ptr [RBX]
JGE 0x00123a41
CMP byte ptr [R14 + 0x100],0x0
JNZ 0x00123a26
LEA RSI,[0x14eb92]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00117a60
MOV EDX,dword ptr [RBX + 0x4]
LAB_00123a26:
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,EDX
MOV qword ptr [RAX + RCX*0x8],R14
INC ECX
MOV dword ptr [RBX + 0x4],ECX
LAB_00123a36:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00123a41:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14eb73]
MOV ESI,0x165f
LAB_00123a5b:
XOR EAX,EAX
CALL 0x00117cd0
LAB_00123a62:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14eb4c]
MOV ESI,0x1656
JMP 0x00123a5b
|
void ggml_visit_parents(int *param_1,long param_2)
{
long lVar1;
ulong uVar2;
char *pcVar3;
uint uVar4;
int8 uVar5;
int iVar6;
ulong uVar7;
lVar1 = ggml_hash_insert(param_1 + 0xc);
if (lVar1 != -2) {
uVar4 = 0;
uVar7 = 9;
do {
iVar6 = (int)uVar7;
uVar2 = (ulong)uVar4;
if (param_1[0x12] == 1) {
uVar2 = uVar7;
}
if (param_1[0x12] == 0) {
uVar2 = (ulong)uVar4;
}
if (*(long *)(param_2 + 0x98 + uVar2 * 8) != 0) {
ggml_visit_parents(param_1);
}
uVar4 = uVar4 + 1;
uVar7 = (ulong)(iVar6 - 1);
} while (iVar6 != 0);
if ((*(int *)(param_2 + 0x50) == 0) && ((*(byte *)(param_2 + 0x94) & 4) == 0)) {
iVar6 = param_1[2];
if (*param_1 <= iVar6) {
pcVar3 = "cgraph->n_leafs < cgraph->size";
uVar5 = 0x1656;
LAB_00123a5b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,uVar5,"GGML_ASSERT(%s) failed",pcVar3);
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"leaf_%d");
iVar6 = param_1[2];
}
*(long *)(*(long *)(param_1 + 10) + (long)iVar6 * 8) = param_2;
param_1[2] = iVar6 + 1;
}
else {
iVar6 = param_1[1];
if (*param_1 <= iVar6) {
pcVar3 = "cgraph->n_nodes < cgraph->size";
uVar5 = 0x165f;
goto LAB_00123a5b;
}
if (*(char *)(param_2 + 0x100) == '\0') {
ggml_format_name(param_2,"node_%d");
iVar6 = param_1[1];
}
*(long *)(*(long *)(param_1 + 4) + (long)iVar6 * 8) = param_2;
param_1[1] = iVar6 + 1;
}
}
return;
}
|
|
4,084 | partition_float | davidesantangelo[P]vsort/vsort.c | static int partition_float(float arr[], int low, int high)
{
int mid = low + (high - low) / 2;
// Sort low, mid, high to find median
if (arr[low] > arr[mid])
swap_float(&arr[low], &arr[mid]);
if (arr[mid] > arr[high])
swap_float(&arr[mid], &arr[high]);
if (arr[low] > arr[mid])
swap_float(&arr[low], &arr[mid]);
// Median is now at mid, swap it to the end (high) to use as pivot
swap_float(&arr[mid], &arr[high]);
float pivot = arr[high];
int i = low - 1; // Index of smaller element
for (int j = low; j < high; j++)
{
if (arr[j] <= pivot)
{ // Handle NaN comparisons carefully if required
i++;
if (i != j)
swap_float(&arr[i], &arr[j]);
}
}
swap_float(&arr[i + 1], &arr[high]); // Place pivot in correct spot
return i + 1; // Return pivot index
} | O0 | c | partition_float:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x18(%rsp), %eax
subl 0x1c(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x4(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movq 0x20(%rsp), %rax
movslq 0x14(%rsp), %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x413b
movq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x14(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
movq 0x20(%rsp), %rax
movslq 0x14(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movq 0x20(%rsp), %rax
movslq 0x18(%rsp), %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x4181
movq 0x20(%rsp), %rdi
movslq 0x14(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x18(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movq 0x20(%rsp), %rax
movslq 0x14(%rsp), %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x41c7
movq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x14(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
movq 0x20(%rsp), %rdi
movslq 0x14(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x18(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
movq 0x20(%rsp), %rax
movslq 0x18(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x10(%rsp)
movl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0x4287
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movss (%rax,%rcx,4), %xmm1
movss 0x10(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x4278
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
je 0x4276
movq 0x20(%rsp), %rdi
movslq 0xc(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x8(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
jmp 0x4278
jmp 0x427a
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4216
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x18(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x42c0
movl 0xc(%rsp), %eax
addl $0x1, %eax
addq $0x28, %rsp
retq
nop
| partition_float:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov [rsp+28h+var_10], edx
mov eax, [rsp+28h+var_C]
mov [rsp+28h+var_24], eax
mov eax, [rsp+28h+var_10]
sub eax, [rsp+28h+var_C]
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov eax, [rsp+28h+var_24]
add eax, ecx
mov [rsp+28h+var_14], eax
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_C]
movss xmm0, dword ptr [rax+rcx*4]
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_14]
ucomiss xmm0, dword ptr [rax+rcx*4]
jbe short loc_413B
mov rdi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_C]
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_14]
shl rax, 2
add rsi, rax
call swap_float
loc_413B:
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_14]
movss xmm0, dword ptr [rax+rcx*4]
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_10]
ucomiss xmm0, dword ptr [rax+rcx*4]
jbe short loc_4181
mov rdi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_14]
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_10]
shl rax, 2
add rsi, rax
call swap_float
loc_4181:
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_C]
movss xmm0, dword ptr [rax+rcx*4]
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_14]
ucomiss xmm0, dword ptr [rax+rcx*4]
jbe short loc_41C7
mov rdi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_C]
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_14]
shl rax, 2
add rsi, rax
call swap_float
loc_41C7:
mov rdi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_14]
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_10]
shl rax, 2
add rsi, rax
call swap_float
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_10]
movss xmm0, dword ptr [rax+rcx*4]
movss [rsp+28h+var_18], xmm0
mov eax, [rsp+28h+var_C]
sub eax, 1
mov [rsp+28h+var_1C], eax
mov eax, [rsp+28h+var_C]
mov [rsp+28h+var_20], eax
loc_4216:
mov eax, [rsp+28h+var_20]
cmp eax, [rsp+28h+var_10]
jge short loc_4287
mov rax, [rsp+28h+var_8]
movsxd rcx, [rsp+28h+var_20]
movss xmm1, dword ptr [rax+rcx*4]
movss xmm0, [rsp+28h+var_18]
ucomiss xmm0, xmm1
jb short loc_4278
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
mov eax, [rsp+28h+var_1C]
cmp eax, [rsp+28h+var_20]
jz short loc_4276
mov rdi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_1C]
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_20]
shl rax, 2
add rsi, rax
call swap_float
loc_4276:
jmp short $+2
loc_4278:
jmp short $+2
loc_427A:
mov eax, [rsp+28h+var_20]
add eax, 1
mov [rsp+28h+var_20], eax
jmp short loc_4216
loc_4287:
mov rdi, [rsp+28h+var_8]
mov eax, [rsp+28h+var_1C]
add eax, 1
cdqe
shl rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_8]
movsxd rax, [rsp+28h+var_10]
shl rax, 2
add rsi, rax
call swap_float
mov eax, [rsp+28h+var_1C]
add eax, 1
add rsp, 28h
retn
| long long partition_float(long long a1, int a2, int a3)
{
unsigned int v3; // kr00_4
int v4; // eax
long long v5; // rdx
long long v6; // rdx
int i; // [rsp+8h] [rbp-20h]
int v9; // [rsp+Ch] [rbp-1Ch]
float v10; // [rsp+10h] [rbp-18h]
int v11; // [rsp+14h] [rbp-14h]
v3 = a3 - a2;
v5 = (unsigned int)((a3 - a2) >> 31);
v4 = __SPAIR64__(v5, v3) / 2;
LODWORD(v5) = __SPAIR64__(v5, v3) % 2;
v11 = v4 + a2;
if ( *(float *)(a1 + 4LL * a2) > *(float *)(a1 + 4LL * (v4 + a2)) )
swap_float(4LL * a2 + a1, 4LL * v11 + a1, v5);
if ( *(float *)(a1 + 4LL * v11) > *(float *)(a1 + 4LL * a3) )
swap_float(4LL * v11 + a1, 4LL * a3 + a1, v5);
if ( *(float *)(a1 + 4LL * a2) > *(float *)(a1 + 4LL * v11) )
swap_float(4LL * a2 + a1, 4LL * v11 + a1, v5);
swap_float(4LL * v11 + a1, 4LL * a3 + a1, v5);
v10 = *(float *)(a1 + 4LL * a3);
v9 = a2 - 1;
for ( i = a2; i < a3; ++i )
{
if ( v10 >= *(float *)(a1 + 4LL * i) && ++v9 != i )
swap_float(4LL * v9 + a1, 4LL * i + a1, v6);
}
swap_float(4LL * (v9 + 1) + a1, 4LL * a3 + a1, v6);
return (unsigned int)(v9 + 1);
}
| partition_float:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],EDX
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,dword ptr [RSP + 0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,ECX
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x1c]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x14]
UCOMISS XMM0,dword ptr [RAX + RCX*0x4]
JBE 0x0010413b
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x1c]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x14]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
LAB_0010413b:
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x18]
UCOMISS XMM0,dword ptr [RAX + RCX*0x4]
JBE 0x00104181
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x14]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x18]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
LAB_00104181:
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x1c]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x14]
UCOMISS XMM0,dword ptr [RAX + RCX*0x4]
JBE 0x001041c7
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x1c]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x14]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
LAB_001041c7:
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x14]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x18]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x18]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RSP + 0x10],XMM0
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x8],EAX
LAB_00104216:
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,dword ptr [RSP + 0x18]
JGE 0x00104287
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RAX + RCX*0x4]
MOVSS XMM0,dword ptr [RSP + 0x10]
UCOMISS XMM0,XMM1
JC 0x00104278
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x8]
JZ 0x00104276
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0xc]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x8]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
LAB_00104276:
JMP 0x00104278
LAB_00104278:
JMP 0x0010427a
LAB_0010427a:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00104216
LAB_00104287:
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
CDQE
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x18]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001042c0
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
ADD RSP,0x28
RET
|
int partition_float(long param_1,int param_2,int param_3)
{
float *pfVar1;
float fVar2;
int iVar3;
ulong uVar4;
ulong extraout_RDX;
ulong extraout_RDX_00;
ulong extraout_RDX_01;
int local_20;
int local_1c;
uVar4 = (long)(param_3 - param_2) % 2 & 0xffffffff;
iVar3 = param_2 + (param_3 - param_2) / 2;
fVar2 = *(float *)(param_1 + (long)param_2 * 4);
pfVar1 = (float *)(param_1 + (long)iVar3 * 4);
if (*pfVar1 <= fVar2 && fVar2 != *pfVar1) {
swap_float(param_1 + (long)param_2 * 4,param_1 + (long)iVar3 * 4,uVar4);
uVar4 = extraout_RDX;
}
fVar2 = *(float *)(param_1 + (long)iVar3 * 4);
pfVar1 = (float *)(param_1 + (long)param_3 * 4);
if (*pfVar1 <= fVar2 && fVar2 != *pfVar1) {
swap_float(param_1 + (long)iVar3 * 4,param_1 + (long)param_3 * 4,uVar4);
uVar4 = extraout_RDX_00;
}
fVar2 = *(float *)(param_1 + (long)param_2 * 4);
pfVar1 = (float *)(param_1 + (long)iVar3 * 4);
if (*pfVar1 <= fVar2 && fVar2 != *pfVar1) {
swap_float(param_1 + (long)param_2 * 4,param_1 + (long)iVar3 * 4,uVar4);
uVar4 = extraout_RDX_01;
}
swap_float(param_1 + (long)iVar3 * 4,param_1 + (long)param_3 * 4,uVar4);
fVar2 = *(float *)(param_1 + (long)param_3 * 4);
local_1c = param_2 + -1;
for (local_20 = param_2; local_20 < param_3; local_20 = local_20 + 1) {
if ((*(float *)(param_1 + (long)local_20 * 4) <= fVar2) &&
(local_1c = local_1c + 1, local_1c != local_20)) {
swap_float(param_1 + (long)local_1c * 4,param_1 + (long)local_20 * 4);
}
}
swap_float(param_1 + (long)(local_1c + 1) * 4,param_1 + (long)param_3 * 4);
return local_1c + 1;
}
|
|
4,085 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
const format_specs<Char>& specs) -> OutputIt {
auto data = s.data();
auto size = s.size();
if (specs.precision >= 0 && to_unsigned(specs.precision) < size)
size = code_point_index(s, to_unsigned(specs.precision));
bool is_debug = specs.type == presentation_type::debug;
size_t width = 0;
if (specs.width != 0) {
if (is_debug)
width = write_escaped_string(counting_iterator{}, s).count();
else
width = compute_width(basic_string_view<Char>(data, size));
}
return write_padded(out, specs, size, width,
[=](reserve_iterator<OutputIt> it) {
if (is_debug) return write_escaped_string(it, s);
return copy_str<Char>(data, data + size, it);
});
} | O3 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movslq 0x4(%rcx), %rax
movq %rdx, %r13
testq %rax, %rax
js 0x32e58
movq %r12, %r13
cmpq %r12, %rax
jae 0x32e58
leaq 0x50(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x48(%rsp), %r13
movq %r12, (%r13)
movq %r15, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %r13, 0x30(%rsp)
movq %r13, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x33011
movq (%r13), %r13
movb 0x8(%rbx), %bpl
cmpl $0x0, (%rbx)
je 0x32e79
cmpb $0x12, %bpl
jne 0x32e7d
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x32ed6
movq %rax, %rcx
jmp 0x32e9c
xorl %ecx, %ecx
jmp 0x32e9c
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3365b
leaq 0x20(%rsp), %rax
movq (%rax), %rcx
cmpb $0x12, %bpl
leaq 0x20(%rsp), %r8
sete (%r8)
movq %r15, 0x8(%r8)
movq %r12, 0x10(%r8)
movq %r15, 0x18(%r8)
movq %r13, 0x20(%r8)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x32f67
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS6_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rcx
mov r12, rdx
mov r15, rsi
mov r14, rdi
movsxd rax, dword ptr [rcx+4]
mov r13, rdx
test rax, rax
js short loc_32E58
mov r13, r12
cmp rax, r12
jnb short loc_32E58
lea rcx, [rsp+88h+var_38]
mov [rcx], rax
lea r13, [rsp+88h+var_40]
mov [r13+0], r12
mov qword ptr [rsp+88h+var_68], r15
mov qword ptr [rsp+88h+var_68+8], rcx
mov [rsp+88h+var_58], r13
mov [rsp+88h+var_78], r13
movups xmm0, [rsp+88h+var_68]
movups [rsp+88h+var_88], xmm0
mov rdi, r15
mov rsi, r12
call _ZN3fmt3v106detail18for_each_codepointIZNS1_16code_point_indexENS0_17basic_string_viewIcEEmEUljS4_E_EEvS4_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,ulong)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,ulong)::{lambda(uint,fmt::v10::basic_string_view<char>)#1})
mov r13, [r13+0]
loc_32E58:
mov bpl, [rbx+8]
cmp dword ptr [rbx], 0
jz short loc_32E79
cmp bpl, 12h
jnz short loc_32E7D
xor edi, edi
mov rsi, r15
mov rdx, r12
call _ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE; fmt::v10::detail::write_escaped_string<char,fmt::v10::detail::counting_iterator>(fmt::v10::detail::counting_iterator,fmt::v10::basic_string_view<char>)
mov rcx, rax
jmp short loc_32E9C
loc_32E79:
xor ecx, ecx
jmp short loc_32E9C
loc_32E7D:
lea rdx, [rsp+88h+var_68]
mov qword ptr [rdx], 0
mov rdi, r15
mov rsi, r13
call _ZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)
lea rax, [rsp+88h+var_68]
mov rcx, [rax]
loc_32E9C:
cmp bpl, 12h
lea r8, [rsp+88h+var_68]
setz byte ptr [r8]
mov [r8+8], r15
mov [r8+10h], r12
mov [r8+18h], r15
mov [r8+20h], r13
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender,fmt::v10::format_specs<char> const&,ulong,ulong,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &&)
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long fmt::v10::detail::write<char,fmt::v10::appender>(
long long a1,
long long a2,
_QWORD *a3,
long long a4,
int a5,
int a6)
{
long long v8; // rax
_QWORD *v9; // r13
char v10; // bp
long long v11; // rcx
long long v13; // [rsp+20h] [rbp-68h] BYREF
_QWORD *v14; // [rsp+28h] [rbp-60h]
_QWORD *v15; // [rsp+30h] [rbp-58h]
long long v16; // [rsp+38h] [rbp-50h]
_QWORD *v17; // [rsp+40h] [rbp-48h]
_QWORD *v18; // [rsp+48h] [rbp-40h] BYREF
_QWORD v19[7]; // [rsp+50h] [rbp-38h] BYREF
v8 = *(int *)(a4 + 4);
v9 = a3;
if ( v8 >= 0 )
{
v9 = a3;
if ( v8 < (unsigned long long)a3 )
{
v19[0] = *(int *)(a4 + 4);
v18 = a3;
v13 = a2;
v14 = v19;
v15 = &v18;
fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned long)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>(
a2,
(_DWORD)a3,
(_DWORD)a3,
(unsigned int)v19,
a5,
a6,
a2,
(long long)v19,
(long long)&v18);
v9 = v18;
}
}
v10 = *(_BYTE *)(a4 + 8);
if ( *(_DWORD *)a4 )
{
if ( v10 == 18 )
{
v11 = fmt::v10::detail::write_escaped_string<char,fmt::v10::detail::counting_iterator>(0LL, a2, a3);
}
else
{
v13 = 0LL;
fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(
a2,
v9,
&v13);
v11 = v13;
}
}
else
{
v11 = 0LL;
}
LOBYTE(v13) = v10 == 18;
v14 = (_QWORD *)a2;
v15 = a3;
v16 = a2;
v17 = v9;
return fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(
a1,
a4,
v9,
v11);
}
| write<char,fmt::v10::appender>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RCX
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOVSXD RAX,dword ptr [RCX + 0x4]
MOV R13,RDX
TEST RAX,RAX
JS 0x00132e58
MOV R13,R12
CMP RAX,R12
JNC 0x00132e58
LEA RCX,[RSP + 0x50]
MOV qword ptr [RCX],RAX
LEA R13,[RSP + 0x48]
MOV qword ptr [R13],R12
MOV qword ptr [RSP + 0x20],R15
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x30],R13
MOV qword ptr [RSP + 0x10],R13
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R12
CALL 0x00133011
MOV R13,qword ptr [R13]
LAB_00132e58:
MOV BPL,byte ptr [RBX + 0x8]
CMP dword ptr [RBX],0x0
JZ 0x00132e79
CMP BPL,0x12
JNZ 0x00132e7d
XOR EDI,EDI
MOV RSI,R15
MOV RDX,R12
CALL 0x00132ed6
MOV RCX,RAX
JMP 0x00132e9c
LAB_00132e79:
XOR ECX,ECX
JMP 0x00132e9c
LAB_00132e7d:
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],0x0
MOV RDI,R15
MOV RSI,R13
CALL 0x0013365b
LEA RAX,[RSP + 0x20]
MOV RCX,qword ptr [RAX]
LAB_00132e9c:
CMP BPL,0x12
LEA R8,[RSP + 0x20]
SETZ byte ptr [R8]
MOV qword ptr [R8 + 0x8],R15
MOV qword ptr [R8 + 0x10],R12
MOV qword ptr [R8 + 0x18],R15
MOV qword ptr [R8 + 0x20],R13
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x00132f67
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender,
fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&) */
void __thiscall
fmt::v10::detail::write<char,fmt::v10::appender>
(detail *this,detail *param_2,ulong param_3,int *param_4)
{
int8 uVar1;
if ((-1 < (long)param_4[1]) && ((ulong)(long)param_4[1] < param_3)) {
for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned_long)::_lambda(unsigned_int,fmt::v10::basic_string_view<char>)_1_>
(param_2,param_3);
}
if (*param_4 == 0) {
uVar1 = 0;
}
else if ((char)param_4[2] == '\x12') {
uVar1 = write_escaped_string<char,fmt::v10::detail::counting_iterator>
((detail *)0x0,param_2,param_3);
}
else {
for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>
(param_2,param_3);
uVar1 = 0;
}
write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_>
(this,param_4,param_3,uVar1);
return;
}
|
|
4,086 | mysql_derived_create(THD*, LEX*, TABLE_LIST*) | eloqsql/sql/sql_derived.cc | static
bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_create");
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
(derived->alias.str ? derived->alias.str : "<NULL>"),
derived->get_unit()));
TABLE *table= derived->table;
SELECT_LEX_UNIT *unit= derived->get_unit();
if (table->is_created())
DBUG_RETURN(FALSE);
select_unit *result= derived->derived_result;
if (table->s->db_type() == TMP_ENGINE_HTON)
{
result->tmp_table_param.keyinfo= table->s->key_info;
if (create_internal_tmp_table(table, result->tmp_table_param.keyinfo,
result->tmp_table_param.start_recinfo,
&result->tmp_table_param.recinfo,
(unit->first_select()->options |
thd->variables.option_bits | TMP_TABLE_ALL_COLUMNS)))
DBUG_RETURN(TRUE);
}
if (open_tmp_table(table))
DBUG_RETURN(TRUE);
table->file->extra(HA_EXTRA_WRITE_CACHE);
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
DBUG_RETURN(FALSE);
} | O0 | cpp | mysql_derived_create(THD*, LEX*, TABLE_LIST*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x8a8066
movq -0x20(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa16070
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x8a9b20
testb $0x1, %al
jne 0x8a8091
jmp 0x8a809c
jmp 0x8a8093
movb $0x0, -0x1(%rbp)
jmp 0x8a81a1
movq -0x20(%rbp), %rax
movq 0x110(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x86f400
leaq 0x1459d62(%rip), %rcx # 0x1d01e20
cmpq (%rcx), %rax
jne 0x8a815a
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq 0x1c8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq $0x38, %rax
addq $0x48, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x7fb3e0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq 0x38(%rax), %r8
movq -0x10(%rbp), %rax
orq 0x8a8(%rax), %r8
orq $0x1000, %r8 # imm = 0x1000
callq 0x968420
testb $0x1, %al
jne 0x8a8150
jmp 0x8a8158
jmp 0x8a8152
movb $0x1, -0x1(%rbp)
jmp 0x8a81a1
jmp 0x8a815a
movq -0x28(%rbp), %rdi
callq 0x968350
testb $0x1, %al
jne 0x8a8169
jmp 0x8a8171
jmp 0x8a816b
movb $0x1, -0x1(%rbp)
jmp 0x8a81a1
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movl $0xe, %esi
callq *0x298(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movl $0x19, %esi
callq *0x298(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL20mysql_derived_createP3THDP3LEXP10TABLE_LIST:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_8A8066:
mov rax, [rbp+var_20]
mov rax, [rax+100h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]; this
call _ZN10TABLE_LIST8get_unitEv; TABLE_LIST::get_unit(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_28]; this
call _ZNK5TABLE10is_createdEv; TABLE::is_created(void)
test al, 1
jnz short loc_8A8091
jmp short loc_8A809C
loc_8A8091:
jmp short $+2
loc_8A8093:
mov [rbp+var_1], 0
jmp loc_8A81A1
loc_8A809C:
mov rax, [rbp+var_20]
mov rax, [rax+110h]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rdi, [rax]; this
call _ZNK11TABLE_SHARE7db_typeEv; TABLE_SHARE::db_type(void)
lea rcx, maria_hton
cmp rax, [rcx]
jnz loc_8A815A
mov rax, [rbp+var_28]
mov rax, [rax]
mov rcx, [rax+1C8h]
mov rax, [rbp+var_38]
mov [rax+90h], rcx
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov rax, [rax+90h]
mov [rbp+var_50], rax
mov rax, [rbp+var_38]
mov rax, [rax+88h]
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
add rax, 38h ; '8'
add rax, 48h ; 'H'
mov [rbp+var_40], rax
mov rdi, [rbp+var_30]; this
call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_40]
mov r8, [rax+38h]
mov rax, [rbp+var_10]
or r8, [rax+8A8h]
or r8, 1000h
call _Z25create_internal_tmp_tableP5TABLEP6st_keyP18st_maria_columndefPS4_y; create_internal_tmp_table(TABLE *,st_key *,st_maria_columndef *,st_maria_columndef **,ulong long)
test al, 1
jnz short loc_8A8150
jmp short loc_8A8158
loc_8A8150:
jmp short $+2
loc_8A8152:
mov [rbp+var_1], 1
jmp short loc_8A81A1
loc_8A8158:
jmp short $+2
loc_8A815A:
mov rdi, [rbp+var_28]; TABLE *
call _Z14open_tmp_tableP5TABLE; open_tmp_table(TABLE *)
test al, 1
jnz short loc_8A8169
jmp short loc_8A8171
loc_8A8169:
jmp short $+2
loc_8A816B:
mov [rbp+var_1], 1
jmp short loc_8A81A1
loc_8A8171:
mov rax, [rbp+var_28]
mov rdi, [rax+8]
mov rax, [rdi]
mov esi, 0Eh
call qword ptr [rax+298h]
mov rax, [rbp+var_28]
mov rdi, [rax+8]
mov rax, [rdi]
mov esi, 19h
call qword ptr [rax+298h]
mov [rbp+var_1], 0
loc_8A81A1:
mov al, [rbp+var_1]
and al, 1
add rsp, 60h
pop rbp
retn
| char mysql_derived_create(THD *a1, LEX *a2, TABLE_LIST *a3)
{
long long select; // rax
long long v5; // [rsp+10h] [rbp-50h]
long long v6; // [rsp+18h] [rbp-48h]
long long v7; // [rsp+28h] [rbp-38h]
st_select_lex_unit *unit; // [rsp+30h] [rbp-30h]
TABLE *v9; // [rsp+38h] [rbp-28h]
v9 = (TABLE *)*((_QWORD *)a3 + 32);
unit = (st_select_lex_unit *)TABLE_LIST::get_unit(a3);
if ( (TABLE::is_created(v9) & 1) != 0 )
return 0;
v7 = *((_QWORD *)a3 + 34);
if ( TABLE_SHARE::db_type(*(TABLE_SHARE **)v9) == maria_hton )
{
*(_QWORD *)(v7 + 144) = *(_QWORD *)(*(_QWORD *)v9 + 456LL);
v5 = *(_QWORD *)(v7 + 144);
v6 = *(_QWORD *)(v7 + 136);
select = st_select_lex_unit::first_select(unit);
if ( (create_internal_tmp_table(v9, v5, v6, v7 + 128, *((_QWORD *)a1 + 277) | *(_QWORD *)(select + 56) | 0x1000LL) & 1) != 0 )
return 1;
}
if ( (open_tmp_table(v9) & 1) != 0 )
return 1;
(*(void ( **)(_QWORD, long long))(**((_QWORD **)v9 + 1) + 664LL))(*((_QWORD *)v9 + 1), 14LL);
(*(void ( **)(_QWORD, long long))(**((_QWORD **)v9 + 1) + 664LL))(*((_QWORD *)v9 + 1), 25LL);
return 0;
}
| __cxx_global_var_init:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x264a388]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x008db900
POP RBP
RET
|
void __cxx_global_var_init(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_CONV_NONE,0);
return;
}
|
|
4,087 | calculate_segment_checksum | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | uint32_t calculate_segment_checksum(segment_t *s) {
if (!s) return 0;
// Create a temporary structure with the fields we want to include in the checksum
struct {
int is_free;
int size;
uintptr_t next;
uintptr_t prev;
uint32_t allocation_id;
uint32_t magic;
} checksum_data;
// Fill the structure with segment data
checksum_data.is_free = s->is_free;
checksum_data.size = s->size;
checksum_data.next = (uintptr_t) (s->next);
checksum_data.prev = (uintptr_t) (s->prev);
checksum_data.allocation_id = s->allocation_id;
checksum_data.magic = s->magic;
return fnv1a_hash(&checksum_data, sizeof(checksum_data));
} | O1 | c | calculate_segment_checksum:
testq %rdi, %rdi
je 0x3c65
movl (%rdi), %eax
movl %eax, -0x20(%rsp)
movl 0x4(%rdi), %eax
movl %eax, -0x1c(%rsp)
movq 0x8(%rdi), %rax
movq %rax, -0x18(%rsp)
movq 0x10(%rdi), %rax
movq %rax, -0x10(%rsp)
movl 0x24(%rdi), %eax
movl %eax, -0x8(%rsp)
movl 0x28(%rdi), %eax
movl %eax, -0x4(%rsp)
movl $0x811c9dc5, %eax # imm = 0x811C9DC5
xorl %ecx, %ecx
movzbl -0x20(%rsp,%rcx), %edx
xorl %eax, %edx
imull $0x1000193, %edx, %eax # imm = 0x1000193
incq %rcx
cmpq $0x20, %rcx
jne 0x3c4e
retq
xorl %eax, %eax
retq
| calculate_segment_checksum:
test rdi, rdi
jz short loc_3C65
mov eax, [rdi]
mov [rsp+var_20], eax
mov eax, [rdi+4]
mov [rsp+var_1C], eax
mov rax, [rdi+8]
mov [rsp+var_18], rax
mov rax, [rdi+10h]
mov [rsp+var_10], rax
mov eax, [rdi+24h]
mov [rsp+var_8], eax
mov eax, [rdi+28h]
mov [rsp+var_4], eax
mov eax, 811C9DC5h
xor ecx, ecx
loc_3C4E:
movzx edx, byte ptr [rsp+rcx+var_20]
xor edx, eax
imul eax, edx, 1000193h
inc rcx
cmp rcx, 20h ; ' '
jnz short loc_3C4E
retn
loc_3C65:
xor eax, eax
retn
| long long calculate_segment_checksum(long long a1)
{
long long result; // rax
long long i; // rcx
_DWORD v3[2]; // [rsp+0h] [rbp-20h]
long long v4; // [rsp+8h] [rbp-18h]
long long v5; // [rsp+10h] [rbp-10h]
int v6; // [rsp+18h] [rbp-8h]
int v7; // [rsp+1Ch] [rbp-4h]
if ( !a1 )
return 0LL;
v3[0] = *(_DWORD *)a1;
v3[1] = *(_DWORD *)(a1 + 4);
v4 = *(_QWORD *)(a1 + 8);
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_DWORD *)(a1 + 36);
v7 = *(_DWORD *)(a1 + 40);
LODWORD(result) = -2128831035;
for ( i = 0LL; i != 32; ++i )
result = 16777619 * ((unsigned int)result ^ *((unsigned __int8 *)v3 + i));
return result;
}
| calculate_segment_checksum:
TEST RDI,RDI
JZ 0x00103c65
MOV EAX,dword ptr [RDI]
MOV dword ptr [RSP + -0x20],EAX
MOV EAX,dword ptr [RDI + 0x4]
MOV dword ptr [RSP + -0x1c],EAX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + -0x10],RAX
MOV EAX,dword ptr [RDI + 0x24]
MOV dword ptr [RSP + -0x8],EAX
MOV EAX,dword ptr [RDI + 0x28]
MOV dword ptr [RSP + -0x4],EAX
MOV EAX,0x811c9dc5
XOR ECX,ECX
LAB_00103c4e:
MOVZX EDX,byte ptr [RSP + RCX*0x1 + -0x20]
XOR EDX,EAX
IMUL EAX,EDX,0x1000193
INC RCX
CMP RCX,0x20
JNZ 0x00103c4e
RET
LAB_00103c65:
XOR EAX,EAX
RET
|
uint calculate_segment_checksum(int4 *param_1)
{
uint uVar1;
long lVar2;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
int4 local_8;
int4 local_4;
if (param_1 != (int4 *)0x0) {
local_20 = *param_1;
local_1c = param_1[1];
local_18 = *(int8 *)(param_1 + 2);
local_10 = *(int8 *)(param_1 + 4);
local_8 = param_1[9];
local_4 = param_1[10];
uVar1 = 0x811c9dc5;
lVar2 = 0;
do {
uVar1 = (*(byte *)((long)&local_20 + lVar2) ^ uVar1) * 0x1000193;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x20);
return uVar1;
}
return 0;
}
|
|
4,088 | my_thread_init | eloqsql/mysys/my_thr_init.c | my_bool my_thread_init(void)
{
struct st_my_thread_var *tmp;
my_bool error=0;
if (!my_thread_global_init_done)
return 1; /* cannot proceed with uninitialized library */
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self());
#endif
if (my_thread_var)
{
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n",
(long) pthread_self());
#endif
goto end;
}
#ifdef _MSC_VER
install_sigabrt_handler();
#endif
if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
{
error= 1;
goto end;
}
set_mysys_var(tmp);
tmp->pthread_self= pthread_self();
my_thread_init_thr_mutex(tmp);
tmp->stack_ends_here= (char*)&tmp +
STACK_DIRECTION * (long)my_thread_stack_size;
mysql_mutex_lock(&THR_LOCK_threads);
tmp->id= tmp->dbug_id= ++thread_id;
++THR_thread_count;
mysql_mutex_unlock(&THR_LOCK_threads);
tmp->init= 1;
#ifndef DBUG_OFF
/* Generate unique name for thread */
(void) my_thread_name();
#endif
end:
return error;
} | O0 | c | my_thread_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x11(%rbp)
cmpb $0x0, 0x322efd(%rip) # 0x39b7e0
jne 0x788ee
movb $0x1, -0x1(%rbp)
jmp 0x789d7
callq 0x78790
cmpq $0x0, %rax
je 0x788fe
jmp 0x789d1
movl $0x1, %edi
movl $0xf0, %esi
callq 0x2a1f0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x78920
movb $0x1, -0x11(%rbp)
jmp 0x789d1
movq -0x10(%rbp), %rdi
callq 0x78c40
callq 0x2a250
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rdi
callq 0x787e0
leaq 0x3142a4(%rip), %rax # 0x38cbf0
movq (%rax), %rax
shlq $0x0, %rax
leaq -0x10(%rbp), %rcx
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
leaq 0x322dac(%rip), %rdi # 0x39b718
leaq 0xb1db(%rip), %rsi # 0x83b4e
movl $0x12e, %edx # imm = 0x12E
callq 0x78af0
movq 0x322e64(%rip), %rcx # 0x39b7e8
addq $0x1, %rcx
movq %rcx, 0x322e59(%rip) # 0x39b7e8
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
leaq 0x322b6c(%rip), %rax # 0x39b518
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x322b60(%rip), %rax # 0x39b518
movl %ecx, (%rax)
leaq 0x322d57(%rip), %rdi # 0x39b718
callq 0x78be0
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movb -0x11(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
| my_thread_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_11], 0
cmp cs:my_thread_global_init_done, 0
jnz short loc_788EE
mov [rbp+var_1], 1
jmp loc_789D7
loc_788EE:
call _my_thread_var
cmp rax, 0
jz short loc_788FE
jmp loc_789D1
loc_788FE:
mov edi, 1
mov esi, 0F0h
call _calloc
mov [rbp+var_10], rax
cmp rax, 0
jnz short loc_78920
mov [rbp+var_11], 1
jmp loc_789D1
loc_78920:
mov rdi, [rbp+var_10]
call set_mysys_var
call _pthread_self
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+0C8h], rcx
mov rdi, [rbp+var_10]
call my_thread_init_thr_mutex
lea rax, my_thread_stack_size
mov rax, [rax]
shl rax, 0
lea rcx, [rbp+var_10]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+0B8h], rcx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 12Eh
call inline_mysql_mutex_lock_0
mov rcx, cs:thread_id
add rcx, 1
mov cs:thread_id, rcx
mov rax, [rbp+var_10]
mov [rax+0D8h], rcx
mov rax, [rbp+var_10]
mov [rax+0D0h], rcx
lea rax, THR_thread_count
mov ecx, [rax]
add ecx, 1
lea rax, THR_thread_count
mov [rax], ecx
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_0
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
loc_789D1:
mov al, [rbp+var_11]
mov [rbp+var_1], al
loc_789D7:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_thread_init()
{
long long v0; // rcx
char v2; // [rsp+Fh] [rbp-11h]
long long v3; // [rsp+10h] [rbp-10h] BYREF
v2 = 0;
if ( !my_thread_global_init_done )
return 1;
if ( !my_thread_var() )
{
v3 = calloc(1LL, 240LL);
if ( v3 )
{
set_mysys_var(v3);
*(_QWORD *)(v3 + 200) = pthread_self();
my_thread_init_thr_mutex(v3);
*(_QWORD *)(v3 + 184) = (char *)&v3 + (_QWORD)my_thread_stack_size;
inline_mysql_mutex_lock_0(
&THR_LOCK_threads,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
302LL);
v0 = thread_id + 1;
thread_id = v0;
*(_QWORD *)(v3 + 216) = v0;
*(_QWORD *)(v3 + 208) = v0;
++THR_thread_count;
inline_mysql_mutex_unlock_0(&THR_LOCK_threads);
*(_BYTE *)(v3 + 232) = 1;
}
else
{
return 1;
}
}
return v2;
}
| my_thread_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV byte ptr [RBP + -0x11],0x0
CMP byte ptr [0x0049b7e0],0x0
JNZ 0x001788ee
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001789d7
LAB_001788ee:
CALL 0x00178790
CMP RAX,0x0
JZ 0x001788fe
JMP 0x001789d1
LAB_001788fe:
MOV EDI,0x1
MOV ESI,0xf0
CALL 0x0012a1f0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JNZ 0x00178920
MOV byte ptr [RBP + -0x11],0x1
JMP 0x001789d1
LAB_00178920:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00178c40
CALL 0x0012a250
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001787e0
LEA RAX,[0x48cbf0]
MOV RAX,qword ptr [RAX]
SHL RAX,0x0
LEA RCX,[RBP + -0x10]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xb8],RCX
LEA RDI,[0x49b718]
LEA RSI,[0x183b4e]
MOV EDX,0x12e
CALL 0x00178af0
MOV RCX,qword ptr [0x0049b7e8]
ADD RCX,0x1
MOV qword ptr [0x0049b7e8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd0],RCX
LEA RAX,[0x49b518]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x49b518]
MOV dword ptr [RAX],ECX
LEA RDI,[0x49b718]
CALL 0x00178be0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
LAB_001789d1:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x1],AL
LAB_001789d7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_thread_init(void)
{
long lVar1;
pthread_t pVar2;
int1 local_19;
void *local_18;
int1 local_9;
local_19 = 0;
if (my_thread_global_init_done == '\0') {
local_9 = 1;
}
else {
lVar1 = _my_thread_var();
if (lVar1 == 0) {
local_18 = calloc(1,0xf0);
if (local_18 == (void *)0x0) {
local_19 = 1;
}
else {
set_mysys_var(local_18);
pVar2 = pthread_self();
*(pthread_t *)((long)local_18 + 200) = pVar2;
my_thread_init_thr_mutex(local_18);
*(long *)((long)local_18 + 0xb8) = (long)&local_18 + my_thread_stack_size;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0x12e);
lVar1 = thread_id + 1;
thread_id = lVar1;
*(long *)((long)local_18 + 0xd8) = lVar1;
*(long *)((long)local_18 + 0xd0) = lVar1;
THR_thread_count = THR_thread_count + 1;
inline_mysql_mutex_unlock(THR_LOCK_threads);
*(int1 *)((long)local_18 + 0xe8) = 1;
}
}
local_9 = local_19;
}
return local_9;
}
|
|
4,089 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser() | monkey531[P]llama/common/json.hpp | ~json_sax_dom_callback_parser() = default; | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa8(%rdi), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58416
movq %r14, %rdi
callq 0x5db82
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x5ae39
leaq 0x80(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x48(%rbx), %rdi
callq 0x5bf98
leaq 0x20(%rbx), %rdi
callq 0x5bf98
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x5ae67
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1b8e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x5ae73
jmp 0x5ae73
movq %rax, %rdi
callq 0x2229b
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, [rdi+0A8h]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rbx+90h]
test rax, rax
jz short loc_5AE39
lea rdi, [rbx+80h]
mov rsi, rdi
mov edx, 3
call rax
loc_5AE39:
lea rdi, [rbx+48h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
lea rdi, [rbx+20h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
mov rdi, [rbx+8]; void *
test rdi, rdi
jz short loc_5AE67
mov rsi, [rbx+18h]
sub rsi, rdi; unsigned __int64
add rsp, 8
pop rbx
pop r14
jmp __ZdlPvm; operator delete(void *,ulong)
loc_5AE67:
add rsp, 8
pop rbx
pop r14
retn
jmp short loc_5AE73
jmp short $+2
loc_5AE73:
mov rdi, rax
call __clang_call_terminate
| void nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser(
long long a1)
{
long long v2; // rsi
void ( *v3)(long long, long long, long long); // rax
void *v4; // rdi
v2 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a1 + 168);
v3 = *(void ( **)(long long, long long, long long))(a1 + 144);
if ( v3 )
{
v2 = a1 + 128;
v3(a1 + 128, a1 + 128, 3LL);
}
std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 72, v2);
std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 32, v2);
v4 = *(void **)(a1 + 8);
if ( v4 )
operator delete(v4, *(_QWORD *)(a1 + 24) - (_QWORD)v4);
}
| ~json_sax_dom_callback_parser:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[RDI + 0xa8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158416
MOV RDI,R14
CALL 0x0015db82
MOV RAX,qword ptr [RBX + 0x90]
TEST RAX,RAX
JZ 0x0015ae39
LEA RDI,[RBX + 0x80]
LAB_0015ae2f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0015ae39:
LEA RDI,[RBX + 0x48]
LAB_0015ae3d:
CALL 0x0015bf98
LEA RDI,[RBX + 0x20]
LAB_0015ae46:
CALL 0x0015bf98
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0015ae67
MOV RSI,qword ptr [RBX + 0x18]
SUB RSI,RDI
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011b8e0
LAB_0015ae67:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::~json_sax_dom_callback_parser() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~json_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
void *pvVar1;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)(this + 0xa8),0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(this + 0xa8));
if (*(code **)(this + 0x90) != (code *)0x0) {
/* try { // try from 0015ae2f to 0015ae38 has its CatchHandler @ 0015ae6f */
(**(code **)(this + 0x90))(this + 0x80,this + 0x80,3);
}
/* try { // try from 0015ae3d to 0015ae41 has its CatchHandler @ 0015ae73 */
std::_Bvector_base<std::allocator<bool>>::_M_deallocate
((_Bvector_base<std::allocator<bool>> *)(this + 0x48));
/* try { // try from 0015ae46 to 0015ae4a has its CatchHandler @ 0015ae71 */
std::_Bvector_base<std::allocator<bool>>::_M_deallocate
((_Bvector_base<std::allocator<bool>> *)(this + 0x20));
pvVar1 = *(void **)(this + 8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x18) - (long)pvVar1);
return;
}
return;
}
|
|
4,090 | intx::uint<2 * 256u> intx::umul<256u>(intx::uint<256u> const&, intx::uint<256u> const&) | corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp | inline constexpr uint<2 * N> umul(const uint<N>& x, const uint<N>& y) noexcept
{
constexpr auto num_words = uint<N>::num_words;
uint<2 * N> p;
for (size_t j = 0; j < num_words; ++j)
{
uint64_t k = 0;
for (size_t i = 0; i < num_words; ++i)
{
auto a = addc(p[i + j], k);
auto t = umul(x[i], y[j]) + uint128{a.value, a.carry};
p[i + j] = t[0];
k = t[1];
}
p[j + num_words] = k;
}
return p;
} | O2 | cpp | intx::uint<2 * 256u> intx::umul<256u>(intx::uint<256u> const&, intx::uint<256u> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %r12d, %r12d
movq %rdi, %r13
cmpq $0x4, %r12
je 0x3a8b0
xorl %ebp, %ebp
xorl %r8d, %r8d
cmpq $0x4, %rbp
je 0x3a8a2
xorl %ecx, %ecx
addq (%r13,%rbp,8), %r8
setb %cl
movq (%rbx,%r12,8), %rax
mulq (%r15,%rbp,8)
movq %rax, %rdi
movq %rdx, %rsi
movq %r8, %rdx
callq 0x38d80
movq %rdx, %r8
movq %rax, (%r13,%rbp,8)
incq %rbp
jmp 0x3a86f
movq %r8, 0x20(%r14,%r12,8)
incq %r12
addq $0x8, %r13
jmp 0x3a864
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
xor r12d, r12d
mov r13, rdi
loc_3A864:
cmp r12, 4
jz short loc_3A8B0
xor ebp, ebp
xor r8d, r8d
loc_3A86F:
cmp rbp, 4
jz short loc_3A8A2
xor ecx, ecx
add r8, [r13+rbp*8+0]
setb cl
mov rax, [rbx+r12*8]
mul qword ptr [r15+rbp*8]
mov rdi, rax
mov rsi, rdx
mov rdx, r8
call _ZN4intxplENS_4uintILj128EEES1_; intx::operator+(intx::uint<128u>,intx::uint<128u>)
mov r8, rdx
mov [r13+rbp*8+0], rax
inc rbp
jmp short loc_3A86F
loc_3A8A2:
mov [r14+r12*8+20h], r8
inc r12
add r13, 8
jmp short loc_3A864
loc_3A8B0:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _OWORD * intx::umul<256u>(_OWORD *a1, long long a2, long long a3)
{
long long v6; // r12
_OWORD *v7; // r13
long long v8; // rbp
long long v9; // r8
unsigned __int128 v10; // rdi
long long v11; // rax
long long v12; // rdx
a1[3] = 0LL;
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
v6 = 0LL;
v7 = a1;
while ( v6 != 4 )
{
v8 = 0LL;
v9 = 0LL;
while ( v8 != 4 )
{
v10 = *(unsigned long long *)(a2 + 8 * v8) * (unsigned __int128)*(unsigned long long *)(a3 + 8 * v6);
v11 = intx::operator+(v10, *((long long *)&v10 + 1), *((_QWORD *)v7 + v8) + v9, __CFADD__(*((_QWORD *)v7 + v8), v9));
v9 = v12;
*((_QWORD *)v7 + v8++) = v11;
}
*((_QWORD *)a1 + v6++ + 4) = v9;
v7 = (_OWORD *)((char *)v7 + 8);
}
return a1;
}
| _ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR R12D,R12D
MOV R13,RDI
LAB_0013a864:
CMP R12,0x4
JZ 0x0013a8b0
XOR EBP,EBP
XOR R8D,R8D
LAB_0013a86f:
CMP RBP,0x4
JZ 0x0013a8a2
XOR ECX,ECX
ADD R8,qword ptr [R13 + RBP*0x8]
SETC CL
MOV RAX,qword ptr [RBX + R12*0x8]
MUL qword ptr [R15 + RBP*0x8]
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,R8
CALL 0x00138d80
MOV R8,RDX
MOV qword ptr [R13 + RBP*0x8],RAX
INC RBP
JMP 0x0013a86f
LAB_0013a8a2:
MOV qword ptr [R14 + R12*0x8 + 0x20],R8
INC R12
ADD R13,0x8
JMP 0x0013a864
LAB_0013a8b0:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 *
_ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_
(int8 *param_1,long param_2,long param_3)
{
int1 auVar1 [16];
long lVar2;
ulong uVar3;
long lVar4;
int8 *puVar5;
int1 auVar6 [16];
param_1[6] = 0;
param_1[7] = 0;
param_1[4] = 0;
param_1[5] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
puVar5 = param_1;
for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) {
uVar3 = 0;
for (lVar2 = 0; lVar2 != 4; lVar2 = lVar2 + 1) {
auVar6._8_8_ = 0;
auVar6._0_8_ = *(ulong *)(param_3 + lVar4 * 8);
auVar1._8_8_ = 0;
auVar1._0_8_ = *(ulong *)(param_2 + lVar2 * 8);
auVar6 = intx::operator+(SUB168(auVar6 * auVar1,0),SUB168(auVar6 * auVar1,8),
uVar3 + puVar5[lVar2],CARRY8(uVar3,puVar5[lVar2]));
uVar3 = auVar6._8_8_;
puVar5[lVar2] = auVar6._0_8_;
}
param_1[lVar4 + 4] = uVar3;
puVar5 = puVar5 + 1;
}
return param_1;
}
|
|
4,091 | fmt::v10::appender fmt::v10::detail::format_uint<4u, char, fmt::v10::appender, unsigned int>(fmt::v10::appender, unsigned int, int, bool) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits,
bool upper = false) -> It {
if (auto ptr = to_pointer<Char>(out, to_unsigned(num_digits))) {
format_uint<BASE_BITS>(ptr, value, num_digits, upper);
return out;
}
// Buffer should be large enough to hold all digits (digits / BASE_BITS + 1).
char buffer[num_bits<UInt>() / BASE_BITS + 1] = {};
format_uint<BASE_BITS>(buffer, value, num_digits, upper);
return detail::copy_str_noinline<Char>(buffer, buffer + num_digits, out);
} | O0 | c | fmt::v10::appender fmt::v10::detail::format_uint<4u, char, fmt::v10::appender, unsigned int>(fmt::v10::appender, unsigned int, int, bool):
subq $0x48, %rsp
movb %cl, %al
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x30(%rsp), %edi
callq 0xa5690
movl %eax, %eax
movl %eax, %esi
movq 0x18(%rsp), %rdi
callq 0xa0070
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0xaa5be
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
movb 0x2f(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0xaa620
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xaa613
leaq 0xd(%rsp), %rdi
xorl %esi, %esi
movl $0xb, %edx
callq 0x8db70
leaq 0xd(%rsp), %rdi
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
movb 0x2f(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0xaa620
leaq 0xd(%rsp), %rdi
leaq 0xd(%rsp), %rsi
movslq 0x30(%rsp), %rax
addq %rax, %rsi
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rdx
callq 0xa04f0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
| _ZN3fmt3v106detail11format_uintILj3EcNS0_8appenderEjEET1_S4_T2_ib:
sub rsp, 48h
mov al, cl
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_18], edx
and al, 1
mov [rsp+48h+var_19], al
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_30], rax
mov edi, [rsp+48h+var_18]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov eax, eax
mov esi, eax
mov rdi, [rsp+48h+var_30]
call _ZN3fmt3v106detail10to_pointerIcEEPT_NSt11conditionalIXsr3std7is_sameIS3_cEE5valueENS0_8appenderESt20back_insert_iteratorINS1_6bufferIS3_EEEE4typeEm
mov [rsp+48h+var_28], rax
cmp [rsp+48h+var_28], 0
jz short loc_AA5BE
mov rdi, [rsp+48h+var_28]
mov esi, [rsp+48h+var_14]
mov edx, [rsp+48h+var_18]
mov al, [rsp+48h+var_19]
and al, 1
movzx ecx, al
call _ZN3fmt3v106detail11format_uintILj3EcjEEPT0_S4_T1_ib; fmt::v10::detail::format_uint<3u,char,uint>(char *,uint,int,bool)
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_8], rax
jmp short loc_AA613
loc_AA5BE:
lea rdi, [rsp+48h+var_3B]
xor esi, esi
mov edx, 0Bh
call _memset
lea rdi, [rsp+48h+var_3B]
mov esi, [rsp+48h+var_14]
mov edx, [rsp+48h+var_18]
mov al, [rsp+48h+var_19]
and al, 1
movzx ecx, al
call _ZN3fmt3v106detail11format_uintILj3EcjEEPT0_S4_T1_ib; fmt::v10::detail::format_uint<3u,char,uint>(char *,uint,int,bool)
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_3B]
movsxd rax, [rsp+48h+var_18]
add rsi, rax
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_48], rax
mov rdx, [rsp+48h+var_48]
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
mov [rsp+48h+var_8], rax
loc_AA613:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| long long fmt::v10::detail::format_uint<3u,char,fmt::v10::appender,unsigned int>(
long long a1,
unsigned int a2,
unsigned int a3,
char a4)
{
unsigned int v4; // eax
long long v5; // rcx
long long v6; // r8
long long v7; // r9
_BYTE v9[11]; // [rsp+Dh] [rbp-3Bh] BYREF
long long v10; // [rsp+18h] [rbp-30h]
long long v11; // [rsp+20h] [rbp-28h]
char v12; // [rsp+2Fh] [rbp-19h]
unsigned int v13; // [rsp+30h] [rbp-18h]
unsigned int v14; // [rsp+34h] [rbp-14h]
long long v15; // [rsp+38h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4 & 1;
v10 = a1;
v4 = fmt::v10::detail::to_unsigned<int>(a3);
v11 = fmt::v10::detail::to_pointer<char>(a1, v4);
if ( v11 )
{
fmt::v10::detail::format_uint<3u,char,unsigned int>(v11, v14, v13, v12 & 1);
return v15;
}
else
{
memset(v9, 0LL, sizeof(v9));
fmt::v10::detail::format_uint<3u,char,unsigned int>(v9, v14, v13, v12 & 1);
return fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(
(long long)v9,
(long long)&v9[v13],
v15,
v5,
v6,
v7);
}
}
| format_uint<3u,char,fmt::v10::appender,unsigned_int>:
SUB RSP,0x48
MOV AL,CL
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
AND AL,0x1
MOV byte ptr [RSP + 0x2f],AL
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RAX
MOV EDI,dword ptr [RSP + 0x30]
CALL 0x001a5690
MOV EAX,EAX
MOV ESI,EAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001a0070
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001aa5be
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x30]
MOV AL,byte ptr [RSP + 0x2f]
AND AL,0x1
MOVZX ECX,AL
CALL 0x001aa620
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001aa613
LAB_001aa5be:
LEA RDI,[RSP + 0xd]
XOR ESI,ESI
MOV EDX,0xb
CALL 0x0018db70
LEA RDI,[RSP + 0xd]
MOV ESI,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x30]
MOV AL,byte ptr [RSP + 0x2f]
AND AL,0x1
MOVZX ECX,AL
CALL 0x001aa620
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0xd]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RDX,qword ptr [RSP]
CALL 0x001a04f0
MOV qword ptr [RSP + 0x40],RAX
LAB_001aa613:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
/* fmt::v10::appender fmt::v10::detail::format_uint<3u, char, fmt::v10::appender, unsigned
int>(fmt::v10::appender, unsigned int, int, bool) */
int8
fmt::v10::detail::format_uint<3u,char,fmt::v10::appender,unsigned_int>
(int8 param_1,uint param_2,int param_3,byte param_4)
{
char local_3b [11];
int8 local_30;
char *local_28;
byte local_19;
int local_18;
uint local_14;
int8 local_10;
int8 local_8;
local_19 = param_4 & 1;
local_30 = param_1;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
to_unsigned<int>(param_3);
local_28 = to_pointer<char>(local_30);
if (local_28 == (char *)0x0) {
memset(local_3b,0,0xb);
format_uint<3u,char,unsigned_int>(local_3b,local_14,local_18,(bool)(local_19 & 1));
local_8 = copy_str_noinline<char,char*,fmt::v10::appender>
(local_3b,local_3b + local_18,local_10);
}
else {
format_uint<3u,char,unsigned_int>(local_28,local_14,local_18,(bool)(local_19 & 1));
local_8 = local_10;
}
return local_8;
}
|
|
4,092 | rtree_find_next | eloqsql/storage/myisam/rt_index.c | int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag)
{
my_off_t root;
uint nod_cmp_flag;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return rtree_find_first(info, keynr, info->lastkey, info->lastkey_length,
search_flag);
if (!info->buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!rtree_key_cmp(keyinfo->seg, info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key = key + keyinfo->keylength;
info->lastpos= _mi_dpos(info, 0, after_key);
memcpy(info->lastkey, key, info->lastkey_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root, 0);
} | O3 | c | rtree_find_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x8, 0x1d0(%rdi)
jne 0x8f046
movq (%rbx), %rax
movl %esi, %r13d
imulq $0x70, %r13, %r14
addq 0x218(%rax), %r14
cmpb $0x0, 0x33d(%rbx)
jne 0x8f01a
movq 0x128(%rbx), %r15
cmpq 0x130(%rbx), %r15
jae 0x8f01a
movq 0x28(%r14), %rdi
movq 0x118(%rbx), %rsi
movl 0x1dc(%rbx), %ecx
movq %r15, %rdx
movl $0x400, %r8d # imm = 0x400
callq 0x90670
movzwl 0x12(%r14), %r12d
addq %r15, %r12
testl %eax, %eax
je 0x8f08c
movq %r12, %r15
cmpq 0x130(%rbx), %r12
jb 0x8efdc
movq (%rbx), %rax
movq 0x98(%rax), %rax
movq (%rax,%r13,8), %rdx
cmpq $-0x1, %rdx
je 0x8f069
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ed1b
movq 0x108(%rbx), %rdx
movl 0x1d8(%rbx), %ecx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ec88
callq 0xa8dda
movl $0x89, (%rax)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x8990d
movq %rax, 0x170(%rbx)
movq 0x108(%rbx), %rdi
movl 0x1d8(%rbx), %edx
movq %r15, %rsi
callq 0x2a0a0
cmpq 0x130(%rbx), %r12
jae 0x8f0ca
movq %r12, 0x128(%rbx)
jmp 0x8f07a
movb $0x1, 0x33d(%rbx)
jmp 0x8f07a
| rtree_find_next:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
test byte ptr [rdi+1D0h], 8
jnz loc_8F046
mov rax, [rbx]
mov r13d, esi
imul r14, r13, 70h ; 'p'
add r14, [rax+218h]
cmp byte ptr [rbx+33Dh], 0
jnz short loc_8F01A
mov r15, [rbx+128h]
cmp r15, [rbx+130h]
jnb short loc_8F01A
loc_8EFDC:
mov rdi, [r14+28h]
mov rsi, [rbx+118h]
mov ecx, [rbx+1DCh]
mov rdx, r15
mov r8d, 400h
call rtree_key_cmp
movzx r12d, word ptr [r14+12h]
add r12, r15
test eax, eax
jz loc_8F08C
mov r15, r12
cmp r12, [rbx+130h]
jb short loc_8EFDC
mov rax, [rbx]
loc_8F01A:
mov rax, [rax+98h]
mov rdx, [rax+r13*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_8F069
mov rdi, rbx
mov rsi, r14
xor ecx, ecx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rtree_find_req
loc_8F046:
mov rdx, [rbx+108h]
mov ecx, [rbx+1D8h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rtree_find_first
loc_8F069:
call _my_thread_var
mov dword ptr [rax], 89h
mov r14d, 0FFFFFFFFh
loc_8F07A:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8F08C:
xor r14d, r14d
mov rdi, rbx
xor esi, esi
mov rdx, r12
call _mi_dpos
mov [rbx+170h], rax
mov rdi, [rbx+108h]
mov edx, [rbx+1D8h]
mov rsi, r15
call _memcpy
cmp r12, [rbx+130h]
jnb short loc_8F0CA
mov [rbx+128h], r12
jmp short loc_8F07A
loc_8F0CA:
mov byte ptr [rbx+33Dh], 1
jmp short loc_8F07A
| long long rtree_find_next(long long a1, const char *a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // r13
long long v5; // r14
unsigned long long v6; // r15
int v7; // eax
unsigned long long v8; // r12
long long v9; // rdx
unsigned int v11; // r14d
v2 = a1;
if ( (*(_BYTE *)(a1 + 464) & 8) != 0 )
return rtree_find_first(a1, (unsigned int)a2, *(_QWORD *)(a1 + 264), *(_DWORD *)(a1 + 472));
v3 = *(_QWORD *)a1;
v4 = (unsigned int)a2;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * (unsigned int)a2;
if ( *(_BYTE *)(a1 + 829) || (v6 = *(_QWORD *)(a1 + 296), v6 >= *(_QWORD *)(a1 + 304)) )
{
LABEL_7:
v9 = *(_QWORD *)(*(_QWORD *)(v3 + 152) + 8 * v4);
if ( v9 != -1 )
return rtree_find_req((long long *)v2, v5, v9, 0LL);
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
while ( 1 )
{
a1 = *(_QWORD *)(v5 + 40);
a2 = *(const char **)(v2 + 280);
v7 = rtree_key_cmp(a1, a2, v6, *(unsigned int *)(v2 + 476), 1024LL);
v8 = v6 + *(unsigned __int16 *)(v5 + 18);
if ( !v7 )
break;
v6 += *(unsigned __int16 *)(v5 + 18);
if ( v8 >= *(_QWORD *)(v2 + 304) )
{
v3 = *(_QWORD *)v2;
goto LABEL_7;
}
}
v11 = 0;
*(_QWORD *)(v2 + 368) = mi_dpos((long long *)v2, 0, v8);
memcpy(*(_QWORD *)(v2 + 264), v6, *(unsigned int *)(v2 + 472));
if ( v8 >= *(_QWORD *)(v2 + 304) )
*(_BYTE *)(v2 + 829) = 1;
else
*(_QWORD *)(v2 + 296) = v8;
}
return v11;
}
| rtree_find_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST byte ptr [RDI + 0x1d0],0x8
JNZ 0x0018f046
MOV RAX,qword ptr [RBX]
MOV R13D,ESI
IMUL R14,R13,0x70
ADD R14,qword ptr [RAX + 0x218]
CMP byte ptr [RBX + 0x33d],0x0
JNZ 0x0018f01a
MOV R15,qword ptr [RBX + 0x128]
CMP R15,qword ptr [RBX + 0x130]
JNC 0x0018f01a
LAB_0018efdc:
MOV RDI,qword ptr [R14 + 0x28]
MOV RSI,qword ptr [RBX + 0x118]
MOV ECX,dword ptr [RBX + 0x1dc]
MOV RDX,R15
MOV R8D,0x400
CALL 0x00190670
MOVZX R12D,word ptr [R14 + 0x12]
ADD R12,R15
TEST EAX,EAX
JZ 0x0018f08c
MOV R15,R12
CMP R12,qword ptr [RBX + 0x130]
JC 0x0018efdc
MOV RAX,qword ptr [RBX]
LAB_0018f01a:
MOV RAX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RAX + R13*0x8]
CMP RDX,-0x1
JZ 0x0018f069
MOV RDI,RBX
MOV RSI,R14
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018ed1b
LAB_0018f046:
MOV RDX,qword ptr [RBX + 0x108]
MOV ECX,dword ptr [RBX + 0x1d8]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018ec88
LAB_0018f069:
CALL 0x001a8dda
MOV dword ptr [RAX],0x89
MOV R14D,0xffffffff
LAB_0018f07a:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018f08c:
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R12
CALL 0x0018990d
MOV qword ptr [RBX + 0x170],RAX
MOV RDI,qword ptr [RBX + 0x108]
MOV EDX,dword ptr [RBX + 0x1d8]
MOV RSI,R15
CALL 0x0012a0a0
CMP R12,qword ptr [RBX + 0x130]
JNC 0x0018f0ca
MOV qword ptr [RBX + 0x128],R12
JMP 0x0018f07a
LAB_0018f0ca:
MOV byte ptr [RBX + 0x33d],0x1
JMP 0x0018f07a
|
int8 rtree_find_next(long *param_1,ulong param_2)
{
int iVar1;
int8 uVar2;
int4 *puVar3;
long lVar4;
void *pvVar5;
long lVar6;
void *__src;
if ((*(byte *)(param_1 + 0x3a) & 8) != 0) {
uVar2 = rtree_find_first(param_1,param_2,param_1[0x21],(int)param_1[0x3b]);
return uVar2;
}
lVar4 = *param_1;
lVar6 = (param_2 & 0xffffffff) * 0x70 + *(long *)(lVar4 + 0x218);
if ((*(char *)((long)param_1 + 0x33d) == '\0') &&
(__src = (void *)param_1[0x25], (void *)param_1[0x25] < (void *)param_1[0x26])) {
do {
iVar1 = rtree_key_cmp(*(int8 *)(lVar6 + 0x28),param_1[0x23],__src,
*(int4 *)((long)param_1 + 0x1dc),0x400);
pvVar5 = (void *)((ulong)*(ushort *)(lVar6 + 0x12) + (long)__src);
if (iVar1 == 0) {
lVar4 = _mi_dpos(param_1,0,pvVar5);
param_1[0x2e] = lVar4;
memcpy((void *)param_1[0x21],__src,(ulong)*(uint *)(param_1 + 0x3b));
if (pvVar5 < (void *)param_1[0x26]) {
param_1[0x25] = (long)pvVar5;
return 0;
}
*(int1 *)((long)param_1 + 0x33d) = 1;
return 0;
}
__src = pvVar5;
} while (pvVar5 < (void *)param_1[0x26]);
lVar4 = *param_1;
}
lVar4 = *(long *)(*(long *)(lVar4 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar4 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
return 0xffffffff;
}
uVar2 = rtree_find_req(param_1,lVar6,lVar4,0);
return uVar2;
}
|
|
4,093 | http_get_status | bluesky950520[P]quickjs/quickjs-libc.c | static int http_get_status(const char *buf)
{
const char *p = buf;
while (*p != ' ' && *p != '\0')
p++;
if (*p != ' ')
return 0;
while (*p == ' ')
p++;
return atoi(p);
} | O0 | c | http_get_status:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, 0xf(%rsp)
je 0x167b8
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x167c2
jmp 0x167d2
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x16793
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0x167e9
movl $0x0, 0x24(%rsp)
jmp 0x16816
jmp 0x167eb
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x16808
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x167eb
movq 0x10(%rsp), %rdi
callq 0xe880
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
| http_get_status:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_18], rax
loc_16793:
mov rax, [rsp+28h+var_18]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 20h ; ' '
mov [rsp+28h+var_19], al
jz short loc_167B8
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rsp+28h+var_19], al
loc_167B8:
mov al, [rsp+28h+var_19]
test al, 1
jnz short loc_167C2
jmp short loc_167D2
loc_167C2:
mov rax, [rsp+28h+var_18]
add rax, 1
mov [rsp+28h+var_18], rax
jmp short loc_16793
loc_167D2:
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_167E9
mov [rsp+28h+var_4], 0
jmp short loc_16816
loc_167E9:
jmp short $+2
loc_167EB:
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jnz short loc_16808
mov rax, [rsp+28h+var_18]
add rax, 1
mov [rsp+28h+var_18], rax
jmp short loc_167EB
loc_16808:
mov rdi, [rsp+28h+var_18]
call _atoi
mov [rsp+28h+var_4], eax
loc_16816:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long http_get_status(_BYTE *a1)
{
bool v2; // [rsp+Fh] [rbp-19h]
while ( 1 )
{
v2 = 0;
if ( *a1 != 32 )
v2 = *a1 != 0;
if ( !v2 )
break;
++a1;
}
if ( *a1 == 32 )
{
while ( *a1 == 32 )
++a1;
return (unsigned int)atoi(a1);
}
else
{
return 0;
}
}
| http_get_status:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
LAB_00116793:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x20
MOV byte ptr [RSP + 0xf],AL
JZ 0x001167b8
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_001167b8:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x001167c2
JMP 0x001167d2
LAB_001167c2:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00116793
LAB_001167d2:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001167e9
MOV dword ptr [RSP + 0x24],0x0
JMP 0x00116816
LAB_001167e9:
JMP 0x001167eb
LAB_001167eb:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JNZ 0x00116808
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001167eb
LAB_00116808:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010e880
MOV dword ptr [RSP + 0x24],EAX
LAB_00116816:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int http_get_status(char *param_1)
{
bool bVar1;
char *local_18;
int local_4;
local_18 = param_1;
while( true ) {
bVar1 = false;
if (*local_18 != ' ') {
bVar1 = *local_18 != '\0';
}
if (!bVar1) break;
local_18 = local_18 + 1;
}
if (*local_18 == ' ') {
for (; *local_18 == ' '; local_18 = local_18 + 1) {
}
local_4 = atoi(local_18);
}
else {
local_4 = 0;
}
return local_4;
}
|
|
4,094 | bf_integer_from_radix_rec | bluesky950520[P]quickjs/libbf.c | static int bf_integer_from_radix_rec(bf_t *r, const limb_t *tab,
limb_t n, int level, limb_t n0,
limb_t radix, bf_t *pow_tab)
{
int ret;
if (n == 1) {
ret = bf_set_ui(r, tab[0]);
} else {
bf_t T_s, *T = &T_s, *B;
limb_t n1, n2;
n2 = (((n0 * 2) >> (level + 1)) + 1) / 2;
n1 = n - n2;
// printf("level=%d n0=%ld n1=%ld n2=%ld\n", level, n0, n1, n2);
B = &pow_tab[level];
if (B->len == 0) {
ret = bf_pow_ui_ui(B, radix, n2, BF_PREC_INF, BF_RNDZ);
if (ret)
return ret;
}
ret = bf_integer_from_radix_rec(r, tab + n2, n1, level + 1, n0,
radix, pow_tab);
if (ret)
return ret;
ret = bf_mul(r, r, B, BF_PREC_INF, BF_RNDZ);
if (ret)
return ret;
bf_init(r->ctx, T);
ret = bf_integer_from_radix_rec(T, tab, n2, level + 1, n0,
radix, pow_tab);
if (!ret)
ret = bf_add(r, r, T, BF_PREC_INF, BF_RNDZ);
bf_delete(T);
}
return ret;
// bf_print_str(" r=", r);
} | O0 | c | bf_integer_from_radix_rec:
subq $0x98, %rsp
movq 0xa0(%rsp), %rax
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movl %ecx, 0x74(%rsp)
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
cmpq $0x1, 0x78(%rsp)
jne 0xfd8db
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rsi
callq 0xec390
movl %eax, 0x5c(%rsp)
jmp 0xfdaa9
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rax
shlq %rax
movl 0x74(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
addq $0x1, %rax
shrq %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
subq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movslq 0x74(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xfd97a
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x10(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xf1d10
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0xfd978
movl 0x5c(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0xfdab4
jmp 0xfd97a
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x10(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x18(%rsp), %rdx
movl 0x74(%rsp), %ecx
addl $0x1, %ecx
movq 0x68(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
callq 0xfd880
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0xfd9d8
movl 0x5c(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0xfdab4
movq 0x88(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x20(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xee970
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0xfda1d
movl 0x5c(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0xfdab4
movq 0x88(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0xec260
movq 0x28(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x10(%rsp), %rdx
movl 0x74(%rsp), %ecx
addl $0x1, %ecx
movq 0x68(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
callq 0xfd880
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
jne 0xfda9f
movq 0x88(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x28(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xf0460
movl %eax, 0x5c(%rsp)
movq 0x28(%rsp), %rdi
callq 0xef6c0
movl 0x5c(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
| bf_integer_from_radix_rec:
sub rsp, 98h
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_10], rdi
mov [rsp+98h+var_18], rsi
mov [rsp+98h+var_20], rdx
mov [rsp+98h+var_24], ecx
mov [rsp+98h+var_30], r8
mov [rsp+98h+var_38], r9
cmp [rsp+98h+var_20], 1
jnz short loc_FD8DB
mov rdi, [rsp+98h+var_10]
mov rax, [rsp+98h+var_18]
mov rsi, [rax]
call bf_set_ui
mov [rsp+98h+var_3C], eax
jmp loc_FDAA9
loc_FD8DB:
lea rax, [rsp+98h+var_68]
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_30]
shl rax, 1
mov ecx, [rsp+98h+var_24]
add ecx, 1
mov ecx, ecx
shr rax, cl
add rax, 1
shr rax, 1
mov [rsp+98h+var_88], rax
mov rax, [rsp+98h+var_20]
sub rax, [rsp+98h+var_88]
mov [rsp+98h+var_80], rax
mov rax, [rsp+98h+arg_0]
movsxd rcx, [rsp+98h+var_24]
imul rcx, 28h ; '('
add rax, rcx
mov [rsp+98h+var_78], rax
mov rax, [rsp+98h+var_78]
cmp qword ptr [rax+18h], 0
jnz short loc_FD97A
mov rdi, [rsp+98h+var_78]
mov rsi, [rsp+98h+var_38]
mov rdx, [rsp+98h+var_88]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_pow_ui_ui
mov [rsp+98h+var_3C], eax
cmp [rsp+98h+var_3C], 0
jz short loc_FD978
mov eax, [rsp+98h+var_3C]
mov [rsp+98h+var_4], eax
jmp loc_FDAB4
loc_FD978:
jmp short $+2
loc_FD97A:
mov rdi, [rsp+98h+var_10]
mov rsi, [rsp+98h+var_18]
mov rax, [rsp+98h+var_88]
shl rax, 3
add rsi, rax
mov rdx, [rsp+98h+var_80]
mov ecx, [rsp+98h+var_24]
add ecx, 1
mov r8, [rsp+98h+var_30]
mov r9, [rsp+98h+var_38]
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_98], rax
call bf_integer_from_radix_rec
mov [rsp+98h+var_3C], eax
cmp [rsp+98h+var_3C], 0
jz short loc_FD9D8
mov eax, [rsp+98h+var_3C]
mov [rsp+98h+var_4], eax
jmp loc_FDAB4
loc_FD9D8:
mov rdi, [rsp+98h+var_10]
mov rsi, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_78]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_mul
mov [rsp+98h+var_3C], eax
cmp [rsp+98h+var_3C], 0
jz short loc_FDA1D
mov eax, [rsp+98h+var_3C]
mov [rsp+98h+var_4], eax
jmp loc_FDAB4
loc_FDA1D:
mov rax, [rsp+98h+var_10]
mov rdi, [rax]
mov rsi, [rsp+98h+var_70]
call bf_init
mov rdi, [rsp+98h+var_70]
mov rsi, [rsp+98h+var_18]
mov rdx, [rsp+98h+var_88]
mov ecx, [rsp+98h+var_24]
add ecx, 1
mov r8, [rsp+98h+var_30]
mov r9, [rsp+98h+var_38]
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_98], rax
call bf_integer_from_radix_rec
mov [rsp+98h+var_3C], eax
cmp [rsp+98h+var_3C], 0
jnz short loc_FDA9F
mov rdi, [rsp+98h+var_10]
mov rsi, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_70]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add
mov [rsp+98h+var_3C], eax
loc_FDA9F:
mov rdi, [rsp+98h+var_70]
call bf_delete_0
loc_FDAA9:
mov eax, [rsp+98h+var_3C]
mov [rsp+98h+var_4], eax
loc_FDAB4:
mov eax, [rsp+98h+var_4]
add rsp, 98h
retn
| long long bf_integer_from_radix_rec(
long long *a1,
long long *a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7)
{
long long *v7; // rsi
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v13; // [rsp+10h] [rbp-88h]
long long *v14; // [rsp+20h] [rbp-78h]
long long v15[5]; // [rsp+30h] [rbp-68h] BYREF
unsigned int v16; // [rsp+5Ch] [rbp-3Ch]
long long v17; // [rsp+60h] [rbp-38h]
long long v18; // [rsp+68h] [rbp-30h]
int v19; // [rsp+74h] [rbp-24h]
long long v20; // [rsp+78h] [rbp-20h]
long long *v21; // [rsp+80h] [rbp-18h]
long long *v22; // [rsp+88h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
if ( a3 == 1 )
return (unsigned int)bf_set_ui((long long)v22, *v21);
v13 = (((unsigned long long)(2 * v18) >> ((unsigned __int8)v19 + 1)) + 1) >> 1;
v14 = (long long *)(40LL * v19 + a7);
if ( v14[3] || (v16 = bf_pow_ui_ui(v14, v17, v13, 0x3FFFFFFFFFFFFFFFLL, 1u)) == 0 )
{
v16 = bf_integer_from_radix_rec((_DWORD)v22, 8 * (int)v13 + (int)v21, (int)v20 - (int)v13, v19 + 1, v18, v17, a7);
if ( v16 )
{
return v16;
}
else
{
v16 = bf_mul(v22, (long long)v22, (long long)v14, 0x3FFFFFFFFFFFFFFFLL, 1u);
if ( !v16 )
{
bf_init(*v22, (long long)v15);
v7 = v21;
v16 = bf_integer_from_radix_rec((unsigned int)v15, (_DWORD)v21, v13, v19 + 1, v18, v17, a7);
if ( !v16 )
{
v7 = v22;
v16 = bf_add((long long)v22, (long long)v22, (long long)v15, 0x3FFFFFFFFFFFFFFFLL, 1u);
}
bf_delete_0(v15, (long long)v7, v8, v9, v10, v11);
return v16;
}
return v16;
}
}
else
{
return v16;
}
}
| bf_integer_from_radix_rec:
SUB RSP,0x98
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x88],RDI
MOV qword ptr [RSP + 0x80],RSI
MOV qword ptr [RSP + 0x78],RDX
MOV dword ptr [RSP + 0x74],ECX
MOV qword ptr [RSP + 0x68],R8
MOV qword ptr [RSP + 0x60],R9
CMP qword ptr [RSP + 0x78],0x1
JNZ 0x001fd8db
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RAX]
CALL 0x001ec390
MOV dword ptr [RSP + 0x5c],EAX
JMP 0x001fdaa9
LAB_001fd8db:
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x68]
SHL RAX,0x1
MOV ECX,dword ptr [RSP + 0x74]
ADD ECX,0x1
MOV ECX,ECX
SHR RAX,CL
ADD RAX,0x1
SHR RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOVSXD RCX,dword ptr [RSP + 0x74]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001fd97a
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001f1d10
MOV dword ptr [RSP + 0x5c],EAX
CMP dword ptr [RSP + 0x5c],0x0
JZ 0x001fd978
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x94],EAX
JMP 0x001fdab4
LAB_001fd978:
JMP 0x001fd97a
LAB_001fd97a:
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x10]
SHL RAX,0x3
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x74]
ADD ECX,0x1
MOV R8,qword ptr [RSP + 0x68]
MOV R9,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
CALL 0x001fd880
MOV dword ptr [RSP + 0x5c],EAX
CMP dword ptr [RSP + 0x5c],0x0
JZ 0x001fd9d8
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x94],EAX
JMP 0x001fdab4
LAB_001fd9d8:
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001ee970
MOV dword ptr [RSP + 0x5c],EAX
CMP dword ptr [RSP + 0x5c],0x0
JZ 0x001fda1d
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x94],EAX
JMP 0x001fdab4
LAB_001fda1d:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001ec260
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x74]
ADD ECX,0x1
MOV R8,qword ptr [RSP + 0x68]
MOV R9,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
CALL 0x001fd880
MOV dword ptr [RSP + 0x5c],EAX
CMP dword ptr [RSP + 0x5c],0x0
JNZ 0x001fda9f
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001f0460
MOV dword ptr [RSP + 0x5c],EAX
LAB_001fda9f:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001ef6c0
LAB_001fdaa9:
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x94],EAX
LAB_001fdab4:
MOV EAX,dword ptr [RSP + 0x94]
ADD RSP,0x98
RET
|
int bf_integer_from_radix_rec
(int8 *param_1,int8 *param_2,long param_3,int param_4,long param_5,
int8 param_6,long param_7)
{
int iVar1;
ulong uVar2;
long lVar3;
int1 local_68 [44];
int local_3c;
int8 local_38;
long local_30;
int local_24;
long local_20;
int8 *local_18;
int8 *local_10;
local_38 = param_6;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_3 == 1) {
local_3c = bf_set_ui(param_1,*param_2);
}
else {
uVar2 = ((ulong)(param_5 << 1) >> ((char)param_4 + 1U & 0x3f)) + 1 >> 1;
lVar3 = param_7 + (long)param_4 * 0x28;
if (*(long *)(lVar3 + 0x18) == 0) {
iVar1 = bf_pow_ui_ui(lVar3,param_6,uVar2,0x3fffffffffffffff,1);
if (iVar1 != 0) {
return iVar1;
}
local_3c = 0;
}
local_3c = bf_integer_from_radix_rec
(local_10,local_18 + uVar2,param_3 - uVar2,local_24 + 1,local_30,local_38,
param_7);
if (local_3c != 0) {
return local_3c;
}
local_3c = bf_mul(local_10,local_10,lVar3,0x3fffffffffffffff,1);
if (local_3c != 0) {
return local_3c;
}
bf_init(*local_10,local_68);
local_3c = bf_integer_from_radix_rec
(local_68,local_18,uVar2,local_24 + 1,local_30,local_38,param_7);
if (local_3c == 0) {
local_3c = bf_add(local_10,local_10,local_68,0x3fffffffffffffff,1);
}
bf_delete(local_68);
}
return local_3c;
}
|
|
4,095 | translog_record_read_next_chunk | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_record_read_next_chunk(TRANSLOG_READER_DATA *data)
{
translog_size_t new_current_offset= data->current_offset + data->chunk_size;
uint16 chunk_header_len, chunk_len;
uint8 type;
DBUG_ENTER("translog_record_read_next_chunk");
if (data->eor)
{
DBUG_PRINT("info", ("end of the record flag set"));
DBUG_RETURN(1);
}
if (data->header.groups_no &&
data->header.groups_no - 1 != data->current_group &&
data->header.groups[data->current_group].num == data->current_chunk)
{
/* Goto next group */
data->current_group++;
data->current_chunk= 0;
DBUG_PRINT("info", ("skip to group: #%u", data->current_group));
translog_destroy_scanner(&data->scanner);
translog_scanner_init(data->header.groups[data->current_group].addr,
1, &data->scanner, 1);
}
else
{
data->current_chunk++;
if (translog_get_next_chunk(&data->scanner))
DBUG_RETURN(1);
if (data->scanner.page == END_OF_LOG)
{
/*
Actually it should not happened, but we want to quit nicely in case
of a truncated log
*/
DBUG_RETURN(1);
}
}
type= data->scanner.page[data->scanner.page_offset] & TRANSLOG_CHUNK_TYPE;
if (type == TRANSLOG_CHUNK_LSN && data->header.groups_no)
{
DBUG_PRINT("info",
("Last chunk: data len: %u offset: %u group: %u of %u",
data->header.chunk0_data_len, data->scanner.page_offset,
data->current_group, data->header.groups_no - 1));
DBUG_ASSERT(data->header.groups_no - 1 == data->current_group);
DBUG_ASSERT(data->header.lsn ==
data->scanner.page_addr + data->scanner.page_offset);
translog_destroy_scanner(&data->scanner);
translog_scanner_init(data->header.chunk0_data_addr, 1, &data->scanner, 1);
data->chunk_size= data->header.chunk0_data_len;
data->body_offset= data->scanner.page_offset;
data->current_offset= new_current_offset;
data->eor= 1;
DBUG_RETURN(0);
}
if (type == TRANSLOG_CHUNK_LSN || type == TRANSLOG_CHUNK_FIXED)
{
data->eor= 1;
DBUG_RETURN(1); /* End of record */
}
chunk_header_len=
translog_get_chunk_header_length(data->scanner.page +
data->scanner.page_offset);
chunk_len= translog_get_total_chunk_length(data->scanner.page,
data->scanner.page_offset);
data->chunk_size= chunk_len - chunk_header_len;
data->body_offset= data->scanner.page_offset + chunk_header_len;
data->current_offset= new_current_offset;
DBUG_PRINT("info", ("grp: %u chunk: %u body_offset: %u chunk_size: %u "
"current_offset: %lu",
(uint) data->current_group,
(uint) data->current_chunk,
(uint) data->body_offset,
(uint) data->chunk_size, (ulong) data->current_offset));
DBUG_RETURN(0);
} | O0 | c | translog_record_read_next_chunk:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x246c(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x2472(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x247c(%rax)
je 0x51102
jmp 0x510f5
jmp 0x510f7
jmp 0x510f9
movb $0x1, -0x1(%rbp)
jmp 0x5138b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x418(%rax)
je 0x511c1
movq -0x10(%rbp), %rax
movl 0x418(%rax), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x2474(%rcx), %eax
je 0x511c1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x2474(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2478(%rcx), %eax
jne 0x511c1
movq -0x10(%rbp), %rax
movl 0x2474(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2474(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2478(%rax)
jmp 0x5117c
movq -0x10(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
callq 0x4e540
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x2474(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
addq $0x438, %rdx # imm = 0x438
movl $0x1, %ecx
movl %ecx, %esi
callq 0x4e210
jmp 0x51214
movq -0x10(%rbp), %rax
movl 0x2478(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2478(%rax)
movq -0x10(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
callq 0x4e360
cmpb $0x0, %al
je 0x511f3
jmp 0x511ea
movb $0x1, -0x1(%rbp)
jmp 0x5138b
movq -0x10(%rbp), %rax
leaq 0xc34032(%rip), %rcx # 0xc85230
cmpq %rcx, 0x2450(%rax)
jne 0x51212
jmp 0x51209
movb $0x1, -0x1(%rbp)
jmp 0x5138b
jmp 0x51214
movq -0x10(%rbp), %rax
movq 0x2450(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x2460(%rcx), %ecx
movzbl (%rax,%rcx), %eax
andl $0xc0, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x512dc
movq -0x10(%rbp), %rax
cmpl $0x0, 0x418(%rax)
je 0x512dc
jmp 0x51255
jmp 0x51257
jmp 0x51259
jmp 0x5125b
jmp 0x5125d
jmp 0x5125f
movq -0x10(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
callq 0x4e540
movq -0x10(%rbp), %rax
movq 0x428(%rax), %rdi
movq -0x10(%rbp), %rdx
addq $0x438, %rdx # imm = 0x438
movl $0x1, %ecx
movl %ecx, %esi
callq 0x4e210
movq -0x10(%rbp), %rax
movw 0x436(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2472(%rax)
movq -0x10(%rbp), %rax
movl 0x2460(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2468(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x246c(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x247c(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x5138b
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
je 0x512ee
movzbl -0x19(%rbp), %eax
cmpl $0x40, %eax
jne 0x51302
movq -0x10(%rbp), %rax
movb $0x1, 0x247c(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5138b
movq -0x10(%rbp), %rax
movq 0x2450(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x2460(%rax), %eax
addq %rax, %rdi
callq 0x57c50
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rax
movq 0x2450(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x2460(%rax), %eax
movzwl %ax, %esi
callq 0x4dc50
movw %ax, -0x18(%rbp)
movzwl -0x18(%rbp), %eax
movzwl -0x16(%rbp), %ecx
subl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2472(%rax)
movq -0x10(%rbp), %rax
movl 0x2460(%rax), %ecx
movzwl -0x16(%rbp), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2468(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x246c(%rax)
jmp 0x51385
jmp 0x51387
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| translog_record_read_next_chunk:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+246Ch]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx+2472h]
add eax, ecx
mov [rbp+var_14], eax
mov rax, [rbp+var_10]
cmp byte ptr [rax+247Ch], 0
jz short loc_51102
jmp short $+2
loc_510F5:
jmp short $+2
loc_510F7:
jmp short $+2
loc_510F9:
mov [rbp+var_1], 1
jmp loc_5138B
loc_51102:
mov rax, [rbp+var_10]
cmp dword ptr [rax+418h], 0
jz loc_511C1
mov rax, [rbp+var_10]
mov eax, [rax+418h]
sub eax, 1
mov rcx, [rbp+var_10]
cmp eax, [rcx+2474h]
jz loc_511C1
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+2474h]
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+8]
mov rcx, [rbp+var_10]
cmp eax, [rcx+2478h]
jnz short loc_511C1
mov rax, [rbp+var_10]
mov ecx, [rax+2474h]
add ecx, 1
mov [rax+2474h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+2478h], 0
jmp short $+2
loc_5117C:
mov rdi, [rbp+var_10]
add rdi, 438h
call translog_destroy_scanner
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+2474h]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rdx, [rbp+var_10]
add rdx, 438h
mov ecx, 1
mov esi, ecx
call translog_scanner_init
jmp short loc_51214
loc_511C1:
mov rax, [rbp+var_10]
mov ecx, [rax+2478h]
add ecx, 1
mov [rax+2478h], ecx
mov rdi, [rbp+var_10]
add rdi, 438h
call translog_get_next_chunk
cmp al, 0
jz short loc_511F3
jmp short $+2
loc_511EA:
mov [rbp+var_1], 1
jmp loc_5138B
loc_511F3:
mov rax, [rbp+var_10]
lea rcx, end_of_log
cmp [rax+2450h], rcx
jnz short loc_51212
jmp short $+2
loc_51209:
mov [rbp+var_1], 1
jmp loc_5138B
loc_51212:
jmp short $+2
loc_51214:
mov rax, [rbp+var_10]
mov rax, [rax+2450h]
mov rcx, [rbp+var_10]
mov ecx, [rcx+2460h]
movzx eax, byte ptr [rax+rcx]
and eax, 0C0h
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 0
jnz loc_512DC
mov rax, [rbp+var_10]
cmp dword ptr [rax+418h], 0
jz loc_512DC
jmp short $+2
loc_51255:
jmp short $+2
loc_51257:
jmp short $+2
loc_51259:
jmp short $+2
loc_5125B:
jmp short $+2
loc_5125D:
jmp short $+2
loc_5125F:
mov rdi, [rbp+var_10]
add rdi, 438h
call translog_destroy_scanner
mov rax, [rbp+var_10]
mov rdi, [rax+428h]
mov rdx, [rbp+var_10]
add rdx, 438h
mov ecx, 1
mov esi, ecx
call translog_scanner_init
mov rax, [rbp+var_10]
mov cx, [rax+436h]
mov rax, [rbp+var_10]
mov [rax+2472h], cx
mov rax, [rbp+var_10]
mov ecx, [rax+2460h]
mov rax, [rbp+var_10]
mov [rax+2468h], ecx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+246Ch], ecx
mov rax, [rbp+var_10]
mov byte ptr [rax+247Ch], 1
mov [rbp+var_1], 0
jmp loc_5138B
loc_512DC:
movzx eax, [rbp+var_19]
cmp eax, 0
jz short loc_512EE
movzx eax, [rbp+var_19]
cmp eax, 40h ; '@'
jnz short loc_51302
loc_512EE:
mov rax, [rbp+var_10]
mov byte ptr [rax+247Ch], 1
mov [rbp+var_1], 1
jmp loc_5138B
loc_51302:
mov rax, [rbp+var_10]
mov rdi, [rax+2450h]
mov rax, [rbp+var_10]
mov eax, [rax+2460h]
add rdi, rax
call translog_get_chunk_header_length
mov [rbp+var_16], ax
mov rax, [rbp+var_10]
mov rdi, [rax+2450h]
mov rax, [rbp+var_10]
mov eax, [rax+2460h]
movzx esi, ax
call translog_get_total_chunk_length
mov [rbp+var_18], ax
movzx eax, [rbp+var_18]
movzx ecx, [rbp+var_16]
sub eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+2472h], cx
mov rax, [rbp+var_10]
mov ecx, [rax+2460h]
movzx eax, [rbp+var_16]
add ecx, eax
mov rax, [rbp+var_10]
mov [rax+2468h], ecx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+246Ch], ecx
jmp short $+2
loc_51385:
jmp short $+2
loc_51387:
mov [rbp+var_1], 0
loc_5138B:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char translog_record_read_next_chunk(long long a1)
{
char v2; // [rsp+7h] [rbp-19h]
unsigned __int16 chunk_header_length; // [rsp+Ah] [rbp-16h]
int v4; // [rsp+Ch] [rbp-14h]
v4 = *(unsigned __int16 *)(a1 + 9330) + *(_DWORD *)(a1 + 9324);
if ( *(_BYTE *)(a1 + 9340) )
return 1;
if ( *(_DWORD *)(a1 + 1048)
&& *(_DWORD *)(a1 + 1048) - 1 != *(_DWORD *)(a1 + 9332)
&& *(unsigned __int8 *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8) + 8) == *(_DWORD *)(a1 + 9336) )
{
++*(_DWORD *)(a1 + 9332);
*(_DWORD *)(a1 + 9336) = 0;
translog_destroy_scanner(a1 + 1080);
translog_scanner_init(*(_QWORD *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8)), 1, a1 + 1080, 1);
}
else
{
++*(_DWORD *)(a1 + 9336);
if ( translog_get_next_chunk(a1 + 1080) )
return 1;
if ( *(_UNKNOWN **)(a1 + 9296) == &end_of_log )
return 1;
}
v2 = *(_BYTE *)(*(_QWORD *)(a1 + 9296) + *(unsigned int *)(a1 + 9312)) & 0xC0;
if ( v2 || !*(_DWORD *)(a1 + 1048) )
{
if ( v2 && v2 != 64 )
{
chunk_header_length = translog_get_chunk_header_length(*(unsigned int *)(a1 + 9312) + *(_QWORD *)(a1 + 9296));
*(_WORD *)(a1 + 9330) = translog_get_total_chunk_length(*(_QWORD *)(a1 + 9296), *(_DWORD *)(a1 + 9312))
- chunk_header_length;
*(_DWORD *)(a1 + 9320) = chunk_header_length + *(_DWORD *)(a1 + 9312);
*(_DWORD *)(a1 + 9324) = v4;
return 0;
}
else
{
*(_BYTE *)(a1 + 9340) = 1;
return 1;
}
}
else
{
translog_destroy_scanner(a1 + 1080);
translog_scanner_init(*(_QWORD *)(a1 + 1064), 1, a1 + 1080, 1);
*(_WORD *)(a1 + 9330) = *(_WORD *)(a1 + 1078);
*(_DWORD *)(a1 + 9320) = *(_DWORD *)(a1 + 9312);
*(_DWORD *)(a1 + 9324) = v4;
*(_BYTE *)(a1 + 9340) = 1;
return 0;
}
}
| translog_record_read_next_chunk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x246c]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX + 0x2472]
ADD EAX,ECX
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x247c],0x0
JZ 0x00151102
JMP 0x001510f5
LAB_001510f5:
JMP 0x001510f7
LAB_001510f7:
JMP 0x001510f9
LAB_001510f9:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015138b
LAB_00151102:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x418],0x0
JZ 0x001511c1
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x418]
SUB EAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x2474]
JZ 0x001511c1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x2474]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x2478]
JNZ 0x001511c1
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2474]
ADD ECX,0x1
MOV dword ptr [RAX + 0x2474],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2478],0x0
JMP 0x0015117c
LAB_0015117c:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x438
CALL 0x0014e540
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x2474]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x438
MOV ECX,0x1
MOV ESI,ECX
CALL 0x0014e210
JMP 0x00151214
LAB_001511c1:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2478]
ADD ECX,0x1
MOV dword ptr [RAX + 0x2478],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x438
CALL 0x0014e360
CMP AL,0x0
JZ 0x001511f3
JMP 0x001511ea
LAB_001511ea:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015138b
LAB_001511f3:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0xd85230]
CMP qword ptr [RAX + 0x2450],RCX
JNZ 0x00151212
JMP 0x00151209
LAB_00151209:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015138b
LAB_00151212:
JMP 0x00151214
LAB_00151214:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2450]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x2460]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0xc0
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x0
JNZ 0x001512dc
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x418],0x0
JZ 0x001512dc
JMP 0x00151255
LAB_00151255:
JMP 0x00151257
LAB_00151257:
JMP 0x00151259
LAB_00151259:
JMP 0x0015125b
LAB_0015125b:
JMP 0x0015125d
LAB_0015125d:
JMP 0x0015125f
LAB_0015125f:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x438
CALL 0x0014e540
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x428]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x438
MOV ECX,0x1
MOV ESI,ECX
CALL 0x0014e210
MOV RAX,qword ptr [RBP + -0x10]
MOV CX,word ptr [RAX + 0x436]
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x2472],CX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2460]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2468],ECX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x246c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x247c],0x1
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0015138b
LAB_001512dc:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x0
JZ 0x001512ee
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x40
JNZ 0x00151302
LAB_001512ee:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x247c],0x1
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015138b
LAB_00151302:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x2450]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2460]
ADD RDI,RAX
CALL 0x00157c50
MOV word ptr [RBP + -0x16],AX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x2450]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2460]
MOVZX ESI,AX
CALL 0x0014dc50
MOV word ptr [RBP + -0x18],AX
MOVZX EAX,word ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x16]
SUB EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x2472],CX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2460]
MOVZX EAX,word ptr [RBP + -0x16]
ADD ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2468],ECX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x246c],ECX
JMP 0x00151385
LAB_00151385:
JMP 0x00151387
LAB_00151387:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015138b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_record_read_next_chunk(long param_1)
{
char cVar1;
byte bVar2;
ushort uVar3;
short sVar4;
int iVar5;
int1 local_9;
iVar5 = *(int *)(param_1 + 0x246c) + (uint)*(ushort *)(param_1 + 0x2472);
if (*(char *)(param_1 + 0x247c) != '\0') {
return 1;
}
if (((*(int *)(param_1 + 0x418) == 0) ||
(*(int *)(param_1 + 0x418) + -1 == *(int *)(param_1 + 0x2474))) ||
((uint)*(byte *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10 + 8) !=
*(uint *)(param_1 + 0x2478))) {
*(int *)(param_1 + 0x2478) = *(int *)(param_1 + 0x2478) + 1;
cVar1 = translog_get_next_chunk(param_1 + 0x438);
if (cVar1 != '\0') {
return 1;
}
if (*(int1 **)(param_1 + 0x2450) == &end_of_log) {
return 1;
}
}
else {
*(int *)(param_1 + 0x2474) = *(int *)(param_1 + 0x2474) + 1;
*(int4 *)(param_1 + 0x2478) = 0;
translog_destroy_scanner(param_1 + 0x438);
translog_scanner_init
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10),1
,param_1 + 0x438);
}
bVar2 = *(byte *)(*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460)) & 0xc0;
if ((bVar2 == 0) && (*(int *)(param_1 + 0x418) != 0)) {
translog_destroy_scanner(param_1 + 0x438);
translog_scanner_init(*(int8 *)(param_1 + 0x428),1,param_1 + 0x438);
*(int2 *)(param_1 + 0x2472) = *(int2 *)(param_1 + 0x436);
*(int4 *)(param_1 + 0x2468) = *(int4 *)(param_1 + 0x2460);
*(int *)(param_1 + 0x246c) = iVar5;
*(int1 *)(param_1 + 0x247c) = 1;
local_9 = 0;
}
else if ((bVar2 == 0) || (bVar2 == 0x40)) {
*(int1 *)(param_1 + 0x247c) = 1;
local_9 = 1;
}
else {
uVar3 = translog_get_chunk_header_length
(*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460));
sVar4 = translog_get_total_chunk_length
(*(int8 *)(param_1 + 0x2450),*(uint *)(param_1 + 0x2460) & 0xffff);
*(ushort *)(param_1 + 0x2472) = sVar4 - uVar3;
*(uint *)(param_1 + 0x2468) = *(int *)(param_1 + 0x2460) + (uint)uVar3;
*(int *)(param_1 + 0x246c) = iVar5;
local_9 = 0;
}
return local_9;
}
|
|
4,096 | remove_io_thread | eloqsql/mysys/mf_iocache.c | void remove_io_thread(IO_CACHE *cache)
{
IO_CACHE_SHARE *cshare= cache->share;
uint total;
DBUG_ENTER("remove_io_thread");
/* If the writer goes, it needs to flush the write cache. */
if (cache == cshare->source_cache)
flush_io_cache(cache);
mysql_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: %p",
(cache == cshare->source_cache) ?
"writer" : "reader", cache));
/* Remove from share. */
total= --cshare->total_threads;
DBUG_PRINT("io_cache_share", ("remaining threads: %u", total));
/* Detach from share. */
cache->share= NULL;
/* If the writer goes, let the readers know. */
if (cache == cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("writer leaves"));
cshare->source_cache= NULL;
}
/* If all threads are waiting for me to join the lock, wake them. */
if (!--cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all"));
mysql_cond_signal(&cshare->cond_writer);
mysql_cond_broadcast(&cshare->cond);
}
mysql_mutex_unlock(&cshare->mutex);
if (!total)
{
DBUG_PRINT("io_cache_share", ("last thread removed, destroy share"));
mysql_cond_destroy (&cshare->cond_writer);
mysql_cond_destroy (&cshare->cond);
mysql_mutex_destroy(&cshare->mutex);
}
DBUG_VOID_RETURN;
} | O3 | c | remove_io_thread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x98(%rdi), %rbx
cmpq %rdi, 0xc0(%rbx)
jne 0x544fb
movq %r14, %rdi
movl $0x1, %esi
callq 0x53bfd
cmpq $0x0, 0x40(%rbx)
jne 0x5460b
movq %rbx, %rdi
callq 0x285e0
movl 0xdc(%rbx), %r15d
decl %r15d
movl %r15d, 0xdc(%rbx)
movq $0x0, 0x98(%r14)
cmpq %r14, 0xc0(%rbx)
jne 0x5453e
movq $0x0, 0xc0(%rbx)
decl 0xd8(%rbx)
jne 0x5457e
leaq 0x80(%rbx), %r14
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0x54639
movq %r14, %rdi
callq 0x28040
leaq 0x48(%rbx), %r14
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0x5464e
movq %r14, %rdi
callq 0x28100
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x54624
movq %rbx, %rdi
callq 0x282b0
testl %r15d, %r15d
je 0x545a3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80(%rbx), %r14
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0x54663
movq %r14, %rdi
callq 0x287f0
leaq 0x48(%rbx), %r14
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0x54680
movq %r14, %rdi
callq 0x287f0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x545f9
leaq 0x2e4e8d(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x284b0
leaq 0x463ff(%rip), %rsi # 0x9aa11
movq %rbx, %rdi
movl $0x392, %edx # imm = 0x392
callq 0x2a970
jmp 0x5450e
leaq 0x2e4e4d(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5458b
leaq 0x2e4e38(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x5455d
leaq 0x2e4e23(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x54576
leaq 0x2e4e0e(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0xb0(%rbx)
jmp 0x545ba
leaq 0x2e4df1(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x78(%rbx)
jmp 0x545d3
| remove_io_thread:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
mov rbx, [rdi+98h]
cmp [rbx+0C0h], rdi
jnz short loc_544FB
mov rdi, r14
mov esi, 1
call my_b_flush_io_cache
loc_544FB:
cmp qword ptr [rbx+40h], 0
jnz loc_5460B
mov rdi, rbx
call _pthread_mutex_lock
loc_5450E:
mov r15d, [rbx+0DCh]
dec r15d
mov [rbx+0DCh], r15d
mov qword ptr [r14+98h], 0
cmp [rbx+0C0h], r14
jnz short loc_5453E
mov qword ptr [rbx+0C0h], 0
loc_5453E:
dec dword ptr [rbx+0D8h]
jnz short loc_5457E
lea r14, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_54639
loc_5455D:
mov rdi, r14
call _pthread_cond_signal
lea r14, [rbx+48h]
mov rdi, [rbx+78h]
test rdi, rdi
jnz loc_5464E
loc_54576:
mov rdi, r14
call _pthread_cond_broadcast
loc_5457E:
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_54624
loc_5458B:
mov rdi, rbx
call _pthread_mutex_unlock
test r15d, r15d
jz short loc_545A3
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_545A3:
lea r14, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_54663
loc_545BA:
mov rdi, r14
call _pthread_cond_destroy
lea r14, [rbx+48h]
mov rdi, [rbx+78h]
test rdi, rdi
jnz loc_54680
loc_545D3:
mov rdi, r14
call _pthread_cond_destroy
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_545F9
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_545F9:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_mutex_destroy
loc_5460B:
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 392h
call psi_mutex_lock
jmp loc_5450E
loc_54624:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5458B
loc_54639:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_5455D
loc_5464E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp loc_54576
loc_54663:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+0B0h], 0
jmp loc_545BA
loc_54680:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+78h], 0
jmp loc_545D3
| long long remove_io_thread(long long *a1)
{
long long v1; // rbx
int v2; // r15d
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
long long result; // rax
long long v8; // rdi
long long v9; // rdi
long long v10; // rdi
v1 = a1[19];
if ( *(long long **)(v1 + 192) == a1 )
my_b_flush_io_cache(a1, 1);
if ( *(_QWORD *)(v1 + 64) )
psi_mutex_lock(v1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x392u);
else
pthread_mutex_lock(v1);
v2 = *(_DWORD *)(v1 + 220) - 1;
*(_DWORD *)(v1 + 220) = v2;
a1[19] = 0LL;
if ( *(long long **)(v1 + 192) == a1 )
*(_QWORD *)(v1 + 192) = 0LL;
if ( (*(_DWORD *)(v1 + 216))-- == 1 )
{
v4 = *(_QWORD *)(v1 + 176);
if ( v4 )
(*((void ( **)(long long))PSI_server + 46))(v4);
pthread_cond_signal(v1 + 128);
v5 = *(_QWORD *)(v1 + 120);
if ( v5 )
(*((void ( **)(long long))PSI_server + 47))(v5);
pthread_cond_broadcast(v1 + 72);
}
v6 = *(_QWORD *)(v1 + 64);
if ( v6 )
(*((void ( **)(long long))PSI_server + 44))(v6);
result = pthread_mutex_unlock(v1);
if ( !v2 )
{
v8 = *(_QWORD *)(v1 + 176);
if ( v8 )
{
(*((void ( **)(long long))PSI_server + 13))(v8);
*(_QWORD *)(v1 + 176) = 0LL;
}
pthread_cond_destroy(v1 + 128);
v9 = *(_QWORD *)(v1 + 120);
if ( v9 )
{
(*((void ( **)(long long))PSI_server + 13))(v9);
*(_QWORD *)(v1 + 120) = 0LL;
}
pthread_cond_destroy(v1 + 72);
v10 = *(_QWORD *)(v1 + 64);
if ( v10 )
{
(*((void ( **)(long long))PSI_server + 9))(v10);
*(_QWORD *)(v1 + 64) = 0LL;
}
return pthread_mutex_destroy(v1);
}
return result;
}
| remove_io_thread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x98]
CMP qword ptr [RBX + 0xc0],RDI
JNZ 0x001544fb
MOV RDI,R14
MOV ESI,0x1
CALL 0x00153bfd
LAB_001544fb:
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x0015460b
MOV RDI,RBX
CALL 0x001285e0
LAB_0015450e:
MOV R15D,dword ptr [RBX + 0xdc]
DEC R15D
MOV dword ptr [RBX + 0xdc],R15D
MOV qword ptr [R14 + 0x98],0x0
CMP qword ptr [RBX + 0xc0],R14
JNZ 0x0015453e
MOV qword ptr [RBX + 0xc0],0x0
LAB_0015453e:
DEC dword ptr [RBX + 0xd8]
JNZ 0x0015457e
LEA R14,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x00154639
LAB_0015455d:
MOV RDI,R14
CALL 0x00128040
LEA R14,[RBX + 0x48]
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x0015464e
LAB_00154576:
MOV RDI,R14
CALL 0x00128100
LAB_0015457e:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x00154624
LAB_0015458b:
MOV RDI,RBX
CALL 0x001282b0
TEST R15D,R15D
JZ 0x001545a3
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001545a3:
LEA R14,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x00154663
LAB_001545ba:
MOV RDI,R14
CALL 0x001287f0
LEA R14,[RBX + 0x48]
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x00154680
LAB_001545d3:
MOV RDI,R14
CALL 0x001287f0
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001545f9
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_001545f9:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001284b0
LAB_0015460b:
LEA RSI,[0x19aa11]
MOV RDI,RBX
MOV EDX,0x392
CALL 0x0012a970
JMP 0x0015450e
LAB_00154624:
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015458b
LAB_00154639:
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0015455d
LAB_0015464e:
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00154576
LAB_00154663:
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0xb0],0x0
JMP 0x001545ba
LAB_00154680:
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0x78],0x0
JMP 0x001545d3
|
void remove_io_thread(long param_1)
{
int *piVar1;
pthread_mutex_t *__mutex;
int iVar2;
__mutex = *(pthread_mutex_t **)(param_1 + 0x98);
if (*(long *)((long)__mutex + 0xc0) == param_1) {
my_b_flush_io_cache(param_1,1);
}
if (*(long *)((long)__mutex + 0x40) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392);
}
iVar2 = *(int *)((long)__mutex + 0xdc) + -1;
*(int *)((long)__mutex + 0xdc) = iVar2;
*(int8 *)(param_1 + 0x98) = 0;
if (*(long *)((long)__mutex + 0xc0) == param_1) {
*(int8 *)((long)__mutex + 0xc0) = 0;
}
piVar1 = (int *)((long)__mutex + 0xd8);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80));
if (__mutex[3].__align != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)((long)__mutex + 0x48));
}
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (iVar2 != 0) {
return;
}
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)((long)__mutex + 0xb0) = 0;
}
pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x80));
if (__mutex[3].__align != 0) {
(**(code **)(PSI_server + 0x68))();
__mutex[3].__align = 0;
}
pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x48));
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)__mutex + 0x40) = 0;
}
pthread_mutex_destroy(__mutex);
return;
}
|
|
4,097 | my_numchars_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
} | O0 | c | my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xabed0
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa879c
jmp 0xa87b6
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa877c
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| my_numchars_utf16:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_A877C:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_1
mov eax, eax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_A879C
jmp short loc_A87B6
loc_A879C:
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_A877C
loc_A87B6:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long i; // [rsp+10h] [rbp-20h]
for ( i = 0LL; ; ++i )
{
v3 = my_ismbchar_1(a1, a2, a3);
if ( !v3 )
break;
a2 += v3;
}
return i;
}
| my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001a877c:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001abed0
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001a879c
JMP 0x001a87b6
LAB_001a879c:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001a877c
LAB_001a87b6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3)
{
uint uVar1;
int8 local_28;
int8 local_18;
local_28 = 0;
local_18 = param_2;
while( true ) {
uVar1 = my_ismbchar(param_1,local_18,param_3);
if ((ulong)uVar1 == 0) break;
local_18 = (ulong)uVar1 + local_18;
local_28 = local_28 + 1;
}
return local_28;
}
|
|
4,098 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint() | monkey531[P]llama/common/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint():
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x75, 0x14(%rax)
je 0xaca5a
leaq 0x166a50(%rip), %rdi # 0x213490
movl $0x1d79, %esi # imm = 0x1D79
leaq 0x160718(%rip), %rdx # 0x20d164
leaq 0x167770(%rip), %rcx # 0x2141c3
movb $0x0, %al
callq 0x5aee0
movl $0x0, 0x54(%rsp)
movl $0xc, 0x30(%rsp)
movl $0x8, 0x34(%rsp)
movl $0x4, 0x38(%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq $0x4, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xace40
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0xace50
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0xacb98
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
callq 0xabbd0
movq 0x8(%rsp), %rax
cmpl $0x30, 0x14(%rax)
jl 0xacb13
movq 0x8(%rsp), %rax
cmpl $0x39, 0x14(%rax)
jg 0xacb13
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x30, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xacb83
movq 0x8(%rsp), %rax
cmpl $0x41, 0x14(%rax)
jl 0xacb44
movq 0x8(%rsp), %rax
cmpl $0x46, 0x14(%rax)
jg 0xacb44
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x37, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xacb81
movq 0x8(%rsp), %rax
cmpl $0x61, 0x14(%rax)
jl 0xacb75
movq 0x8(%rsp), %rax
cmpl $0x66, 0x14(%rax)
jg 0xacb75
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x57, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xacb7f
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xacbd3
jmp 0xacb81
jmp 0xacb83
jmp 0xacb85
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0xacabd
xorl %eax, %eax
cmpl 0x54(%rsp), %eax
jg 0xacbaa
cmpl $0xffff, 0x54(%rsp) # imm = 0xFFFF
jle 0xacbcb
leaq 0x1668df(%rip), %rdi # 0x213490
movl $0x1d93, %esi # imm = 0x1D93
leaq 0x1605a7(%rip), %rdx # 0x20d164
leaq 0x16760e(%rip), %rcx # 0x2141d2
movb $0x0, %al
callq 0x5aee0
movl 0x54(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_60], rax
cmp dword ptr [rax+14h], 75h ; 'u'
jz short loc_ACA5A
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1D79h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrentU; "current == 'u'"
mov al, 0
call _ggml_abort
loc_ACA5A:
mov [rsp+68h+var_14], 0
mov [rsp+68h+var_38], 0Ch
mov [rsp+68h+var_34], 8
mov [rsp+68h+var_30], 4
mov [rsp+68h+var_2C], 0
lea rax, [rsp+68h+var_38]
mov [rsp+68h+var_28], rax
mov [rsp+68h+var_20], 4
lea rax, [rsp+68h+var_28]
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_40]
call _ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void)
mov [rsp+68h+var_48], rax
mov rdi, [rsp+68h+var_40]
call _ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void)
mov [rsp+68h+var_50], rax
loc_ACABD:
mov rax, [rsp+68h+var_48]
cmp rax, [rsp+68h+var_50]
jz loc_ACB98
mov rdi, [rsp+68h+var_60]
mov rax, [rsp+68h+var_48]
mov eax, [rax]
mov [rsp+68h+var_54], eax
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 30h ; '0'
jl short loc_ACB13
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 39h ; '9'
jg short loc_ACB13
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 30h ; '0'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_ACB83
loc_ACB13:
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 41h ; 'A'
jl short loc_ACB44
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 46h ; 'F'
jg short loc_ACB44
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 37h ; '7'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_ACB81
loc_ACB44:
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 61h ; 'a'
jl short loc_ACB75
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 66h ; 'f'
jg short loc_ACB75
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 57h ; 'W'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_ACB7F
loc_ACB75:
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_ACBD3
loc_ACB7F:
jmp short $+2
loc_ACB81:
jmp short $+2
loc_ACB83:
jmp short $+2
loc_ACB85:
mov rax, [rsp+68h+var_48]
add rax, 4
mov [rsp+68h+var_48], rax
jmp loc_ACABD
loc_ACB98:
xor eax, eax
cmp eax, [rsp+68h+var_14]
jg short loc_ACBAA
cmp [rsp+68h+var_14], 0FFFFh
jle short loc_ACBCB
loc_ACBAA:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1D93h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"...
mov al, 0
call _ggml_abort
loc_ACBCB:
mov eax, [rsp+68h+var_14]
mov [rsp+68h+var_4], eax
loc_ACBD3:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(
long long a1)
{
int v2; // [rsp+14h] [rbp-54h]
long long v3; // [rsp+18h] [rbp-50h]
int *v4; // [rsp+20h] [rbp-48h]
_DWORD v5[4]; // [rsp+30h] [rbp-38h] BYREF
_QWORD v6[2]; // [rsp+40h] [rbp-28h] BYREF
unsigned int v7; // [rsp+54h] [rbp-14h]
long long v8; // [rsp+58h] [rbp-10h]
v8 = a1;
if ( *(_DWORD *)(a1 + 20) != 117 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7545LL,
"GGML_ASSERT(%s) failed",
"current == 'u'");
v7 = 0;
v5[0] = 12;
v5[1] = 8;
v5[2] = 4;
v5[3] = 0;
v6[0] = v5;
v6[1] = 4LL;
v4 = (int *)std::initializer_list<unsigned int>::begin(v6);
v3 = std::initializer_list<unsigned int>::end(v6);
while ( v4 != (int *)v3 )
{
v2 = *v4;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 )
{
if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 )
{
if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 )
return (unsigned int)-1;
v7 += (*(_DWORD *)(a1 + 20) - 87) << v2;
}
else
{
v7 += (*(_DWORD *)(a1 + 20) - 55) << v2;
}
}
else
{
v7 += (*(_DWORD *)(a1 + 20) - 48) << v2;
}
++v4;
}
if ( v7 >= 0x10000 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7571LL,
"GGML_ASSERT(%s) failed",
"0x0000 <= codepoint && codepoint <= 0xFFFF");
return v7;
}
| get_codepoint:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RAX + 0x14],0x75
JZ 0x001aca5a
LEA RDI,[0x313490]
MOV ESI,0x1d79
LEA RDX,[0x30d164]
LEA RCX,[0x3141c3]
MOV AL,0x0
CALL 0x0015aee0
LAB_001aca5a:
MOV dword ptr [RSP + 0x54],0x0
MOV dword ptr [RSP + 0x30],0xc
MOV dword ptr [RSP + 0x34],0x8
MOV dword ptr [RSP + 0x38],0x4
MOV dword ptr [RSP + 0x3c],0x0
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],0x4
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001ace40
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001ace50
MOV qword ptr [RSP + 0x18],RAX
LAB_001acabd:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JZ 0x001acb98
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x14],EAX
CALL 0x001abbd0
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x30
JL 0x001acb13
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x39
JG 0x001acb13
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x30
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001acb83
LAB_001acb13:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x41
JL 0x001acb44
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x46
JG 0x001acb44
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x37
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001acb81
LAB_001acb44:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x61
JL 0x001acb75
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x66
JG 0x001acb75
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x57
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001acb7f
LAB_001acb75:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001acbd3
LAB_001acb7f:
JMP 0x001acb81
LAB_001acb81:
JMP 0x001acb83
LAB_001acb83:
JMP 0x001acb85
LAB_001acb85:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001acabd
LAB_001acb98:
XOR EAX,EAX
CMP EAX,dword ptr [RSP + 0x54]
JG 0x001acbaa
CMP dword ptr [RSP + 0x54],0xffff
JLE 0x001acbcb
LAB_001acbaa:
LEA RDI,[0x313490]
MOV ESI,0x1d93
LEA RDX,[0x30d164]
LEA RCX,[0x3141d2]
MOV AL,0x0
CALL 0x0015aee0
LAB_001acbcb:
MOV EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x64],EAX
LAB_001acbd3:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_codepoint() */
int __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int4 uVar1;
int iVar2;
int4 *puVar3;
byte bVar4;
int4 *local_48;
int4 local_38;
int4 local_34;
int4 local_30;
int4 local_2c;
int4 *local_28;
int8 local_20;
int local_14;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_10;
local_10 = this;
if (*(int *)(this + 0x14) != 0x75) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79,
"GGML_ASSERT(%s) failed","current == \'u\'");
}
local_14 = 0;
local_38 = 0xc;
local_34 = 8;
local_30 = 4;
local_2c = 0;
local_28 = &local_38;
local_20 = 4;
local_48 = (int4 *)
std::initializer_list<unsigned_int>::begin((initializer_list<unsigned_int> *)&local_28)
;
puVar3 = (int4 *)
std::initializer_list<unsigned_int>::end((initializer_list<unsigned_int> *)&local_28);
do {
if (local_48 == puVar3) {
if ((local_14 < 0) || (0xffff < local_14)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1d93,"GGML_ASSERT(%s) failed","0x0000 <= codepoint && codepoint <= 0xFFFF");
}
return local_14;
}
uVar1 = *local_48;
get(this);
bVar4 = (byte)uVar1;
if ((*(int *)(this + 0x14) < 0x30) || (0x39 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x41) || (0x46 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x61) || (0x66 < *(int *)(this + 0x14))) {
return -1;
}
iVar2 = *(int *)(this + 0x14) + -0x57 << (bVar4 & 0x1f);
}
else {
iVar2 = *(int *)(this + 0x14) + -0x37 << (bVar4 & 0x1f);
}
}
else {
iVar2 = *(int *)(this + 0x14) + -0x30 << (bVar4 & 0x1f);
}
local_14 = iVar2 + local_14;
local_48 = local_48 + 1;
} while( true );
}
|
|
4,099 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint() | monkey531[P]llama/common/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x75, 0x14(%rdi)
jne 0x40123
movq %rdi, %rbx
movaps 0x6b59a(%rip), %xmm0 # 0xab650
movaps %xmm0, (%rsp)
xorl %r15d, %r15d
pushq $-0x1
popq %r12
xorl %ebp, %ebp
cmpq $0x10, %r15
je 0x40107
movl (%rsp,%r15), %r14d
movq %rbx, %rdi
callq 0x3fe1c
movl 0x14(%rbx), %eax
leal -0x30(%rax), %edx
cmpl $0xa, %edx
jb 0x400fa
leal -0x41(%rax), %ecx
cmpl $0x5, %ecx
ja 0x400ed
addl $-0x37, %eax
jmp 0x400f8
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x4011e
addl $-0x57, %eax
movl %eax, %edx
movl %r14d, %ecx
shll %cl, %edx
addl %edx, %ebp
addq $0x4, %r15
jmp 0x400c3
cmpl $0x10000, %ebp # imm = 0x10000
jae 0x4013f
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %ebp
jmp 0x4010f
leaq 0x70dd2(%rip), %rdi # 0xb0efc
leaq 0x6b103(%rip), %rdx # 0xab234
leaq 0x71aeb(%rip), %rcx # 0xb1c23
movl $0x1d79, %esi # imm = 0x1D79
jmp 0x40159
leaq 0x70db6(%rip), %rdi # 0xb0efc
leaq 0x6b0e7(%rip), %rdx # 0xab234
leaq 0x71ade(%rip), %rcx # 0xb1c32
movl $0x1d93, %esi # imm = 0x1D93
xorl %eax, %eax
callq 0x23eb0
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
cmp dword ptr [rdi+14h], 75h ; 'u'
jnz short loc_40123
mov rbx, rdi
movaps xmm0, cs:xmmword_AB650
movaps [rsp+38h+var_38], xmm0
xor r15d, r15d
push 0FFFFFFFFFFFFFFFFh
pop r12
xor ebp, ebp
loc_400C3:
cmp r15, 10h
jz short loc_40107
mov r14d, dword ptr [rsp+r15+38h+var_38]
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
lea edx, [rax-30h]
cmp edx, 0Ah
jb short loc_400FA
lea ecx, [rax-41h]
cmp ecx, 5
ja short loc_400ED
add eax, 0FFFFFFC9h
jmp short loc_400F8
loc_400ED:
lea ecx, [rax-61h]
cmp ecx, 5
ja short loc_4011E
add eax, 0FFFFFFA9h
loc_400F8:
mov edx, eax
loc_400FA:
mov ecx, r14d
shl edx, cl
add ebp, edx
add r15, 4
jmp short loc_400C3
loc_40107:
cmp ebp, 10000h
jnb short loc_4013F
loc_4010F:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_4011E:
mov ebp, r12d
jmp short loc_4010F
loc_40123:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrentU; "current == 'u'"
mov esi, 1D79h
jmp short loc_40159
loc_4013F:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"...
mov esi, 1D93h
loc_40159:
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(
__m128i *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
long long v9; // r15
unsigned int v10; // ebp
int v11; // r14d
__int32 v12; // eax
__int32 v13; // edx
__int32 v14; // eax
long long v16; // rsi
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
_OWORD v21[3]; // [rsp+0h] [rbp-38h]
if ( a1[1].m128i_i32[1] == 117 )
{
v21[0] = xmmword_AB650;
v9 = 0LL;
v10 = 0;
while ( v9 != 16 )
{
v11 = *(_DWORD *)((char *)v21 + v9);
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v12 = a1[1].m128i_i32[1];
v13 = v12 - 48;
if ( (unsigned int)(v12 - 48) >= 0xA )
{
if ( (unsigned int)(v12 - 65) > 5 )
{
if ( (unsigned int)(v12 - 97) > 5 )
return (unsigned int)-1;
v14 = v12 - 87;
}
else
{
v14 = v12 - 55;
}
v13 = v14;
}
v10 += v13 << v11;
v9 += 4LL;
}
if ( v10 < 0x10000 )
return v10;
v16 = 7571LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7571LL,
"GGML_ASSERT(%s) failed",
"0x0000 <= codepoint && codepoint <= 0xFFFF");
}
else
{
v16 = 7545LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7545LL,
"GGML_ASSERT(%s) failed",
"current == 'u'");
}
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
v17,
v18,
v19,
v20,
a7,
a8,
a9);
}
| get_codepoint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
CMP dword ptr [RDI + 0x14],0x75
JNZ 0x00140123
MOV RBX,RDI
MOVAPS XMM0,xmmword ptr [0x001ab650]
MOVAPS xmmword ptr [RSP],XMM0
XOR R15D,R15D
PUSH -0x1
POP R12
XOR EBP,EBP
LAB_001400c3:
CMP R15,0x10
JZ 0x00140107
MOV R14D,dword ptr [RSP + R15*0x1]
MOV RDI,RBX
CALL 0x0013fe1c
MOV EAX,dword ptr [RBX + 0x14]
LEA EDX,[RAX + -0x30]
CMP EDX,0xa
JC 0x001400fa
LEA ECX,[RAX + -0x41]
CMP ECX,0x5
JA 0x001400ed
ADD EAX,-0x37
JMP 0x001400f8
LAB_001400ed:
LEA ECX,[RAX + -0x61]
CMP ECX,0x5
JA 0x0014011e
ADD EAX,-0x57
LAB_001400f8:
MOV EDX,EAX
LAB_001400fa:
MOV ECX,R14D
SHL EDX,CL
ADD EBP,EDX
ADD R15,0x4
JMP 0x001400c3
LAB_00140107:
CMP EBP,0x10000
JNC 0x0014013f
LAB_0014010f:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0014011e:
MOV EBP,R12D
JMP 0x0014010f
LAB_00140123:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b1c23]
MOV ESI,0x1d79
JMP 0x00140159
LAB_0014013f:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b1c32]
MOV ESI,0x1d93
LAB_00140159:
XOR EAX,EAX
CALL 0x00123eb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_codepoint() */
uint __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int4 uVar1;
int iVar2;
uint uVar3;
char *pcVar4;
uint uVar5;
int8 uVar6;
long lVar7;
int8 local_38;
int8 uStack_30;
if (*(int *)(this + 0x14) == 0x75) {
local_38 = _DAT_001ab650;
uStack_30 = _UNK_001ab658;
uVar5 = 0;
for (lVar7 = 0; lVar7 != 0x10; lVar7 = lVar7 + 4) {
uVar1 = *(int4 *)((long)&local_38 + lVar7);
get(this);
iVar2 = *(int *)(this + 0x14);
uVar3 = iVar2 - 0x30;
if (9 < uVar3) {
if (iVar2 - 0x41U < 6) {
uVar3 = iVar2 - 0x37;
}
else {
if (5 < iVar2 - 0x61U) {
return 0xffffffff;
}
uVar3 = iVar2 - 0x57;
}
}
uVar5 = uVar5 + (uVar3 << ((byte)uVar1 & 0x1f));
}
if (uVar5 < 0x10000) {
return uVar5;
}
pcVar4 = "0x0000 <= codepoint && codepoint <= 0xFFFF";
uVar6 = 0x1d93;
}
else {
pcVar4 = "current == \'u\'";
uVar6 = 0x1d79;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.