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
|
---|---|---|---|---|---|---|---|---|---|---|---|
1,400 | key_cache_write | eloqsql/mysys/mf_keycache.c | int key_cache_write(KEY_CACHE *keycache,
File file, void *file_extra,
my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length, int force_write)
{
if (keycache->can_be_used)
return keycache->interface_funcs->write(keycache->keycache_cb,
file, file_extra,
filepos, level,
buff, length,
block_length, force_write);
/* We can't use mutex here as the key cache may not be initialized */
if (my_pwrite(file, buff, length, filepos, MYF(MY_NABP | MY_WAIT_IF_FULL)))
return 1;
return 0;
} | O0 | c | key_cache_write:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movq %r9, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x49(%rax)
je 0xe5f69
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %r8d
movq -0x40(%rbp), %r9
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
callq *%rax
movl %eax, -0xc(%rbp)
jmp 0xe5f9a
movl -0x1c(%rbp), %edi
movq -0x40(%rbp), %rsi
movl 0x10(%rbp), %eax
movl %eax, %edx
movq -0x30(%rbp), %rcx
movl $0x24, %r8d
callq 0xf9380
cmpq $0x0, %rax
je 0xe5f93
movl $0x1, -0xc(%rbp)
jmp 0xe5f9a
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
| key_cache_write:
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_34], r8d
mov [rbp+var_40], r9
mov rax, [rbp+var_18]
cmp byte ptr [rax+49h], 0
jz short loc_E5F69
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rax, [rax+28h]
mov rcx, [rbp+var_18]
mov rdi, [rcx+8]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8d, [rbp+var_34]
mov r9, [rbp+var_40]
mov ebx, [rbp+arg_0]
mov r11d, [rbp+arg_8]
mov r10d, [rbp+arg_10]
mov [rsp+60h+var_60], ebx
mov [rsp+60h+var_58], r11d
mov [rsp+60h+var_50], r10d
call rax
mov [rbp+var_C], eax
jmp short loc_E5F9A
loc_E5F69:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_40]
mov eax, [rbp+arg_0]
mov edx, eax
mov rcx, [rbp+var_30]
mov r8d, 24h ; '$'
call my_pwrite
cmp rax, 0
jz short loc_E5F93
mov [rbp+var_C], 1
jmp short loc_E5F9A
loc_E5F93:
mov [rbp+var_C], 0
loc_E5F9A:
mov eax, [rbp+var_C]
add rsp, 58h
pop rbx
pop rbp
retn
| long long key_cache_write(
long long a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
unsigned int a7,
int a8,
int a9)
{
if ( *(_BYTE *)(a1 + 73) )
return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, long long, long long, _QWORD, long long, unsigned int, int, int))(*(_QWORD *)(a1 + 16) + 40LL))(
*(_QWORD *)(a1 + 8),
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9);
else
return my_pwrite(a2, a6, a7, a4, 36LL) != 0;
}
| key_cache_write:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV dword ptr [RBP + -0x34],R8D
MOV qword ptr [RBP + -0x40],R9
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x49],0x0
JZ 0x001e5f69
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RCX + 0x8]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8D,dword ptr [RBP + -0x34]
MOV R9,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + 0x10]
MOV R11D,dword ptr [RBP + 0x18]
MOV R10D,dword ptr [RBP + 0x20]
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],R10D
CALL RAX
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001e5f9a
LAB_001e5f69:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + 0x10]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x30]
MOV R8D,0x24
CALL 0x001f9380
CMP RAX,0x0
JZ 0x001e5f93
MOV dword ptr [RBP + -0xc],0x1
JMP 0x001e5f9a
LAB_001e5f93:
MOV dword ptr [RBP + -0xc],0x0
LAB_001e5f9a:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x58
POP RBX
POP RBP
RET
|
int4
key_cache_write(long param_1,int4 param_2,int8 param_3,int8 param_4,
int4 param_5,int8 param_6,int4 param_7,int4 param_8,
int4 param_9)
{
long lVar1;
int4 local_14;
if (*(char *)(param_1 + 0x49) == '\0') {
lVar1 = my_pwrite(param_2,param_6,param_7,param_4,0x24);
if (lVar1 == 0) {
local_14 = 0;
}
else {
local_14 = 1;
}
}
else {
local_14 = (**(code **)(*(long *)(param_1 + 0x10) + 0x28))
(*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6,
param_7,param_8,param_9);
}
return local_14;
}
|
|
1,401 | ma_net_flush | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_flush(NET *net)
{
int error=0;
/* don't flush if pipelined query is in progress */
if (net->extension->multi_status > COM_MULTI_OFF)
return 0;
if (net->buff != net->write_pos)
{
error=ma_net_real_write(net,(char*) net->buff,
(size_t) (net->write_pos - net->buff));
net->write_pos=net->buff;
}
if (net->compress)
net->pkt_nr= net->compress_pkt_nr;
return(error);
} | O0 | c | ma_net_flush:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x2a0(%rax), %rax
cmpl $0x0, (%rax)
jbe 0x4a71c
movl $0x0, -0x4(%rbp)
jmp 0x4a786
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x4a765
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rdx
callq 0x4a790
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x4a780
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_net_flush:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
mov rax, [rax+2A0h]
cmp dword ptr [rax], 0
jbe short loc_4A71C
mov [rbp+var_4], 0
jmp short loc_4A786
loc_4A71C:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_4A765
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rdx, rax
call ma_net_real_write
mov [rbp+var_14], eax
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
loc_4A765:
mov rax, [rbp+var_10]
cmp byte ptr [rax+84h], 0
jz short loc_4A780
mov rax, [rbp+var_10]
mov ecx, [rax+64h]
mov rax, [rbp+var_10]
mov [rax+60h], ecx
loc_4A780:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_4A786:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_net_flush(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
v2 = 0;
if ( **(_DWORD **)(a1 + 672) )
{
return 0;
}
else
{
if ( *(_QWORD *)(a1 + 8) != *(_QWORD *)(a1 + 24) )
{
v2 = ma_net_real_write(a1, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8));
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
}
if ( *(_BYTE *)(a1 + 132) )
*(_DWORD *)(a1 + 96) = *(_DWORD *)(a1 + 100);
return v2;
}
}
| ma_net_flush:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2a0]
CMP dword ptr [RAX],0x0
JBE 0x0014a71c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014a786
LAB_0014a71c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x0014a765
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RDX,RAX
CALL 0x0014a790
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_0014a765:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x0014a780
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x64]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
LAB_0014a780:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014a786:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 ma_net_flush(long param_1)
{
int4 local_1c;
int4 local_c;
local_1c = 0;
if (**(int **)(param_1 + 0x2a0) == 0) {
if (*(long *)(param_1 + 8) != *(long *)(param_1 + 0x18)) {
local_1c = ma_net_real_write(param_1,*(int8 *)(param_1 + 8),
*(long *)(param_1 + 0x18) - *(long *)(param_1 + 8));
*(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8);
}
if (*(char *)(param_1 + 0x84) != '\0') {
*(int4 *)(param_1 + 0x60) = *(int4 *)(param_1 + 100);
}
local_c = local_1c;
}
else {
local_c = 0;
}
return local_c;
}
|
|
1,402 | google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 start = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
_impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 end = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
_impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
} | O0 | cpp | google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
subq $0x78, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
movl $0x0, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0xb5d6d
jmp 0xb5d8d
movq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xd41f0
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5da7
jmp 0xb5f47
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0xd4220
movq %rax, 0x40(%rsp)
movl 0x30(%rsp), %eax
shrl $0x3, %eax
movl %eax, 0x14(%rsp)
subl $0x1, %eax
je 0xb5ddd
jmp 0xb5dcf
movl 0x14(%rsp), %eax
subl $0x2, %eax
je 0xb5e26
jmp 0xb5e6f
movl 0x30(%rsp), %eax
movzbl %al, %eax
cmpl $0x8, %eax
jne 0xb5e1f
leaq 0x34(%rsp), %rdi
callq 0xd7ac0
leaq 0x40(%rsp), %rdi
callq 0xd4f80
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x18(%rax)
cmpq $0x0, 0x40(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5e18
jmp 0xb5e1d
jmp 0xb5f66
jmp 0xb5e21
jmp 0xb5e71
jmp 0xb5d8d
movl 0x30(%rsp), %eax
movzbl %al, %eax
cmpl $0x10, %eax
jne 0xb5e68
leaq 0x34(%rsp), %rdi
callq 0xd7af0
leaq 0x40(%rsp), %rdi
callq 0xd4f80
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x1c(%rax)
cmpq $0x0, 0x40(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5e61
jmp 0xb5e66
jmp 0xb5f66
jmp 0xb5e6a
jmp 0xb5e71
jmp 0xb5d8d
jmp 0xb5e71
cmpl $0x0, 0x30(%rsp)
je 0xb5e84
movl 0x30(%rsp), %eax
andl $0x7, %eax
cmpl $0x4, %eax
jne 0xb5ead
cmpq $0x0, 0x40(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5e95
jmp 0xb5e9a
jmp 0xb5f66
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0xd4350
jmp 0xb5f49
movq 0x18(%rsp), %rax
movl 0x30(%rsp), %ecx
movq %rcx, (%rsp)
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb5f03
movq 0x8(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x58(%rsp)
jmp 0xb5f12
movq 0x8(%rsp), %rdi
callq 0xdf250
movq %rax, 0x58(%rsp)
movq (%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x163b20
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5f40
jmp 0xb5f42
jmp 0xb5f66
jmp 0xb5d8d
jmp 0xb5f49
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
leaq 0x34(%rsp), %rsi
callq 0xd5090
movq 0x40(%rsp), %rax
addq $0x78, %rsp
retq
movq $0x0, 0x40(%rsp)
jmp 0xb5f49
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange14_InternalParseEPKcPNS0_8internal12ParseContextE:
sub rsp, 78h
mov qword ptr [rsp+78h+var_30], rdi; int
mov [rsp+78h+var_38], rsi
mov [rsp+78h+var_40], rdx; int
mov rax, qword ptr [rsp+78h+var_30]
mov qword ptr [rsp+78h+var_60], rax; int
lea rax, [rsp+78h+var_48+4]
mov qword ptr [rsp+78h+var_10], rax; int
mov rax, qword ptr [rsp+78h+var_10]
mov rcx, rax
add rcx, 4
mov qword ptr [rsp+78h+var_58], rcx; int
mov qword ptr [rsp+78h+var_50], rax
loc_B5D6D:
mov rax, qword ptr [rsp+78h+var_50]
mov rcx, qword ptr [rsp+78h+var_58]
mov dword ptr [rax], 0
add rax, 4
cmp rax, rcx
mov qword ptr [rsp+78h+var_50], rax; int
jnz short loc_B5D6D
jmp short $+2
loc_B5D8D:
mov rdi, [rsp+78h+var_40]; this
lea rsi, [rsp+78h+var_38]; char **
call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**)
xor al, 0FFh
test al, 1
jnz short loc_B5DA7
jmp loc_B5F47
loc_B5DA7:
mov rdi, [rsp+78h+var_38]; this
lea rsi, [rsp+78h+var_48]; char **
xor edx, edx; unsigned int *
call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint)
mov [rsp+78h+var_38], rax; int
mov eax, dword ptr [rsp+78h+var_48]
shr eax, 3
mov [rsp+78h+var_64], eax
sub eax, 1
jz short loc_B5DDD
jmp short $+2
loc_B5DCF:
mov eax, [rsp+78h+var_64]
sub eax, 2
jz short loc_B5E26
jmp loc_B5E6F
loc_B5DDD:
mov eax, dword ptr [rsp+78h+var_48]
movzx eax, al
cmp eax, 8
jnz short loc_B5E1F
lea rdi, [rsp+78h+var_48+4]
call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange9_Internal13set_has_startEPNS0_8internal7HasBitsILm1EEE; google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_start(google::protobuf::internal::HasBits<1ul> *)
lea rdi, [rsp+78h+var_38]; this
call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**)
mov ecx, eax
mov rax, qword ptr [rsp+78h+var_60]
mov [rax+18h], ecx
cmp [rsp+78h+var_38], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B5E18
jmp short loc_B5E1D
loc_B5E18:
jmp loc_B5F66
loc_B5E1D:
jmp short loc_B5E21
loc_B5E1F:
jmp short loc_B5E71
loc_B5E21:
jmp loc_B5D8D
loc_B5E26:
mov eax, dword ptr [rsp+78h+var_48]
movzx eax, al
cmp eax, 10h
jnz short loc_B5E68
lea rdi, [rsp+78h+var_48+4]
call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange9_Internal11set_has_endEPNS0_8internal7HasBitsILm1EEE; google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_end(google::protobuf::internal::HasBits<1ul> *)
lea rdi, [rsp+78h+var_38]; this
call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**)
mov ecx, eax
mov rax, qword ptr [rsp+78h+var_60]
mov [rax+1Ch], ecx
cmp [rsp+78h+var_38], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B5E61
jmp short loc_B5E66
loc_B5E61:
jmp loc_B5F66
loc_B5E66:
jmp short loc_B5E6A
loc_B5E68:
jmp short loc_B5E71
loc_B5E6A:
jmp loc_B5D8D
loc_B5E6F:
jmp short $+2
loc_B5E71:
cmp dword ptr [rsp+78h+var_48], 0
jz short loc_B5E84
mov eax, dword ptr [rsp+78h+var_48]
and eax, 7
cmp eax, 4
jnz short loc_B5EAD
loc_B5E84:
cmp [rsp+78h+var_38], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B5E95
jmp short loc_B5E9A
loc_B5E95:
jmp loc_B5F66
loc_B5E9A:
mov rdi, [rsp+78h+var_40]; this
mov esi, dword ptr [rsp+78h+var_48]; unsigned int
call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint)
jmp loc_B5F49
loc_B5EAD:
mov rax, qword ptr [rsp+78h+var_60]
mov ecx, dword ptr [rsp+78h+var_48]; int
mov [rsp+78h+var_78], rcx; int
add rax, 8
mov qword ptr [rsp+78h+var_28], rax; int
mov rax, qword ptr [rsp+78h+var_28]
mov qword ptr [rsp+78h+var_70], rax; int
mov qword ptr [rsp+78h+var_18], rax; int
mov rax, qword ptr [rsp+78h+var_18]
mov qword ptr [rsp+78h+var_8], rax; int
mov rax, qword ptr [rsp+78h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_B5F03
mov rdi, qword ptr [rsp+78h+var_70]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+78h+var_20], rax
jmp short loc_B5F12
loc_B5F03:
mov rdi, qword ptr [rsp+78h+var_70]; int
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov [rsp+78h+var_20], rax
loc_B5F12:
mov rdi, [rsp+78h+var_78]; this
mov rsi, [rsp+78h+var_20]; unsigned __int64
mov rdx, [rsp+78h+var_38]; google::protobuf::UnknownFieldSet *
mov rcx, [rsp+78h+var_40]; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
mov [rsp+78h+var_38], rax
cmp [rsp+78h+var_38], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B5F40
jmp short loc_B5F42
loc_B5F40:
jmp short loc_B5F66
loc_B5F42:
jmp loc_B5D8D
loc_B5F47:
jmp short $+2
loc_B5F49:
mov rdi, qword ptr [rsp+78h+var_60]
add rdi, 10h
lea rsi, [rsp+78h+var_48+4]
call _ZN6google8protobuf8internal7HasBitsILm1EE2OrERKS3_; google::protobuf::internal::HasBits<1ul>::Or(google::protobuf::internal::HasBits<1ul> const&)
mov rax, [rsp+78h+var_38]
add rsp, 78h
retn
loc_B5F66:
mov [rsp+78h+var_38], 0
jmp short loc_B5F49
| _InternalParse:
SUB RSP,0x78
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[RSP + 0x34]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x28],RAX
LAB_001b5d6d:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
JNZ 0x001b5d6d
JMP 0x001b5d8d
LAB_001b5d8d:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x40]
CALL 0x001d41f0
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b5da7
JMP 0x001b5f47
LAB_001b5da7:
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x30]
XOR EDX,EDX
CALL 0x001d4220
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,dword ptr [RSP + 0x30]
SHR EAX,0x3
MOV dword ptr [RSP + 0x14],EAX
SUB EAX,0x1
JZ 0x001b5ddd
JMP 0x001b5dcf
LAB_001b5dcf:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x2
JZ 0x001b5e26
JMP 0x001b5e6f
LAB_001b5ddd:
MOV EAX,dword ptr [RSP + 0x30]
MOVZX EAX,AL
CMP EAX,0x8
JNZ 0x001b5e1f
LEA RDI,[RSP + 0x34]
CALL 0x001d7ac0
LEA RDI,[RSP + 0x40]
CALL 0x001d4f80
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x18],ECX
CMP qword ptr [RSP + 0x40],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b5e18
JMP 0x001b5e1d
LAB_001b5e18:
JMP 0x001b5f66
LAB_001b5e1d:
JMP 0x001b5e21
LAB_001b5e1f:
JMP 0x001b5e71
LAB_001b5e21:
JMP 0x001b5d8d
LAB_001b5e26:
MOV EAX,dword ptr [RSP + 0x30]
MOVZX EAX,AL
CMP EAX,0x10
JNZ 0x001b5e68
LEA RDI,[RSP + 0x34]
CALL 0x001d7af0
LEA RDI,[RSP + 0x40]
CALL 0x001d4f80
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x1c],ECX
CMP qword ptr [RSP + 0x40],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b5e61
JMP 0x001b5e66
LAB_001b5e61:
JMP 0x001b5f66
LAB_001b5e66:
JMP 0x001b5e6a
LAB_001b5e68:
JMP 0x001b5e71
LAB_001b5e6a:
JMP 0x001b5d8d
LAB_001b5e6f:
JMP 0x001b5e71
LAB_001b5e71:
CMP dword ptr [RSP + 0x30],0x0
JZ 0x001b5e84
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x7
CMP EAX,0x4
JNZ 0x001b5ead
LAB_001b5e84:
CMP qword ptr [RSP + 0x40],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b5e95
JMP 0x001b5e9a
LAB_001b5e95:
JMP 0x001b5f66
LAB_001b5e9a:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x001d4350
JMP 0x001b5f49
LAB_001b5ead:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x30]
MOV qword ptr [RSP],RCX
ADD RAX,0x8
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b5f03
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001b5f12
LAB_001b5f03:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001df250
MOV qword ptr [RSP + 0x58],RAX
LAB_001b5f12:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x38]
CALL 0x00263b20
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b5f40
JMP 0x001b5f42
LAB_001b5f40:
JMP 0x001b5f66
LAB_001b5f42:
JMP 0x001b5d8d
LAB_001b5f47:
JMP 0x001b5f49
LAB_001b5f49:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x10
LEA RSI,[RSP + 0x34]
CALL 0x001d5090
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x78
RET
LAB_001b5f66:
MOV qword ptr [RSP + 0x40],0x0
JMP 0x001b5f49
|
/* google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
char * __thiscall
google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse
(EnumDescriptorProto_EnumReservedRange *this,char *param_1,ParseContext *param_2)
{
byte bVar1;
int4 uVar2;
Container *pCVar3;
ulong uVar4;
HasBits *local_50;
uint local_48;
HasBits local_44 [4];
ParseContext *local_40;
char *local_38;
EnumDescriptorProto_EnumReservedRange *local_30;
InternalMetadata *local_28;
UnknownFieldSet *local_20;
InternalMetadata *local_18;
HasBits *local_10;
InternalMetadata *local_8;
local_50 = local_44;
local_40 = param_2;
local_38 = param_1;
local_30 = this;
local_10 = local_50;
do {
*(int4 *)local_50 = 0;
local_50 = local_50 + 4;
} while (local_50 != (HasBits *)&local_40);
do {
while( true ) {
bVar1 = internal::ParseContext::Done(local_40,&local_38);
if (((bVar1 ^ 0xff) & 1) == 0) goto LAB_001b5f49;
local_38 = (char *)internal::ReadTag(local_38,&local_48,0);
if (local_48 >> 3 != 1) break;
if ((local_48 & 0xff) == 8) {
_Internal::set_has_start(local_44);
uVar2 = internal::ReadVarint32(&local_38);
*(int4 *)(this + 0x18) = uVar2;
}
else {
LAB_001b5e71:
if ((local_48 == 0) || ((local_48 & 7) == 4)) {
if (local_38 != (char *)0x0) {
internal::EpsCopyInputStream::SetLastTag((EpsCopyInputStream *)local_40,local_48);
goto LAB_001b5f49;
}
goto LAB_001b5f66;
}
uVar4 = (ulong)local_48;
local_28 = (InternalMetadata *)(this + 8);
local_18 = local_28;
local_8 = local_28;
if ((*(ulong *)local_28 & 1) == 0) {
local_20 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(local_28);
}
else {
pCVar3 = internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(local_28);
local_20 = (UnknownFieldSet *)(pCVar3 + 8);
}
local_38 = (char *)internal::UnknownFieldParse(uVar4,local_20,local_38,local_40);
}
if (local_38 == (char *)0x0) goto LAB_001b5f66;
}
if ((local_48 >> 3 != 2) || ((local_48 & 0xff) != 0x10)) goto LAB_001b5e71;
_Internal::set_has_end(local_44);
uVar2 = internal::ReadVarint32(&local_38);
*(int4 *)(this + 0x1c) = uVar2;
} while (local_38 != (char *)0x0);
LAB_001b5f66:
local_38 = (char *)0x0;
LAB_001b5f49:
internal::HasBits<1ul>::Or((HasBits<1ul> *)(this + 0x10),local_44);
return local_38;
}
|
||
1,403 | google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 start = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
_impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 end = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
_impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
} | O3 | cpp | google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
movl 0x5c(%rdx), %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x594d4
xorl %ebp, %ebp
testb %al, %al
je 0x4da75
orl %ebp, 0x10(%rbx)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rbx), %r15
xorl %ebp, %ebp
movq %rsp, %r12
movq (%rsp), %rdi
movzbl (%rdi), %r13d
leaq 0x1(%rdi), %rax
testb %r13b, %r13b
jns 0x4dab6
movzbl (%rax), %eax
movl %eax, %ecx
shll $0x7, %ecx
addl %ecx, %r13d
addl $-0x80, %r13d
testb %al, %al
js 0x4daab
addq $0x2, %rdi
movq %rdi, %rax
jmp 0x4dab6
movl %r13d, %esi
callq 0x9f24e
movl %edx, %r13d
movq %rax, (%rsp)
movl %r13d, %ecx
shrl $0x3, %ecx
cmpl $0x2, %ecx
je 0x4db04
cmpl $0x1, %ecx
jne 0x4db3a
cmpb $0x8, %r13b
jne 0x4db3a
orl $0x1, %ebp
movzbl (%rax), %esi
leaq 0x1(%rax), %rcx
testb %sil, %sil
jns 0x4dafb
movzbl (%rcx), %ecx
movl %ecx, %edx
shll $0x7, %edx
addl %edx, %esi
addl $-0x80, %esi
testb %cl, %cl
js 0x4db92
addq $0x2, %rax
movq %rax, %rcx
movq %rcx, (%rsp)
movl %esi, 0x18(%rbx)
jmp 0x4db76
cmpb $0x10, %r13b
jne 0x4db3a
orl $0x2, %ebp
movzbl (%rax), %esi
leaq 0x1(%rax), %rcx
testb %sil, %sil
jns 0x4db31
movzbl (%rcx), %ecx
movl %ecx, %edx
shll $0x7, %edx
addl %edx, %esi
addl $-0x80, %esi
testb %cl, %cl
js 0x4dba3
addq $0x2, %rax
movq %rax, %rcx
movq %rcx, (%rsp)
movl %esi, 0x1c(%rbx)
jmp 0x4db76
testl %r13d, %r13d
je 0x4dbc5
movl %r13d, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0x4dbc5
movq (%r15), %rsi
testb $0x1, %sil
je 0x4dbb4
andq $-0x4, %rsi
addq $0x8, %rsi
movl %r13d, %edi
movq %rax, %rdx
movq %r14, %rcx
callq 0x8822d
movq %rax, (%rsp)
testq %rax, %rax
je 0x4dbd6
movl 0x5c(%r14), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x594d4
testb %al, %al
je 0x4da7e
jmp 0x4da5f
movq %rax, %rdi
callq 0x9f1c2
movq %rax, (%rsp)
movl %edx, 0x18(%rbx)
jmp 0x4db71
movq %rax, %rdi
callq 0x9f1c2
movq %rax, (%rsp)
movl %edx, 0x1c(%rbx)
jmp 0x4db71
movq %r15, %rdi
callq 0x59664
movq %rax, %rsi
movq (%rsp), %rax
jmp 0x4db5f
testq %rax, %rax
je 0x4dbd6
decl %r13d
movl %r13d, 0x50(%r14)
jmp 0x4da5f
movq $0x0, (%rsp)
jmp 0x4da5f
nop
| _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange14_InternalParseEPKcPNS0_8internal12ParseContextE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov rbx, rdi
mov rax, rsp
mov [rax], rsi
mov edx, [rdx+5Ch]; int
mov rdi, r14; this
mov rsi, rax; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
xor ebp, ebp
test al, al
jz short loc_4DA75
loc_4DA5F:
or [rbx+10h], ebp
mov rax, [rsp+38h+var_38]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DA75:
lea r15, [rbx+8]
xor ebp, ebp
mov r12, rsp
loc_4DA7E:
mov rdi, [rsp+38h+var_38]; this
movzx r13d, byte ptr [rdi]
lea rax, [rdi+1]
test r13b, r13b
jns short loc_4DAB6
movzx eax, byte ptr [rax]
mov ecx, eax
shl ecx, 7
add r13d, ecx
add r13d, 0FFFFFF80h
test al, al
js short loc_4DAAB
add rdi, 2
mov rax, rdi
jmp short loc_4DAB6
loc_4DAAB:
mov esi, r13d; char *
call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint)
mov r13d, edx
loc_4DAB6:
mov [rsp+38h+var_38], rax
mov ecx, r13d
shr ecx, 3
cmp ecx, 2
jz short loc_4DB04
cmp ecx, 1
jnz short loc_4DB3A
cmp r13b, 8
jnz short loc_4DB3A
or ebp, 1
movzx esi, byte ptr [rax]
lea rcx, [rax+1]
test sil, sil
jns short loc_4DAFB
movzx ecx, byte ptr [rcx]
mov edx, ecx
shl edx, 7; unsigned int
add esi, edx
add esi, 0FFFFFF80h; char *
test cl, cl
js loc_4DB92
add rax, 2
mov rcx, rax
loc_4DAFB:
mov [rsp+38h+var_38], rcx
mov [rbx+18h], esi
jmp short loc_4DB76
loc_4DB04:
cmp r13b, 10h
jnz short loc_4DB3A
or ebp, 2
movzx esi, byte ptr [rax]
lea rcx, [rax+1]
test sil, sil
jns short loc_4DB31
movzx ecx, byte ptr [rcx]
mov edx, ecx
shl edx, 7; unsigned int
add esi, edx
add esi, 0FFFFFF80h; char *
test cl, cl
js short loc_4DBA3
add rax, 2
mov rcx, rax
loc_4DB31:
mov [rsp+38h+var_38], rcx
mov [rbx+1Ch], esi
jmp short loc_4DB76
loc_4DB3A:
test r13d, r13d
jz loc_4DBC5
mov ecx, r13d
and ecx, 7
cmp ecx, 4
jz short loc_4DBC5
mov rsi, [r15]
test sil, 1
jz short loc_4DBB4
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8; unsigned __int64
loc_4DB5F:
mov edi, r13d; this
mov rdx, rax; google::protobuf::UnknownFieldSet *
mov rcx, r14; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
mov [rsp+38h+var_38], rax
loc_4DB71:
test rax, rax
jz short loc_4DBD6
loc_4DB76:
mov edx, [r14+5Ch]; int
mov rdi, r14; this
mov rsi, r12; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jz loc_4DA7E
jmp loc_4DA5F
loc_4DB92:
mov rdi, rax; this
call _ZN6google8protobuf8internal17VarintParseSlow32EPKcj; google::protobuf::internal::VarintParseSlow32(char const*,uint)
mov [rsp+38h+var_38], rax
mov [rbx+18h], edx
jmp short loc_4DB71
loc_4DBA3:
mov rdi, rax; this
call _ZN6google8protobuf8internal17VarintParseSlow32EPKcj; google::protobuf::internal::VarintParseSlow32(char const*,uint)
mov [rsp+38h+var_38], rax
mov [rbx+1Ch], edx
jmp short loc_4DB71
loc_4DBB4:
mov rdi, r15
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov rsi, rax
mov rax, [rsp+38h+var_38]
jmp short loc_4DB5F
loc_4DBC5:
test rax, rax
jz short loc_4DBD6
dec r13d
mov [r14+50h], r13d
jmp loc_4DA5F
loc_4DBD6:
mov [rsp+38h+var_38], 0
jmp loc_4DA5F
| google::protobuf::internal * google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(
google::protobuf::EnumDescriptorProto_EnumReservedRange *this,
google::protobuf::internal *a2,
google::protobuf::internal::ParseContext *a3)
{
unsigned int v4; // edx
google::protobuf::internal::ParseContext *v5; // r8
int v6; // ebp
_QWORD *v8; // r15
unsigned int v9; // r13d
google::protobuf::internal *TagFallback; // rax
int v11; // eax
unsigned int v12; // edx
const char *v13; // rsi
google::protobuf::internal *v14; // rcx
int v15; // ecx
const char *v16; // rsi
google::protobuf::internal *v17; // rcx
int v18; // ecx
unsigned long long v19; // rsi
google::protobuf::internal *v20; // rax
int v21; // edx
int v22; // edx
google::protobuf::internal *v23[7]; // [rsp+0h] [rbp-38h] BYREF
v23[0] = a2;
v6 = 0;
if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(
a3,
(const char **)v23,
*((_DWORD *)a3 + 23)) )
goto LABEL_2;
v8 = (_QWORD *)((char *)this + 8);
v6 = 0;
while ( 1 )
{
v9 = *(unsigned __int8 *)v23[0];
TagFallback = (google::protobuf::internal *)((char *)v23[0] + 1);
if ( (v9 & 0x80u) != 0 )
{
v11 = *(unsigned __int8 *)TagFallback;
v9 = (v11 << 7) + v9 - 128;
if ( (v11 & 0x80u) != 0 )
{
TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback(
v23[0],
(const char *)v9,
v4);
v9 = v12;
}
else
{
TagFallback = (google::protobuf::internal *)((char *)v23[0] + 2);
}
}
v23[0] = TagFallback;
if ( v9 >> 3 == 2 )
break;
if ( v9 >> 3 != 1 || (_BYTE)v9 != 8 )
goto LABEL_20;
v6 |= 1u;
LODWORD(v13) = *(unsigned __int8 *)TagFallback;
v14 = (google::protobuf::internal *)((char *)TagFallback + 1);
if ( (char)v13 >= 0 )
goto LABEL_14;
v15 = *(unsigned __int8 *)v14;
v13 = (const char *)(unsigned int)((v15 << 7) + (_DWORD)v13 - 128);
if ( (v15 & 0x80u) == 0 )
{
v14 = (google::protobuf::internal *)((char *)TagFallback + 2);
LABEL_14:
v23[0] = v14;
*((_DWORD *)this + 6) = (_DWORD)v13;
goto LABEL_26;
}
v20 = (google::protobuf::internal *)google::protobuf::internal::VarintParseSlow32(TagFallback, v13, v15 << 7);
v23[0] = v20;
*((_DWORD *)this + 6) = v21;
LABEL_25:
if ( !v20 )
goto LABEL_33;
LABEL_26:
if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(
a3,
(const char **)v23,
*((_DWORD *)a3 + 23)) )
goto LABEL_2;
}
if ( (_BYTE)v9 == 16 )
{
v6 |= 2u;
LODWORD(v16) = *(unsigned __int8 *)TagFallback;
v17 = (google::protobuf::internal *)((char *)TagFallback + 1);
if ( (char)v16 >= 0 )
goto LABEL_19;
v18 = *(unsigned __int8 *)v17;
v16 = (const char *)(unsigned int)((v18 << 7) + (_DWORD)v16 - 128);
if ( (v18 & 0x80u) == 0 )
{
v17 = (google::protobuf::internal *)((char *)TagFallback + 2);
LABEL_19:
v23[0] = v17;
*((_DWORD *)this + 7) = (_DWORD)v16;
goto LABEL_26;
}
v20 = (google::protobuf::internal *)google::protobuf::internal::VarintParseSlow32(TagFallback, v16, v18 << 7);
v23[0] = v20;
*((_DWORD *)this + 7) = v22;
goto LABEL_25;
}
LABEL_20:
if ( v9 && (v9 & 7) != 4 )
{
if ( (*v8 & 1) != 0 )
{
v19 = (*v8 & 0xFFFFFFFFFFFFFFFCLL) + 8;
}
else
{
v19 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>((char *)this + 8);
TagFallback = v23[0];
}
v20 = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse(
(google::protobuf::internal *)v9,
v19,
TagFallback,
(const char *)a3,
v5);
v23[0] = v20;
goto LABEL_25;
}
if ( TagFallback )
{
*((_DWORD *)a3 + 20) = v9 - 1;
goto LABEL_2;
}
LABEL_33:
v23[0] = 0LL;
LABEL_2:
*((_DWORD *)this + 4) |= v6;
return v23[0];
}
| _InternalParse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RDI
MOV RAX,RSP
MOV qword ptr [RAX],RSI
MOV EDX,dword ptr [RDX + 0x5c]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001594d4
XOR EBP,EBP
TEST AL,AL
JZ 0x0014da75
LAB_0014da5f:
OR dword ptr [RBX + 0x10],EBP
MOV RAX,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014da75:
LEA R15,[RBX + 0x8]
XOR EBP,EBP
MOV R12,RSP
LAB_0014da7e:
MOV RDI,qword ptr [RSP]
MOVZX R13D,byte ptr [RDI]
LEA RAX,[RDI + 0x1]
TEST R13B,R13B
JNS 0x0014dab6
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
SHL ECX,0x7
ADD R13D,ECX
ADD R13D,-0x80
TEST AL,AL
JS 0x0014daab
ADD RDI,0x2
MOV RAX,RDI
JMP 0x0014dab6
LAB_0014daab:
MOV ESI,R13D
CALL 0x0019f24e
MOV R13D,EDX
LAB_0014dab6:
MOV qword ptr [RSP],RAX
MOV ECX,R13D
SHR ECX,0x3
CMP ECX,0x2
JZ 0x0014db04
CMP ECX,0x1
JNZ 0x0014db3a
CMP R13B,0x8
JNZ 0x0014db3a
OR EBP,0x1
MOVZX ESI,byte ptr [RAX]
LEA RCX,[RAX + 0x1]
TEST SIL,SIL
JNS 0x0014dafb
MOVZX ECX,byte ptr [RCX]
MOV EDX,ECX
SHL EDX,0x7
ADD ESI,EDX
ADD ESI,-0x80
TEST CL,CL
JS 0x0014db92
ADD RAX,0x2
MOV RCX,RAX
LAB_0014dafb:
MOV qword ptr [RSP],RCX
MOV dword ptr [RBX + 0x18],ESI
JMP 0x0014db76
LAB_0014db04:
CMP R13B,0x10
JNZ 0x0014db3a
OR EBP,0x2
MOVZX ESI,byte ptr [RAX]
LEA RCX,[RAX + 0x1]
TEST SIL,SIL
JNS 0x0014db31
MOVZX ECX,byte ptr [RCX]
MOV EDX,ECX
SHL EDX,0x7
ADD ESI,EDX
ADD ESI,-0x80
TEST CL,CL
JS 0x0014dba3
ADD RAX,0x2
MOV RCX,RAX
LAB_0014db31:
MOV qword ptr [RSP],RCX
MOV dword ptr [RBX + 0x1c],ESI
JMP 0x0014db76
LAB_0014db3a:
TEST R13D,R13D
JZ 0x0014dbc5
MOV ECX,R13D
AND ECX,0x7
CMP ECX,0x4
JZ 0x0014dbc5
MOV RSI,qword ptr [R15]
TEST SIL,0x1
JZ 0x0014dbb4
AND RSI,-0x4
ADD RSI,0x8
LAB_0014db5f:
MOV EDI,R13D
MOV RDX,RAX
MOV RCX,R14
CALL 0x0018822d
MOV qword ptr [RSP],RAX
LAB_0014db71:
TEST RAX,RAX
JZ 0x0014dbd6
LAB_0014db76:
MOV EDX,dword ptr [R14 + 0x5c]
MOV RDI,R14
MOV RSI,R12
CALL 0x001594d4
TEST AL,AL
JZ 0x0014da7e
JMP 0x0014da5f
LAB_0014db92:
MOV RDI,RAX
CALL 0x0019f1c2
MOV qword ptr [RSP],RAX
MOV dword ptr [RBX + 0x18],EDX
JMP 0x0014db71
LAB_0014dba3:
MOV RDI,RAX
CALL 0x0019f1c2
MOV qword ptr [RSP],RAX
MOV dword ptr [RBX + 0x1c],EDX
JMP 0x0014db71
LAB_0014dbb4:
MOV RDI,R15
CALL 0x00159664
MOV RSI,RAX
MOV RAX,qword ptr [RSP]
JMP 0x0014db5f
LAB_0014dbc5:
TEST RAX,RAX
JZ 0x0014dbd6
DEC R13D
MOV dword ptr [R14 + 0x50],R13D
JMP 0x0014da5f
LAB_0014dbd6:
MOV qword ptr [RSP],0x0
JMP 0x0014da5f
|
/* google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
byte * __thiscall
google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse
(EnumDescriptorProto_EnumReservedRange *this,char *param_1,ParseContext *param_2)
{
byte bVar1;
byte bVar2;
ulong uVar3;
char cVar4;
byte *pbVar5;
uint uVar6;
UnknownFieldSet *pUVar7;
uint uVar8;
int1 auVar9 [12];
byte *local_38;
local_38 = (byte *)param_1;
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c));
uVar6 = 0;
if (cVar4 == '\0') {
uVar6 = 0;
do {
bVar1 = *local_38;
auVar9[8] = bVar1;
auVar9._0_8_ = local_38 + 1;
auVar9._9_3_ = 0;
if ((char)bVar1 < '\0') {
bVar2 = local_38[1];
uVar8 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80;
if ((char)bVar2 < '\0') {
auVar9 = internal::ReadTagFallback((char *)local_38,uVar8);
}
else {
auVar9._8_4_ = uVar8;
auVar9._0_8_ = local_38 + 2;
}
}
uVar8 = auVar9._8_4_;
local_38 = auVar9._0_8_;
if (uVar8 >> 3 == 2) {
if (auVar9[8] != '\x10') goto LAB_0014db3a;
uVar6 = uVar6 | 2;
bVar1 = *local_38;
uVar8 = (uint)bVar1;
pbVar5 = local_38 + 1;
if ((char)bVar1 < '\0') {
uVar8 = ((uint)bVar1 + (uint)*pbVar5 * 0x80) - 0x80;
if ((char)*pbVar5 < '\0') {
auVar9 = internal::VarintParseSlow32((char *)local_38,uVar8);
local_38 = auVar9._0_8_;
*(int *)(this + 0x1c) = auVar9._8_4_;
goto LAB_0014db71;
}
pbVar5 = local_38 + 2;
}
*(uint *)(this + 0x1c) = uVar8;
local_38 = pbVar5;
}
else {
if ((uVar8 >> 3 != 1) || (auVar9[8] != '\b')) {
LAB_0014db3a:
if ((uVar8 == 0) || ((uVar8 & 7) == 4)) {
if (local_38 != (byte *)0x0) {
*(uint *)(param_2 + 0x50) = uVar8 - 1;
break;
}
}
else {
uVar3 = *(ulong *)(this + 8);
if ((uVar3 & 1) == 0) {
pUVar7 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
else {
pUVar7 = (UnknownFieldSet *)((uVar3 & 0xfffffffffffffffc) + 8);
}
local_38 = (byte *)internal::UnknownFieldParse
((ulong)uVar8,pUVar7,(char *)local_38,param_2);
LAB_0014db71:
if (local_38 != (byte *)0x0) goto LAB_0014db76;
}
local_38 = (byte *)0x0;
break;
}
uVar6 = uVar6 | 1;
bVar1 = *local_38;
uVar8 = (uint)bVar1;
pbVar5 = local_38 + 1;
if ((char)bVar1 < '\0') {
uVar8 = ((uint)bVar1 + (uint)*pbVar5 * 0x80) - 0x80;
if ((char)*pbVar5 < '\0') {
auVar9 = internal::VarintParseSlow32((char *)local_38,uVar8);
local_38 = auVar9._0_8_;
*(int *)(this + 0x18) = auVar9._8_4_;
goto LAB_0014db71;
}
pbVar5 = local_38 + 2;
}
*(uint *)(this + 0x18) = uVar8;
local_38 = pbVar5;
}
LAB_0014db76:
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c));
} while (cVar4 == '\0');
}
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | uVar6;
return local_38;
}
|
|
1,404 | Wsrep_client_service::replay() | eloqsql/sql/wsrep_client_service.cc | enum wsrep::provider::status Wsrep_client_service::replay()
{
DBUG_ASSERT(m_thd == current_thd);
DBUG_ENTER("Wsrep_client_service::replay");
/*
Allocate separate THD for replaying to avoid tampering
original THD state during replication event applying.
*/
THD *replayer_thd= new THD(true, true);
replayer_thd->thread_stack= m_thd->thread_stack;
replayer_thd->real_id= pthread_self();
replayer_thd->prior_thr_create_utime=
replayer_thd->start_utime= microsecond_interval_timer();
replayer_thd->set_command(COM_SLEEP);
replayer_thd->reset_for_next_command(true);
enum wsrep::provider::status ret;
{
Wsrep_replayer_service replayer_service(replayer_thd, m_thd);
wsrep::provider& provider(replayer_thd->wsrep_cs().provider());
ret= provider.replay(replayer_thd->wsrep_trx().ws_handle(),
&replayer_service);
replayer_service.replay_status(ret);
}
delete replayer_thd;
DBUG_RETURN(ret);
} | O0 | cpp | Wsrep_client_service::replay():
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp # imm = 0x360
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x300(%rbp)
jmp 0xd10e0f
movl $0x6948, %edi # imm = 0x6948
callq 0x4a4660
movq %rax, %rcx
movq %rcx, -0x310(%rbp)
movb $0x0, -0x2d9(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x308(%rbp)
je 0xd10e6f
movq -0x310(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
movb $0x1, -0x2d9(%rbp)
movl $0x1, %esi
movl $0x1, %edx
callq 0x544490
jmp 0xd10e5f
movq -0x310(%rbp), %rax
movq %rax, -0x308(%rbp)
jmp 0xd10e6f
movq -0x300(%rbp), %rax
movq -0x308(%rbp), %rcx
movq %rcx, -0x2d0(%rbp)
movq 0x8(%rax), %rax
movq 0x1e98(%rax), %rcx
movq -0x2d0(%rbp), %rax
movq %rcx, 0x1e98(%rax)
callq 0x434160
movq %rax, %rcx
movq -0x2d0(%rbp), %rax
movq %rcx, 0x3e40(%rax)
callq 0xc17460
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
movq -0x2d0(%rbp), %rax
movq %rdx, 0x2750(%rax)
movq -0x2d0(%rbp), %rax
movq %rdx, 0x2740(%rax)
movq -0x2d0(%rbp), %rdi
xorl %esi, %esi
callq 0x4d87a0
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0x5bb2e0
movq -0x300(%rbp), %rax
movq -0x2d0(%rbp), %rsi
movq 0x8(%rax), %rdx
leaq -0x2c0(%rbp), %rdi
callq 0xd146c0
movq -0x2d0(%rbp), %rdi
callq 0x4d8a80
movq %rax, -0x318(%rbp)
jmp 0xd10f3b
movq -0x318(%rbp), %rdi
callq 0xd45fa0
movq %rax, -0x320(%rbp)
jmp 0xd10f50
movq -0x320(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0x2d0(%rbp), %rdi
callq 0x4b33e0
movq %rax, -0x328(%rbp)
jmp 0xd10f81
movq -0x328(%rbp), %rdi
callq 0xd11480
movq %rax, -0x338(%rbp)
jmp 0xd10f96
movq -0x338(%rbp), %rsi
movq -0x330(%rbp), %rdi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
leaq -0x2c0(%rbp), %rdx
callq *%rax
movl %eax, -0x33c(%rbp)
jmp 0xd10fbf
movl -0x33c(%rbp), %eax
movl %eax, -0x2f0(%rbp)
movl -0x2f0(%rbp), %esi
leaq -0x2c0(%rbp), %rdi
callq 0xd114a0
jmp 0xd10fdf
leaq -0x2c0(%rbp), %rdi
callq 0xd14a50
movq -0x2d0(%rbp), %rax
movq %rax, -0x348(%rbp)
cmpq $0x0, %rax
je 0xd1100c
movq -0x348(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xd1100e
movl -0x2f0(%rbp), %eax
movl %eax, -0x34c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd110b9
movl -0x34c(%rbp), %eax
addq $0x360, %rsp # imm = 0x360
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2e8(%rbp)
movl %eax, -0x2ec(%rbp)
testb $0x1, -0x2d9(%rbp)
jne 0xd1105c
jmp 0xd1106d
movq -0x2d8(%rbp), %rdi
movl $0x6948, %esi # imm = 0x6948
callq 0x4a4730
jmp 0xd1108d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2e8(%rbp)
movl %eax, -0x2ec(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0xd14a50
movq -0x2e8(%rbp), %rax
movq %rax, -0x358(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd110b9
movq -0x358(%rbp), %rdi
callq 0x433ff0
callq 0x433650
nop
| _ZN20Wsrep_client_service6replayEv:
push rbp
mov rbp, rsp
sub rsp, 360h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2C8], rdi
mov rax, [rbp+var_2C8]
mov [rbp+var_300], rax
jmp short $+2
loc_D10E0F:
mov edi, (offset aPthreadMutexLo+1); this
call _ZN5ilinknwEm; ilink::operator new(ulong)
mov rcx, rax
mov [rbp+var_310], rcx
mov [rbp+var_2D9], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_308], rax
jz short loc_D10E6F
mov rdi, [rbp+var_310]; this
mov [rbp+var_2D8], rdi
mov [rbp+var_2D9], 1
mov esi, 1; unsigned __int64
mov edx, 1; bool
call _ZN3THDC2Eyb; THD::THD(ulong long,bool)
jmp short $+2
loc_D10E5F:
mov rax, [rbp+var_310]
mov [rbp+var_308], rax
jmp short $+2
loc_D10E6F:
mov rax, [rbp+var_300]
mov rcx, [rbp+var_308]
mov [rbp+var_2D0], rcx
mov rax, [rax+8]
mov rcx, [rax+1E98h]
mov rax, [rbp+var_2D0]
mov [rax+1E98h], rcx
call _pthread_self
mov rcx, rax
mov rax, [rbp+var_2D0]
mov [rax+3E40h], rcx
call my_interval_timer
shr rax, 3
mov rcx, 20C49BA5E353F7CFh
mul rcx
shr rdx, 4
mov rax, [rbp+var_2D0]
mov [rax+2750h], rdx
mov rax, [rbp+var_2D0]
mov [rax+2740h], rdx
mov rdi, [rbp+var_2D0]
xor esi, esi
call _ZN3THD11set_commandE19enum_server_command; THD::set_command(enum_server_command)
mov rdi, [rbp+var_2D0]; this
mov esi, 1; bool
call _ZN3THD22reset_for_next_commandEb; THD::reset_for_next_command(bool)
mov rax, [rbp+var_300]
mov rsi, [rbp+var_2D0]; THD *
mov rdx, [rax+8]; THD *
lea rdi, [rbp+var_2C0]; this
call _ZN22Wsrep_replayer_serviceC2EP3THDS1_; Wsrep_replayer_service::Wsrep_replayer_service(THD *,THD *)
mov rdi, [rbp+var_2D0]; this
call _ZN3THD8wsrep_csEv; THD::wsrep_cs(void)
mov [rbp+var_318], rax
jmp short $+2
loc_D10F3B:
mov rdi, [rbp+var_318]; this
call _ZNK5wsrep12client_state8providerEv; wsrep::client_state::provider(void)
mov [rbp+var_320], rax
jmp short $+2
loc_D10F50:
mov rax, [rbp+var_320]
mov [rbp+var_2F8], rax
mov rax, [rbp+var_2F8]
mov [rbp+var_330], rax
mov rdi, [rbp+var_2D0]; this
call _ZNK3THD9wsrep_trxEv; THD::wsrep_trx(void)
mov [rbp+var_328], rax
jmp short $+2
loc_D10F81:
mov rdi, [rbp+var_328]; this
call _ZNK5wsrep11transaction9ws_handleEv; wsrep::transaction::ws_handle(void)
mov [rbp+var_338], rax
jmp short $+2
loc_D10F96:
mov rsi, [rbp+var_338]
mov rdi, [rbp+var_330]
mov rax, [rdi]
mov rax, [rax+0A0h]
lea rdx, [rbp+var_2C0]
call rax
mov [rbp+var_33C], eax
jmp short $+2
loc_D10FBF:
mov eax, [rbp+var_33C]
mov [rbp+var_2F0], eax
mov esi, [rbp+var_2F0]
lea rdi, [rbp+var_2C0]
call _ZN22Wsrep_replayer_service13replay_statusEN5wsrep8provider6statusE; Wsrep_replayer_service::replay_status(wsrep::provider::status)
jmp short $+2
loc_D10FDF:
lea rdi, [rbp+var_2C0]; this
call _ZN22Wsrep_replayer_serviceD2Ev; Wsrep_replayer_service::~Wsrep_replayer_service()
mov rax, [rbp+var_2D0]
mov [rbp+var_348], rax
cmp rax, 0
jz short loc_D1100C
mov rdi, [rbp+var_348]
mov rax, [rdi]
call qword ptr [rax+8]
loc_D1100C:
jmp short $+2
loc_D1100E:
mov eax, [rbp+var_2F0]
mov [rbp+var_34C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz loc_D110B9
mov eax, [rbp+var_34C]
add rsp, 360h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_2E8], rcx
mov [rbp+var_2EC], eax
test [rbp+var_2D9], 1
jnz short loc_D1105C
jmp short loc_D1106D
loc_D1105C:
mov rdi, [rbp+var_2D8]; void *
mov esi, 6948h; unsigned __int64
call _ZN5ilinkdlEPvm; ilink::operator delete(void *,ulong)
loc_D1106D:
jmp short loc_D1108D
mov rcx, rax
mov eax, edx
mov [rbp+var_2E8], rcx
mov [rbp+var_2EC], eax
lea rdi, [rbp+var_2C0]; this
call _ZN22Wsrep_replayer_serviceD2Ev; Wsrep_replayer_service::~Wsrep_replayer_service()
loc_D1108D:
mov rax, [rbp+var_2E8]
mov [rbp+var_358], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_D110B9
mov rdi, [rbp+var_358]
call __Unwind_Resume
loc_D110B9:
call ___stack_chk_fail
| long long Wsrep_client_service::replay(Wsrep_client_service *this)
{
char *v1; // rdi
unsigned long long v2; // rax
long long v4; // [rsp+28h] [rbp-338h]
long long v5; // [rsp+30h] [rbp-330h]
wsrep::transaction *v6; // [rsp+38h] [rbp-328h]
wsrep::client_state *v7; // [rsp+48h] [rbp-318h]
THD *v8; // [rsp+50h] [rbp-310h]
THD *v9; // [rsp+58h] [rbp-308h]
unsigned int v11; // [rsp+70h] [rbp-2F0h]
_BYTE v12[696]; // [rsp+A0h] [rbp-2C0h] BYREF
unsigned long long v13; // [rsp+358h] [rbp-8h]
v13 = __readfsqword(0x28u);
v1 = "thread_mutex_lock";
v8 = (THD *)ilink::operator new((ilink *)"thread_mutex_lock");
v9 = 0LL;
if ( v8 )
{
v1 = (char *)v8;
THD::THD(v8, 1LL, 1);
v9 = v8;
}
*((_QWORD *)v9 + 979) = *(_QWORD *)(*((_QWORD *)this + 1) + 7832LL);
*((_QWORD *)v9 + 1992) = pthread_self(v1);
v2 = my_interval_timer();
*((_QWORD *)v9 + 1258) = v2 / 0x3E8;
*((_QWORD *)v9 + 1256) = v2 / 0x3E8;
THD::set_command((long long)v9, 0);
THD::reset_for_next_command(v9, 1);
Wsrep_replayer_service::Wsrep_replayer_service((Wsrep_replayer_service *)v12, v9, *((THD **)this + 1));
v7 = (wsrep::client_state *)THD::wsrep_cs(v9);
v5 = wsrep::client_state::provider(v7);
v6 = (wsrep::transaction *)THD::wsrep_trx(v9);
v4 = wsrep::transaction::ws_handle(v6);
v11 = (*(long long ( **)(long long, long long, _BYTE *))(*(_QWORD *)v5 + 160LL))(v5, v4, v12);
Wsrep_replayer_service::replay_status(v12, v11);
Wsrep_replayer_service::~Wsrep_replayer_service((Wsrep_replayer_service *)v12);
if ( v9 )
(*(void ( **)(THD *))(*(_QWORD *)v9 + 8LL))(v9);
return v11;
}
| bitmap_is_clear_all:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00d10e01
LAB_00d10e01:
JMP 0x00d10e03
LAB_00d10e03:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00d10e2c
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JZ 0x00d10e1c
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00d10e4c
LAB_00d10e1c:
JMP 0x00d10e1e
LAB_00d10e1e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00d10e03
LAB_00d10e2c:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_00d10e4c:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 bitmap_is_clear_all(int8 *param_1)
{
uint *local_20;
bool local_9;
local_20 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= local_20) {
local_9 = (*local_20 & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0;
local_20 = (uint *)0x0;
LAB_00d10e4c:
return CONCAT71((int7)((ulong)local_20 >> 8),local_9);
}
if (*local_20 != 0) {
local_9 = false;
goto LAB_00d10e4c;
}
local_20 = local_20 + 1;
} while( true );
}
|
|
1,405 | verif_block | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_logs_proof.c | static c4_status_t verif_block(verify_ctx_t* ctx, ssz_ob_t block) {
ssz_ob_t header = ssz_get(&block, "header");
ssz_ob_t sync_committee_bits = ssz_get(&block, "sync_committee_bits");
ssz_ob_t sync_committee_signature = ssz_get(&block, "sync_committee_signature");
ssz_ob_t txs = ssz_get(&block, "txs");
bytes32_t receipt_root = {0};
uint32_t tx_count = ssz_len(txs);
// verify each tx and get the receipt root
for (int i = 0; i < tx_count; i++) {
if (!verify_tx(ctx, block, ssz_at(txs, i), receipt_root)) THROW_ERROR("invalid receipt proof!");
}
if (!verify_merkle_proof(ctx, block, receipt_root)) THROW_ERROR("invalid tx proof!");
return c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0);
} | O0 | c | verif_block:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
leaq 0x10(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0xb25db(%rip), %rdx # 0xdb6d0
callq 0xa05c0
movq -0xb8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
leaq 0xb15d2(%rip), %rdx # 0xda6de
callq 0xa05c0
movq -0xb8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
leaq 0xb15cf(%rip), %rdx # 0xda6f2
callq 0xa05c0
movq -0xb8(%rbp), %rsi
leaq -0x70(%rbp), %rdi
leaq 0xb161e(%rip), %rdx # 0xda758
callq 0xa05c0
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9f1e0
movl %eax, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0x94(%rbp), %eax
jae 0x2925a
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x98(%rbp), %esi
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9ef30
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rcx
leaq -0x90(%rbp), %rsi
leaq -0xb0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x294a0
testb $0x1, %al
jne 0x29244
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb1d44(%rip), %rsi # 0xdaf7b
callq 0xa6370
movl %eax, -0x4(%rbp)
jmp 0x292c4
jmp 0x29246
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x29184
movq -0xb8(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29910
testb $0x1, %al
jne 0x292a7
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb1b97(%rip), %rsi # 0xdae34
callq 0xa6370
movl %eax, -0x4(%rbp)
jmp 0x292c4
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x58(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x2e870
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
| verif_block:
push rbp
mov rbp, rsp
sub rsp, 0F0h
lea rsi, [rbp+arg_0]
mov [rbp+var_B8], rsi
mov [rbp+var_10], rdi
lea rdi, [rbp+var_28]
lea rdx, aInvalidRespons+15h; "header"
call ssz_get
mov rsi, [rbp+var_B8]
lea rdi, [rbp+var_40]
lea rdx, aSyncCommitteeB; "sync_committee_bits"
call ssz_get
mov rsi, [rbp+var_B8]
lea rdi, [rbp+var_58]
lea rdx, aSyncCommitteeS; "sync_committee_signature"
call ssz_get
mov rsi, [rbp+var_B8]
lea rdi, [rbp+var_70]
lea rdx, aTxs; "txs"
call ssz_get
lea rdi, [rbp+var_90]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rax, [rbp+var_70]
mov rcx, [rax]
mov [rsp+0F0h+var_F0], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_E8], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_E0], rax
call ssz_len
mov [rbp+var_94], eax
mov [rbp+var_98], 0
loc_29184:
mov eax, [rbp+var_98]
cmp eax, [rbp+var_94]
jnb loc_2925A
mov rax, [rbp+var_10]
mov [rbp+var_C0], rax
mov esi, [rbp+var_98]
lea rdi, [rbp+var_B0]
lea rax, [rbp+var_70]
mov rcx, [rax]
mov [rsp+0F0h+var_F0], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_E8], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_E0], rax
call ssz_at
mov rdi, [rbp+var_C0]
mov rcx, [rbp+var_B8]
lea rsi, [rbp+var_90]
lea rax, [rbp+var_B0]
mov rdx, [rcx]
mov [rsp+0F0h+var_F0], rdx
mov rdx, [rcx+8]
mov [rsp+0F0h+var_E8], rdx
mov rcx, [rcx+10h]
mov [rsp+0F0h+var_E0], rcx
mov rcx, [rax]
mov [rsp+0F0h+var_D8], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_D0], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_C8], rax
call verify_tx
test al, 1
jnz short loc_29244
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aInvalidReceipt; "invalid receipt proof!"
call c4_state_add_error
mov [rbp+var_4], eax
jmp loc_292C4
loc_29244:
jmp short $+2
loc_29246:
mov eax, [rbp+var_98]
add eax, 1
mov [rbp+var_98], eax
jmp loc_29184
loc_2925A:
mov rax, [rbp+var_B8]
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_90]
mov rcx, [rax]
mov [rsp+0F0h+var_F0], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_E8], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_E0], rax
call verify_merkle_proof_1
test al, 1
jnz short loc_292A7
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof; "invalid tx proof!"
call c4_state_add_error
mov [rbp+var_4], eax
jmp short loc_292C4
loc_292A7:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_28]
lea rdx, [rbp+var_40]
lea rcx, [rbp+var_58]
xor eax, eax
mov r8d, eax
call c4_verify_blockroot_signature
mov [rbp+var_4], eax
loc_292C4:
mov eax, [rbp+var_4]
add rsp, 0F0h
pop rbp
retn
| long long verif_block(
long long a1,
_DWORD a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9)
{
int v9; // edx
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // r8d
int v14; // r9d
int v15; // r8d
int v16; // r9d
int v18; // [rsp+30h] [rbp-C0h]
long long v19; // [rsp+40h] [rbp-B0h] BYREF
long long v20; // [rsp+48h] [rbp-A8h]
long long v21; // [rsp+50h] [rbp-A0h]
unsigned int i; // [rsp+58h] [rbp-98h]
unsigned int v23; // [rsp+5Ch] [rbp-94h]
_BYTE v24[32]; // [rsp+60h] [rbp-90h] BYREF
long long v25; // [rsp+80h] [rbp-70h] BYREF
long long v26; // [rsp+88h] [rbp-68h]
long long v27; // [rsp+90h] [rbp-60h]
_BYTE v28[24]; // [rsp+98h] [rbp-58h] BYREF
_BYTE v29[24]; // [rsp+B0h] [rbp-40h] BYREF
_BYTE v30[24]; // [rsp+C8h] [rbp-28h] BYREF
long long v31; // [rsp+E0h] [rbp-10h]
v31 = a1;
ssz_get(v30, &a7, "header");
ssz_get(v29, &a7, "sync_committee_bits");
ssz_get(v28, &a7, "sync_committee_signature");
ssz_get(&v25, &a7, "txs");
memset(v24, 0LL, sizeof(v24));
v23 = ssz_len((unsigned int)v24, 0, v9, v26, v10, v11, v25, v26, v27);
for ( i = 0; i < v23; ++i )
{
v18 = v31;
ssz_at((unsigned int)&v19, i, v12, v26, v13, v14, v25, v26, v27);
if ( (verify_tx(v18, (unsigned int)v24, a8, v20, v15, v16, a7, a8, a9, v19, v20, v21) & 1) == 0 )
return (unsigned int)c4_state_add_error(v31 + 112, "invalid receipt proof!");
}
if ( (verify_merkle_proof_1(v31, (unsigned int)v24, v12, a8, v13, v14, a7, a8, a9) & 1) != 0 )
return (unsigned int)c4_verify_blockroot_signature(v31, v30, v29, v28, 0LL);
else
return (unsigned int)c4_state_add_error(v31 + 112, "invalid tx proof!");
}
| verif_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
LEA RSI,[RBP + 0x10]
MOV qword ptr [RBP + -0xb8],RSI
MOV qword ptr [RBP + -0x10],RDI
LEA RDI,[RBP + -0x28]
LEA RDX,[0x1db6d0]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0x40]
LEA RDX,[0x1da6de]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0x58]
LEA RDX,[0x1da6f2]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0x70]
LEA RDX,[0x1da758]
CALL 0x001a05c0
LEA RDI,[RBP + -0x90]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
LEA RAX,[RBP + -0x70]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019f1e0
MOV dword ptr [RBP + -0x94],EAX
MOV dword ptr [RBP + -0x98],0x0
LAB_00129184:
MOV EAX,dword ptr [RBP + -0x98]
CMP EAX,dword ptr [RBP + -0x94]
JNC 0x0012925a
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xc0],RAX
MOV ESI,dword ptr [RBP + -0x98]
LEA RDI,[RBP + -0xb0]
LEA RAX,[RBP + -0x70]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019ef30
MOV RDI,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0xb8]
LEA RSI,[RBP + -0x90]
LEA RAX,[RBP + -0xb0]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x001294a0
TEST AL,0x1
JNZ 0x00129244
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1daf7b]
CALL 0x001a6370
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001292c4
LAB_00129244:
JMP 0x00129246
LAB_00129246:
MOV EAX,dword ptr [RBP + -0x98]
ADD EAX,0x1
MOV dword ptr [RBP + -0x98],EAX
JMP 0x00129184
LAB_0012925a:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x90]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00129910
TEST AL,0x1
JNZ 0x001292a7
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1dae34]
CALL 0x001a6370
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001292c4
LAB_001292a7:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x28]
LEA RDX,[RBP + -0x40]
LEA RCX,[RBP + -0x58]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0012e870
MOV dword ptr [RBP + -0x4],EAX
LAB_001292c4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xf0
POP RBP
RET
|
int4 verif_block(long param_1)
{
long lVar1;
int4 uVar2;
ulong uVar3;
int8 in_R9;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int1 local_b8 [24];
uint local_a0;
uint local_9c;
int1 local_98 [32];
int1 local_78 [24];
int1 local_60 [24];
int1 local_48 [24];
int1 local_30 [24];
long local_18;
int4 local_c;
local_18 = param_1;
ssz_get(local_30,&stack0x00000008,"header");
ssz_get(local_48,&stack0x00000008,"sync_committee_bits");
ssz_get(local_60,&stack0x00000008,"sync_committee_signature");
ssz_get(local_78,&stack0x00000008,&DAT_001da758);
memset(local_98,0,0x20);
local_9c = ssz_len();
local_a0 = 0;
while( true ) {
lVar1 = local_18;
if (local_9c <= local_a0) {
uVar4 = in_stack_00000008;
uVar5 = in_stack_00000010;
uVar6 = in_stack_00000018;
uVar3 = verify_merkle_proof(local_18,local_98);
if ((uVar3 & 1) == 0) {
local_c = c4_state_add_error(local_18 + 0x70,"invalid tx proof!");
}
else {
local_c = c4_verify_blockroot_signature
(local_18,local_30,local_48,local_60,0,in_R9,uVar4,uVar5,uVar6);
}
return local_c;
}
ssz_at(local_b8,local_a0);
uVar3 = verify_tx(lVar1,local_98);
if ((uVar3 & 1) == 0) break;
local_a0 = local_a0 + 1;
}
uVar2 = c4_state_add_error(local_18 + 0x70,"invalid receipt proof!");
return uVar2;
}
|
|
1,406 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, 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>::string_t&) | llama.cpp/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, 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>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xbfaf2
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21280
movl $0x20, %edi
callq 0x20620
movq %rax, %rbx
movq %r14, %rdi
callq 0x8af7c
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x5b68e(%rip), %rsi # 0x11b1a4
leaq 0x10(%rsp), %rdi
callq 0x80a4c
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0xbc7d0
xorl %ebp, %ebp
leaq 0xa04ff(%rip), %rsi # 0x160040
leaq -0x48bb8(%rip), %rdx # 0x76f90
movq %rbx, %rdi
callq 0x20a30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbfb6e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20170
testb %bpl, %bpl
jne 0xbfb78
jmp 0xbfb80
movq %rax, %r14
movq %rbx, %rdi
callq 0x20eb0
movq %r14, %rdi
callq 0x20ad0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_BFAF2
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_BFAF2:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BFB6E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BFB6E:
test bpl, bpl
jnz short loc_BFB78
jmp short loc_BFB80
mov r14, rax
loc_BFB78:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BFB80:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2,
long long a3,
long long a4)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_QWORD v7[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v6 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v7,
(long long)"type must be string, but is ",
&v6);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8), a3, a4);
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001bfaf2
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x00121280
LAB_001bfaf2:
MOV EDI,0x20
CALL 0x00120620
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018af7c
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001bfb0f:
LEA RSI,[0x21b1a4]
LEA RDI,[RSP + 0x10]
CALL 0x00180a4c
MOV BPL,0x1
LAB_001bfb23:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001bc7d0
XOR EBP,EBP
LEA RSI,[0x260040]
LEA RDX,[0x176f90]
MOV RDI,RBX
CALL 0x00120a30
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001bfb0f to 001bfb1f has its CatchHandler @ 001bfb75 */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 001bfb23 to 001bfb4f has its CatchHandler @ 001bfb50 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
1,407 | google::protobuf::compiler::cpp::MapFieldGenerator::GenerateSwappingCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/map_field.cc | void MapFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
format("$field$.InternalSwap(&other->$field$);\n");
} | O3 | cpp | google::protobuf::compiler::cpp::MapFieldGenerator::GenerateSwappingCode(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
leaq 0x100f6f(%rip), %rsi # 0x1c8535
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler3cpp17MapFieldGenerator20GenerateSwappingCodeEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
lea rsi, aFieldInternals; "$field$.InternalSwap(&other->$field$);"...
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::MapFieldGenerator::GenerateSwappingCode(
google::protobuf::compiler::cpp::MapFieldGenerator *this,
google::protobuf::io::Printer *a2)
{
long long result; // rax
google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF
_BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF
v3 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v4,
(long long)this + 24);
result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v3, "$field$.InternalSwap(&other->$field$);\n");
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4);
return result;
}
| GenerateSwappingCode:
PUSH R14
PUSH RBX
SUB RSP,0x38
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
LAB_001c75bf:
LEA RSI,[0x2c8535]
MOV RDI,RSP
CALL 0x00139938
LAB_001c75ce:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::MapFieldGenerator::GenerateSwappingCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::MapFieldGenerator::GenerateSwappingCode
(MapFieldGenerator *this,Printer *param_1)
{
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
/* try { // try from 001c75bf to 001c75cd has its CatchHandler @ 001c75de */
Formatter::operator()<>((Formatter *)&local_48,"$field$.InternalSwap(&other->$field$);\n");
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
|
|
1,408 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O0 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
movl -0x4(%rbp), %edx
addl $0x1, %edx
movl $0x20, %esi
callq 0x4a620
movl %eax, -0x124(%rbp)
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl -0x124(%rbp), %eax
jge 0x4c8a2
leaq 0x2550f(%rip), %rax # 0x71d51
testb $0x1, (%rax)
je 0x4c86c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x37bf(%rip), %rcx # 0x50024
callq 0x4ca60
jmp 0x4c88f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x379a(%rip), %rcx # 0x50024
callq 0x4cb10
jmp 0x4c891
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x4c82d
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_120]; this
mov edx, [rbp+var_4]
add edx, 1; int
mov esi, offset qword_20; void **
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbp+var_124], eax
mov [rbp+var_128], 0
loc_4C82D:
mov eax, [rbp+var_128]
cmp eax, [rbp+var_124]
jge short loc_4C8A2
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
test byte ptr [rax], 1
jz short loc_4C86C
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_50024; " "
call _ZN5nglogL15DumpPCAndSymbolEPFvPKcPvES2_S2_S1_; nglog::DumpPCAndSymbol(void (*)(char const*,void *),void *,void *,char const*)
jmp short loc_4C88F
loc_4C86C:
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_50024; " "
call _ZN5nglogL6DumpPCEPFvPKcPvES2_S2_S1_; nglog::DumpPC(void (*)(char const*,void *),void *,void *,char const*)
loc_4C88F:
jmp short $+2
loc_4C891:
mov eax, [rbp+var_128]
add eax, 1
mov [rbp+var_128], eax
jmp short loc_4C82D
loc_4C8A2:
add rsp, 130h
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, nglog *a2, void (*a3)(const char *, void *), void *a4)
{
const char *v4; // r8
long long result; // rax
unsigned int i; // [rsp+8h] [rbp-128h]
int StackTrace; // [rsp+Ch] [rbp-124h]
void *v8[33]; // [rsp+10h] [rbp-120h] BYREF
void (*v9)(const char *, void *); // [rsp+118h] [rbp-18h]
nglog *v10; // [rsp+120h] [rbp-10h]
int v11; // [rsp+12Ch] [rbp-4h]
v11 = (int)this;
v10 = a2;
v9 = a3;
StackTrace = nglog::tools::GetStackTrace((nglog::tools *)v8, (void **)&qword_20, (int)this + 1);
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= StackTrace )
break;
if ( (fLB::FLAGS_symbolize_stacktrace & 1) != 0 )
nglog::DumpPCAndSymbol(v10, v9, v8[i], " ", v4);
else
nglog::DumpPC(v10, v9, v8[i], " ", v4);
}
return result;
}
| DumpStackTrace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x4]
ADD EDX,0x1
MOV ESI,0x20
CALL 0x0014a620
MOV dword ptr [RBP + -0x124],EAX
MOV dword ptr [RBP + -0x128],0x0
LAB_0014c82d:
MOV EAX,dword ptr [RBP + -0x128]
CMP EAX,dword ptr [RBP + -0x124]
JGE 0x0014c8a2
LEA RAX,[0x171d51]
TEST byte ptr [RAX],0x1
JZ 0x0014c86c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x150024]
CALL 0x0014ca60
JMP 0x0014c88f
LAB_0014c86c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x150024]
CALL 0x0014cb10
LAB_0014c88f:
JMP 0x0014c891
LAB_0014c891:
MOV EAX,dword ptr [RBP + -0x128]
ADD EAX,0x1
MOV dword ptr [RBP + -0x128],EAX
JMP 0x0014c82d
LAB_0014c8a2:
ADD RSP,0x130
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
int iVar1;
int local_130;
void *local_128 [33];
void *local_20;
_func_void_char_ptr_void_ptr *local_18;
int local_c;
local_20 = param_3;
local_18 = param_2;
local_c = param_1;
iVar1 = tools::GetStackTrace(local_128,0x20,param_1 + 1);
for (local_130 = 0; local_130 < iVar1; local_130 = local_130 + 1) {
if ((fLB::FLAGS_symbolize_stacktrace & 1) == 0) {
DumpPC(local_18,local_20,local_128[local_130]," ");
}
else {
DumpPCAndSymbol(local_18,local_20,local_128[local_130]," ");
}
}
return;
}
|
|
1,409 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O3 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp # imm = 0x918
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
movl $0x2, %edx
callq 0x20bf0
testl %eax, %eax
jle 0x21d7c
movl %eax, %r13d
leaq 0x110(%rsp), %r15
xorl %ebp, %ebp
movq 0x10(%rsp,%rbp,8), %r12
leaq 0xee77(%rip), %rax # 0x30b41
cmpb $0x1, (%rax)
jne 0x21d41
leaq -0x1(%r12), %rdi
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x20ed0
testb %al, %al
leaq 0x1b1c(%rip), %rax # 0x23808
cmovneq %r15, %rax
movq %rax, (%rsp)
movl $0x400, %esi # imm = 0x400
movq %r13, %r15
movq %r14, %r13
movq %rbx, %r14
leaq 0x510(%rsp), %rbx
movq %rbx, %rdi
leaq 0x34e3(%rip), %rdx # 0x251f7
leaq 0x3241(%rip), %rcx # 0x24f5c
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x78c0
movq %rbx, %rdi
movq %r14, %rbx
movq %r13, %r14
movq %r15, %r13
leaq 0x110(%rsp), %r15
jmp 0x21d6a
movl $0x64, %esi
movq %r15, %rdi
leaq 0x34b4(%rip), %rdx # 0x25204
leaq 0x3205(%rip), %rcx # 0x24f5c
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x78c0
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
incq %rbp
cmpq %rbp, %r13
jne 0x21cbe
addq $0x918, %rsp # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 918h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+948h+var_938]; this
mov esi, offset qword_20; void **
mov edx, 2; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
test eax, eax
jle loc_21D7C
mov r13d, eax
lea r15, [rsp+948h+var_838]
xor ebp, ebp
loc_21CBE:
mov r12, [rsp+rbp*8+948h+var_938]
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
cmp byte ptr [rax], 1
jnz short loc_21D41
lea rdi, [r12-1]
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, al
lea rax, aUnknown; "(unknown)"
cmovnz rax, r15
mov [rsp+948h+var_948], rax
mov esi, 400h
mov r15, r13
mov r13, r14
mov r14, rbx
lea rbx, [rsp+948h+var_438]
mov rdi, rbx
lea rdx, aSPS; "%s@ %*p %s\n"
lea rcx, asc_24F5C; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, rbx
mov rbx, r14
mov r14, r13
mov r13, r15
lea r15, [rsp+948h+var_838]
jmp short loc_21D6A
loc_21D41:
mov esi, 64h ; 'd'
mov rdi, r15
lea rdx, aSP_0; "%s@ %*p\n"
lea rcx, asc_24F5C; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, r15
loc_21D6A:
mov rsi, rbx
call r14
inc rbp
cmp r13, rbp
jnz loc_21CBE
loc_21D7C:
add rsp, 918h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, long long a2, void (*a3)(const char *, void *), void *a4)
{
long long result; // rax
long long v5; // r13
long long i; // rbp
const void *v7; // r12
bool v8; // zf
const char *v9; // rax
_QWORD v10[32]; // [rsp+10h] [rbp-938h] BYREF
_BYTE v11[1024]; // [rsp+110h] [rbp-838h] BYREF
_BYTE v12[1080]; // [rsp+510h] [rbp-438h] BYREF
result = nglog::tools::GetStackTrace((nglog::tools *)v10, (void **)&qword_20, 2);
if ( (int)result > 0 )
{
v5 = (unsigned int)result;
for ( i = 0LL; i != v5; ++i )
{
v7 = (const void *)v10[i];
if ( fLB::FLAGS_symbolize_stacktrace == 1 )
{
v8 = (unsigned __int8)nglog::tools::Symbolize(
(unsigned long long)v7 - 1,
(nglog::tools::_anonymous_namespace_ *)v11,
(char *)&stru_400) == 0;
v9 = "(unknown)";
if ( !v8 )
v9 = v11;
snprintf(v12, 1024LL, "%s@ %*p %s\n", " ", 18, v7, v9);
result = ((long long ( *)(_BYTE *, long long))this)(v12, a2);
}
else
{
snprintf(v11, 100LL, "%s@ %*p\n", " ", 18, (const void *)v10[i]);
result = ((long long ( *)(_BYTE *, long long))this)(v11, a2);
}
}
}
return result;
}
| DumpStackTrace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x918
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x10]
MOV ESI,0x20
MOV EDX,0x2
CALL 0x00120bf0
TEST EAX,EAX
JLE 0x00121d7c
MOV R13D,EAX
LEA R15,[RSP + 0x110]
XOR EBP,EBP
LAB_00121cbe:
MOV R12,qword ptr [RSP + RBP*0x8 + 0x10]
LEA RAX,[0x130b41]
CMP byte ptr [RAX],0x1
JNZ 0x00121d41
LEA RDI,[R12 + -0x1]
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x00120ed0
TEST AL,AL
LEA RAX,[0x123808]
CMOVNZ RAX,R15
MOV qword ptr [RSP],RAX
MOV ESI,0x400
MOV R15,R13
MOV R13,R14
MOV R14,RBX
LEA RBX,[RSP + 0x510]
MOV RDI,RBX
LEA RDX,[0x1251f7]
LEA RCX,[0x124f5c]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x001078c0
MOV RDI,RBX
MOV RBX,R14
MOV R14,R13
MOV R13,R15
LEA R15,[RSP + 0x110]
JMP 0x00121d6a
LAB_00121d41:
MOV ESI,0x64
MOV RDI,R15
LEA RDX,[0x125204]
LEA RCX,[0x124f5c]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x001078c0
MOV RDI,R15
LAB_00121d6a:
MOV RSI,RBX
CALL R14
INC RBP
CMP R13,RBP
JNZ 0x00121cbe
LAB_00121d7c:
ADD RSP,0x918
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
void *pvVar1;
char cVar2;
uint uVar3;
char *pcVar4;
ulong uVar5;
int4 in_register_0000003c;
char *__s;
void *local_938 [32];
char local_838 [1024];
char local_438 [1032];
uVar3 = tools::GetStackTrace(local_938,0x20,2);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
__s = local_838;
pvVar1 = local_938[uVar5];
if (fLB::FLAGS_symbolize_stacktrace == '\x01') {
cVar2 = tools::Symbolize((long)pvVar1 + -1,__s,0x400,0);
pcVar4 = "(unknown)";
if (cVar2 != '\0') {
pcVar4 = __s;
}
__s = local_438;
snprintf(__s,0x400,"%s@ %*p %s\n",&DAT_00124f5c,0x12,pvVar1,pcVar4);
}
else {
snprintf(__s,100,"%s@ %*p\n",&DAT_00124f5c,0x12,pvVar1);
}
(*(code *)CONCAT44(in_register_0000003c,param_1))(__s,param_2);
uVar5 = uVar5 + 1;
} while (uVar3 != uVar5);
}
return;
}
|
|
1,410 | my_charlen_utf8mb3 | eloqsql/strings/ctype-utf8.c | static
int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0xf0)
return my_valid_mbcharlen_utf8mb3(s, e);
return MY_CS_ILSEQ;
} | O0 | c | my_charlen_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x6e6c7
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6e6f4
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x6e6ed
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6f560
movl %eax, -0x4(%rbp)
jmp 0x6e6f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_charlen_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_6E6C7
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_6E6F4
loc_6E6C7:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge short loc_6E6ED
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_valid_mbcharlen_utf8mb3
mov [rbp+var_4], eax
jmp short loc_6E6F4
loc_6E6ED:
mov [rbp+var_4], 0
loc_6E6F4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_charlen_utf8mb3(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
if ( (unsigned long long)a2 < a3 )
{
if ( *a2 >= 0xF0u )
return 0;
else
return (unsigned int)my_valid_mbcharlen_utf8mb3(a2, a3);
}
else
{
return (unsigned int)-101;
}
}
| my_charlen_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0016e6c7
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016e6f4
LAB_0016e6c7:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x0016e6ed
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0016f560
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016e6f4
LAB_0016e6ed:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016e6f4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3)
{
int4 local_c;
if (param_2 < param_3) {
if (*param_2 < 0xf0) {
local_c = my_valid_mbcharlen_utf8mb3(param_2,param_3);
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
1,411 | my_strntoull10rnd_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O0 | c | my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq %r8, -0x138(%rbp)
movq %r9, -0x140(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x60b8e
movq $0xff, -0x128(%rbp)
movq -0x160(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x168(%rbp), %rsi
callq *%rax
movl %eax, -0x174(%rbp)
cmpl $0x0, %eax
jle 0x60c28
movl -0x174(%rbp), %ecx
movq -0x160(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x65, -0x168(%rbp)
ja 0x60c01
cmpq $0x0, -0x168(%rbp)
jne 0x60c03
jmp 0x60c28
movq -0x168(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x60ba3
movq -0x118(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq -0x110(%rbp), %rsi
movq %rsi, -0x188(%rbp)
subq %rsi, %rdx
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %r8
movq -0x140(%rbp), %r9
callq 0x4b4a0
movq -0x188(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x138(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x60ccb
movq -0x180(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
callq 0x24300
| my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_12C], ecx
mov [rbp+var_138], r8
mov [rbp+var_140], r9
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_160], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_170], rax
cmp [rbp+var_128], 100h
jb short loc_60B8E
mov [rbp+var_128], 0FFh
loc_60B8E:
mov rax, [rbp+var_160]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_60BA3:
mov rax, [rbp+var_170]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_160]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_168]
call rax
mov [rbp+var_174], eax
cmp eax, 0
jle short loc_60C28
mov ecx, [rbp+var_174]
mov rax, [rbp+var_160]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_160], rax
cmp [rbp+var_168], 65h ; 'e'
ja short loc_60C01
cmp [rbp+var_168], 0
jnz short loc_60C03
loc_60C01:
jmp short loc_60C28
loc_60C03:
mov rax, [rbp+var_168]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_60BA3
loc_60C28:
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_148]
lea rsi, [rbp+var_110]
mov [rbp+var_188], rsi
sub rdx, rsi
mov ecx, [rbp+var_12C]
mov r8, [rbp+var_138]
mov r9, [rbp+var_140]
call my_strntoull10rnd_8bit
mov rdi, [rbp+var_188]
mov [rbp+var_150], rax
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_138]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
mov rax, [rbp+var_150]
mov [rbp+var_180], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_60CCB
mov rax, [rbp+var_180]
add rsp, 190h
pop rbp
retn
loc_60CCB:
call ___stack_chk_fail
| long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
_QWORD *a5,
int *a6)
{
_BYTE *v6; // rax
int v8; // [rsp+1Ch] [rbp-174h]
long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h]
unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF
long long v11; // [rsp+30h] [rbp-160h]
long long v12; // [rsp+38h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-150h]
_BYTE *v14; // [rsp+48h] [rbp-148h]
int *v15; // [rsp+50h] [rbp-140h]
_QWORD *v16; // [rsp+58h] [rbp-138h]
int v17; // [rsp+64h] [rbp-12Ch]
long long v18; // [rsp+68h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-120h]
long long v20; // [rsp+78h] [rbp-118h]
_BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF
unsigned long long v22; // [rsp+188h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = v21;
v11 = a2;
v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a3 >= 0x100 )
v18 = 255LL;
v12 = v18 + v11;
while ( 1 )
{
v8 = v9(v20, &v10, v11, v12);
if ( v8 <= 0 )
break;
v11 += v8;
if ( v10 > 0x65 || !v10 )
break;
v6 = v14++;
*v6 = v10;
}
v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15);
*v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19;
return v13;
}
| my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV dword ptr [RBP + -0x12c],ECX
MOV qword ptr [RBP + -0x138],R8
MOV qword ptr [RBP + -0x140],R9
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x170],RAX
CMP qword ptr [RBP + -0x128],0x100
JC 0x00160b8e
MOV qword ptr [RBP + -0x128],0xff
LAB_00160b8e:
MOV RAX,qword ptr [RBP + -0x160]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_00160ba3:
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x168]
CALL RAX
MOV dword ptr [RBP + -0x174],EAX
CMP EAX,0x0
JLE 0x00160c28
MOV ECX,dword ptr [RBP + -0x174]
MOV RAX,qword ptr [RBP + -0x160]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x160],RAX
CMP qword ptr [RBP + -0x168],0x65
JA 0x00160c01
CMP qword ptr [RBP + -0x168],0x0
JNZ 0x00160c03
LAB_00160c01:
JMP 0x00160c28
LAB_00160c03:
MOV RAX,qword ptr [RBP + -0x168]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x00160ba3
LAB_00160c28:
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0x110]
MOV qword ptr [RBP + -0x188],RSI
SUB RDX,RSI
MOV ECX,dword ptr [RBP + -0x12c]
MOV R8,qword ptr [RBP + -0x138]
MOV R9,qword ptr [RBP + -0x140]
CALL 0x0014b4a0
MOV RDI,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x150],RAX
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x180],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00160ccb
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x190
POP RBP
RET
LAB_00160ccb:
CALL 0x00124300
|
int8
my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_170;
long local_168;
long local_160;
int8 local_158;
int1 *local_150;
int8 local_148;
long *local_140;
int4 local_134;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_168 = param_2;
local_150 = local_118;
local_148 = param_6;
local_140 = param_5;
local_134 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 &&
(local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) {
*local_150 = (char)local_170;
local_150 = local_150 + 1;
}
local_158 = my_strntoull10rnd_8bit
(local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140,
local_148);
*local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_158;
}
|
|
1,412 | translog_put_LSN_diff | eloqsql/storage/maria/ma_loghandler.c | static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst)
{
uint64 diff;
DBUG_ENTER("translog_put_LSN_diff");
DBUG_PRINT("enter", ("Base: " LSN_FMT " val: " LSN_FMT " dst: %p",
LSN_IN_PARTS(base_lsn), LSN_IN_PARTS(lsn),
dst));
DBUG_ASSERT(base_lsn > lsn);
diff= base_lsn - lsn;
DBUG_PRINT("info", ("Diff: 0x%llx", (ulonglong) diff));
if (diff <= 0x3FFF)
{
dst-= 2;
/*
Note we store this high uchar first to ensure that first uchar has
0 in the 3 upper bits.
*/
dst[0]= (uchar)(diff >> 8);
dst[1]= (uchar)(diff & 0xFF);
}
else if (diff <= 0x3FFFFFL)
{
dst-= 3;
dst[0]= (uchar)(0x40 | (diff >> 16));
int2store(dst + 1, diff & 0xFFFF);
}
else if (diff <= 0x3FFFFFFFL)
{
dst-= 4;
dst[0]= (uchar)(0x80 | (diff >> 24));
int3store(dst + 1, diff & 0xFFFFFFL);
}
else if (diff <= 0x3FFFFFFFFFLL)
{
dst-= 5;
dst[0]= (uchar)(0xC0 | (diff >> 32));
int4store(dst + 1, diff & 0xFFFFFFFFL);
}
else
{
/*
It is full LSN after special 1 diff (which is impossible
in real life)
*/
dst-= 2 + LSN_STORE_SIZE;
dst[0]= 0;
dst[1]= 1;
lsn_store(dst + 2, lsn);
}
DBUG_PRINT("info", ("new dst: %p", dst));
DBUG_RETURN(dst);
} | O0 | c | translog_put_LSN_diff:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x5aac2
jmp 0x5aac4
jmp 0x5aac6
movq -0x8(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x5aad4
cmpq $0x3fff, -0x20(%rbp) # imm = 0x3FFF
ja 0x5ab12
movq -0x18(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x5acb3
cmpq $0x3fffff, -0x20(%rbp) # imm = 0x3FFFFF
ja 0x5ab61
movq -0x18(%rbp), %rax
addq $-0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
shrq $0x10, %rax
orq $0x40, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
andq $0xffff, %rax # imm = 0xFFFF
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x5acb1
cmpq $0x3fffffff, -0x20(%rbp) # imm = 0x3FFFFFFF
ja 0x5abd2
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
shrq $0x18, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0xffffff, %rax # imm = 0xFFFFFF
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
andq $0xffffff, %rax # imm = 0xFFFFFF
shrl $0x8, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x20(%rbp), %rax
andq $0xffffff, %rax # imm = 0xFFFFFF
shrq $0x10, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x5acaf
movabsq $0x3fffffffff, %rax # imm = 0x3FFFFFFFFF
cmpq %rax, -0x20(%rbp)
ja 0x5ac2b
movq -0x18(%rbp), %rax
addq $-0x5, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
shrq $0x20, %rax
orq $0xc0, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x5acad
movq -0x18(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x5ac48
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x5ac83
movq -0x18(%rbp), %rax
addq $0x2, %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
jmp 0x5acab
jmp 0x5acad
jmp 0x5acaf
jmp 0x5acb1
jmp 0x5acb3
jmp 0x5acb5
jmp 0x5acb7
jmp 0x5acb9
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| translog_put_LSN_diff:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_5AAC2:
jmp short $+2
loc_5AAC4:
jmp short $+2
loc_5AAC6:
mov rax, [rbp+var_8]
sub rax, [rbp+var_10]
mov [rbp+var_20], rax
jmp short $+2
loc_5AAD4:
cmp [rbp+var_20], 3FFFh
ja short loc_5AB12
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
shr rax, 8
mov cl, al
mov rax, [rbp+var_18]
mov [rax], cl
mov rax, [rbp+var_20]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_18]
mov [rax+1], cl
jmp loc_5ACB3
loc_5AB12:
cmp [rbp+var_20], offset unk_3FFFFF
ja short loc_5AB61
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFDh
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
shr rax, 10h
or rax, 40h
mov cl, al
mov rax, [rbp+var_18]
mov [rax], cl
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
and rax, 0FFFFh
mov cx, ax
mov rax, [rbp+var_28]
mov [rax], cx
jmp loc_5ACB1
loc_5AB61:
cmp [rbp+var_20], 3FFFFFFFh
ja short loc_5ABD2
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
shr rax, 18h
or rax, 80h
mov cl, al
mov rax, [rbp+var_18]
mov [rax], cl
mov rax, [rbp+var_20]
and rax, 0FFFFFFh
mov cl, al
mov rax, [rbp+var_18]
mov [rax+1], cl
mov rax, [rbp+var_20]
and rax, 0FFFFFFh
shr eax, 8
mov cl, al
mov rax, [rbp+var_18]
mov [rax+2], cl
mov rax, [rbp+var_20]
and rax, 0FFFFFFh
shr rax, 10h
mov cl, al
mov rax, [rbp+var_18]
mov [rax+3], cl
jmp loc_5ACAF
loc_5ABD2:
mov rax, 3FFFFFFFFFh
cmp [rbp+var_20], rax
ja short loc_5AC2B
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFBh
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
shr rax, 20h
or rax, 0C0h
mov cl, al
mov rax, [rbp+var_18]
mov [rax], cl
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_30], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax], ecx
jmp loc_5ACAD
loc_5AC2B:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFF7h
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_18]
mov byte ptr [rax+1], 1
jmp short $+2
loc_5AC48:
mov rax, [rbp+var_10]
sar rax, 20h
mov cl, al
mov rax, [rbp+var_18]
mov [rax+2], cl
mov rax, [rbp+var_10]
sar rax, 20h
shr eax, 8
mov cl, al
mov rax, [rbp+var_18]
mov [rax+3], cl
mov rax, [rbp+var_10]
sar rax, 20h
shr eax, 10h
mov cl, al
mov rax, [rbp+var_18]
mov [rax+4], cl
jmp short $+2
loc_5AC83:
mov rax, [rbp+var_18]
add rax, 2
add rax, 3
mov [rbp+var_38], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
jmp short $+2
loc_5ACAB:
jmp short $+2
loc_5ACAD:
jmp short $+2
loc_5ACAF:
jmp short $+2
loc_5ACB1:
jmp short $+2
loc_5ACB3:
jmp short $+2
loc_5ACB5:
jmp short $+2
loc_5ACB7:
jmp short $+2
loc_5ACB9:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
pop rbp
retn
| long long translog_put_LSN_diff(long long a1, long long a2, long long a3)
{
unsigned long long v4; // [rsp+20h] [rbp-20h]
long long v5; // [rsp+28h] [rbp-18h]
v4 = a1 - a2;
if ( (unsigned long long)(a1 - a2) > 0x3FFF )
{
if ( v4 > (unsigned long long)&unk_3FFFFF )
{
if ( v4 > 0x3FFFFFFF )
{
if ( v4 > 0x3FFFFFFFFFLL )
{
v5 = a3 - 9;
*(_BYTE *)v5 = 0;
*(_BYTE *)(v5 + 1) = 1;
*(_WORD *)(v5 + 2) = WORD2(a2);
*(_BYTE *)(v5 + 4) = BYTE6(a2);
*(_DWORD *)(v5 + 5) = a2;
}
else
{
v5 = a3 - 5;
*(_BYTE *)v5 = BYTE4(v4) | 0xC0;
*(_DWORD *)(v5 + 1) = v4;
}
}
else
{
v5 = a3 - 4;
*(_BYTE *)v5 = ((unsigned int)(a1 - a2) >> 24) | 0x80;
*(_WORD *)(v5 + 1) = v4;
*(_BYTE *)(v5 + 3) = (v4 & 0xFFFFFF) >> 16;
}
}
else
{
v5 = a3 - 3;
*(_BYTE *)v5 = BYTE2(v4) | 0x40;
*(_WORD *)(v5 + 1) = v4;
}
}
else
{
v5 = a3 - 2;
*(_BYTE *)v5 = BYTE1(v4);
*(_BYTE *)(v5 + 1) = v4;
}
return v5;
}
| translog_put_LSN_diff:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x0015aac2
LAB_0015aac2:
JMP 0x0015aac4
LAB_0015aac4:
JMP 0x0015aac6
LAB_0015aac6:
MOV RAX,qword ptr [RBP + -0x8]
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015aad4
LAB_0015aad4:
CMP qword ptr [RBP + -0x20],0x3fff
JA 0x0015ab12
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],CL
JMP 0x0015acb3
LAB_0015ab12:
CMP qword ptr [RBP + -0x20],0x3fffff
JA 0x0015ab61
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x3
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x10
OR RAX,0x40
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xffff
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
JMP 0x0015acb1
LAB_0015ab61:
CMP qword ptr [RBP + -0x20],0x3fffffff
JA 0x0015abd2
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x18
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xffffff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xffffff
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xffffff
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x3],CL
JMP 0x0015acaf
LAB_0015abd2:
MOV RAX,0x3fffffffff
CMP qword ptr [RBP + -0x20],RAX
JA 0x0015ac2b
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x5
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x20
OR RAX,0xc0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
JMP 0x0015acad
LAB_0015ac2b:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],0x1
JMP 0x0015ac48
LAB_0015ac48:
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x4],CL
JMP 0x0015ac83
LAB_0015ac83:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
ADD RAX,0x3
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
JMP 0x0015acab
LAB_0015acab:
JMP 0x0015acad
LAB_0015acad:
JMP 0x0015acaf
LAB_0015acaf:
JMP 0x0015acb1
LAB_0015acb1:
JMP 0x0015acb3
LAB_0015acb3:
JMP 0x0015acb5
LAB_0015acb5:
JMP 0x0015acb7
LAB_0015acb7:
JMP 0x0015acb9
LAB_0015acb9:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
POP RBP
RET
|
byte * translog_put_LSN_diff(long param_1,long param_2,long param_3)
{
byte bVar1;
byte bVar2;
ulong uVar3;
int8 local_20;
uVar3 = param_1 - param_2;
bVar1 = (byte)(uVar3 >> 8);
if (uVar3 < 0x4000) {
local_20 = (byte *)(param_3 + -2);
*local_20 = bVar1;
*(char *)(param_3 + -1) = (char)uVar3;
}
else {
bVar2 = (byte)(uVar3 >> 0x10);
if (uVar3 < 0x400000) {
local_20 = (byte *)(param_3 + -3);
*local_20 = bVar2 | 0x40;
*(short *)(param_3 + -2) = (short)uVar3;
}
else if (uVar3 < 0x40000000) {
local_20 = (byte *)(param_3 + -4);
*local_20 = (byte)(uVar3 >> 0x18) | 0x80;
*(char *)(param_3 + -3) = (char)uVar3;
*(byte *)(param_3 + -2) = bVar1;
*(byte *)(param_3 + -1) = bVar2;
}
else if (uVar3 < 0x4000000000) {
local_20 = (byte *)(param_3 + -5);
*local_20 = (byte)(uVar3 >> 0x20) | 0xc0;
*(int *)(param_3 + -4) = (int)uVar3;
}
else {
local_20 = (byte *)(param_3 + -9);
*local_20 = 0;
*(int1 *)(param_3 + -8) = 1;
*(char *)(param_3 + -7) = (char)((ulong)param_2 >> 0x20);
*(char *)(param_3 + -6) = (char)((ulong)param_2 >> 0x28);
*(char *)(param_3 + -5) = (char)((ulong)param_2 >> 0x30);
*(int *)(param_3 + -4) = (int)param_2;
}
}
return local_20;
}
|
|
1,413 | DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncQuery(std::basic_string_view<char, std::char_traits<char>>) | SylCore-WoTLK/src/server/database/Database/DatabaseWorkerPool.cpp | QueryCallback DatabaseWorkerPool<T>::AsyncQuery(std::string_view sql)
{
BasicStatementTask* task = new BasicStatementTask(sql, true);
// Store future result before enqueueing - task might get already processed and deleted before returning from this method
QueryResultFuture result = task->GetFuture();
Enqueue(task);
return QueryCallback(std::move(result));
} | O0 | cpp | DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncQuery(std::basic_string_view<char, std::char_traits<char>>):
subq $0x78, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x70(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x68(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x40, %edi
callq 0x261820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movups 0x60(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl $0x1, %ecx
callq 0x181090
jmp 0xd2293
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0xc7ed0
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xd1e50
jmp 0xd22bd
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x123ef0
jmp 0xd22cd
leaq 0x20(%rsp), %rdi
callq 0xc7f00
movq 0x8(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
movl $0x40, %esi
callq 0x261a40
jmp 0xd2318
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xc7f00
movq 0x38(%rsp), %rdi
callq 0x21d50
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE10AsyncQueryESt17basic_string_viewIcSt11char_traitsIcEE:
sub rsp, 78h
mov [rsp+78h+var_78], rdi; __int64
mov rax, rdi
mov [rsp+78h+var_70], rax; void *
mov qword ptr [rsp+78h+var_8], rdi; int
mov qword ptr [rsp+78h+var_18], rdx; int
mov qword ptr [rsp+78h+var_18+8], rcx; int
mov [rsp+78h+var_20], rsi; int
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_68], rax; SQLOperation *
mov edi, 40h ; '@'; unsigned __int64
call _Znwm; operator new(ulong)
mov rdi, rax; int
mov rax, rdi
mov qword ptr [rsp+78h+var_60], rax; int
movups xmm0, xmmword ptr [rsp+78h+var_18]
movaps xmmword ptr [rsp+78h+var_38], xmm0; int
mov rsi, qword ptr [rsp+78h+var_38]; int
mov rdx, qword ptr [rsp+78h+var_38+8]; int
mov ecx, 1; int
call _ZN18BasicStatementTaskC2ESt17basic_string_viewIcSt11char_traitsIcEEb; BasicStatementTask::BasicStatementTask(std::string_view,bool)
jmp short $+2
loc_D2293:
mov rax, qword ptr [rsp+78h+var_60]
mov [rsp+78h+var_28], rax
mov rsi, [rsp+78h+var_28]
lea rdi, [rsp+78h+var_58]; this
call _ZNK18BasicStatementTask9GetFutureEv; BasicStatementTask::GetFuture(void)
mov rdi, [rsp+78h+var_68]
mov rsi, [rsp+78h+var_28]
call _ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE7EnqueueEP12SQLOperation; DatabaseWorkerPool<CharacterDatabaseConnection>::Enqueue(SQLOperation *)
jmp short $+2
loc_D22BD:
mov rdi, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_58]
call _ZN13QueryCallbackC2EOSt6futureISt10shared_ptrI9ResultSetEE; QueryCallback::QueryCallback(std::future<std::shared_ptr<ResultSet>> &&)
jmp short $+2
loc_D22CD:
lea rdi, [rsp+78h+var_58]
call _ZNSt6futureISt10shared_ptrI9ResultSetEED2Ev; std::future<std::shared_ptr<ResultSet>>::~future()
mov rax, [rsp+78h+var_70]
add rsp, 78h
retn
mov rdi, [rsp+arg_10]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
mov esi, 40h ; '@'; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_D2318
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_18]
call _ZNSt6futureISt10shared_ptrI9ResultSetEED2Ev; std::future<std::shared_ptr<ResultSet>>::~future()
loc_D2318:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| AsyncQuery:
SUB RSP,0x78
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x58],RSI
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,0x40
CALL 0x00361820
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_001d2287:
MOV ECX,0x1
CALL 0x00281090
LAB_001d2291:
JMP 0x001d2293
LAB_001d2293:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x20]
CALL 0x001c7ed0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x50]
LAB_001d22b6:
CALL 0x001d1e50
JMP 0x001d22bd
LAB_001d22bd:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x20]
CALL 0x00223ef0
LAB_001d22cb:
JMP 0x001d22cd
LAB_001d22cd:
LEA RDI,[RSP + 0x20]
CALL 0x001c7f00
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x78
RET
|
/* DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncQuery(std::basic_string_view<char,
std::char_traits<char> >) */
QueryCallback *
DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncQuery
(QueryCallback *param_1,DatabaseWorkerPool<CharacterDatabaseConnection> *param_2,
int8 param_3,int8 param_4)
{
BasicStatementTask *pBVar1;
BasicStatementTask local_58 [32];
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
SQLOperation *local_28;
DatabaseWorkerPool<CharacterDatabaseConnection> *local_20;
int8 local_18;
int8 uStack_10;
QueryCallback *local_8;
local_20 = param_2;
local_18 = param_3;
uStack_10 = param_4;
local_8 = param_1;
pBVar1 = (BasicStatementTask *)operator_new(0x40);
local_38 = (int4)local_18;
uStack_34 = local_18._4_4_;
uStack_30 = (int4)uStack_10;
uStack_2c = uStack_10._4_4_;
/* try { // try from 001d2287 to 001d2290 has its CatchHandler @ 001d22e1 */
BasicStatementTask::BasicStatementTask(pBVar1,local_18,uStack_10,1);
local_28 = (SQLOperation *)pBVar1;
BasicStatementTask::GetFuture(local_58);
/* try { // try from 001d22b6 to 001d22ca has its CatchHandler @ 001d2300 */
Enqueue(param_2,local_28);
QueryCallback::QueryCallback(param_1,(future *)local_58);
std::future<std::shared_ptr<ResultSet>>::~future((future<std::shared_ptr<ResultSet>> *)local_58);
return param_1;
}
|
||
1,414 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O0 | c | next_type:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xa5c99
callq 0x23250
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xa5ca2
jmp 0xa5cb0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa5c64
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xa5d1f
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x5b, %esi
movl $0x5d, %edx
callq 0xa5db0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xa5cf3
movq $0x0, -0x8(%rbp)
jmp 0xa5d98
movq -0x30(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa5d98
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0xa5d83
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x7b, %esi
movl $0x7d, %edx
callq 0xa5db0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xa5d57
movq $0x0, -0x8(%rbp)
jmp 0xa5d98
movq -0x38(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa5d98
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xa5e40
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| next_type:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
loc_A5C64:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_A5C99
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_10]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_39], al
loc_A5C99:
mov al, [rbp+var_39]
test al, 1
jnz short loc_A5CA2
jmp short loc_A5CB0
loc_A5CA2:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_A5C64
loc_A5CB0:
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Bh ; '['
jnz short loc_A5D1F
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 5Bh ; '['
mov edx, 5Dh ; ']'
call find_end_0
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_A5CF3
mov [rbp+var_8], 0
jmp loc_A5D98
loc_A5CF3:
mov rcx, [rbp+var_30]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_A5D98
loc_A5D1F:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Bh ; '{'
jnz short loc_A5D83
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 7Bh ; '{'
mov edx, 7Dh ; '}'
call find_end_0
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_A5D57
mov [rbp+var_8], 0
jmp short loc_A5D98
loc_A5D57:
mov rcx, [rbp+var_38]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_A5D98
loc_A5D83:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call next_name
mov [rbp+var_8], rax
loc_A5D98:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long next_type(_BYTE *a1, _QWORD *a2, _DWORD *a3)
{
bool v4; // [rsp+7h] [rbp-39h]
long long v5; // [rsp+8h] [rbp-38h]
long long end_0; // [rsp+10h] [rbp-30h]
while ( 1 )
{
v4 = 0;
if ( *a1 )
v4 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * (char)*a1) & 0x2000) != 0;
if ( !v4 )
break;
++a1;
}
if ( *a1 == 91 )
{
end_0 = find_end_0(a1 + 1, 91LL, 93LL);
if ( end_0 )
{
*a2 = end_0 + 1;
*a3 = end_0 - (_DWORD)a1;
return (long long)a1;
}
else
{
return 0LL;
}
}
else if ( *a1 == 123 )
{
v5 = find_end_0(a1 + 1, 123LL, 125LL);
if ( v5 )
{
*a2 = v5 + 1;
*a3 = v5 - (_DWORD)a1;
return (long long)a1;
}
else
{
return 0LL;
}
}
else
{
return next_name(a1, a2, a3);
}
}
| next_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LAB_001a5c64:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x001a5c99
CALL 0x00123250
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x39],AL
LAB_001a5c99:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x001a5ca2
JMP 0x001a5cb0
LAB_001a5ca2:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001a5c64
LAB_001a5cb0:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5b
JNZ 0x001a5d1f
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x5b
MOV EDX,0x5d
CALL 0x001a5db0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001a5cf3
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a5d98
LAB_001a5cf3:
MOV RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a5d98
LAB_001a5d1f:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7b
JNZ 0x001a5d83
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x7b
MOV EDX,0x7d
CALL 0x001a5db0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001a5d57
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a5d98
LAB_001a5d57:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a5d98
LAB_001a5d83:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001a5e40
MOV qword ptr [RBP + -0x8],RAX
LAB_001a5d98:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
char * next_type(char *param_1,long *param_2,int *param_3)
{
ushort **ppuVar1;
long lVar2;
bool bVar3;
char *local_18;
char *local_10;
local_18 = param_1;
while( true ) {
bVar3 = false;
if (*local_18 != '\0') {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_18] & 0x2000) != 0;
}
if (!bVar3) break;
local_18 = local_18 + 1;
}
if (*local_18 == '[') {
lVar2 = find_end(local_18 + 1,0x5b,0x5d);
if (lVar2 == 0) {
local_10 = (char *)0x0;
}
else {
*param_2 = lVar2 + 1;
*param_3 = (int)lVar2 - (int)local_18;
local_10 = local_18;
}
}
else if (*local_18 == '{') {
lVar2 = find_end(local_18 + 1,0x7b,0x7d);
if (lVar2 == 0) {
local_10 = (char *)0x0;
}
else {
*param_2 = lVar2 + 1;
*param_3 = (int)lVar2 - (int)local_18;
local_10 = local_18;
}
}
else {
local_10 = (char *)next_name(local_18,param_2,param_3);
}
return local_10;
}
|
|
1,415 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O2 | c | next_type:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rdi, %rbx
movsbq (%rbx), %r13
testq %r13, %r13
je 0x4f4af
callq 0x22240
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r13,2)
je 0x4f495
incq %rbx
incl %r15d
jmp 0x4f474
cmpb $0x7b, %r13b
je 0x4f4c3
movzbl %r13b, %eax
cmpl $0x5b, %eax
jne 0x4f4af
leaq 0x1(%rbx), %rdi
pushq $0x5b
popq %rsi
pushq $0x5d
jmp 0x4f4cc
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4f520
leaq 0x1(%rbx), %rdi
pushq $0x7b
popq %rsi
pushq $0x7d
popq %rdx
callq 0x4f4f8
testq %rax, %rax
je 0x4f4e9
movq %rax, %rcx
incq %rcx
movq %rcx, (%r12)
subl %r15d, %eax
movl %eax, (%r14)
jmp 0x4f4eb
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| next_type:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rbx, rdi
loc_4F474:
movsx r13, byte ptr [rbx]
test r13, r13
jz short loc_4F4AF
call ___ctype_b_loc
mov rax, [rax]
test byte ptr [rax+r13*2+1], 20h
jz short loc_4F495
inc rbx
inc r15d
jmp short loc_4F474
loc_4F495:
cmp r13b, 7Bh ; '{'
jz short loc_4F4C3
movzx eax, r13b
cmp eax, 5Bh ; '['
jnz short loc_4F4AF
lea rdi, [rbx+1]
push 5Bh ; '['
pop rsi
push 5Dh ; ']'
jmp short loc_4F4CC
loc_4F4AF:
mov rdi, rbx
mov rsi, r12
mov rdx, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp short next_name
loc_4F4C3:
lea rdi, [rbx+1]
push 7Bh ; '{'
pop rsi
push 7Dh ; '}'
loc_4F4CC:
pop rdx
call find_end_0
test rax, rax
jz short loc_4F4E9
mov rcx, rax
inc rcx
mov [r12], rcx
sub eax, r15d
mov [r14], eax
jmp short loc_4F4EB
loc_4F4E9:
xor ebx, ebx
loc_4F4EB:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long next_type(_BYTE *a1, _QWORD *a2, _DWORD *a3)
{
int v4; // r15d
_BYTE *i; // rbx
long long v6; // r13
long long end_0; // rax
v4 = (int)a1;
for ( i = a1; ; ++i )
{
v6 = (char)*i;
if ( !*i )
return next_name(i, a2, a3);
if ( (*(_BYTE *)(*(_QWORD *)__ctype_b_loc(a1) + 2 * v6 + 1) & 0x20) == 0 )
break;
++v4;
}
if ( (_BYTE)v6 == 123 )
{
end_0 = find_end_0(i + 1, 123LL, 125LL);
}
else
{
if ( (unsigned __int8)v6 != 91 )
return next_name(i, a2, a3);
end_0 = find_end_0(i + 1, 91LL, 93LL);
}
if ( !end_0 )
return 0LL;
*a2 = end_0 + 1;
*a3 = end_0 - v4;
return (long long)i;
}
| next_type:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV RBX,RDI
LAB_0014f474:
MOVSX R13,byte ptr [RBX]
TEST R13,R13
JZ 0x0014f4af
CALL 0x00122240
MOV RAX,qword ptr [RAX]
TEST byte ptr [RAX + R13*0x2 + 0x1],0x20
JZ 0x0014f495
INC RBX
INC R15D
JMP 0x0014f474
LAB_0014f495:
CMP R13B,0x7b
JZ 0x0014f4c3
MOVZX EAX,R13B
CMP EAX,0x5b
JNZ 0x0014f4af
LEA RDI,[RBX + 0x1]
PUSH 0x5b
POP RSI
PUSH 0x5d
JMP 0x0014f4cc
LAB_0014f4af:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0014f520
LAB_0014f4c3:
LEA RDI,[RBX + 0x1]
PUSH 0x7b
POP RSI
PUSH 0x7d
LAB_0014f4cc:
POP RDX
CALL 0x0014f4f8
TEST RAX,RAX
JZ 0x0014f4e9
MOV RCX,RAX
INC RCX
MOV qword ptr [R12],RCX
SUB EAX,R15D
MOV dword ptr [R14],EAX
JMP 0x0014f4eb
LAB_0014f4e9:
XOR EBX,EBX
LAB_0014f4eb:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
char * next_type(char *param_1,long *param_2,int *param_3)
{
char cVar1;
ushort **ppuVar2;
char *pcVar3;
long lVar4;
int8 uVar5;
int8 uStack_30;
pcVar3 = param_1;
do {
cVar1 = *param_1;
if ((long)cVar1 == 0) {
LAB_0014f4af:
pcVar3 = (char *)next_name(param_1,param_2,param_3);
return pcVar3;
}
ppuVar2 = __ctype_b_loc();
if ((*(byte *)((long)*ppuVar2 + (long)cVar1 * 2 + 1) & 0x20) == 0) {
if (cVar1 == '{') {
uVar5 = 0x7b;
uStack_30 = 0x7d;
}
else {
if (cVar1 != '[') goto LAB_0014f4af;
uVar5 = 0x5b;
uStack_30 = 0x5d;
}
lVar4 = find_end(param_1 + 1,uVar5,uStack_30);
if (lVar4 == 0) {
param_1 = (char *)0x0;
}
else {
*param_2 = lVar4 + 1;
*param_3 = (int)lVar4 - (int)pcVar3;
}
return param_1;
}
param_1 = param_1 + 1;
pcVar3 = (char *)(ulong)((int)pcVar3 + 1);
} while( true );
}
|
|
1,416 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O3 | c | next_type:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x566c3
callq 0x21220
movq (%rax), %rcx
addq $0x2, %r15
movq %r15, %rax
movsbq %bpl, %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x56677
movb -0x1(%rax), %bpl
incq %rax
testb %bpl, %bpl
jne 0x56657
addq $-0x2, %rax
movq %rax, %r15
jmp 0x566c3
leaq -0x2(%rax), %r15
cmpb $0x5b, %bpl
je 0x566d8
movzbl %bpl, %ecx
cmpl $0x7b, %ecx
jne 0x566c3
movb -0x1(%rax), %sil
testb %sil, %sil
je 0x5670f
movl $0x1, %ecx
movl $0x1, %edx
cmpb $0x7d, %sil
je 0x566b0
movzbl %sil, %esi
cmpl $0x7b, %esi
jne 0x566b4
incl %edx
jmp 0x566b4
decl %edx
je 0x56720
movb (%rax), %sil
incq %rax
incl %ecx
testb %sil, %sil
jne 0x5669d
jmp 0x5670f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x56727
movb -0x1(%rax), %sil
testb %sil, %sil
je 0x5670f
movl $0x1, %ecx
movl $0x1, %edx
cmpb $0x5d, %sil
je 0x566fe
movzbl %sil, %esi
cmpl $0x5b, %esi
jne 0x56702
incl %edx
jmp 0x56702
decl %edx
je 0x56720
movb (%rax), %sil
incq %rax
incl %ecx
testb %sil, %sil
jne 0x566eb
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%r14)
movl %ecx, (%rbx)
jmp 0x56712
| next_type:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov bpl, [rdi]
test bpl, bpl
jz short loc_566C3
call ___ctype_b_loc
mov rcx, [rax]
add r15, 2
mov rax, r15
loc_56657:
movsx rdx, bpl
test byte ptr [rcx+rdx*2+1], 20h
jz short loc_56677
mov bpl, [rax-1]
inc rax
test bpl, bpl
jnz short loc_56657
add rax, 0FFFFFFFFFFFFFFFEh
mov r15, rax
jmp short loc_566C3
loc_56677:
lea r15, [rax-2]
cmp bpl, 5Bh ; '['
jz short loc_566D8
movzx ecx, bpl
cmp ecx, 7Bh ; '{'
jnz short loc_566C3
mov sil, [rax-1]
test sil, sil
jz short loc_5670F
mov ecx, 1
mov edx, 1
loc_5669D:
cmp sil, 7Dh ; '}'
jz short loc_566B0
movzx esi, sil
cmp esi, 7Bh ; '{'
jnz short loc_566B4
inc edx
jmp short loc_566B4
loc_566B0:
dec edx
jz short loc_56720
loc_566B4:
mov sil, [rax]
inc rax
inc ecx
test sil, sil
jnz short loc_5669D
jmp short loc_5670F
loc_566C3:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short next_name
loc_566D8:
mov sil, [rax-1]
test sil, sil
jz short loc_5670F
mov ecx, 1
mov edx, 1
loc_566EB:
cmp sil, 5Dh ; ']'
jz short loc_566FE
movzx esi, sil
cmp esi, 5Bh ; '['
jnz short loc_56702
inc edx
jmp short loc_56702
loc_566FE:
dec edx
jz short loc_56720
loc_56702:
mov sil, [rax]
inc rax
inc ecx
test sil, sil
jnz short loc_566EB
loc_5670F:
xor r15d, r15d
loc_56712:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_56720:
mov [r14], rax
mov [rbx], ecx
jmp short loc_56712
| long long next_type(char *a1, char **a2, int *a3)
{
char *v5; // r15
char v6; // bp
long long v7; // rcx
char *v8; // rax
char v9; // si
int v10; // ecx
int v11; // edx
char v13; // si
int v14; // edx
v5 = a1;
v6 = *a1;
if ( !*a1 )
return next_name(v5, a2, a3);
v7 = *(_QWORD *)__ctype_b_loc(a1);
v8 = a1 + 2;
while ( (*(_BYTE *)(v7 + 2LL * v6 + 1) & 0x20) != 0 )
{
v6 = *(v8++ - 1);
if ( !v6 )
{
v5 = v8 - 2;
return next_name(v5, a2, a3);
}
}
v5 = v8 - 2;
if ( v6 != 91 )
{
if ( v6 != 123 )
return next_name(v5, a2, a3);
v9 = *(v8 - 1);
if ( v9 )
{
v10 = 1;
v11 = 1;
do
{
if ( v9 == 125 )
{
if ( !--v11 )
goto LABEL_26;
}
else if ( v9 == 123 )
{
++v11;
}
v9 = *v8++;
++v10;
}
while ( v9 );
}
return 0LL;
}
v13 = *(v8 - 1);
if ( !v13 )
return 0LL;
v10 = 1;
v14 = 1;
while ( 1 )
{
if ( v13 != 93 )
{
if ( v13 == 91 )
++v14;
goto LABEL_23;
}
if ( !--v14 )
break;
LABEL_23:
v13 = *v8++;
++v10;
if ( !v13 )
return 0LL;
}
LABEL_26:
*a2 = v8;
*a3 = v10;
return (long long)v5;
}
| next_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV BPL,byte ptr [RDI]
TEST BPL,BPL
JZ 0x001566c3
CALL 0x00121220
MOV RCX,qword ptr [RAX]
ADD R15,0x2
MOV RAX,R15
LAB_00156657:
MOVSX RDX,BPL
TEST byte ptr [RCX + RDX*0x2 + 0x1],0x20
JZ 0x00156677
MOV BPL,byte ptr [RAX + -0x1]
INC RAX
TEST BPL,BPL
JNZ 0x00156657
ADD RAX,-0x2
MOV R15,RAX
JMP 0x001566c3
LAB_00156677:
LEA R15,[RAX + -0x2]
CMP BPL,0x5b
JZ 0x001566d8
MOVZX ECX,BPL
CMP ECX,0x7b
JNZ 0x001566c3
MOV SIL,byte ptr [RAX + -0x1]
TEST SIL,SIL
JZ 0x0015670f
MOV ECX,0x1
MOV EDX,0x1
LAB_0015669d:
CMP SIL,0x7d
JZ 0x001566b0
MOVZX ESI,SIL
CMP ESI,0x7b
JNZ 0x001566b4
INC EDX
JMP 0x001566b4
LAB_001566b0:
DEC EDX
JZ 0x00156720
LAB_001566b4:
MOV SIL,byte ptr [RAX]
INC RAX
INC ECX
TEST SIL,SIL
JNZ 0x0015669d
JMP 0x0015670f
LAB_001566c3:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00156727
LAB_001566d8:
MOV SIL,byte ptr [RAX + -0x1]
TEST SIL,SIL
JZ 0x0015670f
MOV ECX,0x1
MOV EDX,0x1
LAB_001566eb:
CMP SIL,0x5d
JZ 0x001566fe
MOVZX ESI,SIL
CMP ESI,0x5b
JNZ 0x00156702
INC EDX
JMP 0x00156702
LAB_001566fe:
DEC EDX
JZ 0x00156720
LAB_00156702:
MOV SIL,byte ptr [RAX]
INC RAX
INC ECX
TEST SIL,SIL
JNZ 0x001566eb
LAB_0015670f:
XOR R15D,R15D
LAB_00156712:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00156720:
MOV qword ptr [R14],RAX
MOV dword ptr [RBX],ECX
JMP 0x00156712
|
char * next_type(char *param_1,int8 *param_2,int *param_3)
{
ushort **ppuVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
char cVar6;
cVar6 = *param_1;
if (cVar6 != '\0') {
ppuVar1 = __ctype_b_loc();
pcVar3 = param_1 + 2;
do {
pcVar2 = pcVar3;
if ((*(byte *)((long)*ppuVar1 + (long)cVar6 * 2 + 1) & 0x20) == 0) {
param_1 = pcVar2 + -2;
if (cVar6 == '[') {
cVar6 = pcVar2[-1];
if (cVar6 == '\0') {
return (char *)0x0;
}
iVar4 = 1;
iVar5 = 1;
goto LAB_001566eb;
}
if (cVar6 != '{') goto LAB_001566c3;
cVar6 = pcVar2[-1];
if (cVar6 == '\0') {
return (char *)0x0;
}
iVar4 = 1;
iVar5 = 1;
goto LAB_0015669d;
}
cVar6 = pcVar2[-1];
pcVar3 = pcVar2 + 1;
} while (cVar6 != '\0');
param_1 = pcVar2 + -1;
}
LAB_001566c3:
pcVar3 = (char *)next_name(param_1,param_2,param_3);
return pcVar3;
LAB_001566eb:
if (cVar6 == ']') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) goto LAB_00156720;
}
else if (cVar6 == '[') {
iVar5 = iVar5 + 1;
}
cVar6 = *pcVar2;
pcVar2 = pcVar2 + 1;
iVar4 = iVar4 + 1;
if (cVar6 == '\0') {
return (char *)0x0;
}
goto LAB_001566eb;
LAB_0015669d:
if (cVar6 == '}') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) {
LAB_00156720:
*param_2 = pcVar2;
*param_3 = iVar4;
return param_1;
}
}
else if (cVar6 == '{') {
iVar5 = iVar5 + 1;
}
cVar6 = *pcVar2;
pcVar2 = pcVar2 + 1;
iVar4 = iVar4 + 1;
if (cVar6 == '\0') {
return (char *)0x0;
}
goto LAB_0015669d;
}
|
|
1,417 | FTB_WORD_cmp_list | eloqsql/storage/myisam/ft_boolean_search.c | static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1,
(uchar*) (*b)->word + 1, (*b)->len - 1, 0);
if (!i)
i= CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
} | O3 | c | FTB_WORD_cmp_list:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rsi
movl 0x48(%rsi), %edx
addq $0x4e, %rsi
decl %edx
movq (%rbx), %rcx
movl 0x48(%rcx), %r8d
addq $0x4e, %rcx
decl %r8d
xorl %r9d, %r9d
callq 0xa14e4
testl %eax, %eax
jne 0x74d56
movq (%r14), %rax
movl 0x44(%rax), %eax
movq (%rbx), %rcx
xorl %edx, %edx
cmpl 0x44(%rcx), %eax
setne %dl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovael %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| FTB_WORD_cmp_list:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov rsi, [rsi]
mov edx, [rsi+48h]
add rsi, 4Eh ; 'N'
dec edx
mov rcx, [rbx]
mov r8d, [rcx+48h]
add rcx, 4Eh ; 'N'
dec r8d
xor r9d, r9d
call ha_compare_text
test eax, eax
jnz short loc_74D56
mov rax, [r14]
mov eax, [rax+44h]
mov rcx, [rbx]
xor edx, edx
cmp eax, [rcx+44h]
setnz dl
mov eax, 0FFFFFFFFh
cmovnb eax, edx
loc_74D56:
pop rbx
pop r14
pop rbp
retn
| long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3)
{
long long result; // rax
unsigned int v5; // eax
bool v6; // cf
BOOL v7; // edx
result = ha_compare_text(
a1,
*(_QWORD *)a2 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1),
*(_QWORD *)a3 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1),
0LL);
if ( !(_DWORD)result )
{
v5 = *(_DWORD *)(*(_QWORD *)a2 + 68LL);
v6 = v5 < *(_DWORD *)(*(_QWORD *)a3 + 68LL);
v7 = v5 != *(_DWORD *)(*(_QWORD *)a3 + 68LL);
result = 0xFFFFFFFFLL;
if ( !v6 )
return v7;
}
return result;
}
| FTB_WORD_cmp_list:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [RSI + 0x48]
ADD RSI,0x4e
DEC EDX
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RCX + 0x48]
ADD RCX,0x4e
DEC R8D
XOR R9D,R9D
CALL 0x001a14e4
TEST EAX,EAX
JNZ 0x00174d56
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBX]
XOR EDX,EDX
CMP EAX,dword ptr [RCX + 0x44]
SETNZ DL
MOV EAX,0xffffffff
CMOVNC EAX,EDX
LAB_00174d56:
POP RBX
POP R14
POP RBP
RET
|
ulong FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3)
{
ulong uVar1;
uVar1 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e,
*(int *)(*param_3 + 0x48) + -1,0);
if ((int)uVar1 == 0) {
uVar1 = 0xffffffff;
if (*(uint *)(*param_3 + 0x44) <= *(uint *)(*param_2 + 0x44)) {
uVar1 = (ulong)(*(uint *)(*param_2 + 0x44) != *(uint *)(*param_3 + 0x44));
}
}
return uVar1;
}
|
|
1,418 | google::protobuf::EnumOptions::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void EnumOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
::memset(&_impl_.allow_alias_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.deprecated_) -
reinterpret_cast<char*>(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_));
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | cpp | google::protobuf::EnumOptions::Clear():
subq $0x48, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
addq $0x10, %rdi
callq 0x1984c0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0xd6c10
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x38, %rdi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x39, %rdx
addq $0x10, %rax
addq $0x38, %rax
subq %rax, %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x13200
movq 0x8(%rsp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x13200
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb6f2d
movq 0x10(%rsp), %rdi
callq 0xe0a90
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf11EnumOptions5ClearEv:
sub rsp, 48h
mov [rsp+48h+var_28], rdi
mov rdi, [rsp+48h+var_28]
mov [rsp+48h+var_40], rdi
mov [rsp+48h+var_2C], 0
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
mov rdi, [rsp+48h+var_40]
add rdi, 10h
add rdi, 20h ; ' '
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void)
mov rax, [rsp+48h+var_40]
mov rdi, rax
add rdi, 10h
add rdi, 38h ; '8'
mov rdx, rax
add rdx, 10h
add rdx, 39h ; '9'
add rax, 10h
add rax, 38h ; '8'
sub rdx, rax
add rdx, 1
xor esi, esi
call _memset
mov rax, [rsp+48h+var_40]
add rax, 10h
add rax, 18h
mov [rsp+48h+var_10], rax
mov rdi, [rsp+48h+var_10]
xor esi, esi
mov edx, 4
call _memset
mov rax, [rsp+48h+var_40]
add rax, 8
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_8], rax
mov rax, [rsp+48h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_B6F2D
mov rdi, [rsp+48h+var_38]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_B6F2D:
add rsp, 48h
retn
| long long google::protobuf::EnumOptions::Clear(google::protobuf::EnumOptions *this)
{
long long result; // rax
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::EnumOptions *)((char *)this + 16));
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 48);
memset((char *)this + 72, 0LL, 2LL);
memset((char *)this + 40, 0LL, 4LL);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| Clear:
SUB RSP,0x48
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x1c],0x0
ADD RDI,0x10
CALL 0x002984c0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
ADD RDI,0x20
CALL 0x001d6c10
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,RAX
ADD RDI,0x10
ADD RDI,0x38
MOV RDX,RAX
ADD RDX,0x10
ADD RDX,0x39
ADD RAX,0x10
ADD RAX,0x38
SUB RDX,RAX
ADD RDX,0x1
XOR ESI,ESI
CALL 0x00113200
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x10
ADD RAX,0x18
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
XOR ESI,ESI
MOV EDX,0x4
CALL 0x00113200
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x8
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b6f2d
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001e0a90
LAB_001b6f2d:
ADD RSP,0x48
RET
|
/* google::protobuf::EnumOptions::Clear() */
void __thiscall google::protobuf::EnumOptions::Clear(EnumOptions *this)
{
internal::ExtensionSet::Clear((ExtensionSet *)(this + 0x10));
RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear
((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x30));
memset(this + 0x48,0,2);
memset(this + 0x28,0,4);
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
return;
}
|
|
1,419 | psi_mutex_lock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O3 | c | psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2caff9(%rip), %r15 # 0x2ef820
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x24590
movl %eax, %r14d
testq %rbx, %rbx
je 0x2485c
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_mutex_lock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+40h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_lock
mov r14d, eax
test rbx, rbx
jz short loc_2485C
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_2485C:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v3, v4);
return v4;
}
| psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x3ef820]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x00124590
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012485c
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_0012485c:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
1,420 | fill_quick_table | eloqsql/storage/myisam/mi_packrec.c | static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
uint value)
{
uint16 *end;
DBUG_ENTER("fill_quick_table");
/*
Bits 1..8 of value represent the decoded byte value.
Bits 9..14 become the length of the Huffman code for this byte value.
Bit 16 flags a valid code (IS_CHAR).
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
for (end= table + ((my_ptrdiff_t) 1 << bits); table < end; table++)
{
*table= (uint16) value;
}
DBUG_VOID_RETURN;
} | O0 | c | fill_quick_table:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
shll $0x8, %eax
orl $0x8000, %eax # imm = 0x8000
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xbc736
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0xbc711
jmp 0xbc738
jmp 0xbc73a
popq %rbp
retq
nopl (%rax)
| fill_quick_table_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov eax, [rbp+var_10]
sub eax, [rbp+var_C]
shl eax, 8
or eax, 8000h
or eax, [rbp+var_14]
mov [rbp+var_14], eax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
shl rcx, 1
add rax, rcx
mov [rbp+var_20], rax
loc_BC711:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnb short loc_BC736
mov eax, [rbp+var_14]
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
jmp short loc_BC711
loc_BC736:
jmp short $+2
loc_BC738:
jmp short $+2
loc_BC73A:
pop rbp
retn
| _WORD * fill_quick_table_0(_WORD *a1, __int16 a2, __int16 a3, __int16 a4)
{
_WORD *result; // rax
_WORD *i; // [rsp+18h] [rbp-8h]
for ( i = a1; ; ++i )
{
result = i;
if ( i >= &a1[1LL << a2] )
break;
*i = a4 | ((a3 - a2) << 8) | 0x8000;
}
return result;
}
| fill_quick_table:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV EAX,dword ptr [RBP + -0x10]
SUB EAX,dword ptr [RBP + -0xc]
SHL EAX,0x8
OR EAX,0x8000
OR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001bc711:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001bc736
MOV EAX,dword ptr [RBP + -0x14]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001bc711
LAB_001bc736:
JMP 0x001bc738
LAB_001bc738:
JMP 0x001bc73a
LAB_001bc73a:
POP RBP
RET
|
void fill_quick_table(ushort *param_1,short param_2,short param_3,ushort param_4)
{
ushort *local_10;
for (local_10 = param_1; local_10 < param_1 + (1L << ((byte)param_2 & 0x3f));
local_10 = local_10 + 1) {
*local_10 = (param_3 - param_2) * 0x100 | 0x8000U | param_4;
}
return;
}
|
|
1,421 | 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>::size() const | monkey531[P]llama/common/./json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x4adec
cmpl $0x1, %eax
je 0x4adc9
cmpl $0x2, %eax
jne 0x4ade7
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_4ADEC
cmp eax, 1
jz short loc_4ADC9
cmp eax, 2
jnz short loc_4ADE7
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_4ADC9:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_4ADE7:
mov eax, 1
locret_4ADEC:
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0014adec
CMP EAX,0x1
JZ 0x0014adc9
CMP EAX,0x2
JNZ 0x0014ade7
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0014adc9:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_0014ade7:
MOV EAX,0x1
LAB_0014adec:
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
ulong __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
basic_json<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>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
|
|
1,422 | my_aes_crypt | eloqsql/mysys_ssl/my_crypt.cc | int my_aes_crypt(enum my_aes_mode mode, int flags,
const uchar *src, uint slen, uchar *dst, uint *dlen,
const uchar *key, uint klen, const uchar *iv, uint ivlen)
{
void *ctx= alloca(MY_AES_CTX_SIZE);
int res1, res2;
uint d1= 0, d2;
if ((res1= my_aes_crypt_init(ctx, mode, flags, key, klen, iv, ivlen)))
return res1;
res1= my_aes_crypt_update(ctx, src, slen, dst, &d1);
res2= my_aes_crypt_finish(ctx, dst + d1, &d2);
if (res1 || res2)
ERR_remove_state(0); /* in case of failure clear error queue */
else
*dlen= d1 + d2;
return res1 ? res1 : res2;
} | O3 | cpp | my_aes_crypt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %r12d
movq %rdx, %r13
movl %esi, %edx
movl %edi, %esi
movq 0x10(%rbp), %rcx
movl 0x18(%rbp), %r8d
movq 0x20(%rbp), %r9
movl 0x28(%rbp), %eax
movq %fs:0x28, %rdi
movq %rdi, -0x30(%rbp)
movl $0x0, -0x2d4(%rbp)
movl %eax, (%rsp)
leaq -0x2d0(%rbp), %rdi
callq 0x97eac
movl %eax, %r15d
testl %eax, %eax
jne 0x98114
movq %rbx, -0x2e0(%rbp)
leaq -0x2d0(%rbp), %rbx
movq (%rbx), %rax
leaq -0x2d4(%rbp), %r15
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r14, %rcx
movq %r15, %r8
callq *0x18(%rax)
movl %eax, %r12d
movl (%r15), %esi
addq %r14, %rsi
movq (%rbx), %rax
leaq -0x2d8(%rbp), %rdx
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r15d
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl %r15d, %eax
orl %r12d, %eax
je 0x980f8
callq 0x2a800
jmp 0x9810d
movl -0x2d8(%rbp), %eax
addl -0x2d4(%rbp), %eax
movq -0x2e0(%rbp), %rcx
movl %eax, (%rcx)
testl %r12d, %r12d
cmovnel %r12d, %r15d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x98138
movl %r15d, %eax
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a250
| my_aes_crypt:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2C8h
mov rbx, r9
mov r14, r8
mov r12d, ecx
mov r13, rdx
mov edx, esi
mov esi, edi
mov rcx, [rbp+arg_0]
mov r8d, [rbp+arg_8]
mov r9, [rbp+arg_10]
mov eax, [rbp+arg_18]
mov rdi, fs:28h
mov [rbp+var_30], rdi
mov [rbp+var_2D4], 0
mov [rsp+2F0h+var_2F0], eax
lea rdi, [rbp+var_2D0]
call my_aes_crypt_init
mov r15d, eax
test eax, eax
jnz short loc_98114
mov [rbp+var_2E0], rbx
lea rbx, [rbp+var_2D0]
mov rax, [rbx]
lea r15, [rbp+var_2D4]
mov rdi, rbx
mov rsi, r13
mov edx, r12d
mov rcx, r14
mov r8, r15
call qword ptr [rax+18h]
mov r12d, eax
mov esi, [r15]
add rsi, r14
mov rax, [rbx]
lea rdx, [rbp+var_2D8]
mov rdi, rbx
call qword ptr [rax+20h]
mov r15d, eax
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov eax, r15d
or eax, r12d
jz short loc_980F8
call _ERR_clear_error
jmp short loc_9810D
loc_980F8:
mov eax, [rbp+var_2D8]
add eax, [rbp+var_2D4]
mov rcx, [rbp+var_2E0]
mov [rcx], eax
loc_9810D:
test r12d, r12d
cmovnz r15d, r12d
loc_98114:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_98138
mov eax, r15d
add rsp, 2C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_98138:
call ___stack_chk_fail
| long long my_aes_crypt(
int a1,
char a2,
long long a3,
unsigned int a4,
long long a5,
_DWORD *a6,
long long a7,
unsigned int a8,
long long a9)
{
unsigned int v13; // r15d
unsigned int v14; // r12d
int v16; // [rsp+18h] [rbp-2D8h] BYREF
unsigned int v17; // [rsp+1Ch] [rbp-2D4h] BYREF
_QWORD v18[90]; // [rsp+20h] [rbp-2D0h] BYREF
v18[84] = __readfsqword(0x28u);
v17 = 0;
v13 = my_aes_crypt_init(v18, a1, a2, a7, a8, a9);
if ( !v13 )
{
v14 = (*(long long ( **)(_QWORD *, long long, _QWORD, long long, unsigned int *))(v18[0] + 24LL))(
v18,
a3,
a4,
a5,
&v17);
v13 = (*(long long ( **)(_QWORD *, long long, int *))(v18[0] + 32LL))(v18, a5 + v17, &v16);
(*(void ( **)(_QWORD *))v18[0])(v18);
if ( v14 | v13 )
ERR_clear_error(v18);
else
*a6 = v17 + v16;
if ( v14 )
return v14;
}
return v13;
}
| my_aes_crypt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV RBX,R9
MOV R14,R8
MOV R12D,ECX
MOV R13,RDX
MOV EDX,ESI
MOV ESI,EDI
MOV RCX,qword ptr [RBP + 0x10]
MOV R8D,dword ptr [RBP + 0x18]
MOV R9,qword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x28]
MOV RDI,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RDI
MOV dword ptr [RBP + -0x2d4],0x0
MOV dword ptr [RSP],EAX
LEA RDI,[RBP + -0x2d0]
CALL 0x00197eac
MOV R15D,EAX
TEST EAX,EAX
JNZ 0x00198114
MOV qword ptr [RBP + -0x2e0],RBX
LEA RBX,[RBP + -0x2d0]
MOV RAX,qword ptr [RBX]
LEA R15,[RBP + -0x2d4]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,R12D
MOV RCX,R14
MOV R8,R15
CALL qword ptr [RAX + 0x18]
MOV R12D,EAX
MOV ESI,dword ptr [R15]
ADD RSI,R14
MOV RAX,qword ptr [RBX]
LEA RDX,[RBP + -0x2d8]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R15D,EAX
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV EAX,R15D
OR EAX,R12D
JZ 0x001980f8
CALL 0x0012a800
JMP 0x0019810d
LAB_001980f8:
MOV EAX,dword ptr [RBP + -0x2d8]
ADD EAX,dword ptr [RBP + -0x2d4]
MOV RCX,qword ptr [RBP + -0x2e0]
MOV dword ptr [RCX],EAX
LAB_0019810d:
TEST R12D,R12D
CMOVNZ R15D,R12D
LAB_00198114:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00198138
MOV EAX,R15D
ADD RSP,0x2c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00198138:
CALL 0x0012a250
|
int my_aes_crypt(int4 param_1,int4 param_2,int8 param_3,int4 param_4,
long param_5,int *param_6,int8 param_7,int4 param_8,int8 param_9,
int4 param_10)
{
int iVar1;
int iVar2;
long in_FS_OFFSET;
int local_2e0;
uint local_2dc;
int8 *local_2d8 [84];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_2dc = 0;
iVar1 = my_aes_crypt_init(local_2d8,param_1,param_2,param_7,param_8,param_9,param_10);
if (iVar1 == 0) {
iVar2 = (*(code *)local_2d8[0][3])(local_2d8,param_3,param_4,param_5,&local_2dc);
iVar1 = (*(code *)local_2d8[0][4])(local_2d8,(ulong)local_2dc + param_5,&local_2e0);
(*(code *)*local_2d8[0])(local_2d8);
if (iVar1 == 0 && iVar2 == 0) {
*param_6 = local_2e0 + local_2dc;
}
else {
ERR_clear_error();
}
if (iVar2 != 0) {
iVar1 = iVar2;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,423 | common_sampler::set_logits(llama_context*, int) | monkey531[P]llama/common/sampling.cpp | void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
} | O0 | cpp | common_sampler::set_logits(llama_context*, int):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x5b060
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rdi
callq 0x5adb0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x5b210
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5a690
movq 0x8(%rsp), %rdi
movl %eax, 0x44(%rsp)
addq $0x180, %rdi # imm = 0x180
movslq 0x44(%rsp), %rsi
callq 0x1c6040
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x1c53eb
movq 0x8(%rsp), %rdi
movl 0x40(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x58(%rsp), %rax
movslq 0x40(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x38(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rsp)
addq $0x180, %rdi # imm = 0x180
movslq 0x40(%rsp), %rsi
callq 0x1c60e0
movq 0x34(%rsp), %rcx
movq %rcx, (%rax)
movl 0x3c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x1c5389
movq 0x8(%rsp), %rdi
addq $0x180, %rdi # imm = 0x180
callq 0x1c6100
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
addq $0x180, %rdi # imm = 0x180
callq 0x1c6120
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq $-0x1, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x198(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x1a0(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x1a8(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x1b0(%rax)
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN14common_sampler10set_logitsEP13llama_contexti:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_14], edx
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_10]
mov esi, [rsp+78h+var_14]
call _llama_get_logits_ith
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_10]
call _llama_get_model
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_28]
call _llama_model_get_vocab
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_30]
call _llama_vocab_n_tokens
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_34], eax
add rdi, 180h
movsxd rsi, [rsp+78h+var_34]
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
mov [rsp+78h+var_38], 0
loc_1C5389:
mov eax, [rsp+78h+var_38]
cmp eax, [rsp+78h+var_34]
jge short loc_1C53EB
mov rdi, [rsp+78h+var_70]
mov eax, [rsp+78h+var_38]
mov dword ptr [rsp+78h+var_44], eax
mov rax, [rsp+78h+var_20]
movsxd rcx, [rsp+78h+var_38]
movss xmm0, dword ptr [rax+rcx*4]
movss dword ptr [rsp+78h+var_44+4], xmm0
xorps xmm0, xmm0
movss [rsp+78h+var_3C], xmm0
add rdi, 180h
movsxd rsi, [rsp+78h+var_38]
call _ZNSt6vectorI16llama_token_dataSaIS0_EEixEm; std::vector<llama_token_data>::operator[](ulong)
mov rcx, [rsp+78h+var_44]
mov [rax], rcx
mov ecx, [rsp+78h+var_3C]
mov [rax+8], ecx
mov eax, [rsp+78h+var_38]
add eax, 1
mov [rsp+78h+var_38], eax
jmp short loc_1C5389
loc_1C53EB:
mov rdi, [rsp+78h+var_70]
add rdi, 180h
call _ZNSt6vectorI16llama_token_dataSaIS0_EE4dataEv; std::vector<llama_token_data>::data(void)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_68], rax
add rdi, 180h
call _ZNKSt6vectorI16llama_token_dataSaIS0_EE4sizeEv; std::vector<llama_token_data>::size(void)
mov rcx, rax
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_60], rcx
mov [rsp+78h+var_58], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rsp+78h+var_50], 0
mov rcx, [rsp+78h+var_68]
mov [rax+198h], rcx
mov rcx, [rsp+78h+var_60]
mov [rax+1A0h], rcx
mov rcx, [rsp+78h+var_58]
mov [rax+1A8h], rcx
mov rcx, [rsp+78h+var_50]
mov [rax+1B0h], rcx
add rsp, 78h
retn
| _QWORD * common_sampler::set_logits(_QWORD *a1, long long a2, unsigned int a3)
{
long long v3; // rax
long long v4; // rcx
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-68h]
long long v7; // [rsp+28h] [rbp-50h]
long long v8; // [rsp+34h] [rbp-44h]
int i; // [rsp+40h] [rbp-38h]
int v10; // [rsp+44h] [rbp-34h]
long long vocab; // [rsp+48h] [rbp-30h]
long long model; // [rsp+50h] [rbp-28h]
long long logits_ith; // [rsp+58h] [rbp-20h]
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model);
v10 = llama_vocab_n_tokens(vocab);
std::vector<llama_token_data>::resize(a1 + 48, v10);
for ( i = 0; i < v10; ++i )
{
LODWORD(v8) = i;
HIDWORD(v8) = *(_DWORD *)(logits_ith + 4LL * i);
v3 = std::vector<llama_token_data>::operator[](a1 + 48, i);
*(_QWORD *)v3 = v8;
*(_DWORD *)(v3 + 8) = 0;
}
v6 = std::vector<llama_token_data>::data(a1 + 48);
v4 = std::vector<llama_token_data>::size(a1 + 48);
result = a1;
LOBYTE(v7) = 0;
a1[51] = v6;
a1[52] = v4;
a1[53] = -1LL;
a1[54] = v7;
return result;
}
| _M_ptr:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001c5320
POP RCX
RET
|
/* std::__uniq_ptr_impl<std::__cxx11::string,
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>::create<std::__cxx11::string, std::__cxx11::string const&>(std::__cxx11::string
const&)::{lambda(std::__cxx11::string*)#1}>::_M_ptr() */
void __thiscall
std::
__uniq_ptr_impl<std::__cxx11::string,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>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::{lambda(std::__cxx11::string*)#1}>
::_M_ptr(__uniq_ptr_impl<std::__cxx11::string,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>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::_lambda(std::__cxx11::string*)_1_>
*this)
{
get<0ul,std::__cxx11::string*,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>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::_lambda(std::__cxx11::string*)_1_>
((tuple *)this);
return;
}
|
|
1,424 | void ImPlot::PlotLine<unsigned char>(char const*, unsigned char const*, unsigned char const*, int, int, int, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp | void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags, int offset, int stride) {
GetterXY<IndexerIdx<T>,IndexerIdx<T>> getter(IndexerIdx<T>(xs,count,offset,stride),IndexerIdx<T>(ys,count,offset,stride),count);
PlotLineEx(label_id, getter, flags);
} | O1 | cpp | void ImPlot::PlotLine<unsigned char>(char const*, unsigned char const*, unsigned char const*, int, int, int, int):
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r11d
movq %rdx, %r9
xorl %r10d, %r10d
movl $0x0, %ebx
testl %ecx, %ecx
je 0xcf19d
movl %r11d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %ebx
movl 0x50(%rsp), %ebp
testl %ecx, %ecx
je 0xcf1b4
movl %r11d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %r10d
movq %rsp, %rax
movq %rsi, (%rax)
movl %ecx, 0x8(%rax)
movl %ebx, 0xc(%rax)
movl %ebp, 0x10(%rax)
movq %r9, 0x18(%rax)
movl %ecx, 0x20(%rax)
movl %r10d, 0x24(%rax)
movl %ebp, 0x28(%rax)
movl %ecx, 0x30(%rax)
movq %rax, %rsi
movl %r8d, %edx
callq 0xcf1e6
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
| _ZN6ImPlot8PlotLineIdEEvPKcPKT_S5_iiii:
push rbp
push rbx
sub rsp, 38h
mov r11d, r9d
mov r9, rdx
xor r10d, r10d
mov ebx, 0
test ecx, ecx
jz short loc_CF19D
mov eax, r11d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov ebx, edx
loc_CF19D:
mov ebp, [rsp+48h+arg_0]
test ecx, ecx
jz short loc_CF1B4
mov eax, r11d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov r10d, edx
loc_CF1B4:
mov rax, rsp
mov [rax], rsi
mov [rax+8], ecx
mov [rax+0Ch], ebx
mov [rax+10h], ebp
mov [rax+18h], r9
mov [rax+20h], ecx
mov [rax+24h], r10d
mov [rax+28h], ebp
mov [rax+30h], ecx
mov rsi, rax
mov edx, r8d
call _ZN6ImPlot10PlotLineExINS_8GetterXYINS_10IndexerIdxIdEES3_EEEEvPKcRKT_i; ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>> const&,int)
add rsp, 38h
pop rbx
pop rbp
retn
| long long ImPlot::PlotLine<double>(
long long a1,
long long a2,
long long a3,
int a4,
unsigned int a5,
int a6,
int a7)
{
int v7; // r10d
int v8; // ebx
long long v10; // [rsp+0h] [rbp-48h] BYREF
int v11; // [rsp+8h] [rbp-40h]
int v12; // [rsp+Ch] [rbp-3Ch]
int v13; // [rsp+10h] [rbp-38h]
long long v14; // [rsp+18h] [rbp-30h]
int v15; // [rsp+20h] [rbp-28h]
int v16; // [rsp+24h] [rbp-24h]
int v17; // [rsp+28h] [rbp-20h]
int v18; // [rsp+30h] [rbp-18h]
v7 = 0;
v8 = 0;
if ( a4 )
{
v8 = (a6 % a4 + a4) % a4;
v7 = v8;
}
v10 = a2;
v11 = a4;
v12 = v8;
v13 = a7;
v14 = a3;
v15 = a4;
v16 = v7;
v17 = a7;
v18 = a4;
return ((long long ( *)(long long, long long *, _QWORD))ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>>)(
a1,
&v10,
a5);
}
| PlotLine<double>:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV R11D,R9D
MOV R9,RDX
XOR R10D,R10D
MOV EBX,0x0
TEST ECX,ECX
JZ 0x001cf19d
MOV EAX,R11D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV EBX,EDX
LAB_001cf19d:
MOV EBP,dword ptr [RSP + 0x50]
TEST ECX,ECX
JZ 0x001cf1b4
MOV EAX,R11D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV R10D,EDX
LAB_001cf1b4:
MOV RAX,RSP
MOV qword ptr [RAX],RSI
MOV dword ptr [RAX + 0x8],ECX
MOV dword ptr [RAX + 0xc],EBX
MOV dword ptr [RAX + 0x10],EBP
MOV qword ptr [RAX + 0x18],R9
MOV dword ptr [RAX + 0x20],ECX
MOV dword ptr [RAX + 0x24],R10D
MOV dword ptr [RAX + 0x28],EBP
MOV dword ptr [RAX + 0x30],ECX
MOV RSI,RAX
MOV EDX,R8D
CALL 0x001cf1e6
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* void ImPlot::PlotLine<double>(char const*, double const*, double const*, int, int, int, int) */
void ImPlot::PlotLine<double>
(char *param_1,double *param_2,double *param_3,int param_4,int param_5,int param_6,
int param_7)
{
double *local_48;
int local_40;
int local_3c;
int local_38;
double *local_30;
int local_28;
int local_24;
int local_20;
int local_18;
local_24 = 0;
local_3c = 0;
if (param_4 != 0) {
local_3c = (param_6 % param_4 + param_4) % param_4;
local_24 = (param_6 % param_4 + param_4) % param_4;
}
local_38 = param_7;
local_20 = param_7;
local_48 = param_2;
local_40 = param_4;
local_30 = param_3;
local_28 = param_4;
local_18 = param_4;
PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>>
(param_1,(GetterXY *)&local_48,param_5);
return;
}
|
|
1,425 | transid_get_packed | eloqsql/storage/maria/ma_key.c | ulonglong transid_get_packed(MARIA_SHARE *share, const uchar *from)
{
ulonglong value;
uint length;
if (from[0] < MARIA_MIN_TRANSID_PACK_OFFSET)
value= (ulonglong) from[0];
else
{
value= 0;
for (length= (uint) (from[0] - MARIA_TRANSID_PACK_OFFSET),
value= (ulonglong) from[1], from+=2;
--length ;
from++)
value= (value << 8) + ((ulonglong) *from);
}
return (value >> 1) + share->state.create_trid;
} | O3 | c | transid_get_packed:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %ecx
cmpq $0xf2, %rcx
ja 0x36b4e
movq %rcx, %rax
jmp 0x36b77
movzbl 0x1(%rsi), %eax
cmpl $0xfa, %ecx
je 0x36b77
addq $-0xfa, %rcx
xorl %edx, %edx
shlq $0x8, %rax
movzbl 0x2(%rsi,%rdx), %r8d
orq %r8, %rax
incq %rdx
cmpl %edx, %ecx
jne 0x36b63
shrq %rax
addq 0xe0(%rdi), %rax
popq %rbp
retq
| transid_get_packed:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
cmp rcx, 0F2h
ja short loc_36B4E
mov rax, rcx
jmp short loc_36B77
loc_36B4E:
movzx eax, byte ptr [rsi+1]
cmp ecx, 0FAh
jz short loc_36B77
add rcx, 0FFFFFFFFFFFFFF06h
xor edx, edx
loc_36B63:
shl rax, 8
movzx r8d, byte ptr [rsi+rdx+2]
or rax, r8
inc rdx
cmp ecx, edx
jnz short loc_36B63
loc_36B77:
shr rax, 1
add rax, [rdi+0E0h]
pop rbp
retn
| unsigned long long transid_get_packed(long long a1, unsigned __int8 *a2)
{
unsigned long long v2; // rcx
unsigned long long v3; // rax
int v4; // ecx
long long v5; // rdx
v2 = *a2;
if ( v2 > 0xF2 )
{
v3 = a2[1];
if ( (_DWORD)v2 != 250 )
{
v4 = v2 - 250;
v5 = 0LL;
do
v3 = a2[v5++ + 2] | (v3 << 8);
while ( v4 != (_DWORD)v5 );
}
}
else
{
v3 = *a2;
}
return *(_QWORD *)(a1 + 224) + (v3 >> 1);
}
| transid_get_packed:
PUSH RBP
MOV RBP,RSP
MOVZX ECX,byte ptr [RSI]
CMP RCX,0xf2
JA 0x00136b4e
MOV RAX,RCX
JMP 0x00136b77
LAB_00136b4e:
MOVZX EAX,byte ptr [RSI + 0x1]
CMP ECX,0xfa
JZ 0x00136b77
ADD RCX,-0xfa
XOR EDX,EDX
LAB_00136b63:
SHL RAX,0x8
MOVZX R8D,byte ptr [RSI + RDX*0x1 + 0x2]
OR RAX,R8
INC RDX
CMP ECX,EDX
JNZ 0x00136b63
LAB_00136b77:
SHR RAX,0x1
ADD RAX,qword ptr [RDI + 0xe0]
POP RBP
RET
|
long transid_get_packed(long param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
long lVar3;
bVar1 = *param_2;
uVar2 = (ulong)bVar1;
if ((0xf2 < uVar2) && (uVar2 = (ulong)param_2[1], bVar1 != 0xfa)) {
lVar3 = 0;
do {
uVar2 = uVar2 << 8 | (ulong)param_2[lVar3 + 2];
lVar3 = lVar3 + 1;
} while (bVar1 - 0xfa != (int)lVar3);
}
return (uVar2 >> 1) + *(long *)(param_1 + 0xe0);
}
|
|
1,426 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp | Vtr::ConstArray<float>
SubdivisionPlan::Node::GetPatchPointWeights(int pointIndex) const {
std::vector<float> const& weights = plan->GetStencilMatrix();
if (weights.empty())
return Vtr::ConstArray<float>(nullptr, 0);
int numControlPoints = plan->GetNumControlPoints();
return Vtr::ConstArray<float>(weights.data() + (pointIndex * numControlPoints), numControlPoints);
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const:
movq 0x8(%rdi), %rcx
movq 0x70(%rcx), %rax
cmpq 0x78(%rcx), %rax
je 0xa6593
movq 0x40(%rcx), %rcx
movl 0x4(%rcx), %edx
shrl $0x10, %edx
imull %edx, %esi
movslq %esi, %rcx
leaq (%rax,%rcx,4), %rax
retq
xorl %edx, %edx
xorl %eax, %eax
retq
| _ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan4Node20GetPatchPointWeightsEi:
mov rcx, [rdi+8]
mov rax, [rcx+70h]
cmp rax, [rcx+78h]
jz short loc_A6593
mov rcx, [rcx+40h]
mov edx, [rcx+4]
shr edx, 10h
imul esi, edx
movsxd rcx, esi
lea rax, [rax+rcx*4]
retn
loc_A6593:
xor edx, edx
xor eax, eax
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node *this,
int a2)
{
_QWORD *v2; // rcx
long long v3; // rax
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[14];
if ( v3 == v2[15] )
return 0LL;
else
return v3 + 4LL * HIWORD(*(_DWORD *)(v2[8] + 4LL)) * a2;
}
| GetPatchPointWeights:
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x70]
CMP RAX,qword ptr [RCX + 0x78]
JZ 0x001a6593
MOV RCX,qword ptr [RCX + 0x40]
MOV EDX,dword ptr [RCX + 0x4]
SHR EDX,0x10
IMUL ESI,EDX
MOVSXD RCX,ESI
LEA RAX,[RAX + RCX*0x4]
RET
LAB_001a6593:
XOR EDX,EDX
XOR EAX,EAX
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(Node *this,int param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(this + 8);
if (*(long *)(lVar1 + 0x70) != *(long *)(lVar1 + 0x78)) {
auVar2._8_4_ = *(uint *)(*(long *)(lVar1 + 0x40) + 4) >> 0x10;
auVar2._0_8_ = *(long *)(lVar1 + 0x70) + (long)(int)(param_1 * auVar2._8_4_) * 4;
auVar2._12_4_ = 0;
return auVar2;
}
return ZEXT816(0);
}
|
|
1,427 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp | Vtr::ConstArray<float>
SubdivisionPlan::Node::GetPatchPointWeights(int pointIndex) const {
std::vector<float> const& weights = plan->GetStencilMatrix();
if (weights.empty())
return Vtr::ConstArray<float>(nullptr, 0);
int numControlPoints = plan->GetNumControlPoints();
return Vtr::ConstArray<float>(weights.data() + (pointIndex * numControlPoints), numControlPoints);
} | O3 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const:
movq 0x8(%rdi), %rcx
movq 0x70(%rcx), %rax
cmpq 0x78(%rcx), %rax
je 0xa8e53
movq 0x40(%rcx), %rcx
movl 0x4(%rcx), %edx
shrl $0x10, %edx
imull %edx, %esi
movslq %esi, %rcx
leaq (%rax,%rcx,4), %rax
retq
xorl %edx, %edx
xorl %eax, %eax
retq
| _ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan4Node20GetPatchPointWeightsEi:
mov rcx, [rdi+8]
mov rax, [rcx+70h]
cmp rax, [rcx+78h]
jz short loc_A8E53
mov rcx, [rcx+40h]
mov edx, [rcx+4]
shr edx, 10h
imul esi, edx
movsxd rcx, esi
lea rax, [rax+rcx*4]
retn
loc_A8E53:
xor edx, edx
xor eax, eax
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node *this,
int a2)
{
_QWORD *v2; // rcx
long long v3; // rax
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[14];
if ( v3 == v2[15] )
return 0LL;
else
return v3 + 4LL * HIWORD(*(_DWORD *)(v2[8] + 4LL)) * a2;
}
| GetPatchPointWeights:
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x70]
CMP RAX,qword ptr [RCX + 0x78]
JZ 0x001a8e53
MOV RCX,qword ptr [RCX + 0x40]
MOV EDX,dword ptr [RCX + 0x4]
SHR EDX,0x10
IMUL ESI,EDX
MOVSXD RCX,ESI
LEA RAX,[RAX + RCX*0x4]
RET
LAB_001a8e53:
XOR EDX,EDX
XOR EAX,EAX
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetPatchPointWeights(Node *this,int param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(this + 8);
if (*(long *)(lVar1 + 0x70) != *(long *)(lVar1 + 0x78)) {
auVar2._8_4_ = *(uint *)(*(long *)(lVar1 + 0x40) + 4) >> 0x10;
auVar2._0_8_ = *(long *)(lVar1 + 0x70) + (long)(int)(param_1 * auVar2._8_4_) * 4;
auVar2._12_4_ = 0;
return auVar2;
}
return ZEXT816(0);
}
|
|
1,428 | my_mb_wc_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_euc_jp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x6a83a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6aa56
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x6a862
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6aa56
cmpl $0xa1, -0x2c(%rbp)
jl 0x6a911
cmpl $0xfe, -0x2c(%rbp)
jg 0x6a911
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6a896
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x6aa56
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x27eb20(%rip), %rax # 0x2e93d0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x6a8cb
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x6a906
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0x6a8f3
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6aa56
cmpl $0x8e, -0x2c(%rbp)
jne 0x6a981
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6a934
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x6aa56
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0x6a952
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0x6a95e
movl $0x0, -0x4(%rbp)
jmp 0x6aa56
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x6aa56
cmpl $0x8f, -0x2c(%rbp)
jne 0x6aa4f
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6a9a8
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x6aa56
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x29ea09(%rip), %rax # 0x3093d0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x6a9e2
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0x6aa47
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x6aa34
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0x6aa34
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x6aa34
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6aa56
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_euc_jp:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_6A83A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_6AA56
loc_6A83A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_6A862
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_6AA56
loc_6A862:
cmp [rbp+var_2C], 0A1h
jl loc_6A911
cmp [rbp+var_2C], 0FEh
jg loc_6A911
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6A896
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_6AA56
loc_6A896:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_6A8CB
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_6A906
loc_6A8CB:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_6A8F3
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_6A8F3:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_6A906:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_6AA56
loc_6A911:
cmp [rbp+var_2C], 8Eh
jnz short loc_6A981
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6A934
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_6AA56
loc_6A934:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_6A952
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_6A95E
loc_6A952:
mov [rbp+var_4], 0
jmp loc_6AA56
loc_6A95E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_6AA56
loc_6A981:
cmp [rbp+var_2C], 8Fh
jnz loc_6AA4F
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_6A9A8
mov [rbp+var_4], 0FFFFFF99h
jmp loc_6AA56
loc_6A9A8:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_6A9E2
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_6AA47
loc_6A9E2:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_6AA34
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_6AA34
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_6AA34
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_6AA34:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_6AA47:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_6AA56
loc_6AA4F:
mov [rbp+var_4], 0
loc_6AA56:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016a83a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016aa56
LAB_0016a83a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0016a862
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016aa56
LAB_0016a862:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x0016a911
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x0016a911
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016a896
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0016aa56
LAB_0016a896:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3e93d0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0016a8cb
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0016a906
LAB_0016a8cb:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x0016a8f3
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_0016a8f3:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_0016a906:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016aa56
LAB_0016a911:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x0016a981
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016a934
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0016aa56
LAB_0016a934:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x0016a952
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x0016a95e
LAB_0016a952:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016aa56
LAB_0016a95e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0016aa56
LAB_0016a981:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x0016aa4f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016a9a8
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0016aa56
LAB_0016a9a8:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x4093d0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0016a9e2
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016aa47
LAB_0016a9e2:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0016aa34
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x0016aa34
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0016aa34
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_0016aa34:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_0016aa47:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016aa56
LAB_0016aa4f:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016aa56:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
1,429 | my_hash_init2 | eloqsql/mysys/hash.c | my_bool
my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size,
CHARSET_INFO *charset, ulong size, size_t key_offset,
size_t key_length, my_hash_get_key get_key,
my_hash_function hash_function,
void (*free_element)(void*), uint flags)
{
my_bool res;
DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->get_key=get_key;
hash->hash_function= hash_function ? hash_function : my_hash_sort;
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size,
growth_size, MYF((flags & HASH_THREAD_SPECIFIC ?
MY_THREAD_SPECIFIC : 0)));
DBUG_RETURN(res);
} | O0 | c | my_hash_init2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0x2ba93
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x10(%rax)
movq 0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpq $0x0, 0x20(%rbp)
je 0x2badf
movq 0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x2baec
leaq -0x126(%rip), %rax # 0x2b9c0
movq %rax, -0x40(%rbp)
jmp 0x2baec
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movl 0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x28(%rbp), %rax
movl %eax, %r8d
movl -0x14(%rbp), %r9d
movl 0x30(%rbp), %edx
andl $0x2, %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, %eax
movl $0x10, %edx
xorl %ecx, %ecx
movq %rax, (%rsp)
callq 0x30430
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_hash_init2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [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_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
jmp short $+2
loc_2BA93:
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 1
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_10]
mov [rax+50h], rcx
cmp [rbp+arg_10], 0
jz short loc_2BADF
mov rax, [rbp+arg_10]
mov [rbp+var_40], rax
jmp short loc_2BAEC
loc_2BADF:
lea rax, my_hash_sort
mov [rbp+var_40], rax
jmp short $+2
loc_2BAEC:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+58h], rcx
mov rcx, [rbp+arg_18]
mov rax, [rbp+var_10]
mov [rax+60h], rcx
mov ecx, [rbp+arg_20]
mov rax, [rbp+var_10]
mov [rax+20h], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
mov rax, [rbp+var_28]
mov r8d, eax
mov r9d, [rbp+var_14]
mov edx, [rbp+arg_20]
and edx, 2
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, 10h
xor ecx, ecx
mov [rsp+50h+var_50], rax
call init_dynamic_array2
mov [rbp+var_31], al
mov al, [rbp+var_31]
mov [rbp+var_41], al
mov al, [rbp+var_41]
add rsp, 50h
pop rbp
retn
| long long my_hash_init2(
int a1,
long long a2,
int a3,
long long a4,
int a5,
long long a6,
long long a7,
long long a8,
long long ( *a9)(long long a1, long long a2, long long a3),
long long a10,
int a11)
{
int v11; // esi
unsigned int v12; // eax
long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h]
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)a2 = a6;
*(_QWORD *)(a2 + 8) = a7;
*(_QWORD *)(a2 + 16) = 1LL;
*(_QWORD *)(a2 + 80) = a8;
if ( a9 )
v14 = a9;
else
v14 = my_hash_sort;
*(_QWORD *)(a2 + 88) = v14;
*(_QWORD *)(a2 + 96) = a10;
*(_DWORD *)(a2 + 32) = a11;
*(_QWORD *)(a2 + 104) = a4;
v11 = a2 + 40;
v12 = 0;
if ( (a11 & 2) != 0 )
v12 = 0x10000;
return init_dynamic_array2(a1, v11, 16, 0, a5, a3, v12);
}
| my_hash_init2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword 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 dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
JMP 0x0012ba93
LAB_0012ba93:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x1
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
CMP qword ptr [RBP + 0x20],0x0
JZ 0x0012badf
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012baec
LAB_0012badf:
LEA RAX,[0x12b9c0]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012baec
LAB_0012baec:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],RCX
MOV ECX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + 0x30]
AND EDX,0x2
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,0x10
XOR ECX,ECX
MOV qword ptr [RSP],RAX
CALL 0x00130430
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
MOV byte ptr [RBP + -0x41],AL
MOV AL,byte ptr [RBP + -0x41]
ADD RSP,0x50
POP RBP
RET
|
int8
my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6,int8 param_7,int8 param_8,
code *param_9,int8 param_10,uint param_11)
{
int4 uVar1;
int8 uVar2;
code *local_48;
param_2[3] = 0;
*param_2 = param_6;
param_2[1] = param_7;
param_2[2] = 1;
param_2[10] = param_8;
if (param_9 == (code *)0x0) {
local_48 = my_hash_sort;
}
else {
local_48 = param_9;
}
param_2[0xb] = local_48;
param_2[0xc] = param_10;
*(uint *)(param_2 + 4) = param_11;
param_2[0xd] = param_4;
uVar1 = 0;
if ((param_11 & 2) != 0) {
uVar1 = 0x10000;
}
uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1);
return uVar2;
}
|
|
1,430 | google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated int32 path = 1 [packed = true];
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.path_);
if (data_size > 0) {
total_size += 1 +
::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
}
int cached_size = ::_pbi::ToCachedSize(data_size);
_impl_._path_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string source_file = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source_file());
}
// optional int32 begin = 3;
if (cached_has_bits & 0x00000002u) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_begin());
}
// optional int32 end = 4;
if (cached_has_bits & 0x00000004u) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_end());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O0 | cpp | google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong() const:
subq $0x68, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
addq $0x10, %rdi
addq $0x8, %rdi
callq 0x1ab390
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jbe 0x2d89e8
movq 0x20(%rsp), %rax
movl %eax, %edi
callq 0x154860
addq $0x1, %rax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rdi
callq 0x15cfe0
movq 0x10(%rsp), %rcx
movl %eax, 0x1c(%rsp)
addq $0x28, %rcx
movl 0x1c(%rsp), %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
movl $0x0, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movl 0x58(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x8ec90
movl %eax, 0x54(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x5c(%rsp), %ecx
movl %ecx, 0x50(%rsp)
subl $0x3, %eax
je 0x2d8a5d
jmp 0x2d8a46
movl 0xc(%rsp), %eax
subl $0x5, %eax
je 0x2d8a69
jmp 0x2d8a51
movq (%rsp), %rax
movl 0x50(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x2d8a73
movq (%rsp), %rax
movl 0x50(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x2d8a73
movq (%rsp), %rcx
movl 0x50(%rsp), %eax
xchgl %eax, (%rcx)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
addq 0x30(%rsp), %rcx
movq %rcx, 0x30(%rsp)
addq $0x10, %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x48(%rsp), %rax
movslq 0x44(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0x2d8b31
movl 0x2c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2d8ae1
movq 0x10(%rsp), %rdi
callq 0x2e5ae0
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x2c(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2d8b08
movq 0x10(%rsp), %rdi
callq 0x2e5d40
movl %eax, %edi
callq 0x213130
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x2c(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2d8b2f
movq 0x10(%rsp), %rdi
callq 0x2e5d50
movl %eax, %edi
callq 0x213130
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x2d8b31
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
addq $0x4, %rdx
callq 0x1dbd10
addq $0x68, %rsp
retq
| _ZNK6google8protobuf28GeneratedCodeInfo_Annotation12ByteSizeLongEv:
sub rsp, 68h
mov [rsp+68h+var_30], rdi
mov rdi, [rsp+68h+var_30]
mov [rsp+68h+var_58], rdi
mov [rsp+68h+var_38], 0
mov [rsp+68h+var_3C], 0
add rdi, 10h
add rdi, 8
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
mov [rsp+68h+var_48], rax
cmp [rsp+68h+var_48], 0
jbe short loc_2D89E8
mov rax, [rsp+68h+var_48]
mov edi, eax; this
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeEi; google::protobuf::internal::WireFormatLite::Int32Size(int)
add rax, 1
add rax, [rsp+68h+var_38]
mov [rsp+68h+var_38], rax
loc_2D89E8:
mov rdi, [rsp+68h+var_48]; this
call _ZN6google8protobuf8internal12ToCachedSizeEm; google::protobuf::internal::ToCachedSize(ulong)
mov rcx, [rsp+68h+var_58]
mov [rsp+68h+var_4C], eax
add rcx, 28h ; '('
mov eax, [rsp+68h+var_4C]
mov [rsp+68h+var_8], rcx
mov [rsp+68h+var_C], eax
mov [rsp+68h+var_10], 0
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_68], rax
mov edi, [rsp+68h+var_10]
mov esi, 0FFFFh; int
call __ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+68h+var_14], eax
mov eax, [rsp+68h+var_10]
mov [rsp+68h+var_5C], eax
mov ecx, [rsp+68h+var_C]
mov [rsp+68h+var_18], ecx
sub eax, 3
jz short loc_2D8A5D
jmp short $+2
loc_2D8A46:
mov eax, [rsp+68h+var_5C]
sub eax, 5
jz short loc_2D8A69
jmp short $+2
loc_2D8A51:
mov rax, [rsp+68h+var_68]
mov ecx, [rsp+68h+var_18]
mov [rax], ecx
jmp short loc_2D8A73
loc_2D8A5D:
mov rax, [rsp+68h+var_68]
mov ecx, [rsp+68h+var_18]
mov [rax], ecx
jmp short loc_2D8A73
loc_2D8A69:
mov rcx, [rsp+68h+var_68]
mov eax, [rsp+68h+var_18]
xchg eax, [rcx]
loc_2D8A73:
mov rax, [rsp+68h+var_58]
mov rcx, [rsp+68h+var_48]
add rcx, [rsp+68h+var_38]
mov [rsp+68h+var_38], rcx
add rax, 10h
mov [rsp+68h+var_20], rax
mov [rsp+68h+var_24], 0
mov rax, [rsp+68h+var_20]
movsxd rcx, [rsp+68h+var_24]
mov eax, [rax+rcx*4]
mov [rsp+68h+var_3C], eax
mov eax, [rsp+68h+var_3C]
and eax, 7
cmp eax, 0
jz short loc_2D8B31
mov eax, [rsp+68h+var_3C]
and eax, 1
cmp eax, 0
jz short loc_2D8AE1
mov rdi, [rsp+68h+var_58]
call _ZNK6google8protobuf28GeneratedCodeInfo_Annotation21_internal_source_fileB5cxx11Ev; google::protobuf::GeneratedCodeInfo_Annotation::_internal_source_file(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+68h+var_38]
mov [rsp+68h+var_38], rax
loc_2D8AE1:
mov eax, [rsp+68h+var_3C]
and eax, 2
cmp eax, 0
jz short loc_2D8B08
mov rdi, [rsp+68h+var_58]; this
call _ZNK6google8protobuf28GeneratedCodeInfo_Annotation15_internal_beginEv; google::protobuf::GeneratedCodeInfo_Annotation::_internal_begin(void)
mov edi, eax; this
call _ZN6google8protobuf8internal14WireFormatLite16Int32SizePlusOneEi; google::protobuf::internal::WireFormatLite::Int32SizePlusOne(int)
add rax, [rsp+68h+var_38]
mov [rsp+68h+var_38], rax
loc_2D8B08:
mov eax, [rsp+68h+var_3C]
and eax, 4
cmp eax, 0
jz short loc_2D8B2F
mov rdi, [rsp+68h+var_58]; this
call _ZNK6google8protobuf28GeneratedCodeInfo_Annotation13_internal_endEv; google::protobuf::GeneratedCodeInfo_Annotation::_internal_end(void)
mov edi, eax; this
call _ZN6google8protobuf8internal14WireFormatLite16Int32SizePlusOneEi; google::protobuf::internal::WireFormatLite::Int32SizePlusOne(int)
add rax, [rsp+68h+var_38]
mov [rsp+68h+var_38], rax
loc_2D8B2F:
jmp short $+2
loc_2D8B31:
mov rdi, [rsp+68h+var_58]; this
mov rsi, [rsp+68h+var_38]; unsigned __int64
mov rdx, rdi
add rdx, 10h
add rdx, 4; google::protobuf::internal::CachedSize *
call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
add rsp, 68h
retn
| google::protobuf::internal * google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong(
google::protobuf::GeneratedCodeInfo_Annotation *this,
int a2)
{
long long v2; // rax
unsigned int v3; // eax
unsigned int v4; // eax
google::protobuf::internal *v6; // [rsp+20h] [rbp-48h]
int v7; // [rsp+2Ch] [rbp-3Ch]
unsigned long long v8; // [rsp+30h] [rbp-38h]
const google::protobuf::UnknownFieldSet *v9; // [rsp+30h] [rbp-38h]
unsigned int v10; // [rsp+5Ch] [rbp-Ch]
v8 = 0LL;
v6 = (google::protobuf::internal *)google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 6);
if ( v6 )
v8 = google::protobuf::internal::WireFormatLite::Int32Size(
(google::protobuf::internal::WireFormatLite *)(unsigned int)v6,
a2)
+ 1;
v10 = (unsigned int)google::protobuf::internal::ToCachedSize(v6);
std::operator&(0LL, 0xFFFFLL);
*((_DWORD *)this + 10) = v10;
v9 = (google::protobuf::internal *)((char *)v6 + v8);
v7 = *((_DWORD *)this + 4);
if ( (v7 & 7) != 0 )
{
if ( (v7 & 1) != 0 )
{
v2 = google::protobuf::GeneratedCodeInfo_Annotation::_internal_source_file[abi:cxx11](this);
v9 = (const google::protobuf::UnknownFieldSet *)((char *)v9
+ google::protobuf::internal::WireFormatLite::StringSize(
v2,
0xFFFFu)
+ 1);
}
if ( (v7 & 2) != 0 )
{
v3 = google::protobuf::GeneratedCodeInfo_Annotation::_internal_begin(this);
v9 = (const google::protobuf::UnknownFieldSet *)((char *)v9
+ google::protobuf::internal::WireFormatLite::Int32SizePlusOne(
(google::protobuf::internal::WireFormatLite *)v3,
0xFFFF));
}
if ( (v7 & 4) != 0 )
{
v4 = google::protobuf::GeneratedCodeInfo_Annotation::_internal_end(this);
v9 = (const google::protobuf::UnknownFieldSet *)((char *)v9
+ google::protobuf::internal::WireFormatLite::Int32SizePlusOne(
(google::protobuf::internal::WireFormatLite *)v4,
0xFFFF));
}
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
this,
v9,
(google::protobuf::GeneratedCodeInfo_Annotation *)((char *)this + 20));
}
| |||
1,431 | google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated int32 path = 1 [packed = true];
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.path_);
if (data_size > 0) {
total_size += 1 +
::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
}
int cached_size = ::_pbi::ToCachedSize(data_size);
_impl_._path_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string source_file = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source_file());
}
// optional int32 begin = 3;
if (cached_has_bits & 0x00000002u) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_begin());
}
// optional int32 end = 4;
if (cached_has_bits & 0x00000004u) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_end());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O3 | cpp | google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong() const:
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x8d220
testq %rax, %rax
je 0xf9ac1
movslq %eax, %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %esi
addl $0x49, %esi
shrl $0x6, %esi
incq %rsi
jmp 0xf9ac3
xorl %esi, %esi
movl %eax, 0x28(%rbx)
addq %rax, %rsi
movl 0x10(%rbx), %eax
testb $0x7, %al
je 0xf9b35
testb $0x1, %al
je 0xf9af8
movq 0x30(%rbx), %rcx
andq $-0x4, %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %rsi
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %rsi
incq %rsi
testb $0x2, %al
je 0xf9b17
movslq 0x38(%rbx), %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %ecx
addl $0x89, %ecx
shrl $0x6, %ecx
addq %rcx, %rsi
testb $0x4, %al
je 0xf9b35
movslq 0x3c(%rbx), %rax
orq $0x1, %rax
bsrq %rax, %rax
leal (%rax,%rax,8), %eax
addl $0x89, %eax
shrl $0x6, %eax
addq %rax, %rsi
leaq 0x14(%rbx), %rdx
movq %rbx, %rdi
popq %rbx
jmp 0x9f36e
| _ZNK6google8protobuf28GeneratedCodeInfo_Annotation12ByteSizeLongEv:
push rbx
mov rbx, rdi
add rdi, 18h
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
test rax, rax
jz short loc_F9AC1
movsxd rcx, eax
or rcx, 1
bsr rcx, rcx
lea esi, [rcx+rcx*8]
add esi, 49h ; 'I'
shr esi, 6
inc rsi
jmp short loc_F9AC3
loc_F9AC1:
xor esi, esi
loc_F9AC3:
mov [rbx+28h], eax
add rsi, rax
mov eax, [rbx+10h]
test al, 7
jz short loc_F9B35
test al, 1
jz short loc_F9AF8
mov rcx, [rbx+30h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov rcx, [rcx+8]
add rsi, rcx
or ecx, 1
bsr ecx, ecx
lea ecx, [rcx+rcx*8]
add ecx, 49h ; 'I'
shr ecx, 6
add rsi, rcx
inc rsi
loc_F9AF8:
test al, 2
jz short loc_F9B17
movsxd rcx, dword ptr [rbx+38h]
or rcx, 1
bsr rcx, rcx
lea ecx, [rcx+rcx*8]
add ecx, 89h
shr ecx, 6
add rsi, rcx
loc_F9B17:
test al, 4
jz short loc_F9B35
movsxd rax, dword ptr [rbx+3Ch]
or rax, 1
bsr rax, rax
lea eax, [rax+rax*8]
add eax, 89h
shr eax, 6
add rsi, rax
loc_F9B35:
lea rdx, [rbx+14h]
mov rdi, rbx
pop rbx
jmp _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
| char * google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong(
google::protobuf::GeneratedCodeInfo_Annotation *this)
{
long long v1; // rax
unsigned long long v2; // rcx
long long v3; // rsi
const google::protobuf::UnknownFieldSet *v4; // rsi
int v5; // eax
long long v6; // rcx
char *v7; // rsi
unsigned long long v8; // rcx
unsigned long long v9; // rax
v1 = google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 6);
if ( v1 )
{
_BitScanReverse64(&v2, (int)v1 | 1LL);
v3 = ((unsigned int)(9 * v2 + 73) >> 6) + 1LL;
}
else
{
v3 = 0LL;
}
*((_DWORD *)this + 10) = v1;
v4 = (const google::protobuf::UnknownFieldSet *)(v1 + v3);
v5 = *((_DWORD *)this + 4);
if ( (v5 & 7) != 0 )
{
if ( (v5 & 1) != 0 )
{
v6 = *(_QWORD *)((*((_QWORD *)this + 6) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v7 = (char *)v4 + v6;
_BitScanReverse((unsigned int *)&v6, v6 | 1);
v4 = (const google::protobuf::UnknownFieldSet *)&v7[((unsigned int)(9 * v6 + 73) >> 6) + 1];
}
if ( (v5 & 2) != 0 )
{
_BitScanReverse64(&v8, *((int *)this + 14) | 1LL);
v4 = (const google::protobuf::UnknownFieldSet *)((char *)v4 + ((unsigned int)(9 * v8 + 137) >> 6));
}
if ( (v5 & 4) != 0 )
{
_BitScanReverse64(&v9, *((int *)this + 15) | 1LL);
v4 = (const google::protobuf::UnknownFieldSet *)((char *)v4 + ((unsigned int)(9 * v9 + 137) >> 6));
}
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize((long long)this, v4, (_DWORD *)this + 5);
}
| ByteSizeLong:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x18
CALL 0x0018d220
TEST RAX,RAX
JZ 0x001f9ac1
MOVSXD RCX,EAX
OR RCX,0x1
BSR RCX,RCX
LEA ESI,[RCX + RCX*0x8]
ADD ESI,0x49
SHR ESI,0x6
INC RSI
JMP 0x001f9ac3
LAB_001f9ac1:
XOR ESI,ESI
LAB_001f9ac3:
MOV dword ptr [RBX + 0x28],EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBX + 0x10]
TEST AL,0x7
JZ 0x001f9b35
TEST AL,0x1
JZ 0x001f9af8
MOV RCX,qword ptr [RBX + 0x30]
AND RCX,-0x4
MOV RCX,qword ptr [RCX + 0x8]
ADD RSI,RCX
OR ECX,0x1
BSR ECX,ECX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x49
SHR ECX,0x6
ADD RSI,RCX
INC RSI
LAB_001f9af8:
TEST AL,0x2
JZ 0x001f9b17
MOVSXD RCX,dword ptr [RBX + 0x38]
OR RCX,0x1
BSR RCX,RCX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x89
SHR ECX,0x6
ADD RSI,RCX
LAB_001f9b17:
TEST AL,0x4
JZ 0x001f9b35
MOVSXD RAX,dword ptr [RBX + 0x3c]
OR RAX,0x1
BSR RAX,RAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x89
SHR EAX,0x6
ADD RSI,RAX
LAB_001f9b35:
LEA RDX,[RBX + 0x14]
MOV RDI,RBX
POP RBX
JMP 0x0019f36e
|
/* google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong() const */
void __thiscall
google::protobuf::GeneratedCodeInfo_Annotation::ByteSizeLong(GeneratedCodeInfo_Annotation *this)
{
uint uVar1;
int iVar2;
long lVar3;
uint uVar4;
ulong uVar5;
long lVar6;
lVar3 = internal::WireFormatLite::Int32Size((RepeatedField *)(this + 0x18));
if (lVar3 == 0) {
lVar6 = 0;
}
else {
uVar5 = (long)(int)lVar3 | 1;
lVar6 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar6 == 0; lVar6 = lVar6 + -1) {
}
}
lVar6 = (ulong)((int)lVar6 * 9 + 0x49U >> 6) + 1;
}
*(int *)(this + 0x28) = (int)lVar3;
uVar5 = lVar6 + lVar3;
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 & 7) != 0) {
if ((uVar1 & 1) != 0) {
lVar3 = *(long *)((*(ulong *)(this + 0x30) & 0xfffffffffffffffc) + 8);
uVar4 = (uint)lVar3 | 1;
iVar2 = 0x1f;
if (uVar4 != 0) {
for (; uVar4 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar5 = uVar5 + lVar3 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar1 & 2) != 0) {
lVar3 = 0x3f;
if (((long)*(int *)(this + 0x38) | 1U) != 0) {
for (; ((long)*(int *)(this + 0x38) | 1U) >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
uVar5 = uVar5 + ((int)lVar3 * 9 + 0x89U >> 6);
}
if ((uVar1 & 4) != 0) {
lVar3 = 0x3f;
if (((long)*(int *)(this + 0x3c) | 1U) != 0) {
for (; ((long)*(int *)(this + 0x3c) | 1U) >> lVar3 == 0; lVar3 = lVar3 + -1) {
}
}
uVar5 = uVar5 + ((int)lVar3 * 9 + 0x89U >> 6);
}
}
Message::MaybeComputeUnknownFieldsSize((Message *)this,uVar5,(CachedSize *)(this + 0x14));
return;
}
|
|
1,432 | SchemaConverter::format_grammar[abi:cxx11]() | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string format_grammar() {
std::stringstream ss;
for (const auto & kv : _rules) {
ss << kv.first << " ::= " << kv.second << std::endl;
}
return ss.str();
} | O3 | cpp | SchemaConverter::format_grammar[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x184f0
movq 0x40(%r14), %r15
addq $0x30, %r14
cmpq %r14, %r15
je 0x9d1ff
leaq 0x10(%rsp), %r12
leaq 0x18763(%rip), %r13 # 0xb58f5
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %r12, %rdi
callq 0x187c0
movq %rax, %rbp
movl $0x5, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x187c0
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movq %rbp, %rdi
callq 0x187c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x186a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x18040
movq %rax, %rdi
callq 0x184c0
movq %r15, %rdi
callq 0x184e0
movq %rax, %r15
cmpq %r14, %rax
jne 0x9d192
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x18ac0
movq 0x43d25(%rip), %rsi # 0xe0f38
movq %rsp, %rdi
callq 0x18530
leaq 0x80(%rsp), %rdi
callq 0x18210
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9d23f
movq %rax, %rbx
movq 0x43cef(%rip), %rsi # 0xe0f38
movq %rsp, %rdi
callq 0x18530
leaq 0x80(%rsp), %rdi
callq 0x18210
movq %rbx, %rdi
callq 0x18c10
| _ZN15SchemaConverter14format_grammarB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov r14, rsi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov r15, [r14+40h]
add r14, 30h ; '0'
cmp r15, r14
jz short loc_9D1FF
lea r12, [rsp+1B8h+var_1A8]
lea r13, asc_B58F5; " ::= "
loc_9D192:
mov rsi, [r15+20h]
mov rdx, [r15+28h]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov edx, 5
mov rdi, rax
mov rsi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15+40h]
mov rdx, [r15+48h]
mov rdi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbp
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbp; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r15
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r15, rax
cmp rax, r14
jnz short loc_9D192
loc_9D1FF:
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_9D23F:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2)
{
_QWORD *i; // r15
long long v3; // rbp
std::ostream *v4; // rbp
char v5; // al
std::ostream *v6; // rax
_BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF
_BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8);
for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) )
{
v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]);
std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL);
v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]);
v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v6 = (std::ostream *)std::ostream::put(v4, v5);
std::ostream::flush(v6);
}
std::stringbuf::str(a1, v10);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v8,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v11);
return a1;
}
| format_grammar[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x001184f0
MOV R15,qword ptr [R14 + 0x40]
ADD R14,0x30
CMP R15,R14
JZ 0x0019d1ff
LEA R12,[RSP + 0x10]
LEA R13,[0x1b58f5]
LAB_0019d192:
MOV RSI,qword ptr [R15 + 0x20]
MOV RDX,qword ptr [R15 + 0x28]
LAB_0019d19a:
MOV RDI,R12
CALL 0x001187c0
MOV RBP,RAX
MOV EDX,0x5
MOV RDI,RAX
MOV RSI,R13
CALL 0x001187c0
MOV RSI,qword ptr [R15 + 0x40]
MOV RDX,qword ptr [R15 + 0x48]
MOV RDI,RBP
CALL 0x001187c0
MOV RBP,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBP
MOV ESI,0xa
CALL 0x001186a0
MOVSX ESI,AL
MOV RDI,RBP
CALL 0x00118040
MOV RDI,RAX
CALL 0x001184c0
MOV RDI,R15
CALL 0x001184e0
MOV R15,RAX
CMP RAX,R14
JNZ 0x0019d192
LAB_0019d1ff:
LEA RSI,[RSP + 0x18]
LAB_0019d204:
MOV RDI,RBX
CALL 0x00118ac0
LAB_0019d20c:
MOV RSI,qword ptr [0x001e0f38]
MOV RDI,RSP
CALL 0x00118530
LEA RDI,[RSP + 0x80]
CALL 0x00118210
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::format_grammar[abi:cxx11]() */
void SchemaConverter::format_grammar_abi_cxx11_(void)
{
ostream *poVar1;
_Rb_tree_node_base *p_Var2;
long in_RSI;
stringstream asStack_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
std::__cxx11::stringstream::stringstream(asStack_1b8);
p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40);
if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) {
do {
/* try { // try from 0019d19a to 0019d1ee has its CatchHandler @ 0019d23f */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28));
std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5);
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48));
std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1);
std::ostream::put((char)poVar1);
std::ostream::flush();
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2);
} while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30));
}
/* try { // try from 0019d204 to 0019d20b has its CatchHandler @ 0019d23d */
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(asStack_1b8);
std::ios_base::~ios_base(local_138);
return;
}
|
|
1,433 | lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document*) | dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp | SVGRadialGradientElement::SVGRadialGradientElement(Document* document)
: SVGGradientElement(document, ElementID::RadialGradient)
, m_cx(PropertyID::Cx, LengthDirection::Horizontal, LengthNegativeMode::Allow, 50.f, LengthUnits::Percent)
, m_cy(PropertyID::Cy, LengthDirection::Vertical, LengthNegativeMode::Allow, 50.f, LengthUnits::Percent)
, m_r(PropertyID::R, LengthDirection::Diagonal, LengthNegativeMode::Forbid, 50.f, LengthUnits::Percent)
, m_fx(PropertyID::Fx, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
, m_fy(PropertyID::Fy, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
{
addProperty(m_cx);
addProperty(m_cy);
addProperty(m_r);
addProperty(m_fx);
addProperty(m_fy);
} | O0 | cpp | lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0x350a0
movq -0x30(%rbp), %rdi
leaq 0x8d4af(%rip), %rax # 0xc3200
movq %rax, (%rdi)
addq $0xe8, %rdi
movq %rdi, -0x28(%rbp)
movl $0x8, %esi
xorl %ecx, %ecx
movss 0x56ece(%rip), %xmm0 # 0x8cc3c
movl $0x1, %r8d
movl %ecx, %edx
callq 0x20d00
jmp 0x35d7d
movq -0x30(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
movq %rdi, -0x38(%rbp)
movl $0x9, %esi
xorl %ecx, %ecx
movss 0x56ea1(%rip), %xmm0 # 0x8cc3c
movl $0x1, %r8d
movl %r8d, %edx
callq 0x20d00
jmp 0x35dab
movq -0x30(%rbp), %rdi
addq $0x118, %rdi # imm = 0x118
movq %rdi, -0x40(%rbp)
movl $0x32, %esi
movl $0x2, %edx
movss 0x56e70(%rip), %xmm0 # 0x8cc3c
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x35ddc
movq -0x30(%rbp), %rdi
addq $0x130, %rdi # imm = 0x130
movq %rdi, -0x48(%rbp)
movl $0x17, %esi
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x20d00
jmp 0x35e03
movq -0x30(%rbp), %rdi
addq $0x148, %rdi # imm = 0x148
movq %rdi, -0x50(%rbp)
movl $0x18, %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x35e2c
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0xe8, %rsi
callq 0x19a70
jmp 0x35e41
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x100, %rsi # imm = 0x100
callq 0x19a70
jmp 0x35e56
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x118, %rsi # imm = 0x118
callq 0x19a70
jmp 0x35e6b
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x130, %rsi # imm = 0x130
callq 0x19a70
jmp 0x35e80
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x148, %rsi # imm = 0x148
callq 0x19a70
jmp 0x35e95
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x35f1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x35f11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x35f08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x35eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x35ef6
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xfb10
movq -0x48(%rbp), %rdi
callq 0xfb10
movq -0x40(%rbp), %rdi
callq 0xfb10
movq -0x38(%rbp), %rdi
callq 0xfb10
movq -0x28(%rbp), %rdi
callq 0xfb10
movq -0x30(%rbp), %rdi
callq 0x272a0
movq -0x18(%rbp), %rdi
callq 0xb6c0
nopl (%rax)
| _ZN7lunasvg24SVGRadialGradientElementC2EPNS_8DocumentE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_30], rdi
mov rsi, [rbp+var_10]
mov edx, 10h
call _ZN7lunasvg18SVGGradientElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document *,lunasvg::ElementID)
mov rdi, [rbp+var_30]
lea rax, off_C3200
mov [rdi], rax
add rdi, 0E8h
mov [rbp+var_28], rdi
mov esi, 8
xor ecx, ecx
movss xmm0, cs:dword_8CC3C
mov r8d, 1
mov edx, ecx
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_35D7D:
mov rdi, [rbp+var_30]
add rdi, 100h
mov [rbp+var_38], rdi
mov esi, 9
xor ecx, ecx
movss xmm0, cs:dword_8CC3C
mov r8d, 1
mov edx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_35DAB:
mov rdi, [rbp+var_30]
add rdi, 118h
mov [rbp+var_40], rdi
mov esi, 32h ; '2'
mov edx, 2
movss xmm0, cs:dword_8CC3C
mov r8d, 1
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_35DDC:
mov rdi, [rbp+var_30]
add rdi, 130h
mov [rbp+var_48], rdi
mov esi, 17h
xorps xmm0, xmm0
xor r8d, r8d
mov edx, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_35E03:
mov rdi, [rbp+var_30]
add rdi, 148h
mov [rbp+var_50], rdi
mov esi, 18h
mov edx, 1
xorps xmm0, xmm0
xor r8d, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_35E2C:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 0E8h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_35E41:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 100h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_35E56:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 118h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_35E6B:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 130h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_35E80:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 148h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_35E95:
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_35F1A
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_35F11
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_35F08
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_35EFF
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_35EF6
mov rdi, [rbp+var_50]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_35EF6:
mov rdi, [rbp+var_48]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_35EFF:
mov rdi, [rbp+var_40]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_35F08:
mov rdi, [rbp+var_38]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_35F11:
mov rdi, [rbp+var_28]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_35F1A:
mov rdi, [rbp+var_30]; this
call _ZN7lunasvg18SVGGradientElementD2Ev; lunasvg::SVGGradientElement::~SVGGradientElement()
mov rdi, [rbp+var_18]
call __Unwind_Resume
| long long lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(
lunasvg::SVGRadialGradientElement *this,
lunasvg::Document *a2)
{
lunasvg::SVGGradientElement::SVGGradientElement(this, a2, 16);
*(_QWORD *)this = off_C3200;
lunasvg::SVGLength::SVGLength((long long)this + 232, 8u, 0, 0, 1u, 50.0);
lunasvg::SVGLength::SVGLength((long long)this + 256, 9u, 1, 0, 1u, 50.0);
lunasvg::SVGLength::SVGLength((long long)this + 280, 0x32u, 2, 1, 1u, 50.0);
lunasvg::SVGLength::SVGLength((long long)this + 304, 0x17u, 0, 0, 0, 0.0);
lunasvg::SVGLength::SVGLength((long long)this + 328, 0x18u, 1, 0, 0, 0.0);
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 232));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 256));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 280));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 304));
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 328));
}
| SVGRadialGradientElement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x10
CALL 0x001350a0
MOV RDI,qword ptr [RBP + -0x30]
LEA RAX,[0x1c3200]
MOV qword ptr [RDI],RAX
ADD RDI,0xe8
MOV qword ptr [RBP + -0x28],RDI
LAB_00135d5f:
MOV ESI,0x8
XOR ECX,ECX
MOVSS XMM0,dword ptr [0x0018cc3c]
MOV R8D,0x1
MOV EDX,ECX
CALL 0x00120d00
JMP 0x00135d7d
LAB_00135d7d:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x100
MOV qword ptr [RBP + -0x38],RDI
LAB_00135d8c:
MOV ESI,0x9
XOR ECX,ECX
MOVSS XMM0,dword ptr [0x0018cc3c]
MOV R8D,0x1
MOV EDX,R8D
CALL 0x00120d00
JMP 0x00135dab
LAB_00135dab:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x118
MOV qword ptr [RBP + -0x40],RDI
LAB_00135dba:
MOV ESI,0x32
MOV EDX,0x2
MOVSS XMM0,dword ptr [0x0018cc3c]
MOV R8D,0x1
MOV ECX,R8D
CALL 0x00120d00
JMP 0x00135ddc
LAB_00135ddc:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x130
MOV qword ptr [RBP + -0x48],RDI
LAB_00135deb:
MOV ESI,0x17
XORPS XMM0,XMM0
XOR R8D,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x00135e03
LAB_00135e03:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x148
MOV qword ptr [RBP + -0x50],RDI
LAB_00135e12:
MOV ESI,0x18
MOV EDX,0x1
XORPS XMM0,XMM0
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x00135e2c
LAB_00135e2c:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0xe8
LAB_00135e3a:
CALL 0x00119a70
JMP 0x00135e41
LAB_00135e41:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x100
CALL 0x00119a70
JMP 0x00135e56
LAB_00135e56:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x118
CALL 0x00119a70
JMP 0x00135e6b
LAB_00135e6b:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x130
CALL 0x00119a70
JMP 0x00135e80
LAB_00135e80:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x148
CALL 0x00119a70
LAB_00135e93:
JMP 0x00135e95
LAB_00135e95:
ADD RSP,0x50
POP RBP
RET
| ||
1,434 | lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document*) | dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp | SVGRadialGradientElement::SVGRadialGradientElement(Document* document)
: SVGGradientElement(document, ElementID::RadialGradient)
, m_cx(PropertyID::Cx, LengthDirection::Horizontal, LengthNegativeMode::Allow, 50.f, LengthUnits::Percent)
, m_cy(PropertyID::Cy, LengthDirection::Vertical, LengthNegativeMode::Allow, 50.f, LengthUnits::Percent)
, m_r(PropertyID::R, LengthDirection::Diagonal, LengthNegativeMode::Forbid, 50.f, LengthUnits::Percent)
, m_fx(PropertyID::Fx, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
, m_fy(PropertyID::Fy, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
{
addProperty(m_cx);
addProperty(m_cy);
addProperty(m_r);
addProperty(m_fx);
addProperty(m_fy);
} | O1 | cpp | lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edx
callq 0x1793c
leaq 0x41ff7(%rip), %rax # 0x5a1e0
movq %rax, (%rbx)
leaq 0xe8(%rbx), %r13
movq %r13, %rdi
movl $0x8, %esi
callq 0x1f3bc
leaq 0x42c09(%rip), %r14 # 0x5ae10
addq $0x10, %r14
movq %r14, 0xe8(%rbx)
movw $0x0, 0xf1(%rbx)
movl $0x42480000, 0xf4(%rbx) # imm = 0x42480000
movb $0x1, 0xf8(%rbx)
leaq 0x100(%rbx), %r15
movq %r15, %rdi
movl $0x9, %esi
callq 0x1f3bc
movq %r14, 0x100(%rbx)
movw $0x1, 0x109(%rbx)
movl $0x42480000, 0x10c(%rbx) # imm = 0x42480000
movb $0x1, 0x110(%rbx)
leaq 0x118(%rbx), %r12
movq %r12, %rdi
movl $0x32, %esi
callq 0x1f3bc
movq %r15, (%rsp)
movq %r13, %r15
movq %r14, 0x118(%rbx)
movw $0x102, 0x121(%rbx) # imm = 0x102
movl $0x42480000, 0x124(%rbx) # imm = 0x42480000
movb $0x1, 0x128(%rbx)
leaq 0x130(%rbx), %r13
movq %r13, %rdi
movl $0x17, %esi
callq 0x1f3bc
movq %r14, 0x130(%rbx)
movw $0x0, 0x139(%rbx)
movl $0x0, 0x13c(%rbx)
movb $0x0, 0x140(%rbx)
leaq 0x148(%rbx), %rbp
movq %rbp, %rdi
movl $0x18, %esi
callq 0x1f3bc
movq %r14, 0x148(%rbx)
movw $0x1, 0x151(%rbx)
movl $0x0, 0x154(%rbx)
movb $0x0, 0x158(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xfbfe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18358
jmp 0x18358
jmp 0x18358
jmp 0x18358
jmp 0x18358
movq %rax, %r14
movq %rbx, %rdi
callq 0x1927e
movq %r14, %rdi
callq 0xa5c0
nop
| _ZN7lunasvg24SVGRadialGradientElementC2EPNS_8DocumentE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov edx, 10h
call _ZN7lunasvg18SVGGradientElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document *,lunasvg::ElementID)
lea rax, off_5A1E0
mov [rbx], rax
lea r13, [rbx+0E8h]
mov rdi, r13
mov esi, 8
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
lea r14, _ZTVN7lunasvg9SVGLengthE; `vtable for'lunasvg::SVGLength
add r14, 10h
mov [rbx+0E8h], r14
mov word ptr [rbx+0F1h], 0
mov dword ptr [rbx+0F4h], 42480000h
mov byte ptr [rbx+0F8h], 1
lea r15, [rbx+100h]
mov rdi, r15
mov esi, 9
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+100h], r14
mov word ptr [rbx+109h], 1
mov dword ptr [rbx+10Ch], 42480000h
mov byte ptr [rbx+110h], 1
lea r12, [rbx+118h]
mov rdi, r12
mov esi, 32h ; '2'
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rsp+38h+var_38], r15
mov r15, r13
mov [rbx+118h], r14
mov word ptr [rbx+121h], 102h
mov dword ptr [rbx+124h], 42480000h
mov byte ptr [rbx+128h], 1
lea r13, [rbx+130h]
mov rdi, r13
mov esi, 17h
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+130h], r14
mov word ptr [rbx+139h], 0
mov dword ptr [rbx+13Ch], 0
mov byte ptr [rbx+140h], 0
lea rbp, [rbx+148h]
mov rdi, rbp
mov esi, 18h
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+148h], r14
mov word ptr [rbx+151h], 1
mov dword ptr [rbx+154h], 0
mov byte ptr [rbx+158h], 0
mov rdi, rbx; this
mov rsi, r15; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, [rsp+38h+var_38]; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, r12; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, r13; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, rbp; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_18358
jmp short loc_18358
jmp short loc_18358
jmp short loc_18358
jmp short $+2
loc_18358:
mov r14, rax
mov rdi, rbx; this
call _ZN7lunasvg18SVGGradientElementD2Ev; lunasvg::SVGGradientElement::~SVGGradientElement()
mov rdi, r14
call __Unwind_Resume
| _QWORD * lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(
lunasvg::SVGRadialGradientElement *this,
lunasvg::Document *a2)
{
lunasvg::SVGGradientElement::SVGGradientElement(this, (long long)a2, 16);
*(_QWORD *)this = off_5A1E0;
lunasvg::SVGProperty::SVGProperty((char *)this + 232, 8LL);
*((_QWORD *)this + 29) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 241) = 0;
*((_DWORD *)this + 61) = 1112014848;
*((_BYTE *)this + 248) = 1;
lunasvg::SVGProperty::SVGProperty((char *)this + 256, 9LL);
*((_QWORD *)this + 32) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 265) = 1;
*((_DWORD *)this + 67) = 1112014848;
*((_BYTE *)this + 272) = 1;
lunasvg::SVGProperty::SVGProperty((char *)this + 280, 50LL);
*((_QWORD *)this + 35) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 289) = 258;
*((_DWORD *)this + 73) = 1112014848;
*((_BYTE *)this + 296) = 1;
lunasvg::SVGProperty::SVGProperty((char *)this + 304, 23LL);
*((_QWORD *)this + 38) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 313) = 0;
*((_DWORD *)this + 79) = 0;
*((_BYTE *)this + 320) = 0;
lunasvg::SVGProperty::SVGProperty((char *)this + 328, 24LL);
*((_QWORD *)this + 41) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 337) = 1;
*((_DWORD *)this + 85) = 0;
*((_BYTE *)this + 344) = 0;
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 232));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 256));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 280));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 304));
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGRadialGradientElement *)((char *)this + 328));
}
| SVGRadialGradientElement:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDX,0x10
CALL 0x0011793c
LEA RAX,[0x15a1e0]
MOV qword ptr [RBX],RAX
LEA R13,[RBX + 0xe8]
LAB_001181f3:
MOV RDI,R13
MOV ESI,0x8
CALL 0x0011f3bc
LEA R14,[0x15ae10]
ADD R14,0x10
MOV qword ptr [RBX + 0xe8],R14
MOV word ptr [RBX + 0xf1],0x0
MOV dword ptr [RBX + 0xf4],0x42480000
MOV byte ptr [RBX + 0xf8],0x1
LEA R15,[RBX + 0x100]
LAB_00118233:
MOV RDI,R15
MOV ESI,0x9
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x100],R14
MOV word ptr [RBX + 0x109],0x1
MOV dword ptr [RBX + 0x10c],0x42480000
MOV byte ptr [RBX + 0x110],0x1
LEA R12,[RBX + 0x118]
LAB_00118268:
MOV RDI,R12
MOV ESI,0x32
CALL 0x0011f3bc
MOV qword ptr [RSP],R15
MOV R15,R13
MOV qword ptr [RBX + 0x118],R14
MOV word ptr [RBX + 0x121],0x102
MOV dword ptr [RBX + 0x124],0x42480000
MOV byte ptr [RBX + 0x128],0x1
LEA R13,[RBX + 0x130]
LAB_001182a4:
MOV RDI,R13
MOV ESI,0x17
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x130],R14
MOV word ptr [RBX + 0x139],0x0
MOV dword ptr [RBX + 0x13c],0x0
MOV byte ptr [RBX + 0x140],0x0
LEA RBP,[RBX + 0x148]
LAB_001182d9:
MOV RDI,RBP
MOV ESI,0x18
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x148],R14
MOV word ptr [RBX + 0x151],0x1
MOV dword ptr [RBX + 0x154],0x0
MOV byte ptr [RBX + 0x158],0x0
LAB_00118307:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,qword ptr [RSP]
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,R12
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,R13
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,RBP
CALL 0x0010fbfe
LAB_0011833f:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document*) */
void __thiscall
lunasvg::SVGRadialGradientElement::SVGRadialGradientElement
(SVGRadialGradientElement *this,Document *param_1)
{
SVGGradientElement::SVGGradientElement((SVGGradientElement *)this,param_1,0x10);
*(int ***)this = &PTR__SVGRadialGradientElement_0015a1e0;
/* try { // try from 001181f3 to 001181ff has its CatchHandler @ 00118356 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0xe8),8);
*(int ***)(this + 0xe8) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0xf1) = 0;
*(int4 *)(this + 0xf4) = 0x42480000;
this[0xf8] = (SVGRadialGradientElement)0x1;
/* try { // try from 00118233 to 0011823f has its CatchHandler @ 00118354 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x100),9);
*(int ***)(this + 0x100) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x109) = 1;
*(int4 *)(this + 0x10c) = 0x42480000;
this[0x110] = (SVGRadialGradientElement)0x1;
/* try { // try from 00118268 to 00118274 has its CatchHandler @ 00118352 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x118),0x32);
*(int ***)(this + 0x118) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x121) = 0x102;
*(int4 *)(this + 0x124) = 0x42480000;
this[0x128] = (SVGRadialGradientElement)0x1;
/* try { // try from 001182a4 to 001182b0 has its CatchHandler @ 00118350 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x130),0x17);
*(int ***)(this + 0x130) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x139) = 0;
*(int4 *)(this + 0x13c) = 0;
this[0x140] = (SVGRadialGradientElement)0x0;
/* try { // try from 001182d9 to 001182e5 has its CatchHandler @ 0011834e */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x148),0x18);
*(int ***)(this + 0x148) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x151) = 1;
*(int4 *)(this + 0x154) = 0;
this[0x158] = (SVGRadialGradientElement)0x0;
/* try { // try from 00118307 to 0011833e has its CatchHandler @ 00118358 */
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0xe8));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x100));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x118));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x130));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x148));
return;
}
|
|
1,435 | mysql_stmt_next_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_next_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_next_result,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
} | O0 | c | mysql_stmt_next_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x47060
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_next_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_next_result
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_stmt_next_result_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_next_result(*a1);
result = v2;
*v2 = 0;
return result;
}
| mysql_stmt_next_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00147060
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_next_result_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_next_result(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
1,436 | init_default_directories | eloqsql/mysys/my_default.c | static const char **init_default_directories(MEM_ROOT *alloc)
{
const char **dirs;
char *env;
int errors= 0;
DBUG_ENTER("init_default_directories");
dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *));
if (dirs == NULL)
DBUG_RETURN(NULL);
bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *));
#ifdef _WIN32
{
char fname_buffer[FN_REFLEN];
if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
errors += add_directory(alloc, "C:/", dirs);
if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL)
{
errors += add_directory(alloc, fname_buffer, dirs);
strcat_s(fname_buffer, sizeof(fname_buffer), "/data");
errors += add_directory(alloc, fname_buffer, dirs);
}
}
#else
#if defined(DEFAULT_SYSCONFDIR)
if (DEFAULT_SYSCONFDIR[0])
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
#else
errors += add_directory(alloc, "/etc/", dirs);
errors += add_directory(alloc, "/etc/mysql/", dirs);
#endif /* DEFAULT_SYSCONFDIR */
#endif
/*
If value of $MARIADB_HOME environment variable name is NULL, check
for $MYSQL_HOME
*/
if ((env= getenv("MARIADB_HOME")))
errors += add_directory(alloc, env, dirs);
else
{
if ((env= getenv("MYSQL_HOME")))
errors += add_directory(alloc, env, dirs);
}
/* Placeholder for --defaults-extra-file=<path> */
errors += add_directory(alloc, "", dirs);
#if !defined(_WIN32)
errors += add_directory(alloc, "~/", dirs);
#endif
DBUG_RETURN(errors > 0 ? NULL : dirs);
} | O0 | c | init_default_directories:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0x40, %esi
callq 0x3ca70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x377eb
jmp 0x377de
movq $0x0, -0x8(%rbp)
jmp 0x378df
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x251a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x5447f(%rip), %rsi # 0x8bc89
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x5446b(%rip), %rsi # 0x8bc8f
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x54465(%rip), %rdi # 0x8bc9b
callq 0x253e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3785e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x3788d
leaq 0x54443(%rip), %rdi # 0x8bca8
callq 0x253e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3788b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x3788d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x52893(%rip), %rsi # 0x8a12f
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x543fd(%rip), %rsi # 0x8bcb3
callq 0x394f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x378cf
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x378d7
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| init_default_directories:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_24], 0
mov rdi, [rbp+var_10]
mov esi, 40h ; '@'
call alloc_root
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_377EB
jmp short $+2
loc_377DE:
mov [rbp+var_8], 0
jmp loc_378DF
loc_377EB:
mov rdi, [rbp+var_18]
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtc; "/etc/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtcMysql; "/etc/mysql/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
lea rdi, aMariadbHome; "MARIADB_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_3785E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
jmp short loc_3788D
loc_3785E:
lea rdi, aMysqlHome; "MYSQL_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_3788B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
loc_3788B:
jmp short $+2
loc_3788D:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aNewSection+14h; ""
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, asc_8BCB3; "~/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_378CF
xor eax, eax
mov [rbp+var_30], rax
jmp short loc_378D7
loc_378CF:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_378D7:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_378DF:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long init_default_directories(long long a1)
{
int v3; // [rsp+Ch] [rbp-24h]
int v4; // [rsp+Ch] [rbp-24h]
int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = alloc_root(a1, 64LL);
if ( !v7 )
return 0LL;
memset(v7, 0LL, 64LL);
v3 = add_directory(a1, "/etc/", v7);
v4 = v3 + add_directory(a1, "/etc/mysql/", v7);
v6 = getenv("MARIADB_HOME");
if ( v6 || (v6 = getenv("MYSQL_HOME")) != 0 )
v4 += add_directory(a1, v6, v7);
v5 = v4 + add_directory(a1, "", v7);
if ( (int)(v5 + add_directory(a1, "~/", v7)) <= 0 )
return v7;
else
return 0LL;
}
| init_default_directories:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x24],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x40
CALL 0x0013ca70
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001377eb
JMP 0x001377de
LAB_001377de:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001378df
LAB_001377eb:
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x001251a0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x18bc89]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x18bc8f]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LEA RDI,[0x18bc9b]
CALL 0x001253e0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0013785e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0013788d
LAB_0013785e:
LEA RDI,[0x18bca8]
CALL 0x001253e0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0013788b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LAB_0013788b:
JMP 0x0013788d
LAB_0013788d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x18a12f]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x18bcb3]
CALL 0x001394f0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x001378cf
XOR EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001378d7
LAB_001378cf:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001378d7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001378df:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
void * init_default_directories(int8 param_1)
{
int iVar1;
int iVar2;
char *pcVar3;
void *local_38;
int local_2c;
void *local_10;
local_38 = (void *)alloc_root(param_1);
if (local_38 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
memset(local_38,0,0x40);
iVar1 = add_directory(param_1,"/etc/",local_38);
local_2c = add_directory(param_1,"/etc/mysql/",local_38);
local_2c = local_2c + iVar1;
pcVar3 = getenv("MARIADB_HOME");
if (pcVar3 == (char *)0x0) {
pcVar3 = getenv("MYSQL_HOME");
if (pcVar3 != (char *)0x0) {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
}
else {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
iVar1 = add_directory(param_1,"",local_38);
iVar2 = add_directory(param_1,&DAT_0018bcb3,local_38);
if (0 < iVar2 + iVar1 + local_2c) {
local_38 = (void *)0x0;
}
local_10 = local_38;
}
return local_10;
}
|
|
1,437 | ma_deep_copy_field | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static int ma_deep_copy_field(const MYSQL_FIELD *src, MYSQL_FIELD *dst,
MA_MEM_ROOT *r)
{
#define MA_STRDUP(f) \
do \
{ \
if (src->f) \
{ \
if ((dst->f= ma_strdup_root(r, src->f)) == NULL) \
return -1; \
} \
else \
{ \
dst->f= NULL; \
} \
} \
while (0)
MA_STRDUP(catalog);
MA_STRDUP(db);
MA_STRDUP(def);
MA_STRDUP(name);
MA_STRDUP(org_name);
MA_STRDUP(org_table);
MA_STRDUP(table);
#undef MA_STRDUP
dst->catalog_length= src->catalog_length;
dst->charsetnr= src->charsetnr;
dst->db_length= src->db_length;
dst->decimals= src->decimals;
dst->def_length= src->def_length;
dst->extension=
src->extension
? ma_field_extension_deep_dup(r,
src->extension)
: NULL;
dst->flags= src->flags;
dst->length= src->length;
dst->max_length = src->max_length;
dst->name_length= src->name_length;
dst->org_name_length= src->org_name_length;
dst->org_table_length= src->org_table_length;
dst->table_length= src->table_length;
dst->type= src->type;
return 0;
} | O0 | c | ma_deep_copy_field:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x398dc
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0x398da
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x398e8
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
jmp 0x398ea
jmp 0x398ec
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x39924
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0x39922
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x39930
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
jmp 0x39932
jmp 0x39934
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x3996c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
jne 0x3996a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x39978
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
jmp 0x3997a
jmp 0x3997c
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x399b1
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x399af
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x399bc
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0x399be
jmp 0x399c0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x399f8
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x399f6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x39a04
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
jmp 0x39a06
jmp 0x39a08
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x39a40
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x18(%rcx)
cmpq $0x0, %rax
jne 0x39a3e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x39a4c
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x39a4e
jmp 0x39a50
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x39a88
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3f530
movq -0x18(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x39a86
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39b8d
jmp 0x39a94
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x39a96
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x10(%rbp), %rax
movl 0x58(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x68(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x39afe
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x343b0
movq %rax, -0x28(%rbp)
jmp 0x39b06
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x39b06
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x70(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_deep_copy_field:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp qword ptr [rax+28h], 0
jz short loc_398DC
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+28h], rax
cmp rax, 0
jnz short loc_398DA
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_398DA:
jmp short loc_398E8
loc_398DC:
mov rax, [rbp+var_18]
mov qword ptr [rax+28h], 0
loc_398E8:
jmp short $+2
loc_398EA:
jmp short $+2
loc_398EC:
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_39924
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+20h], rax
cmp rax, 0
jnz short loc_39922
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_39922:
jmp short loc_39930
loc_39924:
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
loc_39930:
jmp short $+2
loc_39932:
jmp short $+2
loc_39934:
mov rax, [rbp+var_10]
cmp qword ptr [rax+30h], 0
jz short loc_3996C
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+30h]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+30h], rax
cmp rax, 0
jnz short loc_3996A
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_3996A:
jmp short loc_39978
loc_3996C:
mov rax, [rbp+var_18]
mov qword ptr [rax+30h], 0
loc_39978:
jmp short $+2
loc_3997A:
jmp short $+2
loc_3997C:
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz short loc_399B1
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_399AF
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_399AF:
jmp short loc_399BC
loc_399B1:
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
loc_399BC:
jmp short $+2
loc_399BE:
jmp short $+2
loc_399C0:
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_399F8
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+8], rax
cmp rax, 0
jnz short loc_399F6
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_399F6:
jmp short loc_39A04
loc_399F8:
mov rax, [rbp+var_18]
mov qword ptr [rax+8], 0
loc_39A04:
jmp short $+2
loc_39A06:
jmp short $+2
loc_39A08:
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz short loc_39A40
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+18h]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+18h], rax
cmp rax, 0
jnz short loc_39A3E
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_39A3E:
jmp short loc_39A4C
loc_39A40:
mov rax, [rbp+var_18]
mov qword ptr [rax+18h], 0
loc_39A4C:
jmp short $+2
loc_39A4E:
jmp short $+2
loc_39A50:
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 0
jz short loc_39A88
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
call ma_strdup_root
mov rcx, [rbp+var_18]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_39A86
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39B8D
loc_39A86:
jmp short loc_39A94
loc_39A88:
mov rax, [rbp+var_18]
mov qword ptr [rax+10h], 0
loc_39A94:
jmp short $+2
loc_39A96:
mov rax, [rbp+var_10]
mov ecx, [rax+5Ch]
mov rax, [rbp+var_18]
mov [rax+5Ch], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+6Ch]
mov rax, [rbp+var_18]
mov [rax+6Ch], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+58h]
mov rax, [rbp+var_18]
mov [rax+58h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+68h]
mov rax, [rbp+var_18]
mov [rax+68h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+60h]
mov rax, [rbp+var_18]
mov [rax+60h], ecx
mov rax, [rbp+var_10]
cmp qword ptr [rax+78h], 0
jz short loc_39AFE
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax+78h]
call ma_field_extension_deep_dup
mov [rbp+var_28], rax
jmp short loc_39B06
loc_39AFE:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_39B06:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_18]
mov [rax+78h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+64h]
mov rax, [rbp+var_18]
mov [rax+64h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+38h]
mov rax, [rbp+var_18]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+40h]
mov rax, [rbp+var_18]
mov [rax+40h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+48h]
mov rax, [rbp+var_18]
mov [rax+48h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+4Ch]
mov rax, [rbp+var_18]
mov [rax+4Ch], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+54h]
mov rax, [rbp+var_18]
mov [rax+54h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
mov rax, [rbp+var_18]
mov [rax+50h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+70h]
mov rax, [rbp+var_18]
mov [rax+70h], ecx
mov [rbp+var_4], 0
loc_39B8D:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ma_deep_copy_field(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
_QWORD *v11; // [rsp+8h] [rbp-28h]
if ( *(_QWORD *)(a1 + 40) )
{
v3 = ma_strdup_root(a3, *(_QWORD *)(a1 + 40));
*(_QWORD *)(a2 + 40) = v3;
if ( !v3 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 40) = 0LL;
}
if ( *(_QWORD *)(a1 + 32) )
{
v4 = ma_strdup_root(a3, *(_QWORD *)(a1 + 32));
*(_QWORD *)(a2 + 32) = v4;
if ( !v4 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 32) = 0LL;
}
if ( *(_QWORD *)(a1 + 48) )
{
v5 = ma_strdup_root(a3, *(_QWORD *)(a1 + 48));
*(_QWORD *)(a2 + 48) = v5;
if ( !v5 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 48) = 0LL;
}
if ( *(_QWORD *)a1 )
{
v6 = ma_strdup_root(a3, *(_QWORD *)a1);
*(_QWORD *)a2 = v6;
if ( !v6 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)a2 = 0LL;
}
if ( *(_QWORD *)(a1 + 8) )
{
v7 = ma_strdup_root(a3, *(_QWORD *)(a1 + 8));
*(_QWORD *)(a2 + 8) = v7;
if ( !v7 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 8) = 0LL;
}
if ( *(_QWORD *)(a1 + 24) )
{
v8 = ma_strdup_root(a3, *(_QWORD *)(a1 + 24));
*(_QWORD *)(a2 + 24) = v8;
if ( !v8 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 24) = 0LL;
}
if ( *(_QWORD *)(a1 + 16) )
{
v9 = ma_strdup_root(a3, *(_QWORD *)(a1 + 16));
*(_QWORD *)(a2 + 16) = v9;
if ( !v9 )
return (unsigned int)-1;
}
else
{
*(_QWORD *)(a2 + 16) = 0LL;
}
*(_DWORD *)(a2 + 92) = *(_DWORD *)(a1 + 92);
*(_DWORD *)(a2 + 108) = *(_DWORD *)(a1 + 108);
*(_DWORD *)(a2 + 88) = *(_DWORD *)(a1 + 88);
*(_DWORD *)(a2 + 104) = *(_DWORD *)(a1 + 104);
*(_DWORD *)(a2 + 96) = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 120) )
v11 = ma_field_extension_deep_dup(a3, *(_QWORD **)(a1 + 120));
else
v11 = 0LL;
*(_QWORD *)(a2 + 120) = v11;
*(_DWORD *)(a2 + 100) = *(_DWORD *)(a1 + 100);
*(_QWORD *)(a2 + 56) = *(_QWORD *)(a1 + 56);
*(_QWORD *)(a2 + 64) = *(_QWORD *)(a1 + 64);
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 72);
*(_DWORD *)(a2 + 76) = *(_DWORD *)(a1 + 76);
*(_DWORD *)(a2 + 84) = *(_DWORD *)(a1 + 84);
*(_DWORD *)(a2 + 80) = *(_DWORD *)(a1 + 80);
*(_DWORD *)(a2 + 112) = *(_DWORD *)(a1 + 112);
return 0;
}
| ma_deep_copy_field:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001398dc
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x28],RAX
CMP RAX,0x0
JNZ 0x001398da
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_001398da:
JMP 0x001398e8
LAB_001398dc:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x28],0x0
LAB_001398e8:
JMP 0x001398ea
LAB_001398ea:
JMP 0x001398ec
LAB_001398ec:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00139924
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x20],RAX
CMP RAX,0x0
JNZ 0x00139922
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_00139922:
JMP 0x00139930
LAB_00139924:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
LAB_00139930:
JMP 0x00139932
LAB_00139932:
JMP 0x00139934
LAB_00139934:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x0013996c
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x30]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x30],RAX
CMP RAX,0x0
JNZ 0x0013996a
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_0013996a:
JMP 0x00139978
LAB_0013996c:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x30],0x0
LAB_00139978:
JMP 0x0013997a
LAB_0013997a:
JMP 0x0013997c
LAB_0013997c:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x001399b1
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001399af
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_001399af:
JMP 0x001399bc
LAB_001399b1:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
LAB_001399bc:
JMP 0x001399be
LAB_001399be:
JMP 0x001399c0
LAB_001399c0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001399f8
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JNZ 0x001399f6
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_001399f6:
JMP 0x00139a04
LAB_001399f8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],0x0
LAB_00139a04:
JMP 0x00139a06
LAB_00139a06:
JMP 0x00139a08
LAB_00139a08:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00139a40
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x18],RAX
CMP RAX,0x0
JNZ 0x00139a3e
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_00139a3e:
JMP 0x00139a4c
LAB_00139a40:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],0x0
LAB_00139a4c:
JMP 0x00139a4e
LAB_00139a4e:
JMP 0x00139a50
LAB_00139a50:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00139a88
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x0013f530
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x00139a86
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139b8d
LAB_00139a86:
JMP 0x00139a94
LAB_00139a88:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],0x0
LAB_00139a94:
JMP 0x00139a96
LAB_00139a96:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x5c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x5c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x6c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x6c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x58]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x58],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x68],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x00139afe
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x78]
CALL 0x001343b0
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00139b06
LAB_00139afe:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00139b06
LAB_00139b06:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x64]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x64],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x48],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x4c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x54]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x54],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x70],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_00139b8d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 ma_deep_copy_field(long *param_1,long *param_2,int8 param_3)
{
long lVar1;
long local_30;
if (param_1[5] == 0) {
param_2[5] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[5]);
param_2[5] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (param_1[4] == 0) {
param_2[4] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[4]);
param_2[4] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (param_1[6] == 0) {
param_2[6] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[6]);
param_2[6] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (*param_1 == 0) {
*param_2 = 0;
}
else {
lVar1 = ma_strdup_root(param_3,*param_1);
*param_2 = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (param_1[1] == 0) {
param_2[1] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[1]);
param_2[1] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (param_1[3] == 0) {
param_2[3] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[3]);
param_2[3] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
if (param_1[2] == 0) {
param_2[2] = 0;
}
else {
lVar1 = ma_strdup_root(param_3,param_1[2]);
param_2[2] = lVar1;
if (lVar1 == 0) {
return 0xffffffff;
}
}
*(int4 *)((long)param_2 + 0x5c) = *(int4 *)((long)param_1 + 0x5c);
*(int4 *)((long)param_2 + 0x6c) = *(int4 *)((long)param_1 + 0x6c);
*(int *)(param_2 + 0xb) = (int)param_1[0xb];
*(int *)(param_2 + 0xd) = (int)param_1[0xd];
*(int *)(param_2 + 0xc) = (int)param_1[0xc];
if (param_1[0xf] == 0) {
local_30 = 0;
}
else {
local_30 = ma_field_extension_deep_dup(param_3,param_1[0xf]);
}
param_2[0xf] = local_30;
*(int4 *)((long)param_2 + 100) = *(int4 *)((long)param_1 + 100);
param_2[7] = param_1[7];
param_2[8] = param_1[8];
*(int *)(param_2 + 9) = (int)param_1[9];
*(int4 *)((long)param_2 + 0x4c) = *(int4 *)((long)param_1 + 0x4c);
*(int4 *)((long)param_2 + 0x54) = *(int4 *)((long)param_1 + 0x54);
*(int *)(param_2 + 10) = (int)param_1[10];
*(int *)(param_2 + 0xe) = (int)param_1[0xe];
return 0;
}
|
|
1,438 | w_search | eloqsql/storage/maria/ma_write.c | static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key,
my_off_t page_pos,
MARIA_PAGE *father_page, uchar *father_keypos,
my_bool insert_last)
{
int error,flag;
uchar *temp_buff,*keypos,*keybuff;
my_bool was_last_key, buff_alloced;
my_off_t next_page, dup_key_pos;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
DBUG_ENTER("w_search");
DBUG_PRINT("enter", ("page: %lu", (ulong) (page_pos/keyinfo->block_length)));
alloc_on_stack(*info->stack_end_ptr, temp_buff, buff_alloced,
(keyinfo->block_length + keyinfo->max_store_length*3));
if (!temp_buff)
DBUG_RETURN(1);
keybuff= temp_buff + (keyinfo->block_length + keyinfo->max_store_length*2);
if (_ma_fetch_keypage(&page, info, keyinfo, page_pos, PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, temp_buff, 0))
goto err;
flag= (*keyinfo->bin_search)(key, &page, comp_flag, &keypos,
keybuff, &was_last_key);
if (flag == 0)
{
MARIA_KEY tmp_key;
/* get position to record with duplicated key */
tmp_key.keyinfo= keyinfo;
tmp_key.data= keybuff;
if ((*keyinfo->get_key)(&tmp_key, page.flag, page.node, &keypos))
dup_key_pos= _ma_row_pos_from_key(&tmp_key);
else
dup_key_pos= HA_OFFSET_ERROR;
if (keyinfo->flag & HA_FULLTEXT)
{
uint off;
int subkeys;
get_key_full_length_rdonly(off, keybuff);
subkeys=ft_sintXkorr(keybuff+off);
comp_flag=SEARCH_SAME;
if (subkeys >= 0)
{
/* normal word, one-level tree structure */
flag=(*keyinfo->bin_search)(key, &page, comp_flag,
&keypos, keybuff, &was_last_key);
}
else
{
/* popular word. two-level tree. going down */
my_off_t root= dup_key_pos;
MARIA_KEY subkey;
get_key_full_length_rdonly(off, key->data);
subkey.keyinfo= keyinfo= &share->ft2_keyinfo;
subkey.data= key->data + off;
subkey.data_length= key->data_length - off;
subkey.ref_length= key->ref_length;
subkey.flag= key->flag;
/* we'll modify key entry 'in vivo' */
keypos-= keyinfo->keylength + page.node;
error= _ma_ck_real_write_btree(info, &subkey, &root, comp_flag);
_ma_dpointer(share, keypos+HA_FT_WLEN, root);
subkeys--; /* should there be underflow protection ? */
DBUG_ASSERT(subkeys < 0);
ft_intXstore(keypos, subkeys);
if (!error)
{
page_mark_changed(info, &page);
if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED,
DFLT_INIT_HITS))
goto err;
}
stack_alloc_free(temp_buff, buff_alloced);
DBUG_RETURN(error);
}
}
else /* not HA_FULLTEXT, normal HA_NOSAME key */
{
/*
TODO
When the index will support true versioning - with multiple
identical values in the UNIQUE index, invisible to each other -
the following should be changed to "continue inserting keys, at the
end (of the row or statement) wait". We need to wait on *all*
unique conflicts at once, not one-at-a-time, because we need to
know all blockers in advance, otherwise we'll have incomplete wait-for
graph.
*/
/*
transaction that has inserted the conflicting key may be in progress.
the caller will wait for it to be committed or aborted.
*/
info->dup_key_trid= _ma_trid_from_key(&tmp_key);
info->dup_key_pos= dup_key_pos;
my_errno= HA_ERR_FOUND_DUPP_KEY;
DBUG_PRINT("warning",
("Duplicate key. dup_key_trid: %lu pos %lu visible: %d",
(ulong) info->dup_key_trid,
(ulong) info->dup_key_pos,
info->trn ? trnman_can_read_from(info->trn,
info->dup_key_trid) : 2));
goto err;
}
}
if (flag == MARIA_FOUND_WRONG_KEY)
{
my_errno= HA_ERR_CRASHED;
goto err;
}
if (!was_last_key)
insert_last=0;
next_page= _ma_kpos(page.node, keypos);
if (next_page == HA_OFFSET_ERROR ||
(error= w_search(info, comp_flag, key, next_page,
&page, keypos, insert_last)) > 0)
{
error= _ma_insert(info, key, &page, keypos, keybuff,
father_page, father_keypos, insert_last);
if (error < 0)
goto err;
page_mark_changed(info, &page);
if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED,
DFLT_INIT_HITS))
goto err;
}
stack_alloc_free(temp_buff, buff_alloced);
DBUG_RETURN(error);
err:
stack_alloc_free(temp_buff, buff_alloced);
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN(-1);
} | O3 | c | w_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, -0x68(%rbp)
movq %r8, -0x60(%rbp)
movq %rcx, %r12
movl %esi, -0x48(%rbp)
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq %rax, -0x58(%rbp)
movq %rdx, -0x70(%rbp)
movq 0x8(%rdx), %r13
movzwl 0xa6(%r13), %r15d
movzwl 0xb0(%r13), %ebx
leaq (%rbx,%rbx,2), %rsi
addq %r15, %rsi
leaq -0xb0(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rdi), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x56e71
cmpq $0x10000, %rax # imm = 0x10000
ja 0x56e5b
cmpl $0x1000, %esi # imm = 0x1000
jb 0x56e71
cmpq $0x8001, %rax # imm = 0x8001
jb 0x56e71
movq %rsp, %rax
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %rax
movq %rax, %rsp
movb $0x1, %cl
movl %ecx, -0x44(%rbp)
jmp 0x56e9d
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xaa1d9
testq %rax, %rax
je 0x56f27
movzwl 0xa6(%r13), %r15d
movzwl 0xb0(%r13), %ebx
movl $0x0, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
movq %rax, -0x50(%rbp)
pushq %rax
callq 0x3f9ba
addq $0x10, %rsp
testb %al, %al
je 0x56ee4
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpb $0x0, -0x44(%rbp)
jne 0x56f2d
movq -0x50(%rbp), %rdi
callq 0xaa406
jmp 0x56f2d
leaq (%r15,%rbx,2), %r12
addq -0x50(%rbp), %r12
leaq -0xb0(%rbp), %rsi
leaq -0x40(%rbp), %rcx
leaq -0x31(%rbp), %r9
movq -0x70(%rbp), %r15
movq %r15, %rdi
movl -0x48(%rbp), %edx
movq %r12, %r8
callq *0xd8(%r13)
testl %eax, %eax
je 0x56f52
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jne 0x56f93
callq 0xac2be
movl $0x7e, (%rax)
jmp 0x56ecd
movl $0x1, %r13d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x57217
movl %r13d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
movq %r13, 0x8(%rdi)
movq %r12, (%rdi)
movl -0x88(%rbp), %edx
movl -0x84(%rbp), %esi
leaq -0x40(%rbp), %rcx
callq *0xe0(%r13)
testl %eax, %eax
je 0x57048
leaq -0xd0(%rbp), %rdi
callq 0x3db30
movq %rax, %rbx
jmp 0x5704f
xorl %eax, %eax
cmpb $0x0, -0x31(%rbp)
movzbl 0x10(%rbp), %ebx
cmovel %eax, %ebx
movl -0x88(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x3d9cb
movsbl %bl, %ebx
cmpq $-0x1, %rax
je 0x56fe5
movq -0x40(%rbp), %r9
subq $0x8, %rsp
leaq -0xb0(%rbp), %r8
movq %r14, %rdi
movl -0x48(%rbp), %esi
movq %r15, %rdx
movq %rax, %rcx
pushq %rbx
callq 0x56dd2
addq $0x10, %rsp
testl %eax, %eax
jle 0x57095
movq -0x40(%rbp), %rcx
leaq -0xb0(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r8
movq -0x60(%rbp), %r9
pushq %rbx
pushq -0x68(%rbp)
callq 0x57503
addq $0x10, %rsp
testl %eax, %eax
js 0x56ecd
movl %eax, %r13d
movq 0x2e8(%r14), %rax
leaq -0xb0(%rbp), %rdi
movl 0x30(%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movl $0x2, %esi
movl $0x3, %edx
callq 0x3faf9
testb %al, %al
jne 0x56ecd
jmp 0x57098
movq $-0x1, %rbx
testb $-0x80, 0xa2(%r13)
jne 0x57083
leaq -0xd0(%rbp), %rdi
callq 0x3dbe8
movq %rax, 0x430(%r14)
movq %rbx, 0x428(%r14)
callq 0xac2be
movl $0x79, (%rax)
jmp 0x56ecd
movzbl (%r12), %eax
cmpq $0xff, %rax
je 0x570ab
incq %rax
jmp 0x570bc
movl %eax, %r13d
cmpb $0x0, -0x44(%rbp)
movq -0x50(%rbp), %rdi
je 0x56edd
jmp 0x56f2d
movzwl 0x1(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %rax
movzbl (%r12,%rax), %ecx
shll $0x18, %ecx
js 0x570f3
leaq -0xb0(%rbp), %rsi
movl $0x4, -0x48(%rbp)
leaq -0x40(%rbp), %rcx
leaq -0x31(%rbp), %r9
movq %r15, %rdi
movl $0x4, %edx
movq %r12, %r8
callq *0xd8(%r13)
jmp 0x56f13
movzwl 0x2(%r12,%rax), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movzbl 0x1(%r12,%rax), %r13d
shll $0x10, %r13d
orl %edx, %r13d
orl %ecx, %r13d
movq %rbx, -0x78(%rbp)
movq (%r15), %rax
movzbl (%rax), %ecx
cmpl $0xff, %ecx
je 0x57126
incl %ecx
jmp 0x57134
movzwl 0x1(%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl $0x3, %ecx
movq -0x58(%rbp), %rbx
leaq 0x458(%rbx), %rdx
leaq -0xf0(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movl %ecx, %edx
addq %rdx, %rax
movq %rax, (%rsi)
movl 0x10(%r15), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsi)
movq 0x14(%r15), %rax
movq %rax, 0x14(%rsi)
movzwl 0x502(%rbx), %eax
addl -0x88(%rbp), %eax
subq %rax, -0x40(%rbp)
leaq -0x78(%rbp), %r12
movq %r14, %rdi
movq %r12, %rdx
movl $0x4, %ecx
callq 0x56d74
movl %eax, %r15d
movq -0x40(%rbp), %rsi
addq $0x4, %rsi
movq (%r12), %rdx
movq %rbx, %rdi
callq 0x3dd14
movl %r13d, %edx
decl %edx
movq -0x40(%rbp), %rax
movb %dl, 0x3(%rax)
movq -0x40(%rbp), %rax
movb %dh, 0x2(%rax)
movl %edx, %eax
shrl $0x10, %eax
movq -0x40(%rbp), %rcx
movb %al, 0x1(%rcx)
shrl $0x18, %edx
movq -0x40(%rbp), %rax
movb %dl, (%rax)
testb %r15b, %r15b
je 0x571e4
cmpb $0x0, -0x44(%rbp)
jne 0x571db
movq -0x50(%rbp), %rdi
callq 0xaa406
movzbl %r15b, %r13d
jmp 0x56f2d
movq 0x2e8(%r14), %rax
leaq -0xb0(%rbp), %rdi
movl 0x30(%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movl $0x2, %esi
movl $0x3, %edx
callq 0x3faf9
testb %al, %al
jne 0x56ecd
jmp 0x571cc
callq 0x2a250
| w_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov [rbp+var_68], r9
mov [rbp+var_60], r8
mov r12, rcx
mov [rbp+var_48], esi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov [rbp+var_58], rax
mov [rbp+var_70], rdx
mov r13, [rdx+8]
movzx r15d, word ptr [r13+0A6h]
movzx ebx, word ptr [r13+0B0h]
lea rsi, [rbx+rbx*2]
add rsi, r15
lea rcx, [rbp+var_B0]
mov [rcx], rsi
mov rax, [rdi+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_56E71
cmp rax, offset stru_10000
ja short loc_56E5B
cmp esi, 1000h
jb short loc_56E71
cmp rax, 8001h
jb short loc_56E71
loc_56E5B:
mov rax, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub rax, rsi
mov rsp, rax
mov cl, 1
mov [rbp+var_44], ecx
jmp short loc_56E9D
loc_56E71:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_56F27
movzx r15d, word ptr [r13+0A6h]
movzx ebx, word ptr [r13+0B0h]
mov [rbp+var_44], 0
loc_56E9D:
lea rdi, [rbp+var_B0]
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8d, 4
mov r9d, 3
push 0
mov [rbp+var_50], rax
push rax
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_56EE4
loc_56ECD:
mov r13d, 0FFFFFFFFh
cmp byte ptr [rbp+var_44], 0
jnz short loc_56F2D
mov rdi, [rbp+var_50]
loc_56EDD:
call my_free
jmp short loc_56F2D
loc_56EE4:
lea r12, [r15+rbx*2]
add r12, [rbp+var_50]
lea rsi, [rbp+var_B0]
lea rcx, [rbp+var_40]
lea r9, [rbp+var_31]
mov r15, [rbp+var_70]
mov rdi, r15
mov edx, [rbp+var_48]
mov r8, r12
call qword ptr [r13+0D8h]
test eax, eax
jz short loc_56F52
loc_56F13:
cmp eax, 7FFFFFFFh
jnz short loc_56F93
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp short loc_56ECD
loc_56F27:
mov r13d, 1
loc_56F2D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_57217
mov eax, r13d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_56F52:
lea rdi, [rbp+var_D0]
mov [rdi+8], r13
mov [rdi], r12
mov edx, [rbp+var_88]
mov esi, [rbp+var_84]
lea rcx, [rbp+var_40]
call qword ptr [r13+0E0h]
test eax, eax
jz loc_57048
lea rdi, [rbp+var_D0]
call _ma_row_pos_from_key
mov rbx, rax
jmp loc_5704F
loc_56F93:
xor eax, eax
cmp [rbp+var_31], 0
movzx ebx, [rbp+arg_0]
cmovz ebx, eax
mov edi, [rbp+var_88]
mov rsi, [rbp+var_40]
call _ma_kpos
movsx ebx, bl
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_56FE5
mov r9, [rbp+var_40]
sub rsp, 8
lea r8, [rbp+var_B0]
mov rdi, r14
mov esi, [rbp+var_48]
mov rdx, r15
mov rcx, rax
push rbx
call w_search
add rsp, 10h
test eax, eax
jle loc_57095
loc_56FE5:
mov rcx, [rbp+var_40]
lea rdx, [rbp+var_B0]
mov rdi, r14
mov rsi, r15
mov r8, r12
mov r9, [rbp+var_60]
push rbx
push [rbp+var_68]
call _ma_insert
add rsp, 10h
test eax, eax
js loc_56ECD
mov r13d, eax
mov rax, [r14+2E8h]
lea rdi, [rbp+var_B0]
mov ecx, [rdi+30h]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov esi, 2
mov edx, 3
call _ma_write_keypage
test al, al
jnz loc_56ECD
jmp short loc_57098
loc_57048:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_5704F:
test byte ptr [r13+0A2h], 80h
jnz short loc_57083
lea rdi, [rbp+var_D0]
call _ma_trid_from_key
mov [r14+430h], rax
mov [r14+428h], rbx
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
jmp loc_56ECD
loc_57083:
movzx eax, byte ptr [r12]
cmp rax, 0FFh
jz short loc_570AB
inc rax
jmp short loc_570BC
loc_57095:
mov r13d, eax
loc_57098:
cmp byte ptr [rbp+var_44], 0
mov rdi, [rbp+var_50]
jz loc_56EDD
jmp loc_56F2D
loc_570AB:
movzx eax, word ptr [r12+1]
rol ax, 8
movzx eax, ax
add rax, 3
loc_570BC:
movzx ecx, byte ptr [r12+rax]
shl ecx, 18h
js short loc_570F3
lea rsi, [rbp+var_B0]
mov [rbp+var_48], 4
lea rcx, [rbp+var_40]
lea r9, [rbp+var_31]
mov rdi, r15
mov edx, 4
mov r8, r12
call qword ptr [r13+0D8h]
jmp loc_56F13
loc_570F3:
movzx edx, word ptr [r12+rax+2]
rol dx, 8
movzx edx, dx
movzx r13d, byte ptr [r12+rax+1]
shl r13d, 10h
or r13d, edx
or r13d, ecx
mov [rbp+var_78], rbx
mov rax, [r15]
movzx ecx, byte ptr [rax]
cmp ecx, 0FFh
jz short loc_57126
inc ecx
jmp short loc_57134
loc_57126:
movzx ecx, word ptr [rax+1]
rol cx, 8
movzx ecx, cx
add ecx, 3
loc_57134:
mov rbx, [rbp+var_58]
lea rdx, [rbx+458h]
lea rsi, [rbp+var_F0]
mov [rsi+8], rdx
mov edx, ecx
add rax, rdx
mov [rsi], rax
mov eax, [r15+10h]
sub eax, ecx
mov [rsi+10h], eax
mov rax, [r15+14h]
mov [rsi+14h], rax
movzx eax, word ptr [rbx+502h]
add eax, [rbp+var_88]
sub [rbp+var_40], rax
lea r12, [rbp+var_78]
mov rdi, r14
mov rdx, r12
mov ecx, 4
call _ma_ck_real_write_btree
mov r15d, eax
mov rsi, [rbp+var_40]
add rsi, 4
mov rdx, [r12]
mov rdi, rbx
call _ma_dpointer
mov edx, r13d
dec edx
mov rax, [rbp+var_40]
mov [rax+3], dl
mov rax, [rbp+var_40]
mov [rax+2], dh
mov eax, edx
shr eax, 10h
mov rcx, [rbp+var_40]
mov [rcx+1], al
shr edx, 18h
mov rax, [rbp+var_40]
mov [rax], dl
test r15b, r15b
jz short loc_571E4
loc_571CC:
cmp byte ptr [rbp+var_44], 0
jnz short loc_571DB
mov rdi, [rbp+var_50]
call my_free
loc_571DB:
movzx r13d, r15b
jmp loc_56F2D
loc_571E4:
mov rax, [r14+2E8h]
lea rdi, [rbp+var_B0]
mov ecx, [rdi+30h]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov esi, 2
mov edx, 3
call _ma_write_keypage
test al, al
jnz loc_56ECD
jmp short loc_571CC
loc_57217:
call ___stack_chk_fail
| long long w_search(
long long a1,
unsigned int a2,
unsigned __int8 **a3,
unsigned long long a4,
long long a5,
long long a6,
char a7)
{
long long v9; // r13
long long v10; // r15
long long v11; // rbx
long long *v12; // rsi
long long **v13; // rcx
unsigned long long v14; // rax
bool v15; // cc
unsigned long long v16; // rax
char *v17; // rax
unsigned int v18; // r13d
char *v19; // rdi
unsigned __int8 *v20; // r12
unsigned __int8 **v21; // r15
unsigned __int8 **v22; // rdi
int v23; // eax
long long v25; // rbx
long long v27; // rax
int v28; // eax
int v29; // eax
long long v30; // rax
long long v31; // rax
int v32; // r13d
unsigned __int8 *v33; // rax
int v34; // ecx
unsigned int v35; // ecx
long long v36; // rbx
bool v37; // r15
_QWORD v38[2]; // [rsp+0h] [rbp-F0h] BYREF
unsigned int v39; // [rsp+10h] [rbp-E0h]
long long v40; // [rsp+14h] [rbp-DCh]
long long v41[4]; // [rsp+20h] [rbp-D0h] BYREF
long long *v42[5]; // [rsp+40h] [rbp-B0h] BYREF
unsigned int v43; // [rsp+68h] [rbp-88h]
unsigned int v44; // [rsp+6Ch] [rbp-84h]
unsigned int v45; // [rsp+70h] [rbp-80h]
long long v46; // [rsp+78h] [rbp-78h] BYREF
unsigned __int8 **v47; // [rsp+80h] [rbp-70h]
long long v48; // [rsp+88h] [rbp-68h]
long long v49; // [rsp+90h] [rbp-60h]
long long v50; // [rsp+98h] [rbp-58h]
char *v51; // [rsp+A0h] [rbp-50h]
unsigned int v52; // [rsp+A8h] [rbp-48h]
int v53; // [rsp+ACh] [rbp-44h]
_BYTE *v54; // [rsp+B0h] [rbp-40h] BYREF
char v55; // [rsp+BFh] [rbp-31h] BYREF
unsigned long long v56; // [rsp+C0h] [rbp-30h]
v48 = a6;
v49 = a5;
v52 = a2;
v56 = __readfsqword(0x28u);
v50 = *(_QWORD *)a1;
v47 = a3;
v9 = (long long)a3[1];
v10 = *(unsigned __int16 *)(v9 + 166);
v11 = *(unsigned __int16 *)(v9 + 176);
v12 = (long long *)(v10 + 3 * v11);
v13 = v42;
v42[0] = v12;
v14 = **(_QWORD **)(a1 + 120) - (_QWORD)v42;
v15 = v14 <= (unsigned long long)v12;
v16 = v14 - (_QWORD)v12;
if ( v15 || v16 <= (unsigned long long)&stru_10000 && ((unsigned int)v12 < 0x1000 || v16 < 0x8001) )
{
v17 = (char *)my_malloc(0LL, v12, 65552LL);
if ( !v17 )
return 1;
v10 = *(unsigned __int16 *)(v9 + 166);
v11 = *(unsigned __int16 *)(v9 + 176);
v53 = 0;
}
else
{
v17 = (char *)v38 - (((_DWORD)v12 + 15) & 0xFFFFFFF0);
LOBYTE(v13) = 1;
v53 = (int)v13;
}
v51 = v17;
if ( ma_fetch_keypage((long long)v42, a1, v9, a4, 4, 3, (long long)v17) )
goto LABEL_9;
v20 = (unsigned __int8 *)&v51[2 * v11 + v10];
v21 = v47;
v22 = v47;
v23 = (*(long long ( **)(unsigned __int8 **, long long **, _QWORD, _BYTE **, unsigned __int8 *, char *))(v9 + 216))(
v47,
v42,
v52,
&v54,
v20,
&v55);
if ( v23 )
{
LABEL_13:
if ( v23 == 0x7FFFFFFF )
{
*(_DWORD *)my_thread_var(v22) = 126;
goto LABEL_9;
}
if ( !v55 )
a7 = 0;
v27 = ma_kpos(v43, (long long)v54);
if ( v27 == -1 || (v28 = w_search(a1, v52, (_DWORD)v21, v27, (unsigned int)v42, (_DWORD)v54, a7), v28 > 0) )
{
v29 = ma_insert(a1, (_DWORD)v21, (unsigned int)v42, (_DWORD)v54, (_DWORD)v20, v49, v48, a7);
if ( v29 < 0 )
goto LABEL_9;
v18 = v29;
*(_BYTE *)(*(_QWORD *)(a1 + 744) + 24LL * v45 + 16) = 1;
if ( (unsigned __int8)ma_write_keypage(v42, 2, 3) )
goto LABEL_9;
}
else
{
v18 = v28;
}
v19 = v51;
if ( (_BYTE)v53 )
return v18;
goto LABEL_11;
}
v41[1] = v9;
v41[0] = (long long)v20;
if ( (*(unsigned int ( **)(long long *, _QWORD, _QWORD, _BYTE **))(v9 + 224))(v41, v44, v43, &v54) )
v25 = ma_row_pos_from_key(v41);
else
v25 = -1LL;
if ( *(char *)(v9 + 162) >= 0 )
{
*(_QWORD *)(a1 + 1072) = ma_trid_from_key((long long)v41);
*(_QWORD *)(a1 + 1064) = v25;
*(_DWORD *)my_thread_var(v41) = 121;
goto LABEL_9;
}
v30 = *v20;
if ( v30 == 255 )
v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v20 + 1), 8) + 3LL;
else
v31 = v30 + 1;
if ( (v20[v31] & 0x80) == 0 )
{
v52 = 4;
v22 = v21;
v23 = (*(long long ( **)(unsigned __int8 **, long long **, long long, _BYTE **, unsigned __int8 *, char *))(v9 + 216))(
v21,
v42,
4LL,
&v54,
v20,
&v55);
goto LABEL_13;
}
v32 = (v20[v31] << 24) | (unsigned __int16)__ROL2__(*(_WORD *)&v20[v31 + 2], 8) | (v20[v31 + 1] << 16);
v46 = v25;
v33 = *v21;
v34 = **v21;
if ( v34 == 255 )
v35 = (unsigned __int16)__ROL2__(*(_WORD *)(v33 + 1), 8) + 3;
else
v35 = v34 + 1;
v36 = v50;
v38[1] = v50 + 1112;
v38[0] = &v33[v35];
v39 = *((_DWORD *)v21 + 4) - v35;
v40 = *(long long *)((char *)v21 + 20);
v54 += -v43 - *(unsigned __int16 *)(v50 + 1282);
v37 = ma_ck_real_write_btree(a1, (long long)v38, &v46, 4);
ma_dpointer(v36, (long long)(v54 + 4), v46);
v54[3] = v32 - 1;
v54[2] = (unsigned __int16)(v32 - 1) >> 8;
v54[1] = (unsigned int)(v32 - 1) >> 16;
*v54 = (unsigned int)(v32 - 1) >> 24;
if ( v37 || (*(_BYTE *)(*(_QWORD *)(a1 + 744) + 24LL * v45 + 16) = 1, !(unsigned __int8)ma_write_keypage(v42, 2, 3)) )
{
if ( !(_BYTE)v53 )
my_free(v51);
return v37;
}
LABEL_9:
v18 = -1;
if ( !(_BYTE)v53 )
{
v19 = v51;
LABEL_11:
my_free(v19);
}
return v18;
}
| w_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RBP + -0x68],R9
MOV qword ptr [RBP + -0x60],R8
MOV R12,RCX
MOV dword ptr [RBP + -0x48],ESI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x70],RDX
MOV R13,qword ptr [RDX + 0x8]
MOVZX R15D,word ptr [R13 + 0xa6]
MOVZX EBX,word ptr [R13 + 0xb0]
LEA RSI,[RBX + RBX*0x2]
ADD RSI,R15
LEA RCX,[RBP + -0xb0]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00156e71
CMP RAX,0x10000
JA 0x00156e5b
CMP ESI,0x1000
JC 0x00156e71
CMP RAX,0x8001
JC 0x00156e71
LAB_00156e5b:
MOV RAX,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB RAX,RSI
MOV RSP,RAX
MOV CL,0x1
MOV dword ptr [RBP + -0x44],ECX
JMP 0x00156e9d
LAB_00156e71:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001aa1d9
TEST RAX,RAX
JZ 0x00156f27
MOVZX R15D,word ptr [R13 + 0xa6]
MOVZX EBX,word ptr [R13 + 0xb0]
MOV dword ptr [RBP + -0x44],0x0
LAB_00156e9d:
LEA RDI,[RBP + -0xb0]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
MOV qword ptr [RBP + -0x50],RAX
PUSH RAX
CALL 0x0013f9ba
ADD RSP,0x10
TEST AL,AL
JZ 0x00156ee4
LAB_00156ecd:
MOV R13D,0xffffffff
CMP byte ptr [RBP + -0x44],0x0
JNZ 0x00156f2d
MOV RDI,qword ptr [RBP + -0x50]
LAB_00156edd:
CALL 0x001aa406
JMP 0x00156f2d
LAB_00156ee4:
LEA R12,[R15 + RBX*0x2]
ADD R12,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0xb0]
LEA RCX,[RBP + -0x40]
LEA R9,[RBP + -0x31]
MOV R15,qword ptr [RBP + -0x70]
MOV RDI,R15
MOV EDX,dword ptr [RBP + -0x48]
MOV R8,R12
CALL qword ptr [R13 + 0xd8]
TEST EAX,EAX
JZ 0x00156f52
LAB_00156f13:
CMP EAX,0x7fffffff
JNZ 0x00156f93
CALL 0x001ac2be
MOV dword ptr [RAX],0x7e
JMP 0x00156ecd
LAB_00156f27:
MOV R13D,0x1
LAB_00156f2d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00157217
MOV EAX,R13D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00156f52:
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RDI + 0x8],R13
MOV qword ptr [RDI],R12
MOV EDX,dword ptr [RBP + -0x88]
MOV ESI,dword ptr [RBP + -0x84]
LEA RCX,[RBP + -0x40]
CALL qword ptr [R13 + 0xe0]
TEST EAX,EAX
JZ 0x00157048
LEA RDI,[RBP + -0xd0]
CALL 0x0013db30
MOV RBX,RAX
JMP 0x0015704f
LAB_00156f93:
XOR EAX,EAX
CMP byte ptr [RBP + -0x31],0x0
MOVZX EBX,byte ptr [RBP + 0x10]
CMOVZ EBX,EAX
MOV EDI,dword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x0013d9cb
MOVSX EBX,BL
CMP RAX,-0x1
JZ 0x00156fe5
MOV R9,qword ptr [RBP + -0x40]
SUB RSP,0x8
LEA R8,[RBP + -0xb0]
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x48]
MOV RDX,R15
MOV RCX,RAX
PUSH RBX
CALL 0x00156dd2
ADD RSP,0x10
TEST EAX,EAX
JLE 0x00157095
LAB_00156fe5:
MOV RCX,qword ptr [RBP + -0x40]
LEA RDX,[RBP + -0xb0]
MOV RDI,R14
MOV RSI,R15
MOV R8,R12
MOV R9,qword ptr [RBP + -0x60]
PUSH RBX
PUSH qword ptr [RBP + -0x68]
CALL 0x00157503
ADD RSP,0x10
TEST EAX,EAX
JS 0x00156ecd
MOV R13D,EAX
MOV RAX,qword ptr [R14 + 0x2e8]
LEA RDI,[RBP + -0xb0]
MOV ECX,dword ptr [RDI + 0x30]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV ESI,0x2
MOV EDX,0x3
CALL 0x0013faf9
TEST AL,AL
JNZ 0x00156ecd
JMP 0x00157098
LAB_00157048:
MOV RBX,-0x1
LAB_0015704f:
TEST byte ptr [R13 + 0xa2],0x80
JNZ 0x00157083
LEA RDI,[RBP + -0xd0]
CALL 0x0013dbe8
MOV qword ptr [R14 + 0x430],RAX
MOV qword ptr [R14 + 0x428],RBX
CALL 0x001ac2be
MOV dword ptr [RAX],0x79
JMP 0x00156ecd
LAB_00157083:
MOVZX EAX,byte ptr [R12]
CMP RAX,0xff
JZ 0x001570ab
INC RAX
JMP 0x001570bc
LAB_00157095:
MOV R13D,EAX
LAB_00157098:
CMP byte ptr [RBP + -0x44],0x0
MOV RDI,qword ptr [RBP + -0x50]
JZ 0x00156edd
JMP 0x00156f2d
LAB_001570ab:
MOVZX EAX,word ptr [R12 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD RAX,0x3
LAB_001570bc:
MOVZX ECX,byte ptr [R12 + RAX*0x1]
SHL ECX,0x18
JS 0x001570f3
LEA RSI,[RBP + -0xb0]
MOV dword ptr [RBP + -0x48],0x4
LEA RCX,[RBP + -0x40]
LEA R9,[RBP + -0x31]
MOV RDI,R15
MOV EDX,0x4
MOV R8,R12
CALL qword ptr [R13 + 0xd8]
JMP 0x00156f13
LAB_001570f3:
MOVZX EDX,word ptr [R12 + RAX*0x1 + 0x2]
ROL DX,0x8
MOVZX EDX,DX
MOVZX R13D,byte ptr [R12 + RAX*0x1 + 0x1]
SHL R13D,0x10
OR R13D,EDX
OR R13D,ECX
MOV qword ptr [RBP + -0x78],RBX
MOV RAX,qword ptr [R15]
MOVZX ECX,byte ptr [RAX]
CMP ECX,0xff
JZ 0x00157126
INC ECX
JMP 0x00157134
LAB_00157126:
MOVZX ECX,word ptr [RAX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
ADD ECX,0x3
LAB_00157134:
MOV RBX,qword ptr [RBP + -0x58]
LEA RDX,[RBX + 0x458]
LEA RSI,[RBP + -0xf0]
MOV qword ptr [RSI + 0x8],RDX
MOV EDX,ECX
ADD RAX,RDX
MOV qword ptr [RSI],RAX
MOV EAX,dword ptr [R15 + 0x10]
SUB EAX,ECX
MOV dword ptr [RSI + 0x10],EAX
MOV RAX,qword ptr [R15 + 0x14]
MOV qword ptr [RSI + 0x14],RAX
MOVZX EAX,word ptr [RBX + 0x502]
ADD EAX,dword ptr [RBP + -0x88]
SUB qword ptr [RBP + -0x40],RAX
LEA R12,[RBP + -0x78]
MOV RDI,R14
MOV RDX,R12
MOV ECX,0x4
CALL 0x00156d74
MOV R15D,EAX
MOV RSI,qword ptr [RBP + -0x40]
ADD RSI,0x4
MOV RDX,qword ptr [R12]
MOV RDI,RBX
CALL 0x0013dd14
MOV EDX,R13D
DEC EDX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x3],DL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x2],DH
MOV EAX,EDX
SHR EAX,0x10
MOV RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RCX + 0x1],AL
SHR EDX,0x18
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX],DL
TEST R15B,R15B
JZ 0x001571e4
LAB_001571cc:
CMP byte ptr [RBP + -0x44],0x0
JNZ 0x001571db
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001aa406
LAB_001571db:
MOVZX R13D,R15B
JMP 0x00156f2d
LAB_001571e4:
MOV RAX,qword ptr [R14 + 0x2e8]
LEA RDI,[RBP + -0xb0]
MOV ECX,dword ptr [RDI + 0x30]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV ESI,0x2
MOV EDX,0x3
CALL 0x0013faf9
TEST AL,AL
JNZ 0x00156ecd
JMP 0x001571cc
LAB_00157217:
CALL 0x0012a250
|
uint w_search(long *param_1,int4 param_2,int8 *param_3,int8 param_4,
int8 param_5,int8 param_6,char param_7)
{
byte bVar1;
byte bVar2;
ushort uVar3;
code *pcVar4;
int8 *puVar5;
int8 uVar6;
long lVar7;
int4 uVar8;
char cVar9;
byte bVar10;
int iVar11;
int iVar12;
uint uVar13;
ulong uVar14;
ulong uVar15;
int4 *puVar16;
long lVar17;
long lVar18;
long lVar19;
ulong uVar20;
byte **ppbVar21;
int1 *puVar22;
byte *pbVar23;
ulong uVar24;
long in_FS_OFFSET;
byte *local_f8;
long local_f0;
int local_e8;
int8 local_e4;
byte *local_d8;
long local_d0;
ulong local_b8 [5];
int local_90;
int4 local_8c;
uint local_88;
long local_80;
int8 *local_78;
int8 local_70;
int8 local_68;
long local_60;
int1 *local_58;
int4 local_50;
int4 local_4c;
int1 *local_48;
char local_39;
long local_38;
ppbVar21 = &local_f8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = *param_1;
lVar18 = param_3[1];
uVar24 = (ulong)*(ushort *)(lVar18 + 0xa6);
uVar20 = (ulong)*(ushort *)(lVar18 + 0xb0);
local_b8[0] = uVar20 * 3 + uVar24;
uVar14 = *(long *)param_1[0xf] - (long)local_b8;
uVar15 = uVar14 - local_b8[0];
local_78 = param_3;
local_70 = param_6;
local_68 = param_5;
local_50 = param_2;
if ((local_b8[0] < uVar14) &&
((0x10000 < uVar15 || ((0xfff < (uint)local_b8[0] && (0x8000 < uVar15)))))) {
puVar22 = (int1 *)((long)&local_f8 - (ulong)((uint)local_b8[0] + 0xf & 0xfffffff0));
local_4c = (int4)CONCAT71((int7)((ulong)local_b8 >> 8),1);
ppbVar21 = (byte **)puVar22;
}
else {
puVar22 = (int1 *)my_malloc(0,local_b8[0],0x10010);
if (puVar22 == (int1 *)0x0) {
uVar13 = 1;
goto LAB_00156f2d;
}
uVar24 = (ulong)*(ushort *)(lVar18 + 0xa6);
uVar20 = (ulong)*(ushort *)(lVar18 + 0xb0);
local_4c = 0;
ppbVar21 = &local_f8;
}
*(int8 *)((long)ppbVar21 + -8) = 0;
local_58 = puVar22;
*(int1 **)((long)ppbVar21 + -0x10) = puVar22;
*(int8 *)((long)ppbVar21 + -0x18) = 0x156ec5;
cVar9 = _ma_fetch_keypage(local_b8,param_1,lVar18,param_4,4,3);
uVar8 = local_50;
puVar5 = local_78;
if (cVar9 == '\0') {
pbVar23 = local_58 + uVar24 + uVar20 * 2;
pcVar4 = *(code **)(lVar18 + 0xd8);
*(int8 *)((long)ppbVar21 + -8) = 0x156f0f;
iVar11 = (*pcVar4)(puVar5,local_b8,uVar8,&local_48,pbVar23,&local_39);
iVar12 = local_90;
if (iVar11 == 0) {
pcVar4 = *(code **)(lVar18 + 0xe0);
local_d8 = pbVar23;
local_d0 = lVar18;
*(int8 *)((long)ppbVar21 + -8) = 0x156f77;
iVar12 = (*pcVar4)(&local_d8,local_8c,iVar12,&local_48);
if (iVar12 == 0) {
lVar17 = -1;
}
else {
*(int8 *)((long)ppbVar21 + -8) = 0x156f8b;
lVar17 = _ma_row_pos_from_key(&local_d8);
}
lVar7 = local_60;
if ((*(byte *)(lVar18 + 0xa2) & 0x80) == 0) {
*(int8 *)((long)ppbVar21 + -8) = 0x157065;
lVar18 = _ma_trid_from_key(&local_d8);
param_1[0x86] = lVar18;
param_1[0x85] = lVar17;
*(int8 *)((long)ppbVar21 + -8) = 0x157078;
puVar16 = (int4 *)_my_thread_var();
*puVar16 = 0x79;
goto LAB_00156ecd;
}
if ((ulong)*pbVar23 == 0xff) {
lVar19 = (ulong)(ushort)(*(ushort *)(pbVar23 + 1) << 8 | *(ushort *)(pbVar23 + 1) >> 8) + 3;
}
else {
lVar19 = (ulong)*pbVar23 + 1;
}
bVar1 = pbVar23[lVar19];
if ((int)((uint)bVar1 << 0x18) < 0) {
uVar3 = *(ushort *)(pbVar23 + lVar19 + 2);
bVar2 = pbVar23[lVar19 + 1];
local_f8 = (byte *)*puVar5;
if (*local_f8 == 0xff) {
uVar13 = (ushort)(*(ushort *)(local_f8 + 1) << 8 | *(ushort *)(local_f8 + 1) >> 8) + 3;
}
else {
uVar13 = *local_f8 + 1;
}
local_f0 = local_60 + 0x458;
local_f8 = local_f8 + uVar13;
local_e8 = *(int *)(puVar5 + 2) - uVar13;
local_e4 = *(int8 *)((long)puVar5 + 0x14);
local_48 = local_48 + -(ulong)((uint)*(ushort *)(local_60 + 0x502) + local_90);
local_80 = lVar17;
*(int8 *)((long)ppbVar21 + -8) = 0x157188;
bVar10 = _ma_ck_real_write_btree(param_1,&local_f8,&local_80,4);
lVar18 = local_80;
puVar22 = local_48 + 4;
*(int8 *)((long)ppbVar21 + -8) = 0x15719f;
_ma_dpointer(lVar7,puVar22,lVar18);
iVar12 = CONCAT13(bVar1,CONCAT12(bVar2,uVar3 << 8 | uVar3 >> 8)) + -1;
local_48[3] = (char)iVar12;
local_48[2] = (char)((uint)iVar12 >> 8);
local_48[1] = (char)((uint)iVar12 >> 0x10);
*local_48 = (char)((uint)iVar12 >> 0x18);
if (bVar10 == 0) {
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_88 * 0x18) = 1;
*(int8 *)((long)ppbVar21 + -8) = 0x15720d;
cVar9 = _ma_write_keypage(local_b8,2,3);
if (cVar9 != '\0') goto LAB_00156ecd;
}
puVar22 = local_58;
if ((char)local_4c == '\0') {
*(int8 *)((long)ppbVar21 + -8) = 0x1571db;
my_free(puVar22);
}
uVar13 = (uint)bVar10;
goto LAB_00156f2d;
}
local_50 = 4;
pcVar4 = *(code **)(lVar18 + 0xd8);
*(int8 *)((long)ppbVar21 + -8) = 0x1570ee;
iVar11 = (*pcVar4)(puVar5,local_b8,4,&local_48,pbVar23,&local_39);
}
puVar22 = local_48;
if (iVar11 == 0x7fffffff) {
*(int8 *)((long)ppbVar21 + -8) = 0x156f1f;
puVar16 = (int4 *)_my_thread_var();
*puVar16 = 0x7e;
goto LAB_00156ecd;
}
if (local_39 == '\0') {
param_7 = '\0';
}
*(int8 *)((long)ppbVar21 + -8) = 0x156faf;
lVar18 = _ma_kpos(local_90,puVar22);
puVar22 = local_48;
uVar8 = local_50;
if (lVar18 == -1) {
LAB_00156fe5:
puVar22 = local_48;
uVar6 = local_68;
*(ulong *)((long)ppbVar21 + -8) = (ulong)(uint)(int)param_7;
*(int8 *)((long)ppbVar21 + -0x10) = local_70;
*(int8 *)((long)ppbVar21 + -0x18) = 0x157006;
uVar13 = _ma_insert(param_1,puVar5,local_b8,puVar22,pbVar23,uVar6);
if (-1 < (int)uVar13) {
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_88 * 0x18) = 1;
*(int8 *)((long)ppbVar21 + -8) = 0x15703e;
cVar9 = _ma_write_keypage(local_b8,2,3);
if (cVar9 == '\0') goto LAB_00157098;
}
goto LAB_00156ecd;
}
*(ulong *)((long)ppbVar21 + -0x10) = (ulong)(uint)(int)param_7;
*(int8 *)((long)ppbVar21 + -0x18) = 0x156fd9;
uVar13 = w_search(param_1,uVar8,puVar5,lVar18,local_b8,puVar22);
if (0 < (int)uVar13) goto LAB_00156fe5;
LAB_00157098:
puVar22 = local_58;
}
else {
LAB_00156ecd:
uVar13 = 0xffffffff;
puVar22 = local_58;
}
local_58 = puVar22;
if ((char)local_4c == '\0') {
*(int8 *)((long)ppbVar21 + -8) = 0x156ee2;
my_free(puVar22);
}
LAB_00156f2d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar13;
}
/* WARNING: Subroutine does not return */
*(code **)((long)ppbVar21 + -8) = _ma_enlarge_root;
__stack_chk_fail();
}
|
|
1,439 | ma_pvio_wait_async | eloqsql/libmariadb/libmariadb/ma_pvio.c | static my_bool
ma_pvio_wait_async(struct mysql_async_context *b, enum enum_pvio_io_event event,
int timeout)
{
switch (event)
{
case VIO_IO_EVENT_READ:
b->events_to_wait_for = MYSQL_WAIT_READ;
break;
case VIO_IO_EVENT_WRITE:
b->events_to_wait_for = MYSQL_WAIT_WRITE;
break;
case VIO_IO_EVENT_CONNECT:
b->events_to_wait_for = MYSQL_WAIT_WRITE | IF_WIN(0, MYSQL_WAIT_EXCEPT);
break;
}
if (timeout >= 0)
{
b->events_to_wait_for |= MYSQL_WAIT_TIMEOUT;
b->timeout_value= timeout;
}
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return (b->events_occurred & MYSQL_WAIT_TIMEOUT) ? 0 : 1;
} | O0 | c | ma_pvio_wait_async:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x21012
jmp 0x20ffe
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x2101e
jmp 0x21008
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x2102a
jmp 0x21034
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
jmp 0x21034
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
jmp 0x21034
movq -0x8(%rbp), %rax
movl $0x6, (%rax)
cmpl $0x0, -0x10(%rbp)
jl 0x2104f
movq -0x8(%rbp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x21071
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x3c6d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2109d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rsi
xorl %edi, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x8, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ma_pvio_wait_async:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
mov [rbp+var_14], eax
test eax, eax
jz short loc_21012
jmp short $+2
loc_20FFE:
mov eax, [rbp+var_14]
sub eax, 1
jz short loc_2101E
jmp short $+2
loc_21008:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_2102A
jmp short loc_21034
loc_21012:
mov rax, [rbp+var_8]
mov dword ptr [rax], 1
jmp short loc_21034
loc_2101E:
mov rax, [rbp+var_8]
mov dword ptr [rax], 2
jmp short loc_21034
loc_2102A:
mov rax, [rbp+var_8]
mov dword ptr [rax], 6
loc_21034:
cmp [rbp+var_10], 0
jl short loc_2104F
mov rax, [rbp+var_8]
mov ecx, [rax]
or ecx, 8
mov [rax], ecx
mov ecx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+10h], ecx
loc_2104F:
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_21071
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+28h]
mov edi, 1
call rax
loc_21071:
mov rdi, [rbp+var_8]
add rdi, 38h ; '8'
call my_context_yield
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_2109D
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+28h]
xor edi, edi
call rax
loc_2109D:
mov rax, [rbp+var_8]
mov edx, [rax+4]
and edx, 8
mov eax, 1
xor ecx, ecx
cmp edx, 0
cmovnz eax, ecx
add rsp, 20h
pop rbp
retn
| _BOOL8 ma_pvio_wait_async(long long a1, int a2, int a3)
{
if ( a2 )
{
if ( a2 == 1 )
{
*(_DWORD *)a1 = 2;
}
else if ( a2 == 2 )
{
*(_DWORD *)a1 = 6;
}
}
else
{
*(_DWORD *)a1 = 1;
}
if ( a3 >= 0 )
{
*(_DWORD *)a1 |= 8u;
*(_DWORD *)(a1 + 16) = a3;
}
if ( *(_QWORD *)(a1 + 32) )
(*(void ( **)(long long, _QWORD))(a1 + 32))(1LL, *(_QWORD *)(a1 + 40));
my_context_yield(a1 + 56);
if ( *(_QWORD *)(a1 + 32) )
(*(void ( **)(_QWORD, _QWORD))(a1 + 32))(0LL, *(_QWORD *)(a1 + 40));
return (*(_DWORD *)(a1 + 4) & 8) == 0;
}
| ma_pvio_wait_async:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x14],EAX
TEST EAX,EAX
JZ 0x00121012
JMP 0x00120ffe
LAB_00120ffe:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
JZ 0x0012101e
JMP 0x00121008
LAB_00121008:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x0012102a
JMP 0x00121034
LAB_00121012:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x1
JMP 0x00121034
LAB_0012101e:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x2
JMP 0x00121034
LAB_0012102a:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x6
LAB_00121034:
CMP dword ptr [RBP + -0x10],0x0
JL 0x0012104f
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX]
OR ECX,0x8
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],ECX
LAB_0012104f:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00121071
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_00121071:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x38
CALL 0x0013c6d0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0012109d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_0012109d:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x4]
AND EDX,0x8
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x20
POP RBP
RET
|
bool ma_pvio_wait_async(uint *param_1,int param_2,uint param_3)
{
if (param_2 == 0) {
*param_1 = 1;
}
else if (param_2 == 1) {
*param_1 = 2;
}
else if (param_2 == 2) {
*param_1 = 6;
}
if (-1 < (int)param_3) {
*param_1 = *param_1 | 8;
param_1[4] = param_3;
}
if (*(long *)(param_1 + 8) != 0) {
(**(code **)(param_1 + 8))(1,*(int8 *)(param_1 + 10));
}
my_context_yield(param_1 + 0xe);
if (*(long *)(param_1 + 8) != 0) {
(**(code **)(param_1 + 8))(0,*(int8 *)(param_1 + 10));
}
return (param_1[1] & 8) == 0;
}
|
|
1,440 | ReadWriteQueue::readQueueFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 666mxvbee[P]BattleShip/lib/ReadWriteQueue/ReadWriteQueue.cpp | int ReadWriteQueue::readQueueFromFile(const std::string& filename) {
std::lock_guard<std::mutex> lock(queue_mutex);
std::ifstream in(filename);
if (!in.is_open()) {
std::cerr << "ReadWriteQueue: Unable to open " << filename << " for reading." << std::endl;
return -1;
}
int player = -1;
in >> player;
in.close();
return player;
} | O3 | cpp | ReadWriteQueue::readQueueFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x15230
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x5550
leaq 0x80(%rsp), %rdi
callq 0x5080
testb %al, %al
je 0x151a2
leaq 0x4(%rsp), %rsi
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %rdi
callq 0x5210
leaq 0x8(%rsp), %rdi
callq 0x5070
movl 0x4(%rsp), %ebp
jmp 0x15210
movq 0xfe37(%rip), %rdi # 0x24fe0
leaq 0x6109(%rip), %rsi # 0x1b2b9
movl $0x1f, %edx
callq 0x5400
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0xfe18(%rip), %rdi # 0x24fe0
callq 0x5400
movq %rax, %r14
leaq 0x6102(%rip), %rsi # 0x1b2d9
movl $0xd, %edx
movq %rax, %rdi
callq 0x5400
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5350
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x5280
leaq 0x8(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x52d0
movl %ebp, %eax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x5260
jmp 0x1523e
movq %rax, %r14
jmp 0x1524b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x55e0
nop
| _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r14
push rbx
sub rsp, 210h
mov r14, rsi
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_15230
lea rdi, [rsp+228h+var_220]
mov rsi, r14
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+228h+var_1A8]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_151A2
lea rsi, [rsp+228h+var_224]
mov dword ptr [rsi], 0FFFFFFFFh
lea rdi, [rsp+228h+var_220]
call __ZNSirsERi; std::istream::operator>>(int &)
lea rdi, [rsp+228h+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
mov ebp, [rsp+228h+var_224]
jmp short loc_15210
loc_151A2:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aReadwritequeue; "ReadWriteQueue: Unable to open "
mov edx, 1Fh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, aForReading; " for reading."
mov edx, 0Dh
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov ebp, 0FFFFFFFFh
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
loc_15210:
lea rdi, [rsp+228h+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, ebp
add rsp, 210h
pop rbx
pop r14
pop rbp
retn
loc_15230:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_1523E
mov r14, rax
jmp short loc_1524B
loc_1523E:
mov r14, rax
lea rdi, [rsp+228h+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_1524B:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long ReadWriteQueue::readQueueFromFile(long long a1, _QWORD *a2)
{
int v2; // eax
unsigned int v3; // ebp
std::ostream *v4; // r14
char v5; // al
std::ostream *v6; // rax
int v8; // [rsp+4h] [rbp-224h] BYREF
_BYTE v9[120]; // [rsp+8h] [rbp-220h] BYREF
_BYTE v10[424]; // [rsp+80h] [rbp-1A8h] BYREF
v2 = pthread_mutex_lock(a1);
if ( v2 )
std::__throw_system_error(v2);
std::ifstream::basic_ifstream(v9, a2, 8LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v10) )
{
v8 = -1;
std::istream::operator>>(v9, &v8);
std::ifstream::close(v9);
v3 = v8;
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "ReadWriteQueue: Unable to open ", 31LL);
v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v4, " for reading.", 13LL);
v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v6 = (std::ostream *)std::ostream::put(v4, v5);
v3 = -1;
std::ostream::flush(v6);
}
std::ifstream::~ifstream(v9);
pthread_mutex_unlock(a1);
return v3;
}
| readQueueFromFile:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x210
MOV R14,RSI
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x00115230
LAB_0011515a:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0x8
CALL 0x00105550
LEA RDI,[RSP + 0x80]
CALL 0x00105080
TEST AL,AL
JZ 0x001151a2
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],0xffffffff
LAB_00115188:
LEA RDI,[RSP + 0x8]
CALL 0x00105210
LEA RDI,[RSP + 0x8]
CALL 0x00105070
MOV EBP,dword ptr [RSP + 0x4]
JMP 0x00115210
LAB_001151a2:
MOV RDI,qword ptr [0x00124fe0]
LEA RSI,[0x11b2b9]
MOV EDX,0x1f
CALL 0x00105400
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [0x00124fe0]
CALL 0x00105400
MOV R14,RAX
LEA RSI,[0x11b2d9]
MOV EDX,0xd
MOV RDI,RAX
CALL 0x00105400
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x00105350
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00105040
MOV EBP,0xffffffff
MOV RDI,RAX
CALL 0x00105280
LAB_00115210:
LEA RDI,[RSP + 0x8]
CALL 0x00105090
MOV RDI,RBX
CALL 0x001052d0
MOV EAX,EBP
ADD RSP,0x210
POP RBX
POP R14
POP RBP
RET
LAB_00115230:
MOV EDI,EAX
CALL 0x00105260
|
/* ReadWriteQueue::readQueueFromFile(std::__cxx11::string const&) */
int __thiscall ReadWriteQueue::readQueueFromFile(ReadWriteQueue *this,string *param_1)
{
char cVar1;
int iVar2;
ostream *poVar3;
int local_224;
ifstream local_220 [520];
iVar2 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar2 == 0) {
/* try { // try from 0011515a to 0011516b has its CatchHandler @ 00115239 */
std::ifstream::ifstream(local_220,param_1,8);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 == '\0') {
/* try { // try from 001151a2 to 0011520f has its CatchHandler @ 0011523e */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00124fe0,"ReadWriteQueue: Unable to open ",0x1f);
poVar3 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00124fe0,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar3," for reading.",0xd);
std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3);
std::ostream::put((char)poVar3);
iVar2 = -1;
std::ostream::flush();
}
else {
local_224 = -1;
/* try { // try from 00115188 to 0011519b has its CatchHandler @ 00115237 */
std::istream::operator>>((istream *)local_220,&local_224);
std::ifstream::close();
iVar2 = local_224;
}
std::ifstream::~ifstream(local_220);
pthread_mutex_unlock((pthread_mutex_t *)this);
return iVar2;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
|
|
1,441 | pfs_lock::allocated_to_free() | eloqsql/storage/perfschema/pfs_lock.h | void allocated_to_free(void)
{
/*
If this record is not in the ALLOCATED state and the caller is trying
to free it, this is a bug: the caller is confused,
and potentially damaging data owned by another thread or object.
*/
uint32 copy= copy_version_state();
/* Make sure the record was ALLOCATED. */
assert(((copy & STATE_MASK) == PFS_LOCK_ALLOCATED));
/* Keep the same version, set the FREE state */
uint32 new_val= (copy & VERSION_MASK) + PFS_LOCK_FREE;
PFS_atomic::store_u32(&m_version_state, new_val);
} | O0 | c | pfs_lock::allocated_to_free():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x36e60
movq -0x18(%rbp), %rdi
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $-0x4, %eax
addl $0x0, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
callq 0x36e40
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN8pfs_lock17allocated_to_freeEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_18], rdi
call _ZN8pfs_lock18copy_version_stateEv; pfs_lock::copy_version_state(void)
mov rdi, [rbp+var_18]; this
mov dword ptr [rbp+var_10+4], eax
mov eax, dword ptr [rbp+var_10+4]
and eax, 0FFFFFFFCh
add eax, 0
mov dword ptr [rbp+var_10], eax
mov esi, dword ptr [rbp+var_10]; unsigned int *
call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint)
add rsp, 20h
pop rbp
retn
| long long pfs_lock::allocated_to_free(pfs_lock *this)
{
unsigned int v2; // [rsp+10h] [rbp-10h]
v2 = pfs_lock::copy_version_state(this) & 0xFFFFFFFC;
return PFS_atomic::store_u32(this, (unsigned int *)v2);
}
| allocated_to_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
CALL 0x00136e60
MOV RDI,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0xfffffffc
ADD EAX,0x0
MOV dword ptr [RBP + -0x10],EAX
MOV ESI,dword ptr [RBP + -0x10]
CALL 0x00136e40
ADD RSP,0x20
POP RBP
RET
|
/* pfs_lock::allocated_to_free() */
void __thiscall pfs_lock::allocated_to_free(pfs_lock *this)
{
uint uVar1;
uVar1 = copy_version_state(this);
PFS_atomic::store_u32((uint *)this,uVar1 & 0xfffffffc);
return;
}
|
|
1,442 | nglog::GetCapturedTestOutput[abi:cxx11](int) | ng-log[P]ng-log/src/googletest.h | static inline string GetCapturedTestOutput(int fd) {
CHECK((fd == fileno(stdout)) || (fd == fileno(stderr)));
std::unique_ptr<CapturedStream> cap = std::move(s_captured_streams.at(fd));
s_captured_streams.erase(fd);
CHECK(cap) << ": did you forget CaptureTestStdout() or CaptureTestStderr()?";
// Make sure everything is flushed.
cap->StopCapture();
// Read the captured file.
std::unique_ptr<FILE> file{fopen(cap->filename().c_str(), "r")};
const string content = ReadEntireFile(file.get());
file.reset();
return content;
} | O0 | c | nglog::GetCapturedTestOutput[abi:cxx11](int):
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x120(%rbp)
movq %rdi, %rax
movq %rax, -0x118(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x110(%rbp)
movq 0x7c8dd(%rip), %rax # 0x9af00
movq (%rax), %rdi
callq 0xa870
movl -0x110(%rbp), %ecx
movl %eax, %edx
movb $0x0, -0x71(%rbp)
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x10a(%rbp)
je 0x1e66e
movl -0xc(%rbp), %eax
movl %eax, -0x124(%rbp)
movq 0x7c945(%rip), %rax # 0x9af98
movq (%rax), %rdi
callq 0xa870
movl %eax, %ecx
movl -0x124(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x10a(%rbp)
movb -0x10a(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1e67c
jmp 0x1e6dd
leaq 0x4faf6(%rip), %rsi # 0x6e179
leaq -0x70(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movl $0x190, %edx # imm = 0x190
callq 0x35ba0
movq -0x138(%rbp), %rdi
movb $0x1, -0x71(%rbp)
callq 0x316d0
movq %rax, -0x130(%rbp)
jmp 0x1e6b1
movq -0x130(%rbp), %rdi
leaq 0x4fb03(%rip), %rsi # 0x6e1c2
callq 0xa7f0
movq %rax, -0x140(%rbp)
jmp 0x1e6cd
movq -0x140(%rbp), %rsi
leaq -0xd(%rbp), %rdi
callq 0x231c0
testb $0x1, -0x71(%rbp)
jne 0x1e6e5
jmp 0x1e70c
leaq -0x70(%rbp), %rdi
callq 0x35c10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x1e806
jmp 0x1e811
leaq 0x7d67d(%rip), %rdi # 0x9bd90
movq %rdi, -0x150(%rbp)
leaq -0xc(%rbp), %rsi
movq %rsi, -0x148(%rbp)
callq 0x26fd0
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x27070
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x270a0
jmp 0x1e74e
leaq -0x90(%rbp), %rdi
callq 0x270d0
xorb $-0x1, %al
movb $0x0, -0xf9(%rbp)
testb $0x1, %al
jne 0x1e76c
jmp 0x1e7ed
leaq 0x4fa06(%rip), %rsi # 0x6e179
leaq -0xf8(%rbp), %rdi
movl $0x193, %edx # imm = 0x193
callq 0x35ba0
jmp 0x1e786
movb $0x1, -0xf9(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x316d0
movq %rax, -0x158(%rbp)
jmp 0x1e7a2
movq -0x158(%rbp), %rdi
leaq 0x4fb5a(%rip), %rsi # 0x6e30a
callq 0xa7f0
movq %rax, -0x160(%rbp)
jmp 0x1e7be
movq -0x160(%rbp), %rdi
leaq 0x4fb51(%rip), %rsi # 0x6e31d
callq 0xa7f0
movq %rax, -0x168(%rbp)
jmp 0x1e7da
movq -0x168(%rbp), %rsi
leaq -0x91(%rbp), %rdi
callq 0x231c0
testb $0x1, -0xf9(%rbp)
jne 0x1e7f8
jmp 0x1e84b
leaq -0xf8(%rbp), %rdi
callq 0x35c10
jmp 0x1e806
leaq -0x70(%rbp), %rdi
callq 0x35c10
jmp 0x1e811
jmp 0x1e96f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1e963
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0xf9(%rbp)
jne 0x1e902
jmp 0x1e910
leaq -0x90(%rbp), %rdi
callq 0x27100
movq %rax, %rdi
callq 0x27120
jmp 0x1e861
leaq -0x90(%rbp), %rdi
callq 0x27100
movq %rax, %rdi
callq 0x27240
movq %rax, -0x170(%rbp)
jmp 0x1e87e
movq -0x170(%rbp), %rdi
callq 0xa340
movq %rax, %rdi
leaq 0x4f0a9(%rip), %rsi # 0x6d93d
callq 0xa9e0
movq %rax, -0x178(%rbp)
jmp 0x1e8a2
movq -0x178(%rbp), %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x27260
movq -0x180(%rbp), %rdi
movb $0x0, -0x109(%rbp)
callq 0x27290
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x1e980
jmp 0x1e8e0
leaq -0x108(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x272c0
movb $0x1, -0x109(%rbp)
testb $0x1, -0x109(%rbp)
jne 0x1e93b
jmp 0x1e92f
leaq -0xf8(%rbp), %rdi
callq 0x35c10
jmp 0x1e910
jmp 0x1e963
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x272f0
jmp 0x1e963
movq -0x120(%rbp), %rdi
callq 0xb128
leaq -0x108(%rbp), %rdi
callq 0x272f0
leaq -0x90(%rbp), %rdi
callq 0x243a0
movq -0x118(%rbp), %rax
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x243a0
movq -0x80(%rbp), %rdi
callq 0xaf50
movq %rax, %rdi
callq 0x226c0
| _ZN5nglogL21GetCapturedTestOutputB5cxx11Ei:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_120], rdi
mov rax, rdi
mov [rbp+var_118], rax
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
mov [rbp+var_110], eax
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fileno
mov ecx, [rbp+var_110]
mov edx, eax
mov [rbp+var_71], 0
mov al, 1
cmp ecx, edx
mov [rbp+var_10A], al
jz short loc_1E66E
mov eax, [rbp+var_C]
mov [rbp+var_124], eax
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
mov ecx, eax
mov eax, [rbp+var_124]
cmp eax, ecx
setz al
mov [rbp+var_10A], al
loc_1E66E:
mov al, [rbp+var_10A]
xor al, 0FFh
test al, 1
jnz short loc_1E67C
jmp short loc_1E6DD
loc_1E67C:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_70]; this
mov [rbp+var_138], rdi
mov edx, 190h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, [rbp+var_138]; this
mov [rbp+var_71], 1
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_130], rax
jmp short $+2
loc_1E6B1:
mov rdi, [rbp+var_130]
lea rsi, aCheckFailedFdF; "Check failed: (fd == fileno(stdout)) ||"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_140], rax
jmp short $+2
loc_1E6CD:
mov rsi, [rbp+var_140]
lea rdi, [rbp+var_D]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_1E6DD:
test [rbp+var_71], 1
jnz short loc_1E6E5
jmp short loc_1E70C
loc_1E6E5:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_71], 1
jnz loc_1E806
jmp loc_1E811
loc_1E70C:
lea rdi, _ZN5nglogL18s_captured_streamsE; nglog::s_captured_streams
mov [rbp+var_150], rdi
lea rsi, [rbp+var_C]
mov [rbp+var_148], rsi
call _ZNSt3mapIiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS2_EESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::unique_ptr<nglog::CapturedStream>>::at(int const&)
mov rsi, rax
lea rdi, [rbp+var_90]
call _ZNSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EEC2EOS4_; std::unique_ptr<nglog::CapturedStream>::unique_ptr(std::unique_ptr<nglog::CapturedStream>&&)
mov rdi, [rbp+var_150]
mov rsi, [rbp+var_148]
call _ZNSt3mapIiSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS2_EESt4lessIiESaISt4pairIKiS5_EEE5eraseERS9_; std::map<int,std::unique_ptr<nglog::CapturedStream>>::erase(int const&)
jmp short $+2
loc_1E74E:
lea rdi, [rbp+var_90]
call _ZNKSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EEcvbEv; std::unique_ptr<nglog::CapturedStream>::operator bool(void)
xor al, 0FFh
mov [rbp+var_F9], 0
test al, 1
jnz short loc_1E76C
jmp loc_1E7ED
loc_1E76C:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_F8]; this
mov edx, 193h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
jmp short $+2
loc_1E786:
mov [rbp+var_F9], 1
lea rdi, [rbp+var_F8]; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_158], rax
jmp short $+2
loc_1E7A2:
mov rdi, [rbp+var_158]
lea rsi, aCheckFailedCap; "Check failed: cap "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_160], rax
jmp short $+2
loc_1E7BE:
mov rdi, [rbp+var_160]
lea rsi, aDidYouForgetCa; ": did you forget CaptureTestStdout() or"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_168], rax
jmp short $+2
loc_1E7DA:
mov rsi, [rbp+var_168]
lea rdi, [rbp+var_91]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_1E7ED:
test [rbp+var_F9], 1
jnz short loc_1E7F8
jmp short loc_1E84B
loc_1E7F8:
lea rdi, [rbp+var_F8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_1E806:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_1E811:
jmp loc_1E96F
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
jmp loc_1E963
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_F9], 1
jnz loc_1E902
jmp loc_1E910
loc_1E84B:
lea rdi, [rbp+var_90]
call _ZNKSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EEptEv; std::unique_ptr<nglog::CapturedStream>::operator->(void)
mov rdi, rax; this
call _ZN5nglog14CapturedStream11StopCaptureEv; nglog::CapturedStream::StopCapture(void)
jmp short $+2
loc_1E861:
lea rdi, [rbp+var_90]
call _ZNKSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EEptEv; std::unique_ptr<nglog::CapturedStream>::operator->(void)
mov rdi, rax
call _ZNK5nglog14CapturedStream8filenameB5cxx11Ev; nglog::CapturedStream::filename(void)
mov [rbp+var_170], rax
jmp short $+2
loc_1E87E:
mov rdi, [rbp+var_170]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
lea rsi, aBar_0+2; "r"
call _fopen
mov [rbp+var_178], rax
jmp short $+2
loc_1E8A2:
mov rsi, [rbp+var_178]
lea rdi, [rbp+var_108]
mov [rbp+var_180], rdi
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<_IO_FILE>::unique_ptr<std::default_delete<_IO_FILE>,void>(_IO_FILE*)
mov rdi, [rbp+var_180]
mov [rbp+var_109], 0
call _ZNKSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EE3getEv; std::unique_ptr<_IO_FILE>::get(void)
mov rdi, [rbp+var_120]
mov rsi, rax
call _ZN5nglogL14ReadEntireFileB5cxx11EP8_IO_FILE; nglog::ReadEntireFile(_IO_FILE *)
jmp short $+2
loc_1E8E0:
lea rdi, [rbp+var_108]
xor eax, eax
mov esi, eax
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::unique_ptr<_IO_FILE>::reset(_IO_FILE*)
mov [rbp+var_109], 1
test [rbp+var_109], 1
jnz short loc_1E93B
jmp short loc_1E92F
loc_1E902:
lea rdi, [rbp+var_F8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_1E910:
jmp short loc_1E963
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
lea rdi, [rbp+var_108]
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EED2Ev; std::unique_ptr<_IO_FILE>::~unique_ptr()
jmp short loc_1E963
loc_1E92F:
mov rdi, [rbp+var_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1E93B:
lea rdi, [rbp+var_108]
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EED2Ev; std::unique_ptr<_IO_FILE>::~unique_ptr()
lea rdi, [rbp+var_90]
call _ZNSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::CapturedStream>::~unique_ptr()
mov rax, [rbp+var_118]
add rsp, 180h
pop rbp
retn
loc_1E963:
lea rdi, [rbp+var_90]
call _ZNSt10unique_ptrIN5nglog14CapturedStreamESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::CapturedStream>::~unique_ptr()
loc_1E96F:
mov rdi, [rbp+var_80]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long nglog::GetCapturedTestOutput[abi:cxx11](long long a1, int a2)
{
long long v2; // rax
long long v3; // rsi
nglog::CapturedStream *v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v9; // [rsp+8h] [rbp-178h]
long long v10; // [rsp+10h] [rbp-170h]
long long v11; // [rsp+20h] [rbp-160h]
long long v12; // [rsp+28h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-140h]
long long v14; // [rsp+50h] [rbp-130h]
bool v15; // [rsp+76h] [rbp-10Ah]
_BYTE v16[15]; // [rsp+78h] [rbp-108h] BYREF
char v17; // [rsp+87h] [rbp-F9h]
_BYTE v18[103]; // [rsp+88h] [rbp-F8h] BYREF
char v19; // [rsp+EFh] [rbp-91h] BYREF
_BYTE v20[12]; // [rsp+F0h] [rbp-90h] BYREF
char v21; // [rsp+10Fh] [rbp-71h]
_BYTE v22[99]; // [rsp+110h] [rbp-70h] BYREF
char v23; // [rsp+173h] [rbp-Dh] BYREF
int v24; // [rsp+174h] [rbp-Ch] BYREF
long long v25; // [rsp+178h] [rbp-8h]
v25 = a1;
v24 = a2;
v21 = 0;
v15 = 1;
if ( a2 != (unsigned int)fileno(stdout) )
v15 = v24 == (unsigned int)fileno(stderr);
if ( !v15 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v22,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
400);
v21 = 1;
v14 = nglog::LogMessage::stream((nglog::LogMessage *)v22);
v13 = std::operator<<<std::char_traits<char>>(
v14,
"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ");
nglog::internal::LogMessageVoidify::operator&(&v23, v13);
}
if ( (v21 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v22);
v2 = std::map<int,std::unique_ptr<nglog::CapturedStream>>::at(&nglog::s_captured_streams, &v24);
std::unique_ptr<nglog::CapturedStream>::unique_ptr(v20, v2);
std::map<int,std::unique_ptr<nglog::CapturedStream>>::erase(&nglog::s_captured_streams, &v24);
v17 = 0;
if ( (std::unique_ptr<nglog::CapturedStream>::operator bool(v20) & 1) == 0 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v18,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
403);
v17 = 1;
v12 = nglog::LogMessage::stream((nglog::LogMessage *)v18);
v11 = std::operator<<<std::char_traits<char>>(v12, "Check failed: cap ");
v3 = std::operator<<<std::char_traits<char>>(v11, ": did you forget CaptureTestStdout() or CaptureTestStderr()?");
nglog::internal::LogMessageVoidify::operator&(&v19, v3);
}
if ( (v17 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v18);
v4 = (nglog::CapturedStream *)std::unique_ptr<nglog::CapturedStream>::operator->(v20);
nglog::CapturedStream::StopCapture(v4);
v5 = std::unique_ptr<nglog::CapturedStream>::operator->(v20);
v10 = nglog::CapturedStream::filename[abi:cxx11](v5);
v6 = std::string::c_str(v10);
v9 = fopen(v6, "r");
std::unique_ptr<_IO_FILE>::unique_ptr<std::default_delete<_IO_FILE>,void>(v16, v9);
v7 = std::unique_ptr<_IO_FILE>::get(v16);
nglog::ReadEntireFile[abi:cxx11](a1, v7);
std::unique_ptr<_IO_FILE>::reset(v16, 0LL);
std::unique_ptr<_IO_FILE>::~unique_ptr(v16);
std::unique_ptr<nglog::CapturedStream>::~unique_ptr(v20);
return a1;
}
| GetCapturedTestOutput[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x120],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x118],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x110],EAX
MOV RAX,qword ptr [0x0019af00]
MOV RDI,qword ptr [RAX]
CALL 0x0010a870
MOV ECX,dword ptr [RBP + -0x110]
MOV EDX,EAX
MOV byte ptr [RBP + -0x71],0x0
MOV AL,0x1
CMP ECX,EDX
MOV byte ptr [RBP + -0x10a],AL
JZ 0x0011e66e
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x124],EAX
MOV RAX,qword ptr [0x0019af98]
MOV RDI,qword ptr [RAX]
CALL 0x0010a870
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x124]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x10a],AL
LAB_0011e66e:
MOV AL,byte ptr [RBP + -0x10a]
XOR AL,0xff
TEST AL,0x1
JNZ 0x0011e67c
JMP 0x0011e6dd
LAB_0011e67c:
LEA RSI,[0x16e179]
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0x138],RDI
MOV EDX,0x190
CALL 0x00135ba0
MOV RDI,qword ptr [RBP + -0x138]
MOV byte ptr [RBP + -0x71],0x1
LAB_0011e6a3:
CALL 0x001316d0
MOV qword ptr [RBP + -0x130],RAX
JMP 0x0011e6b1
LAB_0011e6b1:
MOV RDI,qword ptr [RBP + -0x130]
LEA RSI,[0x16e1c2]
CALL 0x0010a7f0
LAB_0011e6c4:
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0011e6cd
LAB_0011e6cd:
MOV RSI,qword ptr [RBP + -0x140]
LEA RDI,[RBP + -0xd]
CALL 0x001231c0
LAB_0011e6dd:
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0011e6e5
JMP 0x0011e70c
LAB_0011e6e5:
LEA RDI,[RBP + -0x70]
CALL 0x00135c10
LAB_0011e6ee:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x80],RCX
MOV dword ptr [RBP + -0x84],EAX
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0011e806
JMP 0x0011e811
LAB_0011e70c:
LEA RDI,[0x19bd90]
MOV qword ptr [RBP + -0x150],RDI
LEA RSI,[RBP + -0xc]
MOV qword ptr [RBP + -0x148],RSI
CALL 0x00126fd0
MOV RSI,RAX
LEA RDI,[RBP + -0x90]
CALL 0x00127070
MOV RDI,qword ptr [RBP + -0x150]
MOV RSI,qword ptr [RBP + -0x148]
LAB_0011e747:
CALL 0x001270a0
JMP 0x0011e74e
LAB_0011e74e:
LEA RDI,[RBP + -0x90]
CALL 0x001270d0
XOR AL,0xff
MOV byte ptr [RBP + -0xf9],0x0
TEST AL,0x1
JNZ 0x0011e76c
JMP 0x0011e7ed
LAB_0011e76c:
LEA RSI,[0x16e179]
LEA RDI,[RBP + -0xf8]
MOV EDX,0x193
CALL 0x00135ba0
JMP 0x0011e786
LAB_0011e786:
MOV byte ptr [RBP + -0xf9],0x1
LAB_0011e78d:
LEA RDI,[RBP + -0xf8]
CALL 0x001316d0
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0011e7a2
LAB_0011e7a2:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[0x16e30a]
CALL 0x0010a7f0
MOV qword ptr [RBP + -0x160],RAX
JMP 0x0011e7be
LAB_0011e7be:
MOV RDI,qword ptr [RBP + -0x160]
LEA RSI,[0x16e31d]
CALL 0x0010a7f0
MOV qword ptr [RBP + -0x168],RAX
JMP 0x0011e7da
LAB_0011e7da:
MOV RSI,qword ptr [RBP + -0x168]
LEA RDI,[RBP + -0x91]
CALL 0x001231c0
LAB_0011e7ed:
TEST byte ptr [RBP + -0xf9],0x1
JNZ 0x0011e7f8
JMP 0x0011e84b
LAB_0011e7f8:
LEA RDI,[RBP + -0xf8]
CALL 0x00135c10
JMP 0x0011e806
LAB_0011e806:
LEA RDI,[RBP + -0x70]
CALL 0x00135c10
JMP 0x0011e811
LAB_0011e811:
JMP 0x0011e96f
LAB_0011e84b:
LEA RDI,[RBP + -0x90]
CALL 0x00127100
MOV RDI,RAX
LAB_0011e85a:
CALL 0x00127120
JMP 0x0011e861
LAB_0011e861:
LEA RDI,[RBP + -0x90]
CALL 0x00127100
MOV RDI,RAX
CALL 0x00127240
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0011e87e
LAB_0011e87e:
MOV RDI,qword ptr [RBP + -0x170]
CALL 0x0010a340
MOV RDI,RAX
LEA RSI,[0x16d93d]
CALL 0x0010a9e0
MOV qword ptr [RBP + -0x178],RAX
JMP 0x0011e8a2
LAB_0011e8a2:
MOV RSI,qword ptr [RBP + -0x178]
LEA RDI,[RBP + -0x108]
MOV qword ptr [RBP + -0x180],RDI
CALL 0x00127260
MOV RDI,qword ptr [RBP + -0x180]
MOV byte ptr [RBP + -0x109],0x0
CALL 0x00127290
MOV RDI,qword ptr [RBP + -0x120]
MOV RSI,RAX
LAB_0011e8d9:
CALL 0x0011e980
JMP 0x0011e8e0
LAB_0011e8e0:
LEA RDI,[RBP + -0x108]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001272c0
MOV byte ptr [RBP + -0x109],0x1
TEST byte ptr [RBP + -0x109],0x1
JNZ 0x0011e93b
JMP 0x0011e92f
LAB_0011e92f:
MOV RDI,qword ptr [RBP + -0x120]
CALL 0x0010b128
LAB_0011e93b:
LEA RDI,[RBP + -0x108]
CALL 0x001272f0
LEA RDI,[RBP + -0x90]
CALL 0x001243a0
MOV RAX,qword ptr [RBP + -0x118]
ADD RSP,0x180
POP RBP
RET
LAB_0011e96f:
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0010af50
|
/* WARNING: Removing unreachable block (ram,0x0011e900) */
/* nglog::GetCapturedTestOutput[abi:cxx11](int) */
nglog * __thiscall nglog::GetCapturedTestOutput_abi_cxx11_(nglog *this,int param_1)
{
int iVar1;
int iVar2;
unique_ptr *puVar3;
ostream *poVar4;
CapturedStream *pCVar5;
char *__filename;
FILE *pFVar6;
_IO_FILE *p_Var7;
bool bVar8;
int1 auVar9 [12];
unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> local_110 [15];
byte local_101;
LogMessageFatal local_100 [103];
LogMessageVoidify local_99;
unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>> local_98 [12];
int4 local_8c;
int8 local_88;
byte local_79;
LogMessageFatal local_78 [99];
LogMessageVoidify local_15;
int local_14;
nglog *local_10;
local_14 = param_1;
local_10 = this;
iVar2 = fileno(*(FILE **)PTR_stdout_0019af00);
iVar1 = local_14;
local_79 = 0;
bVar8 = true;
if (param_1 != iVar2) {
iVar2 = fileno(*(FILE **)PTR_stderr_0019af98);
bVar8 = iVar1 == iVar2;
}
if (!bVar8) {
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
400);
local_79 = 1;
/* try { // try from 0011e6a3 to 0011e6c3 has its CatchHandler @ 0011e6ee */
poVar4 = (ostream *)LogMessage::stream((LogMessage *)local_78);
poVar4 = std::operator<<(poVar4,
"Check failed: (fd == fileno(stdout)) || (fd == fileno(stderr)) ");
internal::LogMessageVoidify::operator&(&local_15,poVar4);
}
if ((local_79 & 1) == 0) {
puVar3 = (unique_ptr *)
std::
map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::at((map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)s_captured_streams,&local_14);
std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>::unique_ptr
(local_98,puVar3);
/* try { // try from 0011e747 to 0011e783 has its CatchHandler @ 0011e816 */
std::
map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
::erase((map<int,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>,std::less<int>,std::allocator<std::pair<int_const,std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>>>>
*)s_captured_streams,&local_14);
bVar8 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)local_98);
local_101 = 0;
if (((bVar8 ^ 0xffU) & 1) != 0) {
LogMessageFatal::LogMessageFatal
(local_100,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x193);
local_101 = 1;
/* try { // try from 0011e78d to 0011e7d0 has its CatchHandler @ 0011e82a */
poVar4 = (ostream *)LogMessage::stream((LogMessage *)local_100);
poVar4 = std::operator<<(poVar4,"Check failed: cap ");
poVar4 = std::operator<<(poVar4,": did you forget CaptureTestStdout() or CaptureTestStderr()?"
);
internal::LogMessageVoidify::operator&(&local_99,poVar4);
}
if ((local_101 & 1) == 0) {
pCVar5 = (CapturedStream *)
std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>::
operator->(local_98);
/* try { // try from 0011e85a to 0011e898 has its CatchHandler @ 0011e816 */
CapturedStream::StopCapture(pCVar5);
pCVar5 = (CapturedStream *)
std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>::
operator->(local_98);
CapturedStream::filename_abi_cxx11_(pCVar5);
__filename = (char *)std::__cxx11::string::c_str();
pFVar6 = fopen(__filename,"r");
std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::
unique_ptr<std::default_delete<_IO_FILE>,void>(local_110,pFVar6);
p_Var7 = (_IO_FILE *)std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::get(local_110);
/* try { // try from 0011e8d9 to 0011e8dd has its CatchHandler @ 0011e912 */
ReadEntireFile_abi_cxx11_(this,p_Var7);
std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::reset(local_110,(_IO_FILE *)0x0);
std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::~unique_ptr(local_110);
std::unique_ptr<nglog::CapturedStream,std::default_delete<nglog::CapturedStream>>::~unique_ptr
(local_98);
return this;
}
/* try { // try from 0011e7f8 to 0011e803 has its CatchHandler @ 0011e816 */
LogMessageFatal::~LogMessageFatal(local_100);
auVar9._8_4_ = local_8c;
auVar9._0_8_ = local_88;
}
else {
auVar9 = LogMessageFatal::~LogMessageFatal(local_78);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011e6a3 with catch @ 0011e6ee
*/
if ((local_79 & 1) == 0) goto LAB_0011e811;
}
/* try { // try from 0011e806 to 0011e80e has its CatchHandler @ 0011e978 */
local_8c = auVar9._8_4_;
local_88 = auVar9._0_8_;
LogMessageFatal::~LogMessageFatal(local_78);
auVar9._8_4_ = local_8c;
auVar9._0_8_ = local_88;
LAB_0011e811:
local_8c = auVar9._8_4_;
local_88 = auVar9._0_8_;
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_88);
}
|
|
1,443 | js_promise_resolve | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_resolve(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSValue result_promise, resolving_funcs[2], ret;
BOOL is_reject = magic;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
if (!is_reject && JS_GetOpaque(argv[0], JS_CLASS_PROMISE)) {
JSValue ctor;
BOOL is_same;
ctor = JS_GetProperty(ctx, argv[0], JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
is_same = js_same_value(ctx, ctor, this_val);
JS_FreeValue(ctx, ctor);
if (is_same)
return js_dup(argv[0]);
}
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return result_promise;
ret = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, argv);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
if (JS_IsException(ret)) {
JS_FreeValue(ctx, result_promise);
return ret;
}
JS_FreeValue(ctx, ret);
return result_promise;
} | O2 | c | js_promise_resolve:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r13
movq %rdi, %rbx
cmpl $-0x1, %r13d
jne 0x47766
movl %r9d, %ebp
movq %r8, %r12
movq %rsi, %r14
testl %r9d, %r9d
jne 0x4777a
movq 0x8(%r12), %rdx
cmpl $-0x1, %edx
jne 0x4777a
movq (%r12), %rsi
cmpw $0x31, 0x6(%rsi)
jne 0x4777a
cmpq $0x0, 0x30(%rsi)
je 0x4777a
movq %r12, 0x18(%rsp)
pushq $0x3d
popq %rcx
movq %rbx, %rdi
callq 0x1b043
movq %rax, %r15
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x47811
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x1ff32
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
cmpl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %r12
je 0x4777a
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpl $-0x9, %r12d
jb 0x47811
incl (%r15)
jmp 0x47811
movq %rbx, %rdi
callq 0x1d5e1
pushq $0x6
popq %r12
xorl %r15d, %r15d
jmp 0x47811
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
callq 0x2f970
movq %rax, %r14
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x4780b
movslq %ebp, %rax
shlq $0x4, %rax
movq 0x20(%rsp,%rax), %rsi
movq 0x28(%rsp,%rax), %rdx
movq %r12, (%rsp)
pushq $0x3
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x21eb6
movq %rax, %r15
movq %rdx, %r12
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
cmpl $0x6, %r12d
jne 0x47800
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0x47811
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
movq %r14, %r15
movq %r13, %r12
movq %r15, %rax
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_promise_resolve:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, rdx
mov rbx, rdi
cmp r13d, 0FFFFFFFFh
jnz loc_47766
mov ebp, r9d
mov r12, r8
mov r14, rsi
test r9d, r9d
jnz loc_4777A
mov rdx, [r12+8]
cmp edx, 0FFFFFFFFh
jnz loc_4777A
mov rsi, [r12]
cmp word ptr [rsi+6], 31h ; '1'
jnz loc_4777A
cmp qword ptr [rsi+30h], 0
jz loc_4777A
mov [rsp+78h+var_60], r12
push 3Dh ; '='
pop rcx
mov rdi, rbx
call JS_GetProperty
mov r15, rax
mov r12, rdx
cmp r12d, 6
jz loc_47811
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
mov r8, r13
call js_same_value
mov [rsp+78h+var_64], eax
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
cmp [rsp+78h+var_64], 0
mov r12, [rsp+78h+var_60]
jz short loc_4777A
mov r15, [r12]
mov r12, [r12+8]
cmp r12d, 0FFFFFFF7h
jb loc_47811
inc dword ptr [r15]
jmp loc_47811
loc_47766:
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
push 6
pop r12
xor r15d, r15d
jmp loc_47811
loc_4777A:
lea rsi, [rsp+78h+var_58]
mov rdi, rbx
mov rdx, r14
mov rcx, r13
call js_new_promise_capability
mov r14, rax
mov r13, rdx
cmp r13d, 6
jz short loc_4780B
movsxd rax, ebp
shl rax, 4
mov rsi, [rsp+rax+78h+var_58]
mov rdx, [rsp+rax+78h+var_50]
mov [rsp+78h+var_78], r12
push 3
pop r8
push 1
pop r9
mov rdi, rbx
xor ecx, ecx
call JS_Call
mov r15, rax
mov r12, rdx
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
cmp r12d, 6
jnz short loc_47800
mov rsi, r14
mov rdx, r13
call JS_FreeValue
jmp short loc_47811
loc_47800:
mov rsi, r15
mov rdx, r12
call JS_FreeValue
loc_4780B:
mov r15, r14
mov r12, r13
loc_47811:
mov rax, r15
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_promise_resolve(
long long a1,
_DWORD *a2,
unsigned long long a3,
long long a4,
_QWORD *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebp
long long v16; // r12
long long v18; // rsi
_DWORD *Property; // rax
long long v20; // rdx
_DWORD *v21; // r15
long long v22; // r12
unsigned long long v23; // r14
long long v24; // rdx
long long v25; // r13
long long v26; // rdx
long long v27; // r12
char v29; // [rsp+0h] [rbp-78h]
int v30; // [rsp+14h] [rbp-64h]
long long v32; // [rsp+20h] [rbp-58h] BYREF
long long v33[10]; // [rsp+28h] [rbp-50h]
if ( (_DWORD)a3 != -1 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, (long long)a5, a6, v29);
return 0LL;
}
v15 = a6;
v16 = (long long)a5;
if ( (_DWORD)a6 )
goto LABEL_11;
if ( (unsigned int)a5[1] != -1 )
goto LABEL_11;
v18 = *a5;
if ( *(_WORD *)(*a5 + 6LL) != 49 || !*(_QWORD *)(v18 + 48) )
goto LABEL_11;
Property = (_DWORD *)JS_GetProperty(a1, v18, -1, 61);
v21 = Property;
v22 = v20;
if ( (_DWORD)v20 == 6 )
return v21;
v30 = js_same_value(a1, Property, v20, a2, a3);
JS_FreeValue(a1, (long long)v21, v22);
v16 = (long long)a5;
if ( !v30 )
{
LABEL_11:
v23 = js_new_promise_capability(
a1,
(long long)&v32,
(unsigned long long)a2,
a3,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v25 = v24;
if ( (_DWORD)v24 != 6 )
{
v21 = (_DWORD *)JS_Call(a1, v33[2 * v15 - 1], v33[2 * v15], 0, 3, 1, v16);
v27 = v26;
JS_FreeValue(a1, v32, v33[0]);
JS_FreeValue(a1, v33[1], v33[2]);
if ( (_DWORD)v27 == 6 )
{
JS_FreeValue(a1, v23, v25);
return v21;
}
JS_FreeValue(a1, (long long)v21, v27);
}
return (_DWORD *)v23;
}
v21 = (_DWORD *)*a5;
if ( (unsigned int)a5[1] >= 0xFFFFFFF7 )
++*v21;
return v21;
}
| js_promise_resolve:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,RDX
MOV RBX,RDI
CMP R13D,-0x1
JNZ 0x00147766
MOV EBP,R9D
MOV R12,R8
MOV R14,RSI
TEST R9D,R9D
JNZ 0x0014777a
MOV RDX,qword ptr [R12 + 0x8]
CMP EDX,-0x1
JNZ 0x0014777a
MOV RSI,qword ptr [R12]
CMP word ptr [RSI + 0x6],0x31
JNZ 0x0014777a
CMP qword ptr [RSI + 0x30],0x0
JZ 0x0014777a
MOV qword ptr [RSP + 0x18],R12
PUSH 0x3d
POP RCX
MOV RDI,RBX
CALL 0x0011b043
MOV R15,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x00147811
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
MOV R8,R13
CALL 0x0011ff32
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
CMP dword ptr [RSP + 0x14],0x0
MOV R12,qword ptr [RSP + 0x18]
JZ 0x0014777a
MOV R15,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
CMP R12D,-0x9
JC 0x00147811
INC dword ptr [R15]
JMP 0x00147811
LAB_00147766:
MOV RDI,RBX
CALL 0x0011d5e1
PUSH 0x6
POP R12
XOR R15D,R15D
JMP 0x00147811
LAB_0014777a:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
MOV RDX,R14
MOV RCX,R13
CALL 0x0012f970
MOV R14,RAX
MOV R13,RDX
CMP R13D,0x6
JZ 0x0014780b
MOVSXD RAX,EBP
SHL RAX,0x4
MOV RSI,qword ptr [RSP + RAX*0x1 + 0x20]
MOV RDX,qword ptr [RSP + RAX*0x1 + 0x28]
MOV qword ptr [RSP],R12
PUSH 0x3
POP R8
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00121eb6
MOV R15,RAX
MOV R12,RDX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
CMP R12D,0x6
JNZ 0x00147800
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
JMP 0x00147811
LAB_00147800:
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
LAB_0014780b:
MOV R15,R14
MOV R12,R13
LAB_00147811:
MOV RAX,R15
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_promise_resolve(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int1 (*param_5) [16],int param_6)
{
long lVar1;
int iVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int8 local_58 [5];
if ((int)param_3 != -1) {
JS_ThrowTypeErrorNotAnObject(param_1);
return ZEXT816(6) << 0x40;
}
if ((((param_6 == 0) && ((int)*(int8 *)(*param_5 + 8) == -1)) &&
(lVar1 = *(long *)*param_5, *(short *)(lVar1 + 6) == 0x31)) && (*(long *)(lVar1 + 0x30) != 0))
{
auVar3 = JS_GetProperty(param_1,lVar1,*(int8 *)(*param_5 + 8),0x3d);
if (auVar3._8_4_ == 6) {
return auVar3;
}
iVar2 = js_same_value(param_1,auVar3._0_8_,auVar3._8_8_,param_2,param_3);
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
if (iVar2 != 0) {
auVar3 = *param_5;
if ((uint)*(int8 *)(*param_5 + 8) < 0xfffffff7) {
return *param_5;
}
**(int **)*param_5 = **(int **)*param_5 + 1;
return auVar3;
}
}
auVar3 = js_new_promise_capability(param_1,local_58,param_2,param_3);
if (auVar3._8_4_ != 6) {
auVar4 = JS_Call(param_1,local_58[(long)param_6 * 2],local_58[(long)param_6 * 2 + 1],0,3,1,
param_5);
JS_FreeValue(param_1,local_58[0],local_58[1]);
JS_FreeValue(param_1,local_58[2],local_58[3]);
if (auVar4._8_4_ == 6) {
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
auVar3 = auVar4;
}
else {
JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_);
}
}
return auVar3;
}
|
|
1,444 | ma_ft_parserecord | eloqsql/storage/maria/ma_ft_update.c | FT_WORD * _ma_ft_parserecord(MARIA_HA *info, uint keynr, const uchar *record,
MEM_ROOT *mem_root)
{
TREE ptree;
MYSQL_FTPARSER_PARAM *param;
DBUG_ENTER("_ma_ft_parserecord");
if (! (param= maria_ftparser_call_initializer(info, keynr, 0)))
DBUG_RETURN(NULL);
bzero((char*) &ptree, sizeof(ptree));
param->flags= 0;
if (_ma_ft_parse(&ptree, info, keynr, record, param, mem_root))
DBUG_RETURN(NULL);
DBUG_RETURN(maria_ft_linearize(&ptree, mem_root));
} | O3 | c | ma_ft_parserecord:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x476dd
testq %rax, %rax
je 0x6b575
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
xorl %r14d, %r14d
movl $0x298, %edx # imm = 0x298
xorl %esi, %esi
callq 0x292c0
movl $0x0, 0x34(%rbx)
leaq -0x2c8(%rbp), %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
movq %rbx, %r8
movq -0x30(%rbp), %rbx
movq %rbx, %r9
callq 0x6b417
testl %eax, %eax
jne 0x6b575
leaq -0x2c8(%rbp), %rdi
movq %rbx, %rsi
callq 0x46f50
movq %rax, %r14
movq %r14, %rax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_ft_parserecord:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
mov [rbp+var_30], rcx
mov r15, rdx
mov r12d, esi
mov r13, rdi
xor r14d, r14d
xor edx, edx
call maria_ftparser_call_initializer
test rax, rax
jz short loc_6B575
mov rbx, rax
lea rdi, [rbp+var_2C8]
xor r14d, r14d
mov edx, 298h
xor esi, esi
call _memset
mov dword ptr [rbx+34h], 0
lea rdi, [rbp+var_2C8]
mov rsi, r13
mov edx, r12d
mov rcx, r15
mov r8, rbx
mov rbx, [rbp+var_30]
mov r9, rbx
call _ma_ft_parse
test eax, eax
jnz short loc_6B575
lea rdi, [rbp+var_2C8]
mov rsi, rbx
call maria_ft_linearize
mov r14, rax
loc_6B575:
mov rax, r14
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * ma_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
long long v5; // r14
long long v6; // rax
long long v7; // rbx
long long v8; // r8
long long v9; // rbx
_QWORD v11[83]; // [rsp+8h] [rbp-2C8h] BYREF
long long v12; // [rsp+2A0h] [rbp-30h]
v12 = a4;
v5 = 0LL;
v6 = maria_ftparser_call_initializer(a1, a2, 0);
if ( v6 )
{
v7 = v6;
v5 = 0LL;
memset(v11, 0LL, sizeof(v11));
*(_DWORD *)(v7 + 52) = 0;
v8 = v7;
v9 = v12;
if ( !(unsigned int)ma_ft_parse(v11, (long long)a1, a2, a3, v8, v12) )
return maria_ft_linearize((long long)v11, v9);
}
return (_QWORD *)v5;
}
| _ma_ft_parserecord:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
MOV qword ptr [RBP + -0x30],RCX
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
XOR R14D,R14D
XOR EDX,EDX
CALL 0x001476dd
TEST RAX,RAX
JZ 0x0016b575
MOV RBX,RAX
LEA RDI,[RBP + -0x2c8]
XOR R14D,R14D
MOV EDX,0x298
XOR ESI,ESI
CALL 0x001292c0
MOV dword ptr [RBX + 0x34],0x0
LEA RDI,[RBP + -0x2c8]
MOV RSI,R13
MOV EDX,R12D
MOV RCX,R15
MOV R8,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9,RBX
CALL 0x0016b417
TEST EAX,EAX
JNZ 0x0016b575
LEA RDI,[RBP + -0x2c8]
MOV RSI,RBX
CALL 0x00146f50
MOV R14,RAX
LAB_0016b575:
MOV RAX,R14
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_ft_parserecord(int8 param_1,ulong param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
long lVar3;
int8 uVar4;
int1 local_2d0 [664];
int8 local_38;
uVar4 = 0;
local_38 = param_4;
lVar3 = maria_ftparser_call_initializer(param_1,param_2,0);
if (lVar3 != 0) {
uVar4 = 0;
memset(local_2d0,0,0x298);
uVar1 = local_38;
*(int4 *)(lVar3 + 0x34) = 0;
iVar2 = _ma_ft_parse(local_2d0,param_1,param_2 & 0xffffffff,param_3,lVar3,local_38);
if (iVar2 == 0) {
uVar4 = maria_ft_linearize(local_2d0,uVar1);
}
}
return uVar4;
}
|
|
1,445 | LefDefParser::defiNonDefault::Init() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | void defiNonDefault::Init() {
name_ = 0;
hardSpacing_ = 0;
numLayers_ = 0;
width_ = 0;
hasDiagWidth_ = 0;
hasSpacing_ = 0;
hasWireExt_ = 0;
numVias_ = 0;
viasAllocated_ = 0;
viaNames_ = 0;
numViaRules_ = 0;
viaRulesAllocated_ = 0;
viaRuleNames_ = 0;
numMinCuts_ = 0;
minCutsAllocated_ = 0;
cutLayerName_ = 0;
numCuts_ = 0;
numProps_ = 0;
propsAllocated_ = 0;
names_ = 0;
values_ = 0;
dvalues_ = 0;
types_ = 0;
layersAllocated_ = 0;
layerName_ = 0;
width_ = 0;
hasDiagWidth_ = 0;
diagWidth_ = 0;
hasSpacing_ = 0;
spacing_ = 0;
hasWireExt_ = 0;
wireExt_ = 0;
} | O3 | cpp | LefDefParser::defiNonDefault::Init():
xorl %eax, %eax
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
movq %rax, 0xc(%rdi)
addq $0x18, %rdi
movl $0xa0, %edx
xorl %esi, %esi
jmp 0x7110
nop
| _ZN12LefDefParser14defiNonDefault4InitEv:
xor eax, eax
mov [rdi], rax
mov byte ptr [rdi+8], 0
mov [rdi+0Ch], rax
add rdi, 18h
mov edx, 0A0h
xor esi, esi
jmp _memset
| long long LefDefParser::defiNonDefault::Init(LefDefParser::defiNonDefault *this)
{
*(_QWORD *)this = 0LL;
*((_BYTE *)this + 8) = 0;
*(_QWORD *)((char *)this + 12) = 0LL;
return memset((char *)this + 24, 0LL, 160LL);
}
| Init:
XOR EAX,EAX
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0xc],RAX
ADD RDI,0x18
MOV EDX,0xa0
XOR ESI,ESI
JMP 0x00107110
|
/* LefDefParser::defiNonDefault::Init() */
void __thiscall LefDefParser::defiNonDefault::Init(defiNonDefault *this)
{
*(int8 *)this = 0;
this[8] = (defiNonDefault)0x0;
*(int8 *)(this + 0xc) = 0;
memset(this + 0x18,0,0xa0);
return;
}
|
|
1,446 | nglog::LogMessage::WriteToStringAndLog() | ng-log[P]ng-log/src/logging.cc | EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
if (data_->message_ != nullptr) {
RAW_DCHECK(data_->num_chars_to_log_ > 0 &&
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n',
"");
// Omit prefix of message and trailing newline when writing to message_.
const char* start = data_->message_text_ + data_->num_prefix_chars_;
size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1;
data_->message_->assign(start, len);
}
SendToLog();
} | O0 | cpp | nglog::LogMessage::WriteToStringAndLog():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rax
cmpq $0x0, 0x76b0(%rax)
je 0x1097f
jmp 0x108c8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x76c0(%rax)
jbe 0x108fb
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x8(%rcx), %rcx
movq 0x76c0(%rcx), %rcx
subq $0x1, %rcx
movsbl 0x4(%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x1092c
jmp 0x108fd
movl $0x3, %edi
leaq 0x3e011(%rip), %rsi # 0x4e91a
movl $0x78c, %edx # imm = 0x78C
leaq 0x3e04c(%rip), %rcx # 0x4e961
leaq 0x3e059(%rip), %r8 # 0x4e975
leaq 0x3e58e(%rip), %r9 # 0x4eeb1
movb $0x0, %al
callq 0x48bd0
jmp 0x1092c
jmp 0x1092e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4, %rcx
movq 0x8(%rax), %rdx
addq 0x76b8(%rdx), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rcx
movq 0x76c0(%rcx), %rcx
movq 0x8(%rax), %rdx
subq 0x76b8(%rdx), %rcx
subq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rax
movq 0x76b0(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x9a00
movq -0x20(%rbp), %rdi
callq 0xfec0
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZN5nglog10LogMessage19WriteToStringAndLogEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rax+8]
cmp qword ptr [rax+76B0h], 0
jz loc_1097F
jmp short $+2
loc_108C8:
mov rax, [rbp+var_20]
mov rax, [rax+8]
cmp qword ptr [rax+76C0h], 0
jbe short loc_108FB
mov rcx, [rbp+var_20]
mov rax, [rcx+8]
mov rcx, [rcx+8]
mov rcx, [rcx+76C0h]
sub rcx, 1
movsx eax, byte ptr [rax+rcx+4]
cmp eax, 0Ah
jz short loc_1092C
loc_108FB:
jmp short $+2
loc_108FD:
mov edi, 3
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 78Ch
lea rcx, aCheckSFailedS; "Check %s failed: %s"
lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"...
lea r9, asc_4EEAF+2; ""
mov al, 0
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
jmp short $+2
loc_1092C:
jmp short $+2
loc_1092E:
mov rax, [rbp+var_20]
mov rcx, [rax+8]
add rcx, 4
mov rdx, [rax+8]
add rcx, [rdx+76B8h]
mov [rbp+var_10], rcx
mov rcx, [rax+8]
mov rcx, [rcx+76C0h]
mov rdx, [rax+8]
sub rcx, [rdx+76B8h]
sub rcx, 1
mov [rbp+var_18], rcx
mov rax, [rax+8]
mov rdi, [rax+76B0h]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong)
loc_1097F:
mov rdi, [rbp+var_20]; this
call _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
add rsp, 20h
pop rbp
retn
| nglog::LogDestination * nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this)
{
if ( *(_QWORD *)(*((_QWORD *)this + 1) + 30384LL) )
{
if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL)
|| *(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - 1LL + 4) != 10 )
{
nglog::RawLog(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1932,
(unsigned int)"Check %s failed: %s",
(unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'",
(unsigned int)"");
}
std::string::assign(
*(_QWORD *)(*((_QWORD *)this + 1) + 30384LL),
*(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + *((_QWORD *)this + 1) + 4LL,
*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) - 1LL);
}
return nglog::LogMessage::SendToLog(this);
}
| WriteToStringAndLog:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RAX + 0x8]
CMP qword ptr [RAX + 0x76b0],0x0
JZ 0x0011097f
JMP 0x001108c8
LAB_001108c8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
CMP qword ptr [RAX + 0x76c0],0x0
JBE 0x001108fb
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x76c0]
SUB RCX,0x1
MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4]
CMP EAX,0xa
JZ 0x0011092c
LAB_001108fb:
JMP 0x001108fd
LAB_001108fd:
MOV EDI,0x3
LEA RSI,[0x14e91a]
MOV EDX,0x78c
LEA RCX,[0x14e961]
LEA R8,[0x14e975]
LEA R9,[0x14eeb1]
MOV AL,0x0
CALL 0x00148bd0
JMP 0x0011092c
LAB_0011092c:
JMP 0x0011092e
LAB_0011092e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x4
MOV RDX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RDX + 0x76b8]
MOV qword ptr [RBP + -0x10],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RCX + 0x76c0]
MOV RDX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RDX + 0x76b8]
SUB RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x76b0]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00109a00
LAB_0011097f:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010fec0
ADD RSP,0x20
POP RBP
RET
|
/* nglog::LogMessage::WriteToStringAndLog() */
void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this)
{
if (*(long *)(*(long *)(this + 8) + 0x76b0) != 0) {
if ((*(long *)(*(long *)(this + 8) + 0x76c0) == 0) ||
(*(char *)(*(long *)(this + 8) + *(long *)(*(long *)(this + 8) + 0x76c0) + 3) != '\n')) {
RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'"
,&DAT_0014eeb1);
}
std::__cxx11::string::assign
(*(char **)(*(long *)(this + 8) + 0x76b0),
*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8));
}
SendToLog(this);
return;
}
|
|
1,447 | testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&) | giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-internal-inl.h | void OnTestPartResult(const TestPartResult& test_part_result) override {
const char* file_name = test_part_result.file_name();
if (file_name == nullptr) file_name = "";
SendLn("event=TestPartResult&file=" + UrlEncode(file_name) +
"&line=" + StreamableToString(test_part_result.line_number()) +
"&message=" + UrlEncode(test_part_result.message()));
} | O2 | c | testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x29dab
movq 0x8(%r14), %rax
testq %rax, %rax
leaq 0xa599(%rip), %rsi # 0x3434e
cmovneq %rax, %rsi
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
callq 0x206d2
leaq 0xb729(%rip), %rsi # 0x354f9
leaq 0x50(%rsp), %rdi
movq %r15, %rdx
callq 0x24719
leaq 0xb730(%rip), %rdx # 0x35514
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x244a0
movl 0x28(%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x24526
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x244bf
leaq 0xb6f5(%rip), %rdx # 0x3551b
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x244a0
movq 0x50(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x206d2
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x244bf
leaq 0xd0(%rsp), %rsi
movq %rbx, %rdi
callq 0x2a5ec
leaq 0xd0(%rsp), %rdi
callq 0x8ad8
leaq 0x10(%rsp), %rdi
callq 0x8ad8
leaq 0xb0(%rsp), %rdi
callq 0x8ad8
leaq 0x90(%rsp), %rdi
callq 0x8ad8
leaq 0x30(%rsp), %rdi
callq 0x8ad8
leaq 0x70(%rsp), %rdi
callq 0x8ad8
leaq 0x50(%rsp), %rdi
callq 0x8ad8
leaq 0xf0(%rsp), %rdi
callq 0x8ad8
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x8ad8
jmp 0x29ef1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8ad8
jmp 0x29f00
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8ad8
jmp 0x29f12
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x8ad8
jmp 0x29f24
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8ad8
leaq 0x70(%rsp), %rdi
callq 0x8ad8
leaq 0x50(%rsp), %rdi
callq 0x8ad8
leaq 0xf0(%rsp), %rdi
callq 0x8ad8
movq %rbx, %rdi
callq 0x89a0
movq %rax, %rbx
jmp 0x29f2e
movq %rax, %rbx
jmp 0x29f38
movq %rax, %rbx
jmp 0x29f42
| _ZN7testing8internal17StreamingListener16OnTestPartResultERKNS_14TestPartResultE:
push r15
push r14
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_29DAB
mov rax, [r14+8]
loc_29DAB:
test rax, rax
lea rsi, aSFromSSMsTotal+1Ah; ""
cmovnz rsi, rax
lea r15, [rsp+128h+var_38]
mov rdi, r15
call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*)
lea rsi, aEventTestpartr; "event=TestPartResult&file="
lea rdi, [rsp+128h+var_D8]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, aLine_1; "&line="
lea rdi, [rsp+128h+var_B8]
lea rsi, [rsp+128h+var_D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov eax, [r14+28h]
lea rsi, [rsp+128h+var_11C]
mov [rsi], eax
lea rdi, [rsp+128h+var_F8]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
lea rdi, [rsp+128h+var_98]
lea rsi, [rsp+128h+var_B8]
lea rdx, [rsp+128h+var_F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, aMessage_0; "&message="
lea rdi, [rsp+128h+var_78]
lea rsi, [rsp+128h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rsi, [r14+50h]
lea rdi, [rsp+128h+var_118]
call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*)
lea rdi, [rsp+128h+var_58]
lea rsi, [rsp+128h+var_78]
lea rdx, [rsp+128h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+128h+var_58]
mov rdi, rbx
call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&)
lea rdi, [rsp+128h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_D8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 110h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29EF1
mov rbx, rax
loc_29EF1:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29F00
mov rbx, rax
loc_29F00:
lea rdi, [rsp+arg_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29F12
mov rbx, rax
loc_29F12:
lea rdi, [rsp+arg_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29F24
mov rbx, rax
loc_29F24:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_29F2E:
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_29F38:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_29F42:
lea rdi, [rsp+arg_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_29F2E
mov rbx, rax
jmp short loc_29F38
mov rbx, rax
jmp short loc_29F42
| void testing::internal::StreamingListener::OnTestPartResult(
testing::internal::StreamingListener *this,
const testing::TestPartResult *a2)
{
char *v3; // rax
char *v4; // rsi
int v5; // [rsp+Ch] [rbp-11Ch] BYREF
_QWORD v6[4]; // [rsp+10h] [rbp-118h] BYREF
_QWORD v7[4]; // [rsp+30h] [rbp-F8h] BYREF
_BYTE v8[32]; // [rsp+50h] [rbp-D8h] BYREF
_QWORD v9[4]; // [rsp+70h] [rbp-B8h] BYREF
_BYTE v10[32]; // [rsp+90h] [rbp-98h] BYREF
_QWORD v11[4]; // [rsp+B0h] [rbp-78h] BYREF
_BYTE v12[32]; // [rsp+D0h] [rbp-58h] BYREF
_BYTE v13[56]; // [rsp+F0h] [rbp-38h] BYREF
v3 = (char *)*((_QWORD *)a2 + 2);
if ( v3 )
v3 = (char *)*((_QWORD *)a2 + 1);
v4 = "";
if ( v3 )
v4 = v3;
testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v13, v4);
std::operator+<char>((long long)v8, (long long)"event=TestPartResult&file=", (long long)v13);
std::operator+<char>((long long)v9, (long long)v8, "&line=");
v5 = *((_DWORD *)a2 + 10);
testing::internal::StreamableToString<int>((long long)v7, (long long)&v5);
std::operator+<char>((long long)v10, v9, v7);
std::operator+<char>((long long)v11, (long long)v10, "&message=");
testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v6, *((_BYTE **)a2 + 10));
std::operator+<char>((long long)v12, v11, v6);
testing::internal::StreamingListener::SendLn(this, v12);
std::string::~string(v12);
std::string::~string(v6);
std::string::~string(v11);
std::string::~string(v10);
std::string::~string(v7);
std::string::~string(v9);
std::string::~string(v8);
std::string::~string(v13);
}
| OnTestPartResult:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x00129dab
MOV RAX,qword ptr [R14 + 0x8]
LAB_00129dab:
TEST RAX,RAX
LEA RSI,[0x13434e]
CMOVNZ RSI,RAX
LEA R15,[RSP + 0xf0]
MOV RDI,R15
CALL 0x001206d2
LAB_00129dc9:
LEA RSI,[0x1354f9]
LEA RDI,[RSP + 0x50]
MOV RDX,R15
CALL 0x00124719
LAB_00129ddd:
LEA RDX,[0x135514]
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x50]
CALL 0x001244a0
MOV EAX,dword ptr [R14 + 0x28]
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],EAX
LAB_00129dfe:
LEA RDI,[RSP + 0x30]
CALL 0x00124526
LAB_00129e08:
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x70]
LEA RDX,[RSP + 0x30]
CALL 0x001244bf
LAB_00129e1f:
LEA RDX,[0x13551b]
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x90]
CALL 0x001244a0
MOV RSI,qword ptr [R14 + 0x50]
LAB_00129e3f:
LEA RDI,[RSP + 0x10]
CALL 0x001206d2
LAB_00129e49:
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xb0]
LEA RDX,[RSP + 0x10]
CALL 0x001244bf
LAB_00129e63:
LEA RSI,[RSP + 0xd0]
MOV RDI,RBX
CALL 0x0012a5ec
LAB_00129e73:
LEA RDI,[RSP + 0xd0]
CALL 0x00108ad8
LEA RDI,[RSP + 0x10]
CALL 0x00108ad8
LEA RDI,[RSP + 0xb0]
CALL 0x00108ad8
LEA RDI,[RSP + 0x90]
CALL 0x00108ad8
LEA RDI,[RSP + 0x30]
CALL 0x00108ad8
LEA RDI,[RSP + 0x70]
CALL 0x00108ad8
LEA RDI,[RSP + 0x50]
CALL 0x00108ad8
LEA RDI,[RSP + 0xf0]
CALL 0x00108ad8
ADD RSP,0x110
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&) */
void __thiscall
testing::internal::StreamingListener::OnTestPartResult
(StreamingListener *this,TestPartResult *param_1)
{
char *pcVar1;
char *pcVar2;
int local_11c;
StreamingListener local_118 [32];
internal local_f8 [32];
string local_d8 [32];
string local_b8 [32];
string local_98 [32];
string local_78 [32];
string local_58 [32];
StreamingListener local_38 [32];
pcVar1 = *(char **)(param_1 + 0x10);
if (pcVar1 != (char *)0x0) {
pcVar1 = *(char **)(param_1 + 8);
}
pcVar2 = "";
if (pcVar1 != (char *)0x0) {
pcVar2 = pcVar1;
}
UrlEncode_abi_cxx11_(local_38,pcVar2);
/* try { // try from 00129dc9 to 00129ddc has its CatchHandler @ 00129f61 */
std::operator+((char *)local_d8,(string *)"event=TestPartResult&file=");
/* try { // try from 00129ddd to 00129df2 has its CatchHandler @ 00129f5c */
std::operator+(local_b8,(char *)local_d8);
local_11c = *(int *)(param_1 + 0x28);
/* try { // try from 00129dfe to 00129e07 has its CatchHandler @ 00129f57 */
StreamableToString<int>(local_f8,&local_11c);
/* try { // try from 00129e08 to 00129e1e has its CatchHandler @ 00129f21 */
std::operator+(local_98,local_b8);
/* try { // try from 00129e1f to 00129e3a has its CatchHandler @ 00129f0f */
std::operator+(local_78,(char *)local_98);
/* try { // try from 00129e3f to 00129e48 has its CatchHandler @ 00129efd */
UrlEncode_abi_cxx11_(local_118,*(char **)(param_1 + 0x50));
/* try { // try from 00129e49 to 00129e62 has its CatchHandler @ 00129eee */
std::operator+(local_58,local_78);
/* try { // try from 00129e63 to 00129e72 has its CatchHandler @ 00129edc */
SendLn(this,local_58);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string((string *)local_118);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string((string *)local_f8);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string(local_d8);
std::__cxx11::string::~string((string *)local_38);
return;
}
|
|
1,448 | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
Value result;
bool first = true;
for (const auto& part : parts) {
if (!part) throw std::runtime_error("FilterExpr.part is null");
if (first) {
first = false;
result = part->evaluate(context);
} else {
if (auto ce = dynamic_cast<CallExpr*>(part.get())) {
auto target = ce->object->evaluate(context);
ArgumentsValue args = ce->args.evaluate(context);
args.args.insert(args.args.begin(), result);
result = target.call(context, args);
} else {
auto callable = part->evaluate(context);
ArgumentsValue args;
args.args.insert(args.args.begin(), result);
result = callable.call(context, args);
}
}
}
return result;
} | O2 | cpp | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x6646e
movq 0x20(%r15), %rbp
movq 0x28(%r15), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %al
leaq 0x48(%rsp), %r15
movq %r12, (%rsp)
cmpq 0x8(%rsp), %rbp
je 0x6f6c1
movq (%rbp), %r13
testq %r13, %r13
je 0x6f6d6
testb $0x1, %al
je 0x6f5cf
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x62ea2
movq %r12, %rdi
movq %r15, %rsi
callq 0x67cac
jmp 0x6f6ae
movq %r13, %rdi
leaq 0x8eda7(%rip), %rsi # 0xfe380
leaq 0x8f308(%rip), %rdx # 0xfe8e8
xorl %ecx, %ecx
callq 0x249c0
testq %rax, %rax
je 0x6f644
movq %rax, %r12
movq 0x20(%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x62ea2
addq $0x30, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x6cb48
movq 0x10(%rsp), %rsi
movq %r13, %rdi
movq (%rsp), %r12
movq %r12, %rdx
callq 0x6e3a0
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x6d8c4
jmp 0x6f693
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x62ea2
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
movq (%rsp), %r12
movq %r12, %rdx
callq 0x6e3a0
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x6d8c4
movq %r12, %rdi
movq %rbx, %rsi
callq 0x67cac
movq %rbx, %rdi
callq 0x63132
movq %r13, %rdi
callq 0x6d9a8
movq %r15, %rdi
callq 0x63132
addq $0x10, %rbp
xorl %eax, %eax
jmp 0x6f595
movq %r12, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r15
leaq 0x46f30(%rip), %rsi # 0xb6618
movq %rax, %rdi
callq 0x24320
movq 0x908f9(%rip), %rsi # 0xffff0
movq 0x90852(%rip), %rdx # 0xfff50
movq %r15, %rdi
callq 0x24ee0
jmp 0x6f715
jmp 0x6f715
jmp 0x6f73d
jmp 0x6f715
movq %rax, %r14
jmp 0x6f722
jmp 0x6f73d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6d9a8
leaq 0x48(%rsp), %rdi
callq 0x63132
jmp 0x6f740
jmp 0x6f73d
movq %rax, %r14
movq %r15, %rdi
callq 0x24670
jmp 0x6f740
movq %rax, %r14
movq (%rsp), %rdi
callq 0x63132
movq %r14, %rdi
callq 0x24f60
nop
| _ZNK5minja10FilterExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r14, rdx
mov r15, rsi
mov r12, rdi
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
mov rbp, [r15+20h]
mov rax, [r15+28h]
mov [rsp+118h+var_110], rax
mov al, 1
lea r15, [rsp+118h+var_D0]
mov [rsp+118h+var_118], r12
loc_6F595:
cmp rbp, [rsp+118h+var_110]
jz loc_6F6C1
mov r13, [rbp+0]
test r13, r13
jz loc_6F6D6
test al, 1
jz short loc_6F5CF
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12
mov rsi, r15
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
jmp loc_6F6AE
loc_6F5CF:
mov rdi, r13; lpsrc
lea rsi, _ZTIN5minja10ExpressionE; lpstype
lea rdx, _ZTIN5minja8CallExprE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_6F644
mov r12, rax
mov rsi, [rax+20h]
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
add r12, 30h ; '0'
lea r13, [rsp+118h+var_108]
mov rdi, r13
mov rsi, r12
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, qword ptr [rsp+118h+var_108]
mov rdi, r13
mov r12, [rsp+118h+var_118]
mov rdx, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
lea rbx, [rsp+118h+var_80]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, r13
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
jmp short loc_6F693
loc_6F644:
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_E8], xmm0
movaps [rsp+118h+var_F8], xmm0
movaps [rsp+118h+var_108], xmm0
lea r13, [rsp+118h+var_108]
mov rdi, r13
xor esi, esi
mov r12, [rsp+118h+var_118]
mov rdx, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
lea rbx, [rsp+118h+var_80]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, r13
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
loc_6F693:
mov rdi, r12
mov rsi, rbx
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r13; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_6F6AE:
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rbp, 10h
xor eax, eax
jmp loc_6F595
loc_6F6C1:
mov rax, r12
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6F6D6:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aFilterexprPart; "FilterExpr.part is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_6F715
jmp short loc_6F715
jmp short loc_6F73D
jmp short loc_6F715
mov r14, rax
jmp short loc_6F722
jmp short loc_6F73D
loc_6F715:
mov r14, rax
lea rdi, [rsp+118h+var_108]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_6F722:
lea rdi, [rsp+118h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6F740
jmp short loc_6F73D
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6F740
loc_6F73D:
mov r14, rax
loc_6F740:
mov rdi, [rsp+118h+var_118]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| long long minja::FilterExpr::do_evaluate(minja::Value *a1, long long a2)
{
long long v2; // r12
void (****v3)(void); // rbp
char v4; // al
void (***v5)(void); // r13
void (****v6)(void); // rax
void (****v7)(void); // r12
std::runtime_error *exception; // r15
void (****v10)(void); // [rsp+8h] [rbp-110h]
_OWORD v11[3]; // [rsp+10h] [rbp-108h] BYREF
_BYTE v12[80]; // [rsp+48h] [rbp-D0h] BYREF
_BYTE v13[128]; // [rsp+98h] [rbp-80h] BYREF
v2 = (long long)a1;
minja::Value::Value(a1);
v3 = *(void (*****)(void))(a2 + 32);
v10 = *(void (*****)(void))(a2 + 40);
v4 = 1;
while ( v3 != v10 )
{
v5 = *v3;
if ( !*v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterExpr.part is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (v4 & 1) != 0 )
{
minja::Expression::evaluate((long long)v12, *v3);
minja::Value::operator=(v2, (long long)v12);
}
else
{
v6 = (void (****)(void))__dynamic_cast(
*v3,
(const struct __class_type_info *)&`typeinfo for'minja::Expression,
(const struct __class_type_info *)&`typeinfo for'minja::CallExpr,
0LL);
if ( v6 )
{
v7 = v6;
minja::Expression::evaluate((long long)v12, v6[4]);
minja::ArgumentsExpression::evaluate(v11, (void (*****)(void))v7 + 6);
v2 = (long long)a1;
std::vector<minja::Value>::insert((long long *)v11, *(long long *)&v11[0], a1);
}
else
{
minja::Expression::evaluate((long long)v12, v5);
memset(v11, 0, sizeof(v11));
v2 = (long long)a1;
std::vector<minja::Value>::insert((long long *)v11, 0LL, a1);
}
minja::Value::call((long long)v13, (long long)v12);
minja::Value::operator=(v2, (long long)v13);
minja::Value::~Value((minja::Value *)v13);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v11);
}
minja::Value::~Value((minja::Value *)v12);
v3 += 2;
v4 = 0;
}
return v2;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
CALL 0x0016646e
MOV RBP,qword ptr [R15 + 0x20]
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV AL,0x1
LEA R15,[RSP + 0x48]
MOV qword ptr [RSP],R12
LAB_0016f595:
CMP RBP,qword ptr [RSP + 0x8]
JZ 0x0016f6c1
MOV R13,qword ptr [RBP]
TEST R13,R13
JZ 0x0016f6d6
TEST AL,0x1
JZ 0x0016f5cf
LAB_0016f5b1:
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x00162ea2
MOV RDI,R12
MOV RSI,R15
CALL 0x00167cac
JMP 0x0016f6ae
LAB_0016f5cf:
MOV RDI,R13
LEA RSI,[0x1fe380]
LEA RDX,[0x1fe8e8]
XOR ECX,ECX
CALL 0x001249c0
TEST RAX,RAX
JZ 0x0016f644
MOV R12,RAX
MOV RSI,qword ptr [RAX + 0x20]
LAB_0016f5f3:
MOV RDI,R15
MOV RDX,R14
CALL 0x00162ea2
ADD R12,0x30
LAB_0016f602:
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL 0x0016cb48
MOV RSI,qword ptr [RSP + 0x10]
LAB_0016f61a:
MOV RDI,R13
MOV R12,qword ptr [RSP]
MOV RDX,R12
CALL 0x0016e3a0
LAB_0016f629:
LEA RBX,[RSP + 0x98]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x0016d8c4
JMP 0x0016f693
LAB_0016f644:
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x00162ea2
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_0016f664:
LEA R13,[RSP + 0x10]
MOV RDI,R13
XOR ESI,ESI
MOV R12,qword ptr [RSP]
MOV RDX,R12
CALL 0x0016e3a0
LAB_0016f67a:
LEA RBX,[RSP + 0x98]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x0016d8c4
LAB_0016f693:
MOV RDI,R12
MOV RSI,RBX
CALL 0x00167cac
MOV RDI,RBX
CALL 0x00163132
MOV RDI,R13
CALL 0x0016d9a8
LAB_0016f6ae:
MOV RDI,R15
CALL 0x00163132
ADD RBP,0x10
XOR EAX,EAX
JMP 0x0016f595
LAB_0016f6c1:
MOV RAX,R12
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016f6d6:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R15,RAX
LAB_0016f6e1:
LEA RSI,[0x1b6618]
MOV RDI,RAX
CALL 0x00124320
LAB_0016f6f0:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R15
CALL 0x00124ee0
|
/* minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
FilterExpr * __thiscall minja::FilterExpr::do_evaluate(FilterExpr *this,shared_ptr *param_1)
{
int8 *puVar1;
shared_ptr *psVar2;
bool bVar3;
long lVar4;
runtime_error *this_00;
int8 *puVar5;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
Expression local_d0 [80];
Value local_80 [80];
Value::Value((Value *)this);
puVar5 = *(int8 **)(param_1 + 0x20);
puVar1 = *(int8 **)(param_1 + 0x28);
bVar3 = true;
while( true ) {
if (puVar5 == puVar1) {
return this;
}
psVar2 = (shared_ptr *)*puVar5;
if (psVar2 == (shared_ptr *)0x0) break;
if (bVar3) {
/* try { // try from 0016f5b1 to 0016f5be has its CatchHandler @ 0016f73d */
Expression::evaluate(local_d0,psVar2);
Value::operator=((Value *)this,(Value *)local_d0);
}
else {
lVar4 = __dynamic_cast(psVar2,&Expression::typeinfo,&CallExpr::typeinfo,0);
if (lVar4 == 0) {
/* try { // try from 0016f644 to 0016f651 has its CatchHandler @ 0016f70a */
Expression::evaluate(local_d0,psVar2);
local_e8 = 0;
uStack_e0 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_108 = 0;
uStack_100 = 0;
/* try { // try from 0016f664 to 0016f679 has its CatchHandler @ 0016f708 */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,0,this);
/* try { // try from 0016f67a to 0016f692 has its CatchHandler @ 0016f706 */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
else {
/* try { // try from 0016f5f3 to 0016f5fd has its CatchHandler @ 0016f713 */
Expression::evaluate(local_d0,*(shared_ptr **)(lVar4 + 0x20));
/* try { // try from 0016f602 to 0016f614 has its CatchHandler @ 0016f70e */
ArgumentsExpression::evaluate
((ArgumentsExpression *)&local_108,(shared_ptr *)(lVar4 + 0x30));
/* try { // try from 0016f61a to 0016f628 has its CatchHandler @ 0016f70c */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,local_108,this);
/* try { // try from 0016f629 to 0016f641 has its CatchHandler @ 0016f715 */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
Value::operator=((Value *)this,local_80);
Value::~Value(local_80);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)&local_108);
}
Value::~Value((Value *)local_d0);
puVar5 = puVar5 + 2;
bVar3 = false;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016f6e1 to 0016f6ef has its CatchHandler @ 0016f730 */
std::runtime_error::runtime_error(this_00,"FilterExpr.part is null");
/* try { // try from 0016f6f0 to 0016f705 has its CatchHandler @ 0016f72e */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
|
|
1,449 | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
Value result;
bool first = true;
for (const auto& part : parts) {
if (!part) throw std::runtime_error("FilterExpr.part is null");
if (first) {
first = false;
result = part->evaluate(context);
} else {
if (auto ce = dynamic_cast<CallExpr*>(part.get())) {
auto target = ce->object->evaluate(context);
ArgumentsValue args = ce->args.evaluate(context);
args.args.insert(args.args.begin(), result);
result = target.call(context, args);
} else {
auto callable = part->evaluate(context);
ArgumentsValue args;
args.args.insert(args.args.begin(), result);
result = callable.call(context, args);
}
}
}
return result;
} | O3 | cpp | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x40(%rdi), %r12
movq $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movq %rdi, 0x8(%rsp)
movb $0x0, 0x40(%rdi)
movq %r12, %rdi
movl $0x1, %esi
callq 0x58644
movq %r12, %rdi
movl $0x1, %esi
callq 0x58644
movq 0x20(%r15), %r13
movq 0x28(%r15), %rax
movq %rax, 0x40(%rsp)
cmpq %rax, %r13
je 0x95594
movb $0x1, %al
leaq 0x48(%rsp), %rbp
leaq 0x98(%rsp), %rbx
movq (%r13), %r12
testq %r12, %r12
je 0x955ab
testb $0x1, %al
je 0x953a0
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x85d20
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x8c750
jmp 0x95503
movq %rbp, %r15
movq %r12, %rdi
leaq 0x96fc3(%rip), %rsi # 0x12c370
leaq 0x97524(%rip), %rdx # 0x12c8d8
xorl %ecx, %ecx
callq 0x1b9b0
testq %rax, %rax
je 0x95411
movq %rax, %rbp
movq 0x20(%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x85d20
addq $0x30, %rbp
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x9229a
movq 0x10(%rsp), %rsi
movq %r12, %rdi
movq 0x8(%rsp), %rdx
callq 0x944fa
movq %r15, %rbp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x9361a
jmp 0x95459
movq %r15, %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x85d20
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq 0x8(%rsp), %rdx
callq 0x944fa
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x9361a
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x8c750
leaq 0xd8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x58644
movq %r12, %rdi
callq 0x5db32
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x95492
callq 0x6d556
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x954a4
callq 0x6d556
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x954b6
callq 0x6d556
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x954ef
movq 0x98ab6(%rip), %rax # 0x12df80
cmpb $0x0, (%rax)
je 0x954da
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x954e4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x954ef
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x28(%rsp), %rdi
callq 0x94962
leaq 0x10(%rsp), %rdi
callq 0x8d7f4
leaq 0x88(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x58644
movq %r12, %rdi
callq 0x5db32
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x9552f
callq 0x6d556
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x9553e
callq 0x6d556
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x9554d
callq 0x6d556
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x95583
movq 0x98a22(%rip), %rax # 0x12df80
cmpb $0x0, (%rax)
je 0x9556e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x95578
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x95583
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %r13
xorl %eax, %eax
cmpq 0x40(%rsp), %r13
jne 0x9536f
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b440
movq %rax, %r15
leaq 0x5d069(%rip), %rsi # 0xf2628
movq %rax, %rdi
callq 0x1b320
movq 0x98a1a(%rip), %rsi # 0x12dfe8
movq 0x9897b(%rip), %rdx # 0x12df50
movq %r15, %rdi
callq 0x1bef0
jmp 0x955ec
jmp 0x955ec
jmp 0x9561e
jmp 0x955ec
movq %rax, %r14
jmp 0x95603
jmp 0x9561e
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x94962
leaq 0x10(%rsp), %rdi
callq 0x8d7f4
leaq 0x48(%rsp), %rdi
callq 0x86012
jmp 0x95621
jmp 0x9561e
movq %rax, %r14
movq %r15, %rdi
callq 0x1b650
jmp 0x95621
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x86012
movq %r14, %rdi
callq 0x1bf70
nop
| _ZNK5minja10FilterExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r14, rdx
mov r15, rsi
lea r12, [rdi+40h]
mov qword ptr [rdi+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
mov [rsp+118h+var_110], rdi
mov byte ptr [rdi+40h], 0
mov rdi, r12
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, r12
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 r13, [r15+20h]
mov rax, [r15+28h]
mov [rsp+118h+var_D8], rax
cmp r13, rax
jz loc_95594
mov al, 1
lea rbp, [rsp+118h+var_D0]
lea rbx, [rsp+118h+var_80]
loc_9536F:
mov r12, [r13+0]
test r12, r12
jz loc_955AB
test al, 1
jz short loc_953A0
mov rdi, rbp
mov rsi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, [rsp+118h+var_110]
mov rsi, rbp
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
jmp loc_95503
loc_953A0:
mov r15, rbp
mov rdi, r12; lpsrc
lea rsi, _ZTIN5minja10ExpressionE; lpstype
lea rdx, _ZTIN5minja8CallExprE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_95411
mov rbp, rax
mov rsi, [rax+20h]
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
add rbp, 30h ; '0'
lea r12, [rsp+118h+var_108]
mov rdi, r12
mov rsi, rbp
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, qword ptr [rsp+118h+var_108]
mov rdi, r12
mov rdx, [rsp+118h+var_110]
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
mov rbp, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, r12
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
jmp short loc_95459
loc_95411:
mov rbp, r15
mov rdi, r15
mov rsi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_E8], xmm0
movaps [rsp+118h+var_F8], xmm0
movaps [rsp+118h+var_108], xmm0
lea r12, [rsp+118h+var_108]
mov rdi, r12
xor esi, esi
mov rdx, [rsp+118h+var_110]
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
mov rdi, rbx
mov rsi, rbp
mov rdx, r14
mov rcx, r12
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
loc_95459:
mov rdi, [rsp+118h+var_110]
mov rsi, rbx
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
lea r12, [rsp+118h+var_40]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+118h+var_48]
test rdi, rdi
jz short loc_95492
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_95492:
mov rdi, [rsp+118h+var_58]
test rdi, rdi
jz short loc_954A4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_954A4:
mov rdi, [rsp+118h+var_68]
test rdi, rdi
jz short loc_954B6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_954B6:
mov rdi, [rsp+118h+var_78]
test rdi, rdi
jz short loc_954EF
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_954DA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_954E4
loc_954DA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_954E4:
cmp eax, 1
jnz short loc_954EF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_954EF:
lea rdi, [rsp+118h+var_F8+8]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
lea rdi, [rsp+118h+var_108]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
loc_95503:
lea r12, [rsp+118h+var_90]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+118h+var_98]
test rdi, rdi
jz short loc_9552F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9552F:
mov rdi, [rsp+118h+var_A8]
test rdi, rdi
jz short loc_9553E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9553E:
mov rdi, [rsp+118h+var_B8]
test rdi, rdi
jz short loc_9554D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9554D:
mov rdi, [rsp+118h+var_C8]
test rdi, rdi
jz short loc_95583
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9556E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_95578
loc_9556E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_95578:
cmp eax, 1
jnz short loc_95583
mov rax, [rdi]
call qword ptr [rax+18h]
loc_95583:
add r13, 10h
xor eax, eax
cmp r13, [rsp+118h+var_D8]
jnz loc_9536F
loc_95594:
mov rax, [rsp+118h+var_110]
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_955AB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aFilterexprPart; "FilterExpr.part is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_955EC
jmp short loc_955EC
jmp short loc_9561E
jmp short loc_955EC
mov r14, rax
jmp short loc_95603
jmp short loc_9561E
loc_955EC:
mov r14, rax
lea rdi, [rsp+118h+var_F8+8]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
lea rdi, [rsp+118h+var_108]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
loc_95603:
lea rdi, [rsp+118h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_95621
jmp short loc_9561E
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_95621
loc_9561E:
mov r14, rax
loc_95621:
mov rdi, [rsp+118h+var_110]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| long long minja::FilterExpr::do_evaluate(long long a1, long long a2, long long a3)
{
void (****v4)(void); // r13
char v5; // al
char *v6; // rbp
void (***v7)(void); // r12
long long v8; // r15
void (****v9)(void); // rax
void (****v10)(void); // rbp
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r15
_OWORD v18[3]; // [rsp+10h] [rbp-108h] BYREF
void (****v19)(void); // [rsp+40h] [rbp-D8h]
char v20; // [rsp+48h] [rbp-D0h] BYREF
long long v21; // [rsp+50h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+60h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+70h] [rbp-A8h]
volatile signed __int32 *v24; // [rsp+80h] [rbp-98h]
char v25[16]; // [rsp+88h] [rbp-90h] BYREF
_BYTE v26[8]; // [rsp+98h] [rbp-80h] BYREF
long long v27; // [rsp+A0h] [rbp-78h]
volatile signed __int32 *v28; // [rsp+B0h] [rbp-68h]
volatile signed __int32 *v29; // [rsp+C0h] [rbp-58h]
volatile signed __int32 *v30; // [rsp+D0h] [rbp-48h]
char v31[64]; // [rsp+D8h] [rbp-40h] BYREF
*(_QWORD *)(a1 + 72) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 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 *)(a1 + 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 *)(a1 + 64));
v4 = *(void (*****)(void))(a2 + 32);
v19 = *(void (*****)(void))(a2 + 40);
if ( v4 != v19 )
{
v5 = 1;
v6 = &v20;
do
{
v7 = *v4;
if ( !*v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterExpr.part is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (v5 & 1) != 0 )
{
minja::Expression::evaluate((long long)v6, *v4);
minja::Value::operator=(a1, (long long)v6);
}
else
{
v8 = (long long)v6;
v9 = (void (****)(void))__dynamic_cast(
*v4,
(const struct __class_type_info *)&`typeinfo for'minja::Expression,
(const struct __class_type_info *)&`typeinfo for'minja::CallExpr,
0LL);
if ( v9 )
{
v10 = v9;
minja::Expression::evaluate(v8, v9[4]);
minja::ArgumentsExpression::evaluate(v18, v10 + 6, a3);
std::vector<minja::Value>::insert((long long *)v18, *(long long *)&v18[0], (const minja::Value *)a1);
v6 = (char *)v8;
}
else
{
minja::Expression::evaluate((long long)v6, v7);
memset(v18, 0, sizeof(v18));
std::vector<minja::Value>::insert((long long *)v18, 0LL, (const minja::Value *)a1);
}
minja::Value::call((long long)v26, v8);
minja::Value::operator=(a1, (long long)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(v31);
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(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
if ( v28 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
v11 = v27;
if ( v27 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v27 + 12);
*(_DWORD *)(v27 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v27 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v18[1] + 1);
std::vector<minja::Value>::~vector(v18);
}
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(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);
if ( v24 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v24);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
v4 += 2;
v5 = 0;
}
while ( v4 != v19 );
}
return a1;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R14,RDX
MOV R15,RSI
LEA R12,[RDI + 0x40]
MOV qword ptr [RDI + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RSP + 0x8],RDI
MOV byte ptr [RDI + 0x40],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x00158644
MOV RDI,R12
MOV ESI,0x1
CALL 0x00158644
MOV R13,qword ptr [R15 + 0x20]
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [RSP + 0x40],RAX
CMP R13,RAX
JZ 0x00195594
MOV AL,0x1
LEA RBP,[RSP + 0x48]
LEA RBX,[RSP + 0x98]
LAB_0019536f:
MOV R12,qword ptr [R13]
TEST R12,R12
JZ 0x001955ab
TEST AL,0x1
JZ 0x001953a0
LAB_00195380:
MOV RDI,RBP
MOV RSI,R12
MOV RDX,R14
CALL 0x00185d20
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RBP
CALL 0x0018c750
JMP 0x00195503
LAB_001953a0:
MOV R15,RBP
MOV RDI,R12
LEA RSI,[0x22c370]
LEA RDX,[0x22c8d8]
XOR ECX,ECX
CALL 0x0011b9b0
TEST RAX,RAX
JZ 0x00195411
MOV RBP,RAX
MOV RSI,qword ptr [RAX + 0x20]
LAB_001953c7:
MOV RDI,R15
MOV RDX,R14
CALL 0x00185d20
ADD RBP,0x30
LAB_001953d6:
LEA R12,[RSP + 0x10]
MOV RDI,R12
MOV RSI,RBP
MOV RDX,R14
CALL 0x0019229a
MOV RSI,qword ptr [RSP + 0x10]
LAB_001953ee:
MOV RDI,R12
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x001944fa
LAB_001953fb:
MOV RBP,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
CALL 0x0019361a
JMP 0x00195459
LAB_00195411:
MOV RBP,R15
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
CALL 0x00185d20
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_00195434:
LEA R12,[RSP + 0x10]
MOV RDI,R12
XOR ESI,ESI
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x001944fa
LAB_00195448:
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R14
MOV RCX,R12
CALL 0x0019361a
LAB_00195459:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RBX
CALL 0x0018c750
LEA R12,[RSP + 0xd8]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00158644
MOV RDI,R12
CALL 0x0015db32
MOV RDI,qword ptr [RSP + 0xd0]
TEST RDI,RDI
JZ 0x00195492
CALL 0x0016d556
LAB_00195492:
MOV RDI,qword ptr [RSP + 0xc0]
TEST RDI,RDI
JZ 0x001954a4
CALL 0x0016d556
LAB_001954a4:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x001954b6
CALL 0x0016d556
LAB_001954b6:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x001954ef
MOV RAX,qword ptr [0x0022df80]
CMP byte ptr [RAX],0x0
JZ 0x001954da
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001954e4
LAB_001954da:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001954e4:
CMP EAX,0x1
JNZ 0x001954ef
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001954ef:
LEA RDI,[RSP + 0x28]
CALL 0x00194962
LEA RDI,[RSP + 0x10]
CALL 0x0018d7f4
LAB_00195503:
LEA R12,[RSP + 0x88]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00158644
MOV RDI,R12
CALL 0x0015db32
MOV RDI,qword ptr [RSP + 0x80]
TEST RDI,RDI
JZ 0x0019552f
CALL 0x0016d556
LAB_0019552f:
MOV RDI,qword ptr [RSP + 0x70]
TEST RDI,RDI
JZ 0x0019553e
CALL 0x0016d556
LAB_0019553e:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x0019554d
CALL 0x0016d556
LAB_0019554d:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x00195583
MOV RAX,qword ptr [0x0022df80]
CMP byte ptr [RAX],0x0
JZ 0x0019556e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00195578
LAB_0019556e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00195578:
CMP EAX,0x1
JNZ 0x00195583
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00195583:
ADD R13,0x10
XOR EAX,EAX
CMP R13,qword ptr [RSP + 0x40]
JNZ 0x0019536f
LAB_00195594:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001955ab:
MOV EDI,0x10
CALL 0x0011b440
MOV R15,RAX
LAB_001955b8:
LEA RSI,[0x1f2628]
MOV RDI,RAX
CALL 0x0011b320
LAB_001955c7:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R15
CALL 0x0011bef0
|
/* minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
FilterExpr * __thiscall minja::FilterExpr::do_evaluate(FilterExpr *this,shared_ptr *param_1)
{
int *piVar1;
shared_ptr *psVar2;
int iVar3;
long lVar4;
runtime_error *this_00;
bool bVar5;
int8 *puVar6;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 *local_d8;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
shared_ptr local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
bVar5 = (bool)((char)this + '@');
*(int8 *)(this + 0x48) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
this[0x40] = (FilterExpr)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(bVar5);
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(bVar5);
puVar6 = *(int8 **)(param_1 + 0x20);
local_d8 = *(int8 **)(param_1 + 0x28);
if (puVar6 != local_d8) {
bVar5 = true;
do {
psVar2 = (shared_ptr *)*puVar6;
if (psVar2 == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001955b8 to 001955c6 has its CatchHandler @ 00195611 */
std::runtime_error::runtime_error(this_00,"FilterExpr.part is null");
/* try { // try from 001955c7 to 001955dc has its CatchHandler @ 0019560f */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
if (bVar5) {
/* try { // try from 00195380 to 0019538d has its CatchHandler @ 0019561e */
Expression::evaluate(local_d0,psVar2);
Value::operator=((Value *)this,(Value *)local_d0);
}
else {
lVar4 = __dynamic_cast(psVar2,&Expression::typeinfo,&CallExpr::typeinfo,0);
if (lVar4 == 0) {
/* try { // try from 00195411 to 00195421 has its CatchHandler @ 001955e1 */
Expression::evaluate(local_d0,psVar2);
local_e8 = 0;
uStack_e0 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_108 = 0;
uStack_100 = 0;
/* try { // try from 00195434 to 00195447 has its CatchHandler @ 001955df */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,0,this);
/* try { // try from 00195448 to 00195458 has its CatchHandler @ 001955dd */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
else {
/* try { // try from 001953c7 to 001953d1 has its CatchHandler @ 001955ea */
Expression::evaluate(local_d0,*(shared_ptr **)(lVar4 + 0x20));
/* try { // try from 001953d6 to 001953e8 has its CatchHandler @ 001955e5 */
ArgumentsExpression::evaluate((shared_ptr *)&local_108);
/* try { // try from 001953ee to 001953fa has its CatchHandler @ 001955e3 */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,local_108,this)
;
/* try { // try from 001953fb to 0019540e has its CatchHandler @ 001955ec */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
Value::operator=((Value *)this,(Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&uStack_f0);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108);
}
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_90,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_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
puVar6 = puVar6 + 2;
bVar5 = false;
} while (puVar6 != local_d8);
}
return this;
}
|
|
1,450 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | monkey531[P]llama/common/json.hpp | inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent,
diyfp M_minus, diyfp w, diyfp M_plus)
{
static_assert(kAlpha >= -60, "internal error");
static_assert(kGamma <= -32, "internal error");
// Generates the digits (and the exponent) of a decimal floating-point
// number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's
// w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma.
//
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// Grisu2 generates the digits of M+ from left to right and stops as soon as
// V is in [M-,M+].
JSON_ASSERT(M_plus.e >= kAlpha);
JSON_ASSERT(M_plus.e <= kGamma);
std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e)
std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e)
// Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0):
//
// M+ = f * 2^e
// = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e
// = ((p1 ) * 2^-e + (p2 )) * 2^e
// = p1 + p2 * 2^e
const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e);
auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.)
std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e
// 1)
//
// Generate the digits of the integral part p1 = d[n-1]...d[1]d[0]
JSON_ASSERT(p1 > 0);
std::uint32_t pow10{};
const int k = find_largest_pow10(p1, pow10);
// 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1)
//
// p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1))
// = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1))
//
// M+ = p1 + p2 * 2^e
// = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e
// = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e
// = d[k-1] * 10^(k-1) + ( rest) * 2^e
//
// Now generate the digits d[n] of p1 from left to right (n = k-1,...,0)
//
// p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0]
//
// but stop as soon as
//
// rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e
int n = k;
while (n > 0)
{
// Invariants:
// M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k)
// pow10 = 10^(n-1) <= p1 < 10^n
//
const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1)
const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1)
//
// M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e
// = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e)
//
JSON_ASSERT(d <= 9);
buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d
//
// M+ = buffer * 10^(n-1) + (r + p2 * 2^e)
//
p1 = r;
n--;
//
// M+ = buffer * 10^n + (p1 + p2 * 2^e)
// pow10 = 10^n
//
// Now check if enough digits have been generated.
// Compute
//
// p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e
//
// Note:
// Since rest and delta share the same exponent e, it suffices to
// compare the significands.
const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2;
if (rest <= delta)
{
// V = buffer * 10^n, with M- <= V <= M+.
decimal_exponent += n;
// We may now just stop. But instead look if the buffer could be
// decremented to bring V closer to w.
//
// pow10 = 10^n is now 1 ulp in the decimal representation V.
// The rounding procedure works with diyfp's with an implicit
// exponent of e.
//
// 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e
//
const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e;
grisu2_round(buffer, length, dist, delta, rest, ten_n);
return;
}
pow10 /= 10;
//
// pow10 = 10^(n-1) <= p1 < 10^n
// Invariants restored.
}
// 2)
//
// The digits of the integral part have been generated:
//
// M+ = d[k-1]...d[1]d[0] + p2 * 2^e
// = buffer + p2 * 2^e
//
// Now generate the digits of the fractional part p2 * 2^e.
//
// Note:
// No decimal point is generated: the exponent is adjusted instead.
//
// p2 actually represents the fraction
//
// p2 * 2^e
// = p2 / 2^-e
// = d[-1] / 10^1 + d[-2] / 10^2 + ...
//
// Now generate the digits d[-m] of p1 from left to right (m = 1,2,...)
//
// p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m
// + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...)
//
// using
//
// 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e)
// = ( d) * 2^-e + ( r)
//
// or
// 10^m * p2 * 2^e = d + r * 2^e
//
// i.e.
//
// M+ = buffer + p2 * 2^e
// = buffer + 10^-m * (d + r * 2^e)
// = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e
//
// and stop as soon as 10^-m * r * 2^e <= delta * 2^e
JSON_ASSERT(p2 > delta);
int m = 0;
for (;;)
{
// Invariant:
// M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e
// = buffer * 10^-m + 10^-m * (p2 ) * 2^e
// = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e
// = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e
//
JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10);
p2 *= 10;
const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e
const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e
//
// M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e
// = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e))
// = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e
//
JSON_ASSERT(d <= 9);
buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d
//
// M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e
//
p2 = r;
m++;
//
// M+ = buffer * 10^-m + 10^-m * p2 * 2^e
// Invariant restored.
// Check if enough digits have been generated.
//
// 10^-m * p2 * 2^e <= delta * 2^e
// p2 * 2^e <= 10^m * delta * 2^e
// p2 <= 10^m * delta
delta *= 10;
dist *= 10;
if (p2 <= delta)
{
break;
}
}
// V = buffer * 10^-m, with M- <= V <= M+.
decimal_exponent -= m;
// 1 ulp in the decimal representation is now 10^-m.
// Since delta and dist are now scaled by 10^m, we need to do the
// same with ulp in order to keep the units in sync.
//
// 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e
//
const std::uint64_t ten_m = one.f;
grisu2_round(buffer, length, dist, delta, p2, ten_m);
// By construction this algorithm generates the shortest possible decimal
// number (Loitsch, Theorem 6.2) which rounds back to w.
// For an input number of precision p, at least
//
// N = 1 + ceil(p * log_10(2))
//
// decimal digits are sufficient to identify all binary floating-point
// numbers (Matula, "In-and-Out conversions").
// This implies that the algorithm does not produce more than N decimal
// digits.
//
// N = 17 for p = 53 (IEEE double precision)
// N = 9 for p = 24 (IEEE single precision)
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movl %r8d, 0x10(%rsp)
movl 0x68(%rsp), %eax
cmpl $-0x3d, %eax
jle 0xb8952
movq %rdx, (%rsp)
cmpl $-0x1f, %eax
jge 0xb896e
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %r13
leaq 0x50(%rsp), %rbp
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0xb89c2
movq %rax, %r12
movq %r13, %rdi
movq %rbp, %rsi
callq 0xb89c2
xorl %ecx, %ecx
subl 0x8(%r13), %ecx
movl $0x1, %r9d
shlq %cl, %r9
movq (%r13), %r8
movq %r8, %rdx
shrq %cl, %rdx
testl %edx, %edx
je 0xb898a
movq %rax, %r10
leaq -0x1(%r9), %rsi
cmpl $0x3b9ac9ff, %edx # imm = 0x3B9AC9FF
jbe 0xb875b
movl $0x3b9aca00, %edi # imm = 0x3B9ACA00
movl $0xa, %r13d
jmp 0xb8800
cmpl $0x5f5e0ff, %edx # imm = 0x5F5E0FF
jbe 0xb8773
movl $0x5f5e100, %edi # imm = 0x5F5E100
movl $0x9, %r13d
jmp 0xb8800
cmpl $0x98967f, %edx # imm = 0x98967F
jbe 0xb8788
movl $0x989680, %edi # imm = 0x989680
movl $0x8, %r13d
jmp 0xb8800
cmpl $0xf423f, %edx # imm = 0xF423F
jbe 0xb879d
movl $0xf4240, %edi # imm = 0xF4240
movl $0x7, %r13d
jmp 0xb8800
cmpl $0x1869f, %edx # imm = 0x1869F
jbe 0xb87b2
movl $0x186a0, %edi # imm = 0x186A0
movl $0x6, %r13d
jmp 0xb8800
cmpl $0x270f, %edx # imm = 0x270F
jbe 0xb87c7
movl $0x2710, %edi # imm = 0x2710
movl $0x5, %r13d
jmp 0xb8800
cmpl $0x3e7, %edx # imm = 0x3E7
jbe 0xb87dc
movl $0x3e8, %edi # imm = 0x3E8
movl $0x4, %r13d
jmp 0xb8800
cmpl $0x63, %edx
jbe 0xb87ee
movl $0x64, %edi
movl $0x3, %r13d
jmp 0xb8800
xorl %r13d, %r13d
cmpl $0xa, %edx
setae %r13b
leal 0x1(%r13,%r13,8), %edi
incl %r13d
andq %rsi, %r8
incl %r13d
movl $0xcccccccd, %ebp # imm = 0xCCCCCCCD
movl %edx, %eax
xorl %edx, %edx
divl %edi
cmpl $0xa, %eax
jae 0xb88f9
movslq (%r14), %r15
leal 0x1(%r15), %r11d
movl %r11d, (%r14)
movl %edx, %r11d
shlq %cl, %r11
orb $0x30, %al
movb %al, (%rbx,%r15)
addq %r8, %r11
cmpq %r12, %r11
jbe 0xb88c2
movl %edi, %edi
imulq %rbp, %rdi
shrq $0x23, %rdi
decl %r13d
cmpl $0x1, %r13d
ja 0xb880b
cmpq %r12, %r8
jbe 0xb89a6
xorl %eax, %eax
movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A
cmpq %rdx, %r8
jae 0xb8915
addq %r8, %r8
leaq (%r8,%r8,4), %r8
movq %r8, %rdi
shrq %cl, %rdi
cmpq $0xa, %rdi
jae 0xb8931
andq %rsi, %r8
orb $0x30, %dil
movslq (%r14), %r11
leal 0x1(%r11), %ebp
movl %ebp, (%r14)
movb %dil, (%rbx,%r11)
addq %r12, %r12
leaq (%r12,%r12,4), %r12
addq %r10, %r10
leaq (%r10,%r10,4), %r10
decl %eax
cmpq %r12, %r8
ja 0xb8864
movq (%rsp), %rcx
addl %eax, (%rcx)
movl (%r14), %esi
movq %rbx, %rdi
movq %r10, %rdx
movq %r12, %rcx
jmp 0xb88e5
movq (%rsp), %rdx
movl (%rdx), %eax
addl %r13d, %eax
addl $-0x2, %eax
movl %eax, (%rdx)
movl %edi, %r9d
shlq %cl, %r9
movl (%r14), %esi
movq %rbx, %rdi
movq %r10, %rdx
movq %r12, %rcx
movq %r11, %r8
callq 0xb8a0c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35339(%rip), %rdi # 0xedc39
leaq 0x3537c(%rip), %rdx # 0xedc83
leaq 0x3ac1d(%rip), %rcx # 0xf352b
movl $0x44a3, %esi # imm = 0x44A3
jmp 0xb894b
leaq 0x3531d(%rip), %rdi # 0xedc39
leaq 0x35360(%rip), %rdx # 0xedc83
leaq 0x3ac13(%rip), %rcx # 0xf353d
movl $0x4505, %esi # imm = 0x4505
jmp 0xb894b
leaq 0x35301(%rip), %rdi # 0xedc39
leaq 0x35344(%rip), %rdx # 0xedc83
leaq 0x3abe5(%rip), %rcx # 0xf352b
movl $0x450e, %esi # imm = 0x450E
xorl %eax, %eax
callq 0x1be90
leaq 0x352e0(%rip), %rdi # 0xedc39
leaq 0x35323(%rip), %rdx # 0xedc83
leaq 0x3ab97(%rip), %rcx # 0xf34fe
movl $0x4469, %esi # imm = 0x4469
jmp 0xb894b
leaq 0x352c4(%rip), %rdi # 0xedc39
leaq 0x35307(%rip), %rdx # 0xedc83
leaq 0x3ab8e(%rip), %rcx # 0xf3511
movl $0x446a, %esi # imm = 0x446A
jmp 0xb894b
leaq 0x352a8(%rip), %rdi # 0xedc39
leaq 0x352eb(%rip), %rdx # 0xedc83
leaq 0x3ab85(%rip), %rcx # 0xf3524
movl $0x447f, %esi # imm = 0x447F
jmp 0xb894b
leaq 0x3528c(%rip), %rdi # 0xedc39
leaq 0x352cf(%rip), %rdx # 0xedc83
leaq 0x3ab77(%rip), %rcx # 0xf3532
movl $0x44fa, %esi # imm = 0x44FA
jmp 0xb894b
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], r8d
mov eax, [rsp+48h+arg_18]
cmp eax, 0FFFFFFC3h
jle loc_B8952
mov [rsp+48h+var_48], rdx; unsigned __int64
cmp eax, 0FFFFFFE1h
jge loc_B896E
mov r14, rsi
mov rbx, rdi
lea r13, [rsp+48h+arg_10]
lea rbp, [rsp+48h+arg_0]
lea rsi, [rsp+48h+var_40]
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r12, rax
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
xor ecx, ecx
sub ecx, [r13+8]
mov r9d, 1
shl r9, cl
mov r8, [r13+0]
mov rdx, r8
shr rdx, cl
test edx, edx
jz loc_B898A
mov r10, rax
lea rsi, [r9-1]
cmp edx, 3B9AC9FFh
jbe short loc_B875B
mov edi, 3B9ACA00h
mov r13d, 0Ah
jmp loc_B8800
loc_B875B:
cmp edx, 5F5E0FFh
jbe short loc_B8773
mov edi, 5F5E100h
mov r13d, 9
jmp loc_B8800
loc_B8773:
cmp edx, 98967Fh
jbe short loc_B8788
mov edi, 989680h
mov r13d, 8
jmp short loc_B8800
loc_B8788:
cmp edx, 0F423Fh
jbe short loc_B879D
mov edi, 0F4240h
mov r13d, 7
jmp short loc_B8800
loc_B879D:
cmp edx, 1869Fh
jbe short loc_B87B2
mov edi, 186A0h
mov r13d, 6
jmp short loc_B8800
loc_B87B2:
cmp edx, 270Fh
jbe short loc_B87C7
mov edi, 2710h
mov r13d, 5
jmp short loc_B8800
loc_B87C7:
cmp edx, 3E7h
jbe short loc_B87DC
mov edi, 3E8h
mov r13d, 4
jmp short loc_B8800
loc_B87DC:
cmp edx, 63h ; 'c'
jbe short loc_B87EE
mov edi, 64h ; 'd'
mov r13d, 3
jmp short loc_B8800
loc_B87EE:
xor r13d, r13d
cmp edx, 0Ah
setnb r13b
lea edi, [r13+r13*8+1]
inc r13d
loc_B8800:
and r8, rsi
inc r13d
mov ebp, 0CCCCCCCDh
loc_B880B:
mov eax, edx
xor edx, edx
div edi
cmp eax, 0Ah
jnb loc_B88F9
movsxd r15, dword ptr [r14]
lea r11d, [r15+1]
mov [r14], r11d
mov r11d, edx
shl r11, cl
or al, 30h
mov [rbx+r15], al
add r11, r8
cmp r11, r12
jbe loc_B88C2
mov edi, edi
imul rdi, rbp
shr rdi, 23h
dec r13d
cmp r13d, 1
ja short loc_B880B
cmp r8, r12
jbe loc_B89A6
xor eax, eax
mov rdx, 199999999999999Ah
loc_B8864:
cmp r8, rdx
jnb loc_B8915
add r8, r8
lea r8, [r8+r8*4]
mov rdi, r8
shr rdi, cl
cmp rdi, 0Ah
jnb loc_B8931
and r8, rsi
or dil, 30h
movsxd r11, dword ptr [r14]
lea ebp, [r11+1]
mov [r14], ebp
mov [rbx+r11], dil
add r12, r12
lea r12, [r12+r12*4]
add r10, r10
lea r10, [r10+r10*4]
dec eax
cmp r8, r12
ja short loc_B8864
mov rcx, [rsp+48h+var_48]
add [rcx], eax
mov esi, [r14]
mov rdi, rbx
mov rdx, r10
mov rcx, r12
jmp short loc_B88E5
loc_B88C2:
mov rdx, [rsp+48h+var_48]
mov eax, [rdx]
add eax, r13d
add eax, 0FFFFFFFEh
mov [rdx], eax
mov r9d, edi
shl r9, cl; unsigned __int64
mov esi, [r14]; char *
mov rdi, rbx; this
mov rdx, r10; int
mov rcx, r12; unsigned __int64
mov r8, r11; unsigned __int64
loc_B88E5:
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B88F9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aD9; "d <= 9"
mov esi, 44A3h
jmp short loc_B894B
loc_B8915:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"...
mov esi, 4505h
jmp short loc_B894B
loc_B8931:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aD9; "d <= 9"
mov esi, 450Eh
loc_B894B:
xor eax, eax
call _ggml_abort
loc_B8952:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEKalpha; "M_plus.e >= kAlpha"
mov esi, 4469h
jmp short loc_B894B
loc_B896E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEKgamma; "M_plus.e <= kGamma"
mov esi, 446Ah
jmp short loc_B894B
loc_B898A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aP10; "p1 > 0"
mov esi, 447Fh
jmp short loc_B894B
loc_B89A6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aP2Delta; "p2 > delta"
mov esi, 44FAh
jmp short loc_B894B
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
unsigned int *a2,
_DWORD *a3,
long long a4,
int a5,
long long a6,
char a7,
int a8,
unsigned long long a9,
int a10)
{
unsigned long long v12; // r12
int v13; // eax
int v14; // ecx
unsigned long long v15; // r9
unsigned long long v16; // rdx
int v17; // r10d
unsigned long long v18; // rsi
unsigned int v19; // edi
int v20; // r13d
BOOL v21; // r13d
unsigned long long v22; // r8
unsigned int v23; // r13d
unsigned int v24; // eax
unsigned int v25; // eax
long long v26; // r15
unsigned long long v27; // r11
int v28; // eax
unsigned long long v29; // r8
unsigned long long v30; // rdi
long long v31; // r11
char *v32; // rsi
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v33; // rdi
int v34; // edx
unsigned long long v35; // rcx
long long v38; // [rsp+8h] [rbp-40h] BYREF
int v39; // [rsp+10h] [rbp-38h]
v38 = a4;
v39 = a5;
if ( a10 <= -61 )
{
while ( 1 )
LABEL_36:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17513LL,
"GGML_ASSERT(%s) failed",
"M_plus.e >= kAlpha");
}
if ( a10 >= -31 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17514LL,
"GGML_ASSERT(%s) failed",
"M_plus.e <= kGamma");
goto LABEL_36;
}
v12 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v38);
v13 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7);
v14 = -a10;
v15 = 1LL << -(char)a10;
v16 = a9 >> -(char)a10;
if ( !(_DWORD)v16 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17535LL,
"GGML_ASSERT(%s) failed",
"p1 > 0");
goto LABEL_36;
}
v17 = v13;
v18 = v15 - 1;
if ( (unsigned int)v16 <= 0x3B9AC9FF )
{
if ( (unsigned int)v16 <= 0x5F5E0FF )
{
if ( (unsigned int)v16 <= 0x98967F )
{
if ( (unsigned int)v16 <= 0xF423F )
{
if ( (unsigned int)v16 <= 0x1869F )
{
if ( (unsigned int)v16 <= 0x270F )
{
if ( (unsigned int)v16 <= 0x3E7 )
{
if ( (unsigned int)v16 <= 0x63 )
{
v21 = (unsigned int)v16 >= 0xA;
v19 = 9 * v21 + 1;
v20 = v21 + 1;
}
else
{
v19 = 100;
v20 = 3;
}
}
else
{
v19 = 1000;
v20 = 4;
}
}
else
{
v19 = 10000;
v20 = 5;
}
}
else
{
v19 = 100000;
v20 = 6;
}
}
else
{
v19 = 1000000;
v20 = 7;
}
}
else
{
v19 = 10000000;
v20 = 8;
}
}
else
{
v19 = 100000000;
v20 = 9;
}
}
else
{
v19 = 1000000000;
v20 = 10;
}
v22 = v18 & a9;
v23 = v20 + 1;
do
{
v24 = v16;
LODWORD(v16) = (unsigned int)v16 % v19;
v25 = v24 / v19;
if ( v25 >= 0xA )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17571LL,
"GGML_ASSERT(%s) failed",
"d <= 9");
goto LABEL_36;
}
v26 = (int)*a2;
*a2 = v26 + 1;
*((_BYTE *)this + v26) = v25 | 0x30;
v27 = v22 + ((unsigned long long)(unsigned int)v16 << v14);
if ( v27 <= v12 )
{
*a3 = v23 + *a3 - 2;
v15 = (unsigned long long)v19 << v14;
v32 = (char *)*a2;
v33 = this;
v34 = v17;
v35 = v12;
v22 = v27;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
v33,
v32,
v34,
v35,
v22,
v15,
(unsigned long long)a3);
}
v19 /= 0xAu;
--v23;
}
while ( v23 > 1 );
if ( v22 <= v12 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17658LL,
"GGML_ASSERT(%s) failed",
"p2 > delta");
goto LABEL_36;
}
v28 = 0;
while ( 2 )
{
if ( v22 >= 0x199999999999999ALL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17669LL,
"GGML_ASSERT(%s) failed",
"p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10");
goto LABEL_36;
}
v29 = 10 * v22;
v30 = v29 >> v14;
if ( v29 >> v14 >= 0xA )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17678LL,
"GGML_ASSERT(%s) failed",
"d <= 9");
goto LABEL_36;
}
v22 = v18 & v29;
v31 = (int)*a2;
*a2 = v31 + 1;
*((_BYTE *)this + v31) = v30 | 0x30;
v12 *= 10LL;
v17 *= 10;
--v28;
if ( v22 > v12 )
continue;
break;
}
*a3 += v28;
v32 = (char *)*a2;
v33 = this;
v34 = v17;
v35 = v12;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(v33, v32, v34, v35, v22, v15, (unsigned long long)a3);
}
| grisu2_digit_gen:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
MOV dword ptr [RSP + 0x10],R8D
MOV EAX,dword ptr [RSP + 0x68]
CMP EAX,-0x3d
JLE 0x001b8952
MOV qword ptr [RSP],RDX
CMP EAX,-0x1f
JGE 0x001b896e
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RSP + 0x60]
LEA RBP,[RSP + 0x50]
LEA RSI,[RSP + 0x8]
MOV RDI,R13
CALL 0x001b89c2
MOV R12,RAX
MOV RDI,R13
MOV RSI,RBP
CALL 0x001b89c2
XOR ECX,ECX
SUB ECX,dword ptr [R13 + 0x8]
MOV R9D,0x1
SHL R9,CL
MOV R8,qword ptr [R13]
MOV RDX,R8
SHR RDX,CL
TEST EDX,EDX
JZ 0x001b898a
MOV R10,RAX
LEA RSI,[R9 + -0x1]
CMP EDX,0x3b9ac9ff
JBE 0x001b875b
MOV EDI,0x3b9aca00
MOV R13D,0xa
JMP 0x001b8800
LAB_001b875b:
CMP EDX,0x5f5e0ff
JBE 0x001b8773
MOV EDI,0x5f5e100
MOV R13D,0x9
JMP 0x001b8800
LAB_001b8773:
CMP EDX,0x98967f
JBE 0x001b8788
MOV EDI,0x989680
MOV R13D,0x8
JMP 0x001b8800
LAB_001b8788:
CMP EDX,0xf423f
JBE 0x001b879d
MOV EDI,0xf4240
MOV R13D,0x7
JMP 0x001b8800
LAB_001b879d:
CMP EDX,0x1869f
JBE 0x001b87b2
MOV EDI,0x186a0
MOV R13D,0x6
JMP 0x001b8800
LAB_001b87b2:
CMP EDX,0x270f
JBE 0x001b87c7
MOV EDI,0x2710
MOV R13D,0x5
JMP 0x001b8800
LAB_001b87c7:
CMP EDX,0x3e7
JBE 0x001b87dc
MOV EDI,0x3e8
MOV R13D,0x4
JMP 0x001b8800
LAB_001b87dc:
CMP EDX,0x63
JBE 0x001b87ee
MOV EDI,0x64
MOV R13D,0x3
JMP 0x001b8800
LAB_001b87ee:
XOR R13D,R13D
CMP EDX,0xa
SETNC R13B
LEA EDI,[R13 + R13*0x8 + 0x1]
INC R13D
LAB_001b8800:
AND R8,RSI
INC R13D
MOV EBP,0xcccccccd
LAB_001b880b:
MOV EAX,EDX
XOR EDX,EDX
DIV EDI
CMP EAX,0xa
JNC 0x001b88f9
MOVSXD R15,dword ptr [R14]
LEA R11D,[R15 + 0x1]
MOV dword ptr [R14],R11D
MOV R11D,EDX
SHL R11,CL
OR AL,0x30
MOV byte ptr [RBX + R15*0x1],AL
ADD R11,R8
CMP R11,R12
JBE 0x001b88c2
MOV EDI,EDI
IMUL RDI,RBP
SHR RDI,0x23
DEC R13D
CMP R13D,0x1
JA 0x001b880b
CMP R8,R12
JBE 0x001b89a6
XOR EAX,EAX
MOV RDX,0x199999999999999a
LAB_001b8864:
CMP R8,RDX
JNC 0x001b8915
ADD R8,R8
LEA R8,[R8 + R8*0x4]
MOV RDI,R8
SHR RDI,CL
CMP RDI,0xa
JNC 0x001b8931
AND R8,RSI
OR DIL,0x30
MOVSXD R11,dword ptr [R14]
LEA EBP,[R11 + 0x1]
MOV dword ptr [R14],EBP
MOV byte ptr [RBX + R11*0x1],DIL
ADD R12,R12
LEA R12,[R12 + R12*0x4]
ADD R10,R10
LEA R10,[R10 + R10*0x4]
DEC EAX
CMP R8,R12
JA 0x001b8864
MOV RCX,qword ptr [RSP]
ADD dword ptr [RCX],EAX
MOV ESI,dword ptr [R14]
MOV RDI,RBX
MOV RDX,R10
MOV RCX,R12
JMP 0x001b88e5
LAB_001b88c2:
MOV RDX,qword ptr [RSP]
MOV EAX,dword ptr [RDX]
ADD EAX,R13D
ADD EAX,-0x2
MOV dword ptr [RDX],EAX
MOV R9D,EDI
SHL R9,CL
MOV ESI,dword ptr [R14]
MOV RDI,RBX
MOV RDX,R10
MOV RCX,R12
MOV R8,R11
LAB_001b88e5:
CALL 0x001b8a0c
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b88f9:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f352b]
MOV ESI,0x44a3
JMP 0x001b894b
LAB_001b8915:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f353d]
MOV ESI,0x4505
JMP 0x001b894b
LAB_001b8931:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f352b]
MOV ESI,0x450e
LAB_001b894b:
XOR EAX,EAX
CALL 0x0011be90
LAB_001b8952:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f34fe]
MOV ESI,0x4469
JMP 0x001b894b
LAB_001b896e:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f3511]
MOV ESI,0x446a
JMP 0x001b894b
LAB_001b898a:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f3524]
MOV ESI,0x447f
JMP 0x001b894b
LAB_001b89a6:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f3532]
MOV ESI,0x44fa
JMP 0x001b894b
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen
(char *param_1,int *param_2,int *param_3,int8 param_4,int4 param_5)
{
int iVar1;
byte bVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
char *pcVar6;
ulong uVar7;
int8 uVar8;
ulong uVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
uint uVar13;
ulong in_stack_00000018;
int in_stack_00000020;
int8 local_40;
int4 local_38;
local_40 = param_4;
local_38 = param_5;
if (in_stack_00000020 < -0x3c) {
pcVar6 = "M_plus.e >= kAlpha";
uVar8 = 0x4469;
}
else if (in_stack_00000020 < -0x1f) {
uVar4 = diyfp::sub((diyfp *)&stack0x00000018,(diyfp *)&local_40);
uVar5 = diyfp::sub((diyfp *)&stack0x00000018,&stack0x00000008);
bVar2 = -(char)in_stack_00000020;
uVar11 = 1L << (bVar2 & 0x3f);
uVar7 = in_stack_00000018 >> (bVar2 & 0x3f);
uVar13 = (uint)uVar7;
if (uVar13 == 0) {
pcVar6 = "p1 > 0";
uVar8 = 0x447f;
}
else {
if (uVar13 < 1000000000) {
if (uVar13 < 100000000) {
if (uVar13 < 10000000) {
if (uVar13 < 1000000) {
if (uVar13 < 100000) {
if (uVar13 < 10000) {
if (uVar13 < 1000) {
if (uVar13 < 100) {
uVar9 = (ulong)(9 < uVar13) * 9 + 1;
iVar3 = (9 < uVar13) + 1;
}
else {
uVar9 = 100;
iVar3 = 3;
}
}
else {
uVar9 = 1000;
iVar3 = 4;
}
}
else {
uVar9 = 10000;
iVar3 = 5;
}
}
else {
uVar9 = 100000;
iVar3 = 6;
}
}
else {
uVar9 = 1000000;
iVar3 = 7;
}
}
else {
uVar9 = 10000000;
iVar3 = 8;
}
}
else {
uVar9 = 100000000;
iVar3 = 9;
}
}
else {
uVar9 = 1000000000;
iVar3 = 10;
}
uVar10 = in_stack_00000018 & uVar11 - 1;
uVar13 = iVar3 + 1;
do {
uVar12 = (uVar7 & 0xffffffff) / uVar9;
uVar7 = (uVar7 & 0xffffffff) % uVar9;
if (9 < (uint)uVar12) {
pcVar6 = "d <= 9";
uVar8 = 0x44a3;
goto LAB_001b894b;
}
iVar3 = *param_2;
*param_2 = iVar3 + 1;
param_1[iVar3] = (byte)uVar12 | 0x30;
uVar12 = (uVar7 << (bVar2 & 0x3f)) + uVar10;
if (uVar12 <= uVar4) {
*param_3 = *param_3 + uVar13 + -2;
uVar11 = uVar9 << (bVar2 & 0x3f);
iVar3 = *param_2;
goto LAB_001b88e5;
}
uVar9 = uVar9 / 10;
uVar13 = uVar13 - 1;
} while (1 < uVar13);
if (uVar4 < uVar10) {
iVar3 = 0;
while( true ) {
if (0x1999999999999999 < uVar10) {
pcVar6 = "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10";
uVar8 = 0x4505;
goto LAB_001b894b;
}
uVar7 = uVar10 * 10 >> (bVar2 & 0x3f);
if (9 < uVar7) break;
uVar10 = uVar10 * 10 & uVar11 - 1;
iVar1 = *param_2;
*param_2 = iVar1 + 1;
param_1[iVar1] = (byte)uVar7 | 0x30;
uVar4 = uVar4 * 10;
uVar5 = uVar5 * 10;
iVar3 = iVar3 + -1;
if (uVar10 <= uVar4) {
*param_3 = *param_3 + iVar3;
iVar3 = *param_2;
uVar12 = uVar10;
LAB_001b88e5:
grisu2_round(param_1,iVar3,uVar5,uVar4,uVar12,uVar11);
return;
}
}
pcVar6 = "d <= 9";
uVar8 = 0x450e;
}
else {
pcVar6 = "p2 > delta";
uVar8 = 0x44fa;
}
}
}
else {
pcVar6 = "M_plus.e <= kGamma";
uVar8 = 0x446a;
}
LAB_001b894b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar8,
"GGML_ASSERT(%s) failed",pcVar6);
}
|
|
1,451 | glfwGetOSMesaColorBuffer | untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c | GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* handle, int* width,
int* height, int* format, void** buffer)
{
void* mesaBuffer;
GLint mesaWidth, mesaHeight, mesaFormat;
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
if (!OSMesaGetColorBuffer(window->context.osmesa.handle,
&mesaWidth, &mesaHeight,
&mesaFormat, &mesaBuffer))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"OSMesa: Failed to retrieve color buffer");
return GLFW_FALSE;
}
if (width)
*width = mesaWidth;
if (height)
*height = mesaHeight;
if (format)
*format = mesaFormat;
if (buffer)
*buffer = mesaBuffer;
return GLFW_TRUE;
} | O1 | c | glfwGetOSMesaColorBuffer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x286ad
leaq 0x7c02c(%rip), %rax # 0xa4638
cmpl $0x0, (%rax)
je 0x2867c
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x2a0(%rdi), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq *0x20978(%rax)
testl %eax, %eax
je 0x28688
testq %r12, %r12
je 0x2864f
movl 0xc(%rsp), %eax
movl %eax, (%r12)
testq %r15, %r15
je 0x2865b
movl 0x8(%rsp), %eax
movl %eax, (%r15)
testq %r14, %r14
je 0x28667
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movl $0x1, %r14d
testq %rbx, %rbx
je 0x2869e
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
jmp 0x2869e
xorl %r14d, %r14d
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
jmp 0x28697
leaq 0x5b8d1(%rip), %rsi # 0x83f60
xorl %r14d, %r14d
movl $0x10008, %edi # imm = 0x10008
xorl %eax, %eax
callq 0x19081
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3af4a(%rip), %rdi # 0x635fe
leaq 0x5b77f(%rip), %rsi # 0x83e3a
leaq 0x5b855(%rip), %rcx # 0x83f17
movl $0x12b, %edx # imm = 0x12B
callq 0xc540
| glfwGetOSMesaColorBuffer:
push r15
push r14
push r12
push rbx
sub rsp, 18h
test rdi, rdi
jz loc_286AD
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_2867C
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rdi, [rdi+2A0h]
lea rsi, [rsp+38h+var_2C]
lea rdx, [rsp+38h+var_30]
lea rcx, [rsp+38h+var_34]
lea r8, [rsp+38h+var_28]
call qword ptr [rax+20978h]
test eax, eax
jz short loc_28688
test r12, r12
jz short loc_2864F
mov eax, [rsp+38h+var_2C]
mov [r12], eax
loc_2864F:
test r15, r15
jz short loc_2865B
mov eax, [rsp+38h+var_30]
mov [r15], eax
loc_2865B:
test r14, r14
jz short loc_28667
mov eax, [rsp+38h+var_34]
mov [r14], eax
loc_28667:
mov r14d, 1
test rbx, rbx
jz short loc_2869E
mov rax, [rsp+38h+var_28]
mov [rbx], rax
jmp short loc_2869E
loc_2867C:
xor r14d, r14d
mov edi, 10001h
xor esi, esi
jmp short loc_28697
loc_28688:
lea rsi, aOsmesaFailedTo_2; "OSMesa: Failed to retrieve color buffer"
xor r14d, r14d
mov edi, offset loc_10008
loc_28697:
xor eax, eax
call _glfwInputError
loc_2869E:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_286AD:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntGlfwgetosme; "int glfwGetOSMesaColorBuffer(GLFWwindow"...
mov edx, 12Bh
call ___assert_fail
| long long glfwGetOSMesaColorBuffer(long long a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _QWORD *a5)
{
unsigned int v8; // r14d
int v10; // [rsp+4h] [rbp-34h] BYREF
int v11; // [rsp+8h] [rbp-30h] BYREF
int v12; // [rsp+Ch] [rbp-2Ch] BYREF
_QWORD v13[5]; // [rsp+10h] [rbp-28h] BYREF
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c",
299LL,
"int glfwGetOSMesaColorBuffer(GLFWwindow *, int *, int *, int *, void **)");
if ( glfw[0] )
{
if ( (*(unsigned int ( **)(_QWORD, int *, int *, int *, _QWORD *))&glfw[33374])(
*(_QWORD *)(a1 + 672),
&v12,
&v11,
&v10,
v13) )
{
if ( a2 )
*a2 = v12;
if ( a3 )
*a3 = v11;
if ( a4 )
*a4 = v10;
v8 = 1;
if ( a5 )
*a5 = v13[0];
}
else
{
v8 = 0;
glfwInputError((unsigned int)&loc_10008, (long long)"OSMesa: Failed to retrieve color buffer");
}
}
else
{
v8 = 0;
glfwInputError(0x10001u, 0LL);
}
return v8;
}
| glfwGetOSMesaColorBuffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST RDI,RDI
JZ 0x001286ad
LEA RAX,[0x1a4638]
CMP dword ptr [RAX],0x0
JZ 0x0012867c
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RDI,qword ptr [RDI + 0x2a0]
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
LEA RCX,[RSP + 0x4]
LEA R8,[RSP + 0x10]
CALL qword ptr [RAX + 0x20978]
TEST EAX,EAX
JZ 0x00128688
TEST R12,R12
JZ 0x0012864f
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
LAB_0012864f:
TEST R15,R15
JZ 0x0012865b
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [R15],EAX
LAB_0012865b:
TEST R14,R14
JZ 0x00128667
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R14],EAX
LAB_00128667:
MOV R14D,0x1
TEST RBX,RBX
JZ 0x0012869e
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX],RAX
JMP 0x0012869e
LAB_0012867c:
XOR R14D,R14D
MOV EDI,0x10001
XOR ESI,ESI
JMP 0x00128697
LAB_00128688:
LEA RSI,[0x183f60]
XOR R14D,R14D
MOV EDI,0x10008
LAB_00128697:
XOR EAX,EAX
CALL 0x00119081
LAB_0012869e:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001286ad:
LEA RDI,[0x1635fe]
LEA RSI,[0x183e3a]
LEA RCX,[0x183f17]
MOV EDX,0x12b
CALL 0x0010c540
|
int8
glfwGetOSMesaColorBuffer
(long param_1,int4 *param_2,int4 *param_3,int4 *param_4,
int8 *param_5)
{
int iVar1;
char *pcVar2;
int8 uVar3;
int4 local_34;
int4 local_30;
int4 local_2c;
int8 local_28;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c"
,299,"int glfwGetOSMesaColorBuffer(GLFWwindow *, int *, int *, int *, void **)");
}
if (_glfw == 0) {
uVar3 = 0x10001;
pcVar2 = (char *)0x0;
}
else {
iVar1 = (*DAT_001c4fb0)(*(int8 *)(param_1 + 0x2a0),&local_2c,&local_30,&local_34,&local_28
);
if (iVar1 != 0) {
if (param_2 != (int4 *)0x0) {
*param_2 = local_2c;
}
if (param_3 != (int4 *)0x0) {
*param_3 = local_30;
}
if (param_4 != (int4 *)0x0) {
*param_4 = local_34;
}
if (param_5 == (int8 *)0x0) {
return 1;
}
*param_5 = local_28;
return 1;
}
pcVar2 = "OSMesa: Failed to retrieve color buffer";
uVar3 = 0x10008;
}
_glfwInputError(uVar3,pcVar2);
return 0;
}
|
|
1,452 | my_multi_malloc | eloqsql/mysys/mulalloc.c | void* my_multi_malloc(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
size_t tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,uint);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, tot_length,myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,uint);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O0 | c | my_multi_malloc:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0xecbb1
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0xecc3b
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0xecc58
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xeccf2
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0xeccab
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0xeccc8
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xecc00
leaq -0x30(%rbp), %rax
movl -0xc(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf3830
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0xecd1f
jmp 0xecd12
movq $0x0, -0x8(%rbp)
jmp 0xece54
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0xecd86
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0xecda3
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xece48
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0xece01
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0xece1e
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xecd4b
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_multi_malloc:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_ECBB1
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_ECBB1:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov [rbp+var_50], 0
loc_ECC00:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_ECC3B
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_ECC58
loc_ECC3B:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_ECC58:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_ECCF2
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_ECCAB
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_ECCC8
loc_ECCAB:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_ECCC8:
mov rax, [rbp+var_140]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_ECC00
loc_ECCF2:
lea rax, [rbp+var_30]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_18]
call my_malloc
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_ECD1F
jmp short $+2
loc_ECD12:
mov [rbp+var_8], 0
jmp loc_ECE54
loc_ECD1F:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_ECD4B:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_ECD86
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_ECDA3
loc_ECD86:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_ECDA3:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_ECE48
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_ECE01
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_ECE1E
loc_ECE01:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_ECE1E:
mov rax, [rbp+var_170]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_ECD4B
loc_ECE48:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_ECE54:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
| long long my_multi_malloc(unsigned int a1, long long a2, ...)
{
_QWORD *overflow_arg_area; // rax
unsigned int *v3; // rax
_QWORD *v4; // rax
unsigned int *v5; // rax
long long i; // [rsp+120h] [rbp-50h]
long long j; // [rsp+128h] [rbp-48h]
long long v9; // [rsp+130h] [rbp-40h]
va_list va; // [rsp+140h] [rbp-30h] BYREF
long long v11; // [rsp+158h] [rbp-18h]
unsigned int v12; // [rsp+164h] [rbp-Ch]
va_start(va, a2);
v12 = a1;
v11 = a2;
for ( i = 0LL; ; i += (*v3 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*overflow_arg_area )
break;
if ( va[0].gp_offset > 0x28 )
{
v3 = (unsigned int *)va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v3 = (unsigned int *)((char *)va[0].reg_save_area + (int)va[0].gp_offset);
va[0].gp_offset += 8;
}
}
v9 = my_malloc(v12, i, v11);
if ( !v9 )
return 0LL;
va_end(va);
va_start(va, a2);
for ( j = v9; ; j += (*v5 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
v4 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*v4 )
break;
*(_QWORD *)*v4 = j;
if ( va[0].gp_offset > 0x28 )
{
v5 = (unsigned int *)va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v5 = (unsigned int *)((char *)va[0].reg_save_area + (int)va[0].gp_offset);
va[0].gp_offset += 8;
}
}
return v9;
}
| my_multi_malloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x001ecbb1
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_001ecbb1:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV qword ptr [RBP + -0x50],0x0
LAB_001ecc00:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x001ecc3b
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x001ecc58
LAB_001ecc3b:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_001ecc58:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001eccf2
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x001eccab
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x001eccc8
LAB_001eccab:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_001eccc8:
MOV RAX,qword ptr [RBP + -0x140]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001ecc00
LAB_001eccf2:
LEA RAX,[RBP + -0x30]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001f3830
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x001ecd1f
JMP 0x001ecd12
LAB_001ecd12:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001ece54
LAB_001ecd1f:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_001ecd4b:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x001ecd86
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x001ecda3
LAB_001ecd86:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_001ecda3:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001ece48
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x001ece01
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x001ece1e
LAB_001ece01:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_001ece1e:
MOV RAX,qword ptr [RBP + -0x170]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001ecd4b
LAB_001ece48:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001ece54:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long my_multi_malloc(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint *local_178;
uint *local_160;
uint *local_148;
uint *local_130;
uint local_118 [4];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
ulong local_60;
long local_58;
long local_50;
long local_40;
uint local_38;
int4 local_34;
uint *local_30;
uint *local_28;
int8 local_20;
int4 local_14;
long local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (uint *)&stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 2;
}
local_40 = *(long *)local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 2;
}
local_60 = (ulong)*local_148;
local_58 = (local_60 + 7 & 0xfffffffffffffff8) + local_58;
}
local_108 = param_11;
local_100 = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_20 = param_10;
local_14 = param_9;
local_10 = my_malloc(param_9,local_58,param_10);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_30 = (uint *)&stack0x00000008;
local_38 = 0x10;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 2;
}
if (*(long **)local_160 == (long *)0x0) break;
**(long **)local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 2;
}
local_50 = ((ulong)*local_178 + 7 & 0xfffffffffffffff8) + local_50;
}
}
return local_10;
}
|
|
1,453 | my_multi_malloc | eloqsql/mysys/mulalloc.c | void* my_multi_malloc(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
size_t tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,uint);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, tot_length,myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,uint);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O3 | c | my_multi_malloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r10
movq %rsi, %rdx
leaq -0xe0(%rbp), %r14
movq %r10, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x9c8be
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)
movabsq $0x1fffffff8, %rbx # imm = 0x1FFFFFFF8
movq %r14, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movabsq $0x3000000010, %r15 # imm = 0x3000000010
movq %r15, -0x30(%rbp)
movl $0x10, %eax
xorl %esi, %esi
cmpl $0x28, %eax
ja 0x9c8fe
movq %rcx, %r8
movl %eax, %ecx
addq %r14, %rcx
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x9c906
leaq 0x8(%rcx), %r8
movq %r8, -0x28(%rbp)
cmpq $0x0, (%rcx)
je 0x9c939
cmpl $0x28, %eax
ja 0x9c922
movq %r8, %rcx
movl %eax, %r8d
addq %r14, %r8
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x9c92a
leaq 0x8(%r8), %rcx
movq %rcx, -0x28(%rbp)
movl (%r8), %r8d
addq $0x7, %r8
andq %rbx, %r8
addq %r8, %rsi
jmp 0x9c8e9
callq 0x9fd89
testq %rax, %rax
je 0x9c9b7
movq %r14, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %r15, -0x30(%rbp)
movl $0x10, %edx
movq %rax, %rcx
cmpl $0x28, %edx
ja 0x9c96e
movl %edx, %esi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x9c97a
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdx
movq %rdx, -0x28(%rbp)
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x9c9b7
movq %rcx, (%rdx)
movl -0x30(%rbp), %edx
cmpq $0x28, %rdx
ja 0x9c99d
movq %rdx, %rsi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x9c9a9
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdi
movq %rdi, -0x28(%rbp)
movl (%rsi), %esi
addq $0x7, %rsi
andq %rbx, %rsi
addq %rsi, %rcx
jmp 0x9c95b
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_multi_malloc:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov r10, rdx
mov rdx, rsi
lea r14, [rbp+var_E0]
mov [r14+10h], r10
mov [r14+18h], rcx
mov [r14+20h], r8
mov [r14+28h], r9
test al, al
jz short loc_9C8BE
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_9C8BE:
mov rbx, 1FFFFFFF8h
mov [rbp+var_20], r14
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov r15, 3000000010h
mov [rbp+var_30], r15
mov eax, 10h
xor esi, esi
loc_9C8E9:
cmp eax, 28h ; '('
ja short loc_9C8FE
mov r8, rcx
mov ecx, eax
add rcx, r14
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_9C906
loc_9C8FE:
lea r8, [rcx+8]
mov [rbp+var_28], r8
loc_9C906:
cmp qword ptr [rcx], 0
jz short loc_9C939
cmp eax, 28h ; '('
ja short loc_9C922
mov rcx, r8
mov r8d, eax
add r8, r14
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_9C92A
loc_9C922:
lea rcx, [r8+8]
mov [rbp+var_28], rcx
loc_9C92A:
mov r8d, [r8]
add r8, 7
and r8, rbx
add rsi, r8
jmp short loc_9C8E9
loc_9C939:
call my_malloc
test rax, rax
jz short loc_9C9B7
mov [rbp+var_20], r14
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov [rbp+var_30], r15
mov edx, 10h
mov rcx, rax
loc_9C95B:
cmp edx, 28h ; '('
ja short loc_9C96E
mov esi, edx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_9C97A
loc_9C96E:
mov rsi, [rbp+var_28]
lea rdx, [rsi+8]
mov [rbp+var_28], rdx
loc_9C97A:
mov rdx, [rsi]
test rdx, rdx
jz short loc_9C9B7
mov [rdx], rcx
mov edx, dword ptr [rbp+var_30]
cmp rdx, 28h ; '('
ja short loc_9C99D
mov rsi, rdx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_9C9A9
loc_9C99D:
mov rsi, [rbp+var_28]
lea rdi, [rsi+8]
mov [rbp+var_28], rdi
loc_9C9A9:
mov esi, [rsi]
add rsi, 7
and rsi, rbx
add rcx, rsi
jmp short loc_9C95B
loc_9C9B7:
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_multi_malloc(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
unsigned int *v17; // rcx
unsigned int v18; // eax
long long i; // rsi
unsigned int *v20; // r8
long long result; // rax
unsigned int v22; // edx
long long j; // rcx
char *v24; // rsi
char *v25; // rsi
_BYTE v26[16]; // [rsp+0h] [rbp-E0h] BYREF
long long v27; // [rsp+10h] [rbp-D0h]
long long v28; // [rsp+18h] [rbp-C8h]
long long v29; // [rsp+20h] [rbp-C0h]
long long v30; // [rsp+28h] [rbp-B8h]
__m128 v31; // [rsp+30h] [rbp-B0h]
__m128 v32; // [rsp+40h] [rbp-A0h]
__m128 v33; // [rsp+50h] [rbp-90h]
__m128 v34; // [rsp+60h] [rbp-80h]
__m128 v35; // [rsp+70h] [rbp-70h]
__m128 v36; // [rsp+80h] [rbp-60h]
__m128 v37; // [rsp+90h] [rbp-50h]
__m128 v38; // [rsp+A0h] [rbp-40h]
long long v39; // [rsp+B0h] [rbp-30h]
char *v40; // [rsp+B8h] [rbp-28h]
_BYTE *v41; // [rsp+C0h] [rbp-20h]
v31 = a7;
v32 = a8;
v33 = a9;
v34 = a10;
v35 = a11;
v36 = a12;
v37 = a13;
v38 = a14;
v27 = a3;
v28 = a4;
v29 = a5;
v30 = a6;
v41 = v26;
v17 = (unsigned int *)&a15;
v40 = &a15;
v39 = 0x3000000010LL;
v18 = 16;
for ( i = 0LL; ; i += (*v20 + 7LL) & 0x1FFFFFFF8LL )
{
if ( v18 > 0x28 )
{
v20 = v17 + 2;
v40 = (char *)(v17 + 2);
}
else
{
v20 = v17;
v17 = (unsigned int *)&v26[v18];
v18 += 8;
LODWORD(v39) = v18;
}
if ( !*(_QWORD *)v17 )
break;
if ( v18 > 0x28 )
{
v17 = v20 + 2;
v40 = (char *)(v20 + 2);
}
else
{
v17 = v20;
v20 = (unsigned int *)&v26[v18];
v18 += 8;
LODWORD(v39) = v18;
}
}
result = my_malloc(a1, i, a2);
if ( result )
{
v41 = v26;
v40 = &a15;
v39 = 0x3000000010LL;
v22 = 16;
for ( j = result; ; j += (*(unsigned int *)v25 + 7LL) & 0x1FFFFFFF8LL )
{
if ( v22 > 0x28 )
{
v24 = v40;
v40 += 8;
}
else
{
v24 = &v41[v22];
LODWORD(v39) = v22 + 8;
}
if ( !*(_QWORD *)v24 )
break;
**(_QWORD **)v24 = j;
v22 = v39;
if ( (unsigned int)v39 > 0x28uLL )
{
v25 = v40;
v40 += 8;
}
else
{
v25 = &v41[(unsigned int)v39];
v22 = v39 + 8;
LODWORD(v39) = v39 + 8;
}
}
}
return result;
}
| my_multi_malloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV R10,RDX
MOV RDX,RSI
LEA R14,[RBP + -0xe0]
MOV qword ptr [R14 + 0x10],R10
MOV qword ptr [R14 + 0x18],RCX
MOV qword ptr [R14 + 0x20],R8
MOV qword ptr [R14 + 0x28],R9
TEST AL,AL
JZ 0x0019c8be
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_0019c8be:
MOV RBX,0x1fffffff8
MOV qword ptr [RBP + -0x20],R14
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV R15,0x3000000010
MOV qword ptr [RBP + -0x30],R15
MOV EAX,0x10
XOR ESI,ESI
LAB_0019c8e9:
CMP EAX,0x28
JA 0x0019c8fe
MOV R8,RCX
MOV ECX,EAX
ADD RCX,R14
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0019c906
LAB_0019c8fe:
LEA R8,[RCX + 0x8]
MOV qword ptr [RBP + -0x28],R8
LAB_0019c906:
CMP qword ptr [RCX],0x0
JZ 0x0019c939
CMP EAX,0x28
JA 0x0019c922
MOV RCX,R8
MOV R8D,EAX
ADD R8,R14
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0019c92a
LAB_0019c922:
LEA RCX,[R8 + 0x8]
MOV qword ptr [RBP + -0x28],RCX
LAB_0019c92a:
MOV R8D,dword ptr [R8]
ADD R8,0x7
AND R8,RBX
ADD RSI,R8
JMP 0x0019c8e9
LAB_0019c939:
CALL 0x0019fd89
TEST RAX,RAX
JZ 0x0019c9b7
MOV qword ptr [RBP + -0x20],R14
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R15
MOV EDX,0x10
MOV RCX,RAX
LAB_0019c95b:
CMP EDX,0x28
JA 0x0019c96e
MOV ESI,EDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x0019c97a
LAB_0019c96e:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDX
LAB_0019c97a:
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0019c9b7
MOV qword ptr [RDX],RCX
MOV EDX,dword ptr [RBP + -0x30]
CMP RDX,0x28
JA 0x0019c99d
MOV RSI,RDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x0019c9a9
LAB_0019c99d:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDI
LAB_0019c9a9:
MOV ESI,dword ptr [RSI]
ADD RSI,0x7
AND RSI,RBX
ADD RCX,RSI
JMP 0x0019c95b
LAB_0019c9b7:
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_multi_malloc(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
uint *puVar2;
ulong uVar3;
long lVar4;
uint *puVar5;
uint *puVar6;
uint local_e8 [4];
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;
uint local_38;
int4 uStack_34;
uint *local_30;
uint *local_28;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
puVar5 = (uint *)&stack0x00000008;
local_30 = puVar5;
local_38 = 0x10;
uStack_34 = 0x30;
uVar1 = 0x10;
lVar4 = 0;
while( true ) {
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
puVar2 = (uint *)((long)local_e8 + uVar3);
puVar6 = puVar5;
}
else {
puVar6 = puVar5 + 2;
local_30 = puVar6;
puVar2 = puVar5;
}
if (*(long *)puVar2 == 0) break;
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
puVar5 = puVar6;
puVar6 = (uint *)((long)local_e8 + uVar3);
}
else {
puVar5 = puVar6 + 2;
local_30 = puVar5;
}
lVar4 = lVar4 + ((ulong)*puVar6 + 7 & 0x1fffffff8);
}
lVar4 = my_malloc(param_9,lVar4,param_10);
if (lVar4 != 0) {
local_30 = (uint *)&stack0x00000008;
uVar1 = 0x10;
uVar3 = 0x10;
while( true ) {
if ((uint)uVar3 < 0x29) {
uVar1 = (uint)uVar3 + 8;
puVar5 = (uint *)((long)local_e8 + uVar3);
}
else {
puVar5 = local_30;
local_30 = local_30 + 2;
}
if (*(long **)puVar5 == (long *)0x0) break;
**(long **)puVar5 = lVar4;
uVar3 = (ulong)uVar1;
if (uVar3 < 0x29) {
puVar5 = (uint *)((long)local_e8 + uVar3);
uVar1 = uVar1 + 8;
uVar3 = (ulong)uVar1;
}
else {
puVar5 = local_30;
local_30 = local_30 + 2;
}
lVar4 = lVar4 + ((ulong)*puVar5 + 7 & 0x1fffffff8);
}
}
return;
}
|
|
1,454 | int fmt::v10::detail::parse_nonnegative_int<char>(char const*&, char const*, int) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h | FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end,
int error_value) noexcept -> int {
FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', "");
unsigned value = 0, prev = 0;
auto p = begin;
do {
prev = value;
value = value * 10 + unsigned(*p - '0');
++p;
} while (p != end && '0' <= *p && *p <= '9');
auto num_digits = p - begin;
begin = p;
if (num_digits <= std::numeric_limits<int>::digits10)
return static_cast<int>(value);
// Check for overflow.
const unsigned max = to_unsigned((std::numeric_limits<int>::max)());
return num_digits == std::numeric_limits<int>::digits10 + 1 &&
prev * 10ull + unsigned(p[-1] - '0') <= max
? static_cast<int>(value)
: error_value;
} | O3 | c | int fmt::v10::detail::parse_nonnegative_int<char>(char const*&, char const*, int):
pushq %rbx
movq (%rdi), %rcx
movb (%rcx), %r10b
leaq 0x1(%rcx), %r11
xorl %eax, %eax
movl %eax, %r9d
movq %r11, %r8
leal (%r9,%r9,4), %eax
movsbl %r10b, %r10d
leal (%r10,%rax,2), %eax
addl $-0x30, %eax
cmpq %rsi, %r11
je 0x3f0a8
movb (%r8), %r10b
leal -0x30(%r10), %ebx
leaq 0x1(%r8), %r11
cmpb $0xa, %bl
jb 0x3f078
decq %r11
movq %r11, %rsi
movq %rsi, (%rdi)
subq %rcx, %rsi
cmpq $0xa, %rsi
jl 0x3f0d7
jne 0x3f0d5
movl %r9d, %ecx
leaq (%rcx,%rcx,4), %rcx
movsbl -0x1(%r8), %esi
addl $-0x30, %esi
andl $-0x2, %esi
leaq (%rsi,%rcx,2), %rcx
andq $-0x80000000, %rcx # imm = 0x80000000
je 0x3f0d7
movl %edx, %eax
popq %rbx
retq
nop
| _ZN3fmt3v106detail21parse_nonnegative_intIcEEiRPKT_S5_i:
push rbx
mov rcx, [rdi]
mov r10b, [rcx]
lea r11, [rcx+1]
xor eax, eax
loc_3F078:
mov r9d, eax
mov r8, r11
lea eax, [r9+r9*4]
movsx r10d, r10b
lea eax, [r10+rax*2]
add eax, 0FFFFFFD0h
cmp r11, rsi
jz short loc_3F0A8
mov r10b, [r8]
lea ebx, [r10-30h]
lea r11, [r8+1]
cmp bl, 0Ah
jb short loc_3F078
dec r11
mov rsi, r11
loc_3F0A8:
mov [rdi], rsi
sub rsi, rcx
cmp rsi, 0Ah
jl short loc_3F0D7
jnz short loc_3F0D5
mov ecx, r9d
lea rcx, [rcx+rcx*4]
movsx esi, byte ptr [r8-1]
add esi, 0FFFFFFD0h
and esi, 0FFFFFFFEh
lea rcx, [rsi+rcx*2]
and rcx, 0FFFFFFFF80000000h
jz short loc_3F0D7
loc_3F0D5:
mov eax, edx
loc_3F0D7:
pop rbx
retn
| long long fmt::v10::detail::parse_nonnegative_int<char>(char **a1, char *a2, unsigned int a3)
{
char *v3; // rcx
char v4; // r10
char *v5; // r11
long long result; // rax
unsigned int v7; // r9d
char *v8; // r8
long long v9; // rsi
v3 = *a1;
v4 = **a1;
v5 = *a1 + 1;
LODWORD(result) = 0;
while ( 1 )
{
v7 = result;
v8 = v5;
result = (unsigned int)(v4 + 10 * result - 48);
if ( v5 == a2 )
break;
v4 = *v5++;
if ( (unsigned __int8)(*v8 - 48) >= 0xAu )
{
a2 = v8;
break;
}
}
*a1 = a2;
v9 = a2 - v3;
if ( v9 >= 10 && (v9 != 10 || ((((*(v8 - 1) - 48) & 0xFFFFFFFE) + 10LL * v7) & 0xFFFFFFFF80000000LL) != 0) )
return a3;
return result;
}
| parse_nonnegative_int<char>:
PUSH RBX
MOV RCX,qword ptr [RDI]
MOV R10B,byte ptr [RCX]
LEA R11,[RCX + 0x1]
XOR EAX,EAX
LAB_0013f078:
MOV R9D,EAX
MOV R8,R11
LEA EAX,[R9 + R9*0x4]
MOVSX R10D,R10B
LEA EAX,[R10 + RAX*0x2]
ADD EAX,-0x30
CMP R11,RSI
JZ 0x0013f0a8
MOV R10B,byte ptr [R8]
LEA EBX,[R10 + -0x30]
LEA R11,[R8 + 0x1]
CMP BL,0xa
JC 0x0013f078
DEC R11
MOV RSI,R11
LAB_0013f0a8:
MOV qword ptr [RDI],RSI
SUB RSI,RCX
CMP RSI,0xa
JL 0x0013f0d7
JNZ 0x0013f0d5
MOV ECX,R9D
LEA RCX,[RCX + RCX*0x4]
MOVSX ESI,byte ptr [R8 + -0x1]
ADD ESI,-0x30
AND ESI,0xfffffffe
LEA RCX,[RSI + RCX*0x2]
AND RCX,-0x80000000
JZ 0x0013f0d7
LAB_0013f0d5:
MOV EAX,EDX
LAB_0013f0d7:
POP RBX
RET
|
/* int fmt::v10::detail::parse_nonnegative_int<char>(char const*&, char const*, int) */
int fmt::v10::detail::parse_nonnegative_int<char>(char **param_1,char *param_2,int param_3)
{
char *pcVar1;
char *pcVar2;
uint uVar3;
char *pcVar4;
ulong uVar5;
char cVar6;
char *pcVar7;
pcVar1 = *param_1;
cVar6 = *pcVar1;
uVar3 = 0;
pcVar7 = pcVar1;
do {
pcVar2 = pcVar7;
pcVar7 = pcVar2 + 1;
uVar5 = (ulong)uVar3;
uVar3 = ((int)cVar6 + uVar3 * 10) - 0x30;
pcVar4 = param_2;
if (pcVar7 == param_2) break;
cVar6 = *pcVar7;
pcVar4 = pcVar7;
} while ((byte)(cVar6 - 0x30U) < 10);
*param_1 = pcVar4;
if ((9 < (long)pcVar4 - (long)pcVar1) &&
(((long)pcVar4 - (long)pcVar1 != 10 ||
(((ulong)((int)*pcVar2 - 0x30U & 0xfffffffe) + uVar5 * 10 & 0xffffffff80000000) != 0)))) {
uVar3 = param_3;
}
return uVar3;
}
|
|
1,455 | parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) {
// Discard potential 0x prefix
size_t start_i = 0;
if (mask.length() >= 2 && mask.substr(0, 2) == "0x") {
start_i = 2;
}
size_t num_digits = mask.length() - start_i;
if (num_digits > 128) num_digits = 128;
size_t end_i = num_digits + start_i;
for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) {
char c = mask.at(i);
int8_t id = c;
if ((c >= '0' && c <= '9')) {
id -= '0';
} else if (c >= 'a' && c <= 'f') {
id -= 'a' - 10;
} else if (c >= 'A' && c <= 'F') {
id -= 'A' - 10;
} else {
LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i));
return false;
}
boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0);
boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0);
boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0);
boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0);
}
return true;
} | O3 | cpp | parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdx
cmpq $0x2, %rdx
jb 0x95584
leaq 0x8(%rsp), %rbx
movl $0x2, %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1dcc0
leaq 0x814b0(%rip), %rsi # 0x116a01
movq %rbx, %rdi
callq 0x1d2a0
movl %eax, %ebp
movq (%rbx), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x95575
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
xorl %ebx, %ebx
testl %ebp, %ebp
sete %bl
addl %ebx, %ebx
movq 0x8(%r15), %rdx
jmp 0x95586
xorl %ebx, %ebx
movq %rdx, %rax
subq %rbx, %rax
movl $0x80, %ecx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movb $0x1, %bpl
cmpq %rbx, %rdx
je 0x9563c
movq (%r15), %rcx
leaq (%r14,%rax,4), %rsi
addq $-0x4, %rsi
addq %rbx, %rax
movdqa 0x7e906(%rip), %xmm0 # 0x113ec0
movdqa 0x7e90e(%rip), %xmm1 # 0x113ed0
cmpq %rbx, %rdx
jbe 0x9567e
movsbl (%rcx,%rbx), %r14d
leal -0x30(%r14), %edi
cmpb $0xa, %dil
jb 0x955fb
leal -0x61(%r14), %edi
cmpb $0x5, %dil
ja 0x955ea
addb $-0x57, %r14b
jmp 0x955f8
leal -0x41(%r14), %edi
cmpb $0x5, %dil
ja 0x95649
addb $-0x37, %r14b
movl %r14d, %edi
movzbl %dil, %edi
movd (%rsi), %xmm2
punpcklbw %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3]
movd %edi, %xmm3
pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0]
pand %xmm0, %xmm3
pcmpeqd %xmm0, %xmm3
por %xmm2, %xmm3
pand %xmm1, %xmm3
packuswb %xmm3, %xmm3
packuswb %xmm3, %xmm3
movd %xmm3, (%rsi)
incq %rbx
addq $-0x4, %rsi
cmpq %rax, %rbx
jb 0x955c2
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc2250(%rip), %rax # 0x1578a0
cmpl $0x0, (%rax)
js 0x9567a
callq 0xef47b
leaq 0x7eb7d(%rip), %rdx # 0x1141de
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
movl %r14d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0xef518
jmp 0x9563c
xorl %ebp, %ebp
jmp 0x9563c
leaq 0x81908(%rip), %rdi # 0x116f8d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1e2b0
| _Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov r15, rdi
mov rdx, [rdi+8]
cmp rdx, 2
jb short loc_95584
lea rbx, [rsp+48h+var_40]
mov ecx, 2
mov rdi, rbx
mov rsi, r15
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, aIncompleteUtf8+24h; "0x"
mov rdi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
mov ebp, eax
mov rdi, [rbx]; void *
lea rax, [rsp+48h+var_30]
cmp rdi, rax
jz short loc_95575
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95575:
xor ebx, ebx
test ebp, ebp
setz bl
add ebx, ebx
mov rdx, [r15+8]
jmp short loc_95586
loc_95584:
xor ebx, ebx
loc_95586:
mov rax, rdx
sub rax, rbx
mov ecx, 80h
cmp rax, rcx
cmovnb rax, rcx
mov bpl, 1
cmp rdx, rbx
jz loc_9563C
mov rcx, [r15]
lea rsi, [r14+rax*4]
add rsi, 0FFFFFFFFFFFFFFFCh
add rax, rbx
movdqa xmm0, cs:xmmword_113EC0
movdqa xmm1, cs:xmmword_113ED0
loc_955C2:
cmp rdx, rbx
jbe loc_9567E
movsx r14d, byte ptr [rcx+rbx]
lea edi, [r14-30h]
cmp dil, 0Ah
jb short loc_955FB
lea edi, [r14-61h]
cmp dil, 5
ja short loc_955EA
add r14b, 0A9h
jmp short loc_955F8
loc_955EA:
lea edi, [r14-41h]
cmp dil, 5
ja short loc_95649
add r14b, 0C9h
loc_955F8:
mov edi, r14d
loc_955FB:
movzx edi, dil
movd xmm2, dword ptr [rsi]
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
movd xmm3, edi
pshufd xmm3, xmm3, 0
pand xmm3, xmm0
pcmpeqd xmm3, xmm0
por xmm3, xmm2
pand xmm3, xmm1
packuswb xmm3, xmm3
packuswb xmm3, xmm3
movd dword ptr [rsi], xmm3
inc rbx
add rsi, 0FFFFFFFFFFFFFFFCh
cmp rbx, rax
jb short loc_955C2
loc_9563C:
mov eax, ebp
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_95649:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_9567A
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "...
xor ebp, ebp
mov rdi, rax
mov esi, 4
mov ecx, r14d
mov r8d, ebx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_9563C
loc_9567A:
xor ebp, ebp
jmp short loc_9563C
loc_9567E:
lea rdi, aBasicStringAtN; "basic_string::at: __n (which is %zu) >="...
mov rsi, rbx
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
| long long parse_cpu_mask(long long *a1, long long a2)
{
unsigned int v2; // ebp
unsigned long long v3; // rdx
unsigned long long v4; // rbx
long long v5; // rax
long long v6; // rcx
unsigned int *v7; // rsi
unsigned long long v8; // rax
__m128i si128; // xmm0
__m128i v10; // xmm1
int v11; // r14d
unsigned __int8 v12; // di
unsigned __int8 v13; // r14
__m128i v14; // xmm2
__m128i v15; // xmm2
__m128i v16; // xmm3
__m128i v17; // xmm3
int v19; // eax
int v20; // r9d
void *v21[2]; // [rsp+8h] [rbp-40h] BYREF
long long v22; // [rsp+18h] [rbp-30h] BYREF
v3 = a1[1];
if ( v3 < 2 )
{
v4 = 0LL;
}
else
{
std::string::substr(v21, a1, 0LL, 2LL);
v2 = std::string::compare(v21, "0x");
if ( v21[0] != &v22 )
operator delete(v21[0], v22 + 1);
v4 = 2 * (unsigned int)(v2 == 0);
v3 = a1[1];
}
v5 = v3 - v4;
if ( v3 - v4 >= 0x80 )
v5 = 128LL;
LOBYTE(v2) = 1;
if ( v3 != v4 )
{
v6 = *a1;
v7 = (unsigned int *)(a2 + 4 * v5 - 4);
v8 = v4 + v5;
si128 = _mm_load_si128((const __m128i *)&xmmword_113EC0);
v10 = _mm_load_si128((const __m128i *)&xmmword_113ED0);
do
{
if ( v3 <= v4 )
std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", v4, v3);
v11 = *(char *)(v6 + v4);
v12 = *(_BYTE *)(v6 + v4) - 48;
if ( v12 >= 0xAu )
{
if ( (unsigned __int8)(v11 - 97) > 5u )
{
if ( (unsigned __int8)(v11 - 65) > 5u )
{
if ( common_log_verbosity_thold < 0 )
{
return 0;
}
else
{
v19 = common_log_main();
v2 = 0;
common_log_add(v19, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v11, v4, v20);
}
return v2;
}
v13 = v11 - 55;
}
else
{
v13 = v11 - 87;
}
v12 = v13;
}
v14 = _mm_cvtsi32_si128(*v7);
v15 = _mm_unpacklo_epi8(v14, v14);
v16 = _mm_and_si128(
_mm_or_si128(
_mm_cmpeq_epi32(_mm_and_si128(_mm_shuffle_epi32(_mm_cvtsi32_si128(v12), 0), si128), si128),
_mm_unpacklo_epi16(v15, v15)),
v10);
v17 = _mm_packus_epi16(v16, v16);
*v7 = _mm_cvtsi128_si32(_mm_packus_epi16(v17, v17));
++v4;
--v7;
}
while ( v4 < v8 );
}
return v2;
}
| parse_cpu_mask:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV R15,RDI
MOV RDX,qword ptr [RDI + 0x8]
CMP RDX,0x2
JC 0x00195584
LEA RBX,[RSP + 0x8]
MOV ECX,0x2
MOV RDI,RBX
MOV RSI,R15
XOR EDX,EDX
CALL 0x0011dcc0
LEA RSI,[0x216a01]
MOV RDI,RBX
CALL 0x0011d2a0
MOV EBP,EAX
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00195575
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc50
LAB_00195575:
XOR EBX,EBX
TEST EBP,EBP
SETZ BL
ADD EBX,EBX
MOV RDX,qword ptr [R15 + 0x8]
JMP 0x00195586
LAB_00195584:
XOR EBX,EBX
LAB_00195586:
MOV RAX,RDX
SUB RAX,RBX
MOV ECX,0x80
CMP RAX,RCX
CMOVNC RAX,RCX
MOV BPL,0x1
CMP RDX,RBX
JZ 0x0019563c
MOV RCX,qword ptr [R15]
LEA RSI,[R14 + RAX*0x4]
ADD RSI,-0x4
ADD RAX,RBX
MOVDQA XMM0,xmmword ptr [0x00213ec0]
MOVDQA XMM1,xmmword ptr [0x00213ed0]
LAB_001955c2:
CMP RDX,RBX
JBE 0x0019567e
MOVSX R14D,byte ptr [RCX + RBX*0x1]
LEA EDI,[R14 + -0x30]
CMP DIL,0xa
JC 0x001955fb
LEA EDI,[R14 + -0x61]
CMP DIL,0x5
JA 0x001955ea
ADD R14B,0xa9
JMP 0x001955f8
LAB_001955ea:
LEA EDI,[R14 + -0x41]
CMP DIL,0x5
JA 0x00195649
ADD R14B,0xc9
LAB_001955f8:
MOV EDI,R14D
LAB_001955fb:
MOVZX EDI,DIL
MOVD XMM2,dword ptr [RSI]
PUNPCKLBW XMM2,XMM2
PUNPCKLWD XMM2,XMM2
MOVD XMM3,EDI
PSHUFD XMM3,XMM3,0x0
PAND XMM3,XMM0
PCMPEQD XMM3,XMM0
POR XMM3,XMM2
PAND XMM3,XMM1
PACKUSWB XMM3,XMM3
PACKUSWB XMM3,XMM3
MOVD dword ptr [RSI],XMM3
INC RBX
ADD RSI,-0x4
CMP RBX,RAX
JC 0x001955c2
LAB_0019563c:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00195649:
LEA RAX,[0x2578a0]
CMP dword ptr [RAX],0x0
JS 0x0019567a
CALL 0x001ef47b
LEA RDX,[0x2141de]
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
MOV ECX,R14D
MOV R8D,EBX
XOR EAX,EAX
CALL 0x001ef518
JMP 0x0019563c
LAB_0019567a:
XOR EBP,EBP
JMP 0x0019563c
LAB_0019567e:
LEA RDI,[0x216f8d]
MOV RSI,RBX
XOR EAX,EAX
CALL 0x0011e2b0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_mask(string *param_1,bool *param_2)
{
char cVar1;
long lVar2;
char cVar3;
short sVar6;
short sVar7;
short sVar8;
ulong uVar9;
int1 auVar10 [16];
int1 auVar11 [16];
uint uVar12;
ulong uVar13;
int8 uVar14;
ulong uVar15;
ulong uVar16;
ulong unaff_RBP;
ulong uVar17;
bool *pbVar18;
byte bVar19;
int1 uVar23;
int1 auVar20 [16];
short sVar25;
int1 auVar28 [16];
int1 auVar29 [16];
int1 auVar30 [16];
long *local_40 [2];
long local_30 [2];
char cVar4;
char cVar5;
int1 auVar21 [16];
int1 auVar22 [16];
int2 uVar24;
int4 uVar26;
int6 uVar27;
uVar15 = *(ulong *)(param_1 + 8);
if (uVar15 < 2) {
uVar16 = 0;
}
else {
std::__cxx11::string::substr((ulong)local_40,(ulong)param_1);
uVar12 = std::__cxx11::string::compare((char *)local_40);
unaff_RBP = (ulong)uVar12;
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
uVar16 = (ulong)((uint)(uVar12 == 0) * 2);
uVar15 = *(ulong *)(param_1 + 8);
}
auVar11 = _DAT_00213ed0;
auVar10 = _DAT_00213ec0;
uVar13 = uVar15 - uVar16;
if (0x7f < uVar13) {
uVar13 = 0x80;
}
uVar17 = CONCAT71((int7)(unaff_RBP >> 8),1);
if (uVar15 != uVar16) {
lVar2 = *(long *)param_1;
pbVar18 = param_2 + uVar13 * 4;
uVar13 = uVar13 + uVar16;
do {
pbVar18 = pbVar18 + -4;
if (uVar15 <= uVar16) {
uVar15 = std::__throw_out_of_range_fmt
("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",
uVar16);
llama_log_set(common_init()::$_0::__invoke,0);
if (-1 < common_log_verbosity_thold) {
uVar14 = common_log_main();
common_log_add(uVar14,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,
LLAMA_COMMIT,LLAMA_COMPILER,LLAMA_BUILD_TARGET,"");
}
return uVar15;
}
cVar1 = *(char *)(lVar2 + uVar16);
bVar19 = cVar1 - 0x30;
if (9 < bVar19) {
if ((byte)(cVar1 + 0x9fU) < 6) {
bVar19 = cVar1 + 0xa9;
}
else {
if (5 < (byte)(cVar1 + 0xbfU)) {
if (common_log_verbosity_thold < 0) {
uVar17 = 0;
}
else {
uVar14 = common_log_main();
uVar17 = 0;
common_log_add(uVar14,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar1,
uVar16 & 0xffffffff);
}
break;
}
bVar19 = cVar1 - 0x37;
}
}
uVar26 = *(int4 *)pbVar18;
uVar23 = (int1)((uint)uVar26 >> 0x18);
uVar24 = CONCAT11(uVar23,uVar23);
uVar23 = (int1)((uint)uVar26 >> 0x10);
uVar14 = CONCAT35(CONCAT21(uVar24,uVar23),CONCAT14(uVar23,uVar26));
uVar23 = (int1)((uint)uVar26 >> 8);
uVar27 = CONCAT51(CONCAT41((int)((ulong)uVar14 >> 0x20),uVar23),uVar23);
auVar30._0_2_ = CONCAT11((char)uVar26,(char)uVar26);
uVar9 = CONCAT62(uVar27,auVar30._0_2_);
auVar22._8_4_ = 0;
auVar22._0_8_ = uVar9;
auVar22._12_2_ = uVar24;
auVar22._14_2_ = uVar24;
uVar24 = (int2)((ulong)uVar14 >> 0x20);
auVar21._12_4_ = auVar22._12_4_;
auVar21._8_2_ = 0;
auVar21._0_8_ = uVar9;
auVar21._10_2_ = uVar24;
auVar20._10_6_ = auVar21._10_6_;
auVar20._8_2_ = uVar24;
auVar20._0_8_ = uVar9;
uVar24 = (int2)uVar27;
auVar30._8_8_ = auVar20._8_8_;
auVar30._6_2_ = uVar24;
auVar30._4_2_ = uVar24;
auVar30._2_2_ = auVar30._0_2_;
auVar28._1_3_ = 0;
auVar28[0] = bVar19;
auVar28[4] = bVar19;
auVar28._5_3_ = 0;
auVar28[8] = bVar19;
auVar28._9_3_ = 0;
auVar28[0xc] = bVar19;
auVar28._13_3_ = 0;
auVar28 = auVar28 & auVar10;
auVar29._0_4_ = -(uint)(auVar28._0_4_ == auVar10._0_4_);
auVar29._4_4_ = -(uint)(auVar28._4_4_ == auVar10._4_4_);
auVar29._8_4_ = -(uint)(auVar28._8_4_ == auVar10._8_4_);
auVar29._12_4_ = -(uint)(auVar28._12_4_ == auVar10._12_4_);
auVar30 = (auVar29 | auVar30) & auVar11;
sVar6 = auVar30._0_2_;
cVar1 = (0 < sVar6) * (sVar6 < 0x100) * auVar30[0] - (0xff < sVar6);
sVar6 = auVar30._2_2_;
sVar25 = CONCAT11((0 < sVar6) * (sVar6 < 0x100) * auVar30[2] - (0xff < sVar6),cVar1);
sVar6 = auVar30._4_2_;
cVar3 = (0 < sVar6) * (sVar6 < 0x100) * auVar30[4] - (0xff < sVar6);
sVar6 = auVar30._6_2_;
uVar26 = CONCAT13((0 < sVar6) * (sVar6 < 0x100) * auVar30[6] - (0xff < sVar6),
CONCAT12(cVar3,sVar25));
sVar6 = auVar30._8_2_;
cVar4 = (0 < sVar6) * (sVar6 < 0x100) * auVar30[8] - (0xff < sVar6);
sVar6 = auVar30._10_2_;
uVar27 = CONCAT15((0 < sVar6) * (sVar6 < 0x100) * auVar30[10] - (0xff < sVar6),
CONCAT14(cVar4,uVar26));
sVar6 = auVar30._12_2_;
cVar5 = (0 < sVar6) * (sVar6 < 0x100) * auVar30[0xc] - (0xff < sVar6);
sVar8 = auVar30._14_2_;
sVar6 = (short)((uint)uVar26 >> 0x10);
sVar7 = (short)((uint6)uVar27 >> 0x20);
sVar8 = (short)(CONCAT17((0 < sVar8) * (sVar8 < 0x100) * auVar30[0xe] - (0xff < sVar8),
CONCAT16(cVar5,uVar27)) >> 0x30);
*(uint *)pbVar18 =
CONCAT13((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8),
CONCAT12((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7),
CONCAT11((0 < sVar6) * (sVar6 < 0x100) * cVar3 - (0xff < sVar6),
(0 < sVar25) * (sVar25 < 0x100) * cVar1 - (0xff < sVar25))));
uVar16 = uVar16 + 1;
} while (uVar16 < uVar13);
}
return uVar17 & 0xffffffff;
}
|
|
1,456 | program_hash_get_key(unsigned char const*, unsigned long*, char) | eloqsql/storage/perfschema/pfs_program.cc | C_MODE_START
static uchar *program_hash_get_key(const uchar *entry, size_t *length,
my_bool)
{
const PFS_program * const *typed_entry;
const PFS_program *program;
const void *result;
typed_entry= reinterpret_cast<const PFS_program* const *> (entry);
assert(typed_entry != NULL);
program= *typed_entry;
assert(program != NULL);
*length= program->m_key.m_key_length;
result= program->m_key.m_hash_key;
return const_cast<uchar*> (reinterpret_cast<const uchar*> (result));
} | O0 | cpp | program_hash_get_key(unsigned char const*, unsigned long*, char):
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0xbc(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x34, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| _ZL20program_hash_get_keyPKhPmc:
push rbp
mov rbp, rsp
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov eax, [rax+0BCh]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_28]
add rax, 34h ; '4'
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
pop rbp
retn
| long long program_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2)
{
long long v3; // [rsp+8h] [rbp-28h]
v3 = *(_QWORD *)a1;
*a2 = *(unsigned int *)(*(_QWORD *)a1 + 188LL);
return v3 + 52;
}
| program_hash_get_key:
PUSH RBP
MOV RBP,RSP
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0xbc]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x34
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
POP RBP
RET
|
/* program_hash_get_key(unsigned char const*, unsigned long*, char) */
long program_hash_get_key(uchar *param_1,ulong *param_2,char param_3)
{
long lVar1;
lVar1 = *(long *)param_1;
*param_2 = (ulong)*(uint *)(lVar1 + 0xbc);
return lVar1 + 0x34;
}
|
|
1,457 | common_log::resume() | monkey531[P]llama/common/log.cpp | void resume() {
std::lock_guard<std::mutex> lock(mtx);
if (running) {
return;
}
running = true;
thrd = std::thread([this]() {
while (true) {
{
std::unique_lock<std::mutex> lock(mtx);
cv.wait(lock, [this]() { return head != tail; });
cur = entries[head];
head = (head + 1) % entries.size();
}
if (cur.is_end) {
break;
}
cur.print(); // stdout and stderr
if (file) {
cur.print(file);
}
}
});
} | O2 | cpp | common_log::resume():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x97562
cmpb $0x0, 0x6a(%rbx)
jne 0x96dc0
movb $0x1, 0x6a(%rbx)
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x97576
leaq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x975e2
movq %r14, %rdi
callq 0x97290
movq %rbx, %rdi
callq 0x236b0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23f20
nop
| _ZN10common_log6resumeEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 0
jnz short loc_96DC0
mov byte ptr [rbx+6Ah], 1
lea rsi, [rsp+28h+var_18]
mov [rsi], rbx
lea rdi, [rsp+28h+var_20]
call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_
lea rdi, [rbx+28h]
lea r14, [rsp+28h+var_20]
mov rsi, r14
call _ZNSt6threadaSEOS_; std::thread::operator=(std::thread&&)
mov rdi, r14; this
call _ZNSt6threadD2Ev; std::thread::~thread()
loc_96DC0:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 18h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long common_log::resume(common_log *this)
{
_BYTE v2[8]; // [rsp+8h] [rbp-20h] BYREF
common_log *v3; // [rsp+10h] [rbp-18h]
std::mutex::lock(this);
if ( !*((_BYTE *)this + 106) )
{
*((_BYTE *)this + 106) = 1;
v3 = this;
ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v2);
std::thread::operator=((char *)this + 40, v2);
std::thread::~thread((std::thread *)v2);
}
return pthread_mutex_unlock(this);
}
| resume:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x00197562
CMP byte ptr [RBX + 0x6a],0x0
JNZ 0x00196dc0
MOV byte ptr [RBX + 0x6a],0x1
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
LAB_00196d9d:
LEA RDI,[RSP + 0x8]
CALL 0x00197576
LAB_00196da7:
LEA RDI,[RBX + 0x28]
LEA R14,[RSP + 0x8]
MOV RSI,R14
CALL 0x001975e2
MOV RDI,R14
CALL 0x00197290
LAB_00196dc0:
MOV RDI,RBX
CALL 0x001236b0
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* common_log::resume() */
void __thiscall common_log::resume(common_log *this)
{
thread local_20 [8];
common_log *local_18;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x0) {
this[0x6a] = (common_log)0x1;
/* try { // try from 00196d9d to 00196da6 has its CatchHandler @ 00196dd0 */
local_18 = this;
std::thread::thread<common_log::resume()::_lambda()_1_,,void>
(local_20,(_lambda___1_ *)&local_18);
std::thread::operator=((thread *)(this + 0x28),local_20);
std::thread::~thread(local_20);
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
1,458 | get_simple_collation_handler_by_flags | eloqsql/mysys/charset.c | static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags)
{
return flags & MY_CS_BINSORT ?
(flags & MY_CS_NOPAD ?
&my_collation_8bit_nopad_bin_handler :
&my_collation_8bit_bin_handler) :
(flags & MY_CS_NOPAD ?
&my_collation_8bit_simple_nopad_ci_handler :
&my_collation_8bit_simple_ci_handler);
} | O0 | c | get_simple_collation_handler_by_flags:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x71d76
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1b8066(%rip), %rax # 0x229dc8
leaq 0x1b80cf(%rip), %rcx # 0x229e38
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x71d98
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x1bab82(%rip), %rax # 0x22c908
leaq 0x1babeb(%rip), %rcx # 0x22c978
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
| get_simple_collation_handler_by_flags:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 10h
cmp eax, 0
jz short loc_71D76
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_bin_handler
lea rcx, my_collation_8bit_nopad_bin_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
jmp short loc_71D98
loc_71D76:
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_simple_ci_handler
lea rcx, my_collation_8bit_simple_nopad_ci_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
loc_71D98:
mov rax, [rbp+var_10]
pop rbp
retn
| long long ( ** get_simple_collation_handler_by_flags(int a1))()
{
long long ( **v1)(); // rax
long long ( **v2)(); // rax
if ( (a1 & 0x10) != 0 )
{
v1 = my_collation_8bit_bin_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_nopad_bin_handler;
return v1;
}
else
{
v2 = my_collation_8bit_simple_ci_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_simple_nopad_ci_handler;
return v2;
}
}
| get_simple_collation_handler_by_flags:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00171d76
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x329dc8]
LEA RCX,[0x329e38]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00171d98
LAB_00171d76:
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x32c908]
LEA RCX,[0x32c978]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_00171d98:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int1 * get_simple_collation_handler_by_flags(uint param_1)
{
int1 *local_18;
if ((param_1 & 0x10) == 0) {
local_18 = my_collation_8bit_simple_ci_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_simple_nopad_ci_handler;
}
}
else {
local_18 = my_collation_8bit_bin_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_nopad_bin_handler;
}
}
return local_18;
}
|
|
1,459 | gguf_set_arr_data | ngxson[P]ggml-easy/ggml/src/gguf.cpp | void gguf_set_arr_data(struct gguf_context * ctx, const char * key, enum gguf_type type, const void * data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
const size_t nbytes = n*gguf_type_size(type);
std::vector<int8_t> tmp(nbytes);
if (!tmp.empty()) {
memcpy(tmp.data(), data, nbytes);
}
ctx->kv.emplace_back(key, tmp);
ctx->kv.back().cast(type);
} | O2 | cpp | gguf_set_arr_data:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1e820
leaq 0x1a3c2(%rip), %rsi # 0x5a982
leaq 0x8(%rsp), %rdi
callq 0x1efa0
testb %al, %al
jne 0x40658
leaq 0x8(%rsp), %rdi
callq 0x1c9a0
movq %r14, %rdi
movq %r13, %rsi
callq 0x1def0
movl %ebx, %edi
callq 0x1eb90
movq %rax, %r13
imulq %r12, %r13
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r13, %rsi
callq 0x1c490
movq 0x8(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
je 0x4061e
movq %r15, %rsi
movq %r13, %rdx
callq 0x1d280
leaq 0x8(%r14), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x1c2c0
movq 0x10(%r14), %rdi
addq $-0x58, %rdi
movl %ebx, %esi
callq 0x1c5b0
leaq 0x8(%rsp), %rdi
callq 0x1e690
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a2b6(%rip), %rdi # 0x5a915
leaq 0x1ab10(%rip), %rdx # 0x5b176
movl $0x3a8, %esi # imm = 0x3A8
xorl %eax, %eax
callq 0x1e770
jmp 0x40683
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1c9a0
jmp 0x40695
movq %rax, %rbx
jmp 0x40695
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1e690
movq %rbx, %rdi
callq 0x1e9b0
| gguf_set_arr_data:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r12, r8
mov r15, rcx
mov ebx, edx
mov r13, rsi
mov r14, rdi
mov [rsp+58h+var_30], rsi
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+58h+var_50]
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_40658
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
mov rsi, r13
call _gguf_remove_key
mov edi, ebx
call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type)
mov r13, rax
imul r13, r12
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
mov rsi, r13
call __ZNSt6vectorIaSaIaEEC2EmRKS0_; std::vector<signed char>::vector(ulong,std::allocator<signed char> const&)
mov rdi, [rsp+58h+var_50]
cmp rdi, [rsp+58h+var_48]
jz short loc_4061E
mov rsi, r15
mov rdx, r13
call _memcpy
loc_4061E:
lea rdi, [r14+8]
lea rsi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_50]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_IaSaIaEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(char const*&,std::vector&<signed char,std::allocator<signed char>> &&)
mov rdi, [r14+10h]
add rdi, 0FFFFFFFFFFFFFFA8h
mov esi, ebx
call __ZN7gguf_kv4castE9gguf_type; gguf_kv::cast(gguf_type)
lea rdi, [rsp+58h+var_50]
call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base()
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_40658:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A8h
xor eax, eax
call _ggml_abort
jmp short loc_40683
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_40695
loc_40683:
mov rbx, rax
jmp short loc_40695
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base()
loc_40695:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_arr_data(
long long a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
long long v23; // r13
char v25; // [rsp+0h] [rbp-58h]
char v26; // [rsp+7h] [rbp-51h] BYREF
_QWORD v27[4]; // [rsp+8h] [rbp-50h] BYREF
long long v28[6]; // [rsp+28h] [rbp-30h] BYREF
v28[0] = a2;
std::string::basic_string<std::allocator<char>>(v27, a2, &v26);
if ( (unsigned __int8)std::operator==<char>(v27, "general.alignment") )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
936,
(long long)"general.alignment must be type u32",
v16,
v17,
v18,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13,
v25);
std::string::~string(v27);
gguf_remove_key(a1, a2, v21);
v23 = a5 * gguf_type_size(a3, a2, v22);
std::vector<signed char>::vector(v27, v23, &v26);
if ( v27[0] != v27[1] )
memcpy(v27[0], a4, v23);
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(
a1 + 8,
v28,
v27);
gguf_kv::cast(*(_QWORD *)(a1 + 16) - 88LL, a3);
return std::_Vector_base<signed char>::~_Vector_base(v27);
}
| gguf_set_arr_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R12,R8
MOV R15,RCX
MOV EBX,EDX
MOV R13,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x28],RSI
LAB_001405aa:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x0011e820
LAB_001405b9:
LEA RSI,[0x15a982]
LEA RDI,[RSP + 0x8]
CALL 0x0011efa0
TEST AL,AL
JNZ 0x00140658
LEA RDI,[RSP + 0x8]
CALL 0x0011c9a0
MOV RDI,R14
MOV RSI,R13
CALL 0x0011def0
MOV EDI,EBX
CALL 0x0011eb90
MOV R13,RAX
IMUL R13,R12
LAB_001405f5:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R13
CALL 0x0011c490
LAB_00140607:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,qword ptr [RSP + 0x10]
JZ 0x0014061e
MOV RSI,R15
MOV RDX,R13
CALL 0x0011d280
LAB_0014061e:
LEA RDI,[R14 + 0x8]
LAB_00140622:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0011c2c0
MOV RDI,qword ptr [R14 + 0x10]
ADD RDI,-0x58
MOV ESI,EBX
CALL 0x0011c5b0
LEA RDI,[RSP + 0x8]
CALL 0x0011e690
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00140658:
LEA RDI,[0x15a915]
LEA RDX,[0x15b176]
MOV ESI,0x3a8
XOR EAX,EAX
CALL 0x0011e770
|
void gguf_set_arr_data(long param_1,char *param_2,int4 param_3,void *param_4,long param_5)
{
bool bVar1;
long lVar2;
allocator local_51;
void *local_50;
void *local_48;
char *local_30;
/* try { // try from 001405aa to 001405b8 has its CatchHandler @ 00140683 */
local_30 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)&local_50,param_2,&local_51);
bVar1 = std::operator==((string *)&local_50,"general.alignment");
if (!bVar1) {
std::__cxx11::string::~string((string *)&local_50);
gguf_remove_key(param_1,param_2);
lVar2 = gguf_type_size(param_3);
/* try { // try from 001405f5 to 00140606 has its CatchHandler @ 00140672 */
std::vector<signed_char,std::allocator<signed_char>>::vector
((vector<signed_char,std::allocator<signed_char>> *)&local_50,lVar2 * param_5,
&local_51);
if (local_50 != local_48) {
memcpy(local_50,param_4,lVar2 * param_5);
}
/* try { // try from 00140622 to 0014063f has its CatchHandler @ 00140688 */
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<signed_char,std::allocator<signed_char>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_30,
(vector *)&local_50);
gguf_kv::cast((gguf_kv *)(*(long *)(param_1 + 0x10) + -0x58),param_3);
std::_Vector_base<signed_char,std::allocator<signed_char>>::~_Vector_base
((_Vector_base<signed_char,std::allocator<signed_char>> *)&local_50);
return;
}
/* try { // try from 00140658 to 00140671 has its CatchHandler @ 00140674 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x3a8,
"general.alignment must be type u32");
}
|
|
1,460 | mi_read_rnd_mempack_record | eloqsql/storage/myisam/mi_packrec.c | static int _mi_read_rnd_mempack_record(MI_INFO *info, uchar *buf,
register my_off_t filepos,
my_bool skip_deleted_blocks
__attribute__((unused)))
{
MI_BLOCK_INFO block_info;
MYISAM_SHARE *share=info->s;
uchar *pos,*start;
DBUG_ENTER("_mi_read_rnd_mempack_record");
if (filepos >= share->state.state.data_file_length)
{
my_errno=HA_ERR_END_OF_FILE;
goto err;
}
if (!(pos= (uchar*) _mi_mempack_get_block_info(info, &info->bit_buff,
&block_info, &info->rec_buff,
(uchar*)
(start=share->file_map+
filepos))))
goto err;
#ifndef DBUG_OFF
if (block_info.rec_len > info->s->max_pack_length)
{
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
#endif
info->packed_length=block_info.rec_len;
info->lastpos=filepos;
info->nextpos=filepos+(uint) (pos-start)+block_info.rec_len;
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
DBUG_RETURN (_mi_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
err:
DBUG_RETURN(my_errno);
} | O0 | c | mi_read_rnd_mempack_record:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movb %al, -0x81(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq -0x90(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0xbd38b
callq 0xfabb0
movl $0x89, (%rax)
jmp 0xbd458
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x50, %rsi
movq -0x70(%rbp), %rcx
addq $0x120, %rcx # imm = 0x120
movq -0x90(%rbp), %rax
movq 0x270(%rax), %r8
addq -0x80(%rbp), %r8
movq %r8, -0xa0(%rbp)
leaq -0x60(%rbp), %rdx
callq 0xbf230
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
jne 0xbd3d6
jmp 0xbd458
movq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x1b0(%rax)
movq -0x80(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x80(%rbp), %rcx
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rdx
subq %rdx, %rax
movl %eax, %eax
addq %rax, %rcx
addq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x178(%rax)
movq -0x70(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x82, %ecx
movl %ecx, 0x1d0(%rax)
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x50, %rsi
movq -0x78(%rbp), %rdx
movq -0x98(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0xbc9c0
movl %eax, -0x64(%rbp)
jmp 0xbd464
jmp 0xbd45a
callq 0xfabb0
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbd48e
movl -0xa4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _mi_read_rnd_mempack_record:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov [rbp+var_81], al
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_80]
mov rcx, [rbp+var_90]
cmp rax, [rcx+40h]
jb short loc_BD38B
call _my_thread_var
mov dword ptr [rax], 89h
jmp loc_BD458
loc_BD38B:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 50h ; 'P'
mov rcx, [rbp+var_70]
add rcx, 120h
mov rax, [rbp+var_90]
mov r8, [rax+270h]
add r8, [rbp+var_80]
mov [rbp+var_A0], r8
lea rdx, [rbp+var_60]
call _mi_mempack_get_block_info
mov [rbp+var_98], rax
cmp rax, 0
jnz short loc_BD3D6
jmp loc_BD458
loc_BD3D6:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_70]
mov [rax+1B0h], rcx
mov rcx, [rbp+var_80]
mov rax, [rbp+var_70]
mov [rax+170h], rcx
mov rcx, [rbp+var_80]
mov rax, [rbp+var_98]
mov rdx, [rbp+var_A0]
sub rax, rdx
mov eax, eax
add rcx, rax
add rcx, [rbp+var_48]
mov rax, [rbp+var_70]
mov [rax+178h], rcx
mov rax, [rbp+var_70]
mov ecx, [rax+1D0h]
or ecx, 82h
mov [rax+1D0h], ecx
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 50h ; 'P'
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_98]
mov r8, [rbp+var_48]
call _mi_pack_rec_unpack
mov [rbp+var_64], eax
jmp short loc_BD464
loc_BD458:
jmp short $+2
loc_BD45A:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_64], eax
loc_BD464:
mov eax, [rbp+var_64]
mov [rbp+var_A4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_BD48E
mov eax, [rbp+var_A4]
add rsp, 0B0h
pop rbp
retn
loc_BD48E:
call ___stack_chk_fail
| long long mi_read_rnd_mempack_record(long long *a1, const char *a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+10h] [rbp-A0h]
long long block_info; // [rsp+18h] [rbp-98h]
long long v7; // [rsp+38h] [rbp-78h]
char v9[24]; // [rsp+50h] [rbp-60h] BYREF
long long v10; // [rsp+68h] [rbp-48h]
unsigned long long v11; // [rsp+A8h] [rbp-8h]
v11 = __readfsqword(0x28u);
v7 = (long long)a2;
if ( a3 >= *(_QWORD *)(*a1 + 64) )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return *(unsigned int *)my_thread_var(a1, a2);
}
a2 = (const char *)(a1 + 10);
v4 = a3 + *(_QWORD *)(*a1 + 624);
block_info = mi_mempack_get_block_info(a1, a1 + 10, v9, a1 + 36, v4);
if ( !block_info )
return *(unsigned int *)my_thread_var(a1, a2);
a1[54] = v10;
a1[46] = a3;
a1[47] = v10 + (unsigned int)(block_info - v4) + a3;
*((_DWORD *)a1 + 116) |= 0x82u;
return (unsigned int)mi_pack_rec_unpack(a1, (long long)(a1 + 10), v7, block_info, v10);
}
| _mi_read_rnd_mempack_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV byte ptr [RBP + -0x81],AL
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RCX + 0x40]
JC 0x001bd38b
CALL 0x001fabb0
MOV dword ptr [RAX],0x89
JMP 0x001bd458
LAB_001bd38b:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x50
MOV RCX,qword ptr [RBP + -0x70]
ADD RCX,0x120
MOV RAX,qword ptr [RBP + -0x90]
MOV R8,qword ptr [RAX + 0x270]
ADD R8,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xa0],R8
LEA RDX,[RBP + -0x60]
CALL 0x001bf230
MOV qword ptr [RBP + -0x98],RAX
CMP RAX,0x0
JNZ 0x001bd3d6
JMP 0x001bd458
LAB_001bd3d6:
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x1b0],RCX
MOV RCX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x170],RCX
MOV RCX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0xa0]
SUB RAX,RDX
MOV EAX,EAX
ADD RCX,RAX
ADD RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x178],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x82
MOV dword ptr [RAX + 0x1d0],ECX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x50
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x98]
MOV R8,qword ptr [RBP + -0x48]
CALL 0x001bc9c0
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001bd464
LAB_001bd458:
JMP 0x001bd45a
LAB_001bd45a:
CALL 0x001fabb0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
LAB_001bd464:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001bd48e
MOV EAX,dword ptr [RBP + -0xa4]
ADD RSP,0xb0
POP RBP
RET
LAB_001bd48e:
CALL 0x0012a270
|
int4 _mi_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3)
{
int8 uVar1;
int4 *puVar2;
long lVar3;
long in_FS_OFFSET;
int4 local_6c;
int1 local_68 [24];
long local_50;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_3 < *(ulong *)(*param_1 + 0x40)) {
uVar1 = *(int8 *)(*param_1 + 0x270);
lVar3 = _mi_mempack_get_block_info(param_1,param_1 + 10,local_68,param_1 + 0x24);
if (lVar3 != 0) {
param_1[0x36] = local_50;
param_1[0x2e] = param_3;
param_1[0x2f] = param_3 + (uint)((int)lVar3 - ((int)uVar1 + (int)param_3)) + local_50;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x82;
local_6c = _mi_pack_rec_unpack(param_1,param_1 + 10,param_2,lVar3,local_50);
goto LAB_001bd464;
}
}
else {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x89;
}
puVar2 = (int4 *)_my_thread_var();
local_6c = *puVar2;
LAB_001bd464:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_6c;
}
|
|
1,461 | parse_ident | bluesky950520[P]quickjs/quickjs.c | static JSAtom parse_ident(JSParseState *s, const uint8_t **pp,
BOOL *pident_has_escape, int c, BOOL is_private)
{
const uint8_t *p, *p_next;
char ident_buf[128], *buf;
size_t ident_size, ident_pos;
JSAtom atom = JS_ATOM_NULL;
p = *pp;
buf = ident_buf;
ident_size = sizeof(ident_buf);
ident_pos = 0;
if (is_private)
buf[ident_pos++] = '#';
for(;;) {
if (c < 0x80) {
buf[ident_pos++] = c;
} else {
ident_pos += utf8_encode((uint8_t*)buf + ident_pos, c);
}
c = *p;
p_next = p + 1;
if (c == '\\' && *p_next == 'u') {
c = lre_parse_escape(&p_next, TRUE);
*pident_has_escape = TRUE;
} else if (c >= 0x80) {
c = utf8_decode(p, &p_next);
/* no need to test for invalid UTF-8, 0xFFFD is not ident_next */
}
if (!lre_js_is_ident_next(c))
break;
p = p_next;
if (unlikely(ident_pos >= ident_size - UTF8_CHAR_LEN_MAX)) {
if (ident_realloc(s->ctx, &buf, &ident_size, ident_buf))
goto done;
}
}
/* buf is pure ASCII or UTF-8 encoded */
atom = JS_NewAtomLen(s->ctx, buf, ident_pos);
done:
if (unlikely(buf != ident_buf))
js_free(s->ctx, buf);
*pp = p;
return atom;
} | O1 | c | parse_ident:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %r15d
movq %rdx, %r12
movq %rdi, 0x10(%rsp)
movq %rsi, 0x28(%rsp)
movq (%rsi), %r14
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x80, 0x18(%rsp)
testl %r8d, %r8d
je 0x6366a
movb $0x23, 0x30(%rsp)
movl $0x1, %ebp
jmp 0x6366c
xorl %ebp, %ebp
leaq 0x20(%rsp), %r13
leaq 0x43f78(%rip), %rbx # 0xa75f0
cmpl $0x7f, %r15d
jg 0x6368c
movq 0x8(%rsp), %rax
movb %r15b, (%rax,%rbp)
incq %rbp
jmp 0x6369f
movq 0x8(%rsp), %rdi
addq %rbp, %rdi
movl %r15d, %esi
callq 0x1f6df
addq %rax, %rbp
movzbl (%r14), %r15d
leaq 0x1(%r14), %rax
movq %rax, 0x20(%rsp)
cmpl $0x5c, %r15d
jne 0x636d1
cmpb $0x75, (%rax)
jne 0x636d1
movq %r13, %rdi
movl $0x1, %esi
callq 0x9859b
movl %eax, %r15d
movl $0x1, (%r12)
jmp 0x636e4
testb %r15b, %r15b
jns 0x636e4
movq %r14, %rdi
movq %r13, %rsi
callq 0x1f785
movl %eax, %r15d
cmpl $0x7f, %r15d
ja 0x636fe
movl %r15d, %eax
shrl $0x5, %eax
movl (%rbx,%rax,4), %ecx
xorl %eax, %eax
btl %r15d, %ecx
setb %al
jmp 0x6371f
movl %r15d, %edi
callq 0x9c9be
testl %eax, %eax
setne %al
movl %r15d, %ecx
andl $-0x2, %ecx
cmpl $0x200c, %ecx # imm = 0x200C
sete %cl
orb %al, %cl
movzbl %cl, %eax
testl %eax, %eax
je 0x63762
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rbp
jb 0x63678
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x50e23
testl %eax, %eax
je 0x63678
xorl %ebp, %ebp
jmp 0x63779
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x23e1c
movl %eax, %ebp
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rax
cmpq %rax, %rsi
jne 0x637a4
movq 0x28(%rsp), %rax
movq %r14, (%rax)
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x20bf5
jmp 0x63788
| parse_ident:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r15d, ecx
mov r12, rdx
mov [rsp+0E8h+var_D8], rdi
mov [rsp+0E8h+var_C0], rsi
mov r14, [rsi]
lea rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_E0], rax
mov [rsp+0E8h+var_D0], 80h
test r8d, r8d
jz short loc_6366A
mov [rsp+0E8h+var_B8], 23h ; '#'
mov ebp, 1
jmp short loc_6366C
loc_6366A:
xor ebp, ebp
loc_6366C:
lea r13, [rsp+0E8h+var_C8]
lea rbx, lre_id_continue_table_ascii
loc_63678:
cmp r15d, 7Fh
jg short loc_6368C
mov rax, [rsp+0E8h+var_E0]
mov [rax+rbp], r15b
inc rbp
jmp short loc_6369F
loc_6368C:
mov rdi, [rsp+0E8h+var_E0]
add rdi, rbp
mov esi, r15d
call utf8_encode
add rbp, rax
loc_6369F:
movzx r15d, byte ptr [r14]
lea rax, [r14+1]
mov [rsp+0E8h+var_C8], rax
cmp r15d, 5Ch ; '\'
jnz short loc_636D1
cmp byte ptr [rax], 75h ; 'u'
jnz short loc_636D1
mov rdi, r13
mov esi, 1
call lre_parse_escape
mov r15d, eax
mov dword ptr [r12], 1
jmp short loc_636E4
loc_636D1:
test r15b, r15b
jns short loc_636E4
mov rdi, r14
mov rsi, r13
call utf8_decode
mov r15d, eax
loc_636E4:
cmp r15d, 7Fh
ja short loc_636FE
mov eax, r15d
shr eax, 5
mov ecx, [rbx+rax*4]
xor eax, eax
bt ecx, r15d
setb al
jmp short loc_6371F
loc_636FE:
mov edi, r15d
call lre_is_id_continue
test eax, eax
setnz al
mov ecx, r15d
and ecx, 0FFFFFFFEh
cmp ecx, 200Ch
setz cl
or cl, al
movzx eax, cl
loc_6371F:
test eax, eax
jz short loc_63762
mov r14, [rsp+0E8h+var_C8]
mov rax, [rsp+0E8h+var_D0]
add rax, 0FFFFFFFFFFFFFFFCh
cmp rbp, rax
jb loc_63678
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
lea rsi, [rsp+0E8h+var_E0]
lea rdx, [rsp+0E8h+var_D0]
lea rcx, [rsp+0E8h+var_B8]
call ident_realloc
test eax, eax
jz loc_63678
xor ebp, ebp
jmp short loc_63779
loc_63762:
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
mov rsi, [rsp+0E8h+var_E0]
mov rdx, rbp
call JS_NewAtomLen
mov ebp, eax
loc_63779:
mov rsi, [rsp+0E8h+var_E0]
lea rax, [rsp+0E8h+var_B8]
cmp rsi, rax
jnz short loc_637A4
loc_63788:
mov rax, [rsp+0E8h+var_C0]
mov [rax], r14
mov eax, ebp
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_637A4:
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
call js_free
jmp short loc_63788
| long long parse_ident(long long *a1, char **a2, _DWORD *a3, unsigned int a4, int a5)
{
char *v7; // r14
unsigned long long v8; // rbp
int v9; // ecx
int v10; // eax
unsigned int v11; // ebp
unsigned __int8 *v13; // [rsp+8h] [rbp-E0h] BYREF
long long *v14; // [rsp+10h] [rbp-D8h]
long long v15; // [rsp+18h] [rbp-D0h] BYREF
char *v16; // [rsp+20h] [rbp-C8h] BYREF
char **v17; // [rsp+28h] [rbp-C0h]
_BYTE v18[184]; // [rsp+30h] [rbp-B8h] BYREF
v14 = a1;
v17 = a2;
v7 = *a2;
v13 = v18;
v15 = 128LL;
if ( a5 )
{
v18[0] = 35;
v8 = 1LL;
}
else
{
v8 = 0LL;
}
while ( 1 )
{
if ( (int)a4 > 127 )
v8 += utf8_encode(&v13[v8], a4);
else
v13[v8++] = a4;
a4 = (unsigned __int8)*v7;
v16 = v7 + 1;
if ( a4 == 92 && v7[1] == 117 )
{
a4 = lre_parse_escape(&v16, 1LL);
*a3 = 1;
}
else if ( (a4 & 0x80u) != 0 )
{
a4 = utf8_decode(v7, &v16);
}
if ( a4 > 0x7F )
{
v10 = (unsigned int)lre_is_id_continue(a4) != 0 || (a4 & 0xFFFFFFFE) == 8204;
}
else
{
v9 = lre_id_continue_table_ascii[a4 >> 5];
v10 = _bittest(&v9, a4);
}
if ( !v10 )
break;
v7 = v16;
if ( v8 >= v15 - 4 && (unsigned int)ident_realloc(*v14, (long long *)&v13, &v15, (long long)v18) )
{
v11 = 0;
goto LABEL_20;
}
}
v11 = JS_NewAtomLen(*v14, v13, v8);
LABEL_20:
if ( v13 != v18 )
js_free(*v14, (long long)v13);
*v17 = v7;
return v11;
}
| parse_ident:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R15D,ECX
MOV R12,RDX
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV R14,qword ptr [RSI]
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x18],0x80
TEST R8D,R8D
JZ 0x0016366a
MOV byte ptr [RSP + 0x30],0x23
MOV EBP,0x1
JMP 0x0016366c
LAB_0016366a:
XOR EBP,EBP
LAB_0016366c:
LEA R13,[RSP + 0x20]
LEA RBX,[0x1a75f0]
LAB_00163678:
CMP R15D,0x7f
JG 0x0016368c
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + RBP*0x1],R15B
INC RBP
JMP 0x0016369f
LAB_0016368c:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,RBP
MOV ESI,R15D
CALL 0x0011f6df
ADD RBP,RAX
LAB_0016369f:
MOVZX R15D,byte ptr [R14]
LEA RAX,[R14 + 0x1]
MOV qword ptr [RSP + 0x20],RAX
CMP R15D,0x5c
JNZ 0x001636d1
CMP byte ptr [RAX],0x75
JNZ 0x001636d1
MOV RDI,R13
MOV ESI,0x1
CALL 0x0019859b
MOV R15D,EAX
MOV dword ptr [R12],0x1
JMP 0x001636e4
LAB_001636d1:
TEST R15B,R15B
JNS 0x001636e4
MOV RDI,R14
MOV RSI,R13
CALL 0x0011f785
MOV R15D,EAX
LAB_001636e4:
CMP R15D,0x7f
JA 0x001636fe
MOV EAX,R15D
SHR EAX,0x5
MOV ECX,dword ptr [RBX + RAX*0x4]
XOR EAX,EAX
BT ECX,R15D
SETC AL
JMP 0x0016371f
LAB_001636fe:
MOV EDI,R15D
CALL 0x0019c9be
TEST EAX,EAX
SETNZ AL
MOV ECX,R15D
AND ECX,0xfffffffe
CMP ECX,0x200c
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_0016371f:
TEST EAX,EAX
JZ 0x00163762
MOV R14,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x4
CMP RBP,RAX
JC 0x00163678
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x30]
CALL 0x00150e23
TEST EAX,EAX
JZ 0x00163678
XOR EBP,EBP
JMP 0x00163779
LAB_00163762:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x00123e1c
MOV EBP,EAX
LAB_00163779:
MOV RSI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x30]
CMP RSI,RAX
JNZ 0x001637a4
LAB_00163788:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],R14
MOV EAX,EBP
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001637a4:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00120bf5
JMP 0x00163788
|
int4
parse_ident(int8 *param_1,long *param_2,int4 *param_3,uint param_4,int param_5)
{
byte bVar1;
uint uVar2;
int iVar3;
int4 uVar4;
long lVar5;
ulong uVar6;
byte *pbVar7;
ulong uVar8;
bool bVar9;
int1 *local_e0;
int8 *local_d8;
long local_d0;
byte *local_c8;
long *local_c0;
int1 local_b8 [136];
uVar8 = (ulong)param_4;
local_e0 = local_b8;
local_d0 = 0x80;
if (param_5 != 0) {
local_b8[0] = 0x23;
}
uVar6 = (ulong)(param_5 != 0);
pbVar7 = (byte *)*param_2;
local_d8 = param_1;
local_c0 = param_2;
while( true ) {
if ((int)uVar8 < 0x80) {
local_e0[uVar6] = (char)uVar8;
uVar6 = uVar6 + 1;
}
else {
lVar5 = utf8_encode(local_e0 + uVar6,uVar8);
uVar6 = uVar6 + lVar5;
}
bVar1 = *pbVar7;
uVar8 = (ulong)bVar1;
local_c8 = pbVar7 + 1;
if ((bVar1 == 0x5c) && (*local_c8 == 0x75)) {
uVar2 = lre_parse_escape(&local_c8,1);
uVar8 = (ulong)uVar2;
*param_3 = 1;
}
else if ((char)bVar1 < '\0') {
uVar2 = utf8_decode(pbVar7,&local_c8);
uVar8 = (ulong)uVar2;
}
uVar2 = (uint)uVar8;
if (uVar2 < 0x80) {
bVar9 = (*(uint *)(lre_id_continue_table_ascii + (uVar8 >> 5) * 4) >> (uVar2 & 0x1f) & 1) != 0
;
}
else {
iVar3 = lre_is_id_continue(uVar8);
bVar9 = (uVar2 & 0xfffffffe) == 0x200c || iVar3 != 0;
}
if (!bVar9) break;
pbVar7 = local_c8;
if ((local_d0 - 4U <= uVar6) &&
(iVar3 = ident_realloc(*local_d8,&local_e0,&local_d0,local_b8), iVar3 != 0)) {
uVar4 = 0;
LAB_00163779:
if (local_e0 != local_b8) {
js_free(*local_d8);
}
*local_c0 = (long)pbVar7;
return uVar4;
}
}
uVar4 = JS_NewAtomLen(*local_d8,local_e0,uVar6);
goto LAB_00163779;
}
|
|
1,462 | my_register_filename | eloqsql/mysys/my_open.c | File my_register_filename(File fd, const char *FileName, enum file_type
type_of_file, uint error_message_number, myf MyFlags)
{
DBUG_ENTER("my_register_filename");
if ((int) fd >= MY_FILE_MIN)
{
my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED);
if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER))
DBUG_RETURN(fd);
my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags);
statistic_increment(my_file_total_opened,&THR_LOCK_open);
my_file_info[fd].type = type_of_file;
DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd);
}
my_errno= errno;
DBUG_PRINT("error",("Got error %d on open", my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
{
if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
FileName, my_errno);
}
DBUG_RETURN(-1);
} | O3 | c | my_register_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rsi, %r15
testl %edi, %edi
js 0x9ce4d
movl %edi, %ebx
leaq 0x3cbdc5(%rip), %rax # 0x468bb4
lock
incl (%rax)
testl $0x2004, %r14d # imm = 0x2004
jne 0x9ce9c
leaq 0x3487aa(%rip), %rax # 0x3e55b0
cmpl %ebx, (%rax)
jbe 0x9ce9c
movl %edx, %r13d
leaq 0x3cc2cc(%rip), %rax # 0x4690e4
movl (%rax), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9c9c0
leaq 0x34878c(%rip), %rcx # 0x3e55b8
movq (%rcx), %rdx
movl %ebx, %esi
shlq $0x4, %rsi
movq %rax, (%rdx,%rsi)
leaq 0x3cbd60(%rip), %rax # 0x468ba0
incq (%rax)
movq (%rcx), %rax
movl %r13d, 0x8(%rax,%rsi)
jmp 0x9ce9c
movl %ecx, %r12d
callq 0x5fc00
movl (%rax), %ebx
callq 0x9e14e
movl %ebx, (%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testb $0x19, %r14b
je 0x9ce9c
callq 0x9e14e
cmpl $0x18, (%rax)
movl $0x17, %eax
cmovel %eax, %r12d
andl $0x440, %r14d # imm = 0x440
orq $0x4, %r14
callq 0x9e14e
movl (%rax), %ecx
movl %r12d, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x98ed3
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_register_filename:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rsi
test edi, edi
js short loc_9CE4D
mov ebx, edi
lea rax, my_file_opened
lock inc dword ptr [rax]
test r14d, 2004h
jnz loc_9CE9C
lea rax, my_file_limit
cmp [rax], ebx
jbe loc_9CE9C
mov r13d, edx
lea rax, key_memory_my_file_info
mov edi, [rax]
mov rsi, r15
mov rdx, r14
call my_strdup
lea rcx, my_file_info
mov rdx, [rcx]
mov esi, ebx
shl rsi, 4
mov [rdx+rsi], rax
lea rax, my_file_total_opened
inc qword ptr [rax]
mov rax, [rcx]
mov [rax+rsi+8], r13d
jmp short loc_9CE9C
loc_9CE4D:
mov r12d, ecx
call ___errno_location
mov ebx, [rax]
call _my_thread_var
mov [rax], ebx
mov ebx, 0FFFFFFFFh
test r14b, 19h
jz short loc_9CE9C
call _my_thread_var
cmp dword ptr [rax], 18h
mov eax, 17h
cmovz r12d, eax
and r14d, 440h
or r14, 4
call _my_thread_var
mov ecx, [rax]
mov edi, r12d
mov rsi, r14
mov rdx, r15
xor eax, eax
call my_error
loc_9CE9C:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_register_filename(long long a1, long long a2, int a3, unsigned int a4, __int16 a5)
{
unsigned int v6; // ebx
long long v8; // rax
long long v9; // rsi
int v11; // ebx
unsigned int *v12; // rax
if ( (int)a1 < 0 )
{
v11 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var(a1) = v11;
v6 = -1;
if ( (a5 & 0x19) != 0 )
{
if ( *(_DWORD *)my_thread_var(a1) == 24 )
a4 = 23;
v12 = (unsigned int *)my_thread_var(a1);
my_error(a4, a5 & 0x440 | 4LL, a2, *v12);
}
}
else
{
v6 = a1;
_InterlockedIncrement(my_file_opened);
if ( (a5 & 0x2004) == 0 && my_file_limit > (unsigned int)a1 )
{
v8 = my_strdup(key_memory_my_file_info, a2, a5);
v9 = 16LL * (unsigned int)a1;
*(_QWORD *)((char *)my_file_info + v9) = v8;
++my_file_total_opened;
*(_DWORD *)((char *)my_file_info + v9 + 8) = a3;
}
}
return v6;
}
| my_register_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RSI
TEST EDI,EDI
JS 0x0019ce4d
MOV EBX,EDI
LEA RAX,[0x568bb4]
INC.LOCK dword ptr [RAX]
TEST R14D,0x2004
JNZ 0x0019ce9c
LEA RAX,[0x4e55b0]
CMP dword ptr [RAX],EBX
JBE 0x0019ce9c
MOV R13D,EDX
LEA RAX,[0x5690e4]
MOV EDI,dword ptr [RAX]
MOV RSI,R15
MOV RDX,R14
CALL 0x0019c9c0
LEA RCX,[0x4e55b8]
MOV RDX,qword ptr [RCX]
MOV ESI,EBX
SHL RSI,0x4
MOV qword ptr [RDX + RSI*0x1],RAX
LEA RAX,[0x568ba0]
INC qword ptr [RAX]
MOV RAX,qword ptr [RCX]
MOV dword ptr [RAX + RSI*0x1 + 0x8],R13D
JMP 0x0019ce9c
LAB_0019ce4d:
MOV R12D,ECX
CALL 0x0015fc00
MOV EBX,dword ptr [RAX]
CALL 0x0019e14e
MOV dword ptr [RAX],EBX
MOV EBX,0xffffffff
TEST R14B,0x19
JZ 0x0019ce9c
CALL 0x0019e14e
CMP dword ptr [RAX],0x18
MOV EAX,0x17
CMOVZ R12D,EAX
AND R14D,0x440
OR R14,0x4
CALL 0x0019e14e
MOV ECX,dword ptr [RAX]
MOV EDI,R12D
MOV RSI,R14
MOV RDX,R15
XOR EAX,EAX
CALL 0x00198ed3
LAB_0019ce9c:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint my_register_filename
(uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int4 *puVar4;
if ((int)param_1 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
param_1 = 0xffffffff;
if ((param_5 & 0x19) != 0) {
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 0x18) {
param_4 = 0x17;
}
puVar4 = (int4 *)_my_thread_var();
my_error(param_4,(uint)param_5 & 0x440 | 4,param_2,*puVar4);
}
}
else {
LOCK();
my_file_opened = my_file_opened + 1;
UNLOCK();
if (((param_5 & 0x2004) == 0) && (param_1 < my_file_limit)) {
uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5);
*(int8 *)(my_file_info + (ulong)param_1 * 0x10) = uVar2;
my_file_total_opened = my_file_total_opened + 1;
*(int4 *)(my_file_info + (ulong)param_1 * 0x10 + 8) = param_3;
}
}
return param_1;
}
|
|
1,463 | my_strntoll_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static longlong
my_strntoll_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative=0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register ulonglong cutoff;
register unsigned int cutlim;
register ulonglong res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr = (char*)s;
err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+=cnv;
} while (1);
bs:
overflow = 0;
res = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+=cnv;
if ( wc>='0' && wc<='9')
wc -= '0';
else if ( wc>='A' && wc<='Z')
wc = wc - 'A' + 10;
else if ( wc>='a' && wc<='z')
wc = wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res *= (ulonglong) base;
res += wc;
}
}
else if (cnv==MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*)s;
err[0]=EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]=EDOM;
return 0L;
}
if (negative)
{
if (res > (ulonglong) LONGLONG_MIN)
overflow = 1;
}
else if (res > (ulonglong) LONGLONG_MAX)
overflow = 1;
if (overflow)
{
err[0]=ERANGE;
return negative ? LONGLONG_MIN : LONGLONG_MAX;
}
return (negative ? -((longlong)res) : (longlong)res);
} | O3 | c | my_strntoll_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc3ab6
movl $0x0, -0x34(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xc3a86
cmpq $0x9, %rcx
je 0xc3a9e
cmpq $0x20, %rcx
je 0xc3a9e
jmp 0xc3ae8
cmpq $0x2b, %rcx
je 0xc3a9e
cmpq $0x2d, %rcx
jne 0xc3ae8
xorl %ecx, %ecx
cmpl $0x0, -0x34(%rbp)
sete %cl
movl %ecx, -0x34(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xc3a6e
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xc3ac2
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq -0x44(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
movq %rcx, -0x60(%rbp)
divq %rcx
movq %rdx, %rbx
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc3bc9
movl %ebx, %ecx
movq %rcx, -0x68(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r9d, %r9d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xc3b45
movq %rax, -0x30(%rbp)
jmp 0xc3b6a
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xc3b55
addq $-0x37, %rsi
jmp 0xc3b63
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xc3bda
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x44(%rbp), %eax
jge 0xc3bda
movl $0x1, %esi
cmpq -0x58(%rbp), %rcx
jbe 0xc3b7f
movq %rcx, %rdi
jmp 0xc3b99
jne 0xc3b8b
movq -0x58(%rbp), %rdi
cmpq -0x68(%rbp), %rax
ja 0xc3b99
imulq -0x60(%rbp), %rcx
addq %rcx, %rax
movl %r9d, %esi
movq %rax, %rdi
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rdi, %rcx
movl %esi, %r9d
testl %eax, %eax
jg 0xc3b29
jmp 0xc3bd0
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xc3c43
movl %esi, %r9d
movq %rdi, %rcx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc3be6
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xc3c34
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
cmpq %rsi, %rcx
movl $0x1, %eax
movl %r9d, %edi
cmoval %eax, %edi
testq %rcx, %rcx
cmovsl %eax, %r9d
movl -0x34(%rbp), %r8d
testl %r8d, %r8d
cmovnel %edi, %r9d
testl %r9d, %r9d
je 0xc3c5e
leaq -0x1(%rsi), %rax
testl %r8d, %r8d
movq -0x50(%rbp), %rcx
movl $0x22, (%rcx)
cmovneq %rsi, %rax
jmp 0xc3ad9
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xc3ad7
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc3c4f
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xc3ad7
movq %rcx, %rax
negq %rax
testl %r8d, %r8d
cmoveq %rcx, %rax
jmp 0xc3ad9
| my_strntoll_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_40], r8
mov [rbp+var_44], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_C3AB6
mov [rbp+var_34], 0
lea rbx, [rbp+var_30]
loc_C3A6E:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_C3A86
cmp rcx, 9
jz short loc_C3A9E
cmp rcx, 20h ; ' '
jz short loc_C3A9E
jmp short loc_C3AE8
loc_C3A86:
cmp rcx, 2Bh ; '+'
jz short loc_C3A9E
cmp rcx, 2Dh ; '-'
jnz short loc_C3AE8
xor ecx, ecx
cmp [rbp+var_34], 0
setz cl
mov [rbp+var_34], ecx
loc_C3A9E:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_C3A6E
loc_C3AB6:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_C3AC2
mov [rcx], r15
loc_C3AC2:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_C3AD7:
xor eax, eax
loc_C3AD9:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C3AE8:
movsxd rcx, [rbp+var_44]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_60], rcx
div rcx
mov rbx, rdx
mov [rbp+var_58], rax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_C3BC9
mov ecx, ebx
mov [rbp+var_68], rcx
xor ecx, ecx
mov rbx, r15
xor r9d, r9d
loc_C3B29:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_C3B45
mov [rbp+var_30], rax
jmp short loc_C3B6A
loc_C3B45:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_C3B55
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_C3B63
loc_C3B55:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_C3BDA
add rsi, 0FFFFFFFFFFFFFFA9h
loc_C3B63:
mov [rbp+var_30], rsi
mov rax, rsi
loc_C3B6A:
cmp eax, [rbp+var_44]
jge short loc_C3BDA
mov esi, 1
cmp rcx, [rbp+var_58]
jbe short loc_C3B7F
mov rdi, rcx
jmp short loc_C3B99
loc_C3B7F:
jnz short loc_C3B8B
mov rdi, [rbp+var_58]
cmp rax, [rbp+var_68]
ja short loc_C3B99
loc_C3B8B:
imul rcx, [rbp+var_60]
add rax, rcx
mov esi, r9d
mov rdi, rax
loc_C3B99:
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_78]
mov rcx, rdi
mov r9d, esi
test eax, eax
jg loc_C3B29
jmp short loc_C3BD0
loc_C3BC9:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_C3BD0:
test eax, eax
jz short loc_C3C43
mov r9d, esi
mov rcx, rdi
loc_C3BDA:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C3BE6
mov [rax], rbx
loc_C3BE6:
cmp rbx, r15
jz short loc_C3C34
mov rsi, 8000000000000000h
cmp rcx, rsi
mov eax, 1
mov edi, r9d
cmova edi, eax
test rcx, rcx
cmovs r9d, eax
mov r8d, [rbp+var_34]
test r8d, r8d
cmovnz r9d, edi
test r9d, r9d
jz short loc_C3C5E
lea rax, [rsi-1]
test r8d, r8d
mov rcx, [rbp+var_50]
mov dword ptr [rcx], 22h ; '"'
cmovnz rax, rsi
jmp loc_C3AD9
loc_C3C34:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_C3AD7
loc_C3C43:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C3C4F
mov [rax], rbx
loc_C3C4F:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_C3AD7
loc_C3C5E:
mov rax, rcx
neg rax
test r8d, r8d
cmovz rax, rcx
jmp loc_C3AD9
| unsigned long long my_strntoll_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
unsigned long long result; // rax
int v13; // eax
long long v14; // r8
long long v15; // rcx
long long v16; // rbx
long long v17; // r9
unsigned long long v18; // rax
long long v19; // rsi
unsigned int v20; // esi
unsigned long long v21; // rdi
int v22; // edi
unsigned long long v23; // [rsp+28h] [rbp-58h]
BOOL v27; // [rsp+4Ch] [rbp-34h]
_QWORD v28[6]; // [rsp+50h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v27 = 0;
while ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
goto LABEL_17;
v27 = !v27;
}
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
if ( v28[0] == 9LL || v28[0] == 32LL )
goto LABEL_10;
LABEL_17:
v23 = 0xFFFFFFFFFFFFFFFFLL / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 <= 0 )
{
v21 = 0LL;
v16 = v6;
v20 = 0;
LABEL_35:
if ( v13 )
{
LODWORD(v17) = v20;
v15 = v21;
goto LABEL_37;
}
if ( a5 )
*a5 = v16;
*a6 = 84;
return 0LL;
}
v15 = 0LL;
v16 = v6;
v17 = 0LL;
while ( 1 )
{
v16 += (unsigned int)v13;
v18 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
break;
v19 = v28[0] - 87LL;
}
else
{
v19 = v28[0] - 55LL;
}
v28[0] = v19;
v18 = v19;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v18 >= a4 )
break;
v20 = 1;
if ( v15 <= v23 )
{
if ( v15 != v23 || (v21 = 0xFFFFFFFFFFFFFFFFLL / a4, v18 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v20 = v17;
v21 = a4 * v15 + v18;
}
}
else
{
v21 = v15;
}
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long, long long))v8)(
a1,
v28,
v16,
v9,
v14,
v17);
v15 = v21;
v17 = v20;
if ( v13 <= 0 )
goto LABEL_35;
}
LABEL_37:
if ( a5 )
*a5 = v16;
if ( v16 == v6 )
{
*a6 = 33;
return 0LL;
}
v22 = v17;
if ( (unsigned long long)v15 > 0x8000000000000000LL )
v22 = 1;
if ( v15 < 0 )
LODWORD(v17) = 1;
if ( v27 )
LODWORD(v17) = v22;
if ( (_DWORD)v17 )
{
result = 0x7FFFFFFFFFFFFFFFLL;
*a6 = 34;
if ( v27 )
return 0x8000000000000000LL;
}
else
{
result = -v15;
if ( !v27 )
return v15;
}
return result;
}
| my_strntoll_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x44],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c3ab6
MOV dword ptr [RBP + -0x34],0x0
LEA RBX,[RBP + -0x30]
LAB_001c3a6e:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001c3a86
CMP RCX,0x9
JZ 0x001c3a9e
CMP RCX,0x20
JZ 0x001c3a9e
JMP 0x001c3ae8
LAB_001c3a86:
CMP RCX,0x2b
JZ 0x001c3a9e
CMP RCX,0x2d
JNZ 0x001c3ae8
XOR ECX,ECX
CMP dword ptr [RBP + -0x34],0x0
SETZ CL
MOV dword ptr [RBP + -0x34],ECX
LAB_001c3a9e:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001c3a6e
LAB_001c3ab6:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001c3ac2
MOV qword ptr [RCX],R15
LAB_001c3ac2:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001c3ad7:
XOR EAX,EAX
LAB_001c3ad9:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c3ae8:
MOVSXD RCX,dword ptr [RBP + -0x44]
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x60],RCX
DIV RCX
MOV RBX,RDX
MOV qword ptr [RBP + -0x58],RAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c3bc9
MOV ECX,EBX
MOV qword ptr [RBP + -0x68],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R9D,R9D
LAB_001c3b29:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001c3b45
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c3b6a
LAB_001c3b45:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001c3b55
ADD RSI,-0x37
JMP 0x001c3b63
LAB_001c3b55:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001c3bda
ADD RSI,-0x57
LAB_001c3b63:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001c3b6a:
CMP EAX,dword ptr [RBP + -0x44]
JGE 0x001c3bda
MOV ESI,0x1
CMP RCX,qword ptr [RBP + -0x58]
JBE 0x001c3b7f
MOV RDI,RCX
JMP 0x001c3b99
LAB_001c3b7f:
JNZ 0x001c3b8b
MOV RDI,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x68]
JA 0x001c3b99
LAB_001c3b8b:
IMUL RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV ESI,R9D
MOV RDI,RAX
LAB_001c3b99:
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x78]
MOV RCX,RDI
MOV R9D,ESI
TEST EAX,EAX
JG 0x001c3b29
JMP 0x001c3bd0
LAB_001c3bc9:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_001c3bd0:
TEST EAX,EAX
JZ 0x001c3c43
MOV R9D,ESI
MOV RCX,RDI
LAB_001c3bda:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c3be6
MOV qword ptr [RAX],RBX
LAB_001c3be6:
CMP RBX,R15
JZ 0x001c3c34
MOV RSI,-0x8000000000000000
CMP RCX,RSI
MOV EAX,0x1
MOV EDI,R9D
CMOVA EDI,EAX
TEST RCX,RCX
CMOVS R9D,EAX
MOV R8D,dword ptr [RBP + -0x34]
TEST R8D,R8D
CMOVNZ R9D,EDI
TEST R9D,R9D
JZ 0x001c3c5e
LEA RAX,[RSI + -0x1]
TEST R8D,R8D
MOV RCX,qword ptr [RBP + -0x50]
MOV dword ptr [RCX],0x22
CMOVNZ RAX,RSI
JMP 0x001c3ad9
LAB_001c3c34:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001c3ad7
LAB_001c3c43:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c3c4f
MOV qword ptr [RAX],RBX
LAB_001c3c4f:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001c3ad7
LAB_001c3c5e:
MOV RAX,RCX
NEG RAX
TEST R8D,R8D
CMOVZ RAX,RCX
JMP 0x001c3ad9
|
ulong my_strntoll_mb2_or_mb4
(long param_1,long param_2,long param_3,int param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
int1 auVar2 [16];
int1 auVar3 [16];
bool bVar4;
bool bVar5;
bool bVar6;
ulong uVar7;
uint uVar8;
ulong uVar9;
int4 uVar10;
ulong uVar11;
long lVar12;
ulong uVar13;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar8) {
bVar4 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001c3ae8:
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
auVar3 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar9 = SUB168(auVar3 / auVar2,0);
uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar12 = param_2;
if ((int)uVar8 < 1) {
uVar11 = 0;
bVar5 = false;
goto LAB_001c3bd0;
}
uVar11 = 0;
bVar5 = false;
goto LAB_001c3b29;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001c3ae8;
bVar4 = !bVar4;
}
param_2 = param_2 + (ulong)uVar8;
uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar8);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar10 = 0x21;
if (uVar8 == 0) {
uVar10 = 0x54;
}
*param_6 = uVar10;
return 0;
while( true ) {
if (param_4 <= (int)uVar13) goto LAB_001c3bda;
uVar7 = uVar11;
bVar6 = true;
if ((uVar11 <= uVar9) &&
((uVar11 != uVar9 || (uVar7 = uVar9, uVar13 <= (SUB168(auVar3 % auVar2,0) & 0xffffffff))))) {
uVar7 = uVar13 + uVar11 * (long)param_4;
bVar6 = bVar5;
}
bVar5 = bVar6;
uVar11 = uVar7;
local_38 = uVar13;
uVar8 = (*pcVar1)(param_1,&local_38,lVar12,param_3);
if ((int)uVar8 < 1) break;
LAB_001c3b29:
lVar12 = (ulong)uVar8 + lVar12;
uVar13 = local_38 - 0x30;
if (9 < uVar13) {
if (local_38 - 0x41 < 0x1a) {
uVar13 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001c3bda;
uVar13 = local_38 - 0x57;
}
}
}
LAB_001c3bd0:
if (uVar8 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar12;
}
*param_6 = 0x54;
}
else {
LAB_001c3bda:
if (param_5 != (long *)0x0) {
*param_5 = lVar12;
}
if (lVar12 != param_2) {
bVar6 = bVar5;
if (0x8000000000000000 < uVar11) {
bVar6 = true;
}
if ((long)uVar11 < 0) {
bVar5 = true;
}
if (bVar4) {
bVar5 = bVar6;
}
if (!bVar5) {
if (!bVar4) {
return uVar11;
}
return -uVar11;
}
*param_6 = 0x22;
if (bVar4) {
return 0x8000000000000000;
}
return 0x7fffffffffffffff;
}
*param_6 = 0x21;
}
return 0;
}
|
|
1,464 | ma_log_add | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_log_add(MARIA_PAGE *ma_page,
uint org_page_length __attribute__ ((unused)),
uchar *key_pos, uint changed_length, int move_length,
my_bool handle_overflow __attribute__ ((unused)),
enum en_key_debug debug_marker __attribute__((unused)))
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 3 + 3 + 3 + 3 + 7 +
3 + 2];
uchar *log_pos;
uchar *buff= ma_page->buff;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
MARIA_HA *info= ma_page->info;
uint offset= (uint) (key_pos - buff);
uint max_page_size= info->s->max_index_block_size;
uint translog_parts, current_size;
pgcache_page_no_t page_pos= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_add");
DBUG_PRINT("enter", ("page: %lu org_page_length: %u changed_length: %u "
"move_length: %d",
(ulong) page_pos, org_page_length, changed_length,
move_length));
DBUG_ASSERT(info->s->now_transactional);
DBUG_ASSERT(move_length <= (int) changed_length);
DBUG_ASSERT(ma_page->org_size == MY_MIN(org_page_length, max_page_size));
DBUG_ASSERT(ma_page->size == org_page_length + move_length);
DBUG_ASSERT(offset <= ma_page->org_size);
/*
Write REDO entry that contains the logical operations we need
to do the page
*/
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page_pos);
current_size= ma_page->org_size;
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
*log_pos++= KEY_OP_DEBUG;
*log_pos++= debug_marker;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
/*
Don't overwrite page boundary
It's ok to cut this as we will append the data at end of page
in the next log entry
*/
if (offset + changed_length > max_page_size)
{
DBUG_ASSERT(handle_overflow);
changed_length= max_page_size - offset; /* Update to end of page */
move_length= 0; /* Nothing to move */
/* Extend the page to max length on recovery */
*log_pos++= KEY_OP_MAX_PAGELENGTH;
current_size= max_page_size;
}
/* Check if adding the key made the page overflow */
if (current_size + move_length > max_page_size)
{
/*
Adding the key caused an overflow. Cut away the part of the
page that doesn't fit.
*/
uint diff;
DBUG_ASSERT(handle_overflow);
diff= current_size + move_length - max_page_size;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, diff);
log_pos+= 3;
current_size= max_page_size - move_length;
}
if (offset == current_size)
{
log_pos[0]= KEY_OP_ADD_SUFFIX;
current_size+= changed_length;
}
else
{
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos+= 3;
if (move_length)
{
if (move_length < 0)
{
DBUG_ASSERT(offset - move_length <= org_page_length);
if (offset - move_length > current_size)
{
/*
Truncate to end of page. We will add data to it from
the page buffer below
*/
move_length= (int) offset - (int) current_size;
}
}
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
current_size+= move_length;
}
/*
Handle case where page was shortend but 'changed_length' goes over
'current_size'. This can only happen when there was a page overflow
and we will below add back the overflow part
*/
if (offset + changed_length > current_size)
{
DBUG_ASSERT(offset + changed_length <= ma_page->size);
changed_length= current_size - offset;
}
log_pos[0]= KEY_OP_CHANGE;
}
int2store(log_pos+1, changed_length);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= changed_length;
translog_parts= TRANSLOG_INTERNAL_PARTS + 2;
/*
If page was originally > block_size before operation and now all data
fits, append the end data that was not part of the previous logged
page to it.
*/
DBUG_ASSERT(current_size <= max_page_size && current_size <= ma_page->size);
if (current_size != ma_page->size && current_size != max_page_size)
{
uint length= MY_MIN(ma_page->size, max_page_size) - current_size;
uchar *data= ma_page->buff + current_size;
log_pos[0]= KEY_OP_ADD_SUFFIX;
int2store(log_pos+1, length);
log_array[translog_parts].str= log_pos;
log_array[translog_parts].length= 3;
log_array[translog_parts+1].str= data;
log_array[translog_parts+1].length= length;
log_pos+= 3;
translog_parts+= 2;
current_size+= length;
changed_length+= length + 3;
}
_ma_log_key_changes(ma_page, log_array + translog_parts,
log_pos, &changed_length, &translog_parts);
/*
Remember new page length for future log entries for same page
Note that this can be different from ma_page->size in case of page
overflow!
*/
ma_page->org_size= current_size;
DBUG_ASSERT(ma_page->org_size == MY_MIN(ma_page->size, max_page_size));
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length +
changed_length, translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(-1);
DBUG_RETURN(0);
} | O3 | c | ma_log_add:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %esi
movq %rdx, %r9
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq 0x10(%rdi), %rbx
movq (%rdi), %rcx
movq 0x18(%rdi), %rax
movq %rdx, %r11
subq %rbx, %r11
movq (%rcx), %r14
movl 0x7bc(%r14), %r15d
movl 0x7c0(%r14), %r10d
xorl %edx, %edx
divq %r15
movl %eax, -0x4e(%rbp)
shrq $0x20, %rax
movb %al, -0x4a(%rbp)
movl 0x24(%rdi), %eax
movb $0xa, -0x49(%rbp)
movl 0x744(%r14), %edx
addl $-0x3, %edx
movb (%rbx,%rdx), %dl
movb %dl, -0x48(%rbp)
leal (%r11,%rsi), %edx
cmpl %r10d, %edx
jbe 0x4184f
movl %r10d, %esi
subl %r11d, %esi
leaq -0x46(%rbp), %rdx
movb $0xc, -0x1(%rdx)
movl %r10d, %eax
xorl %r8d, %r8d
jmp 0x41853
leaq -0x47(%rbp), %rdx
leal (%r8,%rax), %ebx
subl %r10d, %ebx
jbe 0x4186d
movb $0x7, (%rdx)
movw %bx, 0x1(%rdx)
addq $0x3, %rdx
movl %r10d, %eax
subl %r8d, %eax
movl %r11d, %ebx
subl %eax, %ebx
jne 0x4187d
movb $0x6, (%rdx)
leal (%rsi,%r11), %eax
jmp 0x418c8
movb $0x1, (%rdx)
movw %r11w, 0x1(%rdx)
testl %r8d, %r8d
je 0x418b0
movl %r11d, %r14d
subl %r8d, %r14d
cmpl %eax, %r14d
cmovbel %r8d, %ebx
testl %r8d, %r8d
cmovnsl %r8d, %ebx
movb $0x2, 0x3(%rdx)
movw %bx, 0x4(%rdx)
addq $0x6, %rdx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x418b4
addq $0x3, %rdx
leal (%rsi,%r11), %r8d
movl %eax, %ebx
subl %r11d, %ebx
cmpl %eax, %r8d
cmovbel %esi, %ebx
movb $0x3, (%rdx)
movl %ebx, %esi
movw %si, 0x1(%rdx)
leaq 0x3(%rdx), %rbx
leaq -0x50(%rbp), %r11
movq %r11, -0xc0(%rbp)
movl %ebx, %r8d
subl %r11d, %r8d
movq %r8, -0xb8(%rbp)
movq %r9, -0xb0(%rbp)
movl %esi, %r9d
movq %r9, -0xa8(%rbp)
movl 0x20(%rdi), %r14d
cmpl %r14d, %eax
sete %r9b
cmpl %r10d, %eax
sete %r15b
orb %r9b, %r15b
movl $0x4, %r9d
jne 0x41967
cmpl %r10d, %r14d
cmovbl %r14d, %r10d
movl %r10d, %r8d
subl %eax, %r8d
movl %eax, %eax
addq 0x10(%rdi), %rax
movb $0x6, 0x3(%rdx)
movw %r8w, 0x4(%rdx)
movq %rbx, -0xa0(%rbp)
movq $0x3, -0x98(%rbp)
movq %rax, -0x90(%rbp)
movq %r8, -0x88(%rbp)
leal 0x3(%rsi,%r8), %esi
movl $0x6, %r9d
movq -0xb8(%rbp), %r8
movl %r10d, %eax
movl %eax, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %esi, %r8d
subq $0x8, %rsp
leaq -0xe0(%rbp), %rax
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
pushq $0x0
pushq %r11
pushq %rax
callq 0x29c54
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
negb %cl
sbbl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x419b8
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| _ma_log_add:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov esi, ecx
mov r9, rdx
mov rax, fs:28h
mov [rbp+var_20], rax
mov rbx, [rdi+10h]
mov rcx, [rdi]
mov rax, [rdi+18h]
mov r11, rdx
sub r11, rbx
mov r14, [rcx]
mov r15d, [r14+7BCh]
mov r10d, [r14+7C0h]
xor edx, edx
div r15
mov [rbp+var_4E], eax
shr rax, 20h
mov [rbp+var_4A], al
mov eax, [rdi+24h]
mov [rbp+var_49], 0Ah
mov edx, [r14+744h]
add edx, 0FFFFFFFDh
mov dl, [rbx+rdx]
mov [rbp+var_48], dl
lea edx, [r11+rsi]
cmp edx, r10d
jbe short loc_4184F
mov esi, r10d
sub esi, r11d
lea rdx, [rbp+var_46]
mov byte ptr [rdx-1], 0Ch
mov eax, r10d
xor r8d, r8d
jmp short loc_41853
loc_4184F:
lea rdx, [rbp+var_47]
loc_41853:
lea ebx, [r8+rax]
sub ebx, r10d
jbe short loc_4186D
mov byte ptr [rdx], 7
mov [rdx+1], bx
add rdx, 3
mov eax, r10d
sub eax, r8d
loc_4186D:
mov ebx, r11d
sub ebx, eax
jnz short loc_4187D
mov byte ptr [rdx], 6
lea eax, [rsi+r11]
jmp short loc_418C8
loc_4187D:
mov byte ptr [rdx], 1
mov [rdx+1], r11w
test r8d, r8d
jz short loc_418B0
mov r14d, r11d
sub r14d, r8d
cmp r14d, eax
cmovbe ebx, r8d
test r8d, r8d
cmovns ebx, r8d
mov byte ptr [rdx+3], 2
mov [rdx+4], bx
add rdx, 6
add ebx, eax
mov eax, ebx
jmp short loc_418B4
loc_418B0:
add rdx, 3
loc_418B4:
lea r8d, [rsi+r11]
mov ebx, eax
sub ebx, r11d
cmp r8d, eax
cmovbe ebx, esi
mov byte ptr [rdx], 3
mov esi, ebx
loc_418C8:
mov [rdx+1], si
lea rbx, [rdx+3]
lea r11, [rbp+var_50]
mov [rbp+var_C0], r11
mov r8d, ebx
sub r8d, r11d
mov [rbp+var_B8], r8
mov [rbp+var_B0], r9
mov r9d, esi
mov [rbp+var_A8], r9
mov r14d, [rdi+20h]
cmp eax, r14d
setz r9b
cmp eax, r10d
setz r15b
or r15b, r9b
mov r9d, 4
jnz short loc_41967
cmp r14d, r10d
cmovb r10d, r14d
mov r8d, r10d
sub r8d, eax
mov eax, eax
add rax, [rdi+10h]
mov byte ptr [rdx+3], 6
mov [rdx+4], r8w
mov [rbp+var_A0], rbx
mov [rbp+var_98], 3
mov [rbp+var_90], rax
mov [rbp+var_88], r8
lea esi, [rsi+r8+3]
mov r9d, 6
mov r8, [rbp+var_B8]
mov eax, r10d
loc_41967:
mov [rdi+24h], eax
mov rdx, [rcx+8]
add r8d, esi
sub rsp, 8
lea rax, [rbp+var_E0]
lea rdi, [rbp+var_58]
mov esi, 0Ch
push 0
push r11
push rax
call translog_write_record
add rsp, 20h
mov ecx, eax
xor eax, eax
neg cl
sbb eax, eax
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_419B8
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_419B8:
call ___stack_chk_fail
| long long ma_log_add(long long a1, long long a2, long long a3, unsigned int a4, int a5)
{
long long v7; // rbx
_QWORD *v8; // rcx
int v9; // r11d
_DWORD *v10; // r14
unsigned int v11; // r10d
unsigned long long v12; // rax
unsigned int v13; // eax
char *v14; // rdx
int v15; // ebx
unsigned int v16; // ebx
unsigned int v17; // r8d
unsigned int v18; // r14d
int v19; // r9d
long long v20; // r8
long long v21; // rax
__int128 v23; // [rsp+0h] [rbp-E0h] BYREF
__int16 *v24; // [rsp+20h] [rbp-C0h]
long long v25; // [rsp+28h] [rbp-B8h]
long long v26; // [rsp+30h] [rbp-B0h]
long long v27; // [rsp+38h] [rbp-A8h]
char *v28; // [rsp+40h] [rbp-A0h]
long long v29; // [rsp+48h] [rbp-98h]
long long v30; // [rsp+50h] [rbp-90h]
long long v31; // [rsp+58h] [rbp-88h]
_BYTE v32[8]; // [rsp+88h] [rbp-58h] BYREF
__int16 v33; // [rsp+90h] [rbp-50h] BYREF
int v34; // [rsp+92h] [rbp-4Eh]
char v35; // [rsp+96h] [rbp-4Ah]
char v36; // [rsp+97h] [rbp-49h]
char v37; // [rsp+98h] [rbp-48h]
char v38; // [rsp+99h] [rbp-47h] BYREF
char v39; // [rsp+9Ah] [rbp-46h] BYREF
unsigned long long v40; // [rsp+C0h] [rbp-20h]
v40 = __readfsqword(0x28u);
v7 = *(_QWORD *)(a1 + 16);
v8 = *(_QWORD **)a1;
v9 = a3 - v7;
v10 = **(_DWORD ***)a1;
v11 = v10[496];
v12 = *(_QWORD *)(a1 + 24) / (unsigned long long)(unsigned int)v10[495];
v34 = v12;
v35 = BYTE4(v12);
v13 = *(_DWORD *)(a1 + 36);
v36 = 10;
v37 = *(_BYTE *)(v7 + (unsigned int)(v10[465] - 3));
if ( (_DWORD)a3 - (_DWORD)v7 + a4 <= v11 )
{
v14 = &v38;
}
else
{
a4 = v11 - v9;
v14 = &v39;
v38 = 12;
v13 = v11;
a5 = 0;
}
if ( a5 + v13 > v11 )
{
*v14 = 7;
*(_WORD *)(v14 + 1) = a5 + v13 - v11;
v14 += 3;
v13 = v11 - a5;
}
v15 = v9 - v13;
if ( v9 == v13 )
{
*v14 = 6;
v13 = a4 + v9;
}
else
{
*v14 = 1;
*(_WORD *)(v14 + 1) = v9;
if ( a5 )
{
if ( v9 - a5 <= v13 )
v15 = a5;
if ( a5 >= 0 )
v15 = a5;
v14[3] = 2;
*((_WORD *)v14 + 2) = v15;
v14 += 6;
v13 += v15;
}
else
{
v14 += 3;
}
v16 = v13 - v9;
if ( a4 + v9 <= v13 )
v16 = a4;
*v14 = 3;
a4 = v16;
}
*(_WORD *)(v14 + 1) = a4;
v24 = &v33;
v17 = (_DWORD)v14 + 3 - (unsigned int)&v33;
v25 = v17;
v26 = a3;
v27 = a4;
v18 = *(_DWORD *)(a1 + 32);
v19 = 4;
if ( v13 != v18 && v13 != v11 )
{
if ( v18 < v11 )
v11 = *(_DWORD *)(a1 + 32);
v20 = v11 - v13;
v21 = *(_QWORD *)(a1 + 16) + v13;
v14[3] = 6;
*((_WORD *)v14 + 2) = v20;
v28 = v14 + 3;
v29 = 3LL;
v30 = v21;
v31 = v20;
a4 += v20 + 3;
v19 = 6;
v17 = v25;
v13 = v11;
}
*(_DWORD *)(a1 + 36) = v13;
return (unsigned int)-((unsigned __int8)translog_write_record(
(unsigned long long)v32,
&byte_9[3],
v8[1],
v8,
a4 + v17,
v19,
&v23,
&v33,
0LL) != 0);
}
| _ma_log_add:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV ESI,ECX
MOV R9,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RBX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x18]
MOV R11,RDX
SUB R11,RBX
MOV R14,qword ptr [RCX]
MOV R15D,dword ptr [R14 + 0x7bc]
MOV R10D,dword ptr [R14 + 0x7c0]
XOR EDX,EDX
DIV R15
MOV dword ptr [RBP + -0x4e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x4a],AL
MOV EAX,dword ptr [RDI + 0x24]
MOV byte ptr [RBP + -0x49],0xa
MOV EDX,dword ptr [R14 + 0x744]
ADD EDX,-0x3
MOV DL,byte ptr [RBX + RDX*0x1]
MOV byte ptr [RBP + -0x48],DL
LEA EDX,[R11 + RSI*0x1]
CMP EDX,R10D
JBE 0x0014184f
MOV ESI,R10D
SUB ESI,R11D
LEA RDX,[RBP + -0x46]
MOV byte ptr [RDX + -0x1],0xc
MOV EAX,R10D
XOR R8D,R8D
JMP 0x00141853
LAB_0014184f:
LEA RDX,[RBP + -0x47]
LAB_00141853:
LEA EBX,[R8 + RAX*0x1]
SUB EBX,R10D
JBE 0x0014186d
MOV byte ptr [RDX],0x7
MOV word ptr [RDX + 0x1],BX
ADD RDX,0x3
MOV EAX,R10D
SUB EAX,R8D
LAB_0014186d:
MOV EBX,R11D
SUB EBX,EAX
JNZ 0x0014187d
MOV byte ptr [RDX],0x6
LEA EAX,[RSI + R11*0x1]
JMP 0x001418c8
LAB_0014187d:
MOV byte ptr [RDX],0x1
MOV word ptr [RDX + 0x1],R11W
TEST R8D,R8D
JZ 0x001418b0
MOV R14D,R11D
SUB R14D,R8D
CMP R14D,EAX
CMOVBE EBX,R8D
TEST R8D,R8D
CMOVNS EBX,R8D
MOV byte ptr [RDX + 0x3],0x2
MOV word ptr [RDX + 0x4],BX
ADD RDX,0x6
ADD EBX,EAX
MOV EAX,EBX
JMP 0x001418b4
LAB_001418b0:
ADD RDX,0x3
LAB_001418b4:
LEA R8D,[RSI + R11*0x1]
MOV EBX,EAX
SUB EBX,R11D
CMP R8D,EAX
CMOVBE EBX,ESI
MOV byte ptr [RDX],0x3
MOV ESI,EBX
LAB_001418c8:
MOV word ptr [RDX + 0x1],SI
LEA RBX,[RDX + 0x3]
LEA R11,[RBP + -0x50]
MOV qword ptr [RBP + -0xc0],R11
MOV R8D,EBX
SUB R8D,R11D
MOV qword ptr [RBP + -0xb8],R8
MOV qword ptr [RBP + -0xb0],R9
MOV R9D,ESI
MOV qword ptr [RBP + -0xa8],R9
MOV R14D,dword ptr [RDI + 0x20]
CMP EAX,R14D
SETZ R9B
CMP EAX,R10D
SETZ R15B
OR R15B,R9B
MOV R9D,0x4
JNZ 0x00141967
CMP R14D,R10D
CMOVC R10D,R14D
MOV R8D,R10D
SUB R8D,EAX
MOV EAX,EAX
ADD RAX,qword ptr [RDI + 0x10]
MOV byte ptr [RDX + 0x3],0x6
MOV word ptr [RDX + 0x4],R8W
MOV qword ptr [RBP + -0xa0],RBX
MOV qword ptr [RBP + -0x98],0x3
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],R8
LEA ESI,[RSI + R8*0x1 + 0x3]
MOV R9D,0x6
MOV R8,qword ptr [RBP + -0xb8]
MOV EAX,R10D
LAB_00141967:
MOV dword ptr [RDI + 0x24],EAX
MOV RDX,qword ptr [RCX + 0x8]
ADD R8D,ESI
SUB RSP,0x8
LEA RAX,[RBP + -0xe0]
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
PUSH 0x0
PUSH R11
PUSH RAX
CALL 0x00129c54
ADD RSP,0x20
MOV ECX,EAX
XOR EAX,EAX
NEG CL
SBB EAX,EAX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x001419b8
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001419b8:
CALL 0x00129250
|
int _ma_log_add(long *param_1,int8 param_2,long param_3,uint param_4,int param_5)
{
long *plVar1;
long lVar2;
int1 auVar3 [16];
char cVar4;
uint uVar5;
uint uVar6;
int1 *puVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
uint uVar12;
int8 uVar13;
long lVar14;
long in_FS_OFFSET;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0;
long local_b8;
ulong local_b0;
int1 *local_a8;
int8 local_a0;
long local_98;
ulong local_90;
int1 local_60 [8];
int1 local_58 [2];
int4 local_56;
int1 local_52;
int1 local_51;
int1 local_50;
int1 local_4f [39];
long local_28;
local_b0 = (ulong)param_4;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
lVar14 = param_3 - param_1[2];
lVar2 = *plVar1;
uVar12 = *(uint *)(lVar2 + 0x7c0);
auVar3._8_8_ = 0;
auVar3._0_8_ = param_1[3];
auVar3 = auVar3 / ZEXT416(*(uint *)(lVar2 + 0x7bc));
local_56 = auVar3._0_4_;
local_52 = auVar3[4];
uVar5 = *(uint *)((long)param_1 + 0x24);
local_51 = 10;
local_50 = *(int1 *)(param_1[2] + (ulong)(*(int *)(lVar2 + 0x744) - 3));
iVar10 = (int)lVar14;
if (uVar12 < iVar10 + param_4) {
local_b0 = (ulong)(uVar12 - iVar10);
puVar7 = local_4f + 1;
local_4f[0] = 0xc;
param_5 = 0;
uVar5 = uVar12;
}
else {
puVar7 = local_4f;
}
uVar9 = (uint)local_b0;
iVar8 = (param_5 + uVar5) - uVar12;
if (uVar12 <= param_5 + uVar5 && iVar8 != 0) {
*puVar7 = 7;
*(short *)(puVar7 + 1) = (short)iVar8;
puVar7 = puVar7 + 3;
uVar5 = uVar12 - param_5;
}
if (iVar10 - uVar5 == 0) {
*puVar7 = 6;
uVar5 = uVar9 + iVar10;
}
else {
*puVar7 = 1;
*(short *)(puVar7 + 1) = (short)lVar14;
if (param_5 == 0) {
puVar7 = puVar7 + 3;
}
else {
iVar8 = iVar10 - uVar5;
if ((uint)(iVar10 - param_5) <= uVar5) {
iVar8 = param_5;
}
if (-1 < param_5) {
iVar8 = param_5;
}
puVar7[3] = 2;
*(short *)(puVar7 + 4) = (short)iVar8;
puVar7 = puVar7 + 6;
uVar5 = iVar8 + uVar5;
}
uVar6 = uVar5 - iVar10;
if (uVar9 + iVar10 <= uVar5) {
uVar6 = uVar9;
}
*puVar7 = 3;
local_b0 = (ulong)uVar6;
}
*(short *)(puVar7 + 1) = (short)local_b0;
local_c8 = local_58;
uVar11 = (int)(puVar7 + 3) - (int)local_c8;
local_c0 = (ulong)uVar11;
iVar10 = (int)local_b0;
uVar9 = *(uint *)(param_1 + 4);
uVar13 = 4;
uVar6 = uVar5;
if (uVar5 != uVar12 && uVar5 != uVar9) {
uVar6 = uVar12;
if (uVar9 < uVar12) {
uVar6 = uVar9;
}
uVar12 = uVar6 - uVar5;
local_90 = (ulong)uVar12;
local_98 = (ulong)uVar5 + param_1[2];
puVar7[3] = 6;
*(short *)(puVar7 + 4) = (short)uVar12;
local_a0 = 3;
iVar10 = iVar10 + 3 + uVar12;
uVar13 = 6;
local_a8 = puVar7 + 3;
}
*(uint *)((long)param_1 + 0x24) = uVar6;
local_b8 = param_3;
cVar4 = translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar11 + iVar10,uVar13,local_e8,local_c8,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return -(uint)(cVar4 != '\0');
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,465 | copy_uca_collation | eloqsql/mysys/charset.c | static void
copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from,
CHARSET_INFO *loaded)
{
to->cset= from->cset;
to->coll= from->coll;
/*
Single-level UCA collation have strnxfrm_multiple=8.
In case of a multi-level UCA collation we use strnxfrm_multiply=4.
That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller
to allocate a buffer smaller size for each level, for performance purpose,
and to fit longer VARCHARs to @@max_sort_length.
This makes filesort produce non-precise order for some rare Unicode
characters that produce more than 4 weights (long expansions).
UCA requires 2 bytes per weight multiplied by the number of levels.
In case of a 2-level collation, each character requires 4*2=8 bytes.
Therefore, the longest VARCHAR that fits into the default @@max_sort_length
is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64)
would fit.
Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4,
for the same purpose.
TODO: we could add a new LDML syntax to choose strxfrm_multiply value.
*/
to->strxfrm_multiply= loaded->levels_for_order > 1 ?
4 : from->strxfrm_multiply;
to->min_sort_char= from->min_sort_char;
to->max_sort_char= from->max_sort_char;
to->mbminlen= from->mbminlen;
to->mbmaxlen= from->mbmaxlen;
to->caseup_multiply= from->caseup_multiply;
to->casedn_multiply= from->casedn_multiply;
to->state|= MY_CS_AVAILABLE | MY_CS_LOADED |
MY_CS_STRNXFRM | MY_CS_UNICODE;
} | O3 | c | copy_uca_collation:
pushq %rbp
movq %rsp, %rbp
movq 0xb8(%rsi), %rax
movq %rax, 0xb8(%rdi)
movq 0xc0(%rsi), %rax
movq %rax, 0xc0(%rdi)
movl $0x4, %eax
cmpb $0x1, 0xb2(%rdx)
ja 0x93693
movl 0x90(%rsi), %eax
movl %eax, 0x90(%rdi)
movq 0xa0(%rsi), %rax
movq %rax, 0xa0(%rdi)
movq 0xa8(%rsi), %rax
movq %rax, 0xa8(%rdi)
movl 0x98(%rsi), %eax
movl %eax, 0x98(%rdi)
movl 0x9c(%rsi), %eax
movl %eax, 0x9c(%rdi)
movb 0x94(%rsi), %al
movb %al, 0x94(%rdi)
movb 0x95(%rsi), %al
movb %al, 0x95(%rdi)
orl $0x2c8, 0xc(%rdi) # imm = 0x2C8
popq %rbp
retq
| copy_uca_collation:
push rbp
mov rbp, rsp
mov rax, [rsi+0B8h]
mov [rdi+0B8h], rax
mov rax, [rsi+0C0h]
mov [rdi+0C0h], rax
mov eax, 4
cmp byte ptr [rdx+0B2h], 1
ja short loc_93693
mov eax, [rsi+90h]
loc_93693:
mov [rdi+90h], eax
mov rax, [rsi+0A0h]
mov [rdi+0A0h], rax
mov rax, [rsi+0A8h]
mov [rdi+0A8h], rax
mov eax, [rsi+98h]
mov [rdi+98h], eax
mov eax, [rsi+9Ch]
mov [rdi+9Ch], eax
mov al, [rsi+94h]
mov [rdi+94h], al
mov al, [rsi+95h]
mov [rdi+95h], al
or dword ptr [rdi+0Ch], 2C8h
pop rbp
retn
| char copy_uca_collation(long long a1, long long a2, long long a3)
{
int v3; // eax
char result; // al
*(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184);
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192);
v3 = 4;
if ( *(_BYTE *)(a3 + 178) <= 1u )
v3 = *(_DWORD *)(a2 + 144);
*(_DWORD *)(a1 + 144) = v3;
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160);
*(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168);
*(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152);
*(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156);
*(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148);
result = *(_BYTE *)(a2 + 149);
*(_BYTE *)(a1 + 149) = result;
*(_DWORD *)(a1 + 12) |= 0x2C8u;
return result;
}
| copy_uca_collation:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RSI + 0xb8]
MOV qword ptr [RDI + 0xb8],RAX
MOV RAX,qword ptr [RSI + 0xc0]
MOV qword ptr [RDI + 0xc0],RAX
MOV EAX,0x4
CMP byte ptr [RDX + 0xb2],0x1
JA 0x00193693
MOV EAX,dword ptr [RSI + 0x90]
LAB_00193693:
MOV dword ptr [RDI + 0x90],EAX
MOV RAX,qword ptr [RSI + 0xa0]
MOV qword ptr [RDI + 0xa0],RAX
MOV RAX,qword ptr [RSI + 0xa8]
MOV qword ptr [RDI + 0xa8],RAX
MOV EAX,dword ptr [RSI + 0x98]
MOV dword ptr [RDI + 0x98],EAX
MOV EAX,dword ptr [RSI + 0x9c]
MOV dword ptr [RDI + 0x9c],EAX
MOV AL,byte ptr [RSI + 0x94]
MOV byte ptr [RDI + 0x94],AL
MOV AL,byte ptr [RSI + 0x95]
MOV byte ptr [RDI + 0x95],AL
OR dword ptr [RDI + 0xc],0x2c8
POP RBP
RET
|
void copy_uca_collation(long param_1,long param_2,long param_3)
{
int4 uVar1;
*(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8);
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0);
uVar1 = 4;
if (*(byte *)(param_3 + 0xb2) < 2) {
uVar1 = *(int4 *)(param_2 + 0x90);
}
*(int4 *)(param_1 + 0x90) = uVar1;
*(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0);
*(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8);
*(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98);
*(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c);
*(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94);
*(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95);
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8;
return;
}
|
|
1,466 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0xb5f9d
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0xb5f9d
incq %r10
cmpq %r11, %r10
jb 0xb5f8a
cmpq %r11, %r10
je 0xb6085
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0xb6062
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0xb6011
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0xb6000
addb $-0x37, %r12b
jmp 0xb600e
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0xb6050
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0xb6050
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0xb6028
movq %rdi, %r15
jmp 0xb603f
jne 0xb6031
movq %rax, %r15
cmpl %edx, %ebx
ja 0xb603f
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0xb5fdd
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0xb6064
movb $0x1, %al
cmpq %r10, %r11
je 0xb6085
testq %r8, %r8
je 0xb6071
movq %r11, (%r8)
testb %al, %al
je 0xb6098
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0xb60a6
movl $0x21, (%r9)
testq %r8, %r8
je 0xb6094
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0xb60a6
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_B5F9D
mov rax, [rdi+40h]
mov r10, rsi
loc_B5F8A:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_B5F9D
inc r10
cmp r10, r11
jb short loc_B5F8A
loc_B5F9D:
cmp r10, r11
jz loc_B6085
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_B6062
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_B5FDD:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_B6011
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_B6000
add r12b, 0C9h
jmp short loc_B600E
loc_B6000:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_B6050
add r12b, 0A9h
loc_B600E:
mov ebx, r12d
loc_B6011:
movzx ebx, bl
cmp ebx, ecx
jge short loc_B6050
mov r12d, 1
cmp rdi, rax
jbe short loc_B6028
mov r15, rdi
jmp short loc_B603F
loc_B6028:
jnz short loc_B6031
mov r15, rax
cmp ebx, edx
ja short loc_B603F
loc_B6031:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_B603F:
inc r14
cmp r14, r11
jnz short loc_B5FDD
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_B6050:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_B6064
loc_B6062:
mov al, 1
loc_B6064:
cmp r11, r10
jz short loc_B6085
test r8, r8
jz short loc_B6071
mov [r8], r11
loc_B6071:
test al, al
jz short loc_B6098
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_B60A6
loc_B6085:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_B6094
mov [r8], rsi
loc_B6094:
xor eax, eax
jmp short loc_B60A6
loc_B6098:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_B60A6:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x001b5f9d
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_001b5f8a:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x001b5f9d
INC R10
CMP R10,R11
JC 0x001b5f8a
LAB_001b5f9d:
CMP R10,R11
JZ 0x001b6085
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x001b6062
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_001b5fdd:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x001b6011
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x001b6000
ADD R12B,0xc9
JMP 0x001b600e
LAB_001b6000:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x001b6050
ADD R12B,0xa9
LAB_001b600e:
MOV EBX,R12D
LAB_001b6011:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x001b6050
MOV R12D,0x1
CMP RDI,RAX
JBE 0x001b6028
MOV R15,RDI
JMP 0x001b603f
LAB_001b6028:
JNZ 0x001b6031
MOV R15,RAX
CMP EBX,EDX
JA 0x001b603f
LAB_001b6031:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_001b603f:
INC R14
CMP R14,R11
JNZ 0x001b5fdd
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_001b6050:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x001b6064
LAB_001b6062:
MOV AL,0x1
LAB_001b6064:
CMP R11,R10
JZ 0x001b6085
TEST R8,R8
JZ 0x001b6071
MOV qword ptr [R8],R11
LAB_001b6071:
TEST AL,AL
JZ 0x001b6098
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x001b60a6
LAB_001b6085:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x001b6094
MOV qword ptr [R8],RSI
LAB_001b6094:
XOR EAX,EAX
JMP 0x001b60a6
LAB_001b6098:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_001b60a6:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b6050;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_001b6050;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_001b6050:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
|
|
1,467 | ma_gets | eloqsql/libmariadb/libmariadb/ma_io.c | char *ma_gets(char *ptr, size_t size, MA_FILE *file)
{
if (!file)
return NULL;
switch (file->type) {
case MA_FILE_LOCAL:
return fgets(ptr, (int)size, (FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mgets(ptr, size, file);
break;
#endif
default:
return NULL;
}
} | O3 | c | ma_gets:
pushq %rbp
movq %rsp, %rbp
testq %rdx, %rdx
je 0x85376
movl (%rdx), %eax
cmpl $0x2, %eax
je 0x8537a
cmpl $0x1, %eax
jne 0x85376
movq 0x8(%rdx), %rdx
popq %rbp
jmp 0x5f700
xorl %eax, %eax
popq %rbp
retq
leaq 0x3dabaf(%rip), %rax # 0x45ff30
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x20(%rax), %rax
popq %rbp
jmpq *%rax
nop
| ma_gets:
push rbp
mov rbp, rsp
test rdx, rdx
jz short loc_85376
mov eax, [rdx]
cmp eax, 2
jz short loc_8537A
cmp eax, 1
jnz short loc_85376
mov rdx, [rdx+8]
pop rbp
jmp _fgets
loc_85376:
xor eax, eax
pop rbp
retn
loc_8537A:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+20h]
pop rbp
jmp rax
| long long ma_gets(long long a1, long long a2, long long a3)
{
if ( !a3 )
return 0LL;
if ( *(_DWORD *)a3 != 2 )
{
if ( *(_DWORD *)a3 == 1 )
return fgets(a1, a2, *(_QWORD *)(a3 + 8));
return 0LL;
}
return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))();
}
| ma_gets:
PUSH RBP
MOV RBP,RSP
TEST RDX,RDX
JZ 0x00185376
MOV EAX,dword ptr [RDX]
CMP EAX,0x2
JZ 0x0018537a
CMP EAX,0x1
JNZ 0x00185376
MOV RDX,qword ptr [RDX + 0x8]
POP RBP
JMP 0x0015f700
LAB_00185376:
XOR EAX,EAX
POP RBP
RET
LAB_0018537a:
LEA RAX,[0x55ff30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x20]
POP RBP
JMP RAX
|
char * ma_gets(char *param_1,int param_2,int *param_3)
{
char *pcVar1;
if (param_3 != (int *)0x0) {
if (*param_3 == 2) {
/* WARNING: Could not recover jumptable at 0x0018538d. Too many branches */
/* WARNING: Treating indirect jump as call */
pcVar1 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))();
return pcVar1;
}
if (*param_3 == 1) {
pcVar1 = fgets(param_1,param_2,*(FILE **)(param_3 + 2));
return pcVar1;
}
}
return (char *)0x0;
}
|
|
1,468 | my_b_cache_write_r | eloqsql/mysys/mf_iocache.c | static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
my_off_t old_pos_in_file= info->pos_in_file;
int res= _my_b_cache_write(info, Buffer, Count);
if (res)
return res;
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
DBUG_ASSERT(info->share);
copy_to_read_buffer(info, Buffer, old_pos_in_file);
return 0;
} | O3 | c | my_b_cache_write_r:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq (%rdi), %r15
movq %rdi, -0x30(%rbp)
callq 0x52ad1
testl %eax, %eax
jne 0x51a7e
movq -0x30(%rbp), %rax
movq (%rax), %r12
xorl %eax, %eax
subq %r15, %r12
je 0x51a7e
movq %r15, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x98(%rax), %r15
movq -0x30(%rbp), %r14
movq 0xe8(%r14), %r13
cmpq %r13, %r12
cmovbq %r12, %r13
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x52ca2
movq 0xc8(%r15), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x282c0
movl $0x0, 0xe0(%r15)
movq 0xc8(%r15), %rax
addq %r13, %rax
movq %rax, 0xd0(%r15)
movq -0x38(%rbp), %rax
movq %rax, 0xb8(%r15)
movq 0x98(%r14), %rdi
callq 0x52ea3
addq %r13, %rbx
subq %r13, %r12
jne 0x51a15
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _my_b_cache_write_r:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov r15, [rdi]
mov [rbp+var_30], rdi
call _my_b_cache_write
test eax, eax
jnz loc_51A7E
mov rax, [rbp+var_30]
mov r12, [rax]
xor eax, eax
sub r12, r15
jz short loc_51A7E
mov [rbp+var_38], r15
mov rax, [rbp+var_30]
mov r15, [rax+98h]
mov r14, [rbp+var_30]
loc_51A15:
mov r13, [r14+0E8h]
cmp r12, r13
cmovb r13, r12
mov rdi, r14
mov rsi, [rbp+var_38]
call lock_io_cache
mov rdi, [r15+0C8h]
mov rsi, rbx
mov rdx, r13
call _memcpy
mov dword ptr [r15+0E0h], 0
mov rax, [r15+0C8h]
add rax, r13
mov [r15+0D0h], rax
mov rax, [rbp+var_38]
mov [r15+0B8h], rax
mov rdi, [r14+98h]
call unlock_io_cache
add rbx, r13
sub r12, r13
jnz short loc_51A15
xor eax, eax
loc_51A7E:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_b_cache_write_r(long long *a1, long long a2)
{
long long v3; // r15
long long result; // rax
unsigned long long v5; // r12
long long v6; // r15
unsigned long long v7; // r13
long long v8; // [rsp+8h] [rbp-38h]
v3 = *a1;
result = my_b_cache_write();
if ( !(_DWORD)result )
{
result = 0LL;
v5 = *a1 - v3;
if ( *a1 != v3 )
{
v8 = v3;
v6 = a1[19];
do
{
v7 = a1[29];
if ( v5 < v7 )
v7 = v5;
lock_io_cache(a1, v8);
memcpy(*(_QWORD *)(v6 + 200), a2, v7);
*(_DWORD *)(v6 + 224) = 0;
*(_QWORD *)(v6 + 208) = v7 + *(_QWORD *)(v6 + 200);
*(_QWORD *)(v6 + 184) = v8;
unlock_io_cache(a1[19]);
a2 += v7;
v5 -= v7;
}
while ( v5 );
return 0LL;
}
}
return result;
}
| _my_b_cache_write_r:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R15,qword ptr [RDI]
MOV qword ptr [RBP + -0x30],RDI
CALL 0x00152ad1
TEST EAX,EAX
JNZ 0x00151a7e
MOV RAX,qword ptr [RBP + -0x30]
MOV R12,qword ptr [RAX]
XOR EAX,EAX
SUB R12,R15
JZ 0x00151a7e
MOV qword ptr [RBP + -0x38],R15
MOV RAX,qword ptr [RBP + -0x30]
MOV R15,qword ptr [RAX + 0x98]
MOV R14,qword ptr [RBP + -0x30]
LAB_00151a15:
MOV R13,qword ptr [R14 + 0xe8]
CMP R12,R13
CMOVC R13,R12
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00152ca2
MOV RDI,qword ptr [R15 + 0xc8]
MOV RSI,RBX
MOV RDX,R13
CALL 0x001282c0
MOV dword ptr [R15 + 0xe0],0x0
MOV RAX,qword ptr [R15 + 0xc8]
ADD RAX,R13
MOV qword ptr [R15 + 0xd0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [R15 + 0xb8],RAX
MOV RDI,qword ptr [R14 + 0x98]
CALL 0x00152ea3
ADD RBX,R13
SUB R12,R13
JNZ 0x00151a15
XOR EAX,EAX
LAB_00151a7e:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _my_b_cache_write_r(long *param_1,void *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
ulong uVar4;
ulong __n;
lVar1 = *param_1;
uVar3 = _my_b_cache_write();
if ((int)uVar3 == 0) {
uVar3 = 0;
uVar4 = *param_1 - lVar1;
if (uVar4 != 0) {
lVar2 = param_1[0x13];
do {
__n = param_1[0x1d];
if (uVar4 < (ulong)param_1[0x1d]) {
__n = uVar4;
}
lock_io_cache(param_1,lVar1);
memcpy(*(void **)(lVar2 + 200),param_2,__n);
*(int4 *)(lVar2 + 0xe0) = 0;
*(ulong *)(lVar2 + 0xd0) = *(long *)(lVar2 + 200) + __n;
*(long *)(lVar2 + 0xb8) = lVar1;
unlock_io_cache(param_1[0x13]);
param_2 = (void *)((long)param_2 + __n);
uVar4 = uVar4 - __n;
} while (uVar4 != 0);
uVar3 = 0;
}
}
return uVar3;
}
|
|
1,469 | ma_apply_redo_free_head_or_tail | eloqsql/storage/maria/ma_blockrec.c | uint _ma_apply_redo_free_head_or_tail(MARIA_HA *info, LSN lsn,
const uchar *header)
{
MARIA_SHARE *share= info->s;
uchar *buff;
pgcache_page_no_t page;
MARIA_PINNED_PAGE page_link;
my_bool res;
DBUG_ENTER("_ma_apply_redo_free_head_or_tail");
share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
page= page_korr(header);
if (!(buff= pagecache_read(share->pagecache,
&info->dfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_WRITE, &page_link.link)))
{
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
goto err;
}
if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 1, page);
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
}
else
{
buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE;
#ifdef IDENTICAL_PAGES_AFTER_RECOVERY
{
uint number_of_records= (uint) buff[DIR_COUNT_OFFSET];
uchar *dir= dir_entry_pos(buff, share->block_size,
number_of_records-1);
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
bzero(dir, number_of_records * DIR_ENTRY_SIZE);
}
#endif
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
}
/** @todo leave bitmap lock to the bitmap code... */
mysql_mutex_lock(&share->bitmap.bitmap_lock);
res= _ma_bitmap_reset_full_page_bits(info, &share->bitmap, page, 1);
mysql_mutex_unlock(&share->bitmap.bitmap_lock);
if (res)
goto err;
DBUG_RETURN(0);
err:
_ma_mark_file_crashed(share);
DBUG_ASSERT(!maria_assert_if_crashed_table);
DBUG_RETURN(1);
} | O3 | c | ma_apply_redo_free_head_or_tail:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq (%rdi), %rbx
orl $0x181, 0x170(%rbx) # imm = 0x181
movq %rsi, %r12
movl (%rdx), %eax
movzbl 0x4(%rdx), %r15d
shlq $0x20, %r15
orq %rax, %r15
movq 0x600(%rbx), %rdi
leaq 0x470(%r14), %rsi
leaq -0x40(%rbp), %rax
xorl %r13d, %r13d
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x72726
addq $0x10, %rsp
testq %rax, %rax
je 0x4f10d
movzwl (%rax), %ecx
shlq $0x20, %rcx
movzbl 0x2(%rax), %edx
shlq $0x30, %rdx
orq %rcx, %rdx
movl 0x3(%rax), %esi
orq %rdx, %rsi
cmpq %r12, %rsi
jge 0x4f13a
movb $0x0, 0x7(%rax)
leaq -0x40(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
leaq 0x2e8(%r14), %rdi
callq 0x985d6
jmp 0x4f172
movq 0x600(%rbx), %rdi
movq -0x40(%rbp), %rsi
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r13
pushq %r13
callq 0x72441
addq $0x10, %rsp
jmp 0x4f1c1
movq %r14, %rdi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6d335
movq 0x600(%rbx), %rdi
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x72441
addq $0x10, %rsp
leaq 0xa10(%rbx), %r13
leaq 0xa98(%rbx), %r12
cmpq $0x0, 0xad8(%rbx)
jne 0x4f1e1
movq %r12, %rdi
callq 0x2a200
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x54e0e
movl %eax, %r14d
movq 0xad8(%rbx), %rdi
testq %rdi, %rdi
jne 0x4f1f7
movq %r12, %rdi
callq 0x2a1d0
testb %r14b, %r14b
je 0x4f1d0
movq %rbx, %rdi
callq 0x431a6
movl $0x1, %eax
jmp 0x4f1d2
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x96072(%rip), %rsi # 0xe525a
movq %r12, %rdi
movl $0x1a93, %edx # imm = 0x1A93
callq 0x308cf
jmp 0x4f192
leaq 0x34485a(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4f1b4
| _ma_apply_redo_free_head_or_tail:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdi
mov rbx, [rdi]
or dword ptr [rbx+170h], 181h
mov r12, rsi
mov eax, [rdx]
movzx r15d, byte ptr [rdx+4]
shl r15, 20h
or r15, rax
mov rdi, [rbx+600h]
lea rsi, [r14+470h]
lea rax, [rbp+var_40]
xor r13d, r13d
mov rdx, r15
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz short loc_4F10D
movzx ecx, word ptr [rax]
shl rcx, 20h
movzx edx, byte ptr [rax+2]
shl rdx, 30h
or rdx, rcx
mov esi, [rax+3]
or rsi, rdx
cmp rsi, r12
jge short loc_4F13A
mov byte ptr [rax+7], 0
lea rsi, [rbp+var_40]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
lea rdi, [r14+2E8h]
call insert_dynamic
jmp short loc_4F172
loc_4F10D:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_40]
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push r13
push r13
call pagecache_unlock_by_link
add rsp, 10h
jmp loc_4F1C1
loc_4F13A:
mov rdi, r14
mov edx, 1
mov rcx, r15
call check_skipped_lsn
mov rdi, [rbx+600h]
mov rsi, [rbp+var_40]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
loc_4F172:
lea r13, [rbx+0A10h]
lea r12, [rbx+0A98h]
cmp qword ptr [rbx+0AD8h], 0
jnz short loc_4F1E1
mov rdi, r12
call _pthread_mutex_lock
loc_4F192:
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov ecx, 1
call _ma_bitmap_reset_full_page_bits
mov r14d, eax
mov rdi, [rbx+0AD8h]
test rdi, rdi
jnz short loc_4F1F7
loc_4F1B4:
mov rdi, r12
call _pthread_mutex_unlock
test r14b, r14b
jz short loc_4F1D0
loc_4F1C1:
mov rdi, rbx
call _ma_mark_file_crashed
mov eax, 1
jmp short loc_4F1D2
loc_4F1D0:
xor eax, eax
loc_4F1D2:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4F1E1:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov edx, 1A93h
call psi_mutex_lock
jmp short loc_4F192
loc_4F1F7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4F1B4
| long long ma_apply_redo_free_head_or_tail(long long *a1, signed long long a2, unsigned int *a3)
{
long long v3; // rbx
unsigned long long v5; // r15
unsigned __int16 *v6; // rax
signed long long v7; // rsi
char v8; // r14
long long v10; // [rsp+0h] [rbp-40h] BYREF
int v11; // [rsp+8h] [rbp-38h]
char v12; // [rsp+10h] [rbp-30h]
v3 = *a1;
*(_DWORD *)(v3 + 368) |= 0x181u;
v5 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v6 = (unsigned __int16 *)pagecache_read(*(_QWORD *)(v3 + 1536), (int)a1 + 1136, *a3, 0, 0, 1, 4, (long long)&v10);
if ( !v6 )
{
pagecache_unlock_by_link(*(_QWORD *)(v3 + 1536), v10, 6, 3, 0, 0, 0LL, 0LL);
LABEL_11:
ma_mark_file_crashed(v3);
return 1LL;
}
v7 = ((unsigned long long)*v6 << 32) | ((unsigned long long)*((unsigned __int8 *)v6 + 2) << 48) | *(unsigned int *)((char *)v6 + 3);
if ( v7 >= a2 )
{
check_skipped_lsn(a1, v7, 1LL, v5);
pagecache_unlock_by_link(*(_QWORD *)(v3 + 1536), v10, 6, 3, 0, 0, 0LL, 0LL);
}
else
{
*((_BYTE *)v6 + 7) = 0;
v11 = 6;
v12 = 1;
insert_dynamic(a1 + 93, &v10);
}
if ( *(_QWORD *)(v3 + 2776) )
psi_mutex_lock(v3 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1A93u);
else
pthread_mutex_lock(v3 + 2712);
v8 = ma_bitmap_reset_full_page_bits(a1, v3 + 2576, v5, 1LL);
if ( *(_QWORD *)(v3 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v3 + 2712);
if ( v8 )
goto LABEL_11;
return 0LL;
}
| _ma_apply_redo_free_head_or_tail:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV RBX,qword ptr [RDI]
OR dword ptr [RBX + 0x170],0x181
MOV R12,RSI
MOV EAX,dword ptr [RDX]
MOVZX R15D,byte ptr [RDX + 0x4]
SHL R15,0x20
OR R15,RAX
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[R14 + 0x470]
LEA RAX,[RBP + -0x40]
XOR R13D,R13D
MOV RDX,R15
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00172726
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0014f10d
MOVZX ECX,word ptr [RAX]
SHL RCX,0x20
MOVZX EDX,byte ptr [RAX + 0x2]
SHL RDX,0x30
OR RDX,RCX
MOV ESI,dword ptr [RAX + 0x3]
OR RSI,RDX
CMP RSI,R12
JGE 0x0014f13a
MOV byte ptr [RAX + 0x7],0x0
LEA RSI,[RBP + -0x40]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
LEA RDI,[R14 + 0x2e8]
CALL 0x001985d6
JMP 0x0014f172
LAB_0014f10d:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH R13
PUSH R13
CALL 0x00172441
ADD RSP,0x10
JMP 0x0014f1c1
LAB_0014f13a:
MOV RDI,R14
MOV EDX,0x1
MOV RCX,R15
CALL 0x0016d335
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x40]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x00172441
ADD RSP,0x10
LAB_0014f172:
LEA R13,[RBX + 0xa10]
LEA R12,[RBX + 0xa98]
CMP qword ptr [RBX + 0xad8],0x0
JNZ 0x0014f1e1
MOV RDI,R12
CALL 0x0012a200
LAB_0014f192:
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV ECX,0x1
CALL 0x00154e0e
MOV R14D,EAX
MOV RDI,qword ptr [RBX + 0xad8]
TEST RDI,RDI
JNZ 0x0014f1f7
LAB_0014f1b4:
MOV RDI,R12
CALL 0x0012a1d0
TEST R14B,R14B
JZ 0x0014f1d0
LAB_0014f1c1:
MOV RDI,RBX
CALL 0x001431a6
MOV EAX,0x1
JMP 0x0014f1d2
LAB_0014f1d0:
XOR EAX,EAX
LAB_0014f1d2:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014f1e1:
LEA RSI,[0x1e525a]
MOV RDI,R12
MOV EDX,0x1a93
CALL 0x001308cf
JMP 0x0014f192
LAB_0014f1f7:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014f1b4
|
int8 _ma_apply_redo_free_head_or_tail(long *param_1,long param_2,uint5 *param_3)
{
pthread_mutex_t *__mutex;
long lVar1;
char cVar2;
ushort *puVar3;
ulong uVar4;
ulong uVar5;
int8 local_48;
int4 local_40;
int1 local_38;
lVar1 = *param_1;
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x181;
uVar5 = (ulong)*param_3;
puVar3 = (ushort *)
pagecache_read(*(int8 *)(lVar1 + 0x600),param_1 + 0x8e,uVar5,0,0,1,4,&local_48);
if (puVar3 == (ushort *)0x0) {
pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_48,6,3,0,0,0,0);
}
else {
uVar4 = (ulong)*(uint *)((long)puVar3 + 3) |
(ulong)(byte)puVar3[1] << 0x30 | (ulong)*puVar3 << 0x20;
if ((long)uVar4 < param_2) {
*(int1 *)((long)puVar3 + 7) = 0;
local_40 = 6;
local_38 = 1;
insert_dynamic(param_1 + 0x5d);
}
else {
check_skipped_lsn(param_1,uVar4,1,uVar5);
pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_48,6,3,0,0,0,0);
}
__mutex = (pthread_mutex_t *)(lVar1 + 0xa98);
if (*(long *)(lVar1 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c",
0x1a93);
}
cVar2 = _ma_bitmap_reset_full_page_bits(param_1,lVar1 + 0xa10,uVar5,1);
if (*(long *)(lVar1 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (cVar2 == '\0') {
return 0;
}
}
_ma_mark_file_crashed(lVar1);
return 1;
}
|
|
1,470 | testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest.h | TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
const char* type_param, const char* value_param,
const char* file, int line, Factory factory) {
using TestT = typename std::remove_pointer<decltype(factory())>::type;
class FactoryImpl : public internal::TestFactoryBase {
public:
explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}
Test* CreateTest() override { return factory_(); }
private:
Factory factory_;
};
return internal::MakeAndRegisterTestInfo(
test_suite_name, test_name, type_param, value_param,
internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),
internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line),
internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line),
new FactoryImpl{std::move(factory)});
} | O0 | c | testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0):
subq $0x198, %rsp # imm = 0x198
movq 0x1a0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
movq %rcx, 0x178(%rsp)
movq %r8, 0x170(%rsp)
movl %r9d, 0x16c(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x147(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x16d00
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0x1dbb0
jmp 0xc5838
movq 0x188(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0xe7(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x16d00
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x1dbb0
jmp 0xc5897
movl 0x16c(%rsp), %edx
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1dc70
jmp 0xc58b5
callq 0xe73e0
movq %rax, 0x48(%rsp)
jmp 0xc58c1
movq 0x170(%rsp), %rdi
movl 0x16c(%rsp), %esi
callq 0xe73f0
movq %rax, 0x40(%rsp)
jmp 0xc58dc
movq 0x170(%rsp), %rdi
movl 0x16c(%rsp), %esi
callq 0xe7550
movq %rax, 0x38(%rsp)
jmp 0xc58f7
movl $0x50, %edi
callq 0x16700
movq %rax, 0x30(%rsp)
jmp 0xc5908
movq 0x78(%rsp), %rsi
movb $0x1, 0x97(%rsp)
leaq 0x98(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xe76b0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xe76f0
jmp 0xc5938
movq 0x48(%rsp), %r9
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r10
movb $0x0, 0x97(%rsp)
movq %rsp, %rax
movq %r10, 0x10(%rax)
movq %r8, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x148(%rsp), %rdi
leaq 0x108(%rsp), %r8
callq 0xcf110
movq %rax, 0x20(%rsp)
jmp 0xc598d
leaq 0x98(%rsp), %rdi
callq 0xc5ae0
leaq 0x108(%rsp), %rdi
callq 0x1dfc0
leaq 0xe8(%rsp), %rdi
callq 0x1dfd0
leaq 0xe7(%rsp), %rdi
callq 0x16790
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
leaq 0x147(%rsp), %rdi
callq 0x16790
movq 0x20(%rsp), %rax
addq $0x198, %rsp # imm = 0x198
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc5ab8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc5a9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc5a91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc5a84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xc5ae0
testb $0x1, 0x97(%rsp)
jne 0xc5a73
jmp 0xc5a82
movq 0x30(%rsp), %rdi
movl $0x50, %esi
callq 0x16720
jmp 0xc5a84
leaq 0x108(%rsp), %rdi
callq 0x1dfc0
leaq 0xe8(%rsp), %rdi
callq 0x1dfd0
leaq 0xe7(%rsp), %rdi
callq 0x16790
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
leaq 0x147(%rsp), %rdi
callq 0x16790
movq 0x138(%rsp), %rdi
callq 0x16cf0
nopw %cs:(%rax,%rax)
| _ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_:
sub rsp, 198h
mov rax, qword ptr [rsp+198h+arg_0]
mov qword ptr [rsp+198h+var_120], rax; int
mov qword ptr [rsp+198h+var_8], rdi
mov qword ptr [rsp+198h+var_10], rsi
mov qword ptr [rsp+198h+var_18], rdx
mov qword ptr [rsp+198h+var_20], rcx
mov qword ptr [rsp+198h+var_28], r8
mov [rsp+198h+var_2C], r9d
mov rax, qword ptr [rsp+198h+var_8]
mov qword ptr [rsp+198h+var_118], rax; int
lea rdi, [rsp+198h+var_51]
mov [rsp+198h+var_110], rdi; __int64
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+198h+var_118]
mov rdx, [rsp+198h+var_110]
lea rdi, [rsp+198h+var_51+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C5838:
mov rax, qword ptr [rsp+198h+var_10]
mov qword ptr [rsp+198h+var_148], rax; int
mov rax, qword ptr [rsp+198h+var_18]
mov qword ptr [rsp+198h+var_140], rax; char
mov rax, qword ptr [rsp+198h+var_20]
mov qword ptr [rsp+198h+var_138], rax; int
mov rax, qword ptr [rsp+198h+var_28]
mov qword ptr [rsp+198h+var_130], rax; int
lea rdi, [rsp+198h+var_B1]
mov qword ptr [rsp+198h+var_128], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+198h+var_130]
mov rdx, qword ptr [rsp+198h+var_128]
lea rdi, [rsp+198h+var_B1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C5897:
mov edx, [rsp+198h+var_2C]
lea rdi, [rsp+198h+var_90]
lea rsi, [rsp+198h+var_B1+1]
call _ZN7testing8internal12CodeLocationC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::CodeLocation::CodeLocation(std::string,int)
jmp short $+2
loc_C58B5:
call _ZN7testing8internal9GetTypeIdINS0_12_GLOBAL__N_111FailureTestEEEPKvv; testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>(void)
mov qword ptr [rsp+198h+var_150], rax; int
jmp short $+2
loc_C58C1:
mov rdi, qword ptr [rsp+198h+var_28]
mov esi, [rsp+198h+var_2C]
call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE19GetSetUpCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite(char const*,int)
mov qword ptr [rsp+198h+var_158], rax; int
jmp short $+2
loc_C58DC:
mov rdi, qword ptr [rsp+198h+var_28]
mov esi, [rsp+198h+var_2C]
call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE22GetTearDownCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite(char const*,int)
mov [rsp+198h+var_160], rax; void *
jmp short $+2
loc_C58F7:
mov edi, 50h ; 'P'; unsigned __int64
call __Znwm; operator new(ulong)
mov qword ptr [rsp+198h+var_168], rax; int
jmp short $+2
loc_C5908:
mov rsi, qword ptr [rsp+198h+var_120]
mov [rsp+198h+var_101], 1
lea rdi, [rsp+198h+var_100]
mov qword ptr [rsp+198h+var_170], rdi; int
call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0C2EOSA_; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::$_0($_0&&)
mov rdi, qword ptr [rsp+198h+var_168]
mov rsi, qword ptr [rsp+198h+var_170]
call _ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_
jmp short $+2
loc_C5938:
mov r9, qword ptr [rsp+198h+var_150]
mov rcx, qword ptr [rsp+198h+var_138]
mov rdx, qword ptr [rsp+198h+var_140]
mov rsi, qword ptr [rsp+198h+var_148]
mov rdi, qword ptr [rsp+198h+var_158]
mov r8, [rsp+198h+var_160]
mov r10, qword ptr [rsp+198h+var_168]
mov [rsp+198h+var_101], 0
mov rax, rsp
mov [rax+10h], r10
mov [rax+8], r8
mov [rax], rdi
lea rdi, [rsp+198h+var_51+1]; int
lea r8, [rsp+198h+var_90]
call _ZN7testing8internal23MakeAndRegisterTestInfoENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcS8_S8_NS0_12CodeLocationEPKvPFvvESD_PNS0_15TestFactoryBaseE; testing::internal::MakeAndRegisterTestInfo(std::string,char const*,char const*,char const*,testing::internal::CodeLocation,void const*,void (*)(void),void (*)(void),testing::internal::TestFactoryBase *)
mov [rsp+198h+var_178], rax
jmp short $+2
loc_C598D:
lea rdi, [rsp+198h+var_100]
call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0()
lea rdi, [rsp+198h+var_90]; this
call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation()
lea rdi, [rsp+198h+var_B1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+198h+var_B1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+198h+var_51+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+198h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+198h+var_178]
add rsp, 198h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp loc_C5AB8
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp loc_C5A9E
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp short loc_C5A91
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp short loc_C5A84
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
lea rdi, [rsp+arg_90]
call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0()
test [rsp+arg_8F], 1
jnz short loc_C5A73
jmp short loc_C5A82
loc_C5A73:
mov rdi, [rsp+arg_28]; void *
mov esi, 50h ; 'P'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C5A82:
jmp short $+2
loc_C5A84:
lea rdi, [rsp+arg_100]; this
call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation()
loc_C5A91:
lea rdi, [rsp+arg_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C5A9E:
lea rdi, [rsp+arg_DF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C5AB8:
lea rdi, [rsp+arg_13F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_130]
call __Unwind_Resume
| long long ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
long long a7)
{
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
const char *v15; // rsi
int v17; // [rsp+18h] [rbp-180h]
int v18; // [rsp+20h] [rbp-178h]
long long v19; // [rsp+20h] [rbp-178h]
long long v20; // [rsp+30h] [rbp-168h]
void (*TearDownCaseOrSuite)(void); // [rsp+38h] [rbp-160h]
void (*SetUpCaseOrSuite)(void); // [rsp+40h] [rbp-158h]
int v23; // [rsp+48h] [rbp-150h]
int v24[2]; // [rsp+50h] [rbp-148h]
char v25; // [rsp+58h] [rbp-140h]
int v26; // [rsp+60h] [rbp-138h]
long long v27; // [rsp+68h] [rbp-130h]
int v28; // [rsp+90h] [rbp-108h]
int v29[8]; // [rsp+98h] [rbp-100h] BYREF
char v30; // [rsp+B8h] [rbp-E0h]
int v31[8]; // [rsp+E7h] [rbp-B1h] BYREF
_BYTE v32[63]; // [rsp+108h] [rbp-90h] BYREF
char v33; // [rsp+147h] [rbp-51h] BYREF
_BYTE v34[36]; // [rsp+148h] [rbp-50h] BYREF
int v35; // [rsp+16Ch] [rbp-2Ch]
int v36[2]; // [rsp+170h] [rbp-28h]
int v37[2]; // [rsp+178h] [rbp-20h]
char v38[8]; // [rsp+180h] [rbp-18h]
int v39[2]; // [rsp+188h] [rbp-10h]
int v40[2]; // [rsp+190h] [rbp-8h]
*(_QWORD *)v40 = a1;
*(_QWORD *)v39 = a2;
*(_QWORD *)v38 = a3;
*(_QWORD *)v37 = a4;
*(_QWORD *)v36 = a5;
v35 = a6;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v34, a1, (long long)&v33);
*(_QWORD *)v24 = *(_QWORD *)v39;
v25 = v38[0];
v26 = v37[0];
v27 = *(_QWORD *)v36;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v31 + 1, v27, (long long)v31);
testing::internal::CodeLocation::CodeLocation((long long)v32, (long long)v31 + 1, v35);
v23 = testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>();
SetUpCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite(
v36[0],
v35,
v7,
v8,
v9,
v10);
TearDownCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite(
v36[0],
v35,
v11,
v12,
v13,
v14);
v20 = operator new(0x50uLL);
testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::$_0(v29, a7);
ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_(
v20,
v29);
v15 = *(const char **)v24;
v19 = testing::internal::MakeAndRegisterTestInfo(
(int)v34,
SetUpCaseOrSuite,
TearDownCaseOrSuite,
v20,
v17,
v18,
(int)v29,
v20,
TearDownCaseOrSuite,
(int)SetUpCaseOrSuite,
v23,
v24[0],
v25,
v26,
v27,
(int)v31,
a7,
a1,
(long long)&v33,
v28,
v29[0],
v29[2],
v29[4],
v29[6],
v30);
testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0(v29);
testing::internal::CodeLocation::~CodeLocation((testing::internal::CodeLocation *)v32);
std::string::~string((char *)v31 + 1);
std::allocator<char>::~allocator(v31, v15);
std::string::~string(v34);
std::allocator<char>::~allocator(&v33, v15);
return v19;
}
| _ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_:
SUB RSP,0x198
MOV RAX,qword ptr [RSP + 0x1a0]
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x190],RDI
MOV qword ptr [RSP + 0x188],RSI
MOV qword ptr [RSP + 0x180],RDX
MOV qword ptr [RSP + 0x178],RCX
MOV qword ptr [RSP + 0x170],R8
MOV dword ptr [RSP + 0x16c],R9D
MOV RAX,qword ptr [RSP + 0x190]
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x147]
MOV qword ptr [RSP + 0x88],RDI
CALL 0x00116d00
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
LAB_001c5829:
LEA RDI,[RSP + 0x148]
CALL 0x0011dbb0
JMP 0x001c5838
LAB_001c5838:
MOV RAX,qword ptr [RSP + 0x188]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x180]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x178]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x170]
MOV qword ptr [RSP + 0x68],RAX
LEA RDI,[RSP + 0xe7]
MOV qword ptr [RSP + 0x70],RDI
CALL 0x00116d00
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LAB_001c5888:
LEA RDI,[RSP + 0xe8]
CALL 0x0011dbb0
JMP 0x001c5897
LAB_001c5897:
MOV EDX,dword ptr [RSP + 0x16c]
LAB_001c589e:
LEA RDI,[RSP + 0x108]
LEA RSI,[RSP + 0xe8]
CALL 0x0011dc70
JMP 0x001c58b5
LAB_001c58b5:
CALL 0x001e73e0
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001c58c1
LAB_001c58c1:
MOV RDI,qword ptr [RSP + 0x170]
MOV ESI,dword ptr [RSP + 0x16c]
CALL 0x001e73f0
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001c58dc
LAB_001c58dc:
MOV RDI,qword ptr [RSP + 0x170]
MOV ESI,dword ptr [RSP + 0x16c]
CALL 0x001e7550
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001c58f7
LAB_001c58f7:
MOV EDI,0x50
CALL 0x00116700
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001c5908
LAB_001c5908:
MOV RSI,qword ptr [RSP + 0x78]
MOV byte ptr [RSP + 0x97],0x1
LEA RDI,[RSP + 0x98]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001e76b0
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
LAB_001c5931:
CALL 0x001e76f0
JMP 0x001c5938
LAB_001c5938:
MOV R9,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x38]
MOV R10,qword ptr [RSP + 0x30]
MOV byte ptr [RSP + 0x97],0x0
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],R10
MOV qword ptr [RAX + 0x8],R8
MOV qword ptr [RAX],RDI
LEA RDI,[RSP + 0x148]
LEA R8,[RSP + 0x108]
CALL 0x001cf110
LAB_001c5986:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c598d
LAB_001c598d:
LEA RDI,[RSP + 0x98]
CALL 0x001c5ae0
LEA RDI,[RSP + 0x108]
CALL 0x0011dfc0
LEA RDI,[RSP + 0xe8]
CALL 0x0011dfd0
LEA RDI,[RSP + 0xe7]
CALL 0x00116790
LEA RDI,[RSP + 0x148]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x147]
CALL 0x00116790
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x198
RET
|
int8
_ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_
(char *param_1,int8 param_2,int8 param_3,int8 param_4,char *param_5,
int param_6,__0 *param_7)
{
char *pcVar1;
int8 uVar2;
int8 uVar3;
void *pvVar4;
int8 uVar5;
int8 uVar6;
void *pvVar7;
int8 uVar8;
__0 local_100 [79];
allocator local_b1;
string local_b0 [32];
CodeLocation local_90 [63];
allocator local_51;
string local_50 [36];
int local_2c;
char *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
char *local_8;
local_2c = param_6;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001c5829 to 001c5835 has its CatchHandler @ 001c59e8 */
std::__cxx11::string::string<std::allocator<char>>(local_50,param_1,&local_51);
uVar3 = local_10;
uVar2 = local_18;
uVar8 = local_20;
pcVar1 = local_28;
std::allocator<char>::allocator();
/* try { // try from 001c5888 to 001c5894 has its CatchHandler @ 001c5a01 */
std::__cxx11::string::string<std::allocator<char>>(local_b0,pcVar1,&local_b1);
/* try { // try from 001c589e to 001c58b2 has its CatchHandler @ 001c5a1a */
testing::internal::CodeLocation::CodeLocation(local_90,local_b0,local_2c);
/* try { // try from 001c58b5 to 001c5900 has its CatchHandler @ 001c5a30 */
pvVar4 = testing::internal::GetTypeId<testing::internal::(anonymous_namespace)::FailureTest>();
uVar5 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest>
::GetSetUpCaseOrSuite(local_28,local_2c);
uVar6 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest>
::GetTearDownCaseOrSuite(local_28,local_2c);
pvVar7 = operator_new(0x50);
testing::internal::
InsertSyntheticTestCase(std::__cxx11::string_const&,testing::internal::CodeLocation,bool)::$_0::
__0(local_100,param_7);
/* try { // try from 001c5931 to 001c5985 has its CatchHandler @ 001c5a46 */
_ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_
(pvVar7,local_100);
uVar8 = testing::internal::MakeAndRegisterTestInfo
(local_50,uVar3,uVar2,uVar8,local_90,pvVar4,uVar5,uVar6,pvVar7);
testing::internal::
InsertSyntheticTestCase(std::__cxx11::string_const&,testing::internal::CodeLocation,bool)::$_0::
~__0(local_100);
testing::internal::CodeLocation::~CodeLocation(local_90);
std::__cxx11::string::~string(local_b0);
std::allocator<char>::~allocator((allocator<char> *)&local_b1);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
return uVar8;
}
|
|
1,471 | JS_ReadObjectTag | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadObjectTag(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSValue obj;
uint32_t prop_count, i;
JSAtom atom;
JSValue val;
int ret;
obj = JS_NewObject(ctx);
if (BC_add_object_ref(s, obj))
goto fail;
if (bc_get_leb128(s, &prop_count))
goto fail;
for(i = 0; i < prop_count; i++) {
if (bc_get_atom(s, &atom))
goto fail;
#ifdef DUMP_READ_OBJECT
if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) {
bc_read_trace(s, "propname: ");
print_atom(s->ctx, atom);
printf("\n");
}
#endif
val = JS_ReadObjectRec(s);
if (JS_IsException(val)) {
JS_FreeAtom(ctx, atom);
goto fail;
}
ret = JS_DefinePropertyValue(ctx, obj, atom, val, JS_PROP_C_W_E);
JS_FreeAtom(ctx, atom);
if (ret < 0)
goto fail;
}
return obj;
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | JS_ReadObjectTag:
subq $0x88, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x292b0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x7c180
cmpl $0x0, %eax
je 0x7a6ef
jmp 0x7a7f2
movq 0x70(%rsp), %rdi
leaq 0x54(%rsp), %rsi
callq 0x78f20
cmpl $0x0, %eax
je 0x7a708
jmp 0x7a7f2
movl $0x0, 0x50(%rsp)
movl 0x50(%rsp), %eax
cmpl 0x54(%rsp), %eax
jae 0x7a7d9
movq 0x70(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0x7bbe0
cmpl $0x0, %eax
je 0x7a737
jmp 0x7a7f2
movq 0x70(%rsp), %rdi
callq 0x4ade0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x7a783
movq 0x68(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x27d80
jmp 0x7a7f2
movq 0x68(%rsp), %rdi
movl 0x4c(%rsp), %ecx
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
movl $0x7, (%rsp)
callq 0x35ef0
movl %eax, 0x34(%rsp)
movq 0x68(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x27d80
cmpl $0x0, 0x34(%rsp)
jge 0x7a7c7
jmp 0x7a7f2
jmp 0x7a7c9
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x7a710
movq 0x58(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x7a81a
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop
| JS_ReadObjectTag:
sub rsp, 88h
mov [rsp+88h+var_18], rdi
mov rax, [rsp+88h+var_18]
mov rax, [rax]
mov [rsp+88h+var_20], rax
mov rdi, [rsp+88h+var_20]
call JS_NewObject
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_60], rdx
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_30], rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_28], rax
mov rdi, [rsp+88h+var_18]
mov rsi, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
call BC_add_object_ref
cmp eax, 0
jz short loc_7A6EF
jmp loc_7A7F2
loc_7A6EF:
mov rdi, [rsp+88h+var_18]
lea rsi, [rsp+88h+var_34]
call bc_get_leb128
cmp eax, 0
jz short loc_7A708
jmp loc_7A7F2
loc_7A708:
mov [rsp+88h+var_38], 0
loc_7A710:
mov eax, [rsp+88h+var_38]
cmp eax, [rsp+88h+var_34]
jnb loc_7A7D9
mov rdi, [rsp+88h+var_18]
lea rsi, [rsp+88h+var_3C]
call bc_get_atom
cmp eax, 0
jz short loc_7A737
jmp loc_7A7F2
loc_7A737:
mov rdi, [rsp+88h+var_18]
call JS_ReadObjectRec
mov [rsp+88h+var_78], rax
mov [rsp+88h+var_70], rdx
mov rax, [rsp+88h+var_78]
mov [rsp+88h+var_50], rax
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_48], rax
mov rdi, [rsp+88h+var_50]
mov rsi, [rsp+88h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_7A783
mov rdi, [rsp+88h+var_20]
mov esi, [rsp+88h+var_3C]
call JS_FreeAtom
jmp short loc_7A7F2
loc_7A783:
mov rdi, [rsp+88h+var_20]
mov ecx, [rsp+88h+var_3C]
mov rsi, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
mov r8, [rsp+88h+var_50]
mov r9, [rsp+88h+var_48]
mov [rsp+88h+var_88], 7
call JS_DefinePropertyValue
mov [rsp+88h+var_54], eax
mov rdi, [rsp+88h+var_20]
mov esi, [rsp+88h+var_3C]
call JS_FreeAtom
cmp [rsp+88h+var_54], 0
jge short loc_7A7C7
jmp short loc_7A7F2
loc_7A7C7:
jmp short $+2
loc_7A7C9:
mov eax, [rsp+88h+var_38]
add eax, 1
mov [rsp+88h+var_38], eax
jmp loc_7A710
loc_7A7D9:
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_28]
mov [rsp+88h+var_8], rax
jmp short loc_7A81A
loc_7A7F2:
mov rdi, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
call JS_FreeValue
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
loc_7A81A:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long JS_ReadObjectTag(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
double v10; // xmm4_8
double v11; // xmm5_8
long long v12; // rdx
__m128 v13; // xmm4
__m128 v14; // xmm5
_DWORD *ObjectRec; // [rsp+10h] [rbp-78h]
int v17; // [rsp+34h] [rbp-54h]
long long v18; // [rsp+40h] [rbp-48h]
unsigned int v19; // [rsp+4Ch] [rbp-3Ch] BYREF
unsigned int i; // [rsp+50h] [rbp-38h]
unsigned int v21; // [rsp+54h] [rbp-34h] BYREF
long long v22; // [rsp+58h] [rbp-30h]
long long v23; // [rsp+60h] [rbp-28h]
long long v24; // [rsp+68h] [rbp-20h]
long long *v25; // [rsp+70h] [rbp-18h]
long long v26; // [rsp+78h] [rbp-10h]
long long v27; // [rsp+80h] [rbp-8h]
v25 = a1;
v24 = *a1;
v22 = JS_NewObject(v24);
v23 = v9;
if ( (unsigned int)BC_add_object_ref(a1, v22, v9) || (unsigned int)bc_get_leb128((long long)v25, &v21) )
{
LABEL_11:
JS_FreeValue(v24, v22, v23);
LODWORD(v26) = 0;
v27 = 6LL;
}
else
{
for ( i = 0; i < v21; ++i )
{
if ( (unsigned int)bc_get_atom(v25, &v19) )
goto LABEL_11;
ObjectRec = (_DWORD *)JS_ReadObjectRec(v25, a2, a3, a4, a5, v10, v11, a8, a9);
v18 = v12;
if ( JS_IsException_1((long long)ObjectRec, v12) )
{
JS_FreeAtom(v24, v19);
goto LABEL_11;
}
v17 = JS_DefinePropertyValue(v24, v22, v23, v19, ObjectRec, v18, a2, a3, a4, a5, v13, v14, a8, a9, 7);
JS_FreeAtom(v24, v19);
if ( v17 < 0 )
goto LABEL_11;
}
v26 = v22;
v27 = v23;
}
return v26;
}
| JS_ReadObjectTag:
SUB RSP,0x88
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x001292b0
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
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x0017c180
CMP EAX,0x0
JZ 0x0017a6ef
JMP 0x0017a7f2
LAB_0017a6ef:
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[RSP + 0x54]
CALL 0x00178f20
CMP EAX,0x0
JZ 0x0017a708
JMP 0x0017a7f2
LAB_0017a708:
MOV dword ptr [RSP + 0x50],0x0
LAB_0017a710:
MOV EAX,dword ptr [RSP + 0x50]
CMP EAX,dword ptr [RSP + 0x54]
JNC 0x0017a7d9
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[RSP + 0x4c]
CALL 0x0017bbe0
CMP EAX,0x0
JZ 0x0017a737
JMP 0x0017a7f2
LAB_0017a737:
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x0014ade0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0017a783
MOV RDI,qword ptr [RSP + 0x68]
MOV ESI,dword ptr [RSP + 0x4c]
CALL 0x00127d80
JMP 0x0017a7f2
LAB_0017a783:
MOV RDI,qword ptr [RSP + 0x68]
MOV ECX,dword ptr [RSP + 0x4c]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x40]
MOV dword ptr [RSP],0x7
CALL 0x00135ef0
MOV dword ptr [RSP + 0x34],EAX
MOV RDI,qword ptr [RSP + 0x68]
MOV ESI,dword ptr [RSP + 0x4c]
CALL 0x00127d80
CMP dword ptr [RSP + 0x34],0x0
JGE 0x0017a7c7
JMP 0x0017a7f2
LAB_0017a7c7:
JMP 0x0017a7c9
LAB_0017a7c9:
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
JMP 0x0017a710
LAB_0017a7d9:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0017a81a
LAB_0017a7f2:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x001229d0
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
LAB_0017a81a:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16] JS_ReadObjectTag(int8 *param_1)
{
int iVar1;
int1 auVar2 [16];
int4 local_3c;
uint local_38;
uint local_34;
int1 local_30 [16];
int8 local_20;
int8 *local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_20 = *param_1;
local_18 = param_1;
local_30 = JS_NewObject(local_20);
iVar1 = BC_add_object_ref(local_18,local_30._0_8_,local_30._8_8_);
if (iVar1 == 0) {
iVar1 = bc_get_leb128(local_18,&local_34);
if (iVar1 == 0) {
for (local_38 = 0; local_38 < local_34; local_38 = local_38 + 1) {
iVar1 = bc_get_atom(local_18,&local_3c);
if (iVar1 != 0) goto LAB_0017a7f2;
auVar2 = JS_ReadObjectRec(local_18);
iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_);
if (iVar1 != 0) {
JS_FreeAtom(local_20,local_3c);
goto LAB_0017a7f2;
}
iVar1 = JS_DefinePropertyValue
(local_20,local_30._0_8_,local_30._8_8_,local_3c,auVar2._0_8_,auVar2._8_8_
,7);
JS_FreeAtom(local_20,local_3c);
if (iVar1 < 0) goto LAB_0017a7f2;
}
local_10 = local_30._0_4_;
uStack_c = local_30._4_4_;
local_8 = local_30._8_8_;
goto LAB_0017a81a;
}
}
LAB_0017a7f2:
JS_FreeValue(local_20,local_30._0_8_,local_30._8_8_);
local_10 = 0;
local_8 = 6;
LAB_0017a81a:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
1,472 | JS_ReadObjectTag | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadObjectTag(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSValue obj;
uint32_t prop_count, i;
JSAtom atom;
JSValue val;
int ret;
obj = JS_NewObject(ctx);
if (BC_add_object_ref(s, obj))
goto fail;
if (bc_get_leb128(s, &prop_count))
goto fail;
for(i = 0; i < prop_count; i++) {
if (bc_get_atom(s, &atom))
goto fail;
#ifdef DUMP_READ_OBJECT
if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) {
bc_read_trace(s, "propname: ");
print_atom(s->ctx, atom);
printf("\n");
}
#endif
val = JS_ReadObjectRec(s);
if (JS_IsException(val)) {
JS_FreeAtom(ctx, atom);
goto fail;
}
ret = JS_DefinePropertyValue(ctx, obj, atom, val, JS_PROP_C_W_E);
JS_FreeAtom(ctx, atom);
if (ret < 0)
goto fail;
}
return obj;
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | JS_ReadObjectTag:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
movq (%rdi), %r15
movq 0x40(%r15), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, %r14
movq %rdx, %r13
movq %r12, %rdi
movq %rax, %rsi
callq 0x4647d
testl %eax, %eax
jne 0x45a63
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
callq 0x44e61
testl %eax, %eax
je 0x45a90
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1ccb2
movl $0x6, %r13d
xorl %r14d, %r14d
movq %r14, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
je 0x45a7b
movq %r14, 0x10(%rsp)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x462a2
testl %eax, %eax
jne 0x45a63
movq %r12, %rdi
callq 0x31cf5
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x45b0d
movl 0x8(%rsp), %ebp
movl $0x7, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebp, %ecx
movq %rax, %r8
callq 0x25ea7
movq %r12, %r14
movq %r13, %r12
movl %eax, %r13d
movq %r15, %rdi
movl %ebp, %esi
callq 0x1fbc4
testl %r13d, %r13d
movq %r12, %r13
movq %r14, %r12
movq 0x10(%rsp), %r14
js 0x45a63
decl %ebx
jne 0x45a9d
jmp 0x45a7b
movl 0x8(%rsp), %esi
movq %r15, %rdi
callq 0x1fbc4
jmp 0x45a63
| JS_ReadObjectTag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdi
mov r15, [rdi]
mov rax, [r15+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, r15
mov ecx, 1
call JS_NewObjectProtoClass
mov r14, rax
mov r13, rdx
mov rdi, r12
mov rsi, rax
call BC_add_object_ref1
test eax, eax
jnz short loc_45A63
lea rsi, [rsp+48h+var_3C]
mov rdi, r12
call bc_get_leb128
test eax, eax
jz short loc_45A90
loc_45A63:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, r13
call JS_FreeValueRT
mov r13d, 6
xor r14d, r14d
loc_45A7B:
mov rax, r14
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45A90:
mov ebx, [rsp+48h+var_3C]
test ebx, ebx
jz short loc_45A7B
mov [rsp+48h+var_38], r14
loc_45A9D:
mov rdi, r12
lea rsi, [rsp+48h+var_40]
call bc_get_atom
test eax, eax
jnz short loc_45A63
mov rdi, r12
call JS_ReadObjectRec
mov r9, rdx
cmp r9d, 6
jz short loc_45B0D
mov ebp, [rsp+48h+var_40]
mov [rsp+48h+var_48], 7
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov ecx, ebp
mov r8, rax
call JS_DefinePropertyValue
mov r14, r12
mov r12, r13
mov r13d, eax
mov rdi, r15
mov esi, ebp
call JS_FreeAtom
test r13d, r13d
mov r13, r12
mov r12, r14
mov r14, [rsp+48h+var_38]
js loc_45A63
dec ebx
jnz short loc_45A9D
jmp loc_45A7B
loc_45B0D:
mov esi, [rsp+48h+var_40]
mov rdi, r15
call JS_FreeAtom
jmp loc_45A63
| _DWORD * JS_ReadObjectTag(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // r12
long long v10; // r15
_DWORD *v11; // r14
long long v12; // rdx
long long v13; // r13
long long v14; // rdx
int v15; // ecx
unsigned long long v16; // r8
int v18; // ebx
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
_DWORD *ObjectRec; // rax
long long v26; // rdx
__m128 v27; // xmm4
__m128 v28; // xmm5
int v29; // ebp
int v30; // eax
long long v31; // r14
long long v32; // r12
int v33; // r13d
bool v34; // sf
unsigned int v35; // [rsp+8h] [rbp-40h] BYREF
int v36; // [rsp+Ch] [rbp-3Ch] BYREF
_DWORD *v37; // [rsp+10h] [rbp-38h]
v9 = (long long)a1;
v10 = *a1;
v11 = (_DWORD *)JS_NewObjectProtoClass(
*a1,
*(_QWORD *)(*(_QWORD *)(*a1 + 64) + 16LL),
*(_QWORD *)(*(_QWORD *)(*a1 + 64) + 24LL),
1u);
v13 = v12;
if ( !(unsigned int)BC_add_object_ref1(a1, v11) && !(unsigned int)bc_get_leb128((long long)a1, &v36, v14, v15, v16) )
{
v18 = v36;
if ( !v36 )
return v11;
v37 = v11;
while ( !(unsigned int)bc_get_atom(v9, &v35) )
{
ObjectRec = (_DWORD *)JS_ReadObjectRec(v9, a2, a3, a4, a5, v23, v24, a8, a9, (long long)&v35, v19, v20, v21, v22);
if ( (_DWORD)v26 == 6 )
{
JS_FreeAtom(v10, v35);
break;
}
v29 = v35;
v30 = JS_DefinePropertyValue(
v10,
(unsigned long long)v11,
v13,
v35,
ObjectRec,
v26,
*(double *)a2.m128_u64,
a3,
a4,
a5,
v27,
v28,
a8,
a9,
7);
v31 = v9;
v32 = v13;
v33 = v30;
JS_FreeAtom(v10, v29);
v34 = v33 < 0;
v13 = v32;
v9 = v31;
v11 = v37;
if ( v34 )
break;
if ( !--v18 )
return v11;
}
}
JS_FreeValueRT(*(_QWORD *)(v10 + 24), v11, v13);
return 0LL;
}
| JS_ReadObjectTag:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV R15,qword ptr [RDI]
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,R15
MOV ECX,0x1
CALL 0x001202f1
MOV R14,RAX
MOV R13,RDX
MOV RDI,R12
MOV RSI,RAX
CALL 0x0014647d
TEST EAX,EAX
JNZ 0x00145a63
LEA RSI,[RSP + 0xc]
MOV RDI,R12
CALL 0x00144e61
TEST EAX,EAX
JZ 0x00145a90
LAB_00145a63:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011ccb2
MOV R13D,0x6
XOR R14D,R14D
LAB_00145a7b:
MOV RAX,R14
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145a90:
MOV EBX,dword ptr [RSP + 0xc]
TEST EBX,EBX
JZ 0x00145a7b
MOV qword ptr [RSP + 0x10],R14
LAB_00145a9d:
MOV RDI,R12
LEA RSI,[RSP + 0x8]
CALL 0x001462a2
TEST EAX,EAX
JNZ 0x00145a63
MOV RDI,R12
CALL 0x00131cf5
MOV R9,RDX
CMP R9D,0x6
JZ 0x00145b0d
MOV EBP,dword ptr [RSP + 0x8]
MOV dword ptr [RSP],0x7
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV ECX,EBP
MOV R8,RAX
CALL 0x00125ea7
MOV R14,R12
MOV R12,R13
MOV R13D,EAX
MOV RDI,R15
MOV ESI,EBP
CALL 0x0011fbc4
TEST R13D,R13D
MOV R13,R12
MOV R12,R14
MOV R14,qword ptr [RSP + 0x10]
JS 0x00145a63
DEC EBX
JNZ 0x00145a9d
JMP 0x00145a7b
LAB_00145b0d:
MOV ESI,dword ptr [RSP + 0x8]
MOV RDI,R15
CALL 0x0011fbc4
JMP 0x00145a63
|
int1 [16] JS_ReadObjectTag(long *param_1)
{
long lVar1;
int4 uVar2;
int iVar3;
int iVar4;
int8 uVar6;
int1 auVar7 [16];
int4 local_40;
int local_3c;
int8 local_38;
int8 uVar5;
lVar1 = *param_1;
auVar7 = JS_NewObjectProtoClass
(lVar1,*(int8 *)(*(long *)(lVar1 + 0x40) + 0x10),
*(int8 *)(*(long *)(lVar1 + 0x40) + 0x18),1);
uVar5 = auVar7._8_8_;
uVar6 = auVar7._0_8_;
iVar3 = BC_add_object_ref1(param_1,uVar6);
if ((iVar3 == 0) && (iVar4 = bc_get_leb128(param_1,&local_3c), iVar3 = local_3c, iVar4 == 0)) {
for (; iVar3 != 0; iVar3 = iVar3 + -1) {
local_38 = uVar6;
iVar4 = bc_get_atom(param_1,&local_40);
if (iVar4 != 0) goto LAB_00145a63;
auVar7 = JS_ReadObjectRec(param_1);
uVar2 = local_40;
if (auVar7._8_4_ == 6) {
JS_FreeAtom(lVar1,local_40);
goto LAB_00145a63;
}
iVar4 = JS_DefinePropertyValue(lVar1,uVar6,uVar5,local_40,auVar7._0_8_,auVar7._8_8_,7);
JS_FreeAtom(lVar1,uVar2);
auVar7._8_8_ = uVar5;
auVar7._0_8_ = local_38;
uVar6 = local_38;
if (iVar4 < 0) goto LAB_00145a63;
}
}
else {
LAB_00145a63:
JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),uVar6,uVar5);
auVar7 = ZEXT816(6) << 0x40;
}
return auVar7;
}
|
|
1,473 | init_io_cache_share | eloqsql/mysys/mf_iocache.c | void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
IO_CACHE *write_cache, uint num_threads)
{
DBUG_ENTER("init_io_cache_share");
DBUG_PRINT("io_cache_share", ("read_cache: %p share: %p "
"write_cache: %p threads: %u",
read_cache, cshare,
write_cache, num_threads));
DBUG_ASSERT(num_threads > 1);
DBUG_ASSERT(read_cache->type == READ_CACHE);
DBUG_ASSERT(!write_cache || (write_cache->type == WRITE_CACHE));
mysql_mutex_init(key_IO_CACHE_SHARE_mutex,
&cshare->mutex, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_IO_CACHE_SHARE_cond, &cshare->cond, 0);
mysql_cond_init(key_IO_CACHE_SHARE_cond_writer, &cshare->cond_writer, 0);
cshare->running_threads= num_threads;
cshare->total_threads= num_threads;
cshare->error= 0; /* Initialize. */
cshare->buffer= read_cache->buffer;
cshare->read_end= NULL; /* See function comment of lock_io_cache(). */
cshare->pos_in_file= 0; /* See function comment of lock_io_cache(). */
cshare->source_cache= write_cache; /* Can be NULL. */
read_cache->share= cshare;
read_cache->read_function= _my_b_cache_read_r;
if (write_cache)
{
write_cache->share= cshare;
write_cache->write_function= _my_b_cache_write_r;
}
DBUG_VOID_RETURN;
} | O3 | c | init_io_cache_share:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x3642d1(%rip), %rax # 0x3b8298
movl (%rax), %edi
leaq 0x2e54a8(%rip), %rax # 0x339478
movq (%rax), %rax
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
leaq 0x364fc3(%rip), %rsi # 0x3b8fb0
movq %r14, %rdi
callq 0x28620
leaq 0x3642e8(%rip), %rax # 0x3b82e4
movl (%rax), %edi
leaq 0x48(%r14), %r13
leaq 0x2e546f(%rip), %rax # 0x339478
movq (%rax), %rax
movq %r13, %rsi
callq *0x60(%rax)
movq %rax, 0x78(%r14)
movq %r13, %rdi
xorl %esi, %esi
callq 0x28510
leaq 0x3642c1(%rip), %rax # 0x3b82e8
movl (%rax), %edi
leaq 0x80(%r14), %r13
leaq 0x2e5441(%rip), %rax # 0x339478
movq (%rax), %rax
movq %r13, %rsi
callq *0x60(%rax)
movq %rax, 0xb0(%r14)
movq %r13, %rdi
xorl %esi, %esi
callq 0x28510
movl %r12d, 0xd8(%r14)
movl %r12d, 0xdc(%r14)
movl $0x0, 0xe0(%r14)
movq 0x20(%r15), %rax
movq %rax, 0xc8(%r14)
xorl %eax, %eax
movq %rax, 0xd0(%r14)
movq %rax, 0xb8(%r14)
movq %rbx, 0xc0(%r14)
movq %r14, 0x98(%r15)
leaq 0x30(%rip), %rax # 0x540ca
movq %rax, 0xa0(%r15)
testq %rbx, %rbx
je 0x540bb
movq %r14, 0x98(%rbx)
leaq 0x35c(%rip), %rax # 0x54410
movq %rax, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_io_cache_share:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rax, key_IO_CACHE_SHARE_mutex
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
lea rax, key_IO_CACHE_SHARE_cond
mov edi, [rax]
lea r13, [r14+48h]
lea rax, PSI_server
mov rax, [rax]
mov rsi, r13
call qword ptr [rax+60h]
mov [r14+78h], rax
mov rdi, r13
xor esi, esi
call _pthread_cond_init
lea rax, key_IO_CACHE_SHARE_cond_writer
mov edi, [rax]
lea r13, [r14+80h]
lea rax, PSI_server
mov rax, [rax]
mov rsi, r13
call qword ptr [rax+60h]
mov [r14+0B0h], rax
mov rdi, r13
xor esi, esi
call _pthread_cond_init
mov [r14+0D8h], r12d
mov [r14+0DCh], r12d
mov dword ptr [r14+0E0h], 0
mov rax, [r15+20h]
mov [r14+0C8h], rax
xor eax, eax
mov [r14+0D0h], rax
mov [r14+0B8h], rax
mov [r14+0C0h], rbx
mov [r15+98h], r14
lea rax, _my_b_cache_read_r
mov [r15+0A0h], rax
test rbx, rbx
jz short loc_540BB
mov [rbx+98h], r14
lea rax, _my_b_cache_write_r
mov [rbx+0A8h], rax
loc_540BB:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ( * init_io_cache_share(_QWORD *a1, long long a2, long long a3, unsigned int a4))()
{
long long ( *result)(); // rax
*(_QWORD *)(a2 + 64) = (*((long long ( **)(_QWORD))PSI_server + 8))(key_IO_CACHE_SHARE_mutex);
*(_QWORD *)(a2 + 56) = a2;
*(_OWORD *)(a2 + 40) = 0LL;
pthread_mutex_init(a2, &my_fast_mutexattr);
*(_QWORD *)(a2 + 120) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))(
key_IO_CACHE_SHARE_cond,
a2 + 72);
pthread_cond_init(a2 + 72, 0LL);
*(_QWORD *)(a2 + 176) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))(
key_IO_CACHE_SHARE_cond_writer,
a2 + 128);
pthread_cond_init(a2 + 128, 0LL);
*(_DWORD *)(a2 + 216) = a4;
*(_QWORD *)(a2 + 220) = a4;
*(_QWORD *)(a2 + 200) = a1[4];
*(_QWORD *)(a2 + 208) = 0LL;
*(_QWORD *)(a2 + 184) = 0LL;
*(_QWORD *)(a2 + 192) = a3;
a1[19] = a2;
result = my_b_cache_read_r;
a1[20] = my_b_cache_read_r;
if ( a3 )
{
*(_QWORD *)(a3 + 152) = a2;
result = my_b_cache_write_r;
*(_QWORD *)(a3 + 168) = my_b_cache_write_r;
}
return result;
}
| init_io_cache_share:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[0x4b8298]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
LEA RSI,[0x4b8fb0]
MOV RDI,R14
CALL 0x00128620
LEA RAX,[0x4b82e4]
MOV EDI,dword ptr [RAX]
LEA R13,[R14 + 0x48]
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
MOV RSI,R13
CALL qword ptr [RAX + 0x60]
MOV qword ptr [R14 + 0x78],RAX
MOV RDI,R13
XOR ESI,ESI
CALL 0x00128510
LEA RAX,[0x4b82e8]
MOV EDI,dword ptr [RAX]
LEA R13,[R14 + 0x80]
LEA RAX,[0x439478]
MOV RAX,qword ptr [RAX]
MOV RSI,R13
CALL qword ptr [RAX + 0x60]
MOV qword ptr [R14 + 0xb0],RAX
MOV RDI,R13
XOR ESI,ESI
CALL 0x00128510
MOV dword ptr [R14 + 0xd8],R12D
MOV dword ptr [R14 + 0xdc],R12D
MOV dword ptr [R14 + 0xe0],0x0
MOV RAX,qword ptr [R15 + 0x20]
MOV qword ptr [R14 + 0xc8],RAX
XOR EAX,EAX
MOV qword ptr [R14 + 0xd0],RAX
MOV qword ptr [R14 + 0xb8],RAX
MOV qword ptr [R14 + 0xc0],RBX
MOV qword ptr [R15 + 0x98],R14
LEA RAX,[0x1540ca]
MOV qword ptr [R15 + 0xa0],RAX
TEST RBX,RBX
JZ 0x001540bb
MOV qword ptr [RBX + 0x98],R14
LEA RAX,[0x154410]
MOV qword ptr [RBX + 0xa8],RAX
LAB_001540bb:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void init_io_cache_share(long param_1,pthread_mutex_t *param_2,long param_3,int4 param_4)
{
int8 uVar1;
long lVar2;
uVar1 = (**(code **)(PSI_server + 0x40))(key_IO_CACHE_SHARE_mutex);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
param_2[1].__align = 0;
*(int8 *)((long)param_2 + 0x30) = 0;
pthread_mutex_init(param_2,(pthread_mutexattr_t *)&my_fast_mutexattr);
lVar2 = (**(code **)(PSI_server + 0x60))(key_IO_CACHE_SHARE_cond);
param_2[3].__align = lVar2;
pthread_cond_init((pthread_cond_t *)((long)param_2 + 0x48),(pthread_condattr_t *)0x0);
uVar1 = (**(code **)(PSI_server + 0x60))(key_IO_CACHE_SHARE_cond_writer);
*(int8 *)((long)param_2 + 0xb0) = uVar1;
pthread_cond_init((pthread_cond_t *)((long)param_2 + 0x80),(pthread_condattr_t *)0x0);
*(int4 *)((long)param_2 + 0xd8) = param_4;
*(int4 *)((long)param_2 + 0xdc) = param_4;
*(int4 *)((long)param_2 + 0xe0) = 0;
param_2[5].__align = *(long *)(param_1 + 0x20);
*(int8 *)((long)param_2 + 0xd0) = 0;
*(int8 *)((long)param_2 + 0xb8) = 0;
*(long *)((long)param_2 + 0xc0) = param_3;
*(pthread_mutex_t **)(param_1 + 0x98) = param_2;
*(code **)(param_1 + 0xa0) = _my_b_cache_read_r;
if (param_3 != 0) {
*(pthread_mutex_t **)(param_3 + 0x98) = param_2;
*(code **)(param_3 + 0xa8) = _my_b_cache_write_r;
}
return;
}
|
|
1,474 | my_casedn_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
} | O3 | c | my_casedn_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0x6ea32
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x6f220
testl %eax, %eax
je 0x6ea32
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0x6e9c1
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0x6ea1b
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0x6ea02
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x6ea32
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0x6e98b
movb $0x0, (%r14)
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz loc_6EA32
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_6E98B:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_6EA32
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_6E9C1
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4+4]
mov [rbp+var_30], rcx
loc_6E9C1:
mov edx, 1
cmp rcx, 80h
jb short loc_6EA1B
mov edx, 2
cmp rcx, 800h
jb short loc_6EA02
cmp rcx, 0FFFFh
ja short loc_6EA32
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_6EA02:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_6EA1B:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_6E98B
loc_6EA32:
mov byte ptr [r14], 0
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12 + 4);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
| my_casedn_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x0016ea32
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_0016e98b:
MOV RDI,R15
MOV RSI,R12
CALL 0x0016f220
TEST EAX,EAX
JZ 0x0016ea32
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x0016e9c1
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_0016e9c1:
MOV EDX,0x1
CMP RCX,0x80
JC 0x0016ea1b
MOV EDX,0x2
CMP RCX,0x800
JC 0x0016ea02
CMP RCX,0xffff
JA 0x0016ea32
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_0016ea02:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_0016ea1b:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x0016e98b
LAB_0016ea32:
MOV byte ptr [R14],0x0
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + 4 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
|
|
1,475 | ggml_opt_acc_grad | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_opt_acc_grad(int np, struct ggml_tensor * const ps[], float * g, float scale) {
int64_t i = 0;
for (int p = 0; p < np; ++p) {
const int64_t ne = ggml_nelements(ps[p]) ;
// TODO: add function to get all elements at once
for (int64_t j = 0; j < ne; ++j) {
g[i++] += ggml_get_f32_1d(ps[p]->grad, j) * scale;
}
}
} | O0 | c | ggml_opt_acc_grad:
subq $0x48, %rsp
movl %edi, 0x44(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
vmovss %xmm0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x163e26
movq 0x38(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11ae30
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jge 0x163e14
movq 0x38(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x98(%rax), %rdi
movq 0x8(%rsp), %rax
movl %eax, %esi
callq 0x11dca0
vmovaps %xmm0, %xmm1
vmovss 0x2c(%rsp), %xmm0
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rsp)
vmovss (%rax,%rcx,4), %xmm2
vfmadd213ss %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovss %xmm0, (%rax,%rcx,4)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x163da8
jmp 0x163e16
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x163d79
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| ggml_opt_acc_grad:
sub rsp, 48h
mov [rsp+48h+var_4], edi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
vmovss [rsp+48h+var_1C], xmm0
mov [rsp+48h+var_28], 0
mov [rsp+48h+var_2C], 0
loc_163D79:
mov eax, [rsp+48h+var_2C]
cmp eax, [rsp+48h+var_4]
jge loc_163E26
mov rax, [rsp+48h+var_10]
movsxd rcx, [rsp+48h+var_2C]
mov rdi, [rax+rcx*8]
call ggml_nelements
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_40], 0
loc_163DA8:
mov rax, [rsp+48h+var_40]
cmp rax, [rsp+48h+var_38]
jge short loc_163E14
mov rax, [rsp+48h+var_10]
movsxd rcx, [rsp+48h+var_2C]
mov rax, [rax+rcx*8]
mov rdi, [rax+98h]
mov rax, [rsp+48h+var_40]
mov esi, eax
call ggml_get_f32_1d
vmovaps xmm1, xmm0
vmovss xmm0, [rsp+48h+var_1C]
mov rax, [rsp+48h+var_18]
mov rcx, [rsp+48h+var_28]
mov rdx, rcx
add rdx, 1
mov [rsp+48h+var_28], rdx
vmovss xmm2, dword ptr [rax+rcx*4]
vfmadd213ss xmm0, xmm1, xmm2
vmovss dword ptr [rax+rcx*4], xmm0
mov rax, [rsp+48h+var_40]
add rax, 1
mov [rsp+48h+var_40], rax
jmp short loc_163DA8
loc_163E14:
jmp short $+2
loc_163E16:
mov eax, [rsp+48h+var_2C]
add eax, 1
mov [rsp+48h+var_2C], eax
jmp loc_163D79
loc_163E26:
add rsp, 48h
retn
| long long ggml_opt_acc_grad(int a1, long long a2, long long a3, __m128 _XMM0)
{
long long result; // rax
long long j; // [rsp+8h] [rbp-40h]
long long v12; // [rsp+10h] [rbp-38h]
unsigned int i; // [rsp+1Ch] [rbp-2Ch]
long long v14; // [rsp+20h] [rbp-28h]
__asm { vmovss [rsp+48h+var_1C], xmm0 }
v14 = 0LL;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a1 )
break;
v12 = ggml_nelements(*(_QWORD **)(a2 + 8LL * (int)i));
for ( j = 0LL; j < v12; ++j )
{
_XMM0 = ggml_get_f32_1d((_QWORD *)*(_QWORD *)(*(_QWORD *)(a2 + 8LL * (int)i) + 152LL), j, _XMM0);
__asm
{
vmovaps xmm1, xmm0
vmovss xmm0, [rsp+48h+var_1C]
}
_RAX = a3;
_RCX = v14++;
__asm
{
vmovss xmm2, dword ptr [rax+rcx*4]
vfmadd213ss xmm0, xmm1, xmm2
vmovss dword ptr [rax+rcx*4], xmm0
}
}
}
return result;
}
| |||
1,476 | ggml_opt_acc_grad | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_opt_acc_grad(int np, struct ggml_tensor * const ps[], float * g, float scale) {
int64_t i = 0;
for (int p = 0; p < np; ++p) {
const int64_t ne = ggml_nelements(ps[p]) ;
// TODO: add function to get all elements at once
for (int64_t j = 0; j < ne; ++j) {
g[i++] += ggml_get_f32_1d(ps[p]->grad, j) * scale;
}
}
} | O1 | c | ggml_opt_acc_grad:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
testl %edi, %edi
jle 0xb2cf4
movq %rsi, %r14
movl %edi, %eax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
vmovss %xmm0, 0x4(%rsp)
movq (%r14,%r13,8), %rax
movq 0x18(%rax), %rbx
imulq 0x10(%rax), %rbx
imulq 0x20(%rax), %rbx
imulq 0x28(%rax), %rbx
testq %rbx, %rbx
jle 0xb2cea
movq 0x8(%rsp), %rax
leaq (%rax,%rbp,4), %r12
xorl %r15d, %r15d
movq (%r14,%r13,8), %rax
movq 0x98(%rax), %rdi
movl %r15d, %esi
callq 0x906c0
vmovss 0x4(%rsp), %xmm1
vfmadd213ss (%r12,%r15,4), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
vmovss %xmm0, (%r12,%r15,4)
incq %r15
cmpq %r15, %rbx
jne 0xb2cba
addq %r15, %rbp
incq %r13
cmpq 0x10(%rsp), %r13
jne 0xb2c92
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ggml_opt_acc_grad:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rdx
test edi, edi
jle short loc_B2CF4
mov r14, rsi
mov eax, edi
mov [rsp+48h+var_38], rax
xor r13d, r13d
xor ebp, ebp
vmovss [rsp+48h+var_44], xmm0
loc_B2C92:
mov rax, [r14+r13*8]
mov rbx, [rax+18h]
imul rbx, [rax+10h]
imul rbx, [rax+20h]
imul rbx, [rax+28h]
test rbx, rbx
jle short loc_B2CEA
mov rax, [rsp+48h+var_40]
lea r12, [rax+rbp*4]
xor r15d, r15d
loc_B2CBA:
mov rax, [r14+r13*8]
mov rdi, [rax+98h]
mov esi, r15d
call ggml_get_f32_1d
vmovss xmm1, [rsp+48h+var_44]
vfmadd213ss xmm0, xmm1, dword ptr [r12+r15*4]
vmovss dword ptr [r12+r15*4], xmm0
inc r15
cmp rbx, r15
jnz short loc_B2CBA
add rbp, r15
loc_B2CEA:
inc r13
cmp r13, [rsp+48h+var_38]
jnz short loc_B2C92
loc_B2CF4:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ggml_opt_acc_grad(int a1, long long a2, long long a3, __m128 _XMM0)
{
long long v4; // r13
long long v5; // rbp
long long v6; // rbx
if ( a1 > 0 )
{
v4 = 0LL;
v5 = 0LL;
__asm { vmovss [rsp+48h+var_44], xmm0 }
do
{
v6 = *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 40LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 32LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 16LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 24LL);
if ( v6 > 0 )
{
_R12 = a3 + 4 * v5;
for ( _R15 = 0LL; _R15 != v6; ++_R15 )
{
_XMM0 = ggml_get_f32_1d((_QWORD *)*(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 152LL), _R15, _XMM0);
__asm
{
vmovss xmm1, [rsp+48h+var_44]
vfmadd213ss xmm0, xmm1, dword ptr [r12+r15*4]
vmovss dword ptr [r12+r15*4], xmm0
}
}
v5 += _R15;
}
++v4;
}
while ( v4 != a1 );
}
}
| |||
1,477 | ggml_opt_acc_grad | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_opt_acc_grad(int np, struct ggml_tensor * const ps[], float * g, float scale) {
int64_t i = 0;
for (int p = 0; p < np; ++p) {
const int64_t ne = ggml_nelements(ps[p]) ;
// TODO: add function to get all elements at once
for (int64_t j = 0; j < ne; ++j) {
g[i++] += ggml_get_f32_1d(ps[p]->grad, j) * scale;
}
}
} | O2 | c | ggml_opt_acc_grad:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
vmovss %xmm0, 0x4(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
movq %rdi, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq 0x10(%rsp), %rbp
je 0x8eabb
movq (%r14,%rbp,8), %rax
movq 0x18(%rax), %rbx
imulq 0x10(%rax), %rbx
imulq 0x20(%rax), %rbx
imulq 0x28(%rax), %rbx
testq %rbx, %rbx
movl $0x0, %eax
cmovleq %rax, %rbx
movq 0x8(%rsp), %rax
leaq (%rax,%r13,4), %r15
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x8eab3
movq (%r14,%rbp,8), %rax
movq 0x98(%rax), %rdi
movl %r12d, %esi
callq 0x691c7
vmovss 0x4(%rsp), %xmm1
vfmadd213ss (%r15,%r12,4), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
vmovss %xmm0, (%r15,%r12,4)
incq %r12
jmp 0x8ea84
incq %rbp
addq %r12, %r13
jmp 0x8ea4e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ggml_opt_acc_grad:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
vmovss [rsp+48h+var_44], xmm0
mov [rsp+48h+var_40], rdx
mov r14, rsi
xor eax, eax
test edi, edi
cmovle edi, eax
mov [rsp+48h+var_38], rdi
xor ebp, ebp
xor r13d, r13d
loc_8EA4E:
cmp rbp, [rsp+48h+var_38]
jz short loc_8EABB
mov rax, [r14+rbp*8]
mov rbx, [rax+18h]
imul rbx, [rax+10h]
imul rbx, [rax+20h]
imul rbx, [rax+28h]
test rbx, rbx
mov eax, 0
cmovle rbx, rax
mov rax, [rsp+48h+var_40]
lea r15, [rax+r13*4]
xor r12d, r12d
loc_8EA84:
cmp rbx, r12
jz short loc_8EAB3
mov rax, [r14+rbp*8]
mov rdi, [rax+98h]
mov esi, r12d
call ggml_get_f32_1d
vmovss xmm1, [rsp+48h+var_44]
vfmadd213ss xmm0, xmm1, dword ptr [r15+r12*4]
vmovss dword ptr [r15+r12*4], xmm0
inc r12
jmp short loc_8EA84
loc_8EAB3:
inc rbp
add r13, r12
jmp short loc_8EA4E
loc_8EABB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ggml_opt_acc_grad(long long a1, long long a2, long long a3, __m128 _XMM0)
{
long long v4; // rbp
long long v5; // r13
long long v6; // rbx
__asm { vmovss [rsp+48h+var_44], xmm0 }
if ( (int)a1 <= 0 )
a1 = 0LL;
v4 = 0LL;
v5 = 0LL;
while ( v4 != a1 )
{
v6 = *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 40LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 32LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 16LL)
* *(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 24LL);
if ( v6 <= 0 )
v6 = 0LL;
_R15 = a3 + 4 * v5;
for ( _R12 = 0LL; v6 != _R12; ++_R12 )
{
_XMM0 = ggml_get_f32_1d((_QWORD *)*(_QWORD *)(*(_QWORD *)(a2 + 8 * v4) + 152LL), _R12, _XMM0);
__asm
{
vmovss xmm1, [rsp+48h+var_44]
vfmadd213ss xmm0, xmm1, dword ptr [r15+r12*4]
vmovss dword ptr [r15+r12*4], xmm0
}
}
++v4;
v5 += _R12;
}
}
| ggml_opt_acc_grad:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
VMOVSS dword ptr [RSP + 0x4],XMM0
MOV qword ptr [RSP + 0x8],RDX
MOV R14,RSI
XOR EAX,EAX
TEST EDI,EDI
CMOVLE EDI,EAX
MOV qword ptr [RSP + 0x10],RDI
XOR EBP,EBP
XOR R13D,R13D
LAB_0018ea4e:
CMP RBP,qword ptr [RSP + 0x10]
JZ 0x0018eabb
MOV RAX,qword ptr [R14 + RBP*0x8]
MOV RBX,qword ptr [RAX + 0x18]
IMUL RBX,qword ptr [RAX + 0x10]
IMUL RBX,qword ptr [RAX + 0x20]
IMUL RBX,qword ptr [RAX + 0x28]
TEST RBX,RBX
MOV EAX,0x0
CMOVLE RBX,RAX
MOV RAX,qword ptr [RSP + 0x8]
LEA R15,[RAX + R13*0x4]
XOR R12D,R12D
LAB_0018ea84:
CMP RBX,R12
JZ 0x0018eab3
MOV RAX,qword ptr [R14 + RBP*0x8]
MOV RDI,qword ptr [RAX + 0x98]
MOV ESI,R12D
CALL 0x001691c7
VMOVSS XMM1,dword ptr [RSP + 0x4]
VFMADD213SS XMM0,XMM1,dword ptr [R15 + R12*0x4]
VMOVSS dword ptr [R15 + R12*0x4],XMM0
INC R12
JMP 0x0018ea84
LAB_0018eab3:
INC RBP
ADD R13,R12
JMP 0x0018ea4e
LAB_0018eabb:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ggml_opt_acc_grad(uint param_1,uint param_2,long param_3,long param_4)
{
long lVar1;
int1 auVar2 [16];
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
int1 auVar8 [64];
int1 extraout_var [56];
uVar5 = (ulong)param_2;
if ((int)param_2 < 1) {
uVar5 = 0;
}
lVar7 = 0;
for (uVar4 = 0; uVar4 != uVar5; uVar4 = uVar4 + 1) {
lVar1 = *(long *)(param_3 + uVar4 * 8);
uVar3 = *(long *)(lVar1 + 0x18) * *(long *)(lVar1 + 0x10) * *(long *)(lVar1 + 0x20) *
*(long *)(lVar1 + 0x28);
if ((long)uVar3 < 1) {
uVar3 = 0;
}
lVar1 = param_4 + lVar7 * 4;
for (uVar6 = 0; uVar3 != uVar6; uVar6 = uVar6 + 1) {
auVar8._0_8_ = ggml_get_f32_1d(*(int8 *)(*(long *)(param_3 + uVar4 * 8) + 0x98),
uVar6 & 0xffffffff);
auVar8._8_56_ = extraout_var;
auVar2 = vfmadd213ss_fma(auVar8._0_16_,ZEXT416(param_1),ZEXT416(*(uint *)(lVar1 + uVar6 * 4)))
;
*(int *)(lVar1 + uVar6 * 4) = auVar2._0_4_;
}
lVar7 = lVar7 + uVar6;
}
return;
}
|
|
1,478 | psi_prlock_wrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_pr_wrlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O0 | c | psi_prlock_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ba286(%rip), %rax # 0x217310
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5d740
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x5d0e0
leaq 0x1ba243(%rip), %rax # 0x217310
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_prlock_wrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+68h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call rw_pr_wrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_5D0E0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_5D0E0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 104),
1LL,
a2,
a3);
v4 = rw_pr_wrlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4);
return v4;
}
| psi_prlock_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x317310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015d740
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015d0e0
LEA RAX,[0x317310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0015d0e0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3);
uVar1 = rw_pr_wrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
1,479 | psi_prlock_wrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_pr_wrlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O3 | c | psi_prlock_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2ef5f0(%rip), %r15 # 0x31aef8
movq (%r15), %rax
movq 0x68(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x488b1
movl %eax, %r14d
testq %rbx, %rbx
je 0x2b93e
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_prlock_wrlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+68h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call rw_pr_wrlock
mov r14d, eax
test rbx, rbx
jz short loc_2B93E
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2B93E:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 104),
1LL,
a2,
a3);
v4 = rw_pr_wrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
| psi_prlock_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x41aef8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x68]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001488b1
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012b93e
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012b93e:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3);
uVar1 = rw_pr_wrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
1,480 | httplib::detail::make_content_range_header_field[abi:cxx11](std::pair<unsigned long, unsigned long> const&, unsigned long) | monkey531[P]llama/examples/server/httplib.h | inline std::string make_content_range_header_field(
const std::pair<size_t, size_t> &offset_and_length, size_t content_length) {
auto st = offset_and_length.first;
auto ed = st + offset_and_length.second - 1;
std::string field = "bytes ";
field += std::to_string(st);
field += "-";
field += std::to_string(ed);
field += "/";
field += std::to_string(content_length);
return field;
} | O3 | c | httplib::detail::make_content_range_header_field[abi:cxx11](std::pair<unsigned long, unsigned long> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %rbp
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xe1635(%rip), %rsi # 0x1470a9
leaq 0xe1634(%rip), %rdx # 0x1470af
callq 0x4b514
movl $0x1, %esi
cmpq $0xa, %r15
jb 0x65ada
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r15, %rcx
cmpq $0x63, %rcx
jbe 0x65ad3
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x65ad8
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x65ada
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x65a9d
addl $-0x3, %esi
jmp 0x65ada
addl $-0x2, %esi
jmp 0x65ada
decl %esi
movl %esi, %esi
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x1fc80
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movq %r15, %rdx
callq 0x457f2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f310
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x65b2b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
leaq 0xe157f(%rip), %rsi # 0x1470b1
movq %rbx, %rdi
callq 0x20520
addq %rbp, %r15
decq %r15
movl $0x1, %esi
cmpq $0xa, %r15
jb 0x65b9a
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r15, %rcx
cmpq $0x63, %rcx
jbe 0x65b93
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x65b98
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x65b9a
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x65b5d
addl $-0x3, %esi
jmp 0x65b9a
addl $-0x2, %esi
jmp 0x65b9a
decl %esi
movl %esi, %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
xorl %edx, %edx
callq 0x1fc80
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movq %r15, %rdx
callq 0x457f2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f310
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x65be5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
leaq 0xf577f(%rip), %rsi # 0x15b36b
movq %rbx, %rdi
callq 0x20520
movl $0x1, %esi
cmpq $0xa, %r14
jb 0x65c4e
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0x65c47
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x65c4c
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x65c4e
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x65c11
addl $-0x3, %esi
jmp 0x65c4e
addl $-0x2, %esi
jmp 0x65c4e
decl %esi
movl %esi, %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
xorl %edx, %edx
callq 0x1fc80
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movq %r14, %rdx
callq 0x457f2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f310
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x65c99
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x65cb3
jmp 0x65cd1
jmp 0x65cb3
jmp 0x65cd1
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x65cd4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x65cd4
jmp 0x65cd1
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x65ce8
movq (%r12), %rsi
incq %rsi
callq 0x1fae0
movq %r14, %rdi
callq 0x20380
| _ZN7httplib6detail31make_content_range_header_fieldB5cxx11ERKSt4pairImmEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov rbx, rdi
mov r15, [rsi]
mov rbp, [rsi+8]
lea r12, [rdi+10h]
mov [rdi], r12
lea rsi, aBytes_1; "bytes "
lea rdx, aBytes_1+6; ""
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 esi, 1
cmp r15, 0Ah
jb short loc_65ADA
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r15
loc_65A9D:
cmp rcx, 63h ; 'c'
jbe short loc_65AD3
cmp rcx, 3E7h
jbe short loc_65AD8
cmp rcx, 2710h
jb short loc_65ADA
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_65A9D
add esi, 0FFFFFFFDh
jmp short loc_65ADA
loc_65AD3:
add esi, 0FFFFFFFEh
jmp short loc_65ADA
loc_65AD8:
dec esi
loc_65ADA:
mov esi, esi
lea r13, [rsp+58h+var_40]
mov [r13-10h], r13
lea rdi, [rsp+58h+var_50]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+58h+var_50]
mov esi, dword ptr [rsp+58h+var_48]
mov rdx, r15
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_65B2B
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65B2B:
lea rsi, asc_1470B0+1; "-"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
add r15, rbp
dec r15
mov esi, 1
cmp r15, 0Ah
jb short loc_65B9A
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r15
loc_65B5D:
cmp rcx, 63h ; 'c'
jbe short loc_65B93
cmp rcx, 3E7h
jbe short loc_65B98
cmp rcx, 2710h
jb short loc_65B9A
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_65B5D
add esi, 0FFFFFFFDh
jmp short loc_65B9A
loc_65B93:
add esi, 0FFFFFFFEh
jmp short loc_65B9A
loc_65B98:
dec esi
loc_65B9A:
mov esi, esi
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+58h+var_50]
mov esi, dword ptr [rsp+58h+var_48]
mov rdx, r15
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_65BE5
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65BE5:
lea rsi, asc_15B36A+1; "/"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov esi, 1
cmp r14, 0Ah
jb short loc_65C4E
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r14
loc_65C11:
cmp rcx, 63h ; 'c'
jbe short loc_65C47
cmp rcx, 3E7h
jbe short loc_65C4C
cmp rcx, 2710h
jb short loc_65C4E
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_65C11
add esi, 0FFFFFFFDh
jmp short loc_65C4E
loc_65C47:
add esi, 0FFFFFFFEh
jmp short loc_65C4E
loc_65C4C:
dec esi
loc_65C4E:
mov esi, esi
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+58h+var_50]
mov esi, dword ptr [rsp+58h+var_48]
mov rdx, r14
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_65C99
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65C99:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_65CB3
jmp short loc_65CD1
jmp short loc_65CB3
jmp short loc_65CD1
loc_65CB3:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_65CD4
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_65CD4
jmp short $+2
loc_65CD1:
mov r14, rax
loc_65CD4:
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_65CE8
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65CE8:
mov rdi, r14
call __Unwind_Resume
| _QWORD * httplib::detail::make_content_range_header_field[abi:cxx11](
_QWORD *a1,
unsigned long long *a2,
unsigned long long a3)
{
unsigned long long v4; // r15
unsigned long long v5; // rbp
unsigned int v6; // esi
unsigned long long v7; // rcx
bool v8; // cc
unsigned long long v9; // r15
unsigned int v10; // esi
unsigned long long v11; // rcx
unsigned int v12; // esi
unsigned long long v13; // rcx
void *v15; // [rsp+8h] [rbp-50h] BYREF
long long v16; // [rsp+10h] [rbp-48h]
_QWORD v17[8]; // [rsp+18h] [rbp-40h] BYREF
v4 = *a2;
v5 = a2[1];
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "bytes ", (long long)"");
v6 = 1;
if ( v4 >= 0xA )
{
v6 = 4;
v7 = v4;
while ( 1 )
{
if ( v7 <= 0x63 )
{
v6 -= 2;
goto LABEL_10;
}
if ( v7 <= 0x3E7 )
break;
if ( v7 < 0x2710 )
goto LABEL_10;
v6 += 4;
v8 = v7 <= 0x1869F;
v7 /= 0x2710uLL;
if ( v8 )
{
v6 -= 3;
goto LABEL_10;
}
}
--v6;
}
LABEL_10:
v15 = v17;
std::string::_M_construct(&v15, v6, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v15, v16, v4);
std::string::_M_append(a1, v15);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
std::string::append(a1, "-");
v9 = v5 + v4 - 1;
v10 = 1;
if ( v9 >= 0xA )
{
v10 = 4;
v11 = v9;
while ( 1 )
{
if ( v11 <= 0x63 )
{
v10 -= 2;
goto LABEL_21;
}
if ( v11 <= 0x3E7 )
break;
if ( v11 < 0x2710 )
goto LABEL_21;
v10 += 4;
v8 = v11 <= 0x1869F;
v11 /= 0x2710uLL;
if ( v8 )
{
v10 -= 3;
goto LABEL_21;
}
}
--v10;
}
LABEL_21:
v15 = v17;
std::string::_M_construct(&v15, v10, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v15, v16, v9);
std::string::_M_append(a1, v15);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
std::string::append(a1, "/");
v12 = 1;
if ( a3 >= 0xA )
{
v12 = 4;
v13 = a3;
while ( 1 )
{
if ( v13 <= 0x63 )
{
v12 -= 2;
goto LABEL_32;
}
if ( v13 <= 0x3E7 )
break;
if ( v13 < 0x2710 )
goto LABEL_32;
v12 += 4;
v8 = v13 <= 0x1869F;
v13 /= 0x2710uLL;
if ( v8 )
{
v12 -= 3;
goto LABEL_32;
}
}
--v12;
}
LABEL_32:
v15 = v17;
std::string::_M_construct(&v15, v12, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v15, v16, a3);
std::string::_M_append(a1, v15);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
return a1;
}
| make_content_range_header_field[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RBX,RDI
MOV R15,qword ptr [RSI]
MOV RBP,qword ptr [RSI + 0x8]
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
LEA RSI,[0x2470a9]
LEA RDX,[0x2470af]
CALL 0x0014b514
MOV ESI,0x1
CMP R15,0xa
JC 0x00165ada
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R15
LAB_00165a9d:
CMP RCX,0x63
JBE 0x00165ad3
CMP RCX,0x3e7
JBE 0x00165ad8
CMP RCX,0x2710
JC 0x00165ada
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x00165a9d
ADD ESI,-0x3
JMP 0x00165ada
LAB_00165ad3:
ADD ESI,-0x2
JMP 0x00165ada
LAB_00165ad8:
DEC ESI
LAB_00165ada:
MOV ESI,ESI
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
LAB_00165ae5:
LEA RDI,[RSP + 0x8]
XOR EDX,EDX
CALL 0x0011fc80
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x10]
MOV RDX,R15
CALL 0x001457f2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00165b0c:
MOV RDI,RBX
CALL 0x0011f310
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00165b2b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_00165b2b:
LEA RSI,[0x2470b1]
MOV RDI,RBX
CALL 0x00120520
ADD R15,RBP
DEC R15
MOV ESI,0x1
CMP R15,0xa
JC 0x00165b9a
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R15
LAB_00165b5d:
CMP RCX,0x63
JBE 0x00165b93
CMP RCX,0x3e7
JBE 0x00165b98
CMP RCX,0x2710
JC 0x00165b9a
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x00165b5d
ADD ESI,-0x3
JMP 0x00165b9a
LAB_00165b93:
ADD ESI,-0x2
JMP 0x00165b9a
LAB_00165b98:
DEC ESI
LAB_00165b9a:
MOV ESI,ESI
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_00165ba4:
XOR EDX,EDX
CALL 0x0011fc80
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x10]
MOV RDX,R15
CALL 0x001457f2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00165bc6:
MOV RDI,RBX
CALL 0x0011f310
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00165be5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_00165be5:
LEA RSI,[0x25b36b]
MOV RDI,RBX
CALL 0x00120520
MOV ESI,0x1
CMP R14,0xa
JC 0x00165c4e
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R14
LAB_00165c11:
CMP RCX,0x63
JBE 0x00165c47
CMP RCX,0x3e7
JBE 0x00165c4c
CMP RCX,0x2710
JC 0x00165c4e
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x00165c11
ADD ESI,-0x3
JMP 0x00165c4e
LAB_00165c47:
ADD ESI,-0x2
JMP 0x00165c4e
LAB_00165c4c:
DEC ESI
LAB_00165c4e:
MOV ESI,ESI
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_00165c58:
XOR EDX,EDX
CALL 0x0011fc80
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x10]
MOV RDX,R14
CALL 0x001457f2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00165c7a:
MOV RDI,RBX
CALL 0x0011f310
LAB_00165c82:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00165c99
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_00165c99:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::make_content_range_header_field[abi:cxx11](std::pair<unsigned long, unsigned
long> const&, unsigned long) */
detail * __thiscall
httplib::detail::make_content_range_header_field_abi_cxx11_
(detail *this,pair *param_1,ulong param_2)
{
long lVar1;
bool bVar2;
char cVar3;
ulong uVar4;
char cVar5;
ulong uVar6;
long *local_50;
uint local_48;
long local_40 [2];
uVar6 = *(ulong *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(detail **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,"bytes ","");
cVar5 = '\x01';
if (9 < uVar6) {
uVar4 = uVar6;
cVar3 = '\x04';
do {
cVar5 = cVar3;
if (uVar4 < 100) {
cVar5 = cVar5 + -2;
goto LAB_00165ada;
}
if (uVar4 < 1000) {
cVar5 = cVar5 + -1;
goto LAB_00165ada;
}
if (uVar4 < 10000) goto LAB_00165ada;
bVar2 = 99999 < uVar4;
uVar4 = uVar4 / 10000;
cVar3 = cVar5 + '\x04';
} while (bVar2);
cVar5 = cVar5 + '\x01';
}
LAB_00165ada:
/* try { // try from 00165ae5 to 00165af0 has its CatchHandler @ 00165ccf */
local_50 = local_40;
std::__cxx11::string::_M_construct((ulong)&local_50,cVar5);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,uVar6);
/* try { // try from 00165b0c to 00165b13 has its CatchHandler @ 00165cb3 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_50);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
/* try { // try from 00165b2b to 00165b39 has its CatchHandler @ 00165cd1 */
std::__cxx11::string::append((char *)this);
uVar6 = (uVar6 + lVar1) - 1;
cVar5 = '\x01';
if (9 < uVar6) {
uVar4 = uVar6;
cVar3 = '\x04';
do {
cVar5 = cVar3;
if (uVar4 < 100) {
cVar5 = cVar5 + -2;
goto LAB_00165b9a;
}
if (uVar4 < 1000) {
cVar5 = cVar5 + -1;
goto LAB_00165b9a;
}
if (uVar4 < 10000) goto LAB_00165b9a;
bVar2 = 99999 < uVar4;
uVar4 = uVar4 / 10000;
cVar3 = cVar5 + '\x04';
} while (bVar2);
cVar5 = cVar5 + '\x01';
}
LAB_00165b9a:
local_50 = local_40;
/* try { // try from 00165ba4 to 00165baa has its CatchHandler @ 00165cb1 */
std::__cxx11::string::_M_construct((ulong)&local_50,cVar5);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,uVar6);
/* try { // try from 00165bc6 to 00165bcd has its CatchHandler @ 00165caf */
std::__cxx11::string::_M_append((char *)this,(ulong)local_50);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
/* try { // try from 00165be5 to 00165bf3 has its CatchHandler @ 00165cd1 */
std::__cxx11::string::append((char *)this);
cVar5 = '\x01';
if (9 < param_2) {
uVar6 = param_2;
cVar3 = '\x04';
do {
cVar5 = cVar3;
if (uVar6 < 100) {
cVar5 = cVar5 + -2;
goto LAB_00165c4e;
}
if (uVar6 < 1000) {
cVar5 = cVar5 + -1;
goto LAB_00165c4e;
}
if (uVar6 < 10000) goto LAB_00165c4e;
bVar2 = 99999 < uVar6;
uVar6 = uVar6 / 10000;
cVar3 = cVar5 + '\x04';
} while (bVar2);
cVar5 = cVar5 + '\x01';
}
LAB_00165c4e:
local_50 = local_40;
/* try { // try from 00165c58 to 00165c5e has its CatchHandler @ 00165cad */
std::__cxx11::string::_M_construct((ulong)&local_50,cVar5);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,param_2);
/* try { // try from 00165c7a to 00165c81 has its CatchHandler @ 00165cab */
std::__cxx11::string::_M_append((char *)this,(ulong)local_50);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return this;
}
|
|
1,481 | LefDefParser::lefiViaRule::setLayer(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp | void
lefiViaRule::setLayer(const char *name)
{
if (numLayers_ == 3) {
lefiError(0, 1430, "ERROR (LEFPARS-1430): too many via rule layers");
return;
}
// This routine sets and creates the active layer.
layers_[numLayers_].setName(name);
numLayers_ += 1;
} | O0 | cpp | LefDefParser::lefiViaRule::setLayer(char const*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x3, 0x14(%rax)
jne 0x30162
xorl %edi, %edi
movl $0x596, %esi # imm = 0x596
leaq 0x49bb1(%rip), %rdx # 0x79d0c
callq 0x3f4e0
jmp 0x30192
movq (%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movslq 0x14(%rax), %rax
imulq $0x90, %rax, %rax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x2ef80
movq (%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser11lefiViaRule8setLayerEPKc:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
cmp dword ptr [rax+14h], 3
jnz short loc_30162
xor edi, edi; this
mov esi, 596h; int
lea rdx, aErrorLefpars14_10; "ERROR (LEFPARS-1430): too many via rule"...
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
jmp short loc_30192
loc_30162:
mov rax, [rsp+18h+var_18]
mov rdi, rax
add rdi, 18h
movsxd rax, dword ptr [rax+14h]
imul rax, 90h
add rdi, rax; this
mov rsi, [rsp+18h+var_10]; char *
call _ZN12LefDefParser16lefiViaRuleLayer7setNameEPKc; LefDefParser::lefiViaRuleLayer::setName(char const*)
mov rax, [rsp+18h+var_18]
mov ecx, [rax+14h]
add ecx, 1
mov [rax+14h], ecx
loc_30192:
add rsp, 18h
retn
| LefDefParser::lefiViaRule * LefDefParser::lefiViaRule::setLayer(
LefDefParser::lefiViaRule *this,
char *a2,
long long a3,
const char *a4)
{
LefDefParser::lefiViaRule *result; // rax
if ( *((_DWORD *)this + 5) == 3 )
return (LefDefParser::lefiViaRule *)LefDefParser::lefiError(
0LL,
1430,
(int)"ERROR (LEFPARS-1430): too many via rule layers",
a4);
LefDefParser::lefiViaRuleLayer::setName((LefDefParser **)this + 18 * *((int *)this + 5) + 3, a2);
result = this;
++*((_DWORD *)this + 5);
return result;
}
| setLayer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
CMP dword ptr [RAX + 0x14],0x3
JNZ 0x00130162
XOR EDI,EDI
MOV ESI,0x596
LEA RDX,[0x179d0c]
CALL 0x0013f4e0
JMP 0x00130192
LAB_00130162:
MOV RAX,qword ptr [RSP]
MOV RDI,RAX
ADD RDI,0x18
MOVSXD RAX,dword ptr [RAX + 0x14]
IMUL RAX,RAX,0x90
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0012ef80
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RAX + 0x14]
ADD ECX,0x1
MOV dword ptr [RAX + 0x14],ECX
LAB_00130192:
ADD RSP,0x18
RET
|
/* LefDefParser::lefiViaRule::setLayer(char const*) */
void __thiscall LefDefParser::lefiViaRule::setLayer(lefiViaRule *this,char *param_1)
{
if (*(int *)(this + 0x14) == 3) {
lefiError(0,0x596,"ERROR (LEFPARS-1430): too many via rule layers");
}
else {
lefiViaRuleLayer::setName
((lefiViaRuleLayer *)(this + (long)*(int *)(this + 0x14) * 0x90 + 0x18),param_1);
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
}
return;
}
|
|
1,482 | my_fwrite | eloqsql/mysys/my_fstream.c | size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes =0;
my_off_t seekptr;
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
uint errors;
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
#endif
seekptr= ftell(stream);
for (;;)
{
size_t written;
if ((written = (size_t) fwrite((char*) Buffer,sizeof(char),
Count, stream)) != Count)
{
DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes));
my_errno=errno;
if (written != (size_t) -1)
{
seekptr+=written;
Buffer+=written;
writtenbytes+=written;
Count-=written;
}
#ifdef EINTR
if (errno == EINTR)
{
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((errno == ENOSPC || errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space("[stream]", errors);
errors++;
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP)))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL),
my_filename(my_fileno(stream)), errno);
}
writtenbytes= (size_t) -1; /* Return that we got error */
break;
}
}
if (MyFlags & (MY_NABP | MY_FNABP))
writtenbytes= 0; /* Everything OK */
else
writtenbytes+= written;
break;
}
DBUG_RETURN(writtenbytes);
} | O0 | c | my_fwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0xbd6f2
movq -0x8(%rbp), %rdi
callq 0x60e80
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x60cc0
movq %rax, -0x38(%rbp)
cmpq -0x18(%rbp), %rax
je 0xbd7fd
jmp 0xbd725
jmp 0xbd727
callq 0x60ba0
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
callq 0xc46c0
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
cmpq $-0x1, -0x38(%rbp)
je 0xbd775
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
callq 0x60ba0
cmpl $0x4, (%rax)
jne 0xbd797
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0xbd840
jmp 0xbd6ff
movq -0x8(%rbp), %rdi
callq 0x608c0
cmpl $0x0, %eax
jne 0xbd7b3
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xbd7fb
movq -0x20(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0xbd7f1
movq -0x8(%rbp), %rdi
callq 0xbd6b0
movl %eax, %edi
callq 0xcaec0
movq %rax, -0x48(%rbp)
callq 0x60ba0
movq -0x48(%rbp), %rdx
movl (%rax), %ecx
movl $0x3, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xbca70
movq $-0x1, -0x28(%rbp)
jmp 0xbd823
jmp 0xbd7fd
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xbd815
movq $0x0, -0x28(%rbp)
jmp 0xbd821
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xbd823
jmp 0xbd825
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_fwrite:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
jmp short $+2
loc_BD6F2:
mov rdi, [rbp+var_8]
call _ftello64
mov [rbp+var_30], rax
loc_BD6FF:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
mov esi, 1
call _fwrite
mov [rbp+var_38], rax
cmp rax, [rbp+var_18]
jz loc_BD7FD
jmp short $+2
loc_BD725:
jmp short $+2
loc_BD727:
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
call _my_thread_var
mov ecx, [rbp+var_3C]
mov [rax], ecx
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_BD775
mov rax, [rbp+var_38]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
loc_BD775:
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_BD797
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
xor edx, edx
xor eax, eax
mov ecx, eax
call my_fseek
jmp loc_BD6FF
loc_BD797:
mov rdi, [rbp+var_8]
call _ferror
cmp eax, 0
jnz short loc_BD7B3
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_BD7FB
loc_BD7B3:
mov rax, [rbp+var_20]
and rax, 1Ah
cmp rax, 0
jz short loc_BD7F1
mov rdi, [rbp+var_8]
call my_fileno
mov edi, eax
call my_filename
mov [rbp+var_48], rax
call ___errno_location
mov rdx, [rbp+var_48]
mov ecx, [rax]
mov edi, 3
mov esi, 4
mov al, 0
call my_error
loc_BD7F1:
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jmp short loc_BD823
loc_BD7FB:
jmp short $+2
loc_BD7FD:
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_BD815
mov [rbp+var_28], 0
jmp short loc_BD821
loc_BD815:
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_BD821:
jmp short $+2
loc_BD823:
jmp short $+2
loc_BD825:
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rsp, 50h
pop rbp
retn
| long long my_fwrite(long long a1, long long a2, long long a3, char a4)
{
long long v4; // rdi
long long v5; // rdi
unsigned int *v6; // rax
long long v8; // [rsp+8h] [rbp-48h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h]
long long i; // [rsp+20h] [rbp-30h]
long long v12; // [rsp+28h] [rbp-28h]
v12 = 0LL;
for ( i = ftello64(a1); ; my_fseek(a1, i, 0LL, 0LL) )
{
v4 = a2;
v10 = fwrite(a2, 1LL, a3, a1);
if ( v10 == a3 )
goto LABEL_12;
v9 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)my_thread_var() = v9;
if ( v10 != -1 )
{
i += v10;
a2 += v10;
v12 += v10;
a3 -= v10;
}
if ( *(_DWORD *)__errno_location(v4) != 4 )
break;
}
if ( !(unsigned int)ferror(a1) && (a4 & 6) == 0 )
{
LABEL_12:
if ( (a4 & 6) != 0 )
return 0LL;
else
return v12 + v10;
}
if ( (a4 & 0x1A) != 0 )
{
v5 = (unsigned int)my_fileno(a1);
v8 = my_filename(v5);
v6 = (unsigned int *)__errno_location(v5);
my_error(3u, 4LL, v8, *v6);
}
return -1LL;
}
| my_fwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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],0x0
JMP 0x001bd6f2
LAB_001bd6f2:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00160e80
MOV qword ptr [RBP + -0x30],RAX
LAB_001bd6ff:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00160cc0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001bd7fd
JMP 0x001bd725
LAB_001bd725:
JMP 0x001bd727
LAB_001bd727:
CALL 0x00160ba0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CALL 0x001c46c0
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001bd775
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001bd775:
CALL 0x00160ba0
CMP dword ptr [RAX],0x4
JNZ 0x001bd797
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
XOR EDX,EDX
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001bd840
JMP 0x001bd6ff
LAB_001bd797:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001608c0
CMP EAX,0x0
JNZ 0x001bd7b3
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001bd7fb
LAB_001bd7b3:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x001bd7f1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001bd6b0
MOV EDI,EAX
CALL 0x001caec0
MOV qword ptr [RBP + -0x48],RAX
CALL 0x00160ba0
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX]
MOV EDI,0x3
MOV ESI,0x4
MOV AL,0x0
CALL 0x001bca70
LAB_001bd7f1:
MOV qword ptr [RBP + -0x28],-0x1
JMP 0x001bd823
LAB_001bd7fb:
JMP 0x001bd7fd
LAB_001bd7fd:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001bd815
MOV qword ptr [RBP + -0x28],0x0
JMP 0x001bd821
LAB_001bd815:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001bd821:
JMP 0x001bd823
LAB_001bd823:
JMP 0x001bd825
LAB_001bd825:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x50
POP RBP
RET
|
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
size_t sVar3;
int *piVar4;
int8 uVar5;
long local_38;
long local_30;
size_t local_20;
void *local_18;
local_30 = 0;
local_38 = ftello64(param_1);
local_20 = param_3;
local_18 = param_2;
do {
sVar3 = fwrite(local_18,1,local_20,param_1);
if (sVar3 == local_20) {
LAB_001bd7fd:
if ((param_4 & 6) == 0) {
local_30 = sVar3 + local_30;
}
else {
local_30 = 0;
}
return local_30;
}
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (sVar3 != 0xffffffffffffffff) {
local_38 = sVar3 + local_38;
local_18 = (void *)(sVar3 + (long)local_18);
local_30 = sVar3 + local_30;
local_20 = local_20 - sVar3;
}
piVar4 = __errno_location();
if (*piVar4 != 4) {
iVar1 = ferror(param_1);
if ((iVar1 != 0) || ((param_4 & 6) != 0)) {
if ((param_4 & 0x1a) != 0) {
uVar2 = my_fileno(param_1);
uVar5 = my_filename(uVar2);
piVar4 = __errno_location();
my_error(3,4,uVar5,*piVar4);
}
return -1;
}
goto LAB_001bd7fd;
}
my_fseek(param_1,local_38,0,0);
} while( true );
}
|
|
1,483 | js_get_regexp | bluesky950520[P]quickjs/quickjs.c | static JSRegExp *js_get_regexp(JSContext *ctx, JSValue obj, BOOL throw_error)
{
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_REGEXP)
return &p->u.regexp;
}
if (throw_error) {
JS_ThrowTypeErrorInvalidClass(ctx, JS_CLASS_REGEXP);
}
return NULL;
} | O0 | c | js_get_regexp:
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x38(%rsp), %rax
cmpl $-0x1, %eax
jne 0x8a60b
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x12, %eax
jne 0x8a609
movq 0x18(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x40(%rsp)
jmp 0x8a634
jmp 0x8a60b
cmpl $0x0, 0x24(%rsp)
je 0x8a62b
movq 0x28(%rsp), %rdi
movl $0x12, %esi
callq 0x3e710
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop
| js_get_regexp:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov [rsp+48h+var_24], ecx
mov rax, [rsp+48h+var_10]
cmp eax, 0FFFFFFFFh
jnz short loc_8A60B
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_30]
movzx eax, word ptr [rax+6]
cmp eax, 12h
jnz short loc_8A609
mov rax, [rsp+48h+var_30]
add rax, 30h ; '0'
mov [rsp+48h+var_8], rax
jmp short loc_8A634
loc_8A609:
jmp short $+2
loc_8A60B:
cmp [rsp+48h+var_24], 0
jz short loc_8A62B
mov rdi, [rsp+48h+var_20]
mov esi, 12h
call JS_ThrowTypeErrorInvalidClass
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
loc_8A62B:
mov [rsp+48h+var_8], 0
loc_8A634:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| long long js_get_regexp(long long a1, long long a2, int a3, int a4)
{
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 18 )
return a2 + 48;
if ( a4 )
JS_ThrowTypeErrorInvalidClass(a1, 18);
return 0LL;
}
| js_get_regexp:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ECX
MOV RAX,qword ptr [RSP + 0x38]
CMP EAX,-0x1
JNZ 0x0018a60b
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x12
JNZ 0x0018a609
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x30
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0018a634
LAB_0018a609:
JMP 0x0018a60b
LAB_0018a60b:
CMP dword ptr [RSP + 0x24],0x0
JZ 0x0018a62b
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x12
CALL 0x0013e710
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
LAB_0018a62b:
MOV qword ptr [RSP + 0x40],0x0
LAB_0018a634:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
long js_get_regexp(int8 param_1,long param_2,int param_3,int param_4)
{
long local_8;
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x12)) {
local_8 = param_2 + 0x30;
}
else {
if (param_4 != 0) {
JS_ThrowTypeErrorInvalidClass(param_1,0x12);
}
local_8 = 0;
}
return local_8;
}
|
|
1,484 | js_get_regexp | bluesky950520[P]quickjs/quickjs.c | static JSRegExp *js_get_regexp(JSContext *ctx, JSValue obj, BOOL throw_error)
{
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_REGEXP)
return &p->u.regexp;
}
if (throw_error) {
JS_ThrowTypeErrorInvalidClass(ctx, JS_CLASS_REGEXP);
}
return NULL;
} | O2 | c | js_get_regexp:
cmpl $-0x1, %edx
jne 0x44ed4
movq %rsi, %rax
cmpw $0x12, 0x6(%rsi)
jne 0x44ed4
addq $0x30, %rax
retq
testl %ecx, %ecx
je 0x44ee8
pushq %rax
pushq $0x12
popq %rsi
callq 0x24ddd
xorl %eax, %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
| js_get_regexp:
cmp edx, 0FFFFFFFFh
jnz short loc_44ED4
mov rax, rsi
cmp word ptr [rsi+6], 12h
jnz short loc_44ED4
add rax, 30h ; '0'
retn
loc_44ED4:
test ecx, ecx
jz short loc_44EE8
push rax
push 12h
pop rsi
call JS_ThrowTypeErrorInvalidClass
xor eax, eax
add rsp, 8
retn
loc_44EE8:
xor eax, eax
retn
| long long js_get_regexp(long long a1, long long a2, int a3, int a4)
{
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 18 )
return a2 + 48;
if ( a4 )
JS_ThrowTypeErrorInvalidClass(a1, 18);
return 0LL;
}
| js_get_regexp:
CMP EDX,-0x1
JNZ 0x00144ed4
MOV RAX,RSI
CMP word ptr [RSI + 0x6],0x12
JNZ 0x00144ed4
ADD RAX,0x30
RET
LAB_00144ed4:
TEST ECX,ECX
JZ 0x00144ee8
PUSH RAX
PUSH 0x12
POP RSI
CALL 0x00124ddd
XOR EAX,EAX
ADD RSP,0x8
RET
LAB_00144ee8:
XOR EAX,EAX
RET
|
long js_get_regexp(int8 param_1,long param_2,int param_3,int param_4)
{
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x12)) {
return param_2 + 0x30;
}
if (param_4 != 0) {
JS_ThrowTypeErrorInvalidClass(param_1,0x12);
return 0;
}
return 0;
}
|
|
1,485 | format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | static std::string format_literal(const std::string & literal) {
std::string escaped = replacePattern(literal, GRAMMAR_LITERAL_ESCAPE_RE, [&](const std::smatch & match) {
char c = match.str()[0];
return GRAMMAR_LITERAL_ESCAPES.at(c);
});
return "\"" + escaped + "\"";
} | O3 | cpp | format_literal(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 $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x80(%rsp)
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0x2ef(%rip), %rax # 0xcb294
movq %rax, 0x18(%rcx)
leaq 0x366(%rip), %rax # 0xcb316
movq %rax, 0x10(%rcx)
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq %rsi, %r14
leaq 0x71380(%rip), %r13 # 0x13c360
leaq 0x20(%rsp), %rbp
leaq 0x40(%rsp), %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x7b769
testb %al, %al
je 0xcb0c4
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq -0x48(%rcx), %rsi
cmpq $0x48, %rdx
movq %rax, %rdx
cmoveq %rsi, %rdx
cmpq %rax, %rcx
cmoveq %rsi, %rdx
movq (%rdx), %r8
subq 0x18(%rsp), %r8
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x1b9f0
cmpq $0x0, 0x70(%rsp)
je 0xcb1bf
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
movq %r12, %rdx
callq *0x78(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbp, %rdi
callq 0x1b260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xcb08e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x8(%rsp), %rax
movq %rax, %rcx
subq (%rsp), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
leaq -0x18(%rax), %rdx
addq $-0x48, %rax
cmpq $0x4, %rcx
cmovaeq %rdx, %rax
movq (%rax), %r15
jmp 0xcafea
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
subq %r15, %r14
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0x1b9f0
movq (%rsp), %rdi
testq %rdi, %rdi
movq 0x80(%rsp), %rbx
je 0xcb0fb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8f0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0xcb114
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x39aac(%rip), %rsi # 0x104bc7
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x623d1
leaq 0x39a98(%rip), %rsi # 0x104bc7
movq %rsp, %rdi
callq 0x1c1b0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xcb159
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0xcb15f
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 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb191
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xcb1ad
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8f0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1b320
jmp 0xcb28b
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb1ec
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xcb1ec
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xcb283
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xcb283
jmp 0xcb235
jmp 0xcb235
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xcb238
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xcb238
jmp 0xcb235
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xcb254
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xcb26a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8f0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0xcb283
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x1c020
movq %rax, %rdi
callq 0x2d431
nop
| _ZL14format_literalRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov [rsp+0B8h+var_38], rdi
xorps xmm0, xmm0
lea rcx, [rsp+0B8h+var_58]
movaps xmmword ptr [rcx], xmm0
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E9_M_invokeERKSt9_Any_dataSH_; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke(std::_Any_data const&,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&)
mov [rcx+18h], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rax
mov r12, rsp
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
lea rax, [rsp+0B8h+var_88]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
add r14, rsi
lea r13, _Z25GRAMMAR_LITERAL_ESCAPE_REB5cxx11; GRAMMAR_LITERAL_ESCAPE_RE
lea rbp, [rsp+0B8h+var_98]
lea rbx, [rsp+0B8h+var_78]
loc_CAFEA:
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov rcx, r13
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz loc_CB0C4
mov rax, [rsp+0B8h+var_B8]
mov rcx, [rsp+0B8h+var_B0]
mov rdx, rcx
sub rdx, rax
lea rsi, [rcx-48h]
cmp rdx, 48h ; 'H'
mov rdx, rax
cmovz rdx, rsi
cmp rcx, rax
cmovz rdx, rsi
mov r8, [rdx]
sub r8, [rsp+0B8h+var_A0]
mov rsi, [rsp+0B8h+var_90]
mov rdi, rbp
xor edx, edx
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
cmp [rsp+0B8h+var_48], 0
jz loc_CB1BF
mov rdi, rbx
lea rsi, [rsp+0B8h+var_58]
mov rdx, r12
call [rsp+0B8h+var_40]
mov rsi, [rsp+0B8h+var_78]
mov rdx, [rsp+0B8h+var_70]
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0B8h+var_78]; void *
lea rax, [rsp+0B8h+var_68]
cmp rdi, rax
jz short loc_CB08E
mov rsi, [rsp+0B8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB08E:
mov rax, [rsp+0B8h+var_B0]
mov rcx, rax
sub rcx, [rsp+0B8h+var_B8]
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
lea rdx, [rax-18h]
add rax, 0FFFFFFFFFFFFFFB8h
cmp rcx, 4
cmovnb rax, rdx
mov r15, [rax]
jmp loc_CAFEA
loc_CB0C4:
lea rdi, [rsp+0B8h+var_98]
mov rsi, [rdi+8]
sub r14, r15
xor edx, edx
mov rcx, r15
mov r8, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov rdi, [rsp+0B8h+var_B8]; void *
test rdi, rdi
mov rbx, [rsp+0B8h+var_38]
jz short loc_CB0FB
mov rsi, [rsp+0B8h+var_A8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB0FB:
mov rax, [rsp+0B8h+var_48]
test rax, rax
jz short loc_CB114
lea rdi, [rsp+0B8h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_CB114:
lea rsi, aName+9; "\""
mov rdi, rsp
lea rdx, [rsp+0B8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rsi, aName+9; "\""
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_CB159
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_CB15F
loc_CB159:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_CB15F:
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+0B8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CB191
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB191:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz short loc_CB1AD
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB1AD:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CB1BF:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp loc_CB28B
mov rbx, rax
lea rax, [rsp+0B8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CB1EC
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CB1EC
mov rbx, rax
loc_CB1EC:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz loc_CB283
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CB283
jmp short loc_CB235
jmp short loc_CB235
mov rbx, rax
mov rdi, [rsp+0B8h+var_78]; void *
lea rax, [rsp+0B8h+var_68]
cmp rdi, rax
jz short loc_CB238
mov rsi, [rsp+0B8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CB238
jmp short $+2
loc_CB235:
mov rbx, rax
loc_CB238:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz short loc_CB254
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB254:
mov rdi, [rsp+0B8h+var_B8]; void *
test rdi, rdi
jz short loc_CB26A
mov rsi, [rsp+0B8h+var_A8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB26A:
mov rax, [rsp+0B8h+var_48]
test rax, rax
jz short loc_CB283
lea rdi, [rsp+0B8h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_CB283:
mov rdi, rbx
call __Unwind_Resume
loc_CB28B:
mov rdi, rax
call __clang_call_terminate
| void format_literal(long long a1, long long *a2, long long a3)
{
long long *v3; // r15
long long v4; // r14
_QWORD *v5; // rdx
long long **v6; // rax
long long v7; // rbx
long long v8; // rax
_OWORD *v9; // rcx
__int128 v10; // [rsp+0h] [rbp-B8h] BYREF
__int128 v11; // [rsp+10h] [rbp-A8h] BYREF
void *v12; // [rsp+20h] [rbp-98h] BYREF
long long v13; // [rsp+28h] [rbp-90h]
_QWORD v14[2]; // [rsp+30h] [rbp-88h] BYREF
void *v15[2]; // [rsp+40h] [rbp-78h] BYREF
long long v16; // [rsp+50h] [rbp-68h] BYREF
__int128 v17; // [rsp+60h] [rbp-58h] BYREF
long long ( *v18)(); // [rsp+70h] [rbp-48h]
long long ( *v19)(); // [rsp+78h] [rbp-40h]
long long v20; // [rsp+80h] [rbp-38h]
v3 = a2;
v20 = a1;
v17 = 0LL;
v19 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke;
v18 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager;
v11 = 0LL;
v10 = 0LL;
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v4 = (long long)a2 + a3;
while ( std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
v3,
v4,
(long long **)&v10,
(long long)&GRAMMAR_LITERAL_ESCAPE_RE[abi:cxx11],
0) )
{
v5 = (_QWORD *)v10;
if ( *((_QWORD *)&v10 + 1) - (_QWORD)v10 == 72LL )
v5 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL);
if ( *((_QWORD *)&v10 + 1) == (_QWORD)v10 )
v5 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL);
std::string::replace(&v12, v13, 0LL, v3, *v5 - *((_QWORD *)&v11 + 1));
if ( !v18 )
std::__throw_bad_function_call();
((void ( *)(void **, __int128 *, __int128 *))v19)(v15, &v17, &v10);
std::string::_M_append(&v12, v15[0], v15[1]);
if ( v15[0] != &v16 )
operator delete(v15[0], v16 + 1);
v6 = (long long **)(*((_QWORD *)&v10 + 1) - 72LL);
if ( 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v10 + 1) - v10) >> 3) >= 4 )
v6 = (long long **)(*((_QWORD *)&v10 + 1) - 24LL);
v3 = *v6;
}
std::string::replace(&v12, v13, 0LL, v3, v4 - (_QWORD)v3);
v7 = v20;
if ( (_QWORD)v10 )
operator delete((void *)v10, v11 - v10);
if ( v18 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
std::operator+<char>((long long)&v10, (long long)"\"", &v12);
v8 = std::string::append(&v10, "\"");
*(_QWORD *)v7 = v7 + 16;
v9 = (_OWORD *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
*(_OWORD *)(v7 + 16) = *v9;
}
else
{
*(_QWORD *)v7 = *(_QWORD *)v8;
*(_QWORD *)(v7 + 16) = *(_QWORD *)v9;
}
*(_QWORD *)(v7 + 8) = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
if ( (__int128 *)v10 != &v11 )
operator delete((void *)v10, v11 + 1);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
}
| format_literal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RSP + 0x80],RDI
XORPS XMM0,XMM0
LEA RCX,[RSP + 0x60]
MOVAPS xmmword ptr [RCX],XMM0
LEA RAX,[0x1cb294]
MOV qword ptr [RCX + 0x18],RAX
LEA RAX,[0x1cb316]
MOV qword ptr [RCX + 0x10],RAX
MOV R12,RSP
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
ADD R14,RSI
LEA R13,[0x23c360]
LEA RBP,[RSP + 0x20]
LEA RBX,[RSP + 0x40]
LAB_001cafea:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV RCX,R13
XOR R8D,R8D
CALL 0x0017b769
TEST AL,AL
JZ 0x001cb0c4
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RCX
SUB RDX,RAX
LEA RSI,[RCX + -0x48]
CMP RDX,0x48
MOV RDX,RAX
CMOVZ RDX,RSI
CMP RCX,RAX
CMOVZ RDX,RSI
MOV R8,qword ptr [RDX]
SUB R8,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,RBP
XOR EDX,EDX
MOV RCX,R15
CALL 0x0011b9f0
CMP qword ptr [RSP + 0x70],0x0
JZ 0x001cb1bf
LAB_001cb051:
MOV RDI,RBX
LEA RSI,[RSP + 0x60]
MOV RDX,R12
CALL qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_001cb06a:
MOV RDI,RBP
CALL 0x0011b260
MOV RDI,qword ptr [RSP + 0x40]
LEA RAX,[RSP + 0x50]
CMP RDI,RAX
JZ 0x001cb08e
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b8f0
LAB_001cb08e:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
SUB RCX,qword ptr [RSP]
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
LEA RDX,[RAX + -0x18]
ADD RAX,-0x48
CMP RCX,0x4
CMOVNC RAX,RDX
MOV R15,qword ptr [RAX]
JMP 0x001cafea
LAB_001cb0c4:
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RDI + 0x8]
SUB R14,R15
LAB_001cb0d0:
XOR EDX,EDX
MOV RCX,R15
MOV R8,R14
CALL 0x0011b9f0
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
MOV RBX,qword ptr [RSP + 0x80]
JZ 0x001cb0fb
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x0011b8f0
LAB_001cb0fb:
MOV RAX,qword ptr [RSP + 0x70]
TEST RAX,RAX
JZ 0x001cb114
LAB_001cb105:
LEA RDI,[RSP + 0x60]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001cb114:
LEA RSI,[0x204bc7]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001623d1
LAB_001cb128:
LEA RSI,[0x204bc7]
MOV RDI,RSP
CALL 0x0011c1b0
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x001cb159
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x001cb15f
LAB_001cb159:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_001cb15f:
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 + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cb191
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b8f0
LAB_001cb191:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x001cb1ad
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8f0
LAB_001cb1ad:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cb1bf:
CALL 0x0011b320
|
/* format_literal(std::__cxx11::string const&) */
void format_literal(string *param_1)
{
string *psVar1;
bool bVar2;
ulong *puVar3;
int8 *puVar4;
long *plVar5;
long in_RDX;
ulong in_RSI;
long lVar6;
long *local_b8;
long lStack_b0;
long local_a8 [2];
int1 *local_98;
ulong local_90;
int1 local_88;
int7 uStack_87;
long *local_78 [2];
long local_68 [2];
int8 local_58;
int8 uStack_50;
code *local_48;
code *local_40;
string *local_38;
local_58 = 0;
uStack_50 = 0;
local_40 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0>
::_M_invoke;
local_48 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0>
::_M_manager;
local_a8[0] = 0;
local_a8[1] = 0;
local_b8 = (long *)0x0;
lStack_b0 = 0;
local_98 = &local_88;
local_90 = 0;
local_88 = 0;
lVar6 = in_RDX + in_RSI;
local_38 = param_1;
while( true ) {
/* try { // try from 001cafea to 001cb044 has its CatchHandler @ 001cb235 */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(in_RSI,lVar6,&local_b8,GRAMMAR_LITERAL_ESCAPE_RE_abi_cxx11_,0);
if (!bVar2) {
/* try { // try from 001cb0d0 to 001cb0dc has its CatchHandler @ 001cb20e */
std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,in_RSI);
psVar1 = local_38;
if (local_b8 != (long *)0x0) {
operator_delete(local_b8,local_a8[0] - (long)local_b8);
}
if (local_48 != (code *)0x0) {
/* try { // try from 001cb105 to 001cb113 has its CatchHandler @ 001cb1c4 */
(*local_48)(&local_58,&local_58,3);
}
/* try { // try from 001cb114 to 001cb127 has its CatchHandler @ 001cb1e9 */
std::operator+((char *)&local_b8,(string *)&DAT_00204bc7);
/* try { // try from 001cb128 to 001cb136 has its CatchHandler @ 001cb1c9 */
puVar4 = (int8 *)std::__cxx11::string::append((char *)&local_b8);
*(string **)psVar1 = psVar1 + 0x10;
plVar5 = puVar4 + 2;
if ((long *)*puVar4 == plVar5) {
lVar6 = puVar4[3];
*(long *)(psVar1 + 0x10) = *plVar5;
*(long *)(psVar1 + 0x18) = lVar6;
}
else {
*(long **)psVar1 = (long *)*puVar4;
*(long *)(psVar1 + 0x10) = *plVar5;
}
*(int8 *)(psVar1 + 8) = puVar4[1];
*puVar4 = plVar5;
puVar4[1] = 0;
*(int1 *)(puVar4 + 2) = 0;
if (local_b8 != local_a8) {
operator_delete(local_b8,local_a8[0] + 1);
}
if (local_98 != &local_88) {
operator_delete(local_98,CONCAT71(uStack_87,local_88) + 1);
}
return;
}
std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,in_RSI);
if (local_48 == (code *)0x0) break;
/* try { // try from 001cb051 to 001cb05f has its CatchHandler @ 001cb233 */
(*local_40)(local_78,&local_58,&local_b8);
/* try { // try from 001cb06a to 001cb071 has its CatchHandler @ 001cb212 */
std::__cxx11::string::_M_append((char *)&local_98,(ulong)local_78[0]);
if (local_78[0] != local_68) {
operator_delete(local_78[0],local_68[0] + 1);
}
puVar3 = (ulong *)(lStack_b0 + -0x48);
if (3 < (ulong)((lStack_b0 - (long)local_b8 >> 3) * -0x5555555555555555)) {
puVar3 = (ulong *)(lStack_b0 + -0x18);
}
in_RSI = *puVar3;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001cb1bf to 001cb1c3 has its CatchHandler @ 001cb210 */
std::__throw_bad_function_call();
}
|
|
1,486 | google::protobuf::UInt32Value::UInt32Value(google::protobuf::UInt32Value const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc | UInt32Value::UInt32Value(const UInt32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
UInt32Value* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.value_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
} | O0 | cpp | google::protobuf::UInt32Value::UInt32Value(google::protobuf::UInt32Value const&):
subq $0xa8, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1540b0
movq 0x28(%rsp), %rax
leaq 0x2eebd4(%rip), %rcx # 0x4fd7f0
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x48(%rsp)
movq %rax, %rdi
addq $0x10, %rdi
movl $0x0, 0x10(%rax)
addq $0x4, %rdi
movq %rdi, 0x20(%rsp)
xorl %esi, %esi
movl $0x4, %edx
callq 0x8db70
movq 0x20(%rsp), %rdi
callq 0x1540e0
movq 0x28(%rsp), %rcx
addq $0x8, %rcx
movq 0x50(%rsp), %rax
addq $0x8, %rax
movq %rcx, 0x68(%rsp)
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x3b(%rsp)
movb 0x3b(%rsp), %al
testb $0x1, %al
jne 0x20ecb9
jmp 0x20ed5c
movq 0x60(%rsp), %rax
movq %rax, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x20ed21
movq 0x18(%rsp), %rdi
callq 0x155370
addq $0x8, %rax
movq %rax, 0x88(%rsp)
jmp 0x20ed3c
movq 0x78(%rsp), %rax
callq *%rax
movq %rax, 0x10(%rsp)
jmp 0x20ed2f
movq 0x10(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x155200
jmp 0x20ed5a
jmp 0x20ed5c
jmp 0x20ed5e
movq 0x50(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0xa8, %rsp
retq
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x1540a0
movq 0x40(%rsp), %rdi
callq 0x90db0
nopl (%rax,%rax)
| _ZN6google8protobuf11UInt32ValueC2ERKS1_:
sub rsp, 0A8h
mov [rsp+0A8h+var_50], rdi
mov [rsp+0A8h+var_58], rsi
mov rdi, [rsp+0A8h+var_50]; this
mov [rsp+0A8h+var_80], rdi
call _ZN6google8protobuf7MessageC2Ev; google::protobuf::Message::Message(void)
mov rax, [rsp+0A8h+var_80]
lea rcx, _ZTVN6google8protobuf11UInt32ValueE; `vtable for'google::protobuf::UInt32Value
add rcx, 10h
mov [rax], rcx
mov [rsp+0A8h+var_60], rax
mov rdi, rax
add rdi, 10h
mov dword ptr [rax+10h], 0
add rdi, 4
mov [rsp+0A8h+var_88], rdi
xor esi, esi
mov edx, 4
call _memset
mov rdi, [rsp+0A8h+var_88]; this
call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void)
mov rcx, [rsp+0A8h+var_80]
add rcx, 8
mov rax, [rsp+0A8h+var_58]
add rax, 8
mov [rsp+0A8h+var_40], rcx
mov [rsp+0A8h+var_48], rax
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_78], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_8], rax
mov rax, [rsp+0A8h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
setnz al
mov [rsp+0A8h+var_6D], al
mov al, [rsp+0A8h+var_6D]
test al, 1
jnz short loc_20ECB9
jmp loc_20ED5C
loc_20ECB9:
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_28], rax
mov [rsp+0A8h+var_30], 0
mov rax, [rsp+0A8h+var_28]
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_18], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_10]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_20ED21
mov rdi, [rsp+0A8h+var_90]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+0A8h+var_20], rax
jmp short loc_20ED3C
loc_20ED21:
mov rax, [rsp+0A8h+var_30]
call rax
mov [rsp+0A8h+var_98], rax
jmp short $+2
loc_20ED2F:
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_20], rax
loc_20ED3C:
mov rax, [rsp+0A8h+var_20]
mov qword ptr [rsp+0A8h+var_A0], rax
mov rsi, qword ptr [rsp+0A8h+var_A0]; int
mov rdi, [rsp+0A8h+var_78]; void *
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
jmp short $+2
loc_20ED5A:
jmp short $+2
loc_20ED5C:
jmp short $+2
loc_20ED5E:
mov rax, [rsp+0A8h+var_58]
mov ecx, [rax+10h]
mov rax, [rsp+0A8h+var_60]
mov [rax+10h], ecx
add rsp, 0A8h
retn
mov rdi, [rsp+arg_20]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
call _ZN6google8protobuf7MessageD2Ev; google::protobuf::Message::~Message()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| google::protobuf::UInt32Value * google::protobuf::UInt32Value::UInt32Value(
google::protobuf::UInt32Value *this,
const google::protobuf::UInt32Value *a2)
{
google::protobuf::UInt32Value *result; // rax
unsigned long long v3; // [rsp+88h] [rbp-20h]
google::protobuf::Message::Message(this);
*(_QWORD *)this = &`vtable for'google::protobuf::UInt32Value + 2;
*((_DWORD *)this + 4) = 0;
memset((char *)this + 20, 0LL, 4LL);
google::protobuf::internal::CachedSize::CachedSize((google::protobuf::UInt32Value *)((char *)this + 20));
if ( (*((_QWORD *)a2 + 1) & 1LL) != 0 )
{
v3 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)a2 + 1)
+ 8;
google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>((char *)this + 8, v3);
}
result = this;
*((_DWORD *)this + 4) = *((_DWORD *)a2 + 4);
return result;
}
| |||
1,487 | google::protobuf::UInt32Value::UInt32Value(google::protobuf::UInt32Value const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc | UInt32Value::UInt32Value(const UInt32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
UInt32Value* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.value_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
} | O3 | cpp | google::protobuf::UInt32Value::UInt32Value(google::protobuf::UInt32Value const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x15a191(%rip), %rax # 0x20b890
movq %rax, (%rdi)
movq 0x8(%rsi), %rsi
testb $0x1, %sil
je 0xb1720
leaq 0x8(%rbx), %r15
andq $-0x4, %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x734be
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x158de9(%rip), %rax # 0x20a520
addq $0x10, %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x73456
movq %r14, %rdi
callq 0x2e220
| _ZN6google8protobuf11UInt32ValueC2ERKS1_:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, off_20B890
mov [rdi], rax
mov rsi, [rsi+8]
test sil, 1
jz short loc_B1720
lea r15, [rbx+8]
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8
mov rdi, r15
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
loc_B1720:
mov eax, [r14+10h]
mov [rbx+10h], eax
pop rbx
pop r14
pop r15
retn
mov r14, rax
lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite
add rax, 10h
mov [rbx], rax
mov rdi, r15; this
call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::UInt32Value::UInt32Value(
google::protobuf::UInt32Value *this,
const google::protobuf::UInt32Value *a2)
{
long long v3; // rsi
long long result; // rax
*(_OWORD *)((char *)this + 8) = 0LL;
*(_QWORD *)this = off_20B890;
v3 = *((_QWORD *)a2 + 1);
if ( (v3 & 1) != 0 )
google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(
(long long *)this + 1,
(const google::protobuf::UnknownFieldSet *)((v3 & 0xFFFFFFFFFFFFFFFCLL) + 8));
result = *((unsigned int *)a2 + 4);
*((_DWORD *)this + 4) = result;
return result;
}
| UInt32Value:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x30b890]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [RSI + 0x8]
TEST SIL,0x1
JZ 0x001b1720
LEA R15,[RBX + 0x8]
AND RSI,-0x4
ADD RSI,0x8
LAB_001b1718:
MOV RDI,R15
CALL 0x001734be
LAB_001b1720:
MOV EAX,dword ptr [R14 + 0x10]
MOV dword ptr [RBX + 0x10],EAX
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::UInt32Value::UInt32Value(google::protobuf::UInt32Value const&) */
void __thiscall google::protobuf::UInt32Value::UInt32Value(UInt32Value *this,UInt32Value *param_1)
{
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__UInt32Value_0030b890;
if ((*(ulong *)(param_1 + 8) & 1) != 0) {
/* try { // try from 001b1718 to 001b171f has its CatchHandler @ 001b172d */
internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8),
(UnknownFieldSet *)((*(ulong *)(param_1 + 8) & 0xfffffffffffffffc) + 8));
}
*(int4 *)(this + 0x10) = *(int4 *)(param_1 + 0x10);
return;
}
|
|
1,488 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x67459
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x6744a
cmpl $0x1, %eax
jne 0x67451
addq $0x30, 0x8(%rdi)
jmp 0x67455
addq $0x10, 0x10(%rdi)
jmp 0x67455
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x47995(%rip), %rdi # 0xaedf6
leaq 0x479d8(%rip), %rdx # 0xaee40
leaq 0x4cb7e(%rip), %rcx # 0xb3fed
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x23ed0
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_67459
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_6744A
cmp eax, 1
jnz short loc_67451
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_67455
loc_6744A:
add qword ptr [rdi+10h], 10h
jmp short loc_67455
loc_67451:
inc qword ptr [rdi+18h]
loc_67455:
mov rax, rdi
retn
loc_67459:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return std::make_shared<std::vector<minja::Value>>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL);
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00167459
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0016744a
CMP EAX,0x1
JNZ 0x00167451
ADD qword ptr [RDI + 0x8],0x30
JMP 0x00167455
LAB_0016744a:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x00167455
LAB_00167451:
INC qword ptr [RDI + 0x18]
LAB_00167455:
MOV RAX,RDI
RET
LAB_00167459:
PUSH RAX
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b3fed]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00123ed0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
|
|
1,489 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x8c069
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x8c05a
cmpl $0x1, %eax
jne 0x8c061
addq $0x30, 0x8(%rdi)
jmp 0x8c065
addq $0x10, 0x10(%rdi)
jmp 0x8c065
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x5ed82(%rip), %rdi # 0xeadf3
leaq 0x5edc5(%rip), %rdx # 0xeae3d
leaq 0x63f7e(%rip), %rcx # 0xefffd
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x1aeb0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_8C069
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_8C05A
cmp eax, 1
jnz short loc_8C061
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_8C065
loc_8C05A:
add qword ptr [rdi+10h], 10h
jmp short loc_8C065
loc_8C061:
inc qword ptr [rdi+18h]
loc_8C065:
mov rax, rdi
retn
loc_8C069:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0018c069
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0018c05a
CMP EAX,0x1
JNZ 0x0018c061
ADD qword ptr [RDI + 0x8],0x30
JMP 0x0018c065
LAB_0018c05a:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x0018c065
LAB_0018c061:
INC qword ptr [RDI + 0x18]
LAB_0018c065:
MOV RAX,RDI
RET
LAB_0018c069:
PUSH RAX
LEA RDI,[0x1eadf3]
LEA RDX,[0x1eae3d]
LEA RCX,[0x1efffd]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x0011aeb0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
|
|
1,490 | my_fcvt | eloqsql/strings/dtoa.c | size_t my_fcvt(double x, int precision, char *to, my_bool *error)
{
int decpt, sign, len, i;
char *res, *src, *end, *dst= to;
char buf[DTOA_BUFF_SIZE];
DBUG_ASSERT(precision >= 0 && precision < DECIMAL_NOT_SPECIFIED && to != NULL);
res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
if (decpt == DTOA_OVERFLOW)
{
dtoa_free(res, buf, sizeof(buf));
*to++= '0';
*to= '\0';
if (error != NULL)
*error= TRUE;
return 1;
}
src= res;
len= (int)(end - src);
if (sign)
*dst++= '-';
if (decpt <= 0)
{
*dst++= '0';
*dst++= '.';
for (i= decpt; i < 0; i++)
*dst++= '0';
}
for (i= 1; i <= len; i++)
{
*dst++= *src++;
if (i == decpt && i < len)
*dst++= '.';
}
while (i++ <= decpt)
*dst++= '0';
if (precision > 0)
{
if (len <= decpt)
*dst++= '.';
for (i= precision - MY_MAX(0, (len - decpt)); i > 0; i--)
*dst++= '0';
}
*dst= '\0';
if (error != NULL)
*error= FALSE;
dtoa_free(res, buf, sizeof(buf));
return dst - to;
} | O3 | c | my_fcvt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe98, %rsp # imm = 0xE98
movq %rdx, -0xea8(%rbp)
movq %rsi, %r14
movl %edi, %esi
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0xe94(%rbp), %r13
leaq -0xe9c(%rbp), %rcx
leaq -0xec0(%rbp), %r8
leaq -0xe90(%rbp), %rbx
movl $0x5, %edi
movl %esi, -0xe98(%rbp)
movq %r13, %rdx
movq %rbx, %r9
callq 0x55eba
movq %rax, %r15
movl (%r13), %r12d
cmpl $0x270f, %r12d # imm = 0x270F
jne 0x55d27
cmpq %rbx, %r15
setae %al
leaq -0x30(%rbp), %rcx
cmpq %r15, %rcx
seta %cl
testb %cl, %al
jne 0x55d03
movq %r15, %rdi
callq 0x243a0
movw $0x30, (%r14)
movl $0x1, %r13d
movq -0xea8(%rbp), %rax
testq %rax, %rax
je 0x55e91
movb $0x1, (%rax)
jmp 0x55e91
movq -0xec0(%rbp), %rbx
movq %r14, %rax
movl %ebx, %r14d
cmpl $0x0, -0xe9c(%rbp)
movq %rax, %r13
je 0x55d47
leaq 0x1(%rax), %r13
movb $0x2d, (%rax)
movq %rax, -0xeb8(%rbp)
subl %r15d, %r14d
testl %r12d, %r12d
movl -0xe98(%rbp), %r8d
jg 0x55da1
movw $0x2e30, (%r13) # imm = 0x2E30
leaq 0x2(%r13), %rdi
testl %r12d, %r12d
js 0x55d72
movq %rdi, %r13
jmp 0x55da1
movl %r12d, %eax
notl %eax
movq %rax, -0xeb0(%rbp)
leaq 0x1(%rax), %rdx
movl $0x30, %esi
callq 0x24180
movl -0xe98(%rbp), %r8d
movq -0xeb0(%rbp), %rax
addq %rax, %r13
addq $0x3, %r13
testl %r14d, %r14d
jle 0x55de8
subl %r15d, %ebx
incl %ebx
movl %r14d, %eax
xorl %ecx, %ecx
movq %r13, %rdx
leal 0x1(%rcx), %esi
movb (%r15,%rcx), %dil
incq %r13
movb %dil, (%rdx)
cmpl -0xe94(%rbp), %esi
jne 0x55dd8
cmpl %r14d, %esi
jge 0x55dd8
movb $0x2e, 0x1(%rdx)
addq $0x2, %rdx
movq %rdx, %r13
incq %rcx
cmpl %ecx, %eax
jne 0x55db0
movl -0xe94(%rbp), %r12d
jmp 0x55ded
movl $0x1, %ebx
cmpl %r12d, %ebx
jg 0x55e0a
decl %ebx
movb $0x30, (%r13)
incq %r13
movl -0xe94(%rbp), %r12d
incl %ebx
cmpl %r12d, %ebx
jl 0x55df4
testl %r8d, %r8d
jle 0x55e50
cmpl %r14d, %r12d
jl 0x55e23
movb $0x2e, (%r13)
incq %r13
movl -0xe94(%rbp), %r12d
subl %r12d, %r14d
cmpl %r8d, %r14d
jge 0x55e50
xorl %ebx, %ebx
testl %r14d, %r14d
cmovgl %r14d, %ebx
notl %ebx
addl %r8d, %ebx
leaq 0x1(%rbx), %rdx
movq %r13, %rdi
movl $0x30, %esi
callq 0x24180
addq %rbx, %r13
incq %r13
movb $0x0, (%r13)
movq -0xea8(%rbp), %rax
testq %rax, %rax
movq -0xeb8(%rbp), %rbx
je 0x55e6b
movb $0x0, (%rax)
leaq -0xe90(%rbp), %rax
cmpq %rax, %r15
setae %al
leaq -0x30(%rbp), %rcx
cmpq %r15, %rcx
seta %cl
testb %cl, %al
jne 0x55e8e
movq %r15, %rdi
callq 0x243a0
subq %rbx, %r13
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x55eb5
movq %r13, %rax
addq $0xe98, %rsp # imm = 0xE98
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24330
| my_fcvt:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E98h
mov [rbp+var_EA8], rdx
mov r14, rsi
mov esi, edi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r13, [rbp+var_E94]
lea rcx, [rbp+var_E9C]
lea r8, [rbp+var_EC0]
lea rbx, [rbp+var_E90]
mov edi, 5
mov [rbp+var_E98], esi
mov rdx, r13
mov r9, rbx
call dtoa
mov r15, rax
mov r12d, [r13+0]
cmp r12d, 270Fh
jnz short loc_55D27
cmp r15, rbx
setnb al
lea rcx, [rbp+var_30]
cmp rcx, r15
setnbe cl
test al, cl
jnz short loc_55D03
mov rdi, r15
call _free
loc_55D03:
mov word ptr [r14], 30h ; '0'
mov r13d, 1
mov rax, [rbp+var_EA8]
test rax, rax
jz loc_55E91
mov byte ptr [rax], 1
jmp loc_55E91
loc_55D27:
mov rbx, [rbp+var_EC0]
mov rax, r14
mov r14d, ebx
cmp [rbp+var_E9C], 0
mov r13, rax
jz short loc_55D47
lea r13, [rax+1]
mov byte ptr [rax], 2Dh ; '-'
loc_55D47:
mov [rbp+var_EB8], rax
sub r14d, r15d
test r12d, r12d
mov r8d, [rbp+var_E98]
jg short loc_55DA1
mov word ptr [r13+0], 2E30h
lea rdi, [r13+2]
test r12d, r12d
js short loc_55D72
mov r13, rdi
jmp short loc_55DA1
loc_55D72:
mov eax, r12d
not eax
mov [rbp+var_EB0], rax
lea rdx, [rax+1]
mov esi, 30h ; '0'
call _memset
mov r8d, [rbp+var_E98]
mov rax, [rbp+var_EB0]
add r13, rax
add r13, 3
loc_55DA1:
test r14d, r14d
jle short loc_55DE8
sub ebx, r15d
inc ebx
mov eax, r14d
xor ecx, ecx
loc_55DB0:
mov rdx, r13
lea esi, [rcx+1]
mov dil, [r15+rcx]
inc r13
mov [rdx], dil
cmp esi, [rbp+var_E94]
jnz short loc_55DD8
cmp esi, r14d
jge short loc_55DD8
mov byte ptr [rdx+1], 2Eh ; '.'
add rdx, 2
mov r13, rdx
loc_55DD8:
inc rcx
cmp eax, ecx
jnz short loc_55DB0
mov r12d, [rbp+var_E94]
jmp short loc_55DED
loc_55DE8:
mov ebx, 1
loc_55DED:
cmp ebx, r12d
jg short loc_55E0A
dec ebx
loc_55DF4:
mov byte ptr [r13+0], 30h ; '0'
inc r13
mov r12d, [rbp+var_E94]
inc ebx
cmp ebx, r12d
jl short loc_55DF4
loc_55E0A:
test r8d, r8d
jle short loc_55E50
cmp r12d, r14d
jl short loc_55E23
mov byte ptr [r13+0], 2Eh ; '.'
inc r13
mov r12d, [rbp+var_E94]
loc_55E23:
sub r14d, r12d
cmp r14d, r8d
jge short loc_55E50
xor ebx, ebx
test r14d, r14d
cmovg ebx, r14d
not ebx
add ebx, r8d
lea rdx, [rbx+1]
mov rdi, r13
mov esi, 30h ; '0'
call _memset
add r13, rbx
inc r13
loc_55E50:
mov byte ptr [r13+0], 0
mov rax, [rbp+var_EA8]
test rax, rax
mov rbx, [rbp+var_EB8]
jz short loc_55E6B
mov byte ptr [rax], 0
loc_55E6B:
lea rax, [rbp+var_E90]
cmp r15, rax
setnb al
lea rcx, [rbp+var_30]
cmp rcx, r15
setnbe cl
test al, cl
jnz short loc_55E8E
mov rdi, r15
call _free
loc_55E8E:
sub r13, rbx
loc_55E91:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_55EB5
mov rax, r13
add rsp, 0E98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_55EB5:
call ___stack_chk_fail
| _BYTE * my_fcvt(unsigned int a1, _WORD *a2, _BYTE *a3)
{
unsigned long long v3; // r15
int v4; // r12d
long long v5; // r13
int v6; // ebx
int v7; // r14d
_BYTE *v8; // r13
int v9; // r14d
int v10; // r8d
int v11; // ebx
long long v12; // rcx
_BYTE *v13; // rdx
int v14; // ebx
int v15; // r14d
int v16; // ebx
long long v17; // rbx
_WORD *v18; // rbx
long long v20; // [rsp+0h] [rbp-EC0h] BYREF
_WORD *v21; // [rsp+8h] [rbp-EB8h]
long long v22; // [rsp+10h] [rbp-EB0h]
_BYTE *v23; // [rsp+18h] [rbp-EA8h]
int v24; // [rsp+24h] [rbp-E9Ch] BYREF
int v25; // [rsp+28h] [rbp-E98h]
int v26; // [rsp+2Ch] [rbp-E94h] BYREF
_BYTE v27[3680]; // [rsp+30h] [rbp-E90h] BYREF
_QWORD v28[6]; // [rsp+E90h] [rbp-30h] BYREF
v23 = a3;
v28[0] = __readfsqword(0x28u);
v25 = a1;
v3 = dtoa(5LL, a1, &v26, &v24, &v20, v27);
v4 = v26;
if ( v26 == 9999 )
{
if ( (unsigned long long)v28 <= v3 || v3 < (unsigned long long)v27 )
free(v3);
*a2 = 48;
v5 = 1LL;
if ( v23 )
*v23 = 1;
}
else
{
v6 = v20;
v7 = v20;
v8 = a2;
if ( v24 )
{
v8 = (char *)a2 + 1;
*(_BYTE *)a2 = 45;
}
v21 = a2;
v9 = v7 - v3;
v10 = v25;
if ( v4 <= 0 )
{
*(_WORD *)v8 = 11824;
if ( v4 < 0 )
{
v22 = (unsigned int)~v4;
memset(v8 + 2, 48LL, v22 + 1);
v10 = v25;
v8 += v22 + 3;
}
else
{
v8 += 2;
}
}
if ( v9 <= 0 )
{
v11 = 1;
}
else
{
v11 = v6 - v3 + 1;
v12 = 0LL;
do
{
v13 = v8++;
*v13 = *(_BYTE *)(v3 + v12);
if ( (_DWORD)v12 + 1 == v26 && (int)v12 + 1 < v9 )
{
v13[1] = 46;
v8 = v13 + 2;
}
++v12;
}
while ( v9 != (_DWORD)v12 );
v4 = v26;
}
if ( v11 <= v4 )
{
v14 = v11 - 1;
do
{
*v8++ = 48;
v4 = v26;
++v14;
}
while ( v14 < v26 );
}
if ( v10 > 0 )
{
if ( v4 >= v9 )
{
*v8++ = 46;
v4 = v26;
}
v15 = v9 - v4;
if ( v15 < v10 )
{
v16 = 0;
if ( v15 > 0 )
v16 = v15;
v17 = (unsigned int)(v10 + ~v16);
memset(v8, 48LL, v17 + 1);
v8 += v17 + 1;
}
}
*v8 = 0;
v18 = v21;
if ( v23 )
*v23 = 0;
if ( (unsigned long long)v28 <= v3 || v3 < (unsigned long long)v27 )
free(v3);
return (_BYTE *)(v8 - (_BYTE *)v18);
}
return (_BYTE *)v5;
}
| my_fcvt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe98
MOV qword ptr [RBP + -0xea8],RDX
MOV R14,RSI
MOV ESI,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R13,[RBP + -0xe94]
LEA RCX,[RBP + -0xe9c]
LEA R8,[RBP + -0xec0]
LEA RBX,[RBP + -0xe90]
MOV EDI,0x5
MOV dword ptr [RBP + -0xe98],ESI
MOV RDX,R13
MOV R9,RBX
CALL 0x00155eba
MOV R15,RAX
MOV R12D,dword ptr [R13]
CMP R12D,0x270f
JNZ 0x00155d27
CMP R15,RBX
SETNC AL
LEA RCX,[RBP + -0x30]
CMP RCX,R15
SETA CL
TEST AL,CL
JNZ 0x00155d03
MOV RDI,R15
CALL 0x001243a0
LAB_00155d03:
MOV word ptr [R14],0x30
MOV R13D,0x1
MOV RAX,qword ptr [RBP + -0xea8]
TEST RAX,RAX
JZ 0x00155e91
MOV byte ptr [RAX],0x1
JMP 0x00155e91
LAB_00155d27:
MOV RBX,qword ptr [RBP + -0xec0]
MOV RAX,R14
MOV R14D,EBX
CMP dword ptr [RBP + -0xe9c],0x0
MOV R13,RAX
JZ 0x00155d47
LEA R13,[RAX + 0x1]
MOV byte ptr [RAX],0x2d
LAB_00155d47:
MOV qword ptr [RBP + -0xeb8],RAX
SUB R14D,R15D
TEST R12D,R12D
MOV R8D,dword ptr [RBP + -0xe98]
JG 0x00155da1
MOV word ptr [R13],0x2e30
LEA RDI,[R13 + 0x2]
TEST R12D,R12D
JS 0x00155d72
MOV R13,RDI
JMP 0x00155da1
LAB_00155d72:
MOV EAX,R12D
NOT EAX
MOV qword ptr [RBP + -0xeb0],RAX
LEA RDX,[RAX + 0x1]
MOV ESI,0x30
CALL 0x00124180
MOV R8D,dword ptr [RBP + -0xe98]
MOV RAX,qword ptr [RBP + -0xeb0]
ADD R13,RAX
ADD R13,0x3
LAB_00155da1:
TEST R14D,R14D
JLE 0x00155de8
SUB EBX,R15D
INC EBX
MOV EAX,R14D
XOR ECX,ECX
LAB_00155db0:
MOV RDX,R13
LEA ESI,[RCX + 0x1]
MOV DIL,byte ptr [R15 + RCX*0x1]
INC R13
MOV byte ptr [RDX],DIL
CMP ESI,dword ptr [RBP + -0xe94]
JNZ 0x00155dd8
CMP ESI,R14D
JGE 0x00155dd8
MOV byte ptr [RDX + 0x1],0x2e
ADD RDX,0x2
MOV R13,RDX
LAB_00155dd8:
INC RCX
CMP EAX,ECX
JNZ 0x00155db0
MOV R12D,dword ptr [RBP + -0xe94]
JMP 0x00155ded
LAB_00155de8:
MOV EBX,0x1
LAB_00155ded:
CMP EBX,R12D
JG 0x00155e0a
DEC EBX
LAB_00155df4:
MOV byte ptr [R13],0x30
INC R13
MOV R12D,dword ptr [RBP + -0xe94]
INC EBX
CMP EBX,R12D
JL 0x00155df4
LAB_00155e0a:
TEST R8D,R8D
JLE 0x00155e50
CMP R12D,R14D
JL 0x00155e23
MOV byte ptr [R13],0x2e
INC R13
MOV R12D,dword ptr [RBP + -0xe94]
LAB_00155e23:
SUB R14D,R12D
CMP R14D,R8D
JGE 0x00155e50
XOR EBX,EBX
TEST R14D,R14D
CMOVG EBX,R14D
NOT EBX
ADD EBX,R8D
LEA RDX,[RBX + 0x1]
MOV RDI,R13
MOV ESI,0x30
CALL 0x00124180
ADD R13,RBX
INC R13
LAB_00155e50:
MOV byte ptr [R13],0x0
MOV RAX,qword ptr [RBP + -0xea8]
TEST RAX,RAX
MOV RBX,qword ptr [RBP + -0xeb8]
JZ 0x00155e6b
MOV byte ptr [RAX],0x0
LAB_00155e6b:
LEA RAX,[RBP + -0xe90]
CMP R15,RAX
SETNC AL
LEA RCX,[RBP + -0x30]
CMP RCX,R15
SETA CL
TEST AL,CL
JNZ 0x00155e8e
MOV RDI,R15
CALL 0x001243a0
LAB_00155e8e:
SUB R13,RBX
LAB_00155e91:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00155eb5
MOV RAX,R13
ADD RSP,0xe98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00155eb5:
CALL 0x00124330
|
long my_fcvt(int param_1,int2 *param_2,int1 *param_3)
{
long *__ptr;
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
int2 *puVar5;
int2 *__s;
int iVar6;
long in_FS_OFFSET;
int local_ec8 [2];
int2 *local_ec0;
ulong local_eb8;
int1 *local_eb0;
int local_ea4;
int local_ea0;
uint local_e9c;
long local_e98 [460];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_eb0 = param_3;
local_ea0 = param_1;
__ptr = (long *)dtoa(5,param_1,&local_e9c,&local_ea4,local_ec8,local_e98);
uVar3 = local_e9c;
if (local_e9c == 9999) {
if (__ptr < local_e98 || &local_38 <= __ptr) {
free(__ptr);
}
*param_2 = 0x30;
lVar4 = 1;
if (local_eb0 != (int1 *)0x0) {
*local_eb0 = 1;
}
}
else {
puVar5 = param_2;
if (local_ea4 != 0) {
puVar5 = (int2 *)((long)param_2 + 1);
*(int1 *)param_2 = 0x2d;
}
iVar6 = local_ec8[0] - (int)__ptr;
__s = puVar5;
local_ec0 = param_2;
if ((int)local_e9c < 1) {
*puVar5 = 0x2e30;
__s = puVar5 + 1;
if ((int)local_e9c < 0) {
local_eb8 = (ulong)~local_e9c;
memset(__s,0x30,local_eb8 + 1);
__s = (int2 *)((long)puVar5 + local_eb8 + 3);
}
}
if (iVar6 < 1) {
iVar1 = 1;
}
else {
iVar1 = (local_ec8[0] - (int)__ptr) + 1;
lVar4 = 0;
puVar5 = __s;
do {
uVar3 = (int)lVar4 + 1;
__s = (int2 *)((long)puVar5 + 1);
*(int1 *)puVar5 = *(int1 *)((long)__ptr + lVar4);
if ((uVar3 == local_e9c) && ((int)uVar3 < iVar6)) {
*(int1 *)((long)puVar5 + 1) = 0x2e;
__s = puVar5 + 1;
}
lVar4 = lVar4 + 1;
puVar5 = __s;
uVar3 = local_e9c;
} while (iVar6 != (int)lVar4);
}
if (iVar1 <= (int)uVar3) {
iVar1 = iVar1 + -1;
do {
*(int1 *)__s = 0x30;
__s = (int2 *)((long)__s + 1);
iVar1 = iVar1 + 1;
uVar3 = local_e9c;
} while (iVar1 < (int)local_e9c);
}
if (0 < local_ea0) {
if (iVar6 <= (int)uVar3) {
*(int1 *)__s = 0x2e;
__s = (int2 *)((long)__s + 1);
uVar3 = local_e9c;
}
uVar3 = iVar6 - uVar3;
if ((int)uVar3 < local_ea0) {
uVar2 = 0;
if (0 < (int)uVar3) {
uVar2 = uVar3;
}
uVar3 = ~uVar2 + local_ea0;
memset(__s,0x30,(ulong)uVar3 + 1);
__s = (int2 *)((long)__s + (ulong)uVar3 + 1);
}
}
puVar5 = local_ec0;
*(int1 *)__s = 0;
if (local_eb0 != (int1 *)0x0) {
*local_eb0 = 0;
}
if (__ptr < local_e98 || &local_38 <= __ptr) {
free(__ptr);
}
lVar4 = (long)__s - (long)puVar5;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar4;
}
|
|
1,491 | minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {} | O3 | cpp | minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %rbx
leaq 0x9030e(%rip), %r13 # 0x12afd8
addq $0x10, %r13
movq %r13, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9acfa
movq 0x9129c(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x9acf6
incl 0x8(%rax)
jmp 0x9acfa
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x90387(%rip), %rax # 0x12b090
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x55340
movq 0x38(%rsp), %rax
movb 0x30(%rsp), %cl
xorl %edx, %edx
movq %rdx, 0x40(%rbx)
movups (%r12), %xmm0
movq %rdx, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
movq %rdx, (%r12)
movq %rdx, 0x50(%rbx)
movups (%r15), %xmm0
movq %rdx, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
movq %rdx, (%r15)
movq %rdx, 0x60(%rbx)
movups (%r14), %xmm0
movq %rdx, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rdx, (%r14)
movb %cl, 0x68(%rbx)
movq %rdx, 0x78(%rbx)
movups (%rax), %xmm0
movq %rdx, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
movq %rdx, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r13, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9ad96
callq 0x6de32
movq %r14, %rdi
callq 0x1af90
| _ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push r15
push r14
push r13
push r12
push rbx
mov r14, r9
mov r15, r8
mov r12, rcx
mov rbx, rdi
lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r13, 10h
mov [rdi], r13
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9ACFA
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9ACF6
inc dword ptr [rax+8]
jmp short loc_9ACFA
loc_9ACF6:
lock inc dword ptr [rax+8]
loc_9ACFA:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, rdx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov rax, [rsp+28h+arg_8]
mov cl, [rsp+28h+arg_0]
xor edx, edx
mov [rbx+40h], rdx
movups xmm0, xmmword ptr [r12]
mov [r12+8], rdx
movups xmmword ptr [rbx+38h], xmm0
mov [r12], rdx
mov [rbx+50h], rdx
movups xmm0, xmmword ptr [r15]
mov [r15+8], rdx
movups xmmword ptr [rbx+48h], xmm0
mov [r15], rdx
mov [rbx+60h], rdx
movups xmm0, xmmword ptr [r14]
mov [r14+8], rdx
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rdx
mov [rbx+68h], cl
mov [rbx+78h], rdx
movups xmm0, xmmword ptr [rax]
mov [rax+8], rdx
movups xmmword ptr [rbx+70h], xmm0
mov [rax], rdx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r13
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9AD96
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9AD96:
mov rdi, r14
call __Unwind_Resume
| long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
long long v11; // rax
long long result; // rax
__int128 v13; // xmm0
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v11 = a2[1];
*(_QWORD *)(a1 + 16) = v11;
if ( v11 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v11 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v11 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector(a1 + 32, a3);
result = (long long)a8;
*(_QWORD *)(a1 + 64) = 0LL;
v13 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v13;
*(_QWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
| ForNode:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV RBX,RDI
LEA R13,[0x22afd8]
ADD R13,0x10
MOV qword ptr [RDI],R13
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019acfa
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x0019acf6
INC dword ptr [RAX + 0x8]
JMP 0x0019acfa
LAB_0019acf6:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019acfa:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22b090]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0019ad14:
MOV RSI,RDX
CALL 0x00155340
LAB_0019ad1c:
MOV RAX,qword ptr [RSP + 0x38]
MOV CL,byte ptr [RSP + 0x30]
XOR EDX,EDX
MOV qword ptr [RBX + 0x40],RDX
MOVUPS XMM0,xmmword ptr [R12]
MOV qword ptr [R12 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOV qword ptr [R12],RDX
MOV qword ptr [RBX + 0x50],RDX
MOVUPS XMM0,xmmword ptr [R15]
MOV qword ptr [R15 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV qword ptr [R15],RDX
MOV qword ptr [RBX + 0x60],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RDX
MOV byte ptr [RBX + 0x68],CL
MOV qword ptr [RBX + 0x78],RDX
MOVUPS XMM0,xmmword ptr [RAX]
MOV qword ptr [RAX + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOV qword ptr [RAX],RDX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022b0a0;
/* try { // try from 0019ad14 to 0019ad1b has its CatchHandler @ 0019ad82 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar2 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar2;
*(int8 *)param_7 = 0;
return;
}
|
|
1,492 | ft_parse_internal | eloqsql/storage/myisam/ft_parser.c | static int ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
const char *doc_arg, int doc_len)
{
uchar *doc= (uchar*) doc_arg;
uchar *end= doc + doc_len;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
TREE *wtree= ft_param->wtree;
FT_WORD w;
DBUG_ENTER("ft_parse_internal");
while (ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O3 | c | ft_parse_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
movq %rsi, (%r14)
movslq %edx, %r15
addq %rsi, %r15
movq 0x18(%rdi), %rax
movq (%rax), %r12
leaq -0x40(%rbp), %r13
movq 0x230(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x4c5e5
testb %al, %al
je 0x4c81f
movq -0x40(%rbp), %rsi
movl -0x30(%rbp), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x8(%rbx)
testl %eax, %eax
je 0x4c7e5
movl $0x1, %eax
jmp 0x4c821
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_parse_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rbp+var_48]
mov [r14], rsi
movsxd r15, edx
add r15, rsi
mov rax, [rdi+18h]
mov r12, [rax]
lea r13, [rbp+var_40]
loc_4C7E5:
mov rdi, [r12+230h]
mov rsi, r14
mov rdx, r15
mov rcx, r13
mov r8d, 1
call ft_simple_get_word
test al, al
jz short loc_4C81F
mov rsi, [rbp+var_40]
mov edx, [rbp+var_30]
mov rdi, rbx
xor ecx, ecx
call qword ptr [rbx+8]
test eax, eax
jz short loc_4C7E5
mov eax, 1
jmp short loc_4C821
loc_4C81F:
xor eax, eax
loc_4C821:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ft_parse_internal(long long a1, _BYTE *a2, int a3)
{
unsigned long long v3; // r15
long long v4; // r12
_BYTE *v6; // [rsp+8h] [rbp-48h] BYREF
long long v7; // [rsp+10h] [rbp-40h] BYREF
unsigned int v8; // [rsp+20h] [rbp-30h]
v6 = a2;
v3 = (unsigned long long)&a2[a3];
v4 = **(_QWORD **)(a1 + 24);
while ( ft_simple_get_word(*(_QWORD *)(v4 + 560), &v6, v3, &v7, 1) )
{
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(a1 + 8))(a1, v7, v8, 0LL) )
return 1LL;
}
return 0LL;
}
| ft_parse_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RBP + -0x48]
MOV qword ptr [R14],RSI
MOVSXD R15,EDX
ADD R15,RSI
MOV RAX,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RAX]
LEA R13,[RBP + -0x40]
LAB_0014c7e5:
MOV RDI,qword ptr [R12 + 0x230]
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
MOV R8D,0x1
CALL 0x0014c5e5
TEST AL,AL
JZ 0x0014c81f
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x30]
MOV RDI,RBX
XOR ECX,ECX
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x0014c7e5
MOV EAX,0x1
JMP 0x0014c821
LAB_0014c81f:
XOR EAX,EAX
LAB_0014c821:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ft_parse_internal(long param_1,long param_2,int param_3)
{
long lVar1;
char cVar2;
int iVar3;
long local_50;
int8 local_48 [2];
int4 local_38;
lVar1 = **(long **)(param_1 + 0x18);
local_50 = param_2;
do {
cVar2 = ft_simple_get_word(*(int8 *)(lVar1 + 0x230),&local_50,param_3 + param_2,local_48,1
);
if (cVar2 == '\0') {
return 0;
}
iVar3 = (**(code **)(param_1 + 8))(param_1,local_48[0],local_38,0);
} while (iVar3 == 0);
return 1;
}
|
|
1,493 | mysql_real_query | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, unsigned long length)
{
my_bool skip_result= OPT_EXT_VAL(mysql, multi_command);
if (length == (unsigned long)-1)
length= (unsigned long)strlen(query);
free_old_query(mysql);
if (ma_simple_command(mysql, COM_QUERY,query,length,1,0))
return(-1);
if (!skip_result && !mysql->options.extension->skip_read_response)
return(mysql->methods->db_read_query_result(mysql));
return(0);
} | O3 | c | mysql_real_query:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x480(%rdi), %rax
testq %rax, %rax
je 0x5d97a
cmpb $0x0, 0xa8(%rax)
setne %r13b
jmp 0x5d97d
xorl %r13d, %r13d
cmpq $-0x1, %r15
jne 0x5d98e
movq %r14, %rdi
callq 0x3a4c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x5e52a
movq 0x4d0(%rbx), %rax
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
movq %r15, %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq *0x10(%rax)
xorl %ecx, %ecx
testl %eax, %eax
setne %al
orb %al, %r13b
testb $0x1, %r13b
je 0x5d9d3
movb %al, %cl
negl %ecx
movl %ecx, %r12d
jmp 0x5d9e3
movq 0x480(%rbx), %rax
cmpb $0x0, 0x148(%rax)
je 0x5d9f5
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4d0(%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x20(%rax)
| mysql_real_query:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+480h]
test rax, rax
jz short loc_5D97A
cmp byte ptr [rax+0A8h], 0
setnz r13b
jmp short loc_5D97D
loc_5D97A:
xor r13d, r13d
loc_5D97D:
cmp r15, 0FFFFFFFFFFFFFFFFh
jnz short loc_5D98E
mov rdi, r14
call _strlen
mov r15, rax
loc_5D98E:
mov rdi, rbx
call free_old_query
mov rax, [rbx+4D0h]
xor r12d, r12d
mov rdi, rbx
mov esi, 3
mov rdx, r14
mov rcx, r15
mov r8d, 1
xor r9d, r9d
call qword ptr [rax+10h]
xor ecx, ecx
test eax, eax
setnz al
or r13b, al
test r13b, 1
jz short loc_5D9D3
mov cl, al
neg ecx
mov r12d, ecx
jmp short loc_5D9E3
loc_5D9D3:
mov rax, [rbx+480h]
cmp byte ptr [rax+148h], 0
jz short loc_5D9F5
loc_5D9E3:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5D9F5:
mov rax, [rbx+4D0h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp qword ptr [rax+20h]
| long long mysql_real_query(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // r15
long long v5; // rax
bool v6; // r13
unsigned int v7; // r12d
int v8; // eax
long long v9; // rdx
int v10; // ecx
bool v11; // al
long long v13; // [rsp-8h] [rbp-30h]
v13 = v3;
v4 = a3;
v5 = *(_QWORD *)(a1 + 1152);
if ( v5 )
v6 = *(_BYTE *)(v5 + 168) != 0;
else
v6 = 0;
if ( a3 == -1 )
v4 = strlen(a2);
free_old_query(a1);
v7 = 0;
v8 = (*(long long ( **)(long long, long long, long long, long long, long long, _QWORD, long long))(*(_QWORD *)(a1 + 1232)
+ 16LL))(
a1,
3LL,
a2,
v4,
1LL,
0LL,
v13);
v10 = 0;
v11 = v8 != 0;
if ( v11 || v6 )
{
LOBYTE(v10) = v11;
return (unsigned int)-v10;
}
if ( *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) )
return v7;
return (*(long long ( **)(long long, long long, long long, _QWORD))(*(_QWORD *)(a1 + 1232) + 32LL))(
a1,
3LL,
v9,
0LL);
}
| mysql_real_query:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x480]
TEST RAX,RAX
JZ 0x0015d97a
CMP byte ptr [RAX + 0xa8],0x0
SETNZ R13B
JMP 0x0015d97d
LAB_0015d97a:
XOR R13D,R13D
LAB_0015d97d:
CMP R15,-0x1
JNZ 0x0015d98e
MOV RDI,R14
CALL 0x0013a4c0
MOV R15,RAX
LAB_0015d98e:
MOV RDI,RBX
CALL 0x0015e52a
MOV RAX,qword ptr [RBX + 0x4d0]
XOR R12D,R12D
MOV RDI,RBX
MOV ESI,0x3
MOV RDX,R14
MOV RCX,R15
MOV R8D,0x1
XOR R9D,R9D
CALL qword ptr [RAX + 0x10]
XOR ECX,ECX
TEST EAX,EAX
SETNZ AL
OR R13B,AL
TEST R13B,0x1
JZ 0x0015d9d3
MOV CL,AL
NEG ECX
MOV R12D,ECX
JMP 0x0015d9e3
LAB_0015d9d3:
MOV RAX,qword ptr [RBX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JZ 0x0015d9f5
LAB_0015d9e3:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015d9f5:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP qword ptr [RAX + 0x20]
|
ulong mysql_real_query(long param_1,char *param_2,size_t param_3)
{
int iVar1;
ulong uVar2;
uint uVar3;
bool bVar4;
if (*(long *)(param_1 + 0x480) == 0) {
bVar4 = false;
}
else {
bVar4 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8) != '\0';
}
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
free_old_query(param_1);
uVar3 = 0;
iVar1 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x10))(param_1,3,param_2,param_3,1,0);
if (bVar4 || iVar1 != 0) {
uVar3 = -(uint)(iVar1 != 0);
}
else if (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0') {
/* WARNING: Could not recover jumptable at 0x0015da0d. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1);
return uVar2;
}
return (ulong)uVar3;
}
|
|
1,494 | ma_bitmap_delete_all | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_delete_all(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_delete_all");
if (bitmap->map) /* Not in create */
{
bzero(bitmap->map, bitmap->block_size);
bitmap->changed= 1;
bitmap->page= 0;
bitmap->used_size= bitmap->full_tail_size= bitmap->full_head_size= 0;
bitmap->total_size= bitmap->max_total_size;
}
DBUG_VOID_RETURN;
} | O0 | c | ma_bitmap_delete_all:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5f1a9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
movq -0x10(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rax
movl 0x12c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x128(%rax)
jmp 0x5f1ab
jmp 0x5f1ad
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_bitmap_delete_all:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0A10h
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_5F1A9
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_10]
mov byte ptr [rax+20h], 1
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_10]
mov ecx, [rax+12Ch]
mov rax, [rbp+var_10]
mov [rax+128h], ecx
loc_5F1A9:
jmp short $+2
loc_5F1AB:
jmp short $+2
loc_5F1AD:
add rsp, 10h
pop rbp
retn
| long long ma_bitmap_delete_all(long long a1)
{
long long result; // rax
result = a1 + 2576;
if ( *(_QWORD *)(a1 + 2584) )
{
memset(*(_QWORD *)(a1 + 2584), 0LL, *(unsigned int *)(a1 + 2884));
*(_BYTE *)(a1 + 2608) = 1;
*(_QWORD *)(a1 + 2592) = 0LL;
*(_DWORD *)(a1 + 2616) = 0;
*(_DWORD *)(a1 + 2620) = 0;
*(_DWORD *)(a1 + 2612) = 0;
result = a1 + 2576;
*(_DWORD *)(a1 + 2872) = *(_DWORD *)(a1 + 2876);
}
return result;
}
| _ma_bitmap_delete_all:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0015f1a9
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x20],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x12c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x128],ECX
LAB_0015f1a9:
JMP 0x0015f1ab
LAB_0015f1ab:
JMP 0x0015f1ad
LAB_0015f1ad:
ADD RSP,0x10
POP RBP
RET
|
void _ma_bitmap_delete_all(long param_1)
{
if (*(long *)(param_1 + 0xa18) != 0) {
memset(*(void **)(param_1 + 0xa18),0,(ulong)*(uint *)(param_1 + 0xb44));
*(int1 *)(param_1 + 0xa30) = 1;
*(int8 *)(param_1 + 0xa20) = 0;
*(int4 *)(param_1 + 0xa38) = 0;
*(int4 *)(param_1 + 0xa3c) = 0;
*(int4 *)(param_1 + 0xa34) = 0;
*(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c);
}
return;
}
|
|
1,495 | js_new_string16_len | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_string16_len(JSContext *ctx, const uint16_t *buf, int len)
{
JSString *str;
str = js_alloc_string(ctx, len, 1);
if (!str)
return JS_EXCEPTION;
memcpy(str->u.str16, buf, len * 2);
return JS_MKPTR(JS_TAG_STRING, str);
} | O1 | c | js_new_string16_len:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl %edx, %esi
movl $0x1, %edx
callq 0x20b73
testq %rax, %rax
je 0x3d778
movq %rax, %r15
movq %rax, %rdi
addq $0x18, %rdi
addl %ebx, %ebx
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe5b0
movq %r15, 0x8(%rsp)
movq $-0x7, %rdx
jmp 0x3d785
movl $0x0, 0x8(%rsp)
movl $0x6, %edx
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| js_new_string16_len:
push r15
push r14
push rbx
sub rsp, 10h
mov ebx, edx
mov r14, rsi
mov esi, edx
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_3D778
mov r15, rax
mov rdi, rax
add rdi, 18h
add ebx, ebx
mov rsi, r14
mov rdx, rbx
call _memcpy
mov [rsp+28h+var_20], r15
mov rdx, 0FFFFFFFFFFFFFFF9h
jmp short loc_3D785
loc_3D778:
mov dword ptr [rsp+28h+var_20], 0
mov edx, 6
loc_3D785:
mov rax, [rsp+28h+var_20]
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long js_new_string16_len(long long a1, long long a2, unsigned int a3)
{
long long v4; // rax
long long v5; // r15
long long v7; // [rsp+8h] [rbp-20h]
v4 = js_alloc_string(a1, a3, 1u);
if ( v4 )
{
v5 = v4;
memcpy(v4 + 24, a2, 2 * a3);
return v5;
}
else
{
LODWORD(v7) = 0;
}
return v7;
}
| |||
1,496 | js_new_string16_len | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_string16_len(JSContext *ctx, const uint16_t *buf, int len)
{
JSString *str;
str = js_alloc_string(ctx, len, 1);
if (!str)
return JS_EXCEPTION;
memcpy(str->u.str16, buf, len * 2);
return JS_MKPTR(JS_TAG_STRING, str);
} | O2 | c | js_new_string16_len:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
pushq $0x1
popq %rdx
movl %r14d, %esi
callq 0x1ad45
testq %rax, %rax
je 0x3602b
movq %rax, %rbx
movq %rax, %rdi
addq $0x18, %rdi
addl %r14d, %r14d
movq %r15, %rsi
movq %r14, %rdx
callq 0xe5c0
pushq $-0x7
popq %rdx
jmp 0x36030
pushq $0x6
popq %rdx
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| js_new_string16_len:
push r15
push r14
push rbx
mov r14d, edx
mov r15, rsi
push 1
pop rdx
mov esi, r14d
call js_alloc_string
test rax, rax
jz short loc_3602B
mov rbx, rax
mov rdi, rax
add rdi, 18h
add r14d, r14d
mov rsi, r15
mov rdx, r14
call _memcpy
push 0FFFFFFFFFFFFFFF9h
pop rdx
jmp short loc_36030
loc_3602B:
push 6
pop rdx
xor ebx, ebx
loc_36030:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
| long long js_new_string16_len(long long a1, long long a2, unsigned int a3)
{
long long v4; // rax
long long v5; // rbx
v4 = js_alloc_string(a1, a3, 1LL);
if ( !v4 )
return 0LL;
v5 = v4;
memcpy(v4 + 24, a2, 2 * a3);
return v5;
}
| js_new_string16_len:
PUSH R15
PUSH R14
PUSH RBX
MOV R14D,EDX
MOV R15,RSI
PUSH 0x1
POP RDX
MOV ESI,R14D
CALL 0x0011ad45
TEST RAX,RAX
JZ 0x0013602b
MOV RBX,RAX
MOV RDI,RAX
ADD RDI,0x18
ADD R14D,R14D
MOV RSI,R15
MOV RDX,R14
CALL 0x0010e5c0
PUSH -0x7
POP RDX
JMP 0x00136030
LAB_0013602b:
PUSH 0x6
POP RDX
XOR EBX,EBX
LAB_00136030:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
int1 [16] js_new_string16_len(int8 param_1,void *param_2,int param_3)
{
long lVar1;
int8 uVar2;
int1 auVar3 [16];
lVar1 = js_alloc_string(param_1,param_3,1);
if (lVar1 == 0) {
uVar2 = 6;
lVar1 = 0;
}
else {
memcpy((void *)(lVar1 + 0x18),param_2,(ulong)(uint)(param_3 * 2));
uVar2 = 0xfffffffffffffff9;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = lVar1;
return auVar3;
}
|
|
1,497 | mysql_local_infile_init | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
int mysql_local_infile_init(void **ptr, const char *filename, void *userdata)
{
MYSQL_INFILE_INFO *info;
MYSQL *mysql= (MYSQL *)userdata;
info = (MYSQL_INFILE_INFO *)malloc(sizeof(MYSQL_INFILE_INFO));
if (!info) {
return(1);
}
memset(info, 0, sizeof(MYSQL_INFILE_INFO));
*ptr = info;
info->filename = filename;
info->fp= ma_open(filename, "rb", mysql);
if (!info->fp)
{
/* error handling is done via mysql_local_infile_error function, so we
need to copy error to info */
if (mysql_errno(mysql) && !info->error_no)
{
info->error_no= mysql_errno(mysql);
ma_strmake(info->error_msg, mysql_error(mysql), MYSQL_ERRMSG_SIZE);
}
else
{
info->error_no = errno;
snprintf((char *)info->error_msg, sizeof(info->error_msg),
CER(CR_FILE_NOT_FOUND), filename, info->error_no);
}
return(1);
}
return(0);
} | O0 | c | mysql_local_infile_init:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x218, %edi # imm = 0x218
callq 0x135c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x31b1d
movl $0x1, -0x4(%rbp)
jmp 0x31c0e
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x218, %edx # imm = 0x218
callq 0x13260
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x210(%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x1f114(%rip), %rsi # 0x50c6a
callq 0x3aa60
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x31c07
movq -0x30(%rbp), %rdi
callq 0x26240
cmpl $0x0, %eax
je 0x31bc5
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x31bc5
movq -0x30(%rbp), %rdi
callq 0x26240
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x26270
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl $0x200, %edx # imm = 0x200
callq 0x364d0
jmp 0x31bfe
callq 0x13050
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rdi
addq $0xc, %rdi
leaq 0x337ae(%rip), %rax # 0x65390
movq 0x20(%rax), %rdx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %r8d
movl $0x201, %esi # imm = 0x201
movb $0x0, %al
callq 0x136e0
movl $0x1, -0x4(%rbp)
jmp 0x31c0e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_local_infile_init:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
mov edi, 218h
call _malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_31B1D
mov [rbp+var_4], 1
jmp loc_31C0E
loc_31B1D:
mov rdi, [rbp+var_28]
xor esi, esi
mov edx, 218h
call _memset
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+210h], rcx
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_30]
lea rsi, aRb; "rb"
call ma_open
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jnz loc_31C07
mov rdi, [rbp+var_30]
call mysql_errno
cmp eax, 0
jz short loc_31BC5
mov rax, [rbp+var_28]
cmp dword ptr [rax+8], 0
jnz short loc_31BC5
mov rdi, [rbp+var_30]
call mysql_errno
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rax, [rbp+var_28]
add rax, 0Ch
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
call mysql_error
mov rdi, [rbp+var_38]
mov rsi, rax
mov edx, 200h
call ma_strmake
jmp short loc_31BFE
loc_31BC5:
call ___errno_location
mov ecx, [rax]
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rdi, [rbp+var_28]
add rdi, 0Ch
lea rax, mariadb_client_errors
mov rdx, [rax+20h]
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov r8d, [rax+8]
mov esi, 201h
mov al, 0
call _snprintf
loc_31BFE:
mov [rbp+var_4], 1
jmp short loc_31C0E
loc_31C07:
mov [rbp+var_4], 0
loc_31C0E:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long mysql_local_infile_init(long long *a1, long long a2, long long a3)
{
char *v3; // rax
long long v6; // [rsp+18h] [rbp-28h]
v6 = malloc(536LL);
if ( v6 )
{
memset(v6, 0LL, 536LL);
*a1 = v6;
*(_QWORD *)(v6 + 528) = a2;
*(_QWORD *)v6 = ma_open(a2, "rb", a3);
if ( *(_QWORD *)v6 )
{
return 0;
}
else
{
if ( !(unsigned int)mysql_errno(a3) || *(_DWORD *)(v6 + 8) )
{
*(_DWORD *)(v6 + 8) = *(_DWORD *)__errno_location();
snprintf(v6 + 12, 513LL, mariadb_client_errors[4], a2, *(unsigned int *)(v6 + 8));
}
else
{
*(_DWORD *)(v6 + 8) = mysql_errno(a3);
v3 = mysql_error(a3);
ma_strmake(v6 + 12, v3, 512LL);
}
return 1;
}
}
else
{
return 1;
}
}
| mysql_local_infile_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV EDI,0x218
CALL 0x001135c0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00131b1d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00131c0e
LAB_00131b1d:
MOV RDI,qword ptr [RBP + -0x28]
XOR ESI,ESI
MOV EDX,0x218
CALL 0x00113260
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x210],RCX
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[0x150c6a]
CALL 0x0013aa60
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JNZ 0x00131c07
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00126240
CMP EAX,0x0
JZ 0x00131bc5
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x00131bc5
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00126240
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0xc
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00126270
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RAX
MOV EDX,0x200
CALL 0x001364d0
JMP 0x00131bfe
LAB_00131bc5:
CALL 0x00113050
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0xc
LEA RAX,[0x165390]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RAX + 0x8]
MOV ESI,0x201
MOV AL,0x0
CALL 0x001136e0
LAB_00131bfe:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00131c0e
LAB_00131c07:
MOV dword ptr [RBP + -0x4],0x0
LAB_00131c0e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 mysql_local_infile_init(int8 *param_1,long param_2,int8 param_3)
{
int iVar1;
int4 uVar2;
long *__s;
long lVar3;
int8 uVar4;
int *piVar5;
int4 local_c;
__s = (long *)malloc(0x218);
if (__s == (long *)0x0) {
local_c = 1;
}
else {
memset(__s,0,0x218);
*param_1 = __s;
__s[0x42] = param_2;
lVar3 = ma_open(param_2,&DAT_00150c6a,param_3);
*__s = lVar3;
if (*__s == 0) {
iVar1 = mysql_errno(param_3);
if ((iVar1 == 0) || ((int)__s[1] != 0)) {
piVar5 = __errno_location();
*(int *)(__s + 1) = *piVar5;
snprintf((char *)((long)__s + 0xc),0x201,(char *)mariadb_client_errors._32_8_,param_2,
(ulong)*(uint *)(__s + 1));
}
else {
uVar2 = mysql_errno(param_3);
*(int4 *)(__s + 1) = uVar2;
uVar4 = mysql_error(param_3);
ma_strmake((long)__s + 0xc,uVar4,0x200);
}
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
|
|
1,498 | LefDefParser::lefiLayer::propNumber(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | double
lefiLayer::propNumber(int i) const
{
char msg[160];
if (i < 0 || i >= numProps_) {
sprintf(msg, "ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d", i, numProps_);
lefiError(0, 1300, msg);
return 0;
}
return dvalues_[i];
} | O0 | cpp | LefDefParser::lefiLayer::propNumber(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x24f51
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x350(%rcx), %eax
jl 0x24f95
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x350(%rax), %ecx
leaq 0x52f58(%rip), %rsi # 0x77ec7
movb $0x0, %al
callq 0x2050
leaq 0x10(%rsp), %rdx
xorl %edi, %edi
movl $0x514, %esi # imm = 0x514
callq 0x3f4e0
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rsp)
jmp 0x24fb7
movq 0x8(%rsp), %rax
movq 0x368(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xc0(%rsp), %xmm0
addq $0xc8, %rsp
retq
nopl (%rax,%rax)
| _ZNK12LefDefParser9lefiLayer10propNumberEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_24F51
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+350h]
jl short loc_24F95
loc_24F51:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+350h]
lea rsi, aErrorLefpars13_17; "ERROR (LEFPARS-1300): The index number "...
mov al, 0
call _sprintf
lea rdx, [rsp+0C8h+var_B8]; int
xor edi, edi; this
mov esi, 514h; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
xorps xmm0, xmm0
movsd [rsp+0C8h+var_8], xmm0
jmp short loc_24FB7
loc_24F95:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+368h]
movsxd rcx, [rsp+0C8h+var_14]
movsd xmm0, qword ptr [rax+rcx*8]
movsd [rsp+0C8h+var_8], xmm0
loc_24FB7:
movsd xmm0, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
| double LefDefParser::lefiLayer::propNumber(LefDefParser::lefiLayer *this, int a2)
{
const char *v2; // rcx
int v4[41]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::lefiLayer *v6; // [rsp+B8h] [rbp-10h]
v6 = this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 212) )
return *(double *)(*((_QWORD *)this + 109) + 8LL * v5);
sprintf(
v4,
"ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d",
v5,
*((_DWORD *)this + 212));
LefDefParser::lefiError(0LL, 1300, (int)v4, v2);
return 0.0;
}
| propNumber:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x00124f51
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x350]
JL 0x00124f95
LAB_00124f51:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x350]
LEA RSI,[0x177ec7]
MOV AL,0x0
CALL 0x00102050
LEA RDX,[RSP + 0x10]
XOR EDI,EDI
MOV ESI,0x514
CALL 0x0013f4e0
XORPS XMM0,XMM0
MOVSD qword ptr [RSP + 0xc0],XMM0
JMP 0x00124fb7
LAB_00124f95:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x368]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOVSD qword ptr [RSP + 0xc0],XMM0
LAB_00124fb7:
MOVSD XMM0,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
/* LefDefParser::lefiLayer::propNumber(int) const */
int8 __thiscall LefDefParser::lefiLayer::propNumber(lefiLayer *this,int param_1)
{
char local_b8 [164];
int local_14;
lefiLayer *local_10;
int8 local_8;
if ((param_1 < 0) || (*(int *)(this + 0x350) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d"
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x350));
lefiError(0,0x514,local_b8);
local_8 = 0;
}
else {
local_8 = *(int8 *)(*(long *)(this + 0x368) + (long)param_1 * 8);
}
return local_8;
}
|
|
1,499 | translog_soft_sync_start | eloqsql/storage/maria/ma_loghandler.c | int translog_soft_sync_start(void)
{
int res= 0;
uint32 min, max;
DBUG_ENTER("translog_soft_sync_start");
/* check and init variables */
min= soft_sync_min;
max= soft_sync_max;
if (!max)
soft_sync_max= max= get_current_logfile()->number;
if (!min)
soft_sync_min= max;
soft_need_sync= 1;
if (!(res= ma_service_thread_control_init(&soft_sync_control)))
if ((res= mysql_thread_create(key_thread_soft_sync,
&soft_sync_control.thread, NULL,
ma_soft_sync_background, NULL)))
soft_sync_control.killed= TRUE;
DBUG_RETURN(res);
} | O0 | c | translog_soft_sync_start:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl 0xc43af7(%rip), %eax # 0xc79b9c
movl %eax, -0x8(%rbp)
movl 0xc43af2(%rip), %eax # 0xc79ba0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x360c7
callq 0x3ae20
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl %eax, 0xc43ad9(%rip) # 0xc79ba0
cmpl $0x0, -0x8(%rbp)
jne 0x360d6
movl -0xc(%rbp), %eax
movl %eax, 0xc43ac6(%rip) # 0xc79b9c
movl $0x1, 0x287e54(%rip) # 0x2bdf34
leaq 0x287e51(%rip), %rdi # 0x2bdf38
callq 0x41b20
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jne 0x36129
leaq 0x4418b5(%rip), %rax # 0x4779b0
movl (%rax), %edi
leaq 0x287e34(%rip), %rsi # 0x2bdf38
xorl %eax, %eax
movl %eax, %r8d
leaq 0x80(%rip), %rcx # 0x36190
movq %r8, %rdx
callq 0x36140
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
je 0x36127
movb $0x1, 0x287e19(%rip) # 0x2bdf40
jmp 0x36129
jmp 0x3612b
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_soft_sync_start:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], 0
mov eax, cs:soft_sync_min
mov [rbp+var_8], eax
mov eax, cs:soft_sync_max
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_360C7
call get_current_logfile
mov eax, [rax]
mov [rbp+var_C], eax
mov cs:soft_sync_max, eax
loc_360C7:
cmp [rbp+var_8], 0
jnz short loc_360D6
mov eax, [rbp+var_C]
mov cs:soft_sync_min, eax
loc_360D6:
mov cs:soft_need_sync, 1
lea rdi, soft_sync_control
call ma_service_thread_control_init
mov [rbp+var_4], eax
cmp eax, 0
jnz short loc_36129
lea rax, key_thread_soft_sync
mov edi, [rax]
lea rsi, soft_sync_control
xor eax, eax
mov r8d, eax
lea rcx, ma_soft_sync_background
mov rdx, r8
call inline_mysql_thread_create
mov [rbp+var_4], eax
cmp eax, 0
jz short loc_36127
mov cs:byte_2BDF40, 1
loc_36127:
jmp short $+2
loc_36129:
jmp short $+2
loc_3612B:
mov eax, [rbp+var_4]
mov [rbp+var_10], eax
mov eax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| long long translog_soft_sync_start()
{
int v1; // [rsp+4h] [rbp-Ch]
int v2; // [rsp+8h] [rbp-8h]
unsigned int v3; // [rsp+Ch] [rbp-4h]
v2 = soft_sync_min;
v1 = soft_sync_max;
if ( !soft_sync_max )
{
v1 = *(_DWORD *)get_current_logfile();
soft_sync_max = v1;
}
if ( !v2 )
soft_sync_min = v1;
soft_need_sync = 1;
v3 = ma_service_thread_control_init(&soft_sync_control);
if ( !v3 )
{
v3 = inline_mysql_thread_create(key_thread_soft_sync, &soft_sync_control, 0LL, ma_soft_sync_background);
if ( v3 )
byte_2BDF40 = 1;
}
return v3;
}
| translog_soft_sync_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],0x0
MOV EAX,dword ptr [0x00d79b9c]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [0x00d79ba0]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001360c7
CALL 0x0013ae20
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [0x00d79ba0],EAX
LAB_001360c7:
CMP dword ptr [RBP + -0x8],0x0
JNZ 0x001360d6
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [0x00d79b9c],EAX
LAB_001360d6:
MOV dword ptr [0x003bdf34],0x1
LEA RDI,[0x3bdf38]
CALL 0x00141b20
MOV dword ptr [RBP + -0x4],EAX
CMP EAX,0x0
JNZ 0x00136129
LEA RAX,[0x5779b0]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x3bdf38]
XOR EAX,EAX
MOV R8D,EAX
LEA RCX,[0x136190]
MOV RDX,R8
CALL 0x00136140
MOV dword ptr [RBP + -0x4],EAX
CMP EAX,0x0
JZ 0x00136127
MOV byte ptr [0x003bdf40],0x1
LAB_00136127:
JMP 0x00136129
LAB_00136129:
JMP 0x0013612b
LAB_0013612b:
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int translog_soft_sync_start(void)
{
int iVar1;
int *piVar2;
int local_14;
int local_c;
iVar1 = soft_sync_min;
local_14 = soft_sync_max;
if (soft_sync_max == 0) {
piVar2 = (int *)get_current_logfile();
local_14 = *piVar2;
}
if (iVar1 == 0) {
soft_sync_min = local_14;
}
soft_need_sync = 1;
soft_sync_max = local_14;
local_c = ma_service_thread_control_init(soft_sync_control);
if ((local_c == 0) &&
(local_c = inline_mysql_thread_create
(key_thread_soft_sync,soft_sync_control,0,ma_soft_sync_background),
local_c != 0)) {
soft_sync_control[8] = 1;
}
return local_c;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.