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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,300 | ma_bitmap_reset_full_page_bits | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page,
uint page_count)
{
ulonglong bitmap_page;
uint offset, bit_start, bit_count, tmp, byte_offset;
uchar *data;
DBUG_ENTER("_ma_bitmap_reset_full_page_bits");
DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count));
mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock);
bitmap_page= page - page % bitmap->pages_covered;
DBUG_ASSERT(page != bitmap_page);
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset= (uint) (page - bitmap->page - 1);
/* Clear bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
byte_offset= bit_start/8;
data= bitmap->map + byte_offset;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only clear bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data&= ~tmp;
set_if_smaller(bitmap->full_head_size, byte_offset);
set_if_smaller(bitmap->full_tail_size, byte_offset);
if ((int) (bit_count-= (8 - offset)) > 0)
{
uint fill;
data++;
/*
-1 is here to avoid one 'if' statement and to let the following code
handle the last byte
*/
if ((fill= (bit_count - 1) / 8))
{
bzero(data, fill);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to clear */
tmp= (1 << bit_count) - 1;
*data&= ~tmp;
}
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
} | O3 | c | ma_bitmap_reset_full_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r8
xorl %r14d, %r14d
movq %rdx, %rax
xorl %edx, %edx
divq 0x138(%rsi)
movq %r12, %r15
subq %rdx, %r15
movq %r15, %rax
cmpq 0x10(%rsi), %r15
je 0x5402b
movq %r8, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r8, -0x30(%rbp)
callq 0x53b91
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x540e9
movq 0x10(%rbx), %rax
movq -0x30(%rbp), %r8
notl %eax
addl %eax, %r12d
leal (%r12,%r12,2), %r12d
leal (%r13,%r13,2), %edx
movl %r12d, %eax
shrl $0x3, %eax
movq 0x8(%rbx), %r13
movl %r12d, %ecx
andl $0x7, %ecx
movl $0xff, %esi
movl $0xff, %edi
shll %cl, %edi
addl %edx, %ecx
shll %cl, %esi
cmpl $0x8, %ecx
cmovbl %esi, %r14d
xorl %edi, %r14d
notb %r14b
andb %r14b, (%r13,%rax)
cmpl %eax, 0x28(%rbx)
jbe 0x54073
movl %eax, 0x28(%rbx)
cmpl %eax, 0x2c(%rbx)
jbe 0x5407b
movl %eax, 0x2c(%rbx)
orl $-0x8, %r12d
addl %edx, %r12d
testl %r12d, %r12d
jle 0x540d0
addq %rax, %r13
incq %r13
leal -0x1(%r12), %r14d
cmpl $0x9, %r12d
jb 0x540b8
movl %r14d, %edx
shrl $0x3, %edx
movq %rdx, -0x38(%rbp)
movq %r13, %rdi
xorl %esi, %esi
movq %r8, -0x30(%rbp)
callq 0x292a0
movq -0x30(%rbp), %r8
addq -0x38(%rbp), %r13
andl $0xf8, %r14d
subl %r14d, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
andb %al, (%r13)
movq (%r8), %rax
cmpq %r15, 0xd0(%rax)
jbe 0x540e3
movq %r15, 0xd0(%rax)
movb $0x1, 0x20(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_bitmap_reset_full_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, ecx
mov r12, rdx
mov rbx, rsi
mov r8, rdi
xor r14d, r14d
mov rax, rdx
xor edx, edx
div qword ptr [rsi+138h]
mov r15, r12
sub r15, rdx
mov rax, r15
cmp r15, [rsi+10h]
jz short loc_5402B
mov rdi, r8
mov rsi, rbx
mov rdx, r15
mov [rbp+var_30], r8
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_540E9
mov rax, [rbx+10h]
mov r8, [rbp+var_30]
loc_5402B:
not eax
add r12d, eax
lea r12d, [r12+r12*2]
lea edx, [r13+r13*2+0]
mov eax, r12d
shr eax, 3
mov r13, [rbx+8]
mov ecx, r12d
and ecx, 7
mov esi, 0FFh
mov edi, 0FFh
shl edi, cl
add ecx, edx
shl esi, cl
cmp ecx, 8
cmovb r14d, esi
xor r14d, edi
not r14b
and [r13+rax+0], r14b
cmp [rbx+28h], eax
jbe short loc_54073
mov [rbx+28h], eax
loc_54073:
cmp [rbx+2Ch], eax
jbe short loc_5407B
mov [rbx+2Ch], eax
loc_5407B:
or r12d, 0FFFFFFF8h
add r12d, edx
test r12d, r12d
jle short loc_540D0
add r13, rax
inc r13
lea r14d, [r12-1]
cmp r12d, 9
jb short loc_540B8
mov edx, r14d
shr edx, 3
mov [rbp+var_38], rdx
mov rdi, r13
xor esi, esi
mov [rbp+var_30], r8
call _memset
mov r8, [rbp+var_30]
add r13, [rbp+var_38]
loc_540B8:
and r14d, 0F8h
sub r12d, r14d
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
and [r13+0], al
loc_540D0:
mov rax, [r8]
cmp [rax+0D0h], r15
jbe short loc_540E3
mov [rax+0D0h], r15
loc_540E3:
mov byte ptr [rbx+20h], 1
xor eax, eax
loc_540E9:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, int a4)
{
int v5; // r12d
long long *v6; // r8
char v7; // r14
unsigned long long v8; // r15
long long v9; // rax
char v10; // cl
char result; // al
unsigned int v12; // r12d
int v13; // edx
long long v14; // rax
long long v15; // r13
int v16; // ecx
int v17; // edi
unsigned int v18; // ecx
int v19; // r12d
_BYTE *v20; // r13
unsigned int v21; // r14d
long long *v22; // [rsp+10h] [rbp-30h]
v5 = a3;
v6 = a1;
v7 = 0;
v8 = a3 - a3 % *(_QWORD *)(a2 + 312);
LODWORD(v9) = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v8 != *(_QWORD *)(a2 + 16) )
{
v10 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312));
result = 1;
if ( v10 )
return result;
v9 = *(_QWORD *)(a2 + 16);
v6 = a1;
}
v12 = 3 * (~(_DWORD)v9 + v5);
v13 = 3 * a4;
v14 = v12 >> 3;
v15 = *(_QWORD *)(a2 + 8);
v16 = v12 & 7;
v17 = 255 << v16;
v18 = v13 + v16;
if ( v18 < 8 )
v7 = 255 << v18;
*(_BYTE *)(v15 + v14) &= ~(v17 ^ v7);
if ( *(_DWORD *)(a2 + 40) > (unsigned int)v14 )
*(_DWORD *)(a2 + 40) = v14;
if ( *(_DWORD *)(a2 + 44) > (unsigned int)v14 )
*(_DWORD *)(a2 + 44) = v14;
v19 = v13 + (v12 | 0xFFFFFFF8);
if ( v19 > 0 )
{
v20 = (_BYTE *)(v14 + v15 + 1);
v21 = v19 - 1;
if ( (unsigned int)v19 >= 9 )
{
v22 = v6;
memset(v20, 0LL, v21 >> 3);
v6 = v22;
v20 += v21 >> 3;
}
*v20 &= -1 << (v19 - (v21 & 0xF8));
}
if ( *(_QWORD *)(*v6 + 208) > v8 )
*(_QWORD *)(*v6 + 208) = v8;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
| _ma_bitmap_reset_full_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13D,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R8,RDI
XOR R14D,R14D
MOV RAX,RDX
XOR EDX,EDX
DIV qword ptr [RSI + 0x138]
MOV R15,R12
SUB R15,RDX
MOV RAX,R15
CMP R15,qword ptr [RSI + 0x10]
JZ 0x0015402b
MOV RDI,R8
MOV RSI,RBX
MOV RDX,R15
MOV qword ptr [RBP + -0x30],R8
CALL 0x00153b91
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001540e9
MOV RAX,qword ptr [RBX + 0x10]
MOV R8,qword ptr [RBP + -0x30]
LAB_0015402b:
NOT EAX
ADD R12D,EAX
LEA R12D,[R12 + R12*0x2]
LEA EDX,[R13 + R13*0x2]
MOV EAX,R12D
SHR EAX,0x3
MOV R13,qword ptr [RBX + 0x8]
MOV ECX,R12D
AND ECX,0x7
MOV ESI,0xff
MOV EDI,0xff
SHL EDI,CL
ADD ECX,EDX
SHL ESI,CL
CMP ECX,0x8
CMOVC R14D,ESI
XOR R14D,EDI
NOT R14B
AND byte ptr [R13 + RAX*0x1],R14B
CMP dword ptr [RBX + 0x28],EAX
JBE 0x00154073
MOV dword ptr [RBX + 0x28],EAX
LAB_00154073:
CMP dword ptr [RBX + 0x2c],EAX
JBE 0x0015407b
MOV dword ptr [RBX + 0x2c],EAX
LAB_0015407b:
OR R12D,0xfffffff8
ADD R12D,EDX
TEST R12D,R12D
JLE 0x001540d0
ADD R13,RAX
INC R13
LEA R14D,[R12 + -0x1]
CMP R12D,0x9
JC 0x001540b8
MOV EDX,R14D
SHR EDX,0x3
MOV qword ptr [RBP + -0x38],RDX
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],R8
CALL 0x001292a0
MOV R8,qword ptr [RBP + -0x30]
ADD R13,qword ptr [RBP + -0x38]
LAB_001540b8:
AND R14D,0xf8
SUB R12D,R14D
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
AND byte ptr [R13],AL
LAB_001540d0:
MOV RAX,qword ptr [R8]
CMP qword ptr [RAX + 0xd0],R15
JBE 0x001540e3
MOV qword ptr [RAX + 0xd0],R15
LAB_001540e3:
MOV byte ptr [RBX + 0x20],0x1
XOR EAX,EAX
LAB_001540e9:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4)
{
long lVar1;
ulong __n;
uint uVar2;
char cVar3;
uint uVar4;
uint uVar5;
byte *pbVar6;
byte bVar7;
ulong uVar8;
uVar8 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
uVar5 = (uint)uVar8;
if (uVar8 != *(ulong *)(param_2 + 0x10)) {
cVar3 = _ma_change_bitmap_page(param_1,param_2,uVar8);
if (cVar3 != '\0') {
return 1;
}
uVar5 = (uint)*(int8 *)(param_2 + 0x10);
}
uVar5 = ((int)param_3 + ~uVar5) * 3;
uVar2 = uVar5 >> 3;
lVar1 = *(long *)(param_2 + 8);
uVar4 = (uVar5 & 7) + param_4 * 3;
bVar7 = 0;
if (uVar4 < 8) {
bVar7 = (byte)(0xff << ((byte)uVar4 & 0x1f));
}
pbVar6 = (byte *)(lVar1 + (ulong)uVar2);
*pbVar6 = *pbVar6 & ~(bVar7 ^ (byte)(0xff << (sbyte)(uVar5 & 7)));
if (uVar2 < *(uint *)(param_2 + 0x28)) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (uVar2 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
uVar5 = (uVar5 | 0xfffffff8) + param_4 * 3;
if (0 < (int)uVar5) {
pbVar6 = (byte *)(lVar1 + (ulong)uVar2 + 1);
if (8 < uVar5) {
__n = (ulong)(uVar5 - 1 >> 3);
memset(pbVar6,0,__n);
pbVar6 = pbVar6 + __n;
}
*pbVar6 = *pbVar6 & (byte)(-1 << ((char)uVar5 - ((byte)(uVar5 - 1) & 0xf8) & 0x1f));
}
if (uVar8 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar8;
}
*(int1 *)(param_2 + 0x20) = 1;
return 0;
}
| |
34,301 | foreach_function(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&, std::function<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&)> const&) | monkey531[P]llama/common/chat.cpp | static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) {
for (const auto & tool : tools) {
if (!tool.contains("type") || tool["type"] != "function" || !tool.contains("function")) {
LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str());
continue;
}
fn(tool);
}
} | O1 | cpp | foreach_function(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&, std::function<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&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x4e5de
movq %r14, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movzbl (%r14), %eax
cmpl $0x2, %eax
je 0x89e33
cmpl $0x1, %eax
jne 0x89e3e
movq $0x0, 0x8(%rsp)
jmp 0x89e43
movq $0x0, 0x10(%rsp)
jmp 0x89e43
movq %rbx, 0x18(%rsp)
cmpl $0x2, %eax
je 0x89e5c
cmpl $0x1, %eax
jne 0x89e6b
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x89e74
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x89e74
movq $0x1, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x4e6a2
testb %al, %al
jne 0x89f9f
leaq 0x48(%rsp), %r14
leaq 0x20a49(%rip), %r15 # 0xaa8de
leaq 0x55154(%rip), %r12 # 0xdeff0
movq %rsp, %r13
movq %r14, %rdi
callq 0x4e2e2
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x68512
testb %al, %al
je 0x89f02
movq %rbp, %rdi
movq %r15, %rsi
callq 0x697d2
movq %rax, %rdi
leaq 0x20a24(%rip), %rsi # 0xaa8f2
callq 0x6922d
testb %al, %al
jne 0x89f02
movq %rbp, %rdi
leaq 0x20a11(%rip), %rsi # 0xaa8f2
callq 0x96d5c
testb %al, %al
je 0x89f02
movq 0x20(%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x89fae
movq %rbp, %rsi
callq *0x18(%rdi)
jmp 0x89f65
cmpl $0x0, (%r12)
js 0x89f65
callq 0x7fd7b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
movl $0x2, %edx
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2bc96
movq 0x28(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
leaq 0x28a14(%rip), %rdx # 0xb2956
xorl %eax, %eax
callq 0x7fe16
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x89f65
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x48(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x89f7f
cmpl $0x1, %eax
jne 0x89f87
addq $0x30, 0x50(%rsp)
jmp 0x89f8c
addq $0x10, 0x58(%rsp)
jmp 0x89f8c
incq 0x60(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x4e6a2
testb %al, %al
je 0x89e9f
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18250
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x89fd2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18ba0
| _ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_78], rsi
mov r14, rdi
mov rbx, 8000000000000000h
lea rdi, [rsp+98h+var_50]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void)
mov [rsp+98h+var_98], r14
xorps xmm0, xmm0
movups [rsp+98h+var_90], xmm0
mov [rsp+98h+var_80], rbx
movzx eax, byte ptr [r14]
cmp eax, 2
jz short loc_89E33
cmp eax, 1
jnz short loc_89E3E
mov qword ptr [rsp+98h+var_90], 0
jmp short loc_89E43
loc_89E33:
mov qword ptr [rsp+98h+var_90+8], 0
jmp short loc_89E43
loc_89E3E:
mov [rsp+98h+var_80], rbx
loc_89E43:
cmp eax, 2
jz short loc_89E5C
cmp eax, 1
jnz short loc_89E6B
mov rax, [r14+8]
mov rax, [rax+8]
mov qword ptr [rsp+98h+var_90], rax
jmp short loc_89E74
loc_89E5C:
mov rax, [r14+8]
mov rax, [rax+8]
mov qword ptr [rsp+98h+var_90+8], rax
jmp short loc_89E74
loc_89E6B:
mov [rsp+98h+var_80], 1
loc_89E74:
lea rdi, [rsp+98h+var_50]
mov rsi, rsp
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_89F9F
lea r14, [rsp+98h+var_50]
lea r15, aType; "type"
lea r12, common_log_verbosity_thold
mov r13, rsp
loc_89E9F:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rbp, rax
mov rdi, rax
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_89F02
mov rdi, rbp
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, rax
lea rsi, aFunction; "function"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
test al, al
jnz short loc_89F02
mov rdi, rbp
lea rsi, aFunction; "function"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_89F02
mov rdi, [rsp+98h+var_78]
cmp qword ptr [rdi+10h], 0
jz loc_89FAE
mov rsi, rbp
call qword ptr [rdi+18h]
jmp short loc_89F65
loc_89F02:
cmp dword ptr [r12], 0
js short loc_89F65
call _Z15common_log_mainv; common_log_main(void)
mov rbx, rax
lea rdi, [rsp+98h+var_70]
mov rsi, rbp
mov edx, 2
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rcx, [rsp+98h+var_70]
mov rdi, rbx
mov esi, 2
lea rdx, aSkippingToolWi; "Skipping tool without function: %s"
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
mov rdi, [rsp+98h+var_70]; void *
lea rax, [rsp+98h+var_60]
cmp rdi, rax
jz short loc_89F65
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89F65:
mov rax, [rsp+98h+var_50]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_89F7F
cmp eax, 1
jnz short loc_89F87
add [rsp+98h+var_48], 30h ; '0'
jmp short loc_89F8C
loc_89F7F:
add [rsp+98h+var_40], 10h
jmp short loc_89F8C
loc_89F87:
inc [rsp+98h+var_38]
loc_89F8C:
mov rdi, r14
mov rsi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_89E9F
loc_89F9F:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_89FAE:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
mov rdi, [rsp+98h+var_70]; void *
lea rax, [rsp+98h+var_60]
cmp rdi, rax
jz short loc_89FD2
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89FD2:
mov rdi, rbx
call __Unwind_Resume
| long long foreach_function(
unsigned __int8 *a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
int v10; // eax
long long result; // rax
long long v12; // rbp
long long v13; // rax
void *v14; // rbx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
int v19; // eax
unsigned __int8 *v20; // [rsp+0h] [rbp-98h] BYREF
__int128 v21; // [rsp+8h] [rbp-90h]
long long v22; // [rsp+18h] [rbp-80h]
long long v23; // [rsp+20h] [rbp-78h]
void *v24; // [rsp+28h] [rbp-70h] BYREF
long long v25; // [rsp+38h] [rbp-60h] BYREF
unsigned __int8 *v26; // [rsp+48h] [rbp-50h] BYREF
long long v27; // [rsp+50h] [rbp-48h]
long long v28; // [rsp+58h] [rbp-40h]
long long v29; // [rsp+60h] [rbp-38h]
v23 = a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin(
(long long)&v26,
a1);
v20 = a1;
v21 = 0LL;
v22 = 0x8000000000000000LL;
v10 = *a1;
if ( v10 == 2 )
{
*((_QWORD *)&v21 + 1) = 0LL;
}
else if ( v10 == 1 )
{
*(_QWORD *)&v21 = 0LL;
}
else
{
v22 = 0x8000000000000000LL;
}
if ( v10 == 2 )
{
*((_QWORD *)&v21 + 1) = *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
}
else if ( v10 == 1 )
{
*(_QWORD *)&v21 = *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
}
else
{
v22 = 1LL;
}
for ( result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v20);
!(_BYTE)result;
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v20) )
{
v12 = 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*(&v26);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v12,
(long long)"type")
&& (v13 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v12,
(long long)"type"),
!(unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
v13,
(long long)"function"))
&& (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v12,
"function") )
{
if ( !*(_QWORD *)(v23 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, long long))(v23 + 24))(v23, v12);
}
else if ( common_log_verbosity_thold[0] >= 0 )
{
v14 = common_log_main();
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>::dump(
(long long)&v24,
v12,
2,
32,
0,
0);
common_log_add(
(long long)v14,
2LL,
(long long)"Skipping tool without function: %s",
(long long)v24,
v15,
v16,
(__m128)0LL,
a4,
a5,
a6,
v17,
v18,
a9,
a10,
(char)v20);
if ( v24 != &v25 )
operator delete(v24, v25 + 1);
}
v19 = *v26;
if ( v19 == 2 )
{
v28 += 16LL;
}
else if ( v19 == 1 )
{
v27 += 48LL;
}
else
{
++v29;
}
}
return result;
}
| foreach_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x20],RSI
MOV R14,RDI
MOV RBX,-0x8000000000000000
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x0014e5de
MOV qword ptr [RSP],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP + 0x18],RBX
MOVZX EAX,byte ptr [R14]
CMP EAX,0x2
JZ 0x00189e33
CMP EAX,0x1
JNZ 0x00189e3e
MOV qword ptr [RSP + 0x8],0x0
JMP 0x00189e43
LAB_00189e33:
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00189e43
LAB_00189e3e:
MOV qword ptr [RSP + 0x18],RBX
LAB_00189e43:
CMP EAX,0x2
JZ 0x00189e5c
CMP EAX,0x1
JNZ 0x00189e6b
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00189e74
LAB_00189e5c:
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00189e74
LAB_00189e6b:
MOV qword ptr [RSP + 0x18],0x1
LAB_00189e74:
LEA RDI,[RSP + 0x48]
MOV RSI,RSP
CALL 0x0014e6a2
TEST AL,AL
JNZ 0x00189f9f
LEA R14,[RSP + 0x48]
LEA R15,[0x1aa8de]
LEA R12,[0x1deff0]
MOV R13,RSP
LAB_00189e9f:
MOV RDI,R14
CALL 0x0014e2e2
MOV RBP,RAX
MOV RDI,RAX
MOV RSI,R15
CALL 0x00168512
TEST AL,AL
JZ 0x00189f02
MOV RDI,RBP
MOV RSI,R15
CALL 0x001697d2
MOV RDI,RAX
LEA RSI,[0x1aa8f2]
CALL 0x0016922d
TEST AL,AL
JNZ 0x00189f02
MOV RDI,RBP
LEA RSI,[0x1aa8f2]
CALL 0x00196d5c
TEST AL,AL
JZ 0x00189f02
MOV RDI,qword ptr [RSP + 0x20]
CMP qword ptr [RDI + 0x10],0x0
JZ 0x00189fae
MOV RSI,RBP
CALL qword ptr [RDI + 0x18]
JMP 0x00189f65
LAB_00189f02:
CMP dword ptr [R12],0x0
JS 0x00189f65
CALL 0x0017fd7b
MOV RBX,RAX
LEA RDI,[RSP + 0x28]
MOV RSI,RBP
MOV EDX,0x2
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012bc96
MOV RCX,qword ptr [RSP + 0x28]
LAB_00189f33:
MOV RDI,RBX
MOV ESI,0x2
LEA RDX,[0x1b2956]
XOR EAX,EAX
CALL 0x0017fe16
LAB_00189f49:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00189f65
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_00189f65:
MOV RAX,qword ptr [RSP + 0x48]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00189f7f
CMP EAX,0x1
JNZ 0x00189f87
ADD qword ptr [RSP + 0x50],0x30
JMP 0x00189f8c
LAB_00189f7f:
ADD qword ptr [RSP + 0x58],0x10
JMP 0x00189f8c
LAB_00189f87:
INC qword ptr [RSP + 0x60]
LAB_00189f8c:
MOV RDI,R14
MOV RSI,R13
CALL 0x0014e6a2
TEST AL,AL
JZ 0x00189e9f
LAB_00189f9f:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00189fae:
CALL 0x00118250
|
/* foreach_function(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&, std::function<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&)> const&) */
void foreach_function(basic_json *param_1,function *param_2)
{
char cVar1;
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 *pbVar2;
int8 uVar3;
basic_json *local_98;
int8 local_90;
int8 uStack_88;
int8 local_80;
function *local_78;
long *local_70 [2];
long local_60 [2];
char *local_50;
long local_48;
long local_40;
long local_38;
local_78 = param_2;
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>
::cbegin();
local_80 = 0x8000000000000000;
uStack_88 = 0;
local_90 = 0;
if (*param_1 == (basic_json)0x2) {
uStack_88 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else if (*param_1 == (basic_json)0x1) {
local_90 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else {
local_80 = 1;
}
local_98 = param_1;
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_50,&local_98);
if (cVar1 == '\0') {
do {
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>
*)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>
*)&local_50);
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,&DAT_001aa8de);
if (cVar1 == '\0') {
LAB_00189f02:
if (-1 < common_log_verbosity_thold) {
uVar3 = common_log_main();
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>
::dump(local_70,this,2,0x20,0,0);
/* try { // try from 00189f33 to 00189f48 has its CatchHandler @ 00189fb3 */
common_log_add(uVar3,2,"Skipping tool without function: %s",local_70[0]);
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
}
}
else {
pbVar2 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"type");
cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(pbVar2,"function");
if ((cVar1 != '\0') ||
(cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"function"), cVar1 == '\0')) goto LAB_00189f02;
if (*(long *)(local_78 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
(**(code **)(local_78 + 0x18))(local_78,this);
}
if (*local_50 == '\x02') {
local_40 = local_40 + 0x10;
}
else if (*local_50 == '\x01') {
local_48 = local_48 + 0x30;
}
else {
local_38 = local_38 + 1;
}
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((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>
*)&local_50,&local_98);
} while (cVar1 == '\0');
}
return;
}
| |
34,302 | Encoder::forward(ggml_context*, ggml_tensor*) | 7CodeWizard[P]stablediffusion/vae.hpp | struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) {
// x: [N, in_channels, h, w]
// conv_in
auto h = ggml_nn_conv_2d(ctx, x, conv_in_w, conv_in_b, 1, 1, 1, 1); // [N, ch, h, w]
ggml_set_name(h, "b-start");
int len_mults = sizeof(ch_mult) / sizeof(int);
for (int i = 0; i < len_mults; i++) {
for (int j = 0; j < num_res_blocks; j++) {
h = down_blocks[i][j].forward(ctx, h);
}
if (i != len_mults - 1) {
h = down_samples[i].forward(ctx, h);
}
}
h = mid.block_1.forward(ctx, h);
h = mid.attn_1.forward(ctx, h);
h = mid.block_2.forward(ctx, h); // [N, block_in, h, w]
h = ggml_nn_group_norm(ctx, h, norm_out_w, norm_out_b);
h = ggml_silu_inplace(ctx, h);
// conv_out
h = ggml_nn_conv_2d(ctx, h, conv_out_w, conv_out_b, 1, 1, 1, 1); // [N, z_channels*2, h, w]
return h;
} | O0 | cpp | Encoder::forward(ggml_context*, ggml_tensor*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x28(%rax), %rdx
movq 0x30(%rax), %rcx
movl $0x1, %r9d
movl %r9d, %r8d
movl $0x1, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
callq 0x361c0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
leaq 0xfaa28(%rip), %rsi # 0x180b05
callq 0x11e6c0
movl $0x4, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x861a8
movl $0x0, 0x2c(%rsp)
movq 0x20(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x8615b
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movslq 0x30(%rsp), %rax
imulq $0xb0, %rax, %rax
addq %rax, %rdi
movslq 0x2c(%rsp), %rax
imulq $0x58, %rax, %rax
addq %rax, %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x85a40
movq %rax, 0x38(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x86108
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x86196
movq 0x20(%rsp), %rdi
addq $0x2f8, %rdi # imm = 0x2F8
movslq 0x30(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x696c0
movq %rax, 0x38(%rsp)
jmp 0x86198
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x860f2
movq 0x20(%rsp), %rdi
addq $0x358, %rdi # imm = 0x358
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x85a40
movq 0x20(%rsp), %rdi
movq %rax, 0x38(%rsp)
addq $0x358, %rdi # imm = 0x358
addq $0x58, %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x85bf0
movq 0x20(%rsp), %rdi
movq %rax, 0x38(%rsp)
addq $0x358, %rdi # imm = 0x358
addq $0xb0, %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x85a40
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x460(%rax), %rdx
movq 0x468(%rax), %rcx
movl $0x20, %r8d
callq 0x36290
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x120ba0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x470(%rax), %rdx
movq 0x478(%rax), %rcx
movl $0x1, %r9d
movl %r9d, %r8d
movl $0x1, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
callq 0x361c0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN7Encoder7forwardEP12ggml_contextP11ggml_tensor:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rax+28h]
mov rcx, [rax+30h]
mov r9d, 1
mov r8d, r9d
mov [rsp+58h+var_58], 1
mov [rsp+58h+var_50], 1
mov [rsp+58h+var_48], 1
mov [rsp+58h+var_40], 1
call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
mov [rsp+58h+var_20], rax
mov rdi, [rsp+58h+var_20]
lea rsi, aBStart; "b-start"
call ggml_set_name
mov [rsp+58h+var_24], 4
mov [rsp+58h+var_28], 0
loc_860F2:
mov eax, [rsp+58h+var_28]
cmp eax, [rsp+58h+var_24]
jge loc_861A8
mov [rsp+58h+var_2C], 0
loc_86108:
mov rcx, [rsp+58h+var_38]
mov eax, [rsp+58h+var_2C]
cmp eax, [rcx+10h]
jge short loc_8615B
mov rdi, [rsp+58h+var_38]
add rdi, 38h ; '8'
movsxd rax, [rsp+58h+var_28]
imul rax, 0B0h
add rdi, rax
movsxd rax, [rsp+58h+var_2C]
imul rax, 58h ; 'X'
add rdi, rax
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_20]
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
mov [rsp+58h+var_20], rax
mov eax, [rsp+58h+var_2C]
add eax, 1
mov [rsp+58h+var_2C], eax
jmp short loc_86108
loc_8615B:
mov eax, [rsp+58h+var_28]
mov ecx, [rsp+58h+var_24]
sub ecx, 1
cmp eax, ecx
jz short loc_86196
mov rdi, [rsp+58h+var_38]
add rdi, 2F8h
movsxd rax, [rsp+58h+var_28]
shl rax, 5
add rdi, rax
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_20]
call _ZN10DownSample7forwardEP12ggml_contextP11ggml_tensor; DownSample::forward(ggml_context *,ggml_tensor *)
mov [rsp+58h+var_20], rax
loc_86196:
jmp short $+2
loc_86198:
mov eax, [rsp+58h+var_28]
add eax, 1
mov [rsp+58h+var_28], eax
jmp loc_860F2
loc_861A8:
mov rdi, [rsp+58h+var_38]
add rdi, 358h
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_20]
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
mov rdi, [rsp+58h+var_38]
mov [rsp+58h+var_20], rax
add rdi, 358h
add rdi, 58h ; 'X'
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_20]
call _ZN9AttnBlock7forwardEP12ggml_contextP11ggml_tensor; AttnBlock::forward(ggml_context *,ggml_tensor *)
mov rdi, [rsp+58h+var_38]
mov [rsp+58h+var_20], rax
add rdi, 358h
add rdi, 0B0h
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_20]
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
mov rcx, rax
mov rax, [rsp+58h+var_38]
mov [rsp+58h+var_20], rcx
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov rdx, [rax+460h]
mov rcx, [rax+468h]
mov r8d, 20h ; ' '
call _ZL18ggml_nn_group_normP12ggml_contextP11ggml_tensorS2_S2_i; ggml_nn_group_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int)
mov [rsp+58h+var_20], rax
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
call ggml_silu_inplace
mov rcx, rax
mov rax, [rsp+58h+var_38]
mov [rsp+58h+var_20], rcx
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov rdx, [rax+470h]
mov rcx, [rax+478h]
mov r9d, 1
mov r8d, r9d
mov [rsp+58h+var_58], 1
mov [rsp+58h+var_50], 1
mov [rsp+58h+var_48], 1
mov [rsp+58h+var_40], 1
call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
mov [rsp+58h+var_20], rax
mov rax, [rsp+58h+var_20]
add rsp, 58h
retn
| long long Encoder::forward(long long a1, long long a2, int a3)
{
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
int v7; // eax
int j; // [rsp+2Ch] [rbp-2Ch]
int i; // [rsp+30h] [rbp-28h]
long long v11; // [rsp+38h] [rbp-20h]
v11 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), 1, 1, 1, 1, 1, 1);
ggml_set_name(v11, "b-start");
for ( i = 0; i < 4; ++i )
{
for ( j = 0; j < *(_DWORD *)(a1 + 16); ++j )
v11 = ResnetBlock::forward(88LL * j + 176LL * i + a1 + 56, a2, v11);
if ( i != 3 )
v11 = DownSample::forward(32LL * i + a1 + 760, a2, v11);
}
v3 = ResnetBlock::forward(a1 + 856, a2, v11);
v4 = AttnBlock::forward(a1 + 944, a2, v3);
v5 = ResnetBlock::forward(a1 + 1032, a2, v4);
v6 = ggml_nn_group_norm(a2, v5, *(_QWORD *)(a1 + 1120), *(_QWORD *)(a1 + 1128), 0x20u);
v7 = ggml_silu_inplace(a2, v6);
return ggml_nn_conv_2d(a2, v7, *(_QWORD *)(a1 + 1136), *(_QWORD *)(a1 + 1144), 1, 1, 1, 1, 1, 1);
}
| forward:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RAX + 0x30]
MOV R9D,0x1
MOV R8D,R9D
MOV dword ptr [RSP],0x1
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x1
MOV dword ptr [RSP + 0x18],0x1
CALL 0x001361c0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x280b05]
CALL 0x0021e6c0
MOV dword ptr [RSP + 0x34],0x4
MOV dword ptr [RSP + 0x30],0x0
LAB_001860f2:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x34]
JGE 0x001861a8
MOV dword ptr [RSP + 0x2c],0x0
LAB_00186108:
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,dword ptr [RCX + 0x10]
JGE 0x0018615b
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x38
MOVSXD RAX,dword ptr [RSP + 0x30]
IMUL RAX,RAX,0xb0
ADD RDI,RAX
MOVSXD RAX,dword ptr [RSP + 0x2c]
IMUL RAX,RAX,0x58
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00185a40
MOV qword ptr [RSP + 0x38],RAX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00186108
LAB_0018615b:
MOV EAX,dword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x34]
SUB ECX,0x1
CMP EAX,ECX
JZ 0x00186196
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x2f8
MOVSXD RAX,dword ptr [RSP + 0x30]
SHL RAX,0x5
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x001696c0
MOV qword ptr [RSP + 0x38],RAX
LAB_00186196:
JMP 0x00186198
LAB_00186198:
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001860f2
LAB_001861a8:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x358
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00185a40
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
ADD RDI,0x358
ADD RDI,0x58
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00185bf0
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
ADD RDI,0x358
ADD RDI,0xb0
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00185a40
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RCX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RAX + 0x460]
MOV RCX,qword ptr [RAX + 0x468]
MOV R8D,0x20
CALL 0x00136290
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00220ba0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RCX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RAX + 0x470]
MOV RCX,qword ptr [RAX + 0x478]
MOV R9D,0x1
MOV R8D,R9D
MOV dword ptr [RSP],0x1
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x1
MOV dword ptr [RSP + 0x18],0x1
CALL 0x001361c0
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x58
RET
|
/* Encoder::forward(ggml_context*, ggml_tensor*) */
int8 __thiscall Encoder::forward(Encoder *this,ggml_context *param_1,ggml_tensor *param_2)
{
ggml_tensor *pgVar1;
int8 uVar2;
int local_2c;
int local_28;
ggml_tensor *local_20;
local_20 = (ggml_tensor *)
ggml_nn_conv_2d(param_1,param_2,*(ggml_tensor **)(this + 0x28),
*(ggml_tensor **)(this + 0x30),1,1,1,1,1,1);
ggml_set_name(local_20,"b-start");
for (local_28 = 0; local_28 < 4; local_28 = local_28 + 1) {
for (local_2c = 0; local_2c < *(int *)(this + 0x10); local_2c = local_2c + 1) {
local_20 = (ggml_tensor *)
ResnetBlock::forward
((ResnetBlock *)
(this + (long)local_2c * 0x58 + (long)local_28 * 0xb0 + 0x38),param_1,
local_20);
}
if (local_28 != 3) {
local_20 = (ggml_tensor *)
DownSample::forward((DownSample *)(this + (long)local_28 * 0x20 + 0x2f8),param_1,
local_20);
}
}
pgVar1 = (ggml_tensor *)ResnetBlock::forward((ResnetBlock *)(this + 0x358),param_1,local_20);
pgVar1 = (ggml_tensor *)AttnBlock::forward((AttnBlock *)(this + 0x3b0),param_1,pgVar1);
pgVar1 = (ggml_tensor *)ResnetBlock::forward((ResnetBlock *)(this + 0x408),param_1,pgVar1);
uVar2 = ggml_nn_group_norm(param_1,pgVar1,*(ggml_tensor **)(this + 0x460),
*(ggml_tensor **)(this + 0x468),0x20);
pgVar1 = (ggml_tensor *)ggml_silu_inplace(param_1,uVar2);
uVar2 = ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x470),
*(ggml_tensor **)(this + 0x478),1,1,1,1,1,1);
return uVar2;
}
| |
34,303 | Encoder::forward(ggml_context*, ggml_tensor*) | 7CodeWizard[P]stablediffusion/vae.hpp | struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) {
// x: [N, in_channels, h, w]
// conv_in
auto h = ggml_nn_conv_2d(ctx, x, conv_in_w, conv_in_b, 1, 1, 1, 1); // [N, ch, h, w]
ggml_set_name(h, "b-start");
int len_mults = sizeof(ch_mult) / sizeof(int);
for (int i = 0; i < len_mults; i++) {
for (int j = 0; j < num_res_blocks; j++) {
h = down_blocks[i][j].forward(ctx, h);
}
if (i != len_mults - 1) {
h = down_samples[i].forward(ctx, h);
}
}
h = mid.block_1.forward(ctx, h);
h = mid.attn_1.forward(ctx, h);
h = mid.block_2.forward(ctx, h); // [N, block_in, h, w]
h = ggml_nn_group_norm(ctx, h, norm_out_w, norm_out_b);
h = ggml_silu_inplace(ctx, h);
// conv_out
h = ggml_nn_conv_2d(ctx, h, conv_out_w, conv_out_b, 1, 1, 1, 1); // [N, z_channels*2, h, w]
return h;
} | O2 | cpp | Encoder::forward(ggml_context*, ggml_tensor*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
pushq $0x1
popq %r8
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movl %r8d, %r9d
pushq %r8
pushq %r8
callq 0x1ce99
popq %rcx
popq %rdx
movq %rax, %r12
leaq 0x64054(%rip), %rsi # 0x9b109
movq %rax, %rdi
callq 0x6985b
leaq 0x38(%r15), %r13
leaq 0x2f8(%r15), %rax
movq %rax, 0x10(%rsp)
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x37130
movq %r13, 0x8(%rsp)
xorl %ebp, %ebp
movslq 0x10(%r15), %rax
cmpq %rax, %rbp
jge 0x370ff
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x36d4a
movq %rax, %r12
incq %rbp
addq $0x58, %r13
jmp 0x370dc
cmpq $0x3, %rbx
je 0x3711f
movq %rbx, %rdi
shlq $0x5, %rdi
addq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2e7f4
movq %rax, %r12
movq 0x8(%rsp), %r13
incq %rbx
addq $0xb0, %r13
jmp 0x370cf
leaq 0x358(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x36d4a
leaq 0x3b0(%r15), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36e24
leaq 0x408(%r15), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36d4a
movq 0x460(%r15), %rdx
movq 0x468(%r15), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1cf13
movq %r14, %rdi
movq %rax, %rsi
callq 0x6abb8
movq 0x470(%r15), %rdx
movq 0x478(%r15), %rcx
movq %r14, %rdi
movq %rax, %rsi
pushq $0x1
popq %r8
movl %r8d, %r9d
pushq %r8
pushq %r8
callq 0x1ce99
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN7Encoder7forwardEP12ggml_contextP11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov r15, rdi
mov rax, [rdi+28h]
mov rcx, [rdi+30h]
push 1
pop r8
mov rdi, rsi
mov rsi, rdx
mov rdx, rax
mov r9d, r8d
push r8
push r8
call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
pop rcx
pop rdx
mov r12, rax
lea rsi, aBStart; "b-start"
mov rdi, rax
call ggml_set_name
lea r13, [r15+38h]
lea rax, [r15+2F8h]
mov [rsp+48h+var_38], rax
xor ebx, ebx
loc_370CF:
cmp rbx, 4
jz short loc_37130
mov [rsp+48h+var_40], r13
xor ebp, ebp
loc_370DC:
movsxd rax, dword ptr [r15+10h]
cmp rbp, rax
jge short loc_370FF
mov rdi, r13
mov rsi, r14
mov rdx, r12
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
mov r12, rax
inc rbp
add r13, 58h ; 'X'
jmp short loc_370DC
loc_370FF:
cmp rbx, 3
jz short loc_3711F
mov rdi, rbx
shl rdi, 5
add rdi, [rsp+48h+var_38]
mov rsi, r14
mov rdx, r12
call _ZN10DownSample7forwardEP12ggml_contextP11ggml_tensor; DownSample::forward(ggml_context *,ggml_tensor *)
mov r12, rax
loc_3711F:
mov r13, [rsp+48h+var_40]
inc rbx
add r13, 0B0h
jmp short loc_370CF
loc_37130:
lea rdi, [r15+358h]
mov rsi, r14
mov rdx, r12
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
lea rdi, [r15+3B0h]
mov rsi, r14
mov rdx, rax
call _ZN9AttnBlock7forwardEP12ggml_contextP11ggml_tensor; AttnBlock::forward(ggml_context *,ggml_tensor *)
lea rdi, [r15+408h]
mov rsi, r14
mov rdx, rax
call _ZN11ResnetBlock7forwardEP12ggml_contextP11ggml_tensor; ResnetBlock::forward(ggml_context *,ggml_tensor *)
mov rdx, [r15+460h]
mov rcx, [r15+468h]
mov rdi, r14
mov rsi, rax
call _ZL18ggml_nn_group_normP12ggml_contextP11ggml_tensorS2_S2_i; ggml_nn_group_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int)
mov rdi, r14
mov rsi, rax
call ggml_silu_inplace
mov rdx, [r15+470h]
mov rcx, [r15+478h]
mov rdi, r14
mov rsi, rax
push 1
pop r8
mov r9d, r8d
push r8
push r8
call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Encoder::forward(long long a1, long long a2, int a3)
{
long long v3; // r12
long long v4; // r13
long long i; // rbx
long long j; // rbp
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
int v11; // eax
long long v13; // [rsp-8h] [rbp-50h]
long long v14; // [rsp+8h] [rbp-40h]
v3 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), 1, 1, 1, 1);
ggml_set_name(v3, "b-start", v13);
v4 = a1 + 56;
for ( i = 0LL; i != 4; ++i )
{
v14 = v4;
for ( j = 0LL; j < *(int *)(a1 + 16); ++j )
{
v3 = ResnetBlock::forward(v4, a2, v3);
v4 += 88LL;
}
if ( i != 3 )
v3 = DownSample::forward(a1 + 760 + 32 * i, a2, v3);
v4 = v14 + 176;
}
v7 = ResnetBlock::forward(a1 + 856, a2, v3);
v8 = AttnBlock::forward(a1 + 944, a2, v7);
v9 = ResnetBlock::forward(a1 + 1032, a2, v8);
v10 = ggml_nn_group_norm(a2, v9, *(_QWORD *)(a1 + 1120), *(_QWORD *)(a1 + 1128));
v11 = ggml_silu_inplace(a2, v10);
return ggml_nn_conv_2d(a2, v11, *(_QWORD *)(a1 + 1136), *(_QWORD *)(a1 + 1144), 1, 1, 1, 1);
}
| forward:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x28]
MOV RCX,qword ptr [RDI + 0x30]
PUSH 0x1
POP R8
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RAX
MOV R9D,R8D
PUSH R8
PUSH R8
CALL 0x0011ce99
POP RCX
POP RDX
MOV R12,RAX
LEA RSI,[0x19b109]
MOV RDI,RAX
CALL 0x0016985b
LEA R13,[R15 + 0x38]
LEA RAX,[R15 + 0x2f8]
MOV qword ptr [RSP + 0x10],RAX
XOR EBX,EBX
LAB_001370cf:
CMP RBX,0x4
JZ 0x00137130
MOV qword ptr [RSP + 0x8],R13
XOR EBP,EBP
LAB_001370dc:
MOVSXD RAX,dword ptr [R15 + 0x10]
CMP RBP,RAX
JGE 0x001370ff
MOV RDI,R13
MOV RSI,R14
MOV RDX,R12
CALL 0x00136d4a
MOV R12,RAX
INC RBP
ADD R13,0x58
JMP 0x001370dc
LAB_001370ff:
CMP RBX,0x3
JZ 0x0013711f
MOV RDI,RBX
SHL RDI,0x5
ADD RDI,qword ptr [RSP + 0x10]
MOV RSI,R14
MOV RDX,R12
CALL 0x0012e7f4
MOV R12,RAX
LAB_0013711f:
MOV R13,qword ptr [RSP + 0x8]
INC RBX
ADD R13,0xb0
JMP 0x001370cf
LAB_00137130:
LEA RDI,[R15 + 0x358]
MOV RSI,R14
MOV RDX,R12
CALL 0x00136d4a
LEA RDI,[R15 + 0x3b0]
MOV RSI,R14
MOV RDX,RAX
CALL 0x00136e24
LEA RDI,[R15 + 0x408]
MOV RSI,R14
MOV RDX,RAX
CALL 0x00136d4a
MOV RDX,qword ptr [R15 + 0x460]
MOV RCX,qword ptr [R15 + 0x468]
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011cf13
MOV RDI,R14
MOV RSI,RAX
CALL 0x0016abb8
MOV RDX,qword ptr [R15 + 0x470]
MOV RCX,qword ptr [R15 + 0x478]
MOV RDI,R14
MOV RSI,RAX
PUSH 0x1
POP R8
MOV R9D,R8D
PUSH R8
PUSH R8
CALL 0x0011ce99
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Encoder::forward(ggml_context*, ggml_tensor*) */
void __thiscall Encoder::forward(Encoder *this,ggml_context *param_1,ggml_tensor *param_2)
{
ggml_tensor *pgVar1;
int8 uVar2;
long lVar3;
long lVar4;
int iVar5;
Encoder *pEVar6;
int8 uVar7;
int8 uVar8;
int in_stack_ffffffffffffffb8;
int iVar9;
Encoder *in_stack_ffffffffffffffc0;
uVar2 = 1;
uVar8 = 1;
uVar7 = 1;
pgVar1 = (ggml_tensor *)
ggml_nn_conv_2d(param_1,param_2,*(ggml_tensor **)(this + 0x28),
*(ggml_tensor **)(this + 0x30),1,1,1,1,in_stack_ffffffffffffffb8,
(int)in_stack_ffffffffffffffc0);
ggml_set_name(pgVar1,"b-start",uVar8,uVar7);
pEVar6 = this + 0x38;
for (lVar3 = 0; iVar9 = (int)in_stack_ffffffffffffffc0, iVar5 = (int)uVar2, lVar3 != 4;
lVar3 = lVar3 + 1) {
in_stack_ffffffffffffffc0 = pEVar6;
for (lVar4 = 0; lVar4 < *(int *)(this + 0x10); lVar4 = lVar4 + 1) {
pgVar1 = (ggml_tensor *)ResnetBlock::forward((ggml_context *)pEVar6,(ggml_tensor *)param_1);
pEVar6 = (Encoder *)((ggml_context *)pEVar6 + 0x58);
}
if (lVar3 != 3) {
pgVar1 = (ggml_tensor *)
DownSample::forward((DownSample *)(this + lVar3 * 0x20 + 0x2f8),param_1,pgVar1);
}
pEVar6 = in_stack_ffffffffffffffc0 + 0xb0;
}
ResnetBlock::forward((ggml_context *)(this + 0x358),(ggml_tensor *)param_1);
AttnBlock::forward((ggml_context *)(this + 0x3b0),(ggml_tensor *)param_1);
pgVar1 = (ggml_tensor *)
ResnetBlock::forward((ggml_context *)(this + 0x408),(ggml_tensor *)param_1);
uVar2 = ggml_nn_group_norm(param_1,pgVar1,*(ggml_tensor **)(this + 0x460),
*(ggml_tensor **)(this + 0x468),iVar5);
pgVar1 = (ggml_tensor *)ggml_silu_inplace(param_1,uVar2);
ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x470),*(ggml_tensor **)(this + 0x478),1,1
,1,1,in_stack_ffffffffffffffb8,iVar9);
return;
}
| |
34,304 | 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 0x3c58e
movq %rcx, %rax
jmp 0x3c5b7
movzbl 0x1(%rsi), %eax
cmpl $0xfa, %ecx
je 0x3c5b7
addq $-0xfa, %rcx
xorl %edx, %edx
shlq $0x8, %rax
movzbl 0x2(%rsi,%rdx), %r8d
orq %r8, %rax
incq %rdx
cmpl %edx, %ecx
jne 0x3c5a3
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_3C58E
mov rax, rcx
jmp short loc_3C5B7
loc_3C58E:
movzx eax, byte ptr [rsi+1]
cmp ecx, 0FAh
jz short loc_3C5B7
add rcx, 0FFFFFFFFFFFFFF06h
xor edx, edx
loc_3C5A3:
shl rax, 8
movzx r8d, byte ptr [rsi+rdx+2]
or rax, r8
inc rdx
cmp ecx, edx
jnz short loc_3C5A3
loc_3C5B7:
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 0x0013c58e
MOV RAX,RCX
JMP 0x0013c5b7
LAB_0013c58e:
MOVZX EAX,byte ptr [RSI + 0x1]
CMP ECX,0xfa
JZ 0x0013c5b7
ADD RCX,-0xfa
XOR EDX,EDX
LAB_0013c5a3:
SHL RAX,0x8
MOVZX R8D,byte ptr [RSI + RDX*0x1 + 0x2]
OR RAX,R8
INC RDX
CMP ECX,EDX
JNZ 0x0013c5a3
LAB_0013c5b7:
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);
}
| |
34,305 | common_context_params_to_llama(common_params const&) | monkey531[P]llama/common/common.cpp | struct llama_context_params common_context_params_to_llama(const common_params & params) {
auto cparams = llama_context_default_params();
cparams.n_ctx = params.n_ctx;
cparams.n_seq_max = params.n_parallel;
cparams.n_batch = params.n_batch;
cparams.n_ubatch = params.n_ubatch;
cparams.n_threads = params.cpuparams.n_threads;
cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ?
params.cpuparams.n_threads : params.cpuparams_batch.n_threads;
cparams.logits_all = params.logits_all;
cparams.embeddings = params.embedding;
cparams.rope_scaling_type = params.rope_scaling_type;
cparams.rope_freq_base = params.rope_freq_base;
cparams.rope_freq_scale = params.rope_freq_scale;
cparams.yarn_ext_factor = params.yarn_ext_factor;
cparams.yarn_attn_factor = params.yarn_attn_factor;
cparams.yarn_beta_fast = params.yarn_beta_fast;
cparams.yarn_beta_slow = params.yarn_beta_slow;
cparams.yarn_orig_ctx = params.yarn_orig_ctx;
cparams.pooling_type = params.pooling_type;
cparams.attention_type = params.attention_type;
cparams.defrag_thold = params.defrag_thold;
cparams.cb_eval = params.cb_eval;
cparams.cb_eval_user_data = params.cb_eval_user_data;
cparams.offload_kqv = !params.no_kv_offload;
cparams.flash_attn = params.flash_attn;
cparams.no_perf = params.no_perf;
if (params.reranking) {
cparams.embeddings = true;
cparams.pooling_type = LLAMA_POOLING_TYPE_RANK;
}
cparams.type_k = params.cache_type_k;
cparams.type_v = params.cache_type_v;
return cparams;
} | O2 | cpp | common_context_params_to_llama(common_params const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x260c0
movl 0x18(%r14), %eax
movl %eax, 0xc(%rbx)
movq 0x4(%r14), %rax
movq %rax, (%rbx)
movl 0xc(%r14), %eax
movl %eax, 0x8(%rbx)
movl 0x274(%r14), %eax
movl %eax, 0x10(%rbx)
movl 0x488(%r14), %ecx
cmpl $-0x1, %ecx
cmovel %eax, %ecx
movl %ecx, 0x14(%rbx)
movb 0xfe8(%r14), %al
movb %al, 0x60(%rbx)
movb 0x1038(%r14), %al
movb %al, 0x61(%rbx)
movups 0x2c(%r14), %xmm0
movups %xmm0, 0x24(%rbx)
movsd 0x3c(%r14), %xmm0
movsd %xmm0, 0x34(%rbx)
movl 0x44(%r14), %eax
movl %eax, 0x3c(%rbx)
movq 0x6b4(%r14), %rax
movq %rax, 0x18(%rbx)
movl 0x6bc(%r14), %eax
movl %eax, 0x20(%rbx)
movss 0x48(%r14), %xmm0
movss %xmm0, 0x40(%rbx)
movups 0x6a0(%r14), %xmm0
movups %xmm0, 0x48(%rbx)
movb 0xfee(%r14), %al
xorb $0x1, %al
movb %al, 0x62(%rbx)
movb 0xfe4(%r14), %al
movb %al, 0x63(%rbx)
movb 0xfe5(%r14), %al
movb %al, 0x64(%rbx)
cmpb $0x1, 0x1080(%r14)
jne 0x71eda
movb $0x1, 0x61(%rbx)
movl $0x4, 0x1c(%rbx)
movq 0xff4(%r14), %rax
movq %rax, 0x58(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z30common_context_params_to_llamaRK13common_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _llama_context_default_params
mov eax, [r14+18h]
mov [rbx+0Ch], eax
mov rax, [r14+4]
mov [rbx], rax
mov eax, [r14+0Ch]
mov [rbx+8], eax
mov eax, [r14+274h]
mov [rbx+10h], eax
mov ecx, [r14+488h]
cmp ecx, 0FFFFFFFFh
cmovz ecx, eax
mov [rbx+14h], ecx
mov al, [r14+0FE8h]
mov [rbx+60h], al
mov al, [r14+1038h]
mov [rbx+61h], al
movups xmm0, xmmword ptr [r14+2Ch]
movups xmmword ptr [rbx+24h], xmm0
movsd xmm0, qword ptr [r14+3Ch]
movsd qword ptr [rbx+34h], xmm0
mov eax, [r14+44h]
mov [rbx+3Ch], eax
mov rax, [r14+6B4h]
mov [rbx+18h], rax
mov eax, [r14+6BCh]
mov [rbx+20h], eax
movss xmm0, dword ptr [r14+48h]
movss dword ptr [rbx+40h], xmm0
movups xmm0, xmmword ptr [r14+6A0h]
movups xmmword ptr [rbx+48h], xmm0
mov al, [r14+0FEEh]
xor al, 1
mov [rbx+62h], al
mov al, [r14+0FE4h]
mov [rbx+63h], al
mov al, [r14+0FE5h]
mov [rbx+64h], al
cmp byte ptr [r14+1080h], 1
jnz short loc_71EDA
mov byte ptr [rbx+61h], 1
mov dword ptr [rbx+1Ch], 4
loc_71EDA:
mov rax, [r14+0FF4h]
mov [rbx+58h], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| const common_params * common_context_params_to_llama(const common_params *a1, long long a2)
{
int v2; // eax
int v3; // ecx
llama_context_default_params(a1);
*((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24);
*(_QWORD *)a1 = *(_QWORD *)(a2 + 4);
*((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12);
v2 = *(_DWORD *)(a2 + 628);
*((_DWORD *)a1 + 4) = v2;
v3 = *(_DWORD *)(a2 + 1160);
if ( v3 == -1 )
v3 = v2;
*((_DWORD *)a1 + 5) = v3;
*((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072);
*((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152);
*(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44);
*(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60);
*((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68);
*((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716);
*((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724);
*((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72);
*(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696);
*((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1;
*((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068);
*((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069);
if ( *(_BYTE *)(a2 + 4224) == 1 )
{
*((_BYTE *)a1 + 97) = 1;
*((_DWORD *)a1 + 7) = 4;
}
*((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084);
return a1;
}
| common_context_params_to_llama:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x001260c0
MOV EAX,dword ptr [R14 + 0x18]
MOV dword ptr [RBX + 0xc],EAX
MOV RAX,qword ptr [R14 + 0x4]
MOV qword ptr [RBX],RAX
MOV EAX,dword ptr [R14 + 0xc]
MOV dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [R14 + 0x274]
MOV dword ptr [RBX + 0x10],EAX
MOV ECX,dword ptr [R14 + 0x488]
CMP ECX,-0x1
CMOVZ ECX,EAX
MOV dword ptr [RBX + 0x14],ECX
MOV AL,byte ptr [R14 + 0xfe8]
MOV byte ptr [RBX + 0x60],AL
MOV AL,byte ptr [R14 + 0x1038]
MOV byte ptr [RBX + 0x61],AL
MOVUPS XMM0,xmmword ptr [R14 + 0x2c]
MOVUPS xmmword ptr [RBX + 0x24],XMM0
MOVSD XMM0,qword ptr [R14 + 0x3c]
MOVSD qword ptr [RBX + 0x34],XMM0
MOV EAX,dword ptr [R14 + 0x44]
MOV dword ptr [RBX + 0x3c],EAX
MOV RAX,qword ptr [R14 + 0x6b4]
MOV qword ptr [RBX + 0x18],RAX
MOV EAX,dword ptr [R14 + 0x6bc]
MOV dword ptr [RBX + 0x20],EAX
MOVSS XMM0,dword ptr [R14 + 0x48]
MOVSS dword ptr [RBX + 0x40],XMM0
MOVUPS XMM0,xmmword ptr [R14 + 0x6a0]
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV AL,byte ptr [R14 + 0xfee]
XOR AL,0x1
MOV byte ptr [RBX + 0x62],AL
MOV AL,byte ptr [R14 + 0xfe4]
MOV byte ptr [RBX + 0x63],AL
MOV AL,byte ptr [R14 + 0xfe5]
MOV byte ptr [RBX + 0x64],AL
CMP byte ptr [R14 + 0x1080],0x1
JNZ 0x00171eda
MOV byte ptr [RBX + 0x61],0x1
MOV dword ptr [RBX + 0x1c],0x4
LAB_00171eda:
MOV RAX,qword ptr [R14 + 0xff4]
MOV qword ptr [RBX + 0x58],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* common_context_params_to_llama(common_params const&) */
common_params * common_context_params_to_llama(common_params *param_1)
{
int iVar1;
int8 uVar2;
int iVar3;
long in_RSI;
llama_context_default_params();
*(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18);
*(int8 *)param_1 = *(int8 *)(in_RSI + 4);
*(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc);
iVar1 = *(int *)(in_RSI + 0x274);
*(int *)(param_1 + 0x10) = iVar1;
iVar3 = *(int *)(in_RSI + 0x488);
if (*(int *)(in_RSI + 0x488) == -1) {
iVar3 = iVar1;
}
*(int *)(param_1 + 0x14) = iVar3;
param_1[0x60] = *(common_params *)(in_RSI + 0xfe8);
param_1[0x61] = *(common_params *)(in_RSI + 0x1038);
uVar2 = *(int8 *)(in_RSI + 0x34);
*(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c);
*(int8 *)(param_1 + 0x2c) = uVar2;
*(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c);
*(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44);
*(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4);
*(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc);
*(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48);
uVar2 = *(int8 *)(in_RSI + 0x6a8);
*(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0);
*(int8 *)(param_1 + 0x50) = uVar2;
param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1);
param_1[99] = *(common_params *)(in_RSI + 0xfe4);
param_1[100] = *(common_params *)(in_RSI + 0xfe5);
if (*(char *)(in_RSI + 0x1080) == '\x01') {
param_1[0x61] = (common_params)0x1;
*(int4 *)(param_1 + 0x1c) = 4;
}
*(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4);
return param_1;
}
| |
34,306 | validate_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | llama.cpp/examples/server/utils.hpp | static size_t validate_utf8(const std::string& text) {
size_t len = text.size();
if (len == 0) return 0;
// Check the last few bytes to see if a multi-byte character is cut off
for (size_t i = 1; i <= 4 && i <= len; ++i) {
unsigned char c = text[len - i];
// Check for start of a multi-byte sequence from the end
if ((c & 0xE0) == 0xC0) {
// 2-byte character start: 110xxxxx
// Needs at least 2 bytes
if (i < 2) return len - i;
} else if ((c & 0xF0) == 0xE0) {
// 3-byte character start: 1110xxxx
// Needs at least 3 bytes
if (i < 3) return len - i;
} else if ((c & 0xF8) == 0xF0) {
// 4-byte character start: 11110xxx
// Needs at least 4 bytes
if (i < 4) return len - i;
}
}
// If no cut-off multi-byte character is found, return full length
return len;
} | O3 | cpp | validate_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
testq %rsi, %rsi
je 0x45a54
cmpq $0x4, %rsi
movl $0x4, %ecx
cmovbq %rsi, %rcx
negq %rcx
leaq -0x1(%rsi), %rdx
movl $0x1, %r8d
movzbl (%rdi,%rdx), %r9d
movl %r9d, %eax
andl $-0x20, %eax
cmpl $0xc0, %eax
jne 0x45a0c
cmpq $0x2, %r8
jae 0x45a3d
jmp 0x45a57
movq %rsi, %rax
subq %r8, %rax
movl %r9d, %r10d
andl $-0x10, %r10d
cmpl $0xe0, %r10d
jne 0x45a2a
cmpq $0x3, %r8
jae 0x45a3d
jmp 0x45a53
cmpq $0x3, %r8
ja 0x45a3d
andl $-0x8, %r9d
cmpl $0xf0, %r9d
je 0x45a53
leaq (%rcx,%r8), %rax
incq %rax
incq %r8
decq %rdx
cmpq $0x1, %rax
jne 0x459f2
movq %rsi, %rax
retq
xorl %eax, %eax
retq
movq %rdx, %rax
retq
| _ZL13validate_utf8RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
test rsi, rsi
jz short loc_45A54
cmp rsi, 4
mov ecx, 4
cmovb rcx, rsi
neg rcx
lea rdx, [rsi-1]
mov r8d, 1
loc_459F2:
movzx r9d, byte ptr [rdi+rdx]
mov eax, r9d
and eax, 0FFFFFFE0h
cmp eax, 0C0h
jnz short loc_45A0C
cmp r8, 2
jnb short loc_45A3D
jmp short loc_45A57
loc_45A0C:
mov rax, rsi
sub rax, r8
mov r10d, r9d
and r10d, 0FFFFFFF0h
cmp r10d, 0E0h
jnz short loc_45A2A
cmp r8, 3
jnb short loc_45A3D
jmp short locret_45A53
loc_45A2A:
cmp r8, 3
ja short loc_45A3D
and r9d, 0FFFFFFF8h
cmp r9d, 0F0h
jz short locret_45A53
loc_45A3D:
lea rax, [rcx+r8]
inc rax
inc r8
dec rdx
cmp rax, 1
jnz short loc_459F2
mov rax, rsi
locret_45A53:
retn
loc_45A54:
xor eax, eax
retn
loc_45A57:
mov rax, rdx
retn
| unsigned long long validate_utf8(long long a1, unsigned long long a2)
{
long long v2; // rcx
long long v3; // rcx
unsigned long long v4; // rdx
unsigned long long v5; // r8
int v6; // r9d
long long v7; // rax
unsigned long long result; // rax
if ( !a2 )
return 0LL;
v2 = 4LL;
if ( a2 < 4 )
v2 = a2;
v3 = -v2;
v4 = a2 - 1;
v5 = 1LL;
do
{
v6 = *(unsigned __int8 *)(a1 + v4);
if ( (v6 & 0xE0) == 0xC0 )
{
if ( v5 < 2 )
return v4;
}
else
{
result = a2 - v5;
if ( (v6 & 0xFFFFFFF0) == 0xE0 )
{
if ( v5 < 3 )
return result;
}
else if ( v5 <= 3 && (v6 & 0xFFFFFFF8) == 0xF0 )
{
return result;
}
}
v7 = v3 + v5++ + 1;
--v4;
}
while ( v7 != 1 );
return a2;
}
| validate_utf8:
TEST RSI,RSI
JZ 0x00145a54
CMP RSI,0x4
MOV ECX,0x4
CMOVC RCX,RSI
NEG RCX
LEA RDX,[RSI + -0x1]
MOV R8D,0x1
LAB_001459f2:
MOVZX R9D,byte ptr [RDI + RDX*0x1]
MOV EAX,R9D
AND EAX,0xffffffe0
CMP EAX,0xc0
JNZ 0x00145a0c
CMP R8,0x2
JNC 0x00145a3d
JMP 0x00145a57
LAB_00145a0c:
MOV RAX,RSI
SUB RAX,R8
MOV R10D,R9D
AND R10D,0xfffffff0
CMP R10D,0xe0
JNZ 0x00145a2a
CMP R8,0x3
JNC 0x00145a3d
JMP 0x00145a53
LAB_00145a2a:
CMP R8,0x3
JA 0x00145a3d
AND R9D,0xfffffff8
CMP R9D,0xf0
JZ 0x00145a53
LAB_00145a3d:
LEA RAX,[RCX + R8*0x1]
INC RAX
INC R8
DEC RDX
CMP RAX,0x1
JNZ 0x001459f2
MOV RAX,RSI
LAB_00145a53:
RET
LAB_00145a54:
XOR EAX,EAX
RET
LAB_00145a57:
MOV RAX,RDX
RET
|
/* validate_utf8(std::__cxx11::string const&) */
ulong validate_utf8(string *param_1)
{
string sVar1;
ulong uVar2;
ulong uVar3;
ulong in_RSI;
ulong uVar4;
bool bVar5;
if (in_RSI == 0) {
return 0;
}
uVar2 = 4;
if (in_RSI < 4) {
uVar2 = in_RSI;
}
uVar3 = in_RSI - 1;
uVar4 = 1;
do {
sVar1 = param_1[uVar3];
if (((byte)sVar1 & 0xe0) == 0xc0) {
if (uVar4 < 2) {
return uVar3;
}
}
else if (((byte)sVar1 & 0xf0) == 0xe0) {
if (uVar4 < 3) {
return in_RSI - uVar4;
}
}
else if ((uVar4 < 4) && (((byte)sVar1 & 0xf8) == 0xf0)) {
return in_RSI - uVar4;
}
uVar3 = uVar3 - 1;
bVar5 = uVar4 == uVar2;
uVar4 = uVar4 + 1;
if (bVar5) {
return in_RSI;
}
} while( true );
}
| |
34,307 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O0 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
leaq 0x700eb(%rip), %rax # 0xd98e0
leaq 0x700dc(%rip), %rcx # 0xd98d8
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0x38e7c5(%rip), %rdi # 0x3f7fd4
leaq -0x306(%rip), %rsi # 0x69510
callq 0x28330
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x698b0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x69837
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6989a
leaq 0x275672(%rip), %rax # 0x2deeb0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rsi
leaq 0x27565c(%rip), %rdi # 0x2deeb0
leaq 0x7008d(%rip), %rdx # 0xd98e8
callq *%rax
cmpl $0x0, %eax
jne 0x6986c
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x69874
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x69874
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x69893
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x698b0
movl %eax, -0x4(%rbp)
jmp 0x6989a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charset_number:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdx, [rbp+var_20]
and rdx, 400h
lea rax, aUtf8mb4; "utf8mb4"
lea rcx, aUtf8mb3; "utf8mb3"
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_30], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_69837
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_6989A
loc_69837:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_10]
lea rdi, my_charset_latin1
lea rdx, aUtf8; "utf8"
call rax
cmp eax, 0
jnz short loc_6986C
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_69874
loc_6986C:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_69874:
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_69893
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_4], eax
jmp short loc_6989A
loc_69893:
mov [rbp+var_4], 0
loc_6989A:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-38h]
const char *v6; // [rsp+10h] [rbp-30h]
unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h]
v3 = "utf8mb4";
if ( (a3 & 0x400) != 0 )
v3 = "utf8mb3";
v6 = v3;
pthread_once(&charsets_initialized, init_available_charsets);
charset_number_internal = get_charset_number_internal(a1, a2);
if ( charset_number_internal )
{
return charset_number_internal;
}
else
{
if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8") )
{
v5 = 0LL;
}
else
{
v5 = v6;
}
if ( v5 )
return (unsigned int)get_charset_number_internal(v5, a2);
else
return 0;
}
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x400
LEA RAX,[0x1d98e0]
LEA RCX,[0x1d98d8]
CMP RDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x4f7fd4]
LEA RSI,[0x169510]
CALL 0x00128330
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001698b0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x00169837
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016989a
LAB_00169837:
LEA RAX,[0x3deeb0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x3deeb0]
LEA RDX,[0x1d98e8]
CALL RAX
CMP EAX,0x0
JNZ 0x0016986c
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00169874
LAB_0016986c:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00169874
LAB_00169874:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00169893
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001698b0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016989a
LAB_00169893:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016989a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int get_charset_number(int8 param_1,int4 param_2,ulong param_3)
{
int iVar1;
char *local_40;
int local_c;
local_40 = "utf8mb4";
if ((param_3 & 0x400) != 0) {
local_40 = "utf8mb3";
}
pthread_once(&charsets_initialized,init_available_charsets);
local_c = get_charset_number_internal(param_1,param_2);
if (local_c == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003def70 + 0x40))
(&my_charset_latin1,param_1,&DAT_001d98e8);
if (iVar1 != 0) {
local_40 = (char *)0x0;
}
if (local_40 == (char *)0x0) {
local_c = 0;
}
else {
local_c = get_charset_number_internal(local_40,param_2);
}
}
return local_c;
}
| |
34,308 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O3 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
leaq 0x360865(%rip), %rdi # 0x3ae330
leaq -0x20b(%rip), %rsi # 0x4d8c7
callq 0x28350
movq %r15, %rdi
movl %ebx, %esi
callq 0x4db38
testl %eax, %eax
jne 0x4db08
leaq 0x308274(%rip), %rdi # 0x355d60
movq 0xc0(%rdi), %rax
leaq 0x44c9e(%rip), %rdx # 0x92798
movq %r15, %rsi
callq *0x40(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4db13
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
btl $0xa, %r14d
leaq 0x44c71(%rip), %rax # 0x92790
leaq 0x44c62(%rip), %rdi # 0x92788
cmovaeq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4db38
| get_charset_number:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov ebx, esi
mov r15, rdi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, r15
mov esi, ebx
call get_charset_number_internal
test eax, eax
jnz short loc_4DB08
lea rdi, my_charset_latin1
mov rax, [rdi+0C0h]
lea rdx, aUtf8; "utf8"
mov rsi, r15
call qword ptr [rax+40h]
mov ecx, eax
xor eax, eax
test ecx, ecx
jz short loc_4DB13
loc_4DB08:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4DB13:
bt r14d, 0Ah
lea rax, aUtf8mb4; "utf8mb4"
lea rdi, aUtf8mb3; "utf8mb3"
cmovnb rdi, rax
mov esi, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short $+2
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
long long result; // rax
int v5; // ecx
const char *v6; // rdi
pthread_once(&charsets_initialized, init_available_charsets);
result = get_charset_number_internal(a1, a2);
if ( !(_DWORD)result )
{
v5 = (*(long long ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8");
result = 0LL;
if ( !v5 )
{
v6 = "utf8mb3";
if ( (a3 & 0x400) == 0 )
v6 = "utf8mb4";
return get_charset_number_internal(v6, a2);
}
}
return result;
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBX,ESI
MOV R15,RDI
LEA RDI,[0x4ae330]
LEA RSI,[0x14d8c7]
CALL 0x00128350
MOV RDI,R15
MOV ESI,EBX
CALL 0x0014db38
TEST EAX,EAX
JNZ 0x0014db08
LEA RDI,[0x455d60]
MOV RAX,qword ptr [RDI + 0xc0]
LEA RDX,[0x192798]
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JZ 0x0014db13
LAB_0014db08:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014db13:
BT R14D,0xa
LEA RAX,[0x192790]
LEA RDI,[0x192788]
CMOVNC RDI,RAX
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0014db38
|
int8 get_charset_number(int8 param_1,int4 param_2,uint param_3)
{
int iVar1;
int8 uVar2;
char *pcVar3;
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_charset_number_internal(param_1,param_2);
if ((int)uVar2 == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00455e20 + 0x40))
(&my_charset_latin1,param_1,&DAT_00192798);
uVar2 = 0;
if (iVar1 == 0) {
pcVar3 = "utf8mb3";
if ((param_3 >> 10 & 1) == 0) {
pcVar3 = "utf8mb4";
}
uVar2 = get_charset_number_internal(pcVar3,param_2);
return uVar2;
}
}
return uVar2;
}
| |
34,309 | ma_enlarge_root | eloqsql/storage/maria/ma_write.c | my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root)
{
uint t_length, nod_flag;
MARIA_KEY_PARAM s_temp;
MARIA_SHARE *share= info->s;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool res= 0;
DBUG_ENTER("_ma_enlarge_root");
page.info= info;
page.keyinfo= keyinfo;
page.buff= info->buff;
page.flag= 0;
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
/* Store pointer to prev page if nod */
_ma_kpointer(info, page.buff + share->keypage_header, *root);
t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
page.size= share->keypage_header + t_length + nod_flag;
bzero(page.buff, share->keypage_header);
_ma_store_keynr(share, page.buff, keyinfo->key_nr);
if (nod_flag)
page.flag|= KEYPAGE_FLAG_ISNOD;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
page.flag|= KEYPAGE_FLAG_HAS_TRANSID;
(*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header +
nod_flag, &s_temp);
/* Mark that info->buff was used */
info->keyread_buff_used= info->page_changed= 1;
if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(1);
*root= page.pos;
page_store_info(share, &page);
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(page.buff + page.size, share->block_size - page.size);
if (share->now_transactional && _ma_log_new(&page, 1))
res= 1;
if (_ma_write_keypage(&page, page_link->write_lock,
PAGECACHE_PRIORITY_HIGH))
res= 1;
DBUG_RETURN(res);
} | O3 | c | ma_enlarge_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r15
movq (%rdi), %rbx
leaq -0xa8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x8(%rsi), %rax
movq %rdi, -0x90(%rbp)
movq %rax, -0x38(%rbp)
movq %rax, -0x88(%rbp)
movq 0x378(%rdi), %r12
movq %r12, -0x80(%rbp)
movl $0x0, -0x64(%rbp)
movq %rdx, -0x48(%rbp)
movq (%rdx), %rdx
movq $0x0, -0x30(%rbp)
movl $0x0, %r14d
cmpq $-0x1, %rdx
je 0x64e47
movl 0x3e4(%rbx), %r14d
movl 0x744(%rbx), %esi
addq %r12, %rsi
movq %rdi, -0x58(%rbp)
callq 0x56ea5
leaq -0xf8(%rbp), %r9
movq %r15, -0x50(%rbp)
movq %r15, %rdi
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r15
movq -0x38(%rbp), %r13
callq *0xf0(%r13)
movl %eax, %ebx
movl 0x744(%r15), %edx
addl %r14d, %ebx
addl %edx, %ebx
movl %ebx, -0x70(%rbp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x292c0
movb 0xa5(%r13), %al
movl 0x744(%r15), %ecx
addl $-0x4, %ecx
movb %al, (%r12,%rcx)
testl %r14d, %r14d
je 0x64ec4
movl $0x1, -0x64(%rbp)
movl $0x1, %eax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rax
testb $0x18, 0x1a(%rax)
je 0x64edc
movq -0x30(%rbp), %rax
orl $0x2, %eax
movq %rax, -0x30(%rbp)
movl %eax, -0x64(%rbp)
movl 0x744(%r15), %eax
movl %r14d, %esi
addq %r12, %rsi
addq %rax, %rsi
leaq -0xf8(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq *0xf8(%rdi)
movq -0x58(%rbp), %rdi
movw $0x101, 0x684(%rdi) # imm = 0x101
leaq -0x40(%rbp), %rdx
movl $0x6, %esi
callq 0x5920f
movq %rax, -0x78(%rbp)
cmpq $-0x1, %rax
je 0x64fb4
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movl 0x744(%r15), %eax
addl $-0x3, %eax
movq -0x30(%rbp), %rcx
movq %r12, %rdx
movb %cl, (%r12,%rax)
movl 0x744(%r15), %eax
movb %bl, -0x1(%r12,%rax)
movl 0x744(%r15), %eax
movb %bh, -0x2(%rdx,%rax)
movl %ebx, %edi
addq %r12, %rdi
movl 0x7bc(%r15), %edx
subl %ebx, %edx
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x292c0
cmpb $0x0, 0x7e7(%r15)
je 0x64f8d
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x64fc8
movl %eax, %ebx
movq -0x40(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0x90(%rbp), %rdi
movl $0x6, %edx
callq 0x58f25
testb %al, %al
movzbl %bl, %ecx
movl $0x1, %eax
cmovel %ecx, %eax
jmp 0x64fb6
movb $0x1, %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_enlarge_root:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r15, rsi
mov rbx, [rdi]
lea rax, [rbp+var_A8]
mov [rbp+var_40], rax
mov rax, [rsi+8]
mov [rbp+var_90], rdi
mov [rbp+var_38], rax
mov [rbp+var_88], rax
mov r12, [rdi+378h]
mov [rbp+var_80], r12
mov [rbp+var_64], 0
mov [rbp+var_48], rdx
mov rdx, [rdx]
mov [rbp+var_30], 0
mov r14d, 0
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_64E47
mov r14d, [rbx+3E4h]
loc_64E47:
mov esi, [rbx+744h]
add rsi, r12
mov [rbp+var_58], rdi
call _ma_kpointer
lea r9, [rbp+var_F8]
mov [rbp+var_50], r15
mov rdi, r15
mov esi, r14d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
mov r15, rbx
mov r13, [rbp+var_38]
call qword ptr [r13+0F0h]
mov ebx, eax
mov edx, [r15+744h]
add ebx, r14d
add ebx, edx
mov [rbp+var_70], ebx
mov rdi, r12
xor esi, esi
call _memset
mov al, [r13+0A5h]
mov ecx, [r15+744h]
add ecx, 0FFFFFFFCh
mov [r12+rcx], al
test r14d, r14d
jz short loc_64EC4
mov [rbp+var_64], 1
mov eax, 1
mov [rbp+var_30], rax
loc_64EC4:
mov rax, [rbp+var_50]
test byte ptr [rax+1Ah], 18h
jz short loc_64EDC
mov rax, [rbp+var_30]
or eax, 2
mov [rbp+var_30], rax
mov [rbp+var_64], eax
loc_64EDC:
mov eax, [r15+744h]
mov esi, r14d
add rsi, r12
add rsi, rax
lea rdx, [rbp+var_F8]
mov rdi, [rbp+var_38]
call qword ptr [rdi+0F8h]
mov rdi, [rbp+var_58]
mov word ptr [rdi+684h], 101h
lea rdx, [rbp+var_40]
mov esi, 6
call _ma_new
mov [rbp+var_78], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_64FB4
mov rcx, [rbp+var_48]
mov [rcx], rax
mov eax, [r15+744h]
add eax, 0FFFFFFFDh
mov rcx, [rbp+var_30]
mov rdx, r12
mov [r12+rax], cl
mov eax, [r15+744h]
mov [r12+rax-1], bl
mov eax, [r15+744h]
mov [rdx+rax-2], bh
mov edi, ebx
add rdi, r12
mov edx, [r15+7BCh]
sub edx, ebx
xor ebx, ebx
xor esi, esi
call _memset
cmp byte ptr [r15+7E7h], 0
jz short loc_64F8D
lea rdi, [rbp+var_90]
mov esi, 1
call _ma_log_new
mov ebx, eax
loc_64F8D:
mov rax, [rbp+var_40]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_90]
mov edx, 6
call _ma_write_keypage
test al, al
movzx ecx, bl
mov eax, 1
cmovz eax, ecx
jmp short loc_64FB6
loc_64FB4:
mov al, 1
loc_64FB6:
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ma_enlarge_root(long long *a1, long long a2, unsigned long long *a3)
{
long long v4; // rbx
long long *v5; // rax
long long *v6; // r12
unsigned long long v7; // rdx
unsigned int v8; // r14d
long long v9; // rsi
long long v10; // rdi
long long v11; // r15
long long *v12; // r13
int v13; // eax
long long v14; // rdx
unsigned int v15; // ebx
long long *v16; // rdi
long long *v17; // rax
char *v18; // rdi
long long v19; // rdx
char v20; // bl
bool v21; // zf
char result; // al
_BYTE v23[80]; // [rsp+8h] [rbp-F8h] BYREF
char v24; // [rsp+58h] [rbp-A8h] BYREF
long long *v25[4]; // [rsp+70h] [rbp-90h] BYREF
unsigned int v26; // [rsp+90h] [rbp-70h]
int v27; // [rsp+9Ch] [rbp-64h]
long long *v28; // [rsp+A8h] [rbp-58h]
long long v29; // [rsp+B0h] [rbp-50h]
_QWORD *v30; // [rsp+B8h] [rbp-48h]
char *v31; // [rsp+C0h] [rbp-40h] BYREF
long long *v32; // [rsp+C8h] [rbp-38h]
long long v33; // [rsp+D0h] [rbp-30h]
v4 = *a1;
v31 = &v24;
v5 = *(long long **)(a2 + 8);
v25[0] = a1;
v32 = v5;
v25[1] = v5;
v6 = (long long *)a1[111];
v25[2] = v6;
v27 = 0;
v30 = a3;
v7 = *a3;
v33 = 0LL;
v8 = 0;
if ( v7 != -1LL )
v8 = *(_DWORD *)(v4 + 996);
v9 = (long long)v6 + *(unsigned int *)(v4 + 1860);
v28 = a1;
ma_kpointer((long long)a1, v9, v7);
v29 = a2;
v10 = a2;
v11 = v4;
v12 = v32;
v13 = ((long long ( *)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))v32[30])(v10, v8, 0LL, 0LL, 0LL, v23);
v14 = *(unsigned int *)(v4 + 1860);
v15 = v14 + v8 + v13;
v26 = v15;
memset(v6, 0LL, v14);
*((_BYTE *)v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 4)) = *((_BYTE *)v12 + 165);
if ( v8 )
{
v27 = 1;
v33 = 1LL;
}
if ( (*(_BYTE *)(v29 + 26) & 0x18) != 0 )
{
v33 = (unsigned int)v33 | 2;
v27 = v33;
}
((void ( *)(long long *, char *, _BYTE *))v32[31])(v32, (char *)v6 + v8 + *(unsigned int *)(v11 + 1860), v23);
v16 = v28;
*((_WORD *)v28 + 834) = 257;
v17 = (long long *)ma_new(v16, 6, &v31);
v25[3] = v17;
if ( v17 == (long long *)-1LL )
return 1;
*v30 = v17;
*((_BYTE *)v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 3)) = v33;
*((_BYTE *)v6 + *(unsigned int *)(v11 + 1860) - 1) = v15;
*((_BYTE *)v6 + *(unsigned int *)(v11 + 1860) - 2) = BYTE1(v15);
v18 = (char *)v6 + v15;
v19 = *(_DWORD *)(v11 + 1980) - v15;
v20 = 0;
memset(v18, 0LL, v19);
if ( *(_BYTE *)(v11 + 2023) )
v20 = ma_log_new(v25, 1LL);
v21 = (unsigned __int8)ma_write_keypage(v25, *((_DWORD *)v31 + 3), 6) == 0;
result = 1;
if ( v21 )
return v20;
return result;
}
| _ma_enlarge_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R15,RSI
MOV RBX,qword ptr [RDI]
LEA RAX,[RBP + -0xa8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x90],RDI
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x88],RAX
MOV R12,qword ptr [RDI + 0x378]
MOV qword ptr [RBP + -0x80],R12
MOV dword ptr [RBP + -0x64],0x0
MOV qword ptr [RBP + -0x48],RDX
MOV RDX,qword ptr [RDX]
MOV qword ptr [RBP + -0x30],0x0
MOV R14D,0x0
CMP RDX,-0x1
JZ 0x00164e47
MOV R14D,dword ptr [RBX + 0x3e4]
LAB_00164e47:
MOV ESI,dword ptr [RBX + 0x744]
ADD RSI,R12
MOV qword ptr [RBP + -0x58],RDI
CALL 0x00156ea5
LEA R9,[RBP + -0xf8]
MOV qword ptr [RBP + -0x50],R15
MOV RDI,R15
MOV ESI,R14D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
MOV R15,RBX
MOV R13,qword ptr [RBP + -0x38]
CALL qword ptr [R13 + 0xf0]
MOV EBX,EAX
MOV EDX,dword ptr [R15 + 0x744]
ADD EBX,R14D
ADD EBX,EDX
MOV dword ptr [RBP + -0x70],EBX
MOV RDI,R12
XOR ESI,ESI
CALL 0x001292c0
MOV AL,byte ptr [R13 + 0xa5]
MOV ECX,dword ptr [R15 + 0x744]
ADD ECX,-0x4
MOV byte ptr [R12 + RCX*0x1],AL
TEST R14D,R14D
JZ 0x00164ec4
MOV dword ptr [RBP + -0x64],0x1
MOV EAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00164ec4:
MOV RAX,qword ptr [RBP + -0x50]
TEST byte ptr [RAX + 0x1a],0x18
JZ 0x00164edc
MOV RAX,qword ptr [RBP + -0x30]
OR EAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x64],EAX
LAB_00164edc:
MOV EAX,dword ptr [R15 + 0x744]
MOV ESI,R14D
ADD RSI,R12
ADD RSI,RAX
LEA RDX,[RBP + -0xf8]
MOV RDI,qword ptr [RBP + -0x38]
CALL qword ptr [RDI + 0xf8]
MOV RDI,qword ptr [RBP + -0x58]
MOV word ptr [RDI + 0x684],0x101
LEA RDX,[RBP + -0x40]
MOV ESI,0x6
CALL 0x0015920f
MOV qword ptr [RBP + -0x78],RAX
CMP RAX,-0x1
JZ 0x00164fb4
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],RAX
MOV EAX,dword ptr [R15 + 0x744]
ADD EAX,-0x3
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,R12
MOV byte ptr [R12 + RAX*0x1],CL
MOV EAX,dword ptr [R15 + 0x744]
MOV byte ptr [R12 + RAX*0x1 + -0x1],BL
MOV EAX,dword ptr [R15 + 0x744]
MOV byte ptr [RDX + RAX*0x1 + -0x2],BH
MOV EDI,EBX
ADD RDI,R12
MOV EDX,dword ptr [R15 + 0x7bc]
SUB EDX,EBX
XOR EBX,EBX
XOR ESI,ESI
CALL 0x001292c0
CMP byte ptr [R15 + 0x7e7],0x0
JZ 0x00164f8d
LEA RDI,[RBP + -0x90]
MOV ESI,0x1
CALL 0x00164fc8
MOV EBX,EAX
LAB_00164f8d:
MOV RAX,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0x90]
MOV EDX,0x6
CALL 0x00158f25
TEST AL,AL
MOVZX ECX,BL
MOV EAX,0x1
CMOVZ EAX,ECX
JMP 0x00164fb6
LAB_00164fb4:
MOV AL,0x1
LAB_00164fb6:
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_enlarge_root(long *param_1,long param_2,long *param_3)
{
long lVar1;
void *__s;
long lVar2;
char cVar3;
int iVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
int1 local_100 [80];
int1 local_b0 [24];
long *local_98;
long local_90;
void *local_88;
long local_80;
uint local_78;
uint local_6c;
long *local_60;
long local_58;
long *local_50;
int1 *local_48;
long local_40;
ulong local_38;
lVar1 = *param_1;
local_48 = local_b0;
local_90 = *(long *)(param_2 + 8);
__s = (void *)param_1[0x6f];
local_6c = 0;
local_38 = 0;
uVar7 = 0;
if (*param_3 != -1) {
uVar7 = *(uint *)(lVar1 + 0x3e4);
}
local_98 = param_1;
local_88 = __s;
local_60 = param_1;
local_50 = param_3;
local_40 = local_90;
_ma_kpointer(param_1,(ulong)*(uint *)(lVar1 + 0x744) + (long)__s);
lVar2 = local_40;
local_58 = param_2;
iVar4 = (**(code **)(local_40 + 0xf0))(param_2,uVar7,0,0,0,local_100);
uVar6 = iVar4 + uVar7 + *(uint *)(lVar1 + 0x744);
local_78 = uVar6;
memset(__s,0,(ulong)*(uint *)(lVar1 + 0x744));
*(int1 *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = *(int1 *)(lVar2 + 0xa5);
if (uVar7 != 0) {
local_6c = 1;
local_38 = 1;
}
if ((*(byte *)(local_58 + 0x1a) & 0x18) != 0) {
local_6c = (uint)local_38 | 2;
local_38 = (ulong)local_6c;
}
(**(code **)(local_40 + 0xf8))
(local_40,(long)__s + (ulong)*(uint *)(lVar1 + 0x744) + (ulong)uVar7,local_100);
*(int2 *)((long)local_60 + 0x684) = 0x101;
local_80 = _ma_new(local_60,6,&local_48);
if (local_80 == -1) {
uVar5 = 0xffffffffffffff01;
}
else {
*local_50 = local_80;
*(char *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 3)) = (char)local_38;
*(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)uVar6;
*(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)(uVar6 >> 8);
uVar7 = 0;
memset((void *)((ulong)uVar6 + (long)__s),0,(ulong)(*(int *)(lVar1 + 0x7bc) - uVar6));
if (*(char *)(lVar1 + 0x7e7) != '\0') {
uVar7 = _ma_log_new(&local_98,1);
}
cVar3 = _ma_write_keypage(&local_98,*(int4 *)(local_48 + 0xc),6);
uVar5 = 1;
if (cVar3 == '\0') {
uVar5 = (ulong)(uVar7 & 0xff);
}
}
return uVar5;
}
| |
34,310 | ftxui::operator|(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/util.cpp | Elements operator|(Elements elements, Decorator decorator) { // NOLINT
Elements output;
output.reserve(elements.size());
for (auto& it : elements) {
output.push_back(std::move(it) | decorator);
}
return output;
} | O2 | cpp | ftxui::operator|(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
sarq $0x4, %rsi
callq 0x20d36
movq (%r14), %r12
movq 0x8(%r14), %r14
leaq 0x28(%rsp), %r13
leaq 0x18(%rsp), %rbp
cmpq %r14, %r12
je 0x20841
movups (%r12), %xmm0
andq $0x0, 0x8(%r12)
movaps %xmm0, (%rsp)
andq $0x0, (%r12)
movq %r13, %rdi
movq %r15, %rsi
callq 0x20dca
movq %rbp, %rdi
movq %rsp, %rsi
movq %r13, %rdx
callq 0x20893
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x13c72
leaq 0x20(%rsp), %rdi
callq 0x13452
movq %r13, %rdi
callq 0x13b10
leaq 0x8(%rsp), %rdi
callq 0x13452
addq $0x10, %r12
jmp 0x207e2
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x20883
movq %rax, %r14
jmp 0x20879
movq %rax, %r14
jmp 0x2086f
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x13452
leaq 0x28(%rsp), %rdi
callq 0x13b10
leaq 0x8(%rsp), %rdi
callq 0x13452
movq %rbx, %rdi
callq 0x13b2c
movq %r14, %rdi
callq 0xc7f0
| _ZN5ftxuiorESt6vectorISt10shared_ptrINS_4NodeEESaIS3_EESt8functionIFS3_S3_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rsi, [rsi+8]
sub rsi, [r14]
sar rsi, 4
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE7reserveEm; std::vector<std::shared_ptr<ftxui::Node>>::reserve(ulong)
mov r12, [r14]
mov r14, [r14+8]
lea r13, [rsp+78h+var_50]
lea rbp, [rsp+78h+var_60]
loc_207E2:
cmp r12, r14
jz short loc_20841
movups xmm0, xmmword ptr [r12]
and qword ptr [r12+8], 0
movaps [rsp+78h+var_78], xmm0
and qword ptr [r12], 0
mov rdi, r13
mov rsi, r15
call _ZNSt8functionIFSt10shared_ptrIN5ftxui4NodeEES3_EEC2ERKS5_; std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::function(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)> const&)
mov rdi, rbp
mov rsi, rsp
mov rdx, r13
call _ZN5ftxuiorESt10shared_ptrINS_4NodeEESt8functionIFS2_S2_EE; ftxui::operator|(std::shared_ptr<ftxui::Node>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)
mov rdi, rbx
mov rsi, rbp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&)
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r13; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+78h+var_78+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
add r12, 10h
jmp short loc_207E2
loc_20841:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
jmp short loc_20883
mov r14, rax
jmp short loc_20879
mov r14, rax
jmp short loc_2086F
mov r14, rax
lea rdi, [rsp+arg_18]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_2086F:
lea rdi, [rsp+arg_20]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_20879:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_20883:
mov rdi, rbx
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long ftxui::operator|(long long a1, __int128 **a2, long long a3)
{
__int128 *v4; // r12
__int128 *v5; // r14
__int128 v6; // xmm0
__int128 v8; // [rsp+0h] [rbp-78h] BYREF
__int128 v9; // [rsp+18h] [rbp-60h] BYREF
_BYTE v10[80]; // [rsp+28h] [rbp-50h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<std::shared_ptr<ftxui::Node>>::reserve(a1, a2[1] - *a2);
v4 = *a2;
v5 = a2[1];
while ( v4 != v5 )
{
v6 = *v4;
*((_QWORD *)v4 + 1) = 0LL;
v8 = v6;
*(_QWORD *)v4 = 0LL;
std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::function(v10, a3);
ftxui::operator|(&v9, &v8);
std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v9 + 1);
std::_Function_base::~_Function_base((std::_Function_base *)v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v8 + 1);
++v4;
}
return a1;
}
| operator|:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RSI + 0x8]
SUB RSI,qword ptr [R14]
SAR RSI,0x4
LAB_001207cc:
CALL 0x00120d36
MOV R12,qword ptr [R14]
MOV R14,qword ptr [R14 + 0x8]
LEA R13,[RSP + 0x28]
LEA RBP,[RSP + 0x18]
LAB_001207e2:
CMP R12,R14
JZ 0x00120841
MOVUPS XMM0,xmmword ptr [R12]
AND qword ptr [R12 + 0x8],0x0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [R12],0x0
LAB_001207fb:
MOV RDI,R13
MOV RSI,R15
CALL 0x00120dca
LAB_00120806:
MOV RDI,RBP
MOV RSI,RSP
MOV RDX,R13
CALL 0x00120893
LAB_00120814:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00113c72
LAB_0012081f:
LEA RDI,[RSP + 0x20]
CALL 0x00113452
MOV RDI,R13
CALL 0x00113b10
LEA RDI,[RSP + 0x8]
CALL 0x00113452
ADD R12,0x10
JMP 0x001207e2
LAB_00120841:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::vector<std::shared_ptr<ftxui::Node>,
std::allocator<std::shared_ptr<ftxui::Node> > >, std::function<std::shared_ptr<ftxui::Node>
(std::shared_ptr<ftxui::Node>)>) */
ftxui * __thiscall ftxui::operator|(ftxui *this,long *param_2,function *param_3)
{
int8 *puVar1;
int8 *puVar2;
int8 local_78;
int8 auStack_70 [2];
shared_ptr local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8];
function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)> local_50 [32];
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
/* try { // try from 001207cc to 001207d0 has its CatchHandler @ 00120853 */
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::reserve
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
this,param_2[1] - *param_2 >> 4);
puVar1 = (int8 *)param_2[1];
for (puVar2 = (int8 *)*param_2; puVar2 != puVar1; puVar2 = puVar2 + 2) {
local_78 = *puVar2;
auStack_70[0] = puVar2[1];
puVar2[1] = 0;
*puVar2 = 0;
/* try { // try from 001207fb to 00120805 has its CatchHandler @ 00120858 */
std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>::function
(local_50,param_3);
/* try { // try from 00120806 to 00120813 has its CatchHandler @ 0012085d */
operator|((ftxui *)local_60,&local_78,local_50);
/* try { // try from 00120814 to 0012081e has its CatchHandler @ 00120862 */
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
emplace_back<std::shared_ptr<ftxui::Node>>
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
this,local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::_Function_base::~_Function_base((_Function_base *)local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_70);
}
return this;
}
| |
34,311 | js_realloc_rt | bluesky950520[P]quickjs/quickjs.c | void *js_realloc_rt(JSRuntime *rt, void *ptr, size_t size)
{
size_t old_size;
JSMallocState *s;
if (!ptr) {
if (size == 0)
return NULL;
return js_malloc_rt(rt, size);
}
if (unlikely(size == 0)) {
js_free_rt(rt, ptr);
return NULL;
}
old_size = rt->mf.js_malloc_usable_size(ptr);
s = &rt->malloc_state;
/* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */
if (s->malloc_size + size - old_size > s->malloc_limit - 1)
return NULL;
ptr = rt->mf.js_realloc(s->opaque, ptr, size);
if (!ptr)
return NULL;
s->malloc_size += rt->mf.js_malloc_usable_size(ptr) - old_size;
return ptr;
} | O1 | c | js_realloc_rt:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1cb20
movq %rsi, %r15
testq %r14, %r14
je 0x1cb4d
movq %r15, %rdi
callq *0x20(%rbx)
movq %rax, %r12
movq %r14, %rax
subq %r12, %rax
addq 0x30(%rbx), %rax
movq 0x38(%rbx), %rcx
decq %rcx
cmpq %rcx, %rax
ja 0x1cb25
movq 0x40(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x18(%rbx)
testq %rax, %rax
je 0x1cb25
movq %rax, %r14
movq %rax, %rdi
callq *0x20(%rbx)
subq %r12, %rax
addq %rax, 0x30(%rbx)
jmp 0x1cb28
testq %r14, %r14
jne 0x1cb37
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xed69
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12de4
jmp 0x1cb25
| js_realloc_rt:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov rbx, rdi
test rsi, rsi
jz short loc_1CB20
mov r15, rsi
test r14, r14
jz short loc_1CB4D
mov rdi, r15
call qword ptr [rbx+20h]
mov r12, rax
mov rax, r14
sub rax, r12
add rax, [rbx+30h]
mov rcx, [rbx+38h]
dec rcx
cmp rax, rcx
ja short loc_1CB25
mov rdi, [rbx+40h]
mov rsi, r15
mov rdx, r14
call qword ptr [rbx+18h]
test rax, rax
jz short loc_1CB25
mov r14, rax
mov rdi, rax
call qword ptr [rbx+20h]
sub rax, r12
add [rbx+30h], rax
jmp short loc_1CB28
loc_1CB20:
test r14, r14
jnz short loc_1CB37
loc_1CB25:
xor r14d, r14d
loc_1CB28:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_1CB37:
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp js_malloc_rt
loc_1CB4D:
mov rdi, rbx
mov rsi, r15
call js_realloc_rt_cold_1
jmp short loc_1CB25
| long long js_realloc_rt(long long a1, long long a2, long long a3)
{
long long v4; // r12
long long v5; // rax
long long v6; // r14
if ( a2 )
{
if ( a3 )
{
v4 = (*(long long ( **)(long long))(a1 + 32))(a2);
if ( *(_QWORD *)(a1 + 48) + a3 - v4 <= (unsigned long long)(*(_QWORD *)(a1 + 56) - 1LL) )
{
v5 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 24))(*(_QWORD *)(a1 + 64), a2, a3);
if ( v5 )
{
v6 = v5;
*(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v5) - v4;
return v6;
}
}
}
else
{
js_realloc_rt_cold_1(a1, a2);
}
return 0LL;
}
if ( !a3 )
return 0LL;
return js_malloc_rt(a1, a3);
}
| js_realloc_rt:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RDI
TEST RSI,RSI
JZ 0x0011cb20
MOV R15,RSI
TEST R14,R14
JZ 0x0011cb4d
MOV RDI,R15
CALL qword ptr [RBX + 0x20]
MOV R12,RAX
MOV RAX,R14
SUB RAX,R12
ADD RAX,qword ptr [RBX + 0x30]
MOV RCX,qword ptr [RBX + 0x38]
DEC RCX
CMP RAX,RCX
JA 0x0011cb25
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R15
MOV RDX,R14
CALL qword ptr [RBX + 0x18]
TEST RAX,RAX
JZ 0x0011cb25
MOV R14,RAX
MOV RDI,RAX
CALL qword ptr [RBX + 0x20]
SUB RAX,R12
ADD qword ptr [RBX + 0x30],RAX
JMP 0x0011cb28
LAB_0011cb20:
TEST R14,R14
JNZ 0x0011cb37
LAB_0011cb25:
XOR R14D,R14D
LAB_0011cb28:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0011cb37:
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0010ed69
LAB_0011cb4d:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00112de4
JMP 0x0011cb25
|
long js_realloc_rt(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
long lVar3;
if (param_2 == 0) {
if (param_3 != 0) {
lVar1 = js_malloc_rt(param_1,param_3);
return lVar1;
}
}
else if (param_3 == 0) {
js_realloc_rt_cold_1(param_1,param_2);
}
else {
lVar1 = (**(code **)(param_1 + 0x20))(param_2);
if (((ulong)((param_3 - lVar1) + *(long *)(param_1 + 0x30)) <= *(long *)(param_1 + 0x38) - 1U)
&& (lVar2 = (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x40),param_2,param_3),
lVar2 != 0)) {
lVar3 = (**(code **)(param_1 + 0x20))(lVar2);
*(long *)(param_1 + 0x30) = *(long *)(param_1 + 0x30) + (lVar3 - lVar1);
return lVar2;
}
}
return 0;
}
| |
34,312 | JS_GetFunctionBytecode | bluesky950520[P]quickjs/quickjs.c | static JSFunctionBytecode *JS_GetFunctionBytecode(JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return NULL;
p = JS_VALUE_GET_OBJ(val);
if (!js_class_has_bytecode(p->class_id))
return NULL;
return p->u.func.function_bytecode;
} | O0 | c | JS_GetFunctionBytecode:
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpl $-0x1, %eax
je 0x5fce3
movq $0x0, 0x20(%rsp)
jmp 0x5fd19
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %edi
callq 0x4a240
cmpl $0x0, %eax
jne 0x5fd0b
movq $0x0, 0x20(%rsp)
jmp 0x5fd19
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_GetFunctionBytecode:
sub rsp, 28h
mov [rsp+28h+var_18], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_5FCE3
mov [rsp+28h+var_8], 0
jmp short loc_5FD19
loc_5FCE3:
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
movzx edi, word ptr [rax+6]
call js_class_has_bytecode
cmp eax, 0
jnz short loc_5FD0B
mov [rsp+28h+var_8], 0
jmp short loc_5FD19
loc_5FD0B:
mov rax, [rsp+28h+var_20]
mov rax, [rax+30h]
mov [rsp+28h+var_8], rax
loc_5FD19:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long JS_GetFunctionBytecode(long long a1, int a2)
{
if ( a2 != -1 )
return 0LL;
if ( js_class_has_bytecode(*(unsigned __int16 *)(a1 + 6)) )
return *(_QWORD *)(a1 + 48);
return 0LL;
}
| JS_GetFunctionBytecode:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
CMP EAX,-0x1
JZ 0x0015fce3
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0015fd19
LAB_0015fce3:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EDI,word ptr [RAX + 0x6]
CALL 0x0014a240
CMP EAX,0x0
JNZ 0x0015fd0b
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0015fd19
LAB_0015fd0b:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x20],RAX
LAB_0015fd19:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
int8 JS_GetFunctionBytecode(long param_1,int param_2)
{
int iVar1;
int8 local_8;
if (param_2 == -1) {
iVar1 = js_class_has_bytecode(*(int2 *)(param_1 + 6));
if (iVar1 == 0) {
local_8 = 0;
}
else {
local_8 = *(int8 *)(param_1 + 0x30);
}
}
else {
local_8 = 0;
}
return local_8;
}
| |
34,313 | JS_GetFunctionBytecode | bluesky950520[P]quickjs/quickjs.c | static JSFunctionBytecode *JS_GetFunctionBytecode(JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return NULL;
p = JS_VALUE_GET_OBJ(val);
if (!js_class_has_bytecode(p->class_id))
return NULL;
return p->u.func.function_bytecode;
} | O2 | c | JS_GetFunctionBytecode:
cmpl $-0x1, %edx
jne 0x31320
movzwl 0x6(%rsi), %eax
cmpq $0x38, %rax
ja 0x31320
movabsq $0x110000000012000, %rcx # imm = 0x110000000012000
btq %rax, %rcx
jae 0x31320
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x31320
movzwl 0x18(%rax), %eax
andl $0x3, %eax
cmpw $0x2, %ax
jne 0x31320
pushq $0x3
popq %rdx
jmp 0x31336
pushq %rax
leaq 0x574bb(%rip), %rsi # 0x887e3
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
addq $0x8, %rsp
xorl %eax, %eax
retq
| js_function_proto_caller:
cmp edx, 0FFFFFFFFh
jnz short loc_31320
movzx eax, word ptr [rsi+6]
cmp rax, 38h ; '8'
ja short loc_31320
mov rcx, 110000000012000h
bt rcx, rax
jnb short loc_31320
mov rax, [rsi+30h]
test rax, rax
jz short loc_31320
movzx eax, word ptr [rax+18h]
and eax, 3
cmp ax, 2
jnz short loc_31320
push 3
pop rdx
jmp short loc_31336
loc_31320:
push rax
lea rsi, aInvalidPropert; "invalid property access"
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
add rsp, 8
loc_31336:
xor eax, eax
retn
| long long js_function_proto_caller(
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)
{
unsigned long long v14; // rax
if ( (_DWORD)a3 != -1
|| (v14 = *(unsigned __int16 *)(a2 + 6), v14 > 0x38)
|| (a4 = 0x110000000012000LL, !_bittest64(&a4, v14))
|| (v14 = *(_QWORD *)(a2 + 48)) == 0
|| (LOWORD(v14) = *(_WORD *)(v14 + 24) & 3, (_WORD)v14 != 2) )
{
JS_ThrowTypeError(a1, (long long)"invalid property access", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
}
return 0LL;
}
| js_function_proto_caller:
CMP EDX,-0x1
JNZ 0x00131320
MOVZX EAX,word ptr [RSI + 0x6]
CMP RAX,0x38
JA 0x00131320
MOV RCX,0x110000000012000
BT RCX,RAX
JNC 0x00131320
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x00131320
MOVZX EAX,word ptr [RAX + 0x18]
AND EAX,0x3
CMP AX,0x2
JNZ 0x00131320
PUSH 0x3
POP RDX
JMP 0x00131336
LAB_00131320:
PUSH RAX
LEA RSI,[0x1887e3]
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
ADD RSP,0x8
LAB_00131336:
XOR EAX,EAX
RET
|
int1 [16] js_function_proto_caller(int8 param_1,long param_2,int param_3)
{
int1 auVar1 [16];
ulong uVar2;
if ((((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) &&
((*(long *)(param_2 + 0x30) != 0 && ((*(ushort *)(*(long *)(param_2 + 0x30) + 0x18) & 3) == 2))
)) {
uVar2 = 3;
}
else {
JS_ThrowTypeError(param_1,"invalid property access");
uVar2 = 6;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
| |
34,314 | my_setup_stacktrace | eloqsql/mysys/stacktrace.c | void my_setup_stacktrace(void)
{
struct sigaction sa;
sa.sa_flags = SA_RESETHAND | SA_NODEFER;
sigemptyset(&sa.sa_mask);
sa.sa_handler= default_handle_fatal_signal;
sigaction(SIGSEGV, &sa, NULL);
sigaction(SIGABRT, &sa, NULL);
#ifdef SIGBUS
sigaction(SIGBUS, &sa, NULL);
#endif
sigaction(SIGILL, &sa, NULL);
sigaction(SIGFPE, &sa, NULL);
} | O0 | c | my_setup_stacktrace:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0xc0000000, -0x10(%rbp) # imm = 0xC0000000
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x60910
leaq 0x87(%rip), %rax # 0xc5640
movq %rax, -0x98(%rbp)
movl $0xb, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60920
movl $0x6, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60920
movl $0x7, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60920
movl $0x4, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60920
movl $0x8, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x60920
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_setup_stacktrace:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], 0C0000000h
lea rdi, [rbp+var_98]
add rdi, 8
call _sigemptyset
lea rax, default_handle_fatal_signal
mov [rbp+var_98], rax
mov edi, 0Bh
lea rsi, [rbp+var_98]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 6
lea rsi, [rbp+var_98]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 7
lea rsi, [rbp+var_98]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 4
lea rsi, [rbp+var_98]
xor eax, eax
mov edx, eax
call _sigaction
mov edi, 8
lea rsi, [rbp+var_98]
xor eax, eax
mov edx, eax
call _sigaction
add rsp, 0A0h
pop rbp
retn
| long long my_setup_stacktrace()
{
long long ( *v1)(); // [rsp+8h] [rbp-98h] BYREF
_DWORD v2[36]; // [rsp+10h] [rbp-90h] BYREF
v2[32] = -1073741824;
sigemptyset(v2);
v1 = default_handle_fatal_signal;
sigaction(11LL, &v1, 0LL);
sigaction(6LL, &v1, 0LL);
sigaction(7LL, &v1, 0LL);
sigaction(4LL, &v1, 0LL);
return sigaction(8LL, &v1, 0LL);
}
| my_setup_stacktrace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV dword ptr [RBP + -0x10],0xc0000000
LEA RDI,[RBP + -0x98]
ADD RDI,0x8
CALL 0x00160910
LEA RAX,[0x1c5640]
MOV qword ptr [RBP + -0x98],RAX
MOV EDI,0xb
LEA RSI,[RBP + -0x98]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00160920
MOV EDI,0x6
LEA RSI,[RBP + -0x98]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00160920
MOV EDI,0x7
LEA RSI,[RBP + -0x98]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00160920
MOV EDI,0x4
LEA RSI,[RBP + -0x98]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00160920
MOV EDI,0x8
LEA RSI,[RBP + -0x98]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00160920
ADD RSP,0xa0
POP RBP
RET
|
void my_setup_stacktrace(void)
{
sigaction local_a0;
local_a0.sa_flags = -0x40000000;
sigemptyset(&local_a0.sa_mask);
local_a0.__sigaction_handler.sa_handler = default_handle_fatal_signal;
sigaction(0xb,&local_a0,(sigaction *)0x0);
sigaction(6,&local_a0,(sigaction *)0x0);
sigaction(7,&local_a0,(sigaction *)0x0);
sigaction(4,&local_a0,(sigaction *)0x0);
sigaction(8,&local_a0,(sigaction *)0x0);
return;
}
| |
34,315 | mi_ft_store | eloqsql/storage/myisam/ft_update.c | static int _mi_ft_store(MI_INFO *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
uint key_length;
DBUG_ENTER("_mi_ft_store");
for (; wlist->pos; wlist++)
{
key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos);
if (_mi_ck_write(info,keynr,(uchar*) keybuf,key_length))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | mi_ft_store:
xorl %eax, %eax
cmpq $0x0, (%rcx)
je 0x74e98
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x74d05
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
movl %eax, %ecx
callq 0x8896b
testl %eax, %eax
jne 0x74e85
cmpq $0x0, 0x18(%r12)
leaq 0x18(%r12), %r12
jne 0x74e4c
xorl %eax, %eax
jmp 0x74e8a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_store:
xor eax, eax
cmp qword ptr [rcx], 0
jz short locret_74E98
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r12, rcx
mov r15, rdx
mov r13d, esi
mov rbx, rdi
loc_74E4C:
mov rdi, rbx
mov esi, r13d
mov rdx, r15
mov rcx, r12
mov r8, r14
call _ft_make_key
mov rdi, rbx
mov esi, r13d
mov rdx, r15
mov ecx, eax
call _mi_ck_write
test eax, eax
jnz short loc_74E85
cmp qword ptr [r12+18h], 0
lea r12, [r12+18h]
jnz short loc_74E4C
xor eax, eax
jmp short loc_74E8A
loc_74E85:
mov eax, 1
loc_74E8A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_74E98:
retn
| long long mi_ft_store(long long a1, unsigned int a2, long long a3, _QWORD *a4, long long a5, __m128i a6)
{
long long result; // rax
long long i; // r12
unsigned int key; // eax
result = 0LL;
if ( *a4 )
{
for ( i = (long long)a4; ; i += 24LL )
{
key = ft_make_key(a1, a2, a3, i, a5, a6);
if ( (unsigned int)mi_ck_write(a1, a2, a3, key) )
break;
if ( *(_QWORD *)(i + 24) == 0LL )
return 0LL;
}
return 1LL;
}
return result;
}
| _mi_ft_store:
XOR EAX,EAX
CMP qword ptr [RCX],0x0
JZ 0x00174e98
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R12,RCX
MOV R15,RDX
MOV R13D,ESI
MOV RBX,RDI
LAB_00174e4c:
MOV RDI,RBX
MOV ESI,R13D
MOV RDX,R15
MOV RCX,R12
MOV R8,R14
CALL 0x00174d05
MOV RDI,RBX
MOV ESI,R13D
MOV RDX,R15
MOV ECX,EAX
CALL 0x0018896b
TEST EAX,EAX
JNZ 0x00174e85
CMP qword ptr [R12 + 0x18],0x0
LEA R12,[R12 + 0x18]
JNZ 0x00174e4c
XOR EAX,EAX
JMP 0x00174e8a
LAB_00174e85:
MOV EAX,0x1
LAB_00174e8a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00174e98:
RET
|
int8
_mi_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5,int8 param_6)
{
long *plVar1;
int4 uVar2;
int iVar3;
int8 uVar4;
if (*param_4 != 0) {
uVar4 = 0;
do {
uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5,param_6,uVar4);
iVar3 = _mi_ck_write(param_1,param_2,param_3,uVar2);
if (iVar3 != 0) {
return 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return 0;
}
| |
34,316 | 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>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_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>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x8a1e0
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b4f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x6195a
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x67cc7(%rip), %rsi # 0xf1ecb
leaq 0x10(%rsp), %rdi
callq 0x8a276
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x89334
xorl %ebp, %ebp
leaq 0xa1d19(%rip), %rsi # 0x12bf48
leaq -0x2c5ee(%rip), %rdx # 0x5dc48
movq %rbx, %rdi
callq 0x1c150
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a25c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1ba20
testb %bpl, %bpl
jne 0x8a266
jmp 0x8a26e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b770
movq %r14, %rdi
callq 0x1c1e0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_8A1E0
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_8A1E0:
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, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],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_8A25C
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A25C:
test bpl, bpl
jnz short loc_8A266
jmp short loc_8A26E
mov r14, rax
loc_8A266:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8A26E:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 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>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
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,
v4);
__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);
}
result = a1[8];
*a2 = result;
return result;
}
| 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],0x4
JNZ 0x0018a1e0
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0018a1e0:
MOV EDI,0x20
CALL 0x0011b4f0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016195a
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018a1fd:
LEA RSI,[0x1f1ecb]
LEA RDI,[RSP + 0x10]
CALL 0x0018a276
MOV BPL,0x1
LAB_0018a211:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00189334
XOR EBP,EBP
LEA RSI,[0x22bf48]
LEA RDX,[0x15dc48]
MOV RDI,RBX
CALL 0x0011c150
|
/* 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>::boolean_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,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
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 0018a1fd to 0018a20d has its CatchHandler @ 0018a263 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 0018a211 to 0018a23d has its CatchHandler @ 0018a23e */
_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);
}
| |
34,317 | loc_read_query_result(st_mysql*) | eloqsql/sql/sql_prepare.cc | static my_bool loc_read_query_result(MYSQL *mysql)
{
local_results *thd= (local_results *) mysql->thd;
MYSQL_DATA *res= thd->first_data;
DBUG_ASSERT(!thd->cur_data);
thd->first_data= res->embedded_info->next;
if (res->embedded_info->last_errno &&
!res->embedded_info->fields_list)
{
embedded_get_error(mysql, res);
return 1;
}
mysql->warning_count= res->embedded_info->warning_count;
mysql->server_status= res->embedded_info->server_status;
mysql->field_count= res->fields;
if (!(mysql->fields= res->embedded_info->fields_list))
{
mysql->affected_rows= res->embedded_info->affected_rows;
mysql->insert_id= res->embedded_info->insert_id;
}
net_clear_error(&mysql->net);
mysql->info= 0;
if (res->embedded_info->info[0])
{
strmake(mysql->info_buffer, res->embedded_info->info, MYSQL_ERRMSG_SIZE-1);
mysql->info= mysql->info_buffer;
}
if (res->embedded_info->fields_list)
{
mysql->status=MYSQL_STATUS_GET_RESULT;
thd->cur_data= res;
}
else
my_free(res);
return 0;
} | O0 | cpp | loc_read_query_result(st_mysql*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x4e0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5ebd89
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x230(%rax)
je 0x5ebdd6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x228(%rax)
jne 0x5ebdd6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5ebf00
movb $0x1, -0x1(%rbp)
jmp 0x5ebef6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x390(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x388(%rax)
movq -0x20(%rbp), %rax
movl 0x58(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x384(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x228(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x2f8(%rcx)
cmpq $0x0, %rax
jne 0x5ebe5f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x340(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x348(%rax)
movq -0x10(%rbp), %rdi
callq 0x89e7c0
movq -0x10(%rbp), %rax
movq $0x0, 0x2e0(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x28(%rax)
je 0x5ebebc
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x28, %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0xc8bfb0
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2e0(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x228(%rax)
je 0x5ebee9
movq -0x10(%rbp), %rax
movl $0x1, 0x490(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5ebef2
movq -0x20(%rbp), %rdi
callq 0xc1afa0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZL21loc_read_query_resultP8st_mysql:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+4E0h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_20], rax
jmp short $+2
loc_5EBD89:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
cmp dword ptr [rax+230h], 0
jz short loc_5EBDD6
mov rax, [rbp+var_20]
mov rax, [rax+8]
cmp qword ptr [rax+228h], 0
jnz short loc_5EBDD6
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call _ZL18embedded_get_errorP8st_mysqlP13st_mysql_data; embedded_get_error(st_mysql *,st_mysql_data *)
mov [rbp+var_1], 1
jmp loc_5EBEF6
loc_5EBDD6:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rax+8]
mov rax, [rbp+var_10]
mov [rax+390h], ecx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rax+0Ch]
mov rax, [rbp+var_10]
mov [rax+388h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+58h]
mov rax, [rbp+var_10]
mov [rax+384h], ecx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rax, [rax+228h]
mov rcx, [rbp+var_10]
mov [rcx+2F8h], rax
cmp rax, 0
jnz short loc_5EBE5F
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+340h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+348h], rcx
loc_5EBE5F:
mov rdi, [rbp+var_10]
call net_clear_error
mov rax, [rbp+var_10]
mov qword ptr [rax+2E0h], 0
mov rax, [rbp+var_20]
mov rax, [rax+8]
cmp byte ptr [rax+28h], 0
jz short loc_5EBEBC
mov rax, [rbp+var_10]
mov rdi, [rax+4F0h]
mov rax, [rbp+var_20]
mov rsi, [rax+8]
add rsi, 28h ; '('
mov edx, 1FFh
call strmake
mov rax, [rbp+var_10]
mov rcx, [rax+4F0h]
mov rax, [rbp+var_10]
mov [rax+2E0h], rcx
loc_5EBEBC:
mov rax, [rbp+var_20]
mov rax, [rax+8]
cmp qword ptr [rax+228h], 0
jz short loc_5EBEE9
mov rax, [rbp+var_10]
mov dword ptr [rax+490h], 1
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax], rcx
jmp short loc_5EBEF2
loc_5EBEE9:
mov rdi, [rbp+var_20]
call my_free
loc_5EBEF2:
mov [rbp+var_1], 0
loc_5EBEF6:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char loc_read_query_result(long long a1)
{
long long v1; // rax
long long v3; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+8h] [rbp-18h]
v4 = *(_QWORD **)(a1 + 1248);
v3 = v4[1];
v4[1] = *(_QWORD *)(*(_QWORD *)(v3 + 8) + 16LL);
if ( !*(_DWORD *)(*(_QWORD *)(v3 + 8) + 560LL) || *(_QWORD *)(*(_QWORD *)(v3 + 8) + 552LL) )
{
*(_DWORD *)(a1 + 912) = *(_DWORD *)(*(_QWORD *)(v3 + 8) + 8LL);
*(_DWORD *)(a1 + 904) = *(_DWORD *)(*(_QWORD *)(v3 + 8) + 12LL);
*(_DWORD *)(a1 + 900) = *(_DWORD *)(v3 + 88);
v1 = *(_QWORD *)(*(_QWORD *)(v3 + 8) + 552LL);
*(_QWORD *)(a1 + 760) = v1;
if ( !v1 )
{
*(_QWORD *)(a1 + 832) = *(_QWORD *)(*(_QWORD *)(v3 + 8) + 24LL);
*(_QWORD *)(a1 + 840) = *(_QWORD *)(*(_QWORD *)(v3 + 8) + 32LL);
}
net_clear_error(a1);
*(_QWORD *)(a1 + 736) = 0LL;
if ( *(_BYTE *)(*(_QWORD *)(v3 + 8) + 40LL) )
{
strmake(*(_QWORD *)(a1 + 1264), *(_QWORD *)(v3 + 8) + 40LL, 511LL);
*(_QWORD *)(a1 + 736) = *(_QWORD *)(a1 + 1264);
}
if ( *(_QWORD *)(*(_QWORD *)(v3 + 8) + 552LL) )
{
*(_DWORD *)(a1 + 1168) = 1;
*v4 = v3;
}
else
{
my_free(v3);
}
return 0;
}
else
{
embedded_get_error(a1, v3);
return 1;
}
}
| eq:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LEA RCX,[0x16bad2c]
MOV ESI,dword ptr [RCX]
LEA RCX,[0x16b2080]
LEA RDX,[0x16b1ef0]
CMP ESI,0x0
CMOVNZ RCX,RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x8]
MOV byte ptr [RBP + -0x19],AL
JNZ 0x005ebe29
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x18]
MOV byte ptr [RBP + -0x19],AL
JNZ 0x005ebe29
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x8]
XOR R9D,R9D
CALL 0x005a4940
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JNZ 0x005ebe29
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x18]
XOR R9D,R9D
CALL 0x005a4940
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x19],AL
LAB_005ebe29:
MOV AL,byte ptr [RBP + -0x19]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
/* Database_qualified_name::eq(Database_qualified_name const*) const */
ulong __thiscall
Database_qualified_name::eq(Database_qualified_name *this,Database_qualified_name *param_1)
{
int iVar1;
int8 uVar2;
ulong uVar3;
int1 *this_00;
int1 local_21;
this_00 = my_charset_utf8mb3_bin;
if (lower_case_table_names != 0) {
this_00 = my_charset_utf8mb3_general_ci;
}
uVar3 = 0;
local_21 = 0;
if (*(long *)(this + 8) == *(long *)(param_1 + 8)) {
uVar3 = 0;
local_21 = 0;
if (*(long *)(this + 0x18) == *(long *)(param_1 + 0x18)) {
iVar1 = charset_info_st::strnncoll
((charset_info_st *)this_00,*(char **)this,*(ulong *)(this + 8),
*(char **)param_1,*(ulong *)(param_1 + 8),'\0');
uVar3 = 0;
local_21 = 0;
if (iVar1 == 0) {
uVar2 = charset_info_st::strnncoll
((charset_info_st *)this_00,*(char **)(this + 0x10),
*(ulong *)(this + 0x18),*(char **)(param_1 + 0x10),
*(ulong *)(param_1 + 0x18),'\0');
uVar3 = CONCAT71((int7)((ulong)uVar2 >> 8),(int)uVar2 != 0) ^ 0xff;
local_21 = (int1)uVar3;
}
}
}
return CONCAT71((int7)(uVar3 >> 8),local_21) & 0xffffffffffffff01;
}
| |
34,318 | my_charpos_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_charpos_utf16(CHARSET_INFO *cs,
const char *b, const char *e, size_t pos)
{
const char *b0= b;
uint charlen;
for ( ; pos; b+= charlen, pos--)
{
if (!(charlen= my_ismbchar(cs, b, e)))
return (e + 2 - b0); /* Error, return pos outside the string */
}
return (size_t) (pos ? (e + 2 - b0) : (b - b0));
} | O0 | c | my_charpos_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x509d5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x54070
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jne 0x509b5
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x50a08
jmp 0x509b7
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x50980
cmpq $0x0, -0x28(%rbp)
je 0x509f1
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x50a00
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_charpos_utf16:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_50980:
cmp [rbp+var_28], 0
jz short loc_509D5
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_ismbchar_0
mov [rbp+var_34], eax
cmp eax, 0
jnz short loc_509B5
mov rax, [rbp+var_20]
add rax, 2
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp short loc_50A08
loc_509B5:
jmp short $+2
loc_509B7:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short loc_50980
loc_509D5:
cmp [rbp+var_28], 0
jz short loc_509F1
mov rax, [rbp+var_20]
add rax, 2
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_40], rax
jmp short loc_50A00
loc_509F1:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_40], rax
loc_50A00:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_50A08:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4)
{
unsigned int v5; // [rsp+Ch] [rbp-34h]
long long v8; // [rsp+28h] [rbp-18h]
v8 = a2;
while ( a4 )
{
v5 = my_ismbchar_0(a1, v8, a3);
if ( !v5 )
return a3 + 2 - a2;
v8 += v5;
--a4;
}
return v8 - a2;
}
| my_charpos_utf16:
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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_00150980:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001509d5
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00154070
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JNZ 0x001509b5
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00150a08
LAB_001509b5:
JMP 0x001509b7
LAB_001509b7:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00150980
LAB_001509d5:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001509f1
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00150a00
LAB_001509f1:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00150a00:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00150a08:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001509dc) */
long my_charpos_utf16(int8 param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
long local_30;
long local_20;
local_30 = param_4;
local_20 = param_2;
while( true ) {
if (local_30 == 0) {
return local_20 - param_2;
}
uVar1 = my_ismbchar(param_1,local_20,param_3);
if (uVar1 == 0) break;
local_20 = local_20 + (ulong)uVar1;
local_30 = local_30 + -1;
}
return (param_3 + 2) - param_2;
}
| |
34,319 | lo0bits | eloqsql/strings/dtoa.c | static int lo0bits(ULong *y)
{
register int k;
register ULong x= *y;
if (x & 7)
{
if (x & 1)
return 0;
if (x & 2)
{
*y= x >> 1;
return 1;
}
*y= x >> 2;
return 2;
}
k= 0;
if (!(x & 0xffff))
{
k= 16;
x>>= 16;
}
if (!(x & 0xff))
{
k+= 8;
x>>= 8;
}
if (!(x & 0xf))
{
k+= 4;
x>>= 4;
}
if (!(x & 0x3))
{
k+= 2;
x>>= 2;
}
if (!(x & 1))
{
k++;
x>>= 1;
if (!x)
return 32;
}
*y= x;
return k;
} | O0 | c | lo0bits:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0x737ad
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x73773
movl $0x0, -0x4(%rbp)
jmp 0x73866
movl -0x18(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x73795
movl -0x18(%rbp), %ecx
shrl %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x73866
movl -0x18(%rbp), %ecx
shrl $0x2, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x73866
movl $0x0, -0x14(%rbp)
movl -0x18(%rbp), %eax
andl $0xffff, %eax # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x737d1
movl $0x10, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x10, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
jne 0x737f0
movl -0x14(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x7380d
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x4, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x7382a
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x73857
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x73855
movl $0x20, -0x4(%rbp)
jmp 0x73866
jmp 0x73857
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| lo0bits:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], eax
mov eax, [rbp+var_18]
and eax, 7
cmp eax, 0
jz short loc_737AD
mov eax, [rbp+var_18]
and eax, 1
cmp eax, 0
jz short loc_73773
mov [rbp+var_4], 0
jmp loc_73866
loc_73773:
mov eax, [rbp+var_18]
and eax, 2
cmp eax, 0
jz short loc_73795
mov ecx, [rbp+var_18]
shr ecx, 1
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 1
jmp loc_73866
loc_73795:
mov ecx, [rbp+var_18]
shr ecx, 2
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 2
jmp loc_73866
loc_737AD:
mov [rbp+var_14], 0
mov eax, [rbp+var_18]
and eax, 0FFFFh
cmp eax, 0
jnz short loc_737D1
mov [rbp+var_14], 10h
mov eax, [rbp+var_18]
shr eax, 10h
mov [rbp+var_18], eax
loc_737D1:
mov eax, [rbp+var_18]
and eax, 0FFh
cmp eax, 0
jnz short loc_737F0
mov eax, [rbp+var_14]
add eax, 8
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 8
mov [rbp+var_18], eax
loc_737F0:
mov eax, [rbp+var_18]
and eax, 0Fh
cmp eax, 0
jnz short loc_7380D
mov eax, [rbp+var_14]
add eax, 4
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 4
mov [rbp+var_18], eax
loc_7380D:
mov eax, [rbp+var_18]
and eax, 3
cmp eax, 0
jnz short loc_7382A
mov eax, [rbp+var_14]
add eax, 2
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 2
mov [rbp+var_18], eax
loc_7382A:
mov eax, [rbp+var_18]
and eax, 1
cmp eax, 0
jnz short loc_73857
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 1
mov [rbp+var_18], eax
cmp [rbp+var_18], 0
jnz short loc_73855
mov [rbp+var_4], 20h ; ' '
jmp short loc_73866
loc_73855:
jmp short $+2
loc_73857:
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_73866:
mov eax, [rbp+var_4]
pop rbp
retn
| long long lo0bits(unsigned int *a1)
{
unsigned int v2; // [rsp+0h] [rbp-18h]
unsigned int v3; // [rsp+4h] [rbp-14h]
v2 = *a1;
if ( (*a1 & 7) != 0 )
{
if ( (v2 & 1) != 0 )
{
return 0;
}
else if ( (v2 & 2) != 0 )
{
*a1 = v2 >> 1;
return 1;
}
else
{
*a1 = v2 >> 2;
return 2;
}
}
else
{
v3 = 0;
if ( !(_WORD)v2 )
{
v3 = 16;
v2 >>= 16;
}
if ( !(_BYTE)v2 )
{
v3 += 8;
v2 >>= 8;
}
if ( (v2 & 0xF) == 0 )
{
v3 += 4;
v2 >>= 4;
}
if ( (v2 & 3) == 0 )
{
v3 += 2;
v2 >>= 2;
}
if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) )
{
*a1 = v2;
return v3;
}
else
{
return 32;
}
}
}
| lo0bits:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x7
CMP EAX,0x0
JZ 0x001737ad
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00173773
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00173866
LAB_00173773:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00173795
MOV ECX,dword ptr [RBP + -0x18]
SHR ECX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00173866
LAB_00173795:
MOV ECX,dword ptr [RBP + -0x18]
SHR ECX,0x2
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00173866
LAB_001737ad:
MOV dword ptr [RBP + -0x14],0x0
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xffff
CMP EAX,0x0
JNZ 0x001737d1
MOV dword ptr [RBP + -0x14],0x10
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x10
MOV dword ptr [RBP + -0x18],EAX
LAB_001737d1:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xff
CMP EAX,0x0
JNZ 0x001737f0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x8
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x8
MOV dword ptr [RBP + -0x18],EAX
LAB_001737f0:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x0017380d
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x4
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x4
MOV dword ptr [RBP + -0x18],EAX
LAB_0017380d:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x3
CMP EAX,0x0
JNZ 0x0017382a
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x2
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x2
MOV dword ptr [RBP + -0x18],EAX
LAB_0017382a:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00173857
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x00173855
MOV dword ptr [RBP + -0x4],0x20
JMP 0x00173866
LAB_00173855:
JMP 0x00173857
LAB_00173857:
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_00173866:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int lo0bits(uint *param_1)
{
uint local_20;
int local_1c;
int local_c;
local_20 = *param_1;
if ((local_20 & 7) == 0) {
local_1c = 0;
if ((local_20 & 0xffff) == 0) {
local_1c = 0x10;
local_20 = local_20 >> 0x10;
}
if ((local_20 & 0xff) == 0) {
local_1c = local_1c + 8;
local_20 = local_20 >> 8;
}
if ((local_20 & 0xf) == 0) {
local_1c = local_1c + 4;
local_20 = local_20 >> 4;
}
if ((local_20 & 3) == 0) {
local_1c = local_1c + 2;
local_20 = local_20 >> 2;
}
if ((local_20 & 1) == 0) {
local_1c = local_1c + 1;
local_20 = local_20 >> 1;
if (local_20 == 0) {
return 0x20;
}
}
*param_1 = local_20;
local_c = local_1c;
}
else if ((local_20 & 1) == 0) {
if ((local_20 & 2) == 0) {
*param_1 = local_20 >> 2;
local_c = 2;
}
else {
*param_1 = local_20 >> 1;
local_c = 1;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
34,320 | js_async_from_sync_iterator_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_async_from_sync_iterator_finalizer(JSRuntime *rt, JSValue val)
{
JSAsyncFromSyncIteratorData *s =
JS_GetOpaque(val, JS_CLASS_ASYNC_FROM_SYNC_ITERATOR);
if (s) {
JS_FreeValueRT(rt, s->sync_iter);
JS_FreeValueRT(rt, s->next_method);
js_free_rt(rt, s);
}
} | O1 | c | js_async_from_sync_iterator_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0x52935
movq (%rsp), %rax
cmpw $0x37, 0x6(%rax)
jne 0x52935
movq 0x30(%rax), %r14
jmp 0x52938
xorl %r14d, %r14d
testq %r14, %r14
je 0x52989
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1d8c6
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x1d8c6
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_async_from_sync_iterator_finalizer:
push r14
push rbx
push rax
mov rbx, rdi
mov [rsp+18h+var_18], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_52935
mov rax, [rsp+18h+var_18]
cmp word ptr [rax+6], 37h ; '7'
jnz short loc_52935
mov r14, [rax+30h]
jmp short loc_52938
loc_52935:
xor r14d, r14d
loc_52938:
test r14, r14
jz short loc_52989
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call JS_FreeValueRT
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov rdi, rbx
call JS_FreeValueRT
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_52989:
add rsp, 8
pop rbx
pop r14
retn
| void js_async_from_sync_iterator_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long v4; // rax
void ( *v5)(_QWORD, long long); // rcx
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 55 )
v3 = *(_QWORD *)(a2 + 48);
else
v3 = 0LL;
if ( v3 )
{
JS_FreeValueRT(a1, *(_DWORD **)v3, *(_QWORD *)(v3 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v3 + 16), *(_QWORD *)(v3 + 24));
--*(_QWORD *)(a1 + 40);
v4 = (*(long long ( **)(long long))(a1 + 32))(v3);
v5 = *(void ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v4 - 8;
v5(*(_QWORD *)(a1 + 64), v3);
}
}
| js_async_from_sync_iterator_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RSP],RSI
CMP EDX,-0x1
JNZ 0x00152935
MOV RAX,qword ptr [RSP]
CMP word ptr [RAX + 0x6],0x37
JNZ 0x00152935
MOV R14,qword ptr [RAX + 0x30]
JMP 0x00152938
LAB_00152935:
XOR R14D,R14D
LAB_00152938:
TEST R14,R14
JZ 0x00152989
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011d8c6
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x0011d8c6
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_00152989:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_async_from_sync_iterator_finalizer(long param_1,long param_2,int param_3)
{
long lVar1;
int8 *puVar2;
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x37)) {
puVar2 = *(int8 **)(param_2 + 0x30);
}
else {
puVar2 = (int8 *)0x0;
}
if (puVar2 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar2,puVar2[1]);
JS_FreeValueRT(param_1,puVar2[2],puVar2[3]);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar1 = (**(code **)(param_1 + 0x20))(puVar2);
lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8;
*(long *)(param_1 + 0x30) = lVar1;
/* WARNING: Could not recover jumptable at 0x00152987. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),puVar2,lVar1,*(code **)(param_1 + 0x10));
return;
}
return;
}
| |
34,321 | js_async_from_sync_iterator_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_async_from_sync_iterator_finalizer(JSRuntime *rt, JSValue val)
{
JSAsyncFromSyncIteratorData *s =
JS_GetOpaque(val, JS_CLASS_ASYNC_FROM_SYNC_ITERATOR);
if (s) {
JS_FreeValueRT(rt, s->sync_iter);
JS_FreeValueRT(rt, s->next_method);
js_free_rt(rt, s);
}
} | O2 | c | js_async_from_sync_iterator_finalizer:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x46deb
cmpw $0x37, 0x6(%rsi)
jne 0x46deb
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x46deb
movq %rdi, %rbx
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x18031
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x18031
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x170cb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_async_from_sync_iterator_finalizer:
push r14
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_46DEB
cmp word ptr [rsi+6], 37h ; '7'
jnz short loc_46DEB
mov r14, [rsi+30h]
test r14, r14
jz short loc_46DEB
mov rbx, rdi
mov rsi, [r14]
mov rdx, [r14+8]
call JS_FreeValueRT
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov rdi, rbx
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
loc_46DEB:
add rsp, 8
pop rbx
pop r14
retn
| long long js_async_from_sync_iterator_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 55 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
{
JS_FreeValueRT(a1, *(unsigned int **)v3, *(_QWORD *)(v3 + 8));
JS_FreeValueRT(a1, *(unsigned int **)(v3 + 16), *(_QWORD *)(v3 + 24));
return js_free_rt(a1, v3);
}
}
return result;
}
| js_async_from_sync_iterator_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x00146deb
CMP word ptr [RSI + 0x6],0x37
JNZ 0x00146deb
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x00146deb
MOV RBX,RDI
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
CALL 0x00118031
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x00118031
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001170cb
LAB_00146deb:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_async_from_sync_iterator_finalizer(int8 param_1,long param_2,int param_3)
{
int8 *puVar1;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x37)) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
js_free_rt(param_1,puVar1);
return;
}
return;
}
| |
34,322 | inline_mysql_rwlock_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_rwlock_init(
#ifdef HAVE_PSI_RWLOCK_INTERFACE
PSI_rwlock_key key,
#endif
mysql_rwlock_t *that)
{
#ifdef HAVE_PSI_RWLOCK_INTERFACE
that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_rwlock);
#else
that->m_psi= NULL;
#endif
/*
pthread_rwlockattr_t is not used in MySQL.
*/
return my_rwlock_init(&that->m_rwlock, NULL);
} | O0 | c | inline_mysql_rwlock_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x290b32(%rip), %rax # 0x2c1238
movq (%rax), %rax
movq 0x50(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rdi
callq 0xfad70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_rwlock_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+50h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+90h], rcx
mov rdi, [rbp+var_10]
call my_rw_init
add rsp, 10h
pop rbp
retn
| long long inline_mysql_rwlock_init(unsigned int a1, long long a2)
{
*(_QWORD *)(a2 + 144) = ((long long ( *)(_QWORD, long long))PSI_server[10])(a1, a2);
return my_rw_init(a2);
}
| inline_mysql_rwlock_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x3c1238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x50]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001fad70
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_rwlock_init(int4 param_1,long param_2)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x50))(param_1,param_2);
*(int8 *)(param_2 + 0x90) = uVar1;
my_rw_init(param_2);
return;
}
| |
34,323 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key() const | monkey531[P]llama/common/json.hpp | const typename object_t::key_type& key() const
{
JSON_ASSERT(m_object != nullptr);
if (JSON_HEDLEY_LIKELY(m_object->is_object()))
{
return m_it.object_iterator->first;
}
JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0xbb2e7
movq %rdi, %r14
cmpb $0x1, (%rax)
jne 0xbb289
movq 0x8(%r14), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x42fc1(%rip), %rsi # 0xfe267
leaq 0x42fe3(%rip), %rdx # 0xfe290
leaq 0x8(%rsp), %rdi
callq 0x2d630
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcf, %esi
callq 0x6c6ee
xorl %ebp, %ebp
leaq 0x7dc30(%rip), %rsi # 0x138f08
leaq -0x524fb(%rip), %rdx # 0x68de4
movq %rbx, %rdi
callq 0x1bf90
leaq 0x3ecb6(%rip), %rdi # 0xf9fa4
leaq 0x3884b(%rip), %rdx # 0xf3b40
leaq 0x43ef3(%rip), %rcx # 0xff1ef
movl $0x3519, %esi # imm = 0x3519
xorl %eax, %eax
callq 0x1bf10
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xbb322
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
testb %bpl, %bpl
jne 0xbb32c
jmp 0xbb334
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b680
movq %r14, %rdi
callq 0x1c020
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz short loc_BB2E7
mov r14, rdi
cmp byte ptr [rax], 1
jnz short loc_BB289
mov rax, [r14+8]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_BB289:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"...
lea rdx, aCannotUseKeyFo+29h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0CFh; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_BB2E7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 3519h
xor eax, eax
call _ggml_abort
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_BB322
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB322:
test bpl, bpl
jnz short loc_BB32C
jmp short loc_BB334
mov r14, rax
loc_BB32C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BB334:
mov rdi, r14
call __Unwind_Resume
| 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>>::key(
_QWORD *a1)
{
void *v1; // rbx
char v2; // bp
void *v3; // r15
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v6; // r14
void *v7[2]; // [rsp+8h] [rbp-40h] BYREF
long long v8; // [rsp+18h] [rbp-30h] BYREF
if ( !*a1 )
{
v6 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13593LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
if ( v7[0] != v3 )
operator delete(v7[0], v8 + 1);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v6);
}
if ( *(_BYTE *)*a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7[0] = &v8;
std::string::_M_construct<char const*>((long long)v7, "cannot use key() for non-object iterators", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
207,
v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return a1[1];
}
| key:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001bb2e7
MOV R14,RDI
CMP byte ptr [RAX],0x1
JNZ 0x001bb289
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001bb289:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_001bb29f:
LEA RSI,[0x1fe267]
LEA RDX,[0x1fe290]
LEA RDI,[RSP + 0x8]
CALL 0x0012d630
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_001bb2bd:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcf
CALL 0x0016c6ee
XOR EBP,EBP
LEA RSI,[0x238f08]
LEA RDX,[0x168de4]
MOV RDI,RBX
CALL 0x0011bf90
LAB_001bb2e7:
LEA RDI,[0x1f9fa4]
LEA RDX,[0x1f3b40]
LEA RCX,[0x1ff1ef]
MOV ESI,0x3519
XOR EAX,EAX
CALL 0x0011bf10
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::key() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int8 uVar1;
int1 *local_40 [2];
int1 local_30 [16];
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
if (**(char **)this == '\x01') {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 001bb29f to 001bb2b6 has its CatchHandler @ 001bb329 */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot use key() for non-object iterators","");
/* try { // try from 001bb2bd to 001bb2e6 has its CatchHandler @ 001bb308 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xcf,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception);
}
| |
34,324 | get_collation_number | eloqsql/mysys/charset.c | uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
} | O0 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
leaq 0xba2c50(%rip), %rdi # 0xc4b1b4
leaq 0x85(%rip), %rsi # 0xa85f0
callq 0x27280
movq -0x60(%rbp), %rdi
callq 0xa8780
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0xa8589
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0xa85be
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movl $0x40, %edx
callq 0xa8820
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0xa85b7
movq -0x60(%rbp), %rdi
callq 0xa8780
movl %eax, -0x54(%rbp)
jmp 0xa85be
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x70(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xa85df
movl -0x70(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
callq 0x272b0
nopw %cs:(%rax,%rax)
| get_collation_number:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_6C], eax
cmp eax, 0
jz short loc_A8589
mov eax, [rbp+var_6C]
mov [rbp+var_54], eax
jmp short loc_A85BE
loc_A8589:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_50]
mov rcx, [rbp+var_68]
mov edx, 40h ; '@'
call get_collation_name_alias
mov [rbp+var_60], rax
cmp rax, 0
jz short loc_A85B7
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_54], eax
jmp short loc_A85BE
loc_A85B7:
mov [rbp+var_54], 0
loc_A85BE:
mov eax, [rbp+var_54]
mov [rbp+var_70], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_A85DF
mov eax, [rbp+var_70]
add rsp, 70h
pop rbp
retn
loc_A85DF:
call ___stack_chk_fail
| long long get_collation_number(long long a1, long long a2)
{
unsigned int collation_number_internal; // [rsp+4h] [rbp-6Ch]
long long collation_name_alias; // [rsp+10h] [rbp-60h]
_BYTE v6[72]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-8h]
v7 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number_internal = get_collation_number_internal(a1);
if ( collation_number_internal )
{
return collation_number_internal;
}
else
{
collation_name_alias = get_collation_name_alias(a1, v6, 64LL, a2);
if ( collation_name_alias )
return (unsigned int)get_collation_number_internal(collation_name_alias);
else
return 0;
}
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
LEA RDI,[0xd4b1b4]
LEA RSI,[0x1a85f0]
CALL 0x00127280
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001a8780
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x001a8589
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001a85be
LAB_001a8589:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV EDX,0x40
CALL 0x001a8820
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JZ 0x001a85b7
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001a8780
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001a85be
LAB_001a85b7:
MOV dword ptr [RBP + -0x54],0x0
LAB_001a85be:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001a85df
MOV EAX,dword ptr [RBP + -0x70]
ADD RSP,0x70
POP RBP
RET
LAB_001a85df:
CALL 0x001272b0
|
int get_collation_number(int8 param_1,int8 param_2)
{
long lVar1;
long in_FS_OFFSET;
int local_5c;
int1 local_58 [72];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
local_5c = get_collation_number_internal(param_1);
if (local_5c == 0) {
lVar1 = get_collation_name_alias(param_1,local_58,0x40,param_2);
if (lVar1 == 0) {
local_5c = 0;
}
else {
local_5c = get_collation_number_internal(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_5c;
}
| |
34,325 | ma_apply_undo_key_delete | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_apply_undo_key_delete(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length,
my_bool with_root)
{
LSN lsn;
my_bool res;
uint keynr, skip_bytes;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
MARIA_KEY key;
DBUG_ENTER("_ma_apply_undo_key_delete");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
skip_bytes= KEY_NR_STORE_SIZE + (with_root ? PAGE_STORE_SIZE : 0);
header+= skip_bytes;
length-= skip_bytes;
/* We have to copy key as _ma_ck_real_write_btree() may change it */
memcpy(key_buff, header, length);
DBUG_DUMP("key", key_buff, length);
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
new_root= share->state.key_root[keynr];
res= (share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_insert_level(info, &key, -1, &new_root) :
_ma_ck_real_write_btree(info, &key, &new_root,
share->keyinfo[keynr].write_comp_flag |
key.flag);
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn,
*msg.root == msg.value ?
LOGREC_UNDO_KEY_DELETE : LOGREC_UNDO_KEY_DELETE_WITH_ROOT,
0, 0, &lsn,
(void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
} | O0 | c | ma_apply_undo_key_delete:
pushq %rbp
movq %rsp, %rbp
subq $0xa80, %rsp # imm = 0xA80
movb %r8b, %al
movq %fs:0x28, %r8
movq %r8, -0x8(%rbp)
movq %rdi, -0x9e8(%rbp)
movq %rsi, -0x9f0(%rbp)
movq %rdx, -0x9f8(%rbp)
movl %ecx, -0x9fc(%rbp)
movb %al, -0x9fd(%rbp)
movq -0x9e8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa20(%rbp)
movq -0xa20(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1b1, %ecx # imm = 0x1B1
movl %ecx, 0x170(%rax)
movq -0x9f8(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0xa10(%rbp)
movsbl -0x9fd(%rbp), %edx
xorl %eax, %eax
movl $0x5, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl $0x1, %eax
movl %eax, -0xa14(%rbp)
movl -0xa14(%rbp), %ecx
movq -0x9f8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x9f8(%rbp)
movl -0xa14(%rbp), %ecx
movl -0x9fc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x9fc(%rbp)
leaq -0x9e0(%rbp), %rdi
movq -0x9f8(%rbp), %rsi
movl -0x9fc(%rbp), %eax
movl %eax, %edx
callq 0x270d0
jmp 0x7cf3d
movq -0xa20(%rbp), %rax
movq 0x570(%rax), %rax
movl -0xa10(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0xa60(%rbp)
leaq -0x9e0(%rbp), %rax
movq %rax, -0xa68(%rbp)
movl -0x9fc(%rbp), %eax
movq -0xa20(%rbp), %rcx
subl 0x740(%rcx), %eax
movl %eax, -0xa58(%rbp)
movq -0xa20(%rbp), %rax
movl 0x740(%rax), %eax
movl %eax, -0xa54(%rbp)
movl $0x80000, -0xa50(%rbp) # imm = 0x80000
movq -0xa20(%rbp), %rax
movq 0x118(%rax), %rax
movl -0xa10(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa28(%rbp)
movq -0xa20(%rbp), %rax
movq 0x570(%rax), %rax
movl -0xa10(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzbl 0xa4(%rax), %eax
cmpl $0x2, %eax
jne 0x7d016
movq -0x9e8(%rbp), %rdi
leaq -0xa68(%rbp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
leaq -0xa28(%rbp), %rcx
callq 0x98d40
movl %eax, -0xa6c(%rbp)
jmp 0x7d063
movq -0x9e8(%rbp), %rdi
movq -0xa20(%rbp), %rax
movq 0x570(%rax), %rax
movl -0xa10(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movl 0xb4(%rax), %ecx
orl -0xa50(%rbp), %ecx
leaq -0xa68(%rbp), %rsi
leaq -0xa28(%rbp), %rdx
callq 0x8d120
movsbl %al, %eax
movl %eax, -0xa6c(%rbp)
movl -0xa6c(%rbp), %eax
movb %al, -0xa09(%rbp)
cmpb $0x0, -0xa09(%rbp)
je 0x7d084
movq -0xa20(%rbp), %rdi
callq 0x3b3e0
movq -0xa20(%rbp), %rax
movq 0x118(%rax), %rax
movl -0xa10(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xa48(%rbp)
movq -0xa28(%rbp), %rax
movq %rax, -0xa40(%rbp)
movl -0xa10(%rbp), %eax
movl %eax, -0xa38(%rbp)
movq -0x9e8(%rbp), %rdi
movq -0x9f0(%rbp), %rsi
movq -0xa48(%rbp), %rax
movq (%rax), %rcx
movq -0xa40(%rbp), %r8
movl $0x18, %edx
movl $0x17, %eax
cmpq %r8, %rcx
cmovel %eax, %edx
xorl %r8d, %r8d
leaq -0xa08(%rbp), %r9
leaq -0xa48(%rbp), %rax
movl %r8d, %ecx
movq %rax, (%rsp)
callq 0x7a9a0
cmpb $0x0, %al
je 0x7d117
movb $0x1, -0xa09(%rbp)
movq -0x9e8(%rbp), %rdi
callq 0x7af00
movq -0x9e8(%rbp), %rdi
movq -0xa08(%rbp), %rsi
callq 0x7ce30
movb -0xa09(%rbp), %al
movb %al, -0xa6d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7d163
movb -0xa6d(%rbp), %al
addq $0xa80, %rsp # imm = 0xA80
popq %rbp
retq
callq 0x272b0
nopl (%rax,%rax)
| _ma_apply_undo_key_delete:
push rbp
mov rbp, rsp
sub rsp, 0A80h
mov al, r8b
mov r8, fs:28h
mov [rbp+var_8], r8
mov [rbp+var_9E8], rdi
mov [rbp+var_9F0], rsi
mov [rbp+var_9F8], rdx
mov [rbp+var_9FC], ecx
mov [rbp+var_9FD], al
mov rax, [rbp+var_9E8]
mov rax, [rax]
mov [rbp+var_A20], rax
mov rax, [rbp+var_A20]
mov ecx, [rax+170h]
or ecx, 1B1h
mov [rax+170h], ecx
mov rax, [rbp+var_9F8]
movzx eax, byte ptr [rax]
mov [rbp+var_A10], eax
movsx edx, [rbp+var_9FD]
xor eax, eax
mov ecx, 5
cmp edx, 0
cmovnz eax, ecx
add eax, 1
mov [rbp+var_A14], eax
mov ecx, [rbp+var_A14]
mov rax, [rbp+var_9F8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_9F8], rax
mov ecx, [rbp+var_A14]
mov eax, [rbp+var_9FC]
sub eax, ecx
mov [rbp+var_9FC], eax
lea rdi, [rbp+var_9E0]
mov rsi, [rbp+var_9F8]
mov eax, [rbp+var_9FC]
mov edx, eax
call _memcpy
jmp short $+2
loc_7CF3D:
mov rax, [rbp+var_A20]
mov rax, [rax+570h]
mov ecx, [rbp+var_A10]
imul rcx, 118h
add rax, rcx
mov [rbp+var_A60], rax
lea rax, [rbp+var_9E0]
mov [rbp+var_A68], rax
mov eax, [rbp+var_9FC]
mov rcx, [rbp+var_A20]
sub eax, [rcx+740h]
mov [rbp+var_A58], eax
mov rax, [rbp+var_A20]
mov eax, [rax+740h]
mov [rbp+var_A54], eax
mov [rbp+var_A50], 80000h
mov rax, [rbp+var_A20]
mov rax, [rax+118h]
mov ecx, [rbp+var_A10]
mov rax, [rax+rcx*8]
mov [rbp+var_A28], rax
mov rax, [rbp+var_A20]
mov rax, [rax+570h]
mov ecx, [rbp+var_A10]
imul rcx, 118h
add rax, rcx
movzx eax, byte ptr [rax+0A4h]
cmp eax, 2
jnz short loc_7D016
mov rdi, [rbp+var_9E8]
lea rsi, [rbp+var_A68]
mov edx, 0FFFFFFFFh
lea rcx, [rbp+var_A28]
call maria_rtree_insert_level
mov [rbp+var_A6C], eax
jmp short loc_7D063
loc_7D016:
mov rdi, [rbp+var_9E8]
mov rax, [rbp+var_A20]
mov rax, [rax+570h]
mov ecx, [rbp+var_A10]
imul rcx, 118h
add rax, rcx
mov ecx, [rax+0B4h]
or ecx, [rbp+var_A50]
lea rsi, [rbp+var_A68]
lea rdx, [rbp+var_A28]
call _ma_ck_real_write_btree
movsx eax, al
mov [rbp+var_A6C], eax
loc_7D063:
mov eax, [rbp+var_A6C]
mov [rbp+var_A09], al
cmp [rbp+var_A09], 0
jz short loc_7D084
mov rdi, [rbp+var_A20]
call _ma_mark_file_crashed
loc_7D084:
mov rax, [rbp+var_A20]
mov rax, [rax+118h]
mov ecx, [rbp+var_A10]
shl rcx, 3
add rax, rcx
mov [rbp+var_A48], rax
mov rax, [rbp+var_A28]
mov [rbp+var_A40], rax
mov eax, [rbp+var_A10]
mov [rbp+var_A38], eax
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_9F0]
mov rax, [rbp+var_A48]
mov rcx, [rax]
mov r8, [rbp+var_A40]
mov edx, 18h
mov eax, 17h
cmp rcx, r8
cmovz edx, eax
xor r8d, r8d
lea r9, [rbp+var_A08]
lea rax, [rbp+var_A48]
mov ecx, r8d
mov [rsp+0A80h+var_A80], rax
call _ma_write_clr
cmp al, 0
jz short loc_7D117
mov [rbp+var_A09], 1
loc_7D117:
mov rdi, [rbp+var_9E8]
call _ma_fast_unlock_key_del
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_A08]
call _ma_unpin_all_pages_and_finalize_row
mov al, [rbp+var_A09]
mov [rbp+var_A6D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7D163
mov al, [rbp+var_A6D]
add rsp, 0A80h
pop rbp
retn
loc_7D163:
call ___stack_chk_fail
| char ma_apply_undo_key_delete(long long *a1, long long a2, unsigned __int8 *a3, unsigned int a4, char a5)
{
int v5; // eax
int v6; // edx
char inserted; // [rsp+14h] [rbp-A6Ch]
_QWORD v9[2]; // [rsp+18h] [rbp-A68h] BYREF
unsigned int v10; // [rsp+28h] [rbp-A58h]
int v11; // [rsp+2Ch] [rbp-A54h]
int v12; // [rsp+30h] [rbp-A50h]
_QWORD v13[2]; // [rsp+38h] [rbp-A48h] BYREF
unsigned int v14; // [rsp+48h] [rbp-A38h]
long long v15; // [rsp+58h] [rbp-A28h] BYREF
long long v16; // [rsp+60h] [rbp-A20h]
int v17; // [rsp+6Ch] [rbp-A14h]
unsigned int v18; // [rsp+70h] [rbp-A10h]
char v19; // [rsp+77h] [rbp-A09h]
long long v20; // [rsp+78h] [rbp-A08h] BYREF
char v21; // [rsp+83h] [rbp-9FDh]
unsigned int v22; // [rsp+84h] [rbp-9FCh]
unsigned __int8 *v23; // [rsp+88h] [rbp-9F8h]
long long v24; // [rsp+90h] [rbp-9F0h]
long long *v25; // [rsp+98h] [rbp-9E8h]
_BYTE v26[2520]; // [rsp+A0h] [rbp-9E0h] BYREF
unsigned long long v27; // [rsp+A78h] [rbp-8h]
v27 = __readfsqword(0x28u);
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v16 = *a1;
*(_DWORD *)(v16 + 368) |= 0x1B1u;
v18 = *v23;
v5 = 0;
if ( v21 )
v5 = 5;
v17 = v5 + 1;
v23 += (unsigned int)(v5 + 1);
v22 -= v5 + 1;
memcpy(v26, v23, v22);
v9[1] = 280LL * v18 + *(_QWORD *)(v16 + 1392);
v9[0] = v26;
v10 = v22 - *(_DWORD *)(v16 + 1856);
v11 = *(_DWORD *)(v16 + 1856);
v12 = 0x80000;
v15 = *(_QWORD *)(*(_QWORD *)(v16 + 280) + 8LL * v18);
if ( *(_BYTE *)(280LL * v18 + *(_QWORD *)(v16 + 1392) + 164) == 2 )
inserted = maria_rtree_insert_level(v25, v9, 0xFFFFFFFFLL, &v15);
else
inserted = ma_ck_real_write_btree(
v25,
v9,
&v15,
(unsigned int)v12 | *(_DWORD *)(280LL * v18 + *(_QWORD *)(v16 + 1392) + 180));
v19 = inserted;
if ( inserted )
ma_mark_file_crashed(v16);
v13[0] = 8LL * v18 + *(_QWORD *)(v16 + 280);
v13[1] = v15;
v14 = v18;
v6 = 24;
if ( *(_QWORD *)v13[0] == v15 )
v6 = 23;
if ( ma_write_clr(v25, v24, v6, 0, 0, (long long)&v20, (long long)v13) )
v19 = 1;
ma_fast_unlock_key_del((long long)v25);
ma_unpin_all_pages_and_finalize_row((long long)v25, v20);
return v19;
}
| _ma_apply_undo_key_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa80
MOV AL,R8B
MOV R8,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x9e8],RDI
MOV qword ptr [RBP + -0x9f0],RSI
MOV qword ptr [RBP + -0x9f8],RDX
MOV dword ptr [RBP + -0x9fc],ECX
MOV byte ptr [RBP + -0x9fd],AL
MOV RAX,qword ptr [RBP + -0x9e8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa20],RAX
MOV RAX,qword ptr [RBP + -0xa20]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1b1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x9f8]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0xa10],EAX
MOVSX EDX,byte ptr [RBP + -0x9fd]
XOR EAX,EAX
MOV ECX,0x5
CMP EDX,0x0
CMOVNZ EAX,ECX
ADD EAX,0x1
MOV dword ptr [RBP + -0xa14],EAX
MOV ECX,dword ptr [RBP + -0xa14]
MOV RAX,qword ptr [RBP + -0x9f8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x9f8],RAX
MOV ECX,dword ptr [RBP + -0xa14]
MOV EAX,dword ptr [RBP + -0x9fc]
SUB EAX,ECX
MOV dword ptr [RBP + -0x9fc],EAX
LEA RDI,[RBP + -0x9e0]
MOV RSI,qword ptr [RBP + -0x9f8]
MOV EAX,dword ptr [RBP + -0x9fc]
MOV EDX,EAX
CALL 0x001270d0
JMP 0x0017cf3d
LAB_0017cf3d:
MOV RAX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xa10]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0xa60],RAX
LEA RAX,[RBP + -0x9e0]
MOV qword ptr [RBP + -0xa68],RAX
MOV EAX,dword ptr [RBP + -0x9fc]
MOV RCX,qword ptr [RBP + -0xa20]
SUB EAX,dword ptr [RCX + 0x740]
MOV dword ptr [RBP + -0xa58],EAX
MOV RAX,qword ptr [RBP + -0xa20]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [RBP + -0xa54],EAX
MOV dword ptr [RBP + -0xa50],0x80000
MOV RAX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0xa10]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0xa28],RAX
MOV RAX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xa10]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0xa4]
CMP EAX,0x2
JNZ 0x0017d016
MOV RDI,qword ptr [RBP + -0x9e8]
LEA RSI,[RBP + -0xa68]
MOV EDX,0xffffffff
LEA RCX,[RBP + -0xa28]
CALL 0x00198d40
MOV dword ptr [RBP + -0xa6c],EAX
JMP 0x0017d063
LAB_0017d016:
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RAX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xa10]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV ECX,dword ptr [RAX + 0xb4]
OR ECX,dword ptr [RBP + -0xa50]
LEA RSI,[RBP + -0xa68]
LEA RDX,[RBP + -0xa28]
CALL 0x0018d120
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa6c],EAX
LAB_0017d063:
MOV EAX,dword ptr [RBP + -0xa6c]
MOV byte ptr [RBP + -0xa09],AL
CMP byte ptr [RBP + -0xa09],0x0
JZ 0x0017d084
MOV RDI,qword ptr [RBP + -0xa20]
CALL 0x0013b3e0
LAB_0017d084:
MOV RAX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0xa10]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0xa48],RAX
MOV RAX,qword ptr [RBP + -0xa28]
MOV qword ptr [RBP + -0xa40],RAX
MOV EAX,dword ptr [RBP + -0xa10]
MOV dword ptr [RBP + -0xa38],EAX
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RBP + -0xa48]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0xa40]
MOV EDX,0x18
MOV EAX,0x17
CMP RCX,R8
CMOVZ EDX,EAX
XOR R8D,R8D
LEA R9,[RBP + -0xa08]
LEA RAX,[RBP + -0xa48]
MOV ECX,R8D
MOV qword ptr [RSP],RAX
CALL 0x0017a9a0
CMP AL,0x0
JZ 0x0017d117
MOV byte ptr [RBP + -0xa09],0x1
LAB_0017d117:
MOV RDI,qword ptr [RBP + -0x9e8]
CALL 0x0017af00
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0xa08]
CALL 0x0017ce30
MOV AL,byte ptr [RBP + -0xa09]
MOV byte ptr [RBP + -0xa6d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017d163
MOV AL,byte ptr [RBP + -0xa6d]
ADD RSP,0xa80
POP RBP
RET
LAB_0017d163:
CALL 0x001272b0
|
int8
_ma_apply_undo_key_delete(long *param_1,int8 param_2,byte *param_3,int param_4,char param_5)
{
char cVar1;
int iVar2;
int8 uVar3;
long in_FS_OFFSET;
char local_a74;
int1 *local_a70;
long local_a68;
int local_a60;
int4 local_a5c;
int4 local_a58;
long *local_a50;
long local_a48;
uint local_a40;
long local_a30;
long local_a28;
uint local_a1c;
uint local_a18;
char local_a11;
int8 local_a10;
char local_a05;
uint local_a04;
byte *local_a00;
int8 local_9f8;
long *local_9f0;
int1 local_9e8 [2520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a28 = *param_1;
*(uint *)(local_a28 + 0x170) = *(uint *)(local_a28 + 0x170) | 0x1b1;
local_a18 = (uint)*param_3;
iVar2 = 0;
if (param_5 != '\0') {
iVar2 = 5;
}
local_a1c = iVar2 + 1;
local_a00 = param_3 + local_a1c;
local_a04 = param_4 - local_a1c;
local_a05 = param_5;
local_9f8 = param_2;
local_9f0 = param_1;
memcpy(local_9e8,local_a00,(ulong)local_a04);
local_a68 = *(long *)(local_a28 + 0x570) + (ulong)local_a18 * 0x118;
local_a70 = local_9e8;
local_a60 = local_a04 - *(int *)(local_a28 + 0x740);
local_a5c = *(int4 *)(local_a28 + 0x740);
local_a58 = 0x80000;
local_a30 = *(long *)(*(long *)(local_a28 + 0x118) + (ulong)local_a18 * 8);
if (*(char *)(*(long *)(local_a28 + 0x570) + (ulong)local_a18 * 0x118 + 0xa4) == '\x02') {
local_a74 = maria_rtree_insert_level(local_9f0,&local_a70,0xffffffff,&local_a30);
}
else {
local_a74 = _ma_ck_real_write_btree
(local_9f0,&local_a70,&local_a30,
*(uint *)(*(long *)(local_a28 + 0x570) + (ulong)local_a18 * 0x118 + 0xb4)
| 0x80000);
}
local_a11 = local_a74;
if (local_a74 != '\0') {
_ma_mark_file_crashed(local_a28);
}
local_a50 = (long *)(*(long *)(local_a28 + 0x118) + (ulong)local_a18 * 8);
local_a48 = local_a30;
local_a40 = local_a18;
uVar3 = 0x18;
if (*local_a50 == local_a30) {
uVar3 = 0x17;
}
cVar1 = _ma_write_clr(local_9f0,local_9f8,uVar3,0,0,&local_a10,&local_a50);
if (cVar1 != '\0') {
local_a11 = '\x01';
}
_ma_fast_unlock_key_del(local_9f0);
_ma_unpin_all_pages_and_finalize_row(local_9f0,local_a10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_a11);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
34,326 | ma_store_bin_pack_key | eloqsql/storage/maria/ma_search.c | void _ma_store_bin_pack_key(MARIA_KEYDEF *keyinfo __attribute__((unused)),
register uchar *key_pos,
register MARIA_KEY_PARAM *s_temp)
{
uchar *org_key_pos= key_pos;
size_t length= s_temp->totlength - s_temp->ref_length;
store_key_length_inc(key_pos,s_temp->ref_length);
memcpy(key_pos, s_temp->key+s_temp->ref_length, length);
key_pos+= length;
if (s_temp->next_key_pos)
{
store_key_length_inc(key_pos,s_temp->n_ref_length);
if (s_temp->prev_length) /* If we must extend key */
{
memcpy(key_pos,s_temp->prev_key,s_temp->prev_length);
key_pos+= s_temp->prev_length;
}
}
s_temp->changed_length= (uint) (key_pos - org_key_pos);
} | O0 | c | ma_store_bin_pack_key:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x20(%rcx), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xff, 0x20(%rax)
jae 0x9ad89
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x9adc1
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x2c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x9ae95
movq -0x18(%rbp), %rax
cmpl $0xff, 0x28(%rax)
jae 0x9ae23
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x9ae5b
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x30(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x9ae93
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x18(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x9ae95
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x40(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
| _ma_store_bin_pack_key:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov eax, [rax+30h]
mov rcx, [rbp+var_18]
sub eax, [rcx+20h]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax+20h], 0FFh
jnb short loc_9AD89
mov rax, [rbp+var_18]
mov eax, [rax+20h]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_9ADC1
loc_9AD89:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax+20h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_2C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_9ADC1:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_18]
mov eax, [rax+20h]
add rsi, rax
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
cmp qword ptr [rax+10h], 0
jz loc_9AE95
mov rax, [rbp+var_18]
cmp dword ptr [rax+28h], 0FFh
jnb short loc_9AE23
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_9AE5B
loc_9AE23:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_30]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_9AE5B:
mov rax, [rbp+var_18]
cmp dword ptr [rax+38h], 0
jz short loc_9AE93
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov eax, [rax+38h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_18]
mov ecx, [rax+38h]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_9AE93:
jmp short $+2
loc_9AE95:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+40h], ecx
add rsp, 30h
pop rbp
retn
| long long ma_store_bin_pack_key(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v3; // rax
long long result; // rax
int v5; // [rsp+0h] [rbp-30h]
int v6; // [rsp+4h] [rbp-2Ch]
long long v7; // [rsp+8h] [rbp-28h]
_BYTE *v9; // [rsp+20h] [rbp-10h]
_BYTE *v10; // [rsp+20h] [rbp-10h]
v7 = (unsigned int)(*(_DWORD *)(a3 + 48) - *(_DWORD *)(a3 + 32));
if ( *(_DWORD *)(a3 + 32) >= 0xFFu )
{
*a2 = -1;
v6 = *(_DWORD *)(a3 + 32);
a2[2] = v6;
a2[1] = BYTE1(v6);
v9 = a2 + 3;
}
else
{
v9 = a2 + 1;
*a2 = *(_DWORD *)(a3 + 32);
}
memcpy(v9, *(unsigned int *)(a3 + 32) + *(_QWORD *)a3, v7);
v10 = &v9[v7];
if ( *(_QWORD *)(a3 + 16) )
{
if ( *(_DWORD *)(a3 + 40) >= 0xFFu )
{
*v10 = -1;
v5 = *(_DWORD *)(a3 + 40);
v10[2] = v5;
v10[1] = BYTE1(v5);
v10 += 3;
}
else
{
v3 = v10++;
*v3 = *(_DWORD *)(a3 + 40);
}
if ( *(_DWORD *)(a3 + 56) )
{
memcpy(v10, *(_QWORD *)(a3 + 8), *(unsigned int *)(a3 + 56));
LODWORD(v10) = *(_DWORD *)(a3 + 56) + (_DWORD)v10;
}
}
result = a3;
*(_DWORD *)(a3 + 64) = (_DWORD)v10 - (_DWORD)a2;
return result;
}
| _ma_store_bin_pack_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV RCX,qword ptr [RBP + -0x18]
SUB EAX,dword ptr [RCX + 0x20]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x20],0xff
JNC 0x0019ad89
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0019adc1
LAB_0019ad89:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x2c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0019adc1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0019ae95
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x28],0xff
JNC 0x0019ae23
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0019ae5b
LAB_0019ae23:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x30]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0019ae5b:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x38],0x0
JZ 0x0019ae93
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x38]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_0019ae93:
JMP 0x0019ae95
LAB_0019ae95:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],ECX
ADD RSP,0x30
POP RBP
RET
|
void _ma_store_bin_pack_key(int8 param_1,int1 *param_2,long *param_3)
{
long lVar1;
ulong __n;
int1 *local_18;
__n = (ulong)(uint)((int)param_3[6] - (int)param_3[4]);
if (*(uint *)(param_3 + 4) < 0xff) {
local_18 = param_2 + 1;
*param_2 = (char)(int)param_3[4];
}
else {
*param_2 = 0xff;
lVar1 = param_3[4];
param_2[2] = (char)(int)lVar1;
param_2[1] = (char)((uint)(int)lVar1 >> 8);
local_18 = param_2 + 3;
}
memcpy(local_18,(void *)(*param_3 + (ulong)*(uint *)(param_3 + 4)),__n);
local_18 = local_18 + __n;
if (param_3[2] != 0) {
if (*(uint *)(param_3 + 5) < 0xff) {
*local_18 = (char)(int)param_3[5];
local_18 = local_18 + 1;
}
else {
*local_18 = 0xff;
lVar1 = param_3[5];
local_18[2] = (char)(int)lVar1;
local_18[1] = (char)((uint)(int)lVar1 >> 8);
local_18 = local_18 + 3;
}
if ((int)param_3[7] != 0) {
memcpy(local_18,(void *)param_3[1],(ulong)*(uint *)(param_3 + 7));
local_18 = local_18 + *(uint *)(param_3 + 7);
}
}
*(int *)(param_3 + 8) = (int)local_18 - (int)param_2;
return;
}
| |
34,327 | mysql_handle_local_infile | eloqsql/libmariadb/libmariadb/ma_loaddata.c | my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename, my_bool can_local_infile)
{
unsigned int buflen= 4096;
int bufread;
unsigned char *buf= NULL;
void *info= NULL;
my_bool result= 1;
/* check if all callback functions exist */
if (!conn->options.local_infile_init || !conn->options.local_infile_end ||
!conn->options.local_infile_read || !conn->options.local_infile_error)
{
conn->options.local_infile_userdata= conn;
mysql_set_local_infile_default(conn);
}
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES) ||
!can_local_infile)
{
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* allocate buffer for reading data */
buf = (uchar *)malloc(buflen);
/* init handler: allocate read buffer and open file */
if (conn->options.local_infile_init(&info, filename,
conn->options.local_infile_userdata))
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno;
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (ma_net_write(&conn->net, (unsigned char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
}
/* send empty packet for eof */
if (ma_net_write(&conn->net, (unsigned char *)"", 0) ||
ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
goto infile_error;
}
result = 0;
infile_error:
conn->options.local_infile_end(info);
free(buf);
return(result);
} | O0 | c | mysql_handle_local_infile:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp # imm = 0x450
movb %dl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x418(%rbp)
movq %rsi, -0x420(%rbp)
movb %al, -0x421(%rbp)
movl $0x1000, -0x428(%rbp) # imm = 0x1000
movq $0x0, -0x438(%rbp)
movq $0x0, -0x440(%rbp)
movb $0x1, -0x441(%rbp)
movq -0x418(%rbp), %rax
cmpq $0x0, 0x458(%rax)
je 0x5f3e9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x468(%rax)
je 0x5f3e9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x460(%rax)
je 0x5f3e9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x470(%rax)
jne 0x5f40a
movq -0x418(%rbp), %rcx
movq -0x418(%rbp), %rax
movq %rcx, 0x478(%rax)
movq -0x418(%rbp), %rdi
callq 0x5f000
movq -0x418(%rbp), %rax
movq 0x3a8(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x5f42d
cmpb $0x0, -0x421(%rbp)
jne 0x5f479
movq -0x418(%rbp), %rdi
leaq 0x1ea595(%rip), %rax # 0x2499d0
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
leaq 0x80635(%rip), %rcx # 0xdfa7f
movb $0x0, %al
callq 0x47bd0
movq -0x418(%rbp), %rdi
leaq 0x7d6ed(%rip), %rsi # 0xdcb4c
xorl %eax, %eax
movl %eax, %edx
callq 0x77b50
movq -0x418(%rbp), %rdi
callq 0x77730
jmp 0x5f65c
movl -0x428(%rbp), %eax
movl %eax, %edi
callq 0x38920
movq %rax, -0x438(%rbp)
movq -0x418(%rbp), %rax
movq 0x458(%rax), %rax
movq -0x420(%rbp), %rsi
movq -0x418(%rbp), %rcx
movq 0x478(%rcx), %rdx
leaq -0x440(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x5f534
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x448(%rbp)
movq -0x418(%rbp), %rdi
movl -0x448(%rbp), %esi
leaq 0x1ea4d5(%rip), %rax # 0x2499d0
movq (%rax), %rdx
leaq -0x210(%rbp), %rcx
movb $0x0, %al
callq 0x47bd0
movq -0x418(%rbp), %rdi
leaq 0x7d632(%rip), %rsi # 0xdcb4c
xorl %eax, %eax
movl %eax, %edx
callq 0x77b50
movq -0x418(%rbp), %rdi
callq 0x77730
jmp 0x5f65c
jmp 0x5f536
movq -0x418(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x440(%rbp), %rdi
movq -0x438(%rbp), %rsi
movl -0x428(%rbp), %edx
callq *%rax
movl %eax, -0x42c(%rbp)
cmpl $0x0, %eax
jle 0x5f5ac
movq -0x418(%rbp), %rdi
movq -0x438(%rbp), %rsi
movslq -0x42c(%rbp), %rdx
callq 0x77b50
cmpl $0x0, %eax
je 0x5f5aa
movq -0x418(%rbp), %rdi
leaq 0x1ea43e(%rip), %rax # 0x2499d0
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x47bd0
jmp 0x5f65c
jmp 0x5f536
movq -0x418(%rbp), %rdi
leaq 0x7d592(%rip), %rsi # 0xdcb4c
xorl %eax, %eax
movl %eax, %edx
callq 0x77b50
cmpl $0x0, %eax
jne 0x5f5d9
movq -0x418(%rbp), %rdi
callq 0x77730
cmpl $0x0, %eax
je 0x5f5fc
movq -0x418(%rbp), %rdi
leaq 0x1ea3e9(%rip), %rax # 0x2499d0
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x47bd0
jmp 0x5f65c
cmpl $0x0, -0x42c(%rbp)
jge 0x5f655
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x44c(%rbp)
movq -0x418(%rbp), %rdi
movl -0x44c(%rbp), %esi
leaq 0x1ea38e(%rip), %rax # 0x2499d0
movq (%rax), %rdx
leaq -0x410(%rbp), %rcx
movb $0x0, %al
callq 0x47bd0
jmp 0x5f65c
movb $0x0, -0x441(%rbp)
movq -0x418(%rbp), %rax
movq 0x468(%rax), %rax
movq -0x440(%rbp), %rdi
callq *%rax
movq -0x438(%rbp), %rdi
callq 0x381b0
movb -0x441(%rbp), %al
movb %al, -0x44d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5f6ac
movb -0x44d(%rbp), %al
addq $0x450, %rsp # imm = 0x450
popq %rbp
retq
callq 0x382c0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| mysql_handle_local_infile:
push rbp
mov rbp, rsp
sub rsp, 450h
mov al, dl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_418], rdi
mov [rbp+var_420], rsi
mov [rbp+var_421], al
mov [rbp+var_428], 1000h
mov [rbp+var_438], 0
mov [rbp+var_440], 0
mov [rbp+var_441], 1
mov rax, [rbp+var_418]
cmp qword ptr [rax+458h], 0
jz short loc_5F3E9
mov rax, [rbp+var_418]
cmp qword ptr [rax+468h], 0
jz short loc_5F3E9
mov rax, [rbp+var_418]
cmp qword ptr [rax+460h], 0
jz short loc_5F3E9
mov rax, [rbp+var_418]
cmp qword ptr [rax+470h], 0
jnz short loc_5F40A
loc_5F3E9:
mov rcx, [rbp+var_418]
mov rax, [rbp+var_418]
mov [rax+478h], rcx
mov rdi, [rbp+var_418]
call mysql_set_local_infile_default
loc_5F40A:
mov rax, [rbp+var_418]
mov rax, [rax+3A8h]
and rax, 80h
cmp rax, 0
jz short loc_5F42D
cmp [rbp+var_421], 0
jnz short loc_5F479
loc_5F42D:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
lea rcx, aLoadDataLocalI; "Load data local infile forbidden"
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, asc_DCB4A+2; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_5F65C
loc_5F479:
mov eax, [rbp+var_428]
mov edi, eax
call _malloc
mov [rbp+var_438], rax
mov rax, [rbp+var_418]
mov rax, [rax+458h]
mov rsi, [rbp+var_420]
mov rcx, [rbp+var_418]
mov rdx, [rcx+478h]
lea rdi, [rbp+var_440]
call rax
cmp eax, 0
jz short loc_5F534
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_210]
mov edx, 200h
call rax
mov [rbp+var_448], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_448]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_210]
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, asc_DCB4A+2; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_5F65C
loc_5F534:
jmp short $+2
loc_5F536:
mov rax, [rbp+var_418]
mov rax, [rax+460h]
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_438]
mov edx, [rbp+var_428]
call rax
mov [rbp+var_42C], eax
cmp eax, 0
jle short loc_5F5AC
mov rdi, [rbp+var_418]
mov rsi, [rbp+var_438]
movsxd rdx, [rbp+var_42C]
call ma_net_write
cmp eax, 0
jz short loc_5F5AA
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp loc_5F65C
loc_5F5AA:
jmp short loc_5F536
loc_5F5AC:
mov rdi, [rbp+var_418]
lea rsi, asc_DCB4A+2; ""
xor eax, eax
mov edx, eax
call ma_net_write
cmp eax, 0
jnz short loc_5F5D9
mov rdi, [rbp+var_418]
call ma_net_flush
cmp eax, 0
jz short loc_5F5FC
loc_5F5D9:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp short loc_5F65C
loc_5F5FC:
cmp [rbp+var_42C], 0
jge short loc_5F655
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_410]
mov edx, 200h
call rax
mov [rbp+var_44C], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_44C]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_410]
mov al, 0
call my_set_error
jmp short loc_5F65C
loc_5F655:
mov [rbp+var_441], 0
loc_5F65C:
mov rax, [rbp+var_418]
mov rax, [rax+468h]
mov rdi, [rbp+var_440]
call rax
mov rdi, [rbp+var_438]
call _free
mov al, [rbp+var_441]
mov [rbp+var_44D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5F6AC
mov al, [rbp+var_44D]
add rsp, 450h
pop rbp
retn
loc_5F6AC:
call ___stack_chk_fail
| char mysql_handle_local_infile(_QWORD *a1, long long a2, char a3)
{
unsigned int v4; // [rsp+4h] [rbp-44Ch]
unsigned int v5; // [rsp+8h] [rbp-448h]
char v6; // [rsp+Fh] [rbp-441h]
long long v7; // [rsp+10h] [rbp-440h] BYREF
long long v8; // [rsp+18h] [rbp-438h]
int v9; // [rsp+24h] [rbp-42Ch]
unsigned int v10; // [rsp+28h] [rbp-428h]
char v11; // [rsp+2Fh] [rbp-421h]
long long v12; // [rsp+30h] [rbp-420h]
_QWORD *v13; // [rsp+38h] [rbp-418h]
_BYTE v14[512]; // [rsp+40h] [rbp-410h] BYREF
_BYTE v15[520]; // [rsp+240h] [rbp-210h] BYREF
unsigned long long v16; // [rsp+448h] [rbp-8h]
v16 = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
v10 = 4096;
v8 = 0LL;
v7 = 0LL;
v6 = 1;
if ( !a1[139] || !v13[141] || !v13[140] || !v13[142] )
{
v13[143] = v13;
mysql_set_local_infile_default(v13);
}
if ( (v13[117] & 0x80LL) != 0 && v11 )
{
v8 = malloc(v10);
if ( ((unsigned int ( *)(long long *, long long, _QWORD))v13[139])(&v7, v12, v13[143]) )
{
v5 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v15, 512LL);
my_set_error((long long)v13, v5, (long long)SQLSTATE_UNKNOWN, (long long)v15);
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
else
{
while ( 1 )
{
v9 = ((long long ( *)(long long, long long, _QWORD))v13[140])(v7, v8, v10);
if ( v9 <= 0 )
break;
if ( (unsigned int)ma_net_write(v13, v8, v9) )
goto LABEL_13;
}
if ( (unsigned int)ma_net_write(v13, "", 0LL) || (unsigned int)ma_net_flush(v13) )
{
LABEL_13:
my_set_error((long long)v13, 0x7DDu, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_21;
}
if ( v9 >= 0 )
{
v6 = 0;
}
else
{
v4 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v14, 512LL);
my_set_error((long long)v13, v4, (long long)SQLSTATE_UNKNOWN, (long long)v14);
}
}
}
else
{
my_set_error((long long)v13, 0x7D0u, (long long)SQLSTATE_UNKNOWN, (long long)"Load data local infile forbidden");
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
LABEL_21:
((void ( *)(long long))v13[141])(v7);
free(v8);
return v6;
}
| mysql_handle_local_infile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x450
MOV AL,DL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x418],RDI
MOV qword ptr [RBP + -0x420],RSI
MOV byte ptr [RBP + -0x421],AL
MOV dword ptr [RBP + -0x428],0x1000
MOV qword ptr [RBP + -0x438],0x0
MOV qword ptr [RBP + -0x440],0x0
MOV byte ptr [RBP + -0x441],0x1
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x458],0x0
JZ 0x0015f3e9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x468],0x0
JZ 0x0015f3e9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x460],0x0
JZ 0x0015f3e9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x470],0x0
JNZ 0x0015f40a
LAB_0015f3e9:
MOV RCX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RBP + -0x418]
MOV qword ptr [RAX + 0x478],RCX
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x0015f000
LAB_0015f40a:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x3a8]
AND RAX,0x80
CMP RAX,0x0
JZ 0x0015f42d
CMP byte ptr [RBP + -0x421],0x0
JNZ 0x0015f479
LAB_0015f42d:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x3499d0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
LEA RCX,[0x1dfa7f]
MOV AL,0x0
CALL 0x00147bd0
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x1dcb4c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00177b50
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00177730
JMP 0x0015f65c
LAB_0015f479:
MOV EAX,dword ptr [RBP + -0x428]
MOV EDI,EAX
CALL 0x00138920
MOV qword ptr [RBP + -0x438],RAX
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x458]
MOV RSI,qword ptr [RBP + -0x420]
MOV RCX,qword ptr [RBP + -0x418]
MOV RDX,qword ptr [RCX + 0x478]
LEA RDI,[RBP + -0x440]
CALL RAX
CMP EAX,0x0
JZ 0x0015f534
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x210]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x448],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x448]
LEA RAX,[0x3499d0]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x210]
MOV AL,0x0
CALL 0x00147bd0
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x1dcb4c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00177b50
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00177730
JMP 0x0015f65c
LAB_0015f534:
JMP 0x0015f536
LAB_0015f536:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x460]
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x438]
MOV EDX,dword ptr [RBP + -0x428]
CALL RAX
MOV dword ptr [RBP + -0x42c],EAX
CMP EAX,0x0
JLE 0x0015f5ac
MOV RDI,qword ptr [RBP + -0x418]
MOV RSI,qword ptr [RBP + -0x438]
MOVSXD RDX,dword ptr [RBP + -0x42c]
CALL 0x00177b50
CMP EAX,0x0
JZ 0x0015f5aa
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x3499d0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00147bd0
JMP 0x0015f65c
LAB_0015f5aa:
JMP 0x0015f536
LAB_0015f5ac:
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x1dcb4c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00177b50
CMP EAX,0x0
JNZ 0x0015f5d9
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00177730
CMP EAX,0x0
JZ 0x0015f5fc
LAB_0015f5d9:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x3499d0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00147bd0
JMP 0x0015f65c
LAB_0015f5fc:
CMP dword ptr [RBP + -0x42c],0x0
JGE 0x0015f655
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x410]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x44c],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x44c]
LEA RAX,[0x3499d0]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x410]
MOV AL,0x0
CALL 0x00147bd0
JMP 0x0015f65c
LAB_0015f655:
MOV byte ptr [RBP + -0x441],0x0
LAB_0015f65c:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x468]
MOV RDI,qword ptr [RBP + -0x440]
CALL RAX
MOV RDI,qword ptr [RBP + -0x438]
CALL 0x001381b0
MOV AL,byte ptr [RBP + -0x441]
MOV byte ptr [RBP + -0x44d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015f6ac
MOV AL,byte ptr [RBP + -0x44d]
ADD RSP,0x450
POP RBP
RET
LAB_0015f6ac:
CALL 0x001382c0
|
int8 mysql_handle_local_infile(long param_1,int8 param_2,char param_3)
{
int iVar1;
int4 uVar2;
long in_FS_OFFSET;
int1 local_449;
int8 local_448;
void *local_440;
int local_434;
uint local_430;
char local_429;
int8 local_428;
long local_420;
int1 local_418 [512];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_430 = 0x1000;
local_440 = (void *)0x0;
local_448 = 0;
local_449 = 1;
local_429 = param_3;
local_428 = param_2;
local_420 = param_1;
if ((((*(long *)(param_1 + 0x458) == 0) || (*(long *)(param_1 + 0x468) == 0)) ||
(*(long *)(param_1 + 0x460) == 0)) || (*(long *)(param_1 + 0x470) == 0)) {
*(long *)(param_1 + 0x478) = param_1;
mysql_set_local_infile_default(param_1);
}
if (((*(ulong *)(local_420 + 0x3a8) & 0x80) == 0) || (local_429 == '\0')) {
my_set_error(local_420,2000,SQLSTATE_UNKNOWN,"Load data local infile forbidden");
ma_net_write(local_420,&DAT_001dcb4c,0);
ma_net_flush(local_420);
}
else {
local_440 = malloc((ulong)local_430);
iVar1 = (**(code **)(local_420 + 0x458))
(&local_448,local_428,*(int8 *)(local_420 + 0x478));
if (iVar1 == 0) {
do {
local_434 = (**(code **)(local_420 + 0x460))(local_448,local_440,local_430);
if (local_434 < 1) {
iVar1 = ma_net_write(local_420,&DAT_001dcb4c,0);
if ((iVar1 == 0) && (iVar1 = ma_net_flush(local_420), iVar1 == 0)) {
if (local_434 < 0) {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_418,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_418);
}
else {
local_449 = 0;
}
}
else {
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
goto LAB_0015f65c;
}
iVar1 = ma_net_write(local_420,local_440,(long)local_434);
} while (iVar1 == 0);
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
else {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_218,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_218);
ma_net_write(local_420,&DAT_001dcb4c,0);
ma_net_flush(local_420);
}
}
LAB_0015f65c:
(**(code **)(local_420 + 0x468))(local_448);
free(local_440);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_449);
}
| |
34,328 | mysql_handle_local_infile | eloqsql/libmariadb/libmariadb/ma_loaddata.c | my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename, my_bool can_local_infile)
{
unsigned int buflen= 4096;
int bufread;
unsigned char *buf= NULL;
void *info= NULL;
my_bool result= 1;
/* check if all callback functions exist */
if (!conn->options.local_infile_init || !conn->options.local_infile_end ||
!conn->options.local_infile_read || !conn->options.local_infile_error)
{
conn->options.local_infile_userdata= conn;
mysql_set_local_infile_default(conn);
}
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES) ||
!can_local_infile)
{
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* allocate buffer for reading data */
buf = (uchar *)malloc(buflen);
/* init handler: allocate read buffer and open file */
if (conn->options.local_infile_init(&info, filename,
conn->options.local_infile_userdata))
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno;
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (ma_net_write(&conn->net, (unsigned char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
}
/* send empty packet for eof */
if (ma_net_write(&conn->net, (unsigned char *)"", 0) ||
ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
goto infile_error;
}
result = 0;
infile_error:
conn->options.local_infile_end(info);
free(buf);
return(result);
} | O3 | c | mysql_handle_local_infile:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r15
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x238(%rbp)
movq 0x458(%rdi), %r12
testq %r12, %r12
je 0x519a9
cmpq $0x0, 0x468(%rbx)
je 0x519a9
cmpq $0x0, 0x460(%rbx)
je 0x519a9
cmpq $0x0, 0x470(%rbx)
jne 0x519e8
movq %rbx, 0x478(%rbx)
leaq -0x261(%rip), %r12 # 0x51756
movq %r12, 0x458(%rbx)
leaq -0x17e(%rip), %rax # 0x51847
movq %rax, 0x460(%rbx)
leaq -0x118(%rip), %rax # 0x518bb
movq %rax, 0x470(%rbx)
leaq -0xe5(%rip), %rax # 0x518fc
movq %rax, 0x468(%rbx)
testb %dl, %dl
je 0x51aca
movq 0x3a8(%rbx), %rax
andl $0x80, %eax
je 0x51aca
movl $0x1000, %edi # imm = 0x1000
callq 0x37950
movq %rax, %r14
movq 0x478(%rbx), %rdx
leaq -0x238(%rbp), %rdi
movq %r15, %rsi
callq *%r12
testl %eax, %eax
je 0x51a6c
movq -0x238(%rbp), %rdi
leaq -0x230(%rbp), %r15
movq %r15, %rsi
movl $0x200, %edx # imm = 0x200
callq *0x470(%rbx)
leaq 0x2fbb36(%rip), %rcx # 0x34d580
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rcx
jmp 0x51ae6
movl %r15d, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x60207
testl %eax, %eax
jne 0x51aad
movq -0x238(%rbp), %rdi
movq %r14, %rsi
movl $0x1000, %edx # imm = 0x1000
callq *0x460(%rbx)
movl %eax, %r15d
testl %eax, %eax
jg 0x51a5a
leaq 0x500e8(%rip), %rsi # 0xa1b77
movq %rbx, %rdi
xorl %edx, %edx
callq 0x60207
testl %eax, %eax
jne 0x51aad
movq %rbx, %rdi
callq 0x5ffc2
testl %eax, %eax
je 0x51b40
leaq 0x2fbacc(%rip), %rax # 0x34d580
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7dd, %esi # imm = 0x7DD
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x4459d
jmp 0x51b06
leaq 0x2fbaaf(%rip), %rax # 0x34d580
movq (%rax), %rdx
leaq 0x52f7f(%rip), %rcx # 0xa4a5a
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x7d0, %esi # imm = 0x7D0
xorl %eax, %eax
callq 0x4459d
leaq 0x50083(%rip), %rsi # 0xa1b77
movq %rbx, %rdi
xorl %edx, %edx
callq 0x60207
movq %rbx, %rdi
callq 0x5ffc2
movb $0x1, %r15b
movq -0x238(%rbp), %rdi
callq *0x468(%rbx)
movq %r14, %rdi
callq 0x37190
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x51b7d
movl %r15d, %eax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
js 0x51b4a
xorl %r15d, %r15d
jmp 0x51b09
movq -0x238(%rbp), %rdi
leaq -0x230(%rbp), %r15
movq %r15, %rsi
movl $0x200, %edx # imm = 0x200
callq *0x470(%rbx)
leaq 0x2fba13(%rip), %rcx # 0x34d580
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rcx
jmp 0x51ac1
callq 0x372b0
nop
| mysql_handle_local_infile:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r15, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
mov [rbp+var_238], 0
mov r12, [rdi+458h]
test r12, r12
jz short loc_519A9
cmp qword ptr [rbx+468h], 0
jz short loc_519A9
cmp qword ptr [rbx+460h], 0
jz short loc_519A9
cmp qword ptr [rbx+470h], 0
jnz short loc_519E8
loc_519A9:
mov [rbx+478h], rbx
lea r12, mysql_local_infile_init
mov [rbx+458h], r12
lea rax, mysql_local_infile_read
mov [rbx+460h], rax
lea rax, mysql_local_infile_error
mov [rbx+470h], rax
lea rax, mysql_local_infile_end
mov [rbx+468h], rax
loc_519E8:
test dl, dl
jz loc_51ACA
mov rax, [rbx+3A8h]
and eax, 80h
jz loc_51ACA
mov edi, 1000h
call _malloc
mov r14, rax
mov rdx, [rbx+478h]
lea rdi, [rbp+var_238]
mov rsi, r15
call r12
test eax, eax
jz short loc_51A6C
mov rdi, [rbp+var_238]
lea r15, [rbp+var_230]
mov rsi, r15
mov edx, 200h
call qword ptr [rbx+470h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rdi, rbx
mov esi, eax
mov rcx, r15
jmp loc_51AE6
loc_51A5A:
mov edx, r15d
mov rdi, rbx
mov rsi, r14
call ma_net_write
test eax, eax
jnz short loc_51AAD
loc_51A6C:
mov rdi, [rbp+var_238]
mov rsi, r14
mov edx, 1000h
call qword ptr [rbx+460h]
mov r15d, eax
test eax, eax
jg short loc_51A5A
lea rsi, asc_A1B75+2; ""
mov rdi, rbx
xor edx, edx
call ma_net_write
test eax, eax
jnz short loc_51AAD
mov rdi, rbx
call ma_net_flush
test eax, eax
jz loc_51B40
loc_51AAD:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7DDh
xor ecx, ecx
loc_51AC1:
xor eax, eax
call my_set_error
jmp short loc_51B06
loc_51ACA:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, aLoadDataLocalI; "Load data local infile forbidden"
xor r14d, r14d
mov rdi, rbx
mov esi, 7D0h
loc_51AE6:
xor eax, eax
call my_set_error
lea rsi, asc_A1B75+2; ""
mov rdi, rbx
xor edx, edx
call ma_net_write
mov rdi, rbx
call ma_net_flush
loc_51B06:
mov r15b, 1
loc_51B09:
mov rdi, [rbp+var_238]
call qword ptr [rbx+468h]
mov rdi, r14
call _free
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_51B7D
mov eax, r15d
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_51B40:
test r15d, r15d
js short loc_51B4A
xor r15d, r15d
jmp short loc_51B09
loc_51B4A:
mov rdi, [rbp+var_238]
lea r15, [rbp+var_230]
mov rsi, r15
mov edx, 200h
call qword ptr [rbx+470h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rdi, rbx
mov esi, eax
mov rcx, r15
jmp loc_51AC1
loc_51B7D:
call ___stack_chk_fail
| long long mysql_handle_local_infile(_QWORD *a1, long long a2, char a3)
{
char *v3; // r15
long long ( *v4)(long long *, long long, long long); // r12
long long v5; // r14
int v6; // eax
int v7; // eax
int v9; // eax
long long v10; // [rsp+8h] [rbp-238h] BYREF
char v11[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v12; // [rsp+218h] [rbp-28h]
LODWORD(v3) = a2;
v12 = __readfsqword(0x28u);
v10 = 0LL;
v4 = (long long ( *)(long long *, long long, long long))a1[139];
if ( !v4 || !a1[141] || !a1[140] || !a1[142] )
{
a1[143] = a1;
v4 = mysql_local_infile_init;
a1[139] = mysql_local_infile_init;
a1[140] = mysql_local_infile_read;
a1[142] = mysql_local_infile_error;
a1[141] = mysql_local_infile_end;
}
if ( !a3 || (a1[117] & 0x80) == 0 )
{
v5 = 0LL;
my_set_error((long long)a1, 2000, (long long)SQLSTATE_UNKNOWN, "Load data local infile forbidden");
goto LABEL_17;
}
v5 = malloc(4096LL);
if ( (unsigned int)v4(&v10, a2, a1[143]) )
{
v3 = v11;
v6 = ((long long ( *)(long long, char *, long long))a1[142])(v10, v11, 512LL);
my_set_error((long long)a1, v6, (long long)SQLSTATE_UNKNOWN, v11);
LABEL_17:
ma_net_write(a1, "", 0LL);
ma_net_flush(a1);
goto LABEL_18;
}
while ( 1 )
{
v7 = ((long long ( *)(long long, long long, long long))a1[140])(v10, v5, 4096LL);
LODWORD(v3) = v7;
if ( v7 <= 0 )
break;
if ( (unsigned int)ma_net_write(a1, v5, (unsigned int)v7) )
goto LABEL_14;
}
if ( (unsigned int)ma_net_write(a1, "", 0LL) || (unsigned int)ma_net_flush(a1) )
{
LABEL_14:
my_set_error((long long)a1, 2013, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_18;
}
if ( (int)v3 >= 0 )
{
LODWORD(v3) = 0;
goto LABEL_19;
}
v3 = v11;
v9 = ((long long ( *)(long long, char *, long long))a1[142])(v10, v11, 512LL);
my_set_error((long long)a1, v9, (long long)SQLSTATE_UNKNOWN, v11);
LABEL_18:
LOBYTE(v3) = 1;
LABEL_19:
((void ( *)(long long))a1[141])(v10);
free(v5);
return (unsigned int)v3;
}
| mysql_handle_local_infile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x238],0x0
MOV R12,qword ptr [RDI + 0x458]
TEST R12,R12
JZ 0x001519a9
CMP qword ptr [RBX + 0x468],0x0
JZ 0x001519a9
CMP qword ptr [RBX + 0x460],0x0
JZ 0x001519a9
CMP qword ptr [RBX + 0x470],0x0
JNZ 0x001519e8
LAB_001519a9:
MOV qword ptr [RBX + 0x478],RBX
LEA R12,[0x151756]
MOV qword ptr [RBX + 0x458],R12
LEA RAX,[0x151847]
MOV qword ptr [RBX + 0x460],RAX
LEA RAX,[0x1518bb]
MOV qword ptr [RBX + 0x470],RAX
LEA RAX,[0x1518fc]
MOV qword ptr [RBX + 0x468],RAX
LAB_001519e8:
TEST DL,DL
JZ 0x00151aca
MOV RAX,qword ptr [RBX + 0x3a8]
AND EAX,0x80
JZ 0x00151aca
MOV EDI,0x1000
CALL 0x00137950
MOV R14,RAX
MOV RDX,qword ptr [RBX + 0x478]
LEA RDI,[RBP + -0x238]
MOV RSI,R15
CALL R12
TEST EAX,EAX
JZ 0x00151a6c
MOV RDI,qword ptr [RBP + -0x238]
LEA R15,[RBP + -0x230]
MOV RSI,R15
MOV EDX,0x200
CALL qword ptr [RBX + 0x470]
LEA RCX,[0x44d580]
MOV RDX,qword ptr [RCX]
MOV RDI,RBX
MOV ESI,EAX
MOV RCX,R15
JMP 0x00151ae6
LAB_00151a5a:
MOV EDX,R15D
MOV RDI,RBX
MOV RSI,R14
CALL 0x00160207
TEST EAX,EAX
JNZ 0x00151aad
LAB_00151a6c:
MOV RDI,qword ptr [RBP + -0x238]
MOV RSI,R14
MOV EDX,0x1000
CALL qword ptr [RBX + 0x460]
MOV R15D,EAX
TEST EAX,EAX
JG 0x00151a5a
LEA RSI,[0x1a1b77]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00160207
TEST EAX,EAX
JNZ 0x00151aad
MOV RDI,RBX
CALL 0x0015ffc2
TEST EAX,EAX
JZ 0x00151b40
LAB_00151aad:
LEA RAX,[0x44d580]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7dd
XOR ECX,ECX
LAB_00151ac1:
XOR EAX,EAX
CALL 0x0014459d
JMP 0x00151b06
LAB_00151aca:
LEA RAX,[0x44d580]
MOV RDX,qword ptr [RAX]
LEA RCX,[0x1a4a5a]
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,0x7d0
LAB_00151ae6:
XOR EAX,EAX
CALL 0x0014459d
LEA RSI,[0x1a1b77]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00160207
MOV RDI,RBX
CALL 0x0015ffc2
LAB_00151b06:
MOV R15B,0x1
LAB_00151b09:
MOV RDI,qword ptr [RBP + -0x238]
CALL qword ptr [RBX + 0x468]
MOV RDI,R14
CALL 0x00137190
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00151b7d
MOV EAX,R15D
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00151b40:
TEST R15D,R15D
JS 0x00151b4a
XOR R15D,R15D
JMP 0x00151b09
LAB_00151b4a:
MOV RDI,qword ptr [RBP + -0x238]
LEA R15,[RBP + -0x230]
MOV RSI,R15
MOV EDX,0x200
CALL qword ptr [RBX + 0x470]
LEA RCX,[0x44d580]
MOV RDX,qword ptr [RCX]
MOV RDI,RBX
MOV ESI,EAX
MOV RCX,R15
JMP 0x00151ac1
LAB_00151b7d:
CALL 0x001372b0
|
ulong mysql_handle_local_infile(long param_1,char *param_2,char param_3)
{
int iVar1;
int4 uVar2;
uint uVar3;
void *__ptr;
char *pcVar4;
code *pcVar5;
ulong uVar6;
long in_FS_OFFSET;
int8 local_240;
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_240 = 0;
pcVar5 = *(code **)(param_1 + 0x458);
if ((((pcVar5 == (code *)0x0) || (*(long *)(param_1 + 0x468) == 0)) ||
(*(long *)(param_1 + 0x460) == 0)) || (*(long *)(param_1 + 0x470) == 0)) {
*(long *)(param_1 + 0x478) = param_1;
pcVar5 = mysql_local_infile_init;
*(code **)(param_1 + 0x458) = mysql_local_infile_init;
*(code **)(param_1 + 0x460) = mysql_local_infile_read;
*(code **)(param_1 + 0x470) = mysql_local_infile_error;
*(code **)(param_1 + 0x468) = mysql_local_infile_end;
}
if ((param_3 == '\0') || ((*(ulong *)(param_1 + 0x3a8) & 0x80) == 0)) {
pcVar4 = "Load data local infile forbidden";
__ptr = (void *)0x0;
uVar2 = 2000;
}
else {
__ptr = malloc(0x1000);
iVar1 = (*pcVar5)(&local_240,param_2,*(int8 *)(param_1 + 0x478));
if (iVar1 == 0) {
do {
uVar3 = (**(code **)(param_1 + 0x460))(local_240,__ptr,0x1000);
if ((int)uVar3 < 1) {
iVar1 = ma_net_write(param_1,&DAT_001a1b77,0);
if (iVar1 == 0) {
iVar1 = ma_net_flush(param_1);
if (iVar1 == 0) {
if (-1 < (int)uVar3) {
uVar6 = 0;
goto LAB_00151b09;
}
pcVar4 = local_238;
uVar2 = (**(code **)(param_1 + 0x470))(local_240,pcVar4,0x200);
param_2 = pcVar4;
goto LAB_00151ac1;
}
}
break;
}
iVar1 = ma_net_write(param_1,__ptr,(char *)(ulong)uVar3);
} while (iVar1 == 0);
uVar2 = 0x7dd;
pcVar4 = (char *)0x0;
param_2 = (char *)(ulong)uVar3;
LAB_00151ac1:
my_set_error(param_1,uVar2,SQLSTATE_UNKNOWN,pcVar4);
goto LAB_00151b06;
}
pcVar4 = local_238;
uVar2 = (**(code **)(param_1 + 0x470))(local_240,pcVar4,0x200);
param_2 = pcVar4;
}
my_set_error(param_1,uVar2,SQLSTATE_UNKNOWN,pcVar4);
ma_net_write(param_1,&DAT_001a1b77,0);
ma_net_flush(param_1);
LAB_00151b06:
uVar6 = CONCAT71((int7)((ulong)param_2 >> 8),1);
LAB_00151b09:
(**(code **)(param_1 + 0x468))(local_240);
free(__ptr);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar6 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
34,329 | common_log::set_colors(bool) | monkey531[P]llama/common/log.cpp | void set_colors(bool colors) {
pause();
if (colors) {
g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT;
g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD;
g_col[COMMON_LOG_COL_RED] = LOG_COL_RED;
g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN;
g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW;
g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE;
g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA;
g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN;
g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE;
} else {
for (size_t i = 0; i < g_col.size(); i++) {
g_col[i] = "";
}
}
resume();
} | O3 | cpp | common_log::set_colors(bool):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xcc67a
testl %ebp, %ebp
je 0xccb39
movq 0x62962(%rip), %rax # 0x12f430
leaq 0x2a3b6(%rip), %rcx # 0xf6e8b
movq %rcx, (%rax)
movq 0x62951(%rip), %rax # 0x12f430
leaq 0x2a3aa(%rip), %rcx # 0xf6e90
movq %rcx, 0x8(%rax)
leaq 0x2a3a4(%rip), %rcx # 0xf6e95
movq %rcx, 0x10(%rax)
leaq 0x2a39f(%rip), %rcx # 0xf6e9b
movq %rcx, 0x18(%rax)
leaq 0x2a39a(%rip), %rcx # 0xf6ea1
movq %rcx, 0x20(%rax)
leaq 0x2a395(%rip), %rcx # 0xf6ea7
movq %rcx, 0x28(%rax)
leaq 0x2a390(%rip), %rcx # 0xf6ead
movq %rcx, 0x30(%rax)
leaq 0x2a38b(%rip), %rcx # 0xf6eb3
movq %rcx, 0x38(%rax)
leaq 0x2a386(%rip), %rcx # 0xf6eb9
movq %rcx, 0x40(%rax)
jmp 0xccb73
movq 0x628f0(%rip), %rax # 0x12f430
cmpq %rax, 0x628f1(%rip) # 0x12f438
je 0xccb73
xorl %ecx, %ecx
leaq 0x20dda(%rip), %rdx # 0xed92c
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq 0x628d8(%rip), %rsi # 0x12f438
movq 0x628c9(%rip), %rax # 0x12f430
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rcx
jb 0xccb52
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xcc702
nop
| _ZN10common_log10set_colorsEb:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
test ebp, ebp
jz short loc_CCB39
mov rax, cs:_ZL5g_col; g_col
lea rcx, a0m; "\x1B[0m"
mov [rax], rcx
mov rax, cs:_ZL5g_col; g_col
lea rcx, a1m; "\x1B[1m"
mov [rax+8], rcx
lea rcx, a31m; "\x1B[31m"
mov [rax+10h], rcx
lea rcx, a32m; "\x1B[32m"
mov [rax+18h], rcx
lea rcx, a33m; "\x1B[33m"
mov [rax+20h], rcx
lea rcx, a34m; "\x1B[34m"
mov [rax+28h], rcx
lea rcx, a35m; "\x1B[35m"
mov [rax+30h], rcx
lea rcx, a36m; "\x1B[36m"
mov [rax+38h], rcx
lea rcx, a37m; "\x1B[37m"
mov [rax+40h], rcx
jmp short loc_CCB73
loc_CCB39:
mov rax, cs:_ZL5g_col; g_col
cmp cs:qword_12F438, rax
jz short loc_CCB73
xor ecx, ecx
lea rdx, aErrorWhileHand_0+34h; ""
loc_CCB52:
mov [rax+rcx*8], rdx
inc rcx
mov rsi, cs:qword_12F438
mov rax, cs:_ZL5g_col; g_col
sub rsi, rax
sar rsi, 3
cmp rcx, rsi
jb short loc_CCB52
loc_CCB73:
mov rdi, rbx; this
add rsp, 8
pop rbx
pop rbp
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_colors(common_log *this, int a2)
{
_QWORD *v2; // rax
long long v3; // rax
unsigned long long v4; // rcx
common_log::pause(this);
if ( a2 )
{
*(_QWORD *)g_col = "\x1B[0m";
v2 = (_QWORD *)g_col;
*(_QWORD *)(g_col + 8) = "\x1B[1m";
v2[2] = "\x1B[31m";
v2[3] = "\x1B[32m";
v2[4] = "\x1B[33m";
v2[5] = "\x1B[34m";
v2[6] = "\x1B[35m";
v2[7] = "\x1B[36m";
v2[8] = "\x1B[37m";
}
else
{
v3 = g_col;
if ( qword_12F438 != g_col )
{
v4 = 0LL;
do
{
*(_QWORD *)(v3 + 8 * v4++) = "";
v3 = g_col;
}
while ( v4 < (qword_12F438 - g_col) >> 3 );
}
}
return common_log::resume(this);
}
| set_colors:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001cc67a
TEST EBP,EBP
JZ 0x001ccb39
MOV RAX,qword ptr [0x0022f430]
LEA RCX,[0x1f6e8b]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [0x0022f430]
LEA RCX,[0x1f6e90]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x1f6e95]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[0x1f6e9b]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1f6ea1]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[0x1f6ea7]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[0x1f6ead]
MOV qword ptr [RAX + 0x30],RCX
LEA RCX,[0x1f6eb3]
MOV qword ptr [RAX + 0x38],RCX
LEA RCX,[0x1f6eb9]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x001ccb73
LAB_001ccb39:
MOV RAX,qword ptr [0x0022f430]
CMP qword ptr [0x0022f438],RAX
JZ 0x001ccb73
XOR ECX,ECX
LEA RDX,[0x1ed92c]
LAB_001ccb52:
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RSI,qword ptr [0x0022f438]
MOV RAX,qword ptr [0x0022f430]
SUB RSI,RAX
SAR RSI,0x3
CMP RCX,RSI
JC 0x001ccb52
LAB_001ccb73:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001cc702
|
/* common_log::set_colors(bool) */
void __thiscall common_log::set_colors(common_log *this,bool param_1)
{
int8 *puVar1;
ulong uVar2;
int7 in_register_00000031;
pause(this);
if ((int)CONCAT71(in_register_00000031,param_1) == 0) {
if (DAT_0022f438 != g_col) {
uVar2 = 0;
do {
g_col[uVar2] = "";
uVar2 = uVar2 + 1;
} while (uVar2 < (ulong)((long)DAT_0022f438 - (long)g_col >> 3));
}
}
else {
*g_col = &DAT_001f6e8b;
puVar1 = g_col;
g_col[1] = &DAT_001f6e90;
puVar1[2] = &DAT_001f6e95;
puVar1[3] = &DAT_001f6e9b;
puVar1[4] = &DAT_001f6ea1;
puVar1[5] = &DAT_001f6ea7;
puVar1[6] = &DAT_001f6ead;
puVar1[7] = &DAT_001f6eb3;
puVar1[8] = &DAT_001f6eb9;
}
resume(this);
return;
}
| |
34,330 | mi_uniquedef_write | eloqsql/storage/myisam/mi_open.c | uint mi_uniquedef_write(File file, MI_UNIQUEDEF *def)
{
uchar buff[MI_UNIQUEDEF_SIZE];
uchar *ptr=buff;
mi_int2store(ptr,def->keysegs); ptr+=2;
*ptr++= (uchar) def->key;
*ptr++ = (uchar) def->null_are_equal;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_uniquedef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movzwl (%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1c(%rbp)
movb 0x2(%rsi), %al
movb %al, -0x1a(%rbp)
movb 0x3(%rsi), %al
movb %al, -0x19(%rbp)
leaq 0x2f7e99(%rip), %rax # 0x330350
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3850a
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2a301
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x38524
movb %cl, %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1c(%rbp), %rdx
leaq -0x28(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x29525
movq (%r14), %rcx
jmp 0x384e8
callq 0x283d0
| mi_uniquedef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_18], rax
movzx eax, word ptr [rsi]
rol ax, 8
mov ebx, edi
mov [rbp+var_1C], ax
mov al, [rsi+2]
mov [rbp+var_1A], al
mov al, [rsi+3]
mov [rbp+var_19], al
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3850A
lea rsi, [rbp+var_1C]
mov edx, 4
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_384E8:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_38524
mov al, cl
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_3850A:
lea rdx, [rbp+var_1C]
lea r14, [rbp+var_28]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_uniquedef_write_cold_1
mov rcx, [r14]
jmp short loc_384E8
loc_38524:
call ___stack_chk_fail
| bool mi_uniquedef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF
long long v7; // [rsp+48h] [rbp-28h] BYREF
__int16 v8; // [rsp+54h] [rbp-1Ch] BYREF
char v9; // [rsp+56h] [rbp-1Ah]
char v10; // [rsp+57h] [rbp-19h]
unsigned long long v11; // [rsp+58h] [rbp-18h]
v11 = __readfsqword(0x28u);
v8 = __ROL2__(*(_WORD *)a2, 8);
v9 = *(_BYTE *)(a2 + 2);
v10 = *(_BYTE *)(a2 + 3);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_uniquedef_write_cold_1(v2, a1, (long long)&v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)&v8, 4LL, 4LL);
}
return v3 != 0;
}
| mi_uniquedef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOVZX EAX,word ptr [RSI]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1c],AX
MOV AL,byte ptr [RSI + 0x2]
MOV byte ptr [RBP + -0x1a],AL
MOV AL,byte ptr [RSI + 0x3]
MOV byte ptr [RBP + -0x19],AL
LEA RAX,[0x430350]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013850a
LEA RSI,[RBP + -0x1c]
MOV EDX,0x4
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012a301
MOV RCX,RAX
LAB_001384e8:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x00138524
MOV AL,CL
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0013850a:
LEA RDX,[RBP + -0x1c]
LEA R14,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x00129525
MOV RCX,qword ptr [R14]
JMP 0x001384e8
LAB_00138524:
CALL 0x001283d0
|
bool mi_uniquedef_write(int4 param_1,ushort *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_78 [72];
long local_30;
ushort local_24;
int1 local_22;
int1 local_21;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_24 = *param_2 << 8 | *param_2 >> 8;
local_22 = (int1)param_2[1];
local_21 = *(int1 *)((long)param_2 + 3);
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7);
if (lVar1 == 0) {
local_30 = my_write(param_1,&local_24,4,4);
}
else {
mi_uniquedef_write_cold_1(lVar1,param_1,&local_24,&local_30);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_30 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
34,331 | ma_cmp_dynamic_unique | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_cmp_dynamic_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record, MARIA_RECORD_POS pos)
{
uchar *old_rec_buff,*old_record;
size_t old_rec_buff_size;
my_bool error, buff_alloced;
DBUG_ENTER("_ma_cmp_dynamic_unique");
alloc_on_stack(*info->stack_end_ptr, old_record, buff_alloced,
info->s->base.reclength);
if (!old_record)
DBUG_RETURN(1);
/* Don't let the compare destroy blobs that may be in use */
old_rec_buff= info->rec_buff;
old_rec_buff_size= info->rec_buff_size;
if (info->s->base.blobs)
{
info->rec_buff= 0;
info->rec_buff_size= 0;
}
error= _ma_read_dynamic_record(info, old_record, pos) != 0;
if (!error)
error=_ma_unique_comp(def, record, old_record, def->null_are_equal) != 0;
if (info->s->base.blobs)
{
my_free(info->rec_buff);
info->rec_buff= old_rec_buff;
info->rec_buff_size= old_rec_buff_size;
}
stack_alloc_free(old_record, buff_alloced);
DBUG_RETURN(error);
} | O0 | c | ma_cmp_dynamic_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x398(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0x58(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x4154f
movq -0x60(%rbp), %rcx
subq -0x58(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x41526
movq -0x60(%rbp), %rcx
subq -0x58(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x4154f
movl $0x1000, %eax # imm = 0x1000
cmpq -0x58(%rbp), %rax
ja 0x4154f
movb $0x0, -0x4a(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x398(%rax), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x40(%rbp)
jmp 0x41571
movb $0x1, -0x4a(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x398(%rax), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf4be0
movq %rax, -0x40(%rbp)
jmp 0x41573
cmpq $0x0, -0x40(%rbp)
jne 0x41585
jmp 0x4157c
movb $0x1, -0x9(%rbp)
jmp 0x41671
movq -0x18(%rbp), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x460(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x415d1
movq -0x18(%rbp), %rax
movq $0x0, 0x3a0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x460(%rax)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x41040
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x49(%rbp)
cmpb $0x0, -0x49(%rbp)
jne 0x41620
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0x474d0
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x49(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x4165e
movq -0x18(%rbp), %rax
movq 0x3a0(%rax), %rdi
callq 0xf4f60
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x3a0(%rax)
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x460(%rax)
movq -0x40(%rbp), %rdi
movsbl -0x4a(%rbp), %esi
callq 0x3df80
movb -0x49(%rbp), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movb %al, -0x61(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x41691
movb -0x61(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _ma_cmp_dynamic_unique:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+398h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_58]
sub rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
cmp rax, [rbp+var_58]
jbe short loc_4154F
mov rcx, [rbp+var_60]
sub rcx, [rbp+var_58]
mov eax, 10000h
cmp rax, rcx
jb short loc_41526
mov rcx, [rbp+var_60]
sub rcx, [rbp+var_58]
mov eax, 8000h
cmp rax, rcx
jnb short loc_4154F
mov eax, 1000h
cmp rax, [rbp+var_58]
ja short loc_4154F
loc_41526:
mov [rbp+var_4A], 0
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rax+398h]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_40], rax
jmp short loc_41571
loc_4154F:
mov [rbp+var_4A], 1
mov rax, [rbp+var_18]
mov rax, [rax]
mov rsi, [rax+398h]
xor edi, edi
mov edx, offset stru_10010
call my_malloc
mov [rbp+var_40], rax
loc_41571:
jmp short $+2
loc_41573:
cmp [rbp+var_40], 0
jnz short loc_41585
jmp short $+2
loc_4157C:
mov [rbp+var_9], 1
jmp loc_41671
loc_41585:
mov rax, [rbp+var_18]
mov rax, [rax+3A0h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov rax, [rax+460h]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov rax, [rax]
cmp dword ptr [rax+3F0h], 0
jz short loc_415D1
mov rax, [rbp+var_18]
mov qword ptr [rax+3A0h], 0
mov rax, [rbp+var_18]
mov qword ptr [rax+460h], 0
loc_415D1:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_30]
call _ma_read_dynamic_record
cmp eax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_49], al
cmp [rbp+var_49], 0
jnz short loc_41620
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_20]
movsx ecx, byte ptr [rax+3]
call _ma_unique_comp
movsx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_49], al
loc_41620:
mov rax, [rbp+var_18]
mov rax, [rax]
cmp dword ptr [rax+3F0h], 0
jz short loc_4165E
mov rax, [rbp+var_18]
mov rdi, [rax+3A0h]
call my_free
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
mov [rax+3A0h], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_18]
mov [rax+460h], rcx
loc_4165E:
mov rdi, [rbp+var_40]
movsx esi, [rbp+var_4A]
call stack_alloc_free
mov al, [rbp+var_49]
mov [rbp+var_9], al
loc_41671:
mov al, [rbp+var_9]
mov [rbp+var_61], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_41691
mov al, [rbp+var_61]
mov rsp, rbp
pop rbp
retn
loc_41691:
call ___stack_chk_fail
| char ma_cmp_dynamic_unique(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
unsigned long long v6; // rcx
int dynamic_record; // eax
long long v9; // [rsp+0h] [rbp-70h] BYREF
unsigned long long v10; // [rsp+10h] [rbp-60h]
unsigned long long v11; // [rsp+18h] [rbp-58h] BYREF
char v12; // [rsp+26h] [rbp-4Ah]
bool v13; // [rsp+27h] [rbp-49h]
long long v14; // [rsp+28h] [rbp-48h]
unsigned __int8 *v15; // [rsp+30h] [rbp-40h]
long long v16; // [rsp+38h] [rbp-38h]
long long v17; // [rsp+40h] [rbp-30h]
long long v18; // [rsp+48h] [rbp-28h]
long long v19; // [rsp+50h] [rbp-20h]
_QWORD *v20; // [rsp+58h] [rbp-18h]
unsigned long long v22; // [rsp+68h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v11 = *(_QWORD *)(*a1 + 920LL);
v10 = *(_QWORD *)a1[15] - (_QWORD)&v11;
if ( v10 <= v11 || v10 - v11 <= 0x10000 && (v10 - v11 <= 0x8000 || v11 < 0x1000) )
{
v12 = 1;
v15 = (unsigned __int8 *)my_malloc(0LL, *(_QWORD *)(*v20 + 920LL), &stru_10010);
}
else
{
v12 = 0;
v6 = (*(_QWORD *)(*v20 + 920LL) + 15LL) & 0xFFFFFFFFFFFFFFF0LL;
v15 = (unsigned __int8 *)&v9 - v6;
}
if ( !v15 )
return 1;
v16 = v20[116];
v14 = v20[140];
if ( *(_DWORD *)(*v20 + 1008LL) )
{
v20[116] = 0LL;
v20[140] = 0LL;
}
dynamic_record = ma_read_dynamic_record((long long)v20, v15, v17, v6, a5, a6);
v13 = dynamic_record != 0;
if ( !dynamic_record )
v13 = (char)ma_unique_comp(v19, v18, v15, (unsigned int)*(char *)(v19 + 3)) != 0;
if ( *(_DWORD *)(*v20 + 1008LL) )
{
my_free(v20[116]);
v20[116] = v16;
v20[140] = v14;
}
stack_alloc_free((long long)v15, v12);
return v13;
}
| _ma_cmp_dynamic_unique:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x398]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0x58]
SUB RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0014154f
MOV RCX,qword ptr [RBP + -0x60]
SUB RCX,qword ptr [RBP + -0x58]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x00141526
MOV RCX,qword ptr [RBP + -0x60]
SUB RCX,qword ptr [RBP + -0x58]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x0014154f
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0x58]
JA 0x0014154f
LAB_00141526:
MOV byte ptr [RBP + -0x4a],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x398]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00141571
LAB_0014154f:
MOV byte ptr [RBP + -0x4a],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x398]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f4be0
MOV qword ptr [RBP + -0x40],RAX
LAB_00141571:
JMP 0x00141573
LAB_00141573:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00141585
JMP 0x0014157c
LAB_0014157c:
MOV byte ptr [RBP + -0x9],0x1
JMP 0x00141671
LAB_00141585:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x460]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x001415d1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x3a0],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x460],0x0
LAB_001415d1:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00141040
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x49],AL
CMP byte ptr [RBP + -0x49],0x0
JNZ 0x00141620
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x001474d0
MOVSX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x49],AL
LAB_00141620:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x0014165e
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x3a0]
CALL 0x001f4f60
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x3a0],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x460],RCX
LAB_0014165e:
MOV RDI,qword ptr [RBP + -0x40]
MOVSX ESI,byte ptr [RBP + -0x4a]
CALL 0x0013df80
MOV AL,byte ptr [RBP + -0x49]
MOV byte ptr [RBP + -0x9],AL
LAB_00141671:
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x61],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00141691
MOV AL,byte ptr [RBP + -0x61]
MOV RSP,RBP
POP RBP
RET
LAB_00141691:
CALL 0x0012a270
|
int8 _ma_cmp_dynamic_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 *puVar2;
int8 uVar3;
long *plVar4;
char cVar5;
int iVar6;
int1 *puVar7;
long in_FS_OFFSET;
int1 auStack_78 [15];
int1 local_69;
ulong local_68;
ulong local_60;
char local_52;
bool local_51;
long local_50;
int1 *local_48;
long local_40;
int8 local_38;
int8 local_30;
long local_28;
long *local_20;
int1 local_11;
long local_10;
puVar7 = auStack_78;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = *(ulong *)(*param_1 + 0x398);
local_68 = *(long *)param_1[0xf] - (long)&local_60;
local_38 = param_4;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
if ((local_60 < local_68) &&
((0x10000 < local_68 - local_60 || ((0x8000 < local_68 - local_60 && (0xfff < local_60)))))) {
local_52 = '\0';
puVar7 = auStack_78 + -(*(long *)(*param_1 + 0x398) + 0xfU & 0xfffffffffffffff0);
local_48 = puVar7;
}
else {
local_52 = '\x01';
local_48 = (int1 *)my_malloc(0,*(int8 *)(*param_1 + 0x398),0x10010);
}
plVar4 = local_20;
uVar3 = local_38;
puVar2 = local_48;
if (local_48 == (int1 *)0x0) {
local_11 = 1;
}
else {
local_40 = local_20[0x74];
local_50 = local_20[0x8c];
if (*(int *)(*local_20 + 0x3f0) != 0) {
local_20[0x74] = 0;
local_20[0x8c] = 0;
}
*(int8 *)(puVar7 + -8) = 0x1415e2;
iVar6 = _ma_read_dynamic_record(plVar4,puVar2,uVar3);
lVar1 = local_28;
uVar3 = local_30;
puVar2 = local_48;
local_51 = iVar6 != 0;
if (!local_51) {
cVar5 = *(char *)(local_28 + 3);
*(int8 *)(puVar7 + -8) = 0x14160f;
cVar5 = _ma_unique_comp(lVar1,uVar3,puVar2,(int)cVar5);
local_51 = cVar5 != '\0';
}
if (*(int *)(*local_20 + 0x3f0) != 0) {
lVar1 = local_20[0x74];
*(int8 *)(puVar7 + -8) = 0x141640;
my_free(lVar1);
local_20[0x74] = local_40;
local_20[0x8c] = local_50;
}
puVar2 = local_48;
iVar6 = (int)local_52;
*(int8 *)(puVar7 + -8) = 0x14166b;
stack_alloc_free(puVar2,iVar6);
local_11 = local_51;
}
local_69 = local_11;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11);
}
/* WARNING: Subroutine does not return */
*(int8 *)(puVar7 + -8) = 0x141696;
__stack_chk_fail();
}
| |
34,332 | js_array_isArray | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_isArray(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int ret;
ret = JS_IsArray(ctx, argv[0]);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O1 | c | js_array_isArray:
pushq %rax
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x282d2
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x1f, %eax
leaq (%rax,%rax,4), %rdx
incq %rdx
movq %rcx, %rax
popq %rcx
retq
| js_array_isArray:
push rax
mov rsi, [r8]
mov rdx, [r8+8]
call JS_IsArray
xor ecx, ecx
test eax, eax
setnle cl
shr eax, 1Fh
lea rdx, [rax+rax*4]
inc rdx
mov rax, rcx
pop rcx
retn
| _BOOL8 js_array_isArray(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
return (int)JS_IsArray(a1, *a5, a5[1]) > 0;
}
| |||
34,333 | js_array_isArray | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_isArray(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int ret;
ret = JS_IsArray(ctx, argv[0]);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O2 | c | js_array_isArray:
pushq %rax
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x21d01
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x1f, %eax
leaq (%rax,%rax,4), %rdx
incq %rdx
movq %rcx, %rax
popq %rcx
retq
| js_array_isArray:
push rax
mov rsi, [r8]
mov rdx, [r8+8]
call JS_IsArray
xor ecx, ecx
test eax, eax
setnle cl
shr eax, 1Fh
lea rdx, [rax+rax*4]
inc rdx
mov rax, rcx
pop rcx
retn
| _BOOL8 js_array_isArray(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
return (int)JS_IsArray(a1, *a5, a5[1]) > 0;
}
| js_array_isArray:
PUSH RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00121d01
XOR ECX,ECX
TEST EAX,EAX
SETG CL
SHR EAX,0x1f
LEA RDX,[RAX + RAX*0x4]
INC RDX
MOV RAX,RCX
POP RCX
RET
|
bool js_array_isArray(int8 param_1)
{
int iVar1;
int8 *in_R8;
iVar1 = JS_IsArray(param_1,*in_R8,in_R8[1]);
return 0 < iVar1;
}
| |
34,334 | find_closure_var | bluesky950520[P]quickjs/quickjs.c | static int find_closure_var(JSContext *ctx, JSFunctionDef *s,
JSAtom var_name)
{
int i;
for(i = 0; i < s->closure_var_count; i++) {
JSClosureVar *cv = &s->closure_var[i];
if (cv->var_name == var_name)
return i;
}
return -1;
} | O0 | c | find_closure_var:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movl $0x0, -0x20(%rsp)
movl -0x20(%rsp), %eax
movq -0x18(%rsp), %rcx
cmpl 0x198(%rcx), %eax
jge 0xb8deb
movq -0x18(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq -0x20(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
movl 0x4(%rax), %eax
cmpl -0x1c(%rsp), %eax
jne 0xb8ddc
movl -0x20(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0xb8df3
jmp 0xb8dde
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0xb8d96
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
| find_closure_var:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_1C], edx
mov [rsp+var_20], 0
loc_B8D96:
mov eax, [rsp+var_20]
mov rcx, [rsp+var_18]
cmp eax, [rcx+198h]
jge short loc_B8DEB
mov rax, [rsp+var_18]
mov rax, [rax+1A0h]
movsxd rcx, [rsp+var_20]
shl rcx, 3
add rax, rcx
mov [rsp+var_28], rax
mov rax, [rsp+var_28]
mov eax, [rax+4]
cmp eax, [rsp+var_1C]
jnz short loc_B8DDC
mov eax, [rsp+var_20]
mov [rsp+var_4], eax
jmp short loc_B8DF3
loc_B8DDC:
jmp short $+2
loc_B8DDE:
mov eax, [rsp+var_20]
add eax, 1
mov [rsp+var_20], eax
jmp short loc_B8D96
loc_B8DEB:
mov [rsp+var_4], 0FFFFFFFFh
loc_B8DF3:
mov eax, [rsp+var_4]
retn
| long long find_closure_var(long long a1, long long a2, int a3)
{
unsigned int i; // [rsp+8h] [rbp-20h]
for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 408); ++i )
{
if ( *(_DWORD *)(8LL * (int)i + *(_QWORD *)(a2 + 416) + 4) == a3 )
return i;
}
return (unsigned int)-1;
}
| find_closure_var:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV dword ptr [RSP + -0x1c],EDX
MOV dword ptr [RSP + -0x20],0x0
LAB_001b8d96:
MOV EAX,dword ptr [RSP + -0x20]
MOV RCX,qword ptr [RSP + -0x18]
CMP EAX,dword ptr [RCX + 0x198]
JGE 0x001b8deb
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0x1a0]
MOVSXD RCX,dword ptr [RSP + -0x20]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + -0x1c]
JNZ 0x001b8ddc
MOV EAX,dword ptr [RSP + -0x20]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x001b8df3
LAB_001b8ddc:
JMP 0x001b8dde
LAB_001b8dde:
MOV EAX,dword ptr [RSP + -0x20]
ADD EAX,0x1
MOV dword ptr [RSP + -0x20],EAX
JMP 0x001b8d96
LAB_001b8deb:
MOV dword ptr [RSP + -0x4],0xffffffff
LAB_001b8df3:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int find_closure_var(int8 param_1,long param_2,int param_3)
{
int local_20;
local_20 = 0;
while( true ) {
if (*(int *)(param_2 + 0x198) <= local_20) {
return -1;
}
if (*(int *)(*(long *)(param_2 + 0x1a0) + (long)local_20 * 8 + 4) == param_3) break;
local_20 = local_20 + 1;
}
return local_20;
}
| |
34,335 | my_uca_charcmp | eloqsql/strings/ctype-uca.c | static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
} | O0 | c | my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x627c3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x627e0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x627b6
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x627ca
jmp 0x627b8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x62789
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_charcmp:
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]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_62789:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_627C3
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_627B6
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_627CA
loc_627B6:
jmp short $+2
loc_627B8:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_62789
loc_627C3:
mov [rbp+var_4], 0
loc_627CA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
| my_uca_charcmp:
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]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_00162789:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x001627c3
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x001627e0
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x001627b6
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001627ca
LAB_001627b6:
JMP 0x001627b8
LAB_001627b8:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00162789
LAB_001627c3:
MOV dword ptr [RBP + -0x4],0x0
LAB_001627ca:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
| |
34,336 | table_replication_applier_status_by_worker::rnd_pos(void const*) | eloqsql/storage/perfschema/table_replication_applier_status_by_worker.cc | int table_replication_applier_status_by_worker::rnd_pos(const void *pos)
{
int res= HA_ERR_RECORD_DELETED;
set_position(pos);
if (global_rpl_thread_pool.inited && global_rpl_thread_pool.count)
{
rpl_parallel_thread_pool *pool= &global_rpl_thread_pool;
mysql_mutex_lock(&pool->LOCK_rpl_thread_pool);
if(m_pos.m_index < pool->count)
{
rpl_parallel_thread *rpt= pool->threads[m_pos.m_index];
make_row(rpt);
mysql_mutex_unlock(&pool->LOCK_rpl_thread_pool);
res= 0;
}
}
else
{
struct pool_bkp_for_pfs *bkp_pool= &global_rpl_thread_pool.pfs_bkp;
if (bkp_pool->inited && bkp_pool->count && m_pos.m_index < bkp_pool->count)
{
rpl_parallel_thread *rpt= bkp_pool->rpl_thread_arr[m_pos.m_index];
make_row(rpt);
res= 0;
}
}
return res;
} | O0 | cpp | table_replication_applier_status_by_worker::rnd_pos(void const*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movl $0x86, -0x14(%rbp)
movq -0x10(%rbp), %rsi
callq 0xcb5350
leaq 0x8e6a61(%rip), %rax # 0x15ed5e0
testb $0x1, 0x94(%rax)
je 0xd06c0e
leaq 0x8e6a4d(%rip), %rax # 0x15ed5e0
cmpl $0x0, 0x90(%rax)
je 0xd06c0e
leaq 0x8e6a3d(%rip), %rax # 0x15ed5e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
leaq 0xfbbd4(%rip), %rsi # 0xe0278a
movl $0x96, %edx
callq 0x808120
movq -0x40(%rbp), %rax
movl 0x554(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x90(%rcx), %eax
jae 0xd06c0c
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x554(%rdi), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0xd067b0
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
callq 0x808380
movl $0x0, -0x14(%rbp)
jmp 0xd06c70
leaq 0x8e69cb(%rip), %rax # 0x15ed5e0
addq $0x98, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0xd06c6e
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0xd06c6e
movq -0x40(%rbp), %rax
movl 0x554(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xd06c6e
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x554(%rdi), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
callq 0xd067b0
movl $0x0, -0x14(%rbp)
jmp 0xd06c70
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN42table_replication_applier_status_by_worker7rnd_posEPKv:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_40], rdi
mov [rbp+var_14], 86h
mov rsi, [rbp+var_10]; void *
call _ZN16PFS_engine_table12set_positionEPKv; PFS_engine_table::set_position(void const*)
lea rax, global_rpl_thread_pool
test byte ptr [rax+94h], 1
jz loc_D06C0E
lea rax, global_rpl_thread_pool
cmp dword ptr [rax+90h], 0
jz short loc_D06C0E
lea rax, global_rpl_thread_pool
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
add rdi, 10h
lea rsi, aWorkspaceLlm4b_210; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 96h
call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint)
mov rax, [rbp+var_40]
mov eax, [rax+554h]
mov rcx, [rbp+var_20]
cmp eax, [rcx+90h]
jnb short loc_D06C0C
mov rdi, [rbp+var_40]; this
mov rax, [rbp+var_20]
mov rax, [rax]
mov ecx, [rdi+554h]
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
mov rsi, [rbp+var_28]; rpl_parallel_thread *
call _ZN42table_replication_applier_status_by_worker8make_rowEP19rpl_parallel_thread; table_replication_applier_status_by_worker::make_row(rpl_parallel_thread *)
mov rdi, [rbp+var_20]
add rdi, 10h
call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *)
mov [rbp+var_14], 0
loc_D06C0C:
jmp short loc_D06C70
loc_D06C0E:
lea rax, global_rpl_thread_pool
add rax, 98h
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
test byte ptr [rax+4], 1
jz short loc_D06C6E
mov rax, [rbp+var_30]
cmp dword ptr [rax], 0
jz short loc_D06C6E
mov rax, [rbp+var_40]
mov eax, [rax+554h]
mov rcx, [rbp+var_30]
cmp eax, [rcx]
jnb short loc_D06C6E
mov rdi, [rbp+var_40]; this
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rdi+554h]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
mov rsi, [rbp+var_38]; rpl_parallel_thread *
call _ZN42table_replication_applier_status_by_worker8make_rowEP19rpl_parallel_thread; table_replication_applier_status_by_worker::make_row(rpl_parallel_thread *)
mov [rbp+var_14], 0
loc_D06C6E:
jmp short $+2
loc_D06C70:
mov eax, [rbp+var_14]
add rsp, 40h
pop rbp
retn
| long long table_replication_applier_status_by_worker::rnd_pos(
table_replication_applier_status_by_worker *this,
const void *a2)
{
_DWORD *v3; // [rsp+10h] [rbp-30h]
unsigned int v4; // [rsp+2Ch] [rbp-14h]
v4 = 134;
PFS_engine_table::set_position(this, a2);
if ( (*((_BYTE *)&global_rpl_thread_pool + 148) & 1) != 0 && *((_DWORD *)&global_rpl_thread_pool + 36) )
{
coro_mutex_lock(
(long long)&global_rpl_thread_pool + 16,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/perfschema/table_replication_applier_status_by_worker.cc",
0x96u);
if ( *((_DWORD *)this + 341) < *((_DWORD *)&global_rpl_thread_pool + 36) )
{
table_replication_applier_status_by_worker::make_row(
this,
*(rpl_parallel_thread **)(global_rpl_thread_pool + 8LL * *((unsigned int *)this + 341)));
coro_mutex_unlock((long long)&global_rpl_thread_pool + 16);
return 0;
}
}
else
{
v3 = (_DWORD *)((char *)&global_rpl_thread_pool + 152);
if ( (*((_BYTE *)&global_rpl_thread_pool + 156) & 1) != 0 && *v3 && *((_DWORD *)this + 341) < *v3 )
{
table_replication_applier_status_by_worker::make_row(
this,
*(rpl_parallel_thread **)(*((_QWORD *)&global_rpl_thread_pool + 20) + 8LL * *((unsigned int *)this + 341)));
return 0;
}
}
return v4;
}
| link_changed:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00d06b5e
LAB_00d06b5e:
JMP 0x00d06b60
LAB_00d06b60:
JMP 0x00d06b62
LAB_00d06b62:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JZ 0x00d06b96
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x18],RCX
LAB_00d06b96:
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void link_changed(long param_1,long *param_2)
{
long lVar1;
*(long **)(param_1 + 0x18) = param_2;
lVar1 = *param_2;
*(long *)(param_1 + 0x10) = lVar1;
if (lVar1 != 0) {
*(long *)(*param_2 + 0x18) = param_1 + 0x10;
}
*param_2 = param_1;
return;
}
| |
34,337 | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&) | llama.cpp/common/common.cpp | std::string string_from(const std::vector<int> & values) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (auto e : values) {
if (first) {
first = false;
} else {
buf << ", ";
}
buf << std::to_string(e);
}
buf << " ]";
return buf.str();
} | O3 | cpp | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rsi, %rbx
movq %rdi, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x204e0
leaq 0x40(%rsp), %rdi
leaq 0x2dd16(%rip), %rsi # 0x124a9c
movl $0x2, %edx
callq 0x21070
movq (%rbx), %r12
movq 0x8(%rbx), %r15
cmpq %r15, %r12
je 0xf6e86
movb $0x1, %al
movl $0xd1b71759, %r14d # imm = 0xD1B71759
movl (%r12), %r13d
testb $0x1, %al
jne 0xf6dc6
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
leaq 0x2e3d0(%rip), %rsi # 0x125191
callq 0x21070
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0xf6e15
movl $0x4, %ebx
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0xf6e0e
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0xf6e13
cmpl $0x2710, %eax # imm = 0x2710
jb 0xf6e15
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0xf6de0
addl $-0x3, %ebx
jmp 0xf6e15
addl $-0x2, %ebx
jmp 0xf6e15
decl %ebx
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x209e0
addq 0x8(%rsp), %r13
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x73740
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x21070
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf6e77
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
addq $0x4, %r12
xorl %eax, %eax
cmpq %r15, %r12
jne 0xf6da8
leaq 0x2dc12(%rip), %rsi # 0x124a9f
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
callq 0x21070
movq 0x28(%rsp), %rbx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x20660
movq 0x6c0fb(%rip), %rsi # 0x162fb0
leaq 0x30(%rsp), %rdi
callq 0x20d00
leaq 0xb0(%rsp), %rdi
callq 0x20c50
movq %rbx, %rax
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf6ee5
jmp 0xf6ee5
movq %rax, %rbx
jmp 0xf6f11
movq %rax, %rdi
callq 0x27eb7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf6f11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq 0x6c098(%rip), %rsi # 0x162fb0
leaq 0x30(%rsp), %rdi
callq 0x20d00
leaq 0xb0(%rsp), %rdi
callq 0x20c50
movq %rbx, %rdi
callq 0x20b00
| _Z11string_fromB5cxx11RKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov rbx, rsi
mov [rsp+1E8h+var_1C0], rdi
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, asc_124A9C; "[ "
mov edx, 2
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, [rbx]
mov r15, [rbx+8]
cmp r12, r15
jz loc_F6E86
mov al, 1
mov r14d, 0D1B71759h
loc_F6DA8:
mov r13d, [r12]
test al, 1
jnz short loc_F6DC6
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, aZuD+6; ", "
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_F6DC6:
mov ebp, r13d
neg ebp
cmovs ebp, r13d
mov ebx, 1
cmp ebp, 0Ah
jb short loc_F6E15
mov ebx, 4
mov eax, ebp
loc_F6DE0:
cmp eax, 63h ; 'c'
jbe short loc_F6E0E
cmp eax, 3E7h
jbe short loc_F6E13
cmp eax, 2710h
jb short loc_F6E15
mov ecx, eax
imul rcx, r14
shr rcx, 2Dh
add ebx, 4
cmp eax, 1869Fh
mov eax, ecx
ja short loc_F6DE0
add ebx, 0FFFFFFFDh
jmp short loc_F6E15
loc_F6E0E:
add ebx, 0FFFFFFFEh
jmp short loc_F6E15
loc_F6E13:
dec ebx
loc_F6E15:
shr r13d, 1Fh
lea esi, [rbx+r13]
lea rax, [rsp+1E8h+var_1D0]
mov [rsp+1E8h+var_1E0], rax
lea rdi, [rsp+1E8h+var_1E0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r13, [rsp+1E8h+var_1E0]
mov rdi, r13
mov esi, ebx
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
lea rax, [rsp+1E8h+var_1D0]
cmp rdi, rax
jz short loc_F6E77
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F6E77:
add r12, 4
xor eax, eax
cmp r12, r15
jnz loc_F6DA8
loc_F6E86:
lea rsi, asc_124A9F; " ]"
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_F6EE5
jmp short $+2
loc_F6EE5:
mov rbx, rax
jmp short loc_F6F11
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+1E8h+var_1E0]; void *
lea rax, [rsp+1E8h+var_1D0]
cmp rdi, rax
jz short loc_F6F11
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F6F11:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long string_from[abi:cxx11](long long a1, int **a2)
{
int *v2; // r12
int *v3; // r15
char v4; // al
int v5; // r13d
unsigned int v6; // ebp
int v7; // ebx
unsigned int v8; // eax
bool v9; // cc
unsigned int v10; // r13d
long long v11; // rbx
void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v15; // [rsp+28h] [rbp-1C0h]
_BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF
char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF
char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF
char v19[312]; // [rsp+B0h] [rbp-138h] BYREF
v15 = a1;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16);
std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL);
v2 = *a2;
v3 = a2[1];
if ( *a2 != v3 )
{
v4 = 1;
do
{
v5 = *v2;
if ( (v4 & 1) == 0 )
std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL);
v6 = -v5;
if ( v5 > 0 )
v6 = v5;
v7 = 1;
if ( v6 >= 0xA )
{
v7 = 4;
v8 = v6;
while ( 1 )
{
if ( v8 <= 0x63 )
{
v7 -= 2;
goto LABEL_16;
}
if ( v8 <= 0x3E7 )
break;
if ( v8 < 0x2710 )
goto LABEL_16;
v7 += 4;
v9 = v8 <= 0x1869F;
v8 /= 0x2710u;
if ( v9 )
{
v7 -= 3;
goto LABEL_16;
}
}
--v7;
}
LABEL_16:
v10 = (unsigned int)v5 >> 31;
v13[0] = v14;
std::string::_M_construct(v13, v7 + v10, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6);
std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
++v2;
v4 = 0;
}
while ( v2 != v3 );
}
std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL);
v11 = v15;
std::stringbuf::str(v15, v18);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v16,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v19);
return v11;
}
| string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV RBX,RSI
MOV qword ptr [RSP + 0x28],RDI
LEA RDI,[RSP + 0x30]
CALL 0x001204e0
LEA RDI,[RSP + 0x40]
LAB_001f6d7f:
LEA RSI,[0x224a9c]
MOV EDX,0x2
CALL 0x00121070
MOV R12,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x8]
CMP R12,R15
JZ 0x001f6e86
MOV AL,0x1
MOV R14D,0xd1b71759
LAB_001f6da8:
MOV R13D,dword ptr [R12]
TEST AL,0x1
JNZ 0x001f6dc6
LAB_001f6db0:
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
LEA RSI,[0x225191]
CALL 0x00121070
LAB_001f6dc6:
MOV EBP,R13D
NEG EBP
CMOVS EBP,R13D
MOV EBX,0x1
CMP EBP,0xa
JC 0x001f6e15
MOV EBX,0x4
MOV EAX,EBP
LAB_001f6de0:
CMP EAX,0x63
JBE 0x001f6e0e
CMP EAX,0x3e7
JBE 0x001f6e13
CMP EAX,0x2710
JC 0x001f6e15
MOV ECX,EAX
IMUL RCX,R14
SHR RCX,0x2d
ADD EBX,0x4
CMP EAX,0x1869f
MOV EAX,ECX
JA 0x001f6de0
ADD EBX,-0x3
JMP 0x001f6e15
LAB_001f6e0e:
ADD EBX,-0x2
JMP 0x001f6e15
LAB_001f6e13:
DEC EBX
LAB_001f6e15:
SHR R13D,0x1f
LEA ESI,[RBX + R13*0x1]
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
LAB_001f6e27:
LEA RDI,[RSP + 0x8]
MOV EDX,0x2d
CALL 0x001209e0
ADD R13,qword ptr [RSP + 0x8]
MOV RDI,R13
MOV ESI,EBX
MOV EDX,EBP
CALL 0x00173740
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001f6e51:
LEA RDI,[RSP + 0x40]
CALL 0x00121070
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001f6e77
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_001f6e77:
ADD R12,0x4
XOR EAX,EAX
CMP R12,R15
JNZ 0x001f6da8
LAB_001f6e86:
LEA RSI,[0x224a9f]
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
CALL 0x00121070
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00120660
LAB_001f6eae:
MOV RSI,qword ptr [0x00262fb0]
LEA RDI,[RSP + 0x30]
CALL 0x00120d00
LEA RDI,[RSP + 0xb0]
CALL 0x00120c50
MOV RAX,RBX
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * string_from_abi_cxx11_(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
vector *pvVar4;
uint uVar5;
bool bVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
int8 *in_RSI;
uint *puVar10;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
vector *local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1c0 = param_1;
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 001f6d7f to 001f6d8f has its CatchHandler @ 001f6ee1 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2);
puVar10 = (uint *)*in_RSI;
puVar2 = (uint *)in_RSI[1];
if (puVar10 != puVar2) {
bVar6 = true;
do {
uVar1 = *puVar10;
if (!bVar6) {
/* try { // try from 001f6db0 to 001f6dc5 has its CatchHandler @ 001f6ee5 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2);
}
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
uVar9 = 1;
if (9 < uVar3) {
uVar8 = (ulong)uVar3;
uVar5 = 4;
do {
uVar9 = uVar5;
uVar7 = (uint)uVar8;
if (uVar7 < 100) {
uVar9 = uVar9 - 2;
goto LAB_001f6e15;
}
if (uVar7 < 1000) {
uVar9 = uVar9 - 1;
goto LAB_001f6e15;
}
if (uVar7 < 10000) goto LAB_001f6e15;
uVar8 = uVar8 / 10000;
uVar5 = uVar9 + 4;
} while (99999 < uVar7);
uVar9 = uVar9 + 1;
}
LAB_001f6e15:
local_1e0 = local_1d0;
/* try { // try from 001f6e27 to 001f6e35 has its CatchHandler @ 001f6eea */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f))
;
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3);
/* try { // try from 001f6e51 to 001f6e5a has its CatchHandler @ 001f6ef2 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
puVar10 = puVar10 + 1;
bVar6 = false;
} while (puVar10 != puVar2);
}
/* try { // try from 001f6e86 to 001f6ead has its CatchHandler @ 001f6ee3 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2);
pvVar4 = local_1c0;
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return pvVar4;
}
| |
34,338 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array() | monkey531[P]llama/common/json.hpp | bool end_array()
{
bool keep = true;
if (ref_stack.back())
{
keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
if (keep)
{
ref_stack.back()->set_parents();
}
else
{
// discard array
*ref_stack.back() = discarded;
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
// remove discarded value
if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->pop_back();
}
return true;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x5cf5e
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0xc(%rsp)
movb $0x3, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x5d029
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
callq *0x98(%rbx)
movl %eax, %ebp
testb %al, %al
jne 0x5cf61
leaq 0xa8(%rbx), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5dd4c
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x5b45c
movq %r14, %rdi
xorl %esi, %esi
callq 0x58ac0
movq %r14, %rdi
callq 0x5e2ac
jmp 0x5cf61
movb $0x1, %bpl
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x5cfec
movq 0x30(%rbx), %rdx
movl 0x38(%rbx), %esi
cmpq %rdx, 0x20(%rbx)
sete %dil
testl %esi, %esi
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
je 0x5d008
leaq -0x8(%rax), %rdi
movq %rdi, 0x10(%rbx)
subl $0x1, %esi
movl %esi, 0x38(%rbx)
jae 0x5cfab
movl $0x3f, 0x38(%rbx)
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
cmpq %rdi, %rcx
sete %cl
orb %cl, %bpl
jne 0x5cfe1
movq -0x10(%rax), %rax
cmpb $0x2, (%rax)
jne 0x5cfe1
movq 0x8(%rax), %rax
movq 0x8(%rax), %rbx
addq $-0x10, %rbx
movq %rbx, 0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58ac0
movq %rbx, %rdi
callq 0x5e2ac
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x91dd6(%rip), %rdi # 0xeedc9
leaq 0x8c210(%rip), %rdx # 0xe920a
leaq 0x92db3(%rip), %rcx # 0xefdb4
movl $0x1bf5, %esi # imm = 0x1BF5
jmp 0x5d022
leaq 0x91dba(%rip), %rdi # 0xeedc9
leaq 0x8c1f4(%rip), %rdx # 0xe920a
leaq 0x92d11(%rip), %rcx # 0xefd2e
movl $0x1bf6, %esi # imm = 0x1BF6
xorl %eax, %eax
callq 0x1bec0
callq 0x1b330
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
push rbp
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
test rcx, rcx
jz short loc_5CF5E
sub rax, [rbx+8]
shr rax, 3
dec eax
mov [rsp+38h+var_2C], eax
mov [rsp+38h+var_2D], 3
cmp qword ptr [rbx+90h], 0
jz loc_5D029
lea rdi, [rbx+80h]
lea rsi, [rsp+38h+var_2C]
lea rdx, [rsp+38h+var_2D]
call qword ptr [rbx+98h]
mov ebp, eax
test al, al
jnz short loc_5CF61
lea rsi, [rbx+0A8h]
lea r14, [rsp+38h+var_28]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_5CF61
loc_5CF5E:
mov bpl, 1
loc_5CF61:
mov rcx, [rbx+8]
mov rax, [rbx+10h]
cmp rcx, rax
jz short loc_5CFEC
mov rdx, [rbx+30h]
mov esi, [rbx+38h]
cmp [rbx+20h], rdx
setz dil
test esi, esi
setz r8b
and r8b, dil
cmp r8b, 1
jz short loc_5D008
lea rdi, [rax-8]
mov [rbx+10h], rdi
sub esi, 1
mov [rbx+38h], esi
jnb short loc_5CFAB
mov dword ptr [rbx+38h], 3Fh ; '?'
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
loc_5CFAB:
cmp rcx, rdi
setz cl
or bpl, cl
jnz short loc_5CFE1
mov rax, [rax-10h]
cmp byte ptr [rax], 2
jnz short loc_5CFE1
mov rax, [rax+8]
mov rbx, [rax+8]
add rbx, 0FFFFFFFFFFFFFFF0h
mov [rax+8], rbx
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_5CFE1:
mov al, 1
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
loc_5CFEC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BF5h
jmp short loc_5D022
loc_5D008:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BF6h
loc_5D022:
xor eax, eax
call _ggml_abort
loc_5D029:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array(
long long a1)
{
long long v1; // rax
char v2; // bp
long long v3; // rcx
long long v4; // rax
long long v5; // rdx
int v6; // esi
long long v7; // rax
long long v8; // rax
char *v9; // rbx
char v11; // [rsp+Bh] [rbp-2Dh] BYREF
int v12; // [rsp+Ch] [rbp-2Ch] BYREF
char v13[40]; // [rsp+10h] [rbp-28h] BYREF
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v1 - 8) )
{
v12 = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
v11 = 3;
if ( !*(_QWORD *)(a1 + 144) )
goto LABEL_16;
v2 = (*(long long ( **)(long long, int *, char *))(a1 + 152))(a1 + 128, &v12, &v11);
if ( !v2 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v13,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v13);
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(v13);
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(v13);
}
}
else
{
v2 = 1;
}
v3 = *(_QWORD *)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
if ( v3 == v4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7157LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
goto LABEL_16;
}
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7158LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_16:
std::__throw_bad_function_call();
}
*(_QWORD *)(a1 + 16) = v4 - 8;
*(_DWORD *)(a1 + 56) = v6 - 1;
if ( !v6 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) = v5 - 8;
}
if ( !((v3 == v4 - 8) | (unsigned __int8)v2) )
{
v7 = *(_QWORD *)(v4 - 16);
if ( *(_BYTE *)v7 == 2 )
{
v8 = *(_QWORD *)(v7 + 8);
v9 = (char *)(*(_QWORD *)(v8 + 8) - 16LL);
*(_QWORD *)(v8 + 8) = v9;
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(v9);
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(v9);
}
}
return 1;
}
| end_array:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
TEST RCX,RCX
JZ 0x0015cf5e
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x3
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0015d029
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
CALL qword ptr [RBX + 0x98]
MOV EBP,EAX
TEST AL,AL
JNZ 0x0015cf61
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x10]
MOV RDI,R14
CALL 0x0015dd4c
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x0015b45c
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158ac0
MOV RDI,R14
CALL 0x0015e2ac
JMP 0x0015cf61
LAB_0015cf5e:
MOV BPL,0x1
LAB_0015cf61:
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
CMP RCX,RAX
JZ 0x0015cfec
MOV RDX,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [RBX + 0x38]
CMP qword ptr [RBX + 0x20],RDX
SETZ DIL
TEST ESI,ESI
SETZ R8B
AND R8B,DIL
CMP R8B,0x1
JZ 0x0015d008
LEA RDI,[RAX + -0x8]
MOV qword ptr [RBX + 0x10],RDI
SUB ESI,0x1
MOV dword ptr [RBX + 0x38],ESI
JNC 0x0015cfab
MOV dword ptr [RBX + 0x38],0x3f
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
LAB_0015cfab:
CMP RCX,RDI
SETZ CL
OR BPL,CL
JNZ 0x0015cfe1
MOV RAX,qword ptr [RAX + -0x10]
CMP byte ptr [RAX],0x2
JNZ 0x0015cfe1
MOV RAX,qword ptr [RAX + 0x8]
MOV RBX,qword ptr [RAX + 0x8]
ADD RBX,-0x10
MOV qword ptr [RAX + 0x8],RBX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00158ac0
MOV RDI,RBX
CALL 0x0015e2ac
LAB_0015cfe1:
MOV AL,0x1
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
LAB_0015cfec:
LEA RDI,[0x1eedc9]
LEA RDX,[0x1e920a]
LEA RCX,[0x1efdb4]
MOV ESI,0x1bf5
JMP 0x0015d022
LAB_0015d008:
LEA RDI,[0x1eedc9]
LEA RDX,[0x1e920a]
LEA RCX,[0x1efd2e]
MOV ESI,0x1bf6
LAB_0015d022:
XOR EAX,EAX
CALL 0x0011bec0
LAB_0015d029:
CALL 0x0011b330
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_array() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int iVar1;
long lVar2;
char cVar3;
char *pcVar4;
data *this_00;
int8 uVar5;
int1 local_2d;
int local_2c;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_28 [16];
if (*(long *)(*(long *)(this + 0x10) + -8) == 0) {
cVar3 = '\x01';
}
else {
local_2c = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1;
local_2d = 3;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar3 = (**(code **)(this + 0x98))(this + 0x80,&local_2c,&local_2d);
if (cVar3 == '\0') {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_28,(basic_json *)(this + 0xa8));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_28);
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_28,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_28);
}
}
lVar2 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar2) {
pcVar4 = "!ref_stack.empty()";
uVar5 = 0x1bf5;
}
else {
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) {
*(long *)(this + 0x10) = lVar2 + -8;
*(int *)(this + 0x38) = iVar1 + -1;
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if ((cVar3 == '\0' && *(long *)(this + 8) != lVar2 + -8) &&
(**(char **)(lVar2 + -0x10) == '\x02')) {
lVar2 = *(long *)(*(char **)(lVar2 + -0x10) + 8);
this_00 = (data *)(*(long *)(lVar2 + 8) + -0x10);
*(data **)(lVar2 + 8) = this_00;
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(this_00,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(this_00);
}
return 1;
}
pcVar4 = "!keep_stack.empty()";
uVar5 = 0x1bf6;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5,
"GGML_ASSERT(%s) failed",pcVar4);
}
| |
34,339 | ha_federated::convert_row_to_internal_format(unsigned char*, char**, st_mysql_res*) | eloqsql/storage/federated/ha_federated.cc | uint ha_federated::convert_row_to_internal_format(uchar *record,
MYSQL_ROW row,
MYSQL_RES *result)
{
ulong *lengths;
Field **field;
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set);
DBUG_ENTER("ha_federated::convert_row_to_internal_format");
lengths= mysql_fetch_lengths(result);
for (field= table->field; *field; field++, row++, lengths++)
{
/*
index variable to move us through the row at the
same iterative step as the field
*/
my_ptrdiff_t old_ptr;
old_ptr= (my_ptrdiff_t) (record - table->record[0]);
(*field)->move_field_offset(old_ptr);
if (!*row)
{
(*field)->set_null();
(*field)->reset();
}
else
{
if (bitmap_is_set(table->read_set, (*field)->field_index))
{
(*field)->set_notnull();
(*field)->store_text(*row, *lengths, &my_charset_bin);
}
}
(*field)->move_field_offset(-old_ptr);
}
dbug_tmp_restore_column_map(&table->write_set, old_map);
DBUG_RETURN(0);
} | O3 | cpp | ha_federated::convert_row_to_internal_format(unsigned char*, char**, st_mysql_res*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
movq %rcx, %rdi
callq 0x80b0
movq %rax, -0x30(%rbp)
movq 0x10(%r15), %rax
movq 0xb0(%rax), %r12
movq (%r12), %rdi
testq %rdi, %rdi
je 0x8a92
xorl %r13d, %r13d
movq 0x10(%r15), %rax
movq -0x38(%rbp), %r14
subq 0x50(%rax), %r14
movq (%rdi), %rax
movq %r14, %rsi
callq *0x2d0(%rax)
movq (%rbx,%r13), %rsi
testq %rsi, %rsi
je 0x8a4b
movq 0x10(%r15), %rax
movq 0x1f0(%rax), %rax
movq (%r12,%r13), %rdi
movzwl 0x8c(%rdi), %ecx
movq (%rax), %rax
movl %ecx, %edx
shrl $0x3, %edx
movzbl (%rax,%rdx), %eax
andl $0x7, %ecx
btl %ecx, %eax
jae 0x8a6d
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x8a34
movb 0x8e(%rdi), %cl
notb %cl
andb %cl, (%rax)
movq (%r12,%r13), %rdi
movq (%rbx,%r13), %rsi
movq -0x30(%rbp), %rax
movq (%rax,%r13), %rdx
movq (%rdi), %rax
movq 0x8542(%rip), %rcx # 0x10f88
callq *0x68(%rax)
jmp 0x8a6d
movq (%r12,%r13), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x8a64
movb 0x8e(%rdi), %cl
orb %cl, (%rax)
movq (%r12,%r13), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movq (%r12,%r13), %rdi
negq %r14
movq (%rdi), %rax
movq %r14, %rsi
callq *0x2d0(%rax)
movq 0x8(%r12,%r13), %rdi
addq $0x8, %r13
testq %rdi, %rdi
jne 0x89ce
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN12ha_federated30convert_row_to_internal_formatEPhPPcP12st_mysql_res:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov [rbp+var_38], rsi
mov r15, rdi
mov rdi, rcx
call _mysql_fetch_lengths
mov [rbp+var_30], rax
mov rax, [r15+10h]
mov r12, [rax+0B0h]
mov rdi, [r12]
test rdi, rdi
jz loc_8A92
xor r13d, r13d
loc_89CE:
mov rax, [r15+10h]
mov r14, [rbp+var_38]
sub r14, [rax+50h]
mov rax, [rdi]
mov rsi, r14
call qword ptr [rax+2D0h]
mov rsi, [rbx+r13]
test rsi, rsi
jz short loc_8A4B
mov rax, [r15+10h]
mov rax, [rax+1F0h]
mov rdi, [r12+r13]
movzx ecx, word ptr [rdi+8Ch]
mov rax, [rax]
mov edx, ecx
shr edx, 3
movzx eax, byte ptr [rax+rdx]
and ecx, 7
bt eax, ecx
jnb short loc_8A6D
mov rax, [rdi+10h]
test rax, rax
jz short loc_8A34
mov cl, [rdi+8Eh]
not cl
and [rax], cl
mov rdi, [r12+r13]
mov rsi, [rbx+r13]
loc_8A34:
mov rax, [rbp+var_30]
mov rdx, [rax+r13]
mov rax, [rdi]
mov rcx, cs:my_charset_bin_ptr
call qword ptr [rax+68h]
jmp short loc_8A6D
loc_8A4B:
mov rdi, [r12+r13]
mov rax, [rdi+10h]
test rax, rax
jz short loc_8A64
mov cl, [rdi+8Eh]
or [rax], cl
mov rdi, [r12+r13]
loc_8A64:
mov rax, [rdi]
call qword ptr [rax+160h]
loc_8A6D:
mov rdi, [r12+r13]
neg r14
mov rax, [rdi]
mov rsi, r14
call qword ptr [rax+2D0h]
mov rdi, [r12+r13+8]
add r13, 8
test rdi, rdi
jnz loc_89CE
loc_8A92:
xor eax, eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ha_federated::convert_row_to_internal_format(long long a1, long long a2, long long a3, long long a4)
{
long long *v6; // r12
long long v7; // rdi
long long v8; // r13
long long v9; // r14
long long v10; // rsi
long long v11; // rdi
int v12; // eax
_BYTE *v13; // rax
long long v14; // rdi
_BYTE *v15; // rax
long long lengths; // [rsp+10h] [rbp-30h]
lengths = mysql_fetch_lengths(a4);
v6 = *(long long **)(*(_QWORD *)(a1 + 16) + 176LL);
v7 = *v6;
if ( *v6 )
{
v8 = 0LL;
do
{
v9 = a2 - *(_QWORD *)(*(_QWORD *)(a1 + 16) + 80LL);
(*(void ( **)(long long, long long))(*(_QWORD *)v7 + 720LL))(v7, v9);
v10 = *(_QWORD *)(a3 + v8 * 8);
if ( v10 )
{
v11 = v6[v8];
v12 = *(unsigned __int8 *)(**(_QWORD **)(*(_QWORD *)(a1 + 16) + 496LL) + (*(unsigned __int16 *)(v11 + 140) >> 3));
if ( _bittest(&v12, *(_WORD *)(v11 + 140) & 7) )
{
v13 = *(_BYTE **)(v11 + 16);
if ( v13 )
{
*v13 &= ~*(_BYTE *)(v11 + 142);
v11 = v6[v8];
v10 = *(_QWORD *)(a3 + v8 * 8);
}
(*(void ( **)(long long, long long, _QWORD, void *))(*(_QWORD *)v11 + 104LL))(
v11,
v10,
*(_QWORD *)(lengths + v8 * 8),
&my_charset_bin);
}
}
else
{
v14 = v6[v8];
v15 = *(_BYTE **)(v14 + 16);
if ( v15 )
{
*v15 |= *(_BYTE *)(v14 + 142);
v14 = v6[v8];
}
(*(void ( **)(long long))(*(_QWORD *)v14 + 352LL))(v14);
}
(*(void ( **)(long long, long long))(*(_QWORD *)v6[v8] + 720LL))(v6[v8], -v9);
v7 = v6[++v8];
}
while ( v7 );
}
return 0LL;
}
| convert_row_to_internal_format:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV qword ptr [RBP + -0x38],RSI
MOV R15,RDI
MOV RDI,RCX
CALL 0x001080b0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RAX + 0xb0]
MOV RDI,qword ptr [R12]
TEST RDI,RDI
JZ 0x00108a92
XOR R13D,R13D
LAB_001089ce:
MOV RAX,qword ptr [R15 + 0x10]
MOV R14,qword ptr [RBP + -0x38]
SUB R14,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RDI]
MOV RSI,R14
CALL qword ptr [RAX + 0x2d0]
MOV RSI,qword ptr [RBX + R13*0x1]
TEST RSI,RSI
JZ 0x00108a4b
MOV RAX,qword ptr [R15 + 0x10]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [R12 + R13*0x1]
MOVZX ECX,word ptr [RDI + 0x8c]
MOV RAX,qword ptr [RAX]
MOV EDX,ECX
SHR EDX,0x3
MOVZX EAX,byte ptr [RAX + RDX*0x1]
AND ECX,0x7
BT EAX,ECX
JNC 0x00108a6d
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x00108a34
MOV CL,byte ptr [RDI + 0x8e]
NOT CL
AND byte ptr [RAX],CL
MOV RDI,qword ptr [R12 + R13*0x1]
MOV RSI,qword ptr [RBX + R13*0x1]
LAB_00108a34:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + R13*0x1]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [0x00110f88]
CALL qword ptr [RAX + 0x68]
JMP 0x00108a6d
LAB_00108a4b:
MOV RDI,qword ptr [R12 + R13*0x1]
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x00108a64
MOV CL,byte ptr [RDI + 0x8e]
OR byte ptr [RAX],CL
MOV RDI,qword ptr [R12 + R13*0x1]
LAB_00108a64:
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x160]
LAB_00108a6d:
MOV RDI,qword ptr [R12 + R13*0x1]
NEG R14
MOV RAX,qword ptr [RDI]
MOV RSI,R14
CALL qword ptr [RAX + 0x2d0]
MOV RDI,qword ptr [R12 + R13*0x1 + 0x8]
ADD R13,0x8
TEST RDI,RDI
JNZ 0x001089ce
LAB_00108a92:
XOR EAX,EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ha_federated::convert_row_to_internal_format(unsigned char*, char**, st_mysql_res*) */
int8 __thiscall
ha_federated::convert_row_to_internal_format
(ha_federated *this,uchar *param_1,char **param_2,st_mysql_res *param_3)
{
long *plVar1;
byte *pbVar2;
long lVar3;
long lVar4;
long *plVar5;
long lVar6;
long lVar7;
lVar3 = mysql_fetch_lengths(param_3);
plVar1 = *(long **)(*(long *)(this + 0x10) + 0xb0);
plVar5 = (long *)*plVar1;
if (plVar5 != (long *)0x0) {
lVar6 = 0;
do {
lVar7 = (long)param_1 - *(long *)(*(long *)(this + 0x10) + 0x50);
(**(code **)(*plVar5 + 0x2d0))(plVar5,lVar7);
lVar4 = *(long *)((long)param_2 + lVar6);
if (lVar4 == 0) {
plVar5 = *(long **)((long)plVar1 + lVar6);
pbVar2 = (byte *)plVar5[2];
if (pbVar2 != (byte *)0x0) {
*pbVar2 = *pbVar2 | *(byte *)((long)plVar5 + 0x8e);
plVar5 = *(long **)((long)plVar1 + lVar6);
}
(**(code **)(*plVar5 + 0x160))();
}
else {
plVar5 = *(long **)((long)plVar1 + lVar6);
if ((*(byte *)(**(long **)(*(long *)(this + 0x10) + 0x1f0) +
(ulong)(*(ushort *)((long)plVar5 + 0x8c) >> 3)) >>
(*(ushort *)((long)plVar5 + 0x8c) & 7) & 1) != 0) {
pbVar2 = (byte *)plVar5[2];
if (pbVar2 != (byte *)0x0) {
*pbVar2 = *pbVar2 & ~*(byte *)((long)plVar5 + 0x8e);
plVar5 = *(long **)((long)plVar1 + lVar6);
lVar4 = *(long *)((long)param_2 + lVar6);
}
(**(code **)(*plVar5 + 0x68))
(plVar5,lVar4,*(int8 *)(lVar3 + lVar6),PTR_my_charset_bin_00110f88);
}
}
(**(code **)(**(long **)((long)plVar1 + lVar6) + 0x2d0))
(*(long **)((long)plVar1 + lVar6),-lVar7);
plVar5 = *(long **)((long)plVar1 + lVar6 + 8);
lVar6 = lVar6 + 8;
} while (plVar5 != (long *)0x0);
}
return 0;
}
| |
34,340 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::count(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&) const | monkey531[P]llama/common/json.hpp | size_type count(const key_type& key) const
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return 1;
}
}
return 0;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::count(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&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
movq %rcx, %r15
movq 0x8(%r14), %r12
cmpq %r12, %rcx
je 0x71052
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6ad1a
leaq 0x60(%r15), %rcx
testb %al, %al
je 0x71033
xorl %eax, %eax
cmpq %r12, %r15
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZNK8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5countERSJ_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rcx, [rdi]
loc_71033:
mov r15, rcx
mov r12, [r14+8]
cmp rcx, r12
jz short loc_71052
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rcx, [r15+60h]
test al, al
jz short loc_71033
loc_71052:
xor eax, eax
cmp r15, r12
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _BOOL8 nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::count(
char **a1,
char *a2,
__m128d a3)
{
char *v3; // rcx
char *v4; // r15
char *v5; // r12
char v6; // al
v3 = *a1;
do
{
v4 = v3;
v5 = a1[1];
if ( v3 == v5 )
break;
v6 = nlohmann::json_abi_v3_11_3::operator==(v3, a2, a3);
v3 = v4 + 96;
}
while ( !v6 );
return v4 != v5;
}
| count:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RCX,qword ptr [RDI]
LAB_00171033:
MOV R15,RCX
MOV R12,qword ptr [R14 + 0x8]
CMP RCX,R12
JZ 0x00171052
MOV RDI,R15
MOV RSI,RBX
CALL 0x0016ad1a
LEA RCX,[R15 + 0x60]
TEST AL,AL
JZ 0x00171033
LAB_00171052:
XOR EAX,EAX
CMP R15,R12
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::count(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&) const */
bool __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::count(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
basic_json *pbVar1;
basic_json *pbVar2;
char cVar3;
basic_json *pbVar4;
pbVar2 = *(basic_json **)this;
do {
pbVar4 = pbVar2;
pbVar1 = *(basic_json **)(this + 8);
if (pbVar4 == pbVar1) break;
cVar3 = json_abi_v3_11_3::operator==(pbVar4,param_1);
pbVar2 = pbVar4 + 0x60;
} while (cVar3 == '\0');
return pbVar4 != pbVar1;
}
| |
34,341 | ma_apply_redo_index_free_page | eloqsql/storage/maria/ma_key_recover.c | uint _ma_apply_redo_index_free_page(MARIA_HA *info,
LSN lsn,
const uchar *header)
{
pgcache_page_no_t page= page_korr(header);
pgcache_page_no_t free_page= page_korr(header + PAGE_STORE_SIZE);
my_off_t old_link;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
uchar *buff;
int result;
DBUG_ENTER("_ma_apply_redo_index_free_page");
DBUG_PRINT("enter", ("page: %lu free_page: %lu",
(ulong) page, (ulong) free_page));
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
if (cmp_translog_addr(lsn, share->state.is_of_horizon) >= 0)
share->state.key_del= (my_off_t) page * share->block_size;
old_link= ((free_page != IMPOSSIBLE_PAGE_NO) ?
(my_off_t) free_page * share->block_size :
HA_OFFSET_ERROR);
if (!(buff= pagecache_read(share->pagecache, &share->kfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link)))
{
result= (uint) my_errno;
_ma_set_fatal_error(info, my_errno);
goto err;
}
if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 0, page);
result= 0;
goto err;
}
/* Free page */
bzero(buff + LSN_STORE_SIZE, share->keypage_header - LSN_STORE_SIZE);
_ma_store_keynr(share, buff, (uchar) MARIA_DELETE_KEY_NR);
_ma_store_page_used(share, buff, share->keypage_header + 8);
mi_sizestore(buff + share->keypage_header, old_link);
#ifdef IDENTICAL_PAGES_AFTER_RECOVERY
{
bzero(buff + share->keypage_header + 8,
share->block_size - share->keypage_header - 8 -
KEYPAGE_CHECKSUM_SIZE);
}
#endif
/* Mark page to be unlocked and written at _ma_unpin_all_pages() */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
DBUG_RETURN(0);
err:
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(result);
} | O3 | c | ma_apply_redo_index_free_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl (%rdx), %eax
movl 0x5(%rdx), %ecx
movzbl 0x4(%rdx), %r12d
shlq $0x20, %r12
orq %rax, %r12
movzbl 0x9(%rdx), %eax
movq (%rdi), %r13
orl $0x1b1, 0x170(%r13) # imm = 0x1B1
shlq $0x20, %rax
orq %rcx, %rax
cmpq %rsi, 0x180(%r13)
jg 0x4224b
movl 0x7bc(%r13), %ecx
imulq %r12, %rcx
movq %rcx, 0x120(%r13)
movq $-0x1, %rdx
movabsq $0xffffffffff, %rcx # imm = 0xFFFFFFFFFF
cmpq %rcx, %rax
je 0x4226f
movl 0x7bc(%r13), %ecx
imulq %rcx, %rax
movq %rax, %rdx
movq %rdx, -0x30(%rbp)
movq 0x600(%r13), %rdi
leaq 0x750(%r13), %rsi
leaq -0x48(%rbp), %rax
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x83f42
addq $0x10, %rsp
testq %rax, %rax
je 0x423ad
movq %rax, %rbx
movzwl (%rax), %eax
shlq $0x20, %rax
movzbl 0x2(%rbx), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%rbx), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x423c6
movq %rbx, %rdi
addq $0x7, %rdi
movl 0x744(%r13), %edx
addl $-0x7, %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x2b2f0
movl 0x744(%r13), %eax
addl $-0x4, %eax
movb $-0x1, (%rbx,%rax)
movl 0x744(%r13), %eax
leal 0x8(%rax), %ecx
movb %cl, -0x1(%rbx,%rax)
movl 0x744(%r13), %eax
movb %ch, -0x2(%rbx,%rax)
movq -0x30(%rbp), %rdx
movq %rdx, %rax
shrq $0x20, %rax
movl 0x744(%r13), %ecx
movb %al, 0x3(%rbx,%rcx)
movq %rdx, %rax
shrq $0x28, %rax
movl 0x744(%r13), %ecx
movb %al, 0x2(%rbx,%rcx)
movq %rdx, %rax
shrq $0x30, %rax
movl 0x744(%r13), %ecx
movb %al, 0x1(%rbx,%rcx)
movq %rdx, %rax
shrq $0x38, %rax
movl 0x744(%r13), %ecx
movb %al, (%rbx,%rcx)
movl 0x744(%r13), %eax
movb %dl, 0x7(%rbx,%rax)
movl 0x744(%r13), %eax
movb %dh, 0x6(%rbx,%rax)
movl %edx, %eax
shrl $0x10, %eax
movl 0x744(%r13), %ecx
movb %al, 0x5(%rbx,%rcx)
shrl $0x18, %edx
movl 0x744(%r13), %eax
movb %dl, 0x4(%rbx,%rax)
leaq -0x48(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
addq $0x2e8, %r15 # imm = 0x2E8
movq %r15, %rdi
callq 0xb0cee
jmp 0x423fe
callq 0xc5c9a
movl (%rax), %r14d
callq 0xc5c9a
movl (%rax), %esi
movq %r15, %rdi
callq 0x3dca8
jmp 0x423d6
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
movq %r12, %rcx
callq 0x7eb51
movq 0x600(%r13), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x83c5d
addq $0x10, %rsp
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_redo_index_free_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov r15, rdi
mov eax, [rdx]
mov ecx, [rdx+5]
movzx r12d, byte ptr [rdx+4]
shl r12, 20h
or r12, rax
movzx eax, byte ptr [rdx+9]
mov r13, [rdi]
or dword ptr [r13+170h], 1B1h
shl rax, 20h
or rax, rcx
cmp [r13+180h], rsi
jg short loc_4224B
mov ecx, [r13+7BCh]
imul rcx, r12
mov [r13+120h], rcx
loc_4224B:
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 0FFFFFFFFFFh
cmp rax, rcx
jz short loc_4226F
mov ecx, [r13+7BCh]
imul rax, rcx
mov rdx, rax
loc_4226F:
mov [rbp+var_30], rdx
mov rdi, [r13+600h]
lea rsi, [r13+750h]
lea rax, [rbp+var_48]
mov rdx, r12
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz loc_423AD
mov rbx, rax
movzx eax, word ptr [rax]
shl rax, 20h
movzx ecx, byte ptr [rbx+2]
shl rcx, 30h
or rcx, rax
mov esi, [rbx+3]
or rsi, rcx
cmp rsi, r14
jge loc_423C6
mov rdi, rbx
add rdi, 7
mov edx, [r13+744h]
add edx, 0FFFFFFF9h
xor r14d, r14d
xor esi, esi
call _memset
mov eax, [r13+744h]
add eax, 0FFFFFFFCh
mov byte ptr [rbx+rax], 0FFh
mov eax, [r13+744h]
lea ecx, [rax+8]
mov [rbx+rax-1], cl
mov eax, [r13+744h]
mov [rbx+rax-2], ch
mov rdx, [rbp+var_30]
mov rax, rdx
shr rax, 20h
mov ecx, [r13+744h]
mov [rbx+rcx+3], al
mov rax, rdx
shr rax, 28h
mov ecx, [r13+744h]
mov [rbx+rcx+2], al
mov rax, rdx
shr rax, 30h
mov ecx, [r13+744h]
mov [rbx+rcx+1], al
mov rax, rdx
shr rax, 38h
mov ecx, [r13+744h]
mov [rbx+rcx], al
mov eax, [r13+744h]
mov [rbx+rax+7], dl
mov eax, [r13+744h]
mov [rbx+rax+6], dh
mov eax, edx
shr eax, 10h
mov ecx, [r13+744h]
mov [rbx+rcx+5], al
shr edx, 18h
mov eax, [r13+744h]
mov [rbx+rax+4], dl
lea rsi, [rbp+var_48]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
add r15, 2E8h
mov rdi, r15
call insert_dynamic
jmp short loc_423FE
loc_423AD:
call _my_thread_var
mov r14d, [rax]
call _my_thread_var
mov esi, [rax]
mov rdi, r15
call _ma_set_fatal_error
jmp short loc_423D6
loc_423C6:
xor r14d, r14d
mov rdi, r15
xor edx, edx
mov rcx, r12
call check_skipped_lsn
loc_423D6:
mov rdi, [r13+600h]
mov rsi, [rbp+var_48]
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_423FE:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_apply_redo_index_free_page(_DWORD *a1, signed long long a2, unsigned int *a3)
{
long long v5; // rcx
unsigned long long v6; // r12
long long v7; // rax
long long v8; // r13
long long v9; // rax
long long v10; // rdx
long long v11; // rdi
unsigned __int16 *v12; // rax
unsigned __int16 *v13; // rbx
signed long long v14; // rsi
unsigned int v15; // r14d
long long v16; // rax
long long v17; // rdx
int *v18; // rax
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
int v22; // r9d
long long v24; // [rsp+8h] [rbp-48h] BYREF
int v25; // [rsp+10h] [rbp-40h]
char v26; // [rsp+18h] [rbp-38h]
long long v27; // [rsp+20h] [rbp-30h]
v5 = *(unsigned int *)((char *)a3 + 5);
v6 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v7 = *((unsigned __int8 *)a3 + 9);
v8 = *(_QWORD *)a1;
*(_DWORD *)(v8 + 368) |= 0x1B1u;
v9 = v5 | (v7 << 32);
if ( *(_QWORD *)(v8 + 384) <= a2 )
*(_QWORD *)(v8 + 288) = v6 * *(unsigned int *)(v8 + 1980);
v10 = -1LL;
if ( v9 != 0xFFFFFFFFFFLL )
v10 = *(unsigned int *)(v8 + 1980) * v9;
v27 = v10;
v11 = *(_QWORD *)(v8 + 1536);
v12 = (unsigned __int16 *)pagecache_read(v11, (int)v8 + 1872, v6, 0, 0, 1, 4, (long long)&v24);
if ( !v12 )
{
v15 = *(_DWORD *)my_thread_var(v11);
v18 = (int *)my_thread_var(v11);
ma_set_fatal_error(a1, *v18, v19, v20, v21, v22);
LABEL_10:
pagecache_unlock_by_link(*(_QWORD *)(v8 + 1536), v24, 6, 3, 0, 0, 0LL, 0LL);
return v15;
}
v13 = v12;
v14 = ((unsigned long long)*v12 << 32) | ((unsigned long long)*((unsigned __int8 *)v12 + 2) << 48) | *(unsigned int *)((char *)v12 + 3);
if ( v14 >= a2 )
{
v15 = 0;
check_skipped_lsn(a1, v14, 0LL, v6);
goto LABEL_10;
}
v15 = 0;
memset((char *)v12 + 7, 0LL, (unsigned int)(*(_DWORD *)(v8 + 1860) - 7));
*((_BYTE *)v13 + (unsigned int)(*(_DWORD *)(v8 + 1860) - 4)) = -1;
v16 = *(unsigned int *)(v8 + 1860);
*((_BYTE *)v13 + v16 - 1) = v16 + 8;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) - 2) = (unsigned __int16)(v16 + 8) >> 8;
v17 = v27;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 3) = BYTE4(v27);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 2) = BYTE5(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 1) = BYTE6(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860)) = HIBYTE(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 7) = v17;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 6) = BYTE1(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 5) = BYTE2(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 4) = BYTE3(v17);
v25 = 6;
v26 = 1;
insert_dynamic(a1 + 186, &v24);
return v15;
}
| _ma_apply_redo_index_free_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x5]
MOVZX R12D,byte ptr [RDX + 0x4]
SHL R12,0x20
OR R12,RAX
MOVZX EAX,byte ptr [RDX + 0x9]
MOV R13,qword ptr [RDI]
OR dword ptr [R13 + 0x170],0x1b1
SHL RAX,0x20
OR RAX,RCX
CMP qword ptr [R13 + 0x180],RSI
JG 0x0014224b
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RCX,R12
MOV qword ptr [R13 + 0x120],RCX
LAB_0014224b:
MOV RDX,-0x1
MOV RCX,0xffffffffff
CMP RAX,RCX
JZ 0x0014226f
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RAX,RCX
MOV RDX,RAX
LAB_0014226f:
MOV qword ptr [RBP + -0x30],RDX
MOV RDI,qword ptr [R13 + 0x600]
LEA RSI,[R13 + 0x750]
LEA RAX,[RBP + -0x48]
MOV RDX,R12
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00183f42
ADD RSP,0x10
TEST RAX,RAX
JZ 0x001423ad
MOV RBX,RAX
MOVZX EAX,word ptr [RAX]
SHL RAX,0x20
MOVZX ECX,byte ptr [RBX + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [RBX + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x001423c6
MOV RDI,RBX
ADD RDI,0x7
MOV EDX,dword ptr [R13 + 0x744]
ADD EDX,-0x7
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0012b2f0
MOV EAX,dword ptr [R13 + 0x744]
ADD EAX,-0x4
MOV byte ptr [RBX + RAX*0x1],0xff
MOV EAX,dword ptr [R13 + 0x744]
LEA ECX,[RAX + 0x8]
MOV byte ptr [RBX + RAX*0x1 + -0x1],CL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + -0x2],CH
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,RDX
SHR RAX,0x20
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x3],AL
MOV RAX,RDX
SHR RAX,0x28
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x2],AL
MOV RAX,RDX
SHR RAX,0x30
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x1],AL
MOV RAX,RDX
SHR RAX,0x38
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1],AL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x7],DL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x6],DH
MOV EAX,EDX
SHR EAX,0x10
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x5],AL
SHR EDX,0x18
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x4],DL
LEA RSI,[RBP + -0x48]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
ADD R15,0x2e8
MOV RDI,R15
CALL 0x001b0cee
JMP 0x001423fe
LAB_001423ad:
CALL 0x001c5c9a
MOV R14D,dword ptr [RAX]
CALL 0x001c5c9a
MOV ESI,dword ptr [RAX]
MOV RDI,R15
CALL 0x0013dca8
JMP 0x001423d6
LAB_001423c6:
XOR R14D,R14D
MOV RDI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x0017eb51
LAB_001423d6:
MOV RDI,qword ptr [R13 + 0x600]
MOV RSI,qword ptr [RBP + -0x48]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x00183c5d
ADD RSP,0x10
LAB_001423fe:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_apply_redo_index_free_page(long *param_1,long param_2,uint5 *param_3)
{
long lVar1;
uint5 uVar2;
ushort *puVar3;
int4 *puVar4;
int iVar5;
ulong uVar6;
ulong uVar7;
int4 uVar8;
int8 local_50;
int4 local_48;
int1 local_40;
long local_38;
uVar7 = (ulong)*param_3;
uVar2 = *(uint5 *)((long)param_3 + 5);
lVar1 = *param_1;
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x1b1;
if (*(long *)(lVar1 + 0x180) <= param_2) {
*(ulong *)(lVar1 + 0x120) = *(uint *)(lVar1 + 0x7bc) * uVar7;
}
local_38 = -1;
if ((ulong)uVar2 != 0xffffffffff) {
local_38 = (ulong)uVar2 * (ulong)*(uint *)(lVar1 + 0x7bc);
}
puVar3 = (ushort *)
pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,uVar7,0,0,1,4,&local_50);
if (puVar3 == (ushort *)0x0) {
puVar4 = (int4 *)_my_thread_var();
uVar8 = *puVar4;
puVar4 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar4);
}
else {
uVar6 = (ulong)*(uint *)((long)puVar3 + 3) |
(ulong)(byte)puVar3[1] << 0x30 | (ulong)*puVar3 << 0x20;
if ((long)uVar6 < param_2) {
memset((void *)((long)puVar3 + 7),0,(ulong)(*(int *)(lVar1 + 0x744) - 7));
*(int1 *)((long)puVar3 + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = 0xff;
iVar5 = *(uint *)(lVar1 + 0x744) + 8;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)iVar5;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)((uint)iVar5 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 3) =
(char)((ulong)local_38 >> 0x20);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 2) =
(char)((ulong)local_38 >> 0x28);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 1) =
(char)((ulong)local_38 >> 0x30);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744)) = (char)((ulong)local_38 >> 0x38);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 7) = (char)local_38;
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 6) = (char)((ulong)local_38 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 5) =
(char)((ulong)local_38 >> 0x10);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 4) =
(char)((ulong)local_38 >> 0x18);
local_48 = 6;
local_40 = 1;
insert_dynamic(param_1 + 0x5d);
return 0;
}
uVar8 = 0;
check_skipped_lsn(param_1,uVar6,0,uVar7);
}
pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_50,6,3,0,0,0,0);
return uVar8;
}
| |
34,342 | inline_mysql_file_tell | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_tell(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_tell(file, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_tell(file, flags);
return result;
} | O0 | c | inline_mysql_file_tell:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1d9fa0(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x9, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xaf3f1
leaq 0x1d9f5d(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xbfa20
movq %rax, -0x28(%rbp)
leaq 0x1d9f2d(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xaf409
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xbfa20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_tell_0:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 9
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_AF3F1
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_tell
mov [rbp+var_28], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_AF409
loc_AF3F1:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_tell
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_AF409:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_tell_0(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
long long v7; // [rsp+58h] [rbp-28h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 9LL);
if ( !v6 )
return my_tell(v9, v8);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_tell(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
return v7;
}
| inline_mysql_file_tell:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x9
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001af3f1
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001bfa20
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001af409
LAB_001af3f1:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001bfa20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001af409:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
int8
inline_mysql_file_tell(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int8 local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,9);
if (local_38 == 0) {
local_10 = my_tell(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_30 = my_tell(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_10 = local_30;
}
return local_10;
}
| |
34,343 | minja::Parser::parseMathPow() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
} | O2 | cpp | minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x63c86
cmpq $0x0, (%rbx)
je 0x63bcb
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r12
leaq 0x38(%rsp), %r13
movq %r14, %rdi
leaq 0x4f2eb(%rip), %rsi # 0xb2dd5
movq %r12, %rdx
callq 0x26f76
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x606f0
movq 0x40(%rsp), %rbp
movq %r13, %rdi
callq 0x241d8
movq %r14, %rdi
callq 0x241d8
testq %rbp, %rbp
je 0x63b87
movq %r14, %rdi
movq %r15, %rsi
callq 0x63c86
cmpq $0x0, 0x8(%rsp)
je 0x63b99
movq %r13, %rdi
movq %r15, %rsi
callq 0x5fcc0
movl $0x4, 0x4(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x4(%rsp), %r8
callq 0x63c5f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x70a68
leaq 0x30(%rsp), %rdi
callq 0x4f1f0
leaq 0x40(%rsp), %rdi
callq 0x4f1f0
leaq 0x10(%rsp), %rdi
callq 0x4f1f0
jmp 0x63ae0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
leaq 0x4f22d(%rip), %rsi # 0xb2dd8
movq %rax, %rdi
callq 0x23320
movq 0x98436(%rip), %rsi # 0xfbff0
movq 0x98397(%rip), %rdx # 0xfbf58
movq %r15, %rdi
callq 0x23f20
jmp 0x63bfb
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
leaq 0x4f1cc(%rip), %rsi # 0xb2da9
movq %rax, %rdi
callq 0x23320
movq 0x98404(%rip), %rsi # 0xfbff0
movq 0x98365(%rip), %rdx # 0xfbf58
movq %r15, %rdi
callq 0x23f20
jmp 0x63c39
movq %rax, %r14
movq %r15, %rdi
callq 0x236b0
jmp 0x63c4b
jmp 0x63c19
movq %rax, %r14
movq %r15, %rdi
callq 0x236b0
jmp 0x63c2b
movq %rax, %r14
jmp 0x63c2b
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x4f1f0
leaq 0x10(%rsp), %rdi
callq 0x4f1f0
jmp 0x63c4b
jmp 0x63c39
movq %rax, %r14
jmp 0x63c4b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241d8
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4f1f0
movq %r14, %rdi
callq 0x23fa0
| _ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_63BCB
lea r14, [rsp+88h+var_80]
lea r12, [rsp+88h+var_60]
lea r13, [rsp+88h+var_50]
loc_63AE0:
mov rdi, r14
lea rsi, asc_B2DD5; "**"
mov rdx, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r13
mov rsi, r15
mov rdx, r14
push 1
pop rcx
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+88h+var_48]
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jz short loc_63B87
mov rdi, r14; this
mov rsi, r15
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+88h+var_80], 0
jz short loc_63B99
mov rdi, r13; this
mov rsi, r15
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov [rsp+88h+var_84], 4
mov rdi, r12
mov rsi, r13
mov rdx, rbx
mov rcx, r14
lea r8, [rsp+88h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
mov rdi, rbx
mov rsi, r12
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_63AE0
loc_63B87:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_63B99:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
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_63BFB
loc_63BCB:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
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
loc_63BFB:
jmp short loc_63C39
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_63C4B
jmp short loc_63C19
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_63C2B
loc_63C19:
mov r14, rax
jmp short loc_63C2B
mov r14, rax
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_63C2B:
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_63C4B
jmp short $+2
loc_63C39:
mov r14, rax
jmp short loc_63C4B
mov r14, rax
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_63C4B:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2)
{
long long v2; // rbp
std::runtime_error *v4; // r15
std::runtime_error *exception; // r15
int v6; // [rsp+4h] [rbp-84h] BYREF
long long v7; // [rsp+8h] [rbp-80h] BYREF
_QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF
_BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF
long long v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-50h] BYREF
_QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF
minja::Parser::parseMathPlusMinus(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
while ( 1 )
{
std::string::basic_string<std::allocator<char>>(&v7, (long long)"**");
minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u);
v2 = v12[0];
std::string::~string(&v11);
std::string::~string(&v7);
if ( !v2 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v7);
if ( !v7 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)&v11, a2);
v6 = 4;
std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v9,
&v11,
this,
&v7,
&v6);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
}
return this;
}
| parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV RBX,RDI
CALL 0x00163c86
CMP qword ptr [RBX],0x0
JZ 0x00163bcb
LEA R14,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x38]
LAB_00163ae0:
MOV RDI,R14
LEA RSI,[0x1b2dd5]
MOV RDX,R12
CALL 0x00126f76
LAB_00163af2:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
PUSH 0x1
POP RCX
CALL 0x001606f0
MOV RBP,qword ptr [RSP + 0x40]
MOV RDI,R13
CALL 0x001241d8
MOV RDI,R14
CALL 0x001241d8
TEST RBP,RBP
JZ 0x00163b87
LAB_00163b1d:
MOV RDI,R14
MOV RSI,R15
CALL 0x00163c86
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00163b99
LAB_00163b30:
MOV RDI,R13
MOV RSI,R15
CALL 0x0015fcc0
MOV dword ptr [RSP + 0x4],0x4
LAB_00163b43:
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
LEA R8,[RSP + 0x4]
CALL 0x00163c5f
LAB_00163b59:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00170a68
LEA RDI,[RSP + 0x30]
CALL 0x0014f1f0
LEA RDI,[RSP + 0x40]
CALL 0x0014f1f0
LEA RDI,[RSP + 0x10]
CALL 0x0014f1f0
JMP 0x00163ae0
LAB_00163b87:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00163b99:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
LAB_00163ba4:
LEA RSI,[0x1b2dd8]
MOV RDI,RAX
CALL 0x00123320
LAB_00163bb3:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R15
CALL 0x00123f20
LAB_00163bcb:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
LAB_00163bd6:
LEA RSI,[0x1b2da9]
MOV RDI,RAX
CALL 0x00123320
LAB_00163be5:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R15
CALL 0x00123f20
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
long lVar1;
runtime_error *prVar2;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
long local_80;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24];
Location local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8];
string local_50 [8];
long local_48 [3];
parseMathPlusMinus();
if (*(long *)in_RDI == 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00163bd6 to 00163be4 has its CatchHandler @ 00163bfd */
std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression");
/* try { // try from 00163be5 to 00163bfa has its CatchHandler @ 00163bfb */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
while( true ) {
/* try { // try from 00163ae0 to 00163af1 has its CatchHandler @ 00163c39 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_80,"**",(allocator *)local_60);
/* try { // try from 00163af2 to 00163b02 has its CatchHandler @ 00163c3e */
consumeToken(local_50);
lVar1 = local_48[0];
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_80);
if (lVar1 == 0) {
return;
}
/* try { // try from 00163b1d to 00163b27 has its CatchHandler @ 00163c37 */
parseMathPlusMinus();
if (local_80 == 0) break;
/* try { // try from 00163b30 to 00163b3a has its CatchHandler @ 00163c19 */
get_location();
/* try { // try from 00163b43 to 00163b58 has its CatchHandler @ 00163c1e */
std::
make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_60,local_50,in_RDI,(Op *)&local_80);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00163ba4 to 00163bb2 has its CatchHandler @ 00163c0c */
std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression");
/* try { // try from 00163bb3 to 00163bc8 has its CatchHandler @ 00163c0a */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
| |
34,344 | common_params_print_usage(common_params_context&)::$_0::operator()(std::vector<common_arg*, std::allocator<common_arg*>>&) const | monkey531[P]llama/common/arg.cpp | static void common_params_print_usage(common_params_context & ctx_arg) {
auto print_options = [](std::vector<common_arg *> & options) {
for (common_arg * opt : options) {
printf("%s", opt->to_string().c_str());
}
};
std::vector<common_arg *> common_options;
std::vector<common_arg *> sparam_options;
std::vector<common_arg *> specific_options;
for (auto & opt : ctx_arg.options) {
// in case multiple LLAMA_EXAMPLE_* are set, we prioritize the LLAMA_EXAMPLE_* matching current example
if (opt.is_sparam) {
sparam_options.push_back(&opt);
} else if (opt.in_example(ctx_arg.ex)) {
specific_options.push_back(&opt);
} else {
common_options.push_back(&opt);
}
}
printf("----- common params -----\n\n");
print_options(common_options);
printf("\n\n----- sampling params -----\n\n");
print_options(sparam_options);
// TODO: maybe convert enum llama_example to string
printf("\n\n----- example-specific params -----\n\n");
print_options(specific_options);
} | O0 | cpp | common_params_print_usage(common_params_context&)::$_0::operator()(std::vector<common_arg*, std::allocator<common_arg*>>&) const:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x10cc30
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x10ca70
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x10d0a0
testb $0x1, %al
jne 0xf568b
jmp 0xf56fc
leaq 0x48(%rsp), %rdi
callq 0x10d090
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xdab00
movq (%rsp), %rdi
callq 0x61230
movq %rax, %rsi
leaq 0x161de0(%rip), %rdi # 0x2574a3
xorl %eax, %eax
callq 0x61160
jmp 0xf56cc
leaq 0x18(%rsp), %rdi
callq 0x62cf8
leaq 0x48(%rsp), %rdi
callq 0x10d0e0
jmp 0xf5676
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x62cf8
jmp 0xf5701
addq $0x68, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0x61ff0
nopl (%rax,%rax)
| _ZZL25common_params_print_usageR21common_params_contextENK3$_0clERSt6vectorIP10common_argSaIS4_EE:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_18], rax
mov rdi, [rsp+68h+var_18]
call _ZNSt6vectorIP10common_argSaIS1_EE5beginEv; std::vector<common_arg *>::begin(void)
mov [rsp+68h+var_20], rax
mov rdi, [rsp+68h+var_18]
call _ZNSt6vectorIP10common_argSaIS1_EE3endEv; std::vector<common_arg *>::end(void)
mov [rsp+68h+var_28], rax
loc_F5676:
lea rdi, [rsp+68h+var_20]
lea rsi, [rsp+68h+var_28]
call _ZN9__gnu_cxxneIPP10common_argSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<common_arg **,std::vector<common_arg *>>(__gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>> const&,__gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>> const&)
test al, 1
jnz short loc_F568B
jmp short loc_F56FC
loc_F568B:
lea rdi, [rsp+68h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPP10common_argSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>>::operator*(void)
mov rax, [rax]
mov [rsp+68h+var_30], rax
mov rsi, [rsp+68h+var_30]
lea rdi, [rsp+68h+var_50]
mov [rsp+68h+var_68], rdi
call _ZN10common_arg9to_stringB5cxx11Ev; common_arg::to_string(void)
mov rdi, [rsp+68h+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, rax
lea rdi, aSetCustomJinja_0+0FEh; "%s"
xor eax, eax
call _printf
jmp short $+2
loc_F56CC:
lea rdi, [rsp+68h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+68h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPP10common_argSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>>::operator++(void)
jmp short loc_F5676
mov rcx, rax
mov eax, edx
mov [rsp+arg_8], rcx
mov [rsp+arg_4], eax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_F5701
loc_F56FC:
add rsp, 68h
retn
loc_F5701:
mov rdi, [rsp+arg_8]
call __Unwind_Resume
| long long common_params_print_usage(common_params_context &)::$_0::operator()(long long a1, long long a2)
{
long long result; // rax
const char *v3; // rsi
_BYTE v4[32]; // [rsp+18h] [rbp-50h] BYREF
long long v5; // [rsp+38h] [rbp-30h]
long long v6; // [rsp+40h] [rbp-28h] BYREF
_QWORD v7[4]; // [rsp+48h] [rbp-20h] BYREF
v7[3] = a1;
v7[2] = a2;
v7[1] = a2;
v7[0] = std::vector<common_arg *>::begin(a2);
v6 = std::vector<common_arg *>::end(a2);
while ( 1 )
{
result = __gnu_cxx::operator!=<common_arg **,std::vector<common_arg *>>(v7, &v6);
if ( (result & 1) == 0 )
break;
v5 = *(_QWORD *)__gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>>::operator*(v7);
common_arg::to_string[abi:cxx11]((long long)v4, v5);
v3 = (const char *)std::string::c_str(v4);
printf("%s", v3);
std::string::~string(v4);
__gnu_cxx::__normal_iterator<common_arg **,std::vector<common_arg *>>::operator++(v7);
}
return result;
}
| operator():
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0020cc30
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0020ca70
MOV qword ptr [RSP + 0x40],RAX
LAB_001f5676:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x40]
CALL 0x0020d0a0
TEST AL,0x1
JNZ 0x001f568b
JMP 0x001f56fc
LAB_001f568b:
LEA RDI,[RSP + 0x48]
CALL 0x0020d090
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x18]
MOV qword ptr [RSP],RDI
CALL 0x001dab00
MOV RDI,qword ptr [RSP]
CALL 0x00161230
MOV RSI,RAX
LAB_001f56bc:
LEA RDI,[0x3574a3]
XOR EAX,EAX
CALL 0x00161160
LAB_001f56ca:
JMP 0x001f56cc
LAB_001f56cc:
LEA RDI,[RSP + 0x18]
CALL 0x00162cf8
LEA RDI,[RSP + 0x48]
CALL 0x0020d0e0
JMP 0x001f5676
LAB_001f56fc:
ADD RSP,0x68
RET
|
/* common_params_print_usage(common_params_context&)::$_0::TEMPNAMEPLACEHOLDERVALUE(std::vector<common_arg*,
std::allocator<common_arg*> >&) const */
void __thiscall
common_params_print_usage(common_params_context&)::$_0::operator()(__0 *this,vector *param_1)
{
bool bVar1;
int8 *puVar2;
int8 uVar3;
string local_50 [32];
int8 local_30;
int8 local_28;
int8 local_20;
vector<common_arg*,std::allocator<common_arg*>> *local_18;
vector *local_10;
__0 *local_8;
local_18 = (vector<common_arg*,std::allocator<common_arg*>> *)param_1;
local_10 = param_1;
local_8 = this;
local_20 = std::vector<common_arg*,std::allocator<common_arg*>>::begin
((vector<common_arg*,std::allocator<common_arg*>> *)param_1);
local_28 = std::vector<common_arg*,std::allocator<common_arg*>>::end(local_18);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_20,(__normal_iterator *)&local_28);
if (!bVar1) break;
puVar2 = (int8 *)
__gnu_cxx::
__normal_iterator<common_arg**,std::vector<common_arg*,std::allocator<common_arg*>>>::
operator*((__normal_iterator<common_arg**,std::vector<common_arg*,std::allocator<common_arg*>>>
*)&local_20);
local_30 = *puVar2;
common_arg::to_string_abi_cxx11_();
uVar3 = std::__cxx11::string::c_str();
/* try { // try from 001f56bc to 001f56c9 has its CatchHandler @ 001f56e2 */
printf("%s",uVar3);
std::__cxx11::string::~string(local_50);
__gnu_cxx::__normal_iterator<common_arg**,std::vector<common_arg*,std::allocator<common_arg*>>>
::operator++((__normal_iterator<common_arg**,std::vector<common_arg*,std::allocator<common_arg*>>>
*)&local_20);
}
return;
}
| |
34,345 | LefDefParser::lefGetStringDefine(char const*, char const**) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp | inline int
lefGetStringDefine(const char* name, const char** value)
{
map<string, string, lefCompareStrings>::iterator search = lefData->defines_set.find(strip_case(name));
if ( search != lefData->defines_set.end()) {
*value = search->second.c_str();
return TRUE;
}
return FALSE;
} | O0 | cpp | LefDefParser::lefGetStringDefine(char const*, char const**):
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
leaq 0x6839b(%rip), %rax # 0xa2740
movq (%rax), %rax
addq $0x16e8, %rax # imm = 0x16E8
movq %rax, (%rsp)
movq 0x48(%rsp), %rsi
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x39f40
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3a870
movq %rax, 0x10(%rsp)
jmp 0x3a3db
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x23d0
leaq 0x6834a(%rip), %rax # 0xa2740
movq (%rax), %rdi
addq $0x16e8, %rdi # imm = 0x16E8
callq 0x3a8c0
movq %rax, 0x18(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x3a8a0
testb $0x1, %al
jne 0x3a41f
jmp 0x3a464
leaq 0x38(%rsp), %rdi
callq 0x3a8f0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x2330
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, 0x54(%rsp)
jmp 0x3a46c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x23d0
jmp 0x3a475
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x2420
nop
| _ZN12LefDefParser18lefGetStringDefineEPKcPS1_:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
add rax, 16E8h
mov [rsp+58h+var_58], rax
mov rsi, [rsp+58h+var_10]; char *
lea rdi, [rsp+58h+var_28]; this
mov [rsp+58h+var_50], rdi
call _ZN12LefDefParser10strip_caseEPKc; LefDefParser::strip_case(char const*)
mov rdi, [rsp+58h+var_58]
mov rsi, [rsp+58h+var_50]
call _ZNSt3mapISsSsN12LefDefParser17lefCompareStringsESaISt4pairIKSsSsEEE4findERS3_; std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
mov [rsp+58h+var_48], rax
jmp short $+2
loc_3A3DB:
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_20], rax
lea rdi, [rsp+58h+var_28]; this
call __ZNSsD1Ev; std::string::~string()
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rdi, [rax]
add rdi, 16E8h
call _ZNSt3mapISsSsN12LefDefParser17lefCompareStringsESaISt4pairIKSsSsEEE3endEv; std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::end(void)
mov [rsp+58h+var_40], rax
lea rdi, [rsp+58h+var_20]
lea rsi, [rsp+58h+var_40]
call _ZStneRKSt17_Rb_tree_iteratorISt4pairIKSsSsEES5_; std::operator!=(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&)
test al, 1
jnz short loc_3A41F
jmp short loc_3A464
loc_3A41F:
lea rdi, [rsp+58h+var_20]
call _ZNKSt17_Rb_tree_iteratorISt4pairIKSsSsEEptEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator->(void)
mov rdi, rax
add rdi, 8; this
call __ZNKSs5c_strEv; std::string::c_str(void)
mov rcx, rax
mov rax, [rsp+58h+var_18]
mov [rax], rcx
mov [rsp+58h+var_4], 1
jmp short loc_3A46C
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_28]; this
call __ZNSsD1Ev; std::string::~string()
jmp short loc_3A475
loc_3A464:
mov [rsp+58h+var_4], 0
loc_3A46C:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
loc_3A475:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long LefDefParser::lefGetStringDefine(LefDefParser *this, char *a2, const char **a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+0h] [rbp-58h]
long long v7[3]; // [rsp+18h] [rbp-40h] BYREF
_BYTE v8[8]; // [rsp+30h] [rbp-28h] BYREF
long long v9; // [rsp+38h] [rbp-20h] BYREF
char *v10; // [rsp+40h] [rbp-18h]
char *v11; // [rsp+48h] [rbp-10h]
v11 = (char *)this;
v10 = a2;
v6 = LefDefParser::lefData + 5864LL;
LefDefParser::strip_case((LefDefParser *)v8, (const char *)this);
v9 = std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::find(
v6,
v8);
std::string::~string((std::string *)v8);
v7[0] = std::map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::end(LefDefParser::lefData + 5864LL);
if ( (std::operator!=(&v9, v7) & 1) != 0 )
{
v3 = std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator->(&v9);
v4 = std::string::c_str((std::string *)(v3 + 8));
*(_QWORD *)v10 = v4;
return 1;
}
else
{
return 0;
}
}
| lefGetStringDefine:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
LEA RAX,[0x1a2740]
MOV RAX,qword ptr [RAX]
ADD RAX,0x16e8
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x48]
LEA RDI,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00139f40
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
LAB_0013a3cf:
CALL 0x0013a870
LAB_0013a3d4:
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0013a3db
LAB_0013a3db:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x30]
CALL 0x001023d0
LEA RAX,[0x1a2740]
MOV RDI,qword ptr [RAX]
ADD RDI,0x16e8
CALL 0x0013a8c0
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x18]
CALL 0x0013a8a0
TEST AL,0x1
JNZ 0x0013a41f
JMP 0x0013a464
LAB_0013a41f:
LEA RDI,[RSP + 0x38]
CALL 0x0013a8f0
MOV RDI,RAX
ADD RDI,0x8
CALL 0x00102330
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + 0x54],0x1
JMP 0x0013a46c
LAB_0013a464:
MOV dword ptr [RSP + 0x54],0x0
LAB_0013a46c:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* LefDefParser::lefGetStringDefine(char const*, char const**) */
bool LefDefParser::lefGetStringDefine(char *param_1,char **param_2)
{
map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
*this;
ulong uVar1;
char *pcVar2;
bool bVar3;
int8 local_40 [3];
LefDefParser local_28 [8];
int8 local_20;
char **local_18;
char *local_10;
this = (map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
*)(lefData + 0x16e8);
local_18 = param_2;
local_10 = param_1;
strip_case(local_28,param_1);
/* try { // try from 0013a3cf to 0013a3d3 has its CatchHandler @ 0013a44a */
local_20 = std::
map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
::find(this,(string *)local_28);
std::string::~string((string *)local_28);
local_40[0] = std::
map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
::end((map<std::string,std::string,LefDefParser::lefCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
*)(lefData + 0x16e8));
uVar1 = std::operator!=((_Rb_tree_iterator *)&local_20,(_Rb_tree_iterator *)local_40);
bVar3 = (uVar1 & 1) != 0;
if (bVar3) {
std::_Rb_tree_iterator<std::pair<std::string_const,std::string>>::operator->
((_Rb_tree_iterator<std::pair<std::string_const,std::string>> *)&local_20);
pcVar2 = (char *)std::string::c_str();
*local_18 = pcVar2;
}
return bVar3;
}
| |
34,346 | my_charlen_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_charlen_utf8mb4(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);
if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_charlen_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0xebff2
movb (%rsi), %cl
cmpb $-0x11, %cl
ja 0xebf5e
movl $0x1, %eax
testb %cl, %cl
jns 0xebff2
cmpb $-0x3e, %cl
jb 0xebff0
cmpb $-0x21, %cl
ja 0xebfb7
leaq 0x2(%rsi), %rcx
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %rcx
ja 0xebff2
xorl %eax, %eax
cmpb $-0x40, 0x1(%rsi)
setl %al
addl %eax, %eax
jmp 0xebff2
cmpb $-0xc, %cl
ja 0xebff0
leaq 0x4(%rsi), %rdi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %rdi
ja 0xebff2
movb 0x1(%rsi), %dl
cmpb $-0x41, %dl
jg 0xebff0
cmpb $-0x41, 0x2(%rsi)
jg 0xebff0
cmpb $-0x41, 0x3(%rsi)
jg 0xebff0
cmpb $-0x10, %cl
sete %sil
cmpb $-0x70, %dl
setb %dil
movl $0x0, %eax
testb %dil, %sil
jne 0xebff2
cmpb $-0xc, %cl
setne %al
cmpb $-0x70, %dl
setb %cl
orb %al, %cl
movzbl %cl, %eax
shll $0x2, %eax
jmp 0xebff2
leaq 0x3(%rsi), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %rdi
ja 0xebff2
movb 0x1(%rsi), %dl
cmpb $-0x41, %dl
jg 0xebff0
cmpb $-0x41, 0x2(%rsi)
movl $0x0, %eax
jg 0xebff2
xorl %eax, %eax
cmpb $-0x60, %dl
setae %al
cmpb $-0x20, %cl
leal (%rax,%rax,2), %ecx
movl $0x3, %eax
cmovel %ecx, %eax
jmp 0xebff2
xorl %eax, %eax
popq %rbp
retq
| my_charlen_utf8mb4:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb loc_EBFF2
mov cl, [rsi]
cmp cl, 0EFh
ja short loc_EBF5E
mov eax, 1
test cl, cl
jns loc_EBFF2
cmp cl, 0C2h
jb loc_EBFF0
cmp cl, 0DFh
ja short loc_EBFB7
lea rcx, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp rcx, rdx
ja loc_EBFF2
xor eax, eax
cmp byte ptr [rsi+1], 0C0h
setl al
add eax, eax
jmp loc_EBFF2
loc_EBF5E:
cmp cl, 0F4h
ja loc_EBFF0
lea rdi, [rsi+4]
mov eax, 0FFFFFF98h
cmp rdi, rdx
ja short loc_EBFF2
mov dl, [rsi+1]
cmp dl, 0BFh
jg short loc_EBFF0
cmp byte ptr [rsi+2], 0BFh
jg short loc_EBFF0
cmp byte ptr [rsi+3], 0BFh
jg short loc_EBFF0
cmp cl, 0F0h
setz sil
cmp dl, 90h
setb dil
mov eax, 0
test sil, dil
jnz short loc_EBFF2
cmp cl, 0F4h
setnz al
cmp dl, 90h
setb cl
or cl, al
movzx eax, cl
shl eax, 2
jmp short loc_EBFF2
loc_EBFB7:
lea rdi, [rsi+3]
mov eax, 0FFFFFF99h
cmp rdi, rdx
ja short loc_EBFF2
mov dl, [rsi+1]
cmp dl, 0BFh
jg short loc_EBFF0
cmp byte ptr [rsi+2], 0BFh
mov eax, 0
jg short loc_EBFF2
xor eax, eax
cmp dl, 0A0h
setnb al
cmp cl, 0E0h
lea ecx, [rax+rax*2]
mov eax, 3
cmovz eax, ecx
jmp short loc_EBFF2
loc_EBFF0:
xor eax, eax
loc_EBFF2:
pop rbp
retn
| long long my_charlen_utf8mb4(long long a1, char *a2, unsigned long long a3)
{
long long result; // rax
char v4; // cl
char v5; // dl
char v6; // dl
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (unsigned __int8)*a2 <= 0xEFu )
{
result = 1LL;
if ( v4 >= 0 )
return result;
if ( (unsigned __int8)v4 >= 0xC2u )
{
if ( (unsigned __int8)v4 <= 0xDFu )
{
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
return 2 * (unsigned int)(a2[1] < -64);
return result;
}
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v6 = a2[1];
if ( v6 <= -65 )
{
result = 0LL;
if ( a2[2] <= -65 )
{
result = 3LL;
if ( v4 == -32 )
return 3 * (unsigned int)((unsigned __int8)v6 >= 0xA0u);
}
return result;
}
}
return 0LL;
}
if ( (unsigned __int8)v4 > 0xF4u )
return 0LL;
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v5 = a2[1];
if ( v5 > -65 || a2[2] > -65 || a2[3] > -65 )
return 0LL;
result = 0LL;
if ( (unsigned __int8)v5 >= 0x90u || v4 != -16 )
return 4 * (unsigned int)(v4 != -12 || (unsigned __int8)v5 < 0x90u);
return result;
}
| my_charlen_utf8mb4:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x001ebff2
MOV CL,byte ptr [RSI]
CMP CL,0xef
JA 0x001ebf5e
MOV EAX,0x1
TEST CL,CL
JNS 0x001ebff2
CMP CL,0xc2
JC 0x001ebff0
CMP CL,0xdf
JA 0x001ebfb7
LEA RCX,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP RCX,RDX
JA 0x001ebff2
XOR EAX,EAX
CMP byte ptr [RSI + 0x1],0xc0
SETL AL
ADD EAX,EAX
JMP 0x001ebff2
LAB_001ebf5e:
CMP CL,0xf4
JA 0x001ebff0
LEA RDI,[RSI + 0x4]
MOV EAX,0xffffff98
CMP RDI,RDX
JA 0x001ebff2
MOV DL,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001ebff0
CMP byte ptr [RSI + 0x2],0xbf
JG 0x001ebff0
CMP byte ptr [RSI + 0x3],0xbf
JG 0x001ebff0
CMP CL,0xf0
SETZ SIL
CMP DL,0x90
SETC DIL
MOV EAX,0x0
TEST SIL,DIL
JNZ 0x001ebff2
CMP CL,0xf4
SETNZ AL
CMP DL,0x90
SETC CL
OR CL,AL
MOVZX EAX,CL
SHL EAX,0x2
JMP 0x001ebff2
LAB_001ebfb7:
LEA RDI,[RSI + 0x3]
MOV EAX,0xffffff99
CMP RDI,RDX
JA 0x001ebff2
MOV DL,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001ebff0
CMP byte ptr [RSI + 0x2],0xbf
MOV EAX,0x0
JG 0x001ebff2
XOR EAX,EAX
CMP DL,0xa0
SETNC AL
CMP CL,0xe0
LEA ECX,[RAX + RAX*0x2]
MOV EAX,0x3
CMOVZ EAX,ECX
JMP 0x001ebff2
LAB_001ebff0:
XOR EAX,EAX
LAB_001ebff2:
POP RBP
RET
|
ulong my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
if (bVar1 < 0xf0) {
if (-1 < (char)bVar1) {
return 1;
}
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
return (ulong)((uint)((char)param_2[1] < -0x40) * 2);
}
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
if ((char)param_2[1] < -0x40) {
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (bVar1 != 0xe0) {
return 3;
}
return (ulong)((uint)(0x9f < param_2[1]) * 3);
}
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar2 = param_2[1];
if ((((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) {
if (bVar1 == 0xf0 && bVar2 < 0x90) {
return 0;
}
return (ulong)(bVar2 < 0x90 || bVar1 != 0xf4) << 2;
}
}
return 0;
}
| |
34,347 | maria_rtree_get_req | eloqsql/storage/maria/ma_rt_index.c | static int maria_rtree_get_req(MARIA_HA *info, MARIA_KEYDEF *keyinfo,
uint key_length, my_off_t page_pos, int level)
{
MARIA_SHARE *share= info->s;
uchar *page_buf, *last, *k;
uint nod_flag, key_data_length;
int res;
uint *saved_key= (uint*) (info->maria_rtree_recursion_state) + level;
my_bool buff_alloced;
MARIA_PAGE page;
alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced,
keyinfo->block_length);
if (!page_buf)
{
my_errno= HA_ERR_OUT_OF_MEM;
return(-1);
}
if (_ma_fetch_keypage(&page, info, keyinfo, page_pos,
PAGECACHE_LOCK_LEFT_UNLOCKED,
DFLT_INIT_HITS, page_buf, 0))
goto err;
nod_flag= page.node;
key_data_length= keyinfo->keylength - share->base.rec_reflength;
if (info->maria_rtree_recursion_depth >= level)
{
k= page.buff + *saved_key;
if (!nod_flag)
{
/* Only leaf pages contain data references. */
/* Need to check next key with data reference. */
k= rt_PAGE_NEXT_KEY(share, k, key_data_length, nod_flag);
}
}
else
{
k= rt_PAGE_FIRST_KEY(share, page.buff, nod_flag);
}
last= rt_PAGE_END(&page);
for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key_data_length, nod_flag))
{
if (nod_flag)
{
/* this is an internal node in the tree */
switch ((res= maria_rtree_get_req(info, keyinfo, key_length,
_ma_kpos(nod_flag, k), level + 1)))
{
case 0: /* found - exit from recursion */
*saved_key= (uint) (k - page.buff);
goto ok;
case 1: /* not found - continue searching */
info->maria_rtree_recursion_depth= level;
break;
default:
case -1: /* error */
goto err;
}
}
else
{
/* this is a leaf */
uchar *after_key= rt_PAGE_NEXT_KEY(share, k, key_data_length, 0);
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key() only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= k;
tmp_key.data_length= key_data_length;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
info->last_key.data_length= key_data_length;
info->last_key.ref_length= share->base.rec_reflength;
memcpy(info->last_key.data, k,
info->last_key.data_length + info->last_key.ref_length);
info->maria_rtree_recursion_depth= level;
*saved_key= (uint) (k - page.buff);
if (after_key < last)
{
uchar *keyread_buff= info->keyread_buff;
info->last_rtree_keypos= saved_key;
memcpy(keyread_buff, page.buff, page.size);
info->int_maxpos= keyread_buff + page.size;
info->keyread_buff_used= 0;
}
else
{
info->keyread_buff_used= 1;
}
res= 0;
goto ok;
}
}
info->cur_row.lastpos= HA_OFFSET_ERROR;
my_errno= HA_ERR_KEY_NOT_FOUND;
res= 1;
ok:
stack_alloc_free(page_buf, buff_alloced);
return res;
err:
stack_alloc_free(page_buf, buff_alloced);
info->cur_row.lastpos= HA_OFFSET_ERROR;
return -1;
} | O3 | c | maria_rtree_get_req:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r13
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rcx, -0x40(%rbp)
movslq %ecx, %r15
shlq $0x2, %r15
addq 0x6e0(%rdi), %r15
movq (%rdi), %r12
movq %rsi, -0x68(%rbp)
movzwl 0xa6(%rsi), %esi
leaq -0xb8(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rdi), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x6b3f7
cmpq $0x10000, %rax # imm = 0x10000
ja 0x6b3dd
cmpl $0x1000, %esi # imm = 0x1000
jb 0x6b3f7
cmpq $0x8001, %rax # imm = 0x8001
jb 0x6b3f7
movq %r12, -0x58(%rbp)
movq %rsp, %r14
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %r14
movq %r14, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x6b41a
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9fdb1
testq %rax, %rax
je 0x6b4ab
movq %rax, %r14
movq %r12, -0x58(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
movq %rbx, %rsi
movq -0x68(%rbp), %r12
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %r14
callq 0x58efe
addq $0x10, %rsp
testb %al, %al
je 0x6b463
cmpb $0x0, -0x34(%rbp)
jne 0x6b456
movq %r14, %rdi
callq 0x9ffde
movq $-0x1, 0x98(%rbx)
jmp 0x6b4b6
movq %r15, -0x48(%rbp)
movl -0x90(%rbp), %r13d
movzwl 0xaa(%r12), %ecx
movq -0x58(%rbp), %rdx
movl 0x3e0(%rdx), %eax
movl %ecx, %esi
subl %eax, %ecx
movl %ecx, -0x38(%rbp)
movq -0xa8(%rbp), %r15
movq -0x40(%rbp), %rcx
cmpl %ecx, 0x6f0(%rbx)
movq %r14, -0x50(%rbp)
jge 0x6b4df
movl 0x744(%rdx), %edx
leaq (%r15,%r13), %rcx
jmp 0x6b4f3
callq 0xa1b22
movl $0x80, (%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x6b694
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x48(%rbp), %rcx
movl (%rcx), %edx
addq %r15, %rdx
testq %r13, %r13
jne 0x6b4f6
movl -0x38(%rbp), %ecx
addq %rax, %rcx
addq %rcx, %rdx
movl -0x98(%rbp), %ecx
addq %rcx, %r15
movq %rdx, -0x78(%rbp)
cmpq %r15, %rdx
jae 0x6b56c
movq -0x40(%rbp), %rcx
incl %ecx
movl %ecx, -0x60(%rbp)
movl -0x38(%rbp), %ecx
movq %rcx, -0x80(%rbp)
addl %r13d, %esi
subl %eax, %esi
movl %esi, -0x6c(%rbp)
movq -0x78(%rbp), %r14
movl %r14d, %r12d
testq %r13, %r13
je 0x6b5c3
movl %r13d, %edi
movq %r14, %rsi
callq 0x56f0f
movq %rbx, %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
movl -0x60(%rbp), %ecx
callq 0x6b365
cmpl $0x1, %eax
jne 0x6b5a5
movq -0x40(%rbp), %rax
movl %eax, 0x6f0(%rbx)
addq -0x80(%rbp), %r14
addq %r13, %r14
addl -0x6c(%rbp), %r12d
cmpq %r15, %r14
jb 0x6b527
movq $-0x1, 0x98(%rbx)
callq 0xa1b22
movl $0x78, (%rax)
movl $0x1, %ebx
movq -0x50(%rbp), %r14
movl -0x34(%rbp), %r12d
testb %r12b, %r12b
jne 0x6b4bb
movq %r14, %rdi
callq 0x9ffde
jmp 0x6b4bb
testl %eax, %eax
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %rax
jne 0x6b448
subl -0xa8(%rbp), %r12d
movl %r12d, (%rax)
xorl %ebx, %ebx
jmp 0x6b58b
movq -0x78(%rbp), %r13
movq -0x80(%rbp), %rax
addq %r13, %rax
movq -0x58(%rbp), %r12
movl 0x3e0(%r12), %ecx
addq %rax, %rcx
movq %rcx, -0x60(%rbp)
leaq -0xd8(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, 0x8(%rdi)
movq %r13, (%rdi)
movl -0x38(%rbp), %r14d
movl %r14d, 0x10(%rdi)
callq 0x57074
movq %rax, 0x98(%rbx)
movl %r14d, 0x210(%rbx)
movl 0x3e0(%r12), %edx
movl %edx, 0x214(%rbx)
movq 0x200(%rbx), %rdi
addl %r14d, %edx
movq %r13, %rsi
callq 0x29080
movq -0x40(%rbp), %rax
movl %eax, 0x6f0(%rbx)
movq -0xa8(%rbp), %rsi
subl %esi, %r13d
movq -0x48(%rbp), %rcx
movl %r13d, (%rcx)
movb $0x1, %al
cmpq %r15, -0x60(%rbp)
movl -0x34(%rbp), %r12d
jae 0x6b683
movq 0x380(%rbx), %r14
movq %rcx, 0x638(%rbx)
movl -0x98(%rbp), %edx
movq %r14, %rdi
callq 0x29080
movl -0x98(%rbp), %eax
addq %r14, %rax
movq %rax, 0x3b8(%rbx)
xorl %eax, %eax
movb %al, 0x685(%rbx)
xorl %ebx, %ebx
movq -0x50(%rbp), %r14
jmp 0x6b58f
callq 0x29270
| maria_rtree_get_req:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r13, rdx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_40], rcx
movsxd r15, ecx
shl r15, 2
add r15, [rdi+6E0h]
mov r12, [rdi]
mov [rbp+var_68], rsi
movzx esi, word ptr [rsi+0A6h]
lea rcx, [rbp+var_B8]
mov [rcx], rsi
mov rax, [rdi+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_6B3F7
cmp rax, offset stru_10000
ja short loc_6B3DD
cmp esi, 1000h
jb short loc_6B3F7
cmp rax, 8001h
jb short loc_6B3F7
loc_6B3DD:
mov [rbp+var_58], r12
mov r14, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub r14, rsi
mov rsp, r14
mov al, 1
mov [rbp+var_34], eax
jmp short loc_6B41A
loc_6B3F7:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_6B4AB
mov r14, rax
mov [rbp+var_58], r12
mov [rbp+var_34], 0
loc_6B41A:
lea rdi, [rbp+var_B8]
mov rsi, rbx
mov r12, [rbp+var_68]
mov rdx, r12
mov rcx, r13
xor r8d, r8d
mov r9d, 3
push 0
push r14
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_6B463
loc_6B448:
cmp byte ptr [rbp+var_34], 0
jnz short loc_6B456
mov rdi, r14
call my_free
loc_6B456:
mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh
jmp short loc_6B4B6
loc_6B463:
mov [rbp+var_48], r15
mov r13d, [rbp+var_90]
movzx ecx, word ptr [r12+0AAh]
mov rdx, [rbp+var_58]
mov eax, [rdx+3E0h]
mov esi, ecx
sub ecx, eax
mov [rbp+var_38], ecx
mov r15, [rbp+var_A8]
mov rcx, [rbp+var_40]
cmp [rbx+6F0h], ecx
mov [rbp+var_50], r14
jge short loc_6B4DF
mov edx, [rdx+744h]
lea rcx, [r15+r13]
jmp short loc_6B4F3
loc_6B4AB:
call _my_thread_var
mov dword ptr [rax], 80h
loc_6B4B6:
mov ebx, 0FFFFFFFFh
loc_6B4BB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_6B694
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6B4DF:
mov rcx, [rbp+var_48]
mov edx, [rcx]
add rdx, r15
test r13, r13
jnz short loc_6B4F6
mov ecx, [rbp+var_38]
add rcx, rax
loc_6B4F3:
add rdx, rcx
loc_6B4F6:
mov ecx, [rbp+var_98]
add r15, rcx
mov [rbp+var_78], rdx
cmp rdx, r15
jnb short loc_6B56C
mov rcx, [rbp+var_40]
inc ecx
mov dword ptr [rbp+var_60], ecx
mov ecx, [rbp+var_38]
mov [rbp+var_80], rcx
add esi, r13d
sub esi, eax
mov [rbp+var_6C], esi
mov r14, [rbp+var_78]
mov r12d, r14d
loc_6B527:
test r13, r13
jz loc_6B5C3
mov edi, r13d
mov rsi, r14
call _ma_kpos
mov rdi, rbx
mov rsi, [rbp+var_68]
mov rdx, rax
mov ecx, dword ptr [rbp+var_60]
call maria_rtree_get_req
cmp eax, 1
jnz short loc_6B5A5
mov rax, [rbp+var_40]
mov [rbx+6F0h], eax
add r14, [rbp+var_80]
add r14, r13
add r12d, [rbp+var_6C]
cmp r14, r15
jb short loc_6B527
loc_6B56C:
mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov ebx, 1
mov r14, [rbp+var_50]
loc_6B58B:
mov r12d, [rbp+var_34]
loc_6B58F:
test r12b, r12b
jnz loc_6B4BB
mov rdi, r14
call my_free
jmp loc_6B4BB
loc_6B5A5:
test eax, eax
mov r14, [rbp+var_50]
mov rax, [rbp+var_48]
jnz loc_6B448
sub r12d, dword ptr [rbp+var_A8]
mov [rax], r12d
xor ebx, ebx
jmp short loc_6B58B
loc_6B5C3:
mov r13, [rbp+var_78]
mov rax, [rbp+var_80]
add rax, r13
mov r12, [rbp+var_58]
mov ecx, [r12+3E0h]
add rcx, rax
mov [rbp+var_60], rcx
lea rdi, [rbp+var_D8]
mov rax, [rbp+var_68]
mov [rdi+8], rax
mov [rdi], r13
mov r14d, [rbp+var_38]
mov [rdi+10h], r14d
call _ma_row_pos_from_key
mov [rbx+98h], rax
mov [rbx+210h], r14d
mov edx, [r12+3E0h]
mov [rbx+214h], edx
mov rdi, [rbx+200h]
add edx, r14d
mov rsi, r13
call _memcpy
mov rax, [rbp+var_40]
mov [rbx+6F0h], eax
mov rsi, [rbp+var_A8]
sub r13d, esi
mov rcx, [rbp+var_48]
mov [rcx], r13d
mov al, 1
cmp [rbp+var_60], r15
mov r12d, [rbp+var_34]
jnb short loc_6B683
mov r14, [rbx+380h]
mov [rbx+638h], rcx
mov edx, [rbp+var_98]
mov rdi, r14
call _memcpy
mov eax, [rbp+var_98]
add rax, r14
mov [rbx+3B8h], rax
xor eax, eax
loc_6B683:
mov [rbx+685h], al
xor ebx, ebx
mov r14, [rbp+var_50]
jmp loc_6B58F
loc_6B694:
call ___stack_chk_fail
| long long maria_rtree_get_req(long long a1, long long a2, unsigned long long a3, long long a4)
{
long long v6; // r15
long long v7; // r12
const char *v8; // rsi
unsigned long long v9; // rax
bool v10; // cc
unsigned long long v11; // rax
char *v12; // r14
long long v13; // rax
_QWORD *v14; // rdi
long long v15; // r12
long long v16; // r13
long long v17; // rax
const char *v18; // rsi
unsigned long long v19; // rdx
long long v20; // rcx
unsigned int v21; // ebx
unsigned long long v23; // r15
unsigned long long v24; // r14
int v25; // r12d
long long v26; // rax
int req; // eax
char v28; // r12
long long v29; // r13
long long v30; // r12
unsigned int v31; // r14d
int v32; // edx
long long v33; // rsi
_DWORD *v34; // rcx
char v35; // al
long long v36; // r14
long long v38[2]; // [rsp+8h] [rbp-D8h] BYREF
unsigned int v39; // [rsp+18h] [rbp-C8h]
_QWORD v40[2]; // [rsp+28h] [rbp-B8h] BYREF
long long v41; // [rsp+38h] [rbp-A8h]
unsigned int v42; // [rsp+48h] [rbp-98h]
unsigned int v43; // [rsp+50h] [rbp-90h]
long long v44; // [rsp+60h] [rbp-80h]
long long v45; // [rsp+68h] [rbp-78h]
int v46; // [rsp+74h] [rbp-6Ch]
const char *v47; // [rsp+78h] [rbp-68h]
unsigned long long v48; // [rsp+80h] [rbp-60h]
long long v49; // [rsp+88h] [rbp-58h]
char *v50; // [rsp+90h] [rbp-50h]
_DWORD *v51; // [rsp+98h] [rbp-48h]
long long v52; // [rsp+A0h] [rbp-40h]
unsigned int v53; // [rsp+A8h] [rbp-38h]
int v54; // [rsp+ACh] [rbp-34h]
unsigned long long v55; // [rsp+B0h] [rbp-30h]
v55 = __readfsqword(0x28u);
v52 = a4;
v6 = *(_QWORD *)(a1 + 1760) + 4LL * (int)a4;
v7 = *(_QWORD *)a1;
v47 = (const char *)a2;
v8 = (const char *)*(unsigned __int16 *)(a2 + 166);
v40[0] = v8;
v9 = **(_QWORD **)(a1 + 120) - (_QWORD)v40;
v10 = v9 <= (unsigned long long)v8;
v11 = v9 - (_QWORD)v8;
if ( v10 || v11 <= (unsigned long long)&stru_10000 && ((unsigned int)v8 < 0x1000 || v11 < 0x8001) )
{
v13 = my_malloc(0LL, v8, 65552LL);
if ( !v13 )
{
*(_DWORD *)my_thread_var(0LL, v8) = 128;
return (unsigned int)-1;
}
v12 = (char *)v13;
v49 = v7;
v54 = 0;
}
else
{
v49 = v7;
v12 = (char *)&v38[-1] - (((_DWORD)v8 + 15) & 0xFFFFFFF0);
LOBYTE(v11) = 1;
v54 = v11;
}
v14 = v40;
v15 = (long long)v47;
if ( ma_fetch_keypage((long long)v40, a1, (long long)v47, a3, 0, 3, (long long)v12) )
{
LABEL_9:
if ( !(_BYTE)v54 )
my_free(v12);
*(_QWORD *)(a1 + 152) = -1LL;
return (unsigned int)-1;
}
v51 = (_DWORD *)v6;
v16 = v43;
v17 = *(unsigned int *)(v49 + 992);
v18 = (const char *)*(unsigned __int16 *)(v15 + 170);
v53 = (_DWORD)v18 - v17;
v10 = *(_DWORD *)(a1 + 1776) < (int)v52;
v50 = v12;
if ( v10 )
{
v19 = *(unsigned int *)(v49 + 1860);
v20 = v41 + v43;
LABEL_19:
v19 += v20;
goto LABEL_20;
}
v19 = v41 + (unsigned int)*v51;
if ( !v43 )
{
v20 = v17 + v53;
goto LABEL_19;
}
LABEL_20:
v23 = v42 + v41;
v45 = v19;
if ( v19 >= v23 )
{
LABEL_25:
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var(v14, v18) = 120;
v21 = 1;
v12 = v50;
}
else
{
LODWORD(v48) = v52 + 1;
v44 = v53;
v46 = v43 + (_DWORD)v18 - v17;
v24 = v45;
v25 = v45;
while ( 1 )
{
if ( !v16 )
{
v29 = v45;
v30 = v49;
v48 = v45 + v44 + *(unsigned int *)(v49 + 992);
v38[1] = (long long)v47;
v38[0] = v45;
v31 = v53;
v39 = v53;
*(_QWORD *)(a1 + 152) = ma_row_pos_from_key(v38);
*(_DWORD *)(a1 + 528) = v31;
v32 = *(_DWORD *)(v30 + 992);
*(_DWORD *)(a1 + 532) = v32;
memcpy(*(_QWORD *)(a1 + 512), v29, v31 + v32);
*(_DWORD *)(a1 + 1776) = v52;
v33 = v41;
v34 = v51;
*v51 = v29 - v41;
v35 = 1;
v28 = v54;
if ( v48 < v23 )
{
v36 = *(_QWORD *)(a1 + 896);
*(_QWORD *)(a1 + 1592) = v34;
memcpy(v36, v33, v42);
*(_QWORD *)(a1 + 952) = v36 + v42;
v35 = 0;
}
*(_BYTE *)(a1 + 1669) = v35;
v21 = 0;
v12 = v50;
goto LABEL_27;
}
v26 = ma_kpos(v16, v24);
v14 = (_QWORD *)a1;
v18 = v47;
req = maria_rtree_get_req(a1, v47, v26, (unsigned int)v48);
if ( req != 1 )
break;
*(_DWORD *)(a1 + 1776) = v52;
v24 += v16 + v44;
v25 += v46;
if ( v24 >= v23 )
goto LABEL_25;
}
v12 = v50;
if ( req )
goto LABEL_9;
*v51 = v25 - v41;
v21 = 0;
}
v28 = v54;
LABEL_27:
if ( !v28 )
my_free(v12);
return v21;
}
| maria_rtree_get_req:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R13,RDX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x40],RCX
MOVSXD R15,ECX
SHL R15,0x2
ADD R15,qword ptr [RDI + 0x6e0]
MOV R12,qword ptr [RDI]
MOV qword ptr [RBP + -0x68],RSI
MOVZX ESI,word ptr [RSI + 0xa6]
LEA RCX,[RBP + -0xb8]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x0016b3f7
CMP RAX,0x10000
JA 0x0016b3dd
CMP ESI,0x1000
JC 0x0016b3f7
CMP RAX,0x8001
JC 0x0016b3f7
LAB_0016b3dd:
MOV qword ptr [RBP + -0x58],R12
MOV R14,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB R14,RSI
MOV RSP,R14
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0016b41a
LAB_0016b3f7:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019fdb1
TEST RAX,RAX
JZ 0x0016b4ab
MOV R14,RAX
MOV qword ptr [RBP + -0x58],R12
MOV dword ptr [RBP + -0x34],0x0
LAB_0016b41a:
LEA RDI,[RBP + -0xb8]
MOV RSI,RBX
MOV R12,qword ptr [RBP + -0x68]
MOV RDX,R12
MOV RCX,R13
XOR R8D,R8D
MOV R9D,0x3
PUSH 0x0
PUSH R14
CALL 0x00158efe
ADD RSP,0x10
TEST AL,AL
JZ 0x0016b463
LAB_0016b448:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x0016b456
MOV RDI,R14
CALL 0x0019ffde
LAB_0016b456:
MOV qword ptr [RBX + 0x98],-0x1
JMP 0x0016b4b6
LAB_0016b463:
MOV qword ptr [RBP + -0x48],R15
MOV R13D,dword ptr [RBP + -0x90]
MOVZX ECX,word ptr [R12 + 0xaa]
MOV RDX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RDX + 0x3e0]
MOV ESI,ECX
SUB ECX,EAX
MOV dword ptr [RBP + -0x38],ECX
MOV R15,qword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RBP + -0x40]
CMP dword ptr [RBX + 0x6f0],ECX
MOV qword ptr [RBP + -0x50],R14
JGE 0x0016b4df
MOV EDX,dword ptr [RDX + 0x744]
LEA RCX,[R15 + R13*0x1]
JMP 0x0016b4f3
LAB_0016b4ab:
CALL 0x001a1b22
MOV dword ptr [RAX],0x80
LAB_0016b4b6:
MOV EBX,0xffffffff
LAB_0016b4bb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0016b694
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016b4df:
MOV RCX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RCX]
ADD RDX,R15
TEST R13,R13
JNZ 0x0016b4f6
MOV ECX,dword ptr [RBP + -0x38]
ADD RCX,RAX
LAB_0016b4f3:
ADD RDX,RCX
LAB_0016b4f6:
MOV ECX,dword ptr [RBP + -0x98]
ADD R15,RCX
MOV qword ptr [RBP + -0x78],RDX
CMP RDX,R15
JNC 0x0016b56c
MOV RCX,qword ptr [RBP + -0x40]
INC ECX
MOV dword ptr [RBP + -0x60],ECX
MOV ECX,dword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x80],RCX
ADD ESI,R13D
SUB ESI,EAX
MOV dword ptr [RBP + -0x6c],ESI
MOV R14,qword ptr [RBP + -0x78]
MOV R12D,R14D
LAB_0016b527:
TEST R13,R13
JZ 0x0016b5c3
MOV EDI,R13D
MOV RSI,R14
CALL 0x00156f0f
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x60]
CALL 0x0016b365
CMP EAX,0x1
JNZ 0x0016b5a5
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBX + 0x6f0],EAX
ADD R14,qword ptr [RBP + -0x80]
ADD R14,R13
ADD R12D,dword ptr [RBP + -0x6c]
CMP R14,R15
JC 0x0016b527
LAB_0016b56c:
MOV qword ptr [RBX + 0x98],-0x1
CALL 0x001a1b22
MOV dword ptr [RAX],0x78
MOV EBX,0x1
MOV R14,qword ptr [RBP + -0x50]
LAB_0016b58b:
MOV R12D,dword ptr [RBP + -0x34]
LAB_0016b58f:
TEST R12B,R12B
JNZ 0x0016b4bb
MOV RDI,R14
CALL 0x0019ffde
JMP 0x0016b4bb
LAB_0016b5a5:
TEST EAX,EAX
MOV R14,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
JNZ 0x0016b448
SUB R12D,dword ptr [RBP + -0xa8]
MOV dword ptr [RAX],R12D
XOR EBX,EBX
JMP 0x0016b58b
LAB_0016b5c3:
MOV R13,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,R13
MOV R12,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [R12 + 0x3e0]
ADD RCX,RAX
MOV qword ptr [RBP + -0x60],RCX
LEA RDI,[RBP + -0xd8]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RDI + 0x8],RAX
MOV qword ptr [RDI],R13
MOV R14D,dword ptr [RBP + -0x38]
MOV dword ptr [RDI + 0x10],R14D
CALL 0x00157074
MOV qword ptr [RBX + 0x98],RAX
MOV dword ptr [RBX + 0x210],R14D
MOV EDX,dword ptr [R12 + 0x3e0]
MOV dword ptr [RBX + 0x214],EDX
MOV RDI,qword ptr [RBX + 0x200]
ADD EDX,R14D
MOV RSI,R13
CALL 0x00129080
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBX + 0x6f0],EAX
MOV RSI,qword ptr [RBP + -0xa8]
SUB R13D,ESI
MOV RCX,qword ptr [RBP + -0x48]
MOV dword ptr [RCX],R13D
MOV AL,0x1
CMP qword ptr [RBP + -0x60],R15
MOV R12D,dword ptr [RBP + -0x34]
JNC 0x0016b683
MOV R14,qword ptr [RBX + 0x380]
MOV qword ptr [RBX + 0x638],RCX
MOV EDX,dword ptr [RBP + -0x98]
MOV RDI,R14
CALL 0x00129080
MOV EAX,dword ptr [RBP + -0x98]
ADD RAX,R14
MOV qword ptr [RBX + 0x3b8],RAX
XOR EAX,EAX
LAB_0016b683:
MOV byte ptr [RBX + 0x685],AL
XOR EBX,EBX
MOV R14,qword ptr [RBP + -0x50]
JMP 0x0016b58f
LAB_0016b694:
CALL 0x00129270
|
int8 maria_rtree_get_req(long *param_1,long param_2,int8 param_3,int8 param_4)
{
ushort uVar1;
uint uVar2;
long lVar3;
void *__src;
char cVar4;
int iVar5;
ulong uVar6;
int1 *puVar7;
int4 *puVar8;
long lVar9;
uint uVar10;
ulong uVar11;
void *pvVar12;
int8 uVar13;
int1 *puVar14;
ulong uVar15;
uint *puVar16;
void *pvVar17;
long in_FS_OFFSET;
bool bVar18;
int1 auStack_e8 [8];
void *local_e0;
long local_d8;
uint local_d0;
ulong local_c0 [2];
int local_b0;
int4 uStack_ac;
uint local_a0;
uint local_98;
ulong local_88;
void *local_80;
int local_74;
long local_70;
void *local_68;
long local_60;
int1 *local_58;
uint *local_50;
int8 local_48;
uint local_40;
int4 local_3c;
long local_38;
puVar14 = auStack_e8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
puVar16 = (uint *)((long)(int)param_4 * 4 + param_1[0xdc]);
lVar3 = *param_1;
uVar1 = *(ushort *)(param_2 + 0xa6);
local_c0[0] = (ulong)uVar1;
uVar6 = (*(long *)param_1[0xf] - (long)local_c0) - local_c0[0];
local_70 = param_2;
local_48 = param_4;
if (((ulong)(*(long *)param_1[0xf] - (long)local_c0) < local_c0[0] || uVar6 == 0) ||
((uVar6 < 0x10001 && ((uVar1 < 0x1000 || (uVar6 < 0x8001)))))) {
puVar7 = (int1 *)my_malloc(0,local_c0[0],0x10010);
if (puVar7 != (int1 *)0x0) {
local_3c = 0;
puVar14 = auStack_e8;
goto LAB_0016b41a;
}
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x80;
}
else {
puVar7 = auStack_e8 + -(ulong)(uVar1 + 0xf & 0xfffffff0);
local_3c = (int4)CONCAT71((int7)(uVar6 >> 8),1);
puVar14 = puVar7;
LAB_0016b41a:
lVar9 = local_70;
local_60 = lVar3;
*(int8 *)(puVar14 + -8) = 0;
*(int1 **)(puVar14 + -0x10) = puVar7;
*(int8 *)(puVar14 + -0x18) = 0x16b440;
cVar4 = _ma_fetch_keypage(local_c0,param_1,lVar9,param_3,0,3);
if (cVar4 == '\0') {
uVar6 = (ulong)local_98;
uVar2 = *(uint *)(local_60 + 0x3e0);
uVar10 = (uint)*(ushort *)(lVar9 + 0xaa);
local_40 = uVar10 - uVar2;
lVar3 = CONCAT44(uStack_ac,local_b0);
if ((int)param_1[0xde] < (int)local_48) {
pvVar12 = (void *)(ulong)*(uint *)(local_60 + 0x744);
lVar9 = lVar3 + uVar6;
LAB_0016b4f3:
pvVar12 = (void *)((long)pvVar12 + lVar9);
}
else {
pvVar12 = (void *)((ulong)*puVar16 + lVar3);
if (uVar6 == 0) {
lVar9 = (ulong)local_40 + (ulong)uVar2;
goto LAB_0016b4f3;
}
}
pvVar17 = (void *)(lVar3 + (ulong)local_a0);
local_80 = pvVar12;
local_58 = puVar7;
local_50 = puVar16;
if (pvVar12 < pvVar17) {
local_68 = (void *)CONCAT44(local_68._4_4_,(int)local_48 + 1);
local_88 = (ulong)local_40;
local_74 = (uVar10 + local_98) - uVar2;
uVar15 = (ulong)pvVar12 & 0xffffffff;
do {
uVar2 = local_40;
lVar3 = local_60;
__src = local_80;
if (uVar6 == 0) {
local_68 = (void *)((long)local_80 + *(uint *)(local_60 + 0x3e0) + local_88);
local_d8 = local_70;
local_e0 = local_80;
local_d0 = local_40;
*(int8 *)(puVar14 + -8) = 0x16b600;
lVar9 = _ma_row_pos_from_key();
param_1[0x13] = lVar9;
*(uint *)(param_1 + 0x42) = uVar2;
iVar5 = *(int *)(lVar3 + 0x3e0);
*(int *)((long)param_1 + 0x214) = iVar5;
pvVar12 = (void *)param_1[0x40];
*(int8 *)(puVar14 + -8) = 0x16b62e;
memcpy(pvVar12,__src,(ulong)(iVar5 + uVar2));
*(int *)(param_1 + 0xde) = (int)local_48;
*local_50 = (int)__src - local_b0;
bVar18 = pvVar17 <= local_68;
cVar4 = (char)local_3c;
if (!bVar18) {
pvVar12 = (void *)param_1[0x70];
param_1[199] = (long)local_50;
uVar6 = (ulong)local_a0;
*(int8 *)(puVar14 + -8) = 0x16b671;
memcpy(pvVar12,(void *)CONCAT44(uStack_ac,local_b0),uVar6);
param_1[0x77] = (ulong)local_a0 + (long)pvVar12;
}
*(bool *)((long)param_1 + 0x685) = bVar18;
uVar13 = 0;
goto LAB_0016b58f;
}
*(int8 *)(puVar14 + -8) = 0x16b53b;
uVar13 = _ma_kpos(local_98,pvVar12);
lVar3 = local_70;
uVar11 = (ulong)local_68 & 0xffffffff;
*(int8 *)(puVar14 + -8) = 0x16b54d;
iVar5 = maria_rtree_get_req(param_1,lVar3,uVar13,uVar11);
if (iVar5 != 1) {
puVar7 = local_58;
if (iVar5 != 0) goto LAB_0016b448;
*local_50 = (int)uVar15 - local_b0;
uVar13 = 0;
goto LAB_0016b58b;
}
*(int *)(param_1 + 0xde) = (int)local_48;
pvVar12 = (void *)((long)pvVar12 + uVar6 + local_88);
uVar15 = (ulong)(uint)((int)uVar15 + local_74);
} while (pvVar12 < pvVar17);
}
param_1[0x13] = -1;
*(int8 *)(puVar14 + -8) = 0x16b57c;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x78;
uVar13 = 1;
LAB_0016b58b:
cVar4 = (char)local_3c;
LAB_0016b58f:
puVar7 = local_58;
if (cVar4 == '\0') {
*(int8 *)(puVar14 + -8) = 0x16b5a0;
my_free(puVar7);
}
goto LAB_0016b4bb;
}
LAB_0016b448:
if ((char)local_3c == '\0') {
*(int8 *)(puVar14 + -8) = 0x16b456;
my_free(puVar7);
}
param_1[0x13] = -1;
}
uVar13 = 0xffffffff;
LAB_0016b4bb:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar13;
}
/* WARNING: Subroutine does not return */
*(code **)(puVar14 + -8) = maria_rtree_get_next;
__stack_chk_fail();
}
| |
34,348 | stbi_loadf_from_memory | llama.cpp/examples/llava/../../common/stb_image.h | STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi__context s;
stbi__start_mem(&s,buffer,len);
return stbi__loadf_main(&s,x,y,comp,req_comp);
} | O3 | c | stbi_loadf_from_memory:
subq $0xe8, %rsp
leaq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
xorl %r10d, %r10d
movl %r10d, 0x30(%rax)
movl %r10d, 0xb8(%rax)
movq %rdi, 0xd0(%rax)
movq %rdi, 0xc0(%rax)
movslq %esi, %rsi
addq %rdi, %rsi
movq %rsi, 0xd8(%rax)
movq %rsi, 0xc8(%rax)
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %r9d, %r8d
callq 0x22849
addq $0xe8, %rsp
retq
| stbi_loadf_from_memory:
sub rsp, 0E8h
lea rax, [rsp+0E8h+var_E0]
mov qword ptr [rax+10h], 0
xor r10d, r10d
mov [rax+30h], r10d
mov [rax+0B8h], r10d
mov [rax+0D0h], rdi
mov [rax+0C0h], rdi
movsxd rsi, esi
add rsi, rdi
mov [rax+0D8h], rsi
mov [rax+0C8h], rsi
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
mov r8d, r9d
call _ZL16stbi__loadf_mainP13stbi__contextPiS1_S1_i; stbi__loadf_main(stbi__context *,int *,int *,int *,int)
add rsp, 0E8h
retn
| long long stbi_loadf_from_memory(long long a1, int a2, long long a3, long long a4, long long a5, unsigned int a6)
{
_BYTE v7[16]; // [rsp+8h] [rbp-E0h] BYREF
long long v8; // [rsp+18h] [rbp-D0h]
int v9; // [rsp+38h] [rbp-B0h]
int v10; // [rsp+C0h] [rbp-28h]
long long v11; // [rsp+C8h] [rbp-20h]
long long v12; // [rsp+D0h] [rbp-18h]
long long v13; // [rsp+D8h] [rbp-10h]
long long v14; // [rsp+E0h] [rbp-8h]
v8 = 0LL;
v9 = 0;
v10 = 0;
v13 = a1;
v11 = a1;
v14 = a1 + a2;
v12 = v14;
return stbi__loadf_main(v7, a3, a4, a5, a6);
}
| stbi_loadf_from_memory:
SUB RSP,0xe8
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX + 0x10],0x0
XOR R10D,R10D
MOV dword ptr [RAX + 0x30],R10D
MOV dword ptr [RAX + 0xb8],R10D
MOV qword ptr [RAX + 0xd0],RDI
MOV qword ptr [RAX + 0xc0],RDI
MOVSXD RSI,ESI
ADD RSI,RDI
MOV qword ptr [RAX + 0xd8],RSI
MOV qword ptr [RAX + 0xc8],RSI
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
MOV R8D,R9D
CALL 0x00122849
ADD RSP,0xe8
RET
|
void stbi_loadf_from_memory
(long param_1,int param_2,int *param_3,int *param_4,int *param_5,int param_6)
{
stbi__context local_e0 [16];
int8 local_d0;
int4 local_b0;
int4 local_28;
long local_20;
long local_18;
long local_10;
long local_8;
local_d0 = 0;
local_b0 = 0;
local_28 = 0;
local_18 = param_2 + param_1;
local_20 = param_1;
local_10 = param_1;
local_8 = local_18;
stbi__loadf_main(local_e0,param_3,param_4,param_5,param_6);
return;
}
| |
34,349 | fn_ext2 | eloqsql/mysys/mf_fn_ext.c | char *fn_ext2(const char *name)
{
register const char *pos, *gpos;
DBUG_ENTER("fn_ext");
DBUG_PRINT("mfunkt",("name: '%s'",name));
#if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL)
{
char buff[FN_REFLEN];
size_t res_length;
gpos= name+ dirname_part(buff,(char*) name, &res_length);
}
#else
if (!(gpos= strrchr(name, FN_LIBCHAR)))
gpos= name;
#endif
// locate the last occurrence of FN_EXTCHAR
pos= strrchr(gpos, FN_EXTCHAR);
DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
} | O3 | c | fn_ext2:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x2f, %esi
callq 0x369d0
movq %rax, %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x369d0
testq %rax, %rax
je 0x5d4ee
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x928e4
nop
| fn_ext2:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdi
mov esi, 2Fh ; '/'
call _strrchr
mov rbx, rax
test rax, rax
cmovz rbx, r14
mov rdi, rbx
mov esi, 2Eh ; '.'
call _strrchr
test rax, rax
jz short loc_5D4EE
pop rbx
pop r14
pop rbp
retn
loc_5D4EE:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp strend
| long long fn_ext2(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = strrchr(a1, 47LL);
if ( !v1 )
v1 = a1;
result = strrchr(v1, 46LL);
if ( !result )
return strend(v1);
return result;
}
| fn_ext2:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDI
MOV ESI,0x2f
CALL 0x001369d0
MOV RBX,RAX
TEST RAX,RAX
CMOVZ RBX,R14
MOV RDI,RBX
MOV ESI,0x2e
CALL 0x001369d0
TEST RAX,RAX
JZ 0x0015d4ee
POP RBX
POP R14
POP RBP
RET
LAB_0015d4ee:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001928e4
|
void fn_ext2(char *param_1)
{
char *__s;
char *pcVar1;
__s = strrchr(param_1,0x2f);
if (__s == (char *)0x0) {
__s = param_1;
}
pcVar1 = strrchr(__s,0x2e);
if (pcVar1 != (char *)0x0) {
return;
}
strend(__s);
return;
}
| |
34,350 | CloseAudioDevice | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | void CloseAudioDevice(void)
{
if (AUDIO.System.isReady)
{
ma_mutex_uninit(&AUDIO.System.lock);
ma_device_uninit(&AUDIO.System.device);
ma_context_uninit(&AUDIO.System.context);
AUDIO.System.isReady = false;
RL_FREE(AUDIO.System.pcmBuffer);
AUDIO.System.pcmBuffer = NULL;
AUDIO.System.pcmBufferSize = 0;
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
}
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");
} | O0 | c | CloseAudioDevice:
pushq %rbp
movq %rsp, %rbp
testb $0x1, 0x19ded5(%rip) # 0x217c10
je 0x79dad
leaq 0x19cbec(%rip), %rdi # 0x216930
addq $0x12b8, %rdi # imm = 0x12B8
callq 0x1d1e0
leaq 0x19cbd9(%rip), %rdi # 0x216930
addq $0x3f8, %rdi # imm = 0x3F8
callq 0x259c0
leaq 0x19cbc6(%rip), %rdi # 0x216930
callq 0x23760
movb $0x0, 0x19de9a(%rip) # 0x217c10
movq 0x19dea3(%rip), %rdi # 0x217c20
callq 0xa640
movq $0x0, 0x19de93(%rip) # 0x217c20
movq $0x0, 0x19de80(%rip) # 0x217c18
movl $0x3, %edi
leaq 0x130714(%rip), %rsi # 0x1aa4b8
movb $0x0, %al
callq 0x182c40
jmp 0x79dc0
movl $0x4, %edi
leaq 0x130721(%rip), %rsi # 0x1aa4da
movb $0x0, %al
callq 0x182c40
popq %rbp
retq
nopw %cs:(%rax,%rax)
| CloseAudioDevice:
push rbp
mov rbp, rsp
test cs:byte_217C10, 1
jz short loc_79DAD
lea rdi, AUDIO
add rdi, 12B8h
call ma_mutex_uninit
lea rdi, AUDIO
add rdi, 3F8h
call ma_device_uninit
lea rdi, AUDIO
call ma_context_uninit
mov cs:byte_217C10, 0
mov rdi, cs:qword_217C20
call _free
mov cs:qword_217C20, 0
mov cs:qword_217C18, 0
mov edi, 3
lea rsi, aAudioDeviceClo; "AUDIO: Device closed successfully"
mov al, 0
call TraceLog
jmp short loc_79DC0
loc_79DAD:
mov edi, 4
lea rsi, aAudioDeviceCou; "AUDIO: Device could not be closed, not "...
mov al, 0
call TraceLog
loc_79DC0:
pop rbp
retn
| long long CloseAudioDevice(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
if ( (byte_217C10 & 1) == 0 )
return TraceLog(4, (unsigned int)"AUDIO: Device could not be closed, not currently initialized", a3, a4, a5, a6);
ma_mutex_uninit((long long)&AUDIO + 4792);
ma_device_uninit((volatile __int32 *)&AUDIO + 254);
ma_context_uninit((long long)&AUDIO);
byte_217C10 = 0;
free(qword_217C20);
qword_217C20 = 0LL;
qword_217C18 = 0LL;
return TraceLog(3, (unsigned int)"AUDIO: Device closed successfully", v6, v7, v8, v9);
}
| CloseAudioDevice:
PUSH RBP
MOV RBP,RSP
TEST byte ptr [0x00317c10],0x1
JZ 0x00179dad
LEA RDI,[0x316930]
ADD RDI,0x12b8
CALL 0x0011d1e0
LEA RDI,[0x316930]
ADD RDI,0x3f8
CALL 0x001259c0
LEA RDI,[0x316930]
CALL 0x00123760
MOV byte ptr [0x00317c10],0x0
MOV RDI,qword ptr [0x00317c20]
CALL 0x0010a640
MOV qword ptr [0x00317c20],0x0
MOV qword ptr [0x00317c18],0x0
MOV EDI,0x3
LEA RSI,[0x2aa4b8]
MOV AL,0x0
CALL 0x00282c40
JMP 0x00179dc0
LAB_00179dad:
MOV EDI,0x4
LEA RSI,[0x2aa4da]
MOV AL,0x0
CALL 0x00282c40
LAB_00179dc0:
POP RBP
RET
|
void CloseAudioDevice(void)
{
if ((AUDIO[0x12e0] & 1) == 0) {
TraceLog(4,"AUDIO: Device could not be closed, not currently initialized");
}
else {
ma_mutex_uninit(0x317be8);
ma_device_uninit(0x316d28);
ma_context_uninit(AUDIO);
AUDIO[0x12e0] = 0;
free((void *)AUDIO._4848_8_);
AUDIO._4848_8_ = 0;
AUDIO._4840_8_ = 0;
TraceLog(3,"AUDIO: Device closed successfully");
}
return;
}
| |
34,351 | CloseAudioDevice | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | void CloseAudioDevice(void)
{
if (AUDIO.System.isReady)
{
ma_mutex_uninit(&AUDIO.System.lock);
ma_device_uninit(&AUDIO.System.device);
ma_context_uninit(&AUDIO.System.context);
AUDIO.System.isReady = false;
RL_FREE(AUDIO.System.pcmBuffer);
AUDIO.System.pcmBuffer = NULL;
AUDIO.System.pcmBufferSize = 0;
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
}
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");
} | O2 | c | CloseAudioDevice:
cmpb $0x1, 0xea2d1(%rip) # 0x124b70
jne 0x3a8f8
pushq %rbx
leaq 0xea29f(%rip), %rdi # 0x124b48
callq 0x9600
leaq 0xe8fdb(%rip), %rbx # 0x123890
leaq 0xe93cc(%rip), %rdi # 0x123c88
callq 0x132f7
movq %rbx, %rdi
callq 0x11fad
movb $0x0, 0xea2a0(%rip) # 0x124b70
movq 0xea2a9(%rip), %rdi # 0x124b80
callq 0x9640
xorps %xmm0, %xmm0
movups %xmm0, 0xea292(%rip) # 0x124b78
leaq 0x81313(%rip), %rsi # 0xbbc00
pushq $0x3
popq %rdi
xorl %eax, %eax
popq %rbx
jmp 0xa128b
leaq 0x81323(%rip), %rsi # 0xbbc22
pushq $0x4
popq %rdi
xorl %eax, %eax
jmp 0xa128b
| CloseAudioDevice:
cmp cs:byte_124B70, 1
jnz short loc_3A8F8
push rbx
lea rdi, unk_124B48
call _pthread_mutex_destroy
lea rbx, AUDIO
lea rdi, dword_123C88
call ma_device_uninit
mov rdi, rbx
call ma_context_uninit
mov cs:byte_124B70, 0
mov rdi, qword ptr cs:xmmword_124B78+8
call _free
xorps xmm0, xmm0
movups cs:xmmword_124B78, xmm0
lea rsi, aAudioDeviceClo; "AUDIO: Device closed successfully"
push 3
pop rdi
xor eax, eax
pop rbx
jmp TraceLog
loc_3A8F8:
lea rsi, aAudioDeviceCou; "AUDIO: Device could not be closed, not "...
push 4
pop rdi
xor eax, eax
jmp TraceLog
| long long CloseAudioDevice(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
if ( byte_124B70 != 1 )
return TraceLog(4, (unsigned int)"AUDIO: Device could not be closed, not currently initialized", a3, a4, a5, a6);
pthread_mutex_destroy(&unk_124B48);
ma_device_uninit(dword_123C88);
ma_context_uninit(AUDIO);
byte_124B70 = 0;
free(*((_QWORD *)&xmmword_124B78 + 1));
xmmword_124B78 = 0LL;
return TraceLog(3, (unsigned int)"AUDIO: Device closed successfully", v6, v7, v8, v9);
}
| CloseAudioDevice:
CMP byte ptr [0x00224b70],0x1
JNZ 0x0013a8f8
PUSH RBX
LEA RDI,[0x224b48]
CALL 0x00109600
LEA RBX,[0x223890]
LEA RDI,[0x223c88]
CALL 0x001132f7
MOV RDI,RBX
CALL 0x00111fad
MOV byte ptr [0x00224b70],0x0
MOV RDI,qword ptr [0x00224b80]
CALL 0x00109640
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x00224b78],XMM0
LEA RSI,[0x1bbc00]
PUSH 0x3
POP RDI
XOR EAX,EAX
POP RBX
JMP 0x001a128b
LAB_0013a8f8:
LEA RSI,[0x1bbc22]
PUSH 0x4
POP RDI
XOR EAX,EAX
JMP 0x001a128b
|
void CloseAudioDevice(void)
{
if (AUDIO[0x12e0] == '\x01') {
pthread_mutex_destroy((pthread_mutex_t *)(AUDIO + 0x12b8));
ma_device_uninit(0x223c88);
ma_context_uninit(AUDIO);
AUDIO[0x12e0] = 0;
free((void *)AUDIO._4848_8_);
AUDIO._4840_8_ = 0;
AUDIO._4848_8_ = 0;
TraceLog(3,"AUDIO: Device closed successfully");
return;
}
TraceLog(4,"AUDIO: Device could not be closed, not currently initialized");
return;
}
| |
34,352 | js_std_getenv | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_getenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name, *str;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
str = getenv(name);
JS_FreeCString(ctx, name);
if (!str)
return JS_UNDEFINED;
else
return JS_NewString(ctx, str);
} | O0 | c | js_std_getenv:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x15032
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x15081
movq 0x8(%rsp), %rdi
callq 0xe040
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x29e50
cmpq $0x0, (%rsp)
jne 0x15069
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
jmp 0x15081
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
callq 0x103b0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
| js_std_getenv:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+48h+var_40], rax
cmp [rsp+48h+var_40], 0
jnz short loc_15032
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_15081
loc_15032:
mov rdi, [rsp+48h+var_40]
call _getenv
mov [rsp+48h+var_48], rax
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_40]
call JS_FreeCString
cmp [rsp+48h+var_48], 0
jnz short loc_15069
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 3
jmp short loc_15081
loc_15069:
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_48]
call JS_NewString
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_15081:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
| long long js_std_getenv(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v6; // [rsp+0h] [rbp-48h]
long long v7; // [rsp+8h] [rbp-40h]
long long v8; // [rsp+38h] [rbp-10h]
v7 = JS_ToCString(a1, *a5, a5[1]);
if ( v7 )
{
v6 = getenv(v7);
JS_FreeCString(a1, v7);
if ( v6 )
return JS_NewString(a1, v6);
else
LODWORD(v8) = 0;
}
else
{
LODWORD(v8) = 0;
}
return v8;
}
| js_std_getenv:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00115032
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00115081
LAB_00115032:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e040
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00129e50
CMP qword ptr [RSP],0x0
JNZ 0x00115069
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
JMP 0x00115081
LAB_00115069:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP]
CALL 0x001103b0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_00115081:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] js_std_getenv(int8 param_1)
{
char *__name;
char *pcVar1;
int8 *in_R8;
int1 auVar2 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
__name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__name == (char *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
pcVar1 = getenv(__name);
JS_FreeCString(param_1,__name);
if (pcVar1 == (char *)0x0) {
local_10 = 0;
local_8 = 3;
}
else {
auVar2 = JS_NewString(param_1,pcVar1);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
}
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
34,353 | js_std_getenv | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_getenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name, *str;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
str = getenv(name);
JS_FreeCString(ctx, name);
if (!str)
return JS_UNDEFINED;
else
return JS_NewString(ctx, str);
} | O1 | c | js_std_getenv:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r14d, %r14d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x170cf
movq %rax, %r15
movq %rax, %rdi
callq 0xe040
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20edd
testq %r14, %r14
je 0x170d6
movq %r14, %rdi
callq 0xe240
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1ff07
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r14d
jmp 0x170e0
movl $0x6, %edx
jmp 0x170de
movl $0x3, %edx
xorl %r14d, %r14d
xorl %ecx, %ecx
orq %rcx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
| js_std_getenv:
push r15
push r14
push rbx
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r14d, r14d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_170CF
mov r15, rax
mov rdi, rax
call _getenv
mov r14, rax
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
test r14, r14
jz short loc_170D6
mov rdi, r14
call _strlen
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call JS_NewStringLen
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r14d, eax
jmp short loc_170E0
loc_170CF:
mov edx, 6
jmp short loc_170DE
loc_170D6:
mov edx, 3
xor r14d, r14d
loc_170DE:
xor ecx, ecx
loc_170E0:
or r14, rcx
mov rax, r14
pop rbx
pop r14
pop r15
retn
| unsigned long long js_std_getenv(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // r14
long long v6; // rax
long long v7; // r15
long long v8; // r14
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rcx
v5 = 0LL;
v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( !v6 )
goto LABEL_6;
v7 = v6;
v8 = getenv(v6);
JS_FreeCString(a1, v7);
if ( !v8 )
{
v5 = 0LL;
LABEL_6:
v11 = 0LL;
return v11 | v5;
}
v9 = strlen(v8);
v10 = JS_NewStringLen(a1, v8, v9);
v11 = v10 & 0xFFFFFFFF00000000LL;
v5 = (unsigned int)v10;
return v11 | v5;
}
| |||
34,354 | js_std_getenv | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_getenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name, *str;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
str = getenv(name);
JS_FreeCString(ctx, name);
if (!str)
return JS_UNDEFINED;
else
return JS_NewString(ctx, str);
} | O3 | c | js_std_getenv:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r14d, %r14d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21353
testq %rax, %rax
je 0x17ac8
movq %rax, %r15
movq %rax, %rdi
callq 0xe040
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21629
testq %r14, %r14
je 0x17acf
movq %r14, %rdi
callq 0xe240
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2066e
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r14d
jmp 0x17ad9
movl $0x6, %edx
jmp 0x17ad7
movl $0x3, %edx
xorl %r14d, %r14d
xorl %ecx, %ecx
orq %rcx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
| js_std_getenv:
push r15
push r14
push rbx
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r14d, r14d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_17AC8
mov r15, rax
mov rdi, rax
call _getenv
mov r14, rax
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
test r14, r14
jz short loc_17ACF
mov rdi, r14
call _strlen
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call JS_NewStringLen
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r14d, eax
jmp short loc_17AD9
loc_17AC8:
mov edx, 6
jmp short loc_17AD7
loc_17ACF:
mov edx, 3
xor r14d, r14d
loc_17AD7:
xor ecx, ecx
loc_17AD9:
or r14, rcx
mov rax, r14
pop rbx
pop r14
pop r15
retn
| unsigned long long js_std_getenv(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // r14
long long v6; // rax
long long v7; // r15
long long v8; // r14
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rcx
v5 = 0LL;
v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( !v6 )
goto LABEL_6;
v7 = v6;
v8 = getenv(v6);
JS_FreeCString(a1, v7);
if ( !v8 )
{
v5 = 0LL;
LABEL_6:
v11 = 0LL;
return v11 | v5;
}
v9 = strlen(v8);
v10 = JS_NewStringLen(a1, v8, v9);
v11 = v10 & 0xFFFFFFFF00000000LL;
v5 = (unsigned int)v10;
return v11 | v5;
}
| js_std_getenv:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR R14D,R14D
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00121353
TEST RAX,RAX
JZ 0x00117ac8
MOV R15,RAX
MOV RDI,RAX
CALL 0x0010e040
MOV R14,RAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x00121629
TEST R14,R14
JZ 0x00117acf
MOV RDI,R14
CALL 0x0010e240
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x0012066e
MOV RCX,-0x100000000
AND RCX,RAX
MOV R14D,EAX
JMP 0x00117ad9
LAB_00117ac8:
MOV EDX,0x6
JMP 0x00117ad7
LAB_00117acf:
MOV EDX,0x3
XOR R14D,R14D
LAB_00117ad7:
XOR ECX,ECX
LAB_00117ad9:
OR R14,RCX
MOV RAX,R14
POP RBX
POP R14
POP R15
RET
|
ulong js_std_getenv(int8 param_1)
{
char *__name;
char *__s;
size_t sVar1;
ulong uVar2;
ulong uVar3;
int8 *in_R8;
__name = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__name != (char *)0x0) {
__s = getenv(__name);
JS_FreeCString(param_1,__name);
if (__s != (char *)0x0) {
sVar1 = strlen(__s);
uVar2 = JS_NewStringLen(param_1,__s,sVar1);
uVar3 = uVar2 & 0xffffffff00000000;
uVar2 = uVar2 & 0xffffffff;
goto LAB_00117ad9;
}
}
uVar2 = 0;
uVar3 = 0;
LAB_00117ad9:
return uVar2 | uVar3;
}
| |
34,355 | OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp | bool
PatchBuilder::IsFaceALeaf(int levelIndex, Index faceIndex) const {
// All faces in the last level are leaves
if (levelIndex < _refiner.GetMaxLevel()) {
// Faces selected for further refinement are not leaves
if (_refiner.getRefinement(levelIndex).
getParentFaceSparseTag(faceIndex)._selected) {
return false;
}
}
return true;
} | O1 | cpp | OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int, int) const:
movq 0x8(%rdi), %rax
movl 0x8(%rax), %ecx
shrl $0x6, %ecx
andl $0xf, %ecx
cmpl %esi, %ecx
jle 0x6568c
movslq %esi, %rcx
movq 0x48(%rax), %rax
movq (%rax,%rcx,8), %rax
movslq %edx, %rcx
movq 0x198(%rax), %rax
testb $0x1, (%rax,%rcx)
jne 0x6568f
movb $0x1, %al
retq
xorl %eax, %eax
retq
| _ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder11IsFaceALeafEii:
mov rax, [rdi+8]
mov ecx, [rax+8]
shr ecx, 6
and ecx, 0Fh
cmp ecx, esi
jle short loc_6568C
movsxd rcx, esi
mov rax, [rax+48h]
mov rax, [rax+rcx*8]
movsxd rcx, edx
mov rax, [rax+198h]
test byte ptr [rax+rcx], 1
jnz short loc_6568F
loc_6568C:
mov al, 1
retn
loc_6568F:
xor eax, eax
retn
| bool OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(
OpenSubdiv::v3_6_0::Far::PatchBuilder *this,
int a2,
int a3)
{
long long v3; // rax
v3 = *((_QWORD *)this + 1);
return ((*(_DWORD *)(v3 + 8) >> 6) & 0xF) <= a2
|| (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v3 + 72) + 8LL * a2) + 408LL) + a3) & 1) == 0;
}
| IsFaceALeaf:
MOV RAX,qword ptr [RDI + 0x8]
MOV ECX,dword ptr [RAX + 0x8]
SHR ECX,0x6
AND ECX,0xf
CMP ECX,ESI
JLE 0x0016568c
MOVSXD RCX,ESI
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOVSXD RCX,EDX
MOV RAX,qword ptr [RAX + 0x198]
TEST byte ptr [RAX + RCX*0x1],0x1
JNZ 0x0016568f
LAB_0016568c:
MOV AL,0x1
RET
LAB_0016568f:
XOR EAX,EAX
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int, int) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(PatchBuilder *this,int param_1,int param_2)
{
long lVar1;
lVar1 = *(long *)(this + 8);
if ((param_1 < (int)(*(uint *)(lVar1 + 8) >> 6 & 0xf)) &&
(lVar1 = *(long *)(*(long *)(*(long *)(lVar1 + 0x48) + (long)param_1 * 8) + 0x198),
(*(byte *)(lVar1 + param_2) & 1) != 0)) {
return 0;
}
return CONCAT71((int7)((ulong)lVar1 >> 8),1);
}
| |
34,356 | minja::Parser::parseValueExpression()::'lambda'()::operator()() const | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
} | O2 | cpp | minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x60190
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x65d94
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x654cb
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x6602c
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f7fe
jmp 0x65547
leaq 0x99cb6(%rip), %rax # 0xff188
movb (%rax), %al
testb %al, %al
je 0x6562c
leaq 0x99c85(%rip), %rdx # 0xff168
leaq 0x50(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x605b4
leaq 0x50(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x24208
testq %r15, %r15
je 0x6556b
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x6604e
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rdx
callq 0x65cce
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f7fe
leaq 0x50(%rsp), %rdi
callq 0x62d12
leaq 0x30(%rsp), %rdi
callq 0x4f7fe
leaq 0x40(%rsp), %rdi
callq 0x4f7fe
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x60d28
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x6559f
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
andq $0x0, 0x58(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x50(%rsp)
jmp 0x65622
movq %rsp, %rdi
movq %r14, %rsi
callq 0x6606e
movq (%rsp), %rax
testq %rax, %rax
je 0x655cc
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
jmp 0x65618
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x6643e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x655fd
movq %rax, (%rbx)
movq 0x20(%rsp), %rax
andq $0x0, 0x20(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x18(%rsp)
jmp 0x6560e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6680c
cmpq $0x0, (%rbx)
je 0x65681
leaq 0x20(%rsp), %rdi
callq 0x4f7fe
leaq 0x8(%rsp), %rdi
callq 0x4f7fe
leaq 0x58(%rsp), %rdi
jmp 0x654c4
leaq 0x99b55(%rip), %rdi # 0xff188
callq 0x24040
testl %eax, %eax
je 0x654dc
leaq 0x99b21(%rip), %rdi # 0xff168
leaq 0x4ea08(%rip), %rsi # 0xb4056
pushq $0x10
popq %rdx
callq 0x46350
leaq -0x1f0e7(%rip), %rdi # 0x46576
leaq 0x99b04(%rip), %rsi # 0xff168
leaq 0x9929d(%rip), %rdx # 0xfe908
callq 0x237e0
leaq 0x99b11(%rip), %rdi # 0xff188
callq 0x23600
jmp 0x654dc
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r15
leaq 0x4e9ca(%rip), %rsi # 0xb405d
movq %rax, %rdi
callq 0x23340
movq 0x9894e(%rip), %rsi # 0xfdff0
movq 0x988af(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x99acd(%rip), %rdi # 0xff188
callq 0x235f0
jmp 0x65723
movq %rax, %r14
jmp 0x656d2
movq %rax, %r14
movq %r15, %rdi
callq 0x236b0
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4f7fe
jmp 0x656e3
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4f7fe
jmp 0x656f2
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4f7fe
jmp 0x65701
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x4f7fe
jmp 0x65723
jmp 0x65720
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x62d12
jmp 0x65723
jmp 0x65720
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x4f7fe
jmp 0x65732
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x4f7fe
movq %r14, %rdi
callq 0x23fd0
| _ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov r14, [rsi]
lea rdi, [rsp+0B8h+var_80]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+0B8h+var_90]; this
mov rsi, r14
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov rdx, [rsp+0B8h+var_90]
test rdx, rdx
jz short loc_654CB
lea rdi, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_80]
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationERNS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(minja::Location &,minja::Value &)
lea rdi, [rsp+0B8h+var_60]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
loc_654C4:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65547
loc_654CB:
lea rax, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
mov al, [rax]
test al, al
jz loc_6562C
loc_654DC:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rdi, [rsp+0B8h+var_68]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_68]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_6556B
lea r14, [rsp+0B8h+var_68]
mov rdi, r14; this
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
mov rdi, rsp
lea rsi, [rsp+0B8h+var_80]
mov rdx, r14
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationENS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(minja::Location &,minja::Value &&)
lea rdi, [rsp+0B8h+var_B0]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_65547:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
loc_6556B:
lea rdi, [rsp+0B8h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, [rsp+0B8h+var_68]
test rax, rax
jz short loc_6559F
mov [rbx], rax
mov rax, [rsp+0B8h+var_60]
and [rsp+0B8h+var_60], 0
mov [rbx+8], rax
and [rsp+0B8h+var_68], 0
jmp loc_65622
loc_6559F:
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0B8h+var_B8]
test rax, rax
jz short loc_655CC
mov [rbx], rax
mov rax, [rsp+0B8h+var_B0]
and [rsp+0B8h+var_B0], 0
mov [rbx+8], rax
and [rsp+0B8h+var_B8], 0
jmp short loc_65618
loc_655CC:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_655FD
mov [rbx], rax
mov rax, [rsp+0B8h+var_98]
and [rsp+0B8h+var_98], 0
mov [rbx+8], rax
and [rsp+0B8h+var_A0], 0
jmp short loc_6560E
loc_655FD:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [rbx], 0
jz short loc_65681
loc_6560E:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_65618:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_65622:
lea rdi, [rsp+0B8h+var_60]
jmp loc_654C4
loc_6562C:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_654DC
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_654DC
loc_65681:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedValueE; "Expected value expression"
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
mov r14, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_65723
mov r14, rax
jmp short loc_656D2
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_656D2:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_656E3
mov r14, rax
loc_656E3:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_656F2
mov r14, rax
loc_656F2:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65701
mov r14, rax
loc_65701:
lea rdi, [rsp+0B8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65723
jmp short loc_65720
mov r14, rax
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_65723
jmp short $+2
loc_65720:
mov r14, rax
loc_65723:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65732
mov r14, rax
loc_65732:
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
_QWORD **a2)
{
_QWORD *v2; // r14
__int128 v3; // xmm0
long long v4; // r15
__int128 v5; // xmm0
long long v7; // rax
long long v8; // rax
long long v9; // rax
std::runtime_error *exception; // r15
__int128 v11; // [rsp+0h] [rbp-B8h] BYREF
long long v12; // [rsp+18h] [rbp-A0h] BYREF
long long v13; // [rsp+20h] [rbp-98h] BYREF
long long v14; // [rsp+28h] [rbp-90h] BYREF
long long v15; // [rsp+30h] [rbp-88h] BYREF
_BYTE v16[8]; // [rsp+38h] [rbp-80h] BYREF
long long v17; // [rsp+40h] [rbp-78h] BYREF
_OWORD v18[6]; // [rsp+50h] [rbp-68h] BYREF
v2 = *a2;
minja::Parser::get_location((minja::Parser *)v16, *a2);
minja::Parser::parseConstant((minja::Parser *)&v14);
if ( v14 )
{
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(v18, v16);
v3 = v18[0];
*((_QWORD *)&v18[0] + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
(long long)"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
v18,
(long long)v2,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v4 = *((_QWORD *)&v18[0] + 1);
std::string::~string(v18);
if ( v4 )
{
minja::Value::Value((minja::Value *)v18);
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(&v11, v16, v18);
v5 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v5;
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
minja::Value::~Value((minja::Value *)v18);
goto LABEL_7;
}
minja::Parser::parseIdentifier((minja::Parser *)v18, v2);
if ( *(_QWORD *)&v18[0] )
{
*(_QWORD *)this = *(_QWORD *)&v18[0];
v7 = *((_QWORD *)&v18[0] + 1);
*((_QWORD *)&v18[0] + 1) = 0LL;
*((_QWORD *)this + 1) = v7;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v11);
if ( (_QWORD)v11 )
{
*(_QWORD *)this = v11;
v8 = *((_QWORD *)&v11 + 1);
*((_QWORD *)&v11 + 1) = 0LL;
*((_QWORD *)this + 1) = v8;
*(_QWORD *)&v11 = 0LL;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v12);
if ( v12 )
{
*(_QWORD *)this = v12;
v9 = v13;
v13 = 0LL;
*((_QWORD *)this + 1) = v9;
v12 = 0LL;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v18 + 1);
LABEL_7:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
return this;
}
| operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV R14,qword ptr [RSI]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00160190
LAB_00165489:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x00165d94
MOV RDX,qword ptr [RSP + 0x28]
TEST RDX,RDX
JZ 0x001654cb
LAB_001654a0:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
CALL 0x0016602c
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
LAB_001654c4:
CALL 0x0014f7fe
JMP 0x00165547
LAB_001654cb:
LEA RAX,[0x1ff188]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0016562c
LAB_001654dc:
LEA RDX,[0x1ff168]
LEA RDI,[RSP + 0x50]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001605b4
LEA RDI,[RSP + 0x50]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00124208
TEST R15,R15
JZ 0x0016556b
LEA R14,[RSP + 0x50]
MOV RDI,R14
CALL 0x0016604e
LAB_00165513:
MOV RDI,RSP
LEA RSI,[RSP + 0x38]
MOV RDX,R14
CALL 0x00165cce
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014f7fe
LEA RDI,[RSP + 0x50]
CALL 0x00162d12
LAB_00165547:
LEA RDI,[RSP + 0x30]
CALL 0x0014f7fe
LEA RDI,[RSP + 0x40]
CALL 0x0014f7fe
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
LAB_0016556b:
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x00160d28
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0016559f
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
AND qword ptr [RSP + 0x58],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x50],0x0
JMP 0x00165622
LAB_0016559f:
MOV RDI,RSP
MOV RSI,R14
CALL 0x0016606e
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x001655cc
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
JMP 0x00165618
LAB_001655cc:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0016643e
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x001655fd
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x20]
AND qword ptr [RSP + 0x20],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x18],0x0
JMP 0x0016560e
LAB_001655fd:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016680c
CMP qword ptr [RBX],0x0
JZ 0x00165681
LAB_0016560e:
LEA RDI,[RSP + 0x20]
CALL 0x0014f7fe
LAB_00165618:
LEA RDI,[RSP + 0x8]
CALL 0x0014f7fe
LAB_00165622:
LEA RDI,[RSP + 0x58]
JMP 0x001654c4
LAB_0016562c:
LEA RDI,[0x1ff188]
CALL 0x00124040
TEST EAX,EAX
JZ 0x001654dc
LAB_00165640:
LEA RDI,[0x1ff168]
LEA RSI,[0x1b4056]
PUSH 0x10
POP RDX
CALL 0x00146350
LAB_00165656:
LEA RDI,[0x146576]
LEA RSI,[0x1ff168]
LEA RDX,[0x1fe908]
CALL 0x001237e0
LEA RDI,[0x1ff188]
CALL 0x00123600
JMP 0x001654dc
LAB_00165681:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R15,RAX
LAB_0016568c:
LEA RSI,[0x1b405d]
MOV RDI,RAX
CALL 0x00123340
LAB_0016569b:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f30
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
int8 uVar1;
long lVar2;
int iVar3;
runtime_error *this_00;
int8 *in_RSI;
long local_b8;
int8 auStack_b0 [2];
long local_a0;
int8 local_98;
long local_90;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_88 [8];
Value local_80 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [16];
long local_68;
long alStack_60 [9];
uVar1 = *in_RSI;
get_location();
/* try { // try from 00165489 to 00165495 has its CatchHandler @ 0016572f */
parseConstant();
if (local_90 == 0) {
if ((operator()()::null_regex_abi_cxx11_ == '\0') &&
(iVar3 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_), iVar3 != 0)) {
/* try { // try from 00165640 to 00165655 has its CatchHandler @ 001656b1 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
/* try { // try from 001654dc to 001654f2 has its CatchHandler @ 0016571e */
consumeToken(&local_68,uVar1,operator()()::null_regex_abi_cxx11_,1);
lVar2 = alStack_60[0];
std::__cxx11::string::~string((string *)&local_68);
if (lVar2 != 0) {
Value::Value((Value *)&local_68);
/* try { // try from 00165513 to 00165522 has its CatchHandler @ 0016570f */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value>
((Location *)&local_b8,local_80);
uVar1 = auStack_b0[0];
auStack_b0[0] = 0;
*(long *)this = local_b8;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
Value::~Value((Value *)&local_68);
goto LAB_00165547;
}
/* try { // try from 0016556b to 00165577 has its CatchHandler @ 0016570d */
parseIdentifier();
lVar2 = alStack_60[0];
if (local_68 == 0) {
/* try { // try from 0016559f to 001655a9 has its CatchHandler @ 001656fe */
parseBracedExpressionOrArray();
uVar1 = auStack_b0[0];
if (local_b8 == 0) {
/* try { // try from 001655cc to 001655d8 has its CatchHandler @ 001656ef */
parseArray();
uVar1 = local_98;
if (local_a0 == 0) {
/* try { // try from 001655fd to 00165607 has its CatchHandler @ 001656e0 */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016568c to 0016569a has its CatchHandler @ 001656c7 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 0016569b to 001656b0 has its CatchHandler @ 001656c2 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
}
else {
*(long *)this = local_a0;
local_98 = 0;
*(int8 *)(this + 8) = uVar1;
local_a0 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_98);
}
else {
*(long *)this = local_b8;
auStack_b0[0] = 0;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
}
else {
*(long *)this = local_68;
alStack_60[0] = 0;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
}
else {
/* try { // try from 001654a0 to 001654ae has its CatchHandler @ 00165720 */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value&>
((Location *)&local_68,local_80);
lVar2 = alStack_60[0];
alStack_60[0] = 0;
*(long *)this = local_68;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60);
LAB_00165547:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_88);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
return this;
}
| |
34,357 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x88c7f
cmpl $0x7, %eax
je 0x88c77
cmpl $0x6, %eax
jne 0x88c92
movsd 0x8(%r14), %xmm1
unpcklps 0x68daf(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x68db7(%rip), %xmm1 # 0xf1a20
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0x88c85
movsd 0x8(%r14), %xmm0
jmp 0x88c85
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5fca8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6a147(%rip), %rsi # 0xf2dfd
leaq 0x10(%rsp), %rdi
callq 0x88355
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x88186
xorl %ebp, %ebp
leaq 0xa4237(%rip), %rsi # 0x12cf18
leaq -0x2cefe(%rip), %rdx # 0x5bdea
movq %rbx, %rdi
callq 0x1bf10
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88d16
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x88d16
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x88d23
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bf90
nop
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_88C7F
cmp eax, 7
jz short loc_88C77
cmp eax, 6
jnz short loc_88C92
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_F1A10
subpd xmm1, cs:xmmword_F1A20
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_88C85
loc_88C77:
movsd xmm0, qword ptr [r14+8]
jmp short loc_88C85
loc_88C7F:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_88C85:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_88C92:
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, aTypeMustBeNumb; "type must be number, 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_88D16
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_88D16
mov r14, rax
mov bpl, 1
loc_88D16:
test bpl, bpl
jz short loc_88D23
mov rdi, rbx; void *
call ___cxa_free_exception
loc_88D23:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
double *a2)
{
long long result; // rax
__m128d v3; // xmm1
double v4; // xmm0_8
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
result = *a1;
switch ( (_DWORD)result )
{
case 5:
v4 = (double)(int)*((_QWORD *)a1 + 1);
break;
case 7:
v4 = *((double *)a1 + 1);
break;
case 6:
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_F1A10),
(__m128d)xmmword_F1A20);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v7,
(long long)"type must be number, 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);
}
*a2 = v4;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x00188c7f
CMP EAX,0x7
JZ 0x00188c77
CMP EAX,0x6
JNZ 0x00188c92
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x001f1a10]
SUBPD XMM1,xmmword ptr [0x001f1a20]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x00188c85
LAB_00188c77:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x00188c85
LAB_00188c7f:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_00188c85:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00188c92:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015fca8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00188caf:
LEA RSI,[0x1f2dfd]
LEA RDI,[RSP + 0x10]
CALL 0x00188355
MOV BPL,0x1
LAB_00188cc3:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00188186
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15bdea]
MOV RDI,RBX
CALL 0x0011bf10
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(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,double *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
double dVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
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>
)0x5) {
dVar3 = (double)*(long *)(param_1 + 8);
}
else 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>
)0x7) {
dVar3 = *(double *)(param_1 + 8);
}
else {
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>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00188caf to 00188cbf has its CatchHandler @ 00188d10 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00188cc3 to 00188cef has its CatchHandler @ 00188cf0 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
dVar3 = ((double)CONCAT44(_UNK_001f1a14,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_001f1a28) +
((double)CONCAT44(_DAT_001f1a10,(int)*(int8 *)(param_1 + 8)) - _DAT_001f1a20);
}
*param_2 = dVar3;
return;
}
| |
34,358 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x8395e
cmpl $0x7, %eax
je 0x83964
cmpl $0x6, %eax
jne 0x83995
movq 0x8(%r14), %rax
jmp 0x83989
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x2f0f2(%rip), %xmm0 # 0xb2a70
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b2e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x30436(%rip), %rsi # 0xb3ded
leaq 0x10(%rsp), %rdi
callq 0x63b4f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x63a62
xorl %ebp, %ebp
leaq 0x78566(%rip), %rsi # 0xfbf48
leaq -0x4332b(%rip), %rdx # 0x406be
movq %rbx, %rdi
callq 0x23f10
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0x83a08
jmp 0x83a10
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23f90
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_8395E
cmp eax, 7
jz short loc_83964
cmp eax, 6
jnz short loc_83995
loc_8395E:
mov rax, [r14+8]
jmp short loc_83989
loc_83964:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_B2A70
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_83989:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_83995:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, 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 rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_83A08
jmp short loc_83A10
mov r14, rax
loc_83A08:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_83A10:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
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,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x0018395e
CMP EAX,0x7
JZ 0x00183964
CMP EAX,0x6
JNZ 0x00183995
LAB_0018395e:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x00183989
LAB_00183964:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001b2a70]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_00183989:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00183995:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143b2e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001839b0:
LEA RSI,[0x1b3ded]
LEA RDI,[RSP + 0x10]
CALL 0x00163b4f
MOV BPL,0x1
LAB_001839c4:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00163a62
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x1406be]
MOV RDI,RBX
CALL 0x00123f10
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(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,ulong *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
ulong uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
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>
)0x5) {
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>
)0x7) {
uVar3 = (ulong)*(double *)(param_1 + 8);
uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001b2a70) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_00183989;
}
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>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001839b0 to 001839c0 has its CatchHandler @ 00183a05 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001839c4 to 001839f0 has its CatchHandler @ 001839f1 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_00183989:
*param_2 = uVar3;
return;
}
| |
34,359 | my_caseup_str_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_caseup_str_utf8mb4(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->caseup_multiply == 1);
while (*src &&
(srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
} | O3 | c | my_caseup_str_utf8mb4:
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 0x50a1f
movq 0x78(%rdi), %r15
movq %rbx, %r12
movq %rbx, %r14
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x53d63
testl %eax, %eax
je 0x50a1f
movl %eax, %r13d
movq -0x30(%rbp), %rdi
cmpq (%r15), %rdi
ja 0x50a00
movq 0x8(%r15), %rax
movq %rdi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x50a00
movzbl %dil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %edi
movq %rdi, -0x30(%rbp)
movq %r14, %rsi
callq 0x53e7f
testl %eax, %eax
je 0x50a1f
movl %r13d, %ecx
movl %eax, %eax
addq %rax, %r14
cmpb $0x0, (%r12,%rcx)
leaq (%r12,%rcx), %r12
jne 0x509c1
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_caseup_str_utf8mb4:
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 short loc_50A1F
mov r15, [rdi+78h]
mov r12, rbx
mov r14, rbx
loc_509C1:
lea rdi, [rbp+var_30]
mov rsi, r12
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_50A1F
mov r13d, eax
mov rdi, [rbp+var_30]
cmp rdi, [r15]
ja short loc_50A00
mov rax, [r15+8]
mov rcx, rdi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_50A00
movzx ecx, dil
lea rcx, [rcx+rcx*2]
mov edi, [rax+rcx*4]
mov [rbp+var_30], rdi
loc_50A00:
mov rsi, r14
call my_wc_mb_utf8mb4_no_range
test eax, eax
jz short loc_50A1F
mov ecx, r13d
mov eax, eax
add r14, rax
cmp byte ptr [r12+rcx], 0
lea r12, [r12+rcx]
jnz short loc_509C1
loc_50A1F:
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_caseup_str_utf8mb4(long long a1, _BYTE *a2)
{
long long v2; // rax
_BYTE *v3; // r14
_QWORD *v4; // r15
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned int v7; // r13d
long long v8; // rdi
long long v9; // rax
unsigned int v10; // eax
bool v11; // zf
_QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF
v13[0] = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD **)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_mb_wc_utf8mb4_no_range(v13, v5);
if ( !v6 )
break;
v7 = v6;
v8 = v13[0];
if ( v13[0] <= *v4 )
{
v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8));
if ( v9 )
{
v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0]));
v13[0] = v8;
}
}
v10 = my_wc_mb_utf8mb4_no_range(v8, v3);
if ( !v10 )
break;
v3 += v10;
v11 = v5[v7] == 0;
v5 += v7;
}
while ( !v11 );
}
*v3 = 0;
return v3 - a2;
}
| my_caseup_str_utf8mb4:
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 0x00150a1f
MOV R15,qword ptr [RDI + 0x78]
MOV R12,RBX
MOV R14,RBX
LAB_001509c1:
LEA RDI,[RBP + -0x30]
MOV RSI,R12
CALL 0x00153d63
TEST EAX,EAX
JZ 0x00150a1f
MOV R13D,EAX
MOV RDI,qword ptr [RBP + -0x30]
CMP RDI,qword ptr [R15]
JA 0x00150a00
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,RDI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00150a00
MOVZX ECX,DIL
LEA RCX,[RCX + RCX*0x2]
MOV EDI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x30],RDI
LAB_00150a00:
MOV RSI,R14
CALL 0x00153e7f
TEST EAX,EAX
JZ 0x00150a1f
MOV ECX,R13D
MOV EAX,EAX
ADD R14,RAX
CMP byte ptr [R12 + RCX*0x1],0x0
LEA R12,[R12 + RCX*0x1]
JNZ 0x001509c1
LAB_00150a1f:
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_caseup_str_utf8mb4(long param_1,char *param_2)
{
char *pcVar1;
ulong *puVar2;
long lVar3;
uint uVar4;
uint uVar5;
ulong in_RAX;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6);
if (uVar4 == 0) break;
if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0))
{
local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc);
}
uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7);
if (uVar5 == 0) break;
pcVar7 = pcVar7 + uVar5;
pcVar1 = pcVar6 + uVar4;
pcVar6 = pcVar6 + uVar4;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
| |
34,360 | Mrr_ordered_rndpos_reader::refill_buffer(bool) | eloqsql/sql/multi_range_read.cc | int Mrr_ordered_rndpos_reader::refill_buffer(bool initial)
{
int res;
bool first_call= initial;
DBUG_ENTER("Mrr_ordered_rndpos_reader::refill_buffer");
if (index_reader_exhausted)
DBUG_RETURN(HA_ERR_END_OF_FILE);
while (initial || index_reader_needs_refill ||
(res= refill_from_index_reader()) == HA_ERR_END_OF_FILE)
{
if ((res= index_reader->refill_buffer(initial)))
{
if (res == HA_ERR_END_OF_FILE)
index_reader_exhausted= TRUE;
break;
}
initial= FALSE;
index_reader_needs_refill= FALSE;
}
if (!first_call && !index_reader_exhausted)
{
/* Ok, this was a successful buffer refill operation */
THD *thd= current_thd;
status_var_increment(thd->status_var.ha_mrr_rowid_refills_count);
}
DBUG_RETURN(res);
} | O0 | cpp | Mrr_ordered_rndpos_reader::refill_buffer(bool):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movb -0x11(%rbp), %cl
andb $0x1, %cl
movb %cl, -0x19(%rbp)
testb $0x1, 0x20(%rax)
je 0xba1999
jmp 0xba198d
movl $0x89, -0x4(%rbp)
jmp 0xba1a4c
jmp 0xba199b
movb $0x1, %al
testb $0x1, -0x11(%rbp)
movb %al, -0x31(%rbp)
jne 0xba19cc
movq -0x30(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x21(%rcx)
movb %al, -0x31(%rbp)
jne 0xba19cc
movq -0x30(%rbp), %rdi
callq 0xba1a60
movl %eax, -0x18(%rbp)
cmpl $0x89, %eax
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xba19d5
jmp 0xba1a15
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movb -0x11(%rbp), %cl
movq (%rdi), %rax
andb $0x1, %cl
movzbl %cl, %esi
callq *0x8(%rax)
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0xba1a07
cmpl $0x89, -0x18(%rbp)
jne 0xba1a05
movq -0x30(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0xba1a15
movq -0x30(%rbp), %rax
movb $0x0, -0x11(%rbp)
movb $0x0, 0x21(%rax)
jmp 0xba199b
testb $0x1, -0x19(%rbp)
jne 0xba1a44
movq -0x30(%rbp), %rax
testb $0x1, 0x20(%rax)
jne 0xba1a44
callq 0x88f160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x1268(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1268(%rax)
jmp 0xba1a46
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN25Mrr_ordered_rndpos_reader13refill_bufferEb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov [rbp+var_10], rdi
and al, 1
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov cl, [rbp+var_11]
and cl, 1
mov [rbp+var_19], cl
test byte ptr [rax+20h], 1
jz short loc_BA1999
jmp short $+2
loc_BA198D:
mov [rbp+var_4], 89h
jmp loc_BA1A4C
loc_BA1999:
jmp short $+2
loc_BA199B:
mov al, 1
test [rbp+var_11], 1
mov [rbp+var_31], al
jnz short loc_BA19CC
mov rcx, [rbp+var_30]
mov al, 1
test byte ptr [rcx+21h], 1
mov [rbp+var_31], al
jnz short loc_BA19CC
mov rdi, [rbp+var_30]; this
call _ZN25Mrr_ordered_rndpos_reader24refill_from_index_readerEv; Mrr_ordered_rndpos_reader::refill_from_index_reader(void)
mov [rbp+var_18], eax
cmp eax, 89h
setz al
mov [rbp+var_31], al
loc_BA19CC:
mov al, [rbp+var_31]
test al, 1
jnz short loc_BA19D5
jmp short loc_BA1A15
loc_BA19D5:
mov rax, [rbp+var_30]
mov rdi, [rax+10h]
mov cl, [rbp+var_11]
mov rax, [rdi]
and cl, 1
movzx esi, cl
call qword ptr [rax+8]
mov [rbp+var_18], eax
cmp eax, 0
jz short loc_BA1A07
cmp [rbp+var_18], 89h
jnz short loc_BA1A05
mov rax, [rbp+var_30]
mov byte ptr [rax+20h], 1
loc_BA1A05:
jmp short loc_BA1A15
loc_BA1A07:
mov rax, [rbp+var_30]
mov [rbp+var_11], 0
mov byte ptr [rax+21h], 0
jmp short loc_BA199B
loc_BA1A15:
test [rbp+var_19], 1
jnz short loc_BA1A44
mov rax, [rbp+var_30]
test byte ptr [rax+20h], 1
jnz short loc_BA1A44
call _current_thd
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rcx, [rax+1268h]
add rcx, 1
mov [rax+1268h], rcx
loc_BA1A44:
jmp short $+2
loc_BA1A46:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_BA1A4C:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long Mrr_ordered_rndpos_reader::refill_buffer(Mrr_ordered_rndpos_reader *this, char a2)
{
bool v3; // [rsp+Fh] [rbp-31h]
long long v4; // [rsp+18h] [rbp-28h]
unsigned int v5; // [rsp+28h] [rbp-18h]
char v6; // [rsp+2Fh] [rbp-11h]
v6 = a2 & 1;
if ( (*((_BYTE *)this + 32) & 1) != 0 )
{
return 137;
}
else
{
while ( 1 )
{
v3 = 1;
if ( (v6 & 1) == 0 )
{
v3 = 1;
if ( (*((_BYTE *)this + 33) & 1) == 0 )
{
v5 = Mrr_ordered_rndpos_reader::refill_from_index_reader(this);
v3 = v5 == 137;
}
}
if ( !v3 )
break;
v5 = (*(long long ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 2) + 8LL))(*((_QWORD *)this + 2), v6 & 1);
if ( v5 )
{
if ( v5 == 137 )
*((_BYTE *)this + 32) = 1;
break;
}
v6 = 0;
*((_BYTE *)this + 33) = 0;
}
if ( (a2 & 1) == 0 && (*((_BYTE *)this + 32) & 1) == 0 )
{
v4 = current_thd();
++*(_QWORD *)(v4 + 4712);
}
return v5;
}
}
| iterate<processlist_callback_arg>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x0
CALL 0x0098f160
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00ba19ac
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00953520
CWDE
CMP EAX,0x0
JGE 0x00ba19ca
LAB_00ba19ac:
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0x20
LEA RSI,[0x150a6ef]
MOV EDX,0x1f81
CALL 0x00b95400
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00ba1a44
LAB_00ba19ca:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00a66380
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00a66420
MOV RDI,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x48],RAX
ADD RDI,0x20
LEA RSI,[0x150a6ef]
MOV EDX,0x1f81
CALL 0x00b95460
MOV dword ptr [RBP + -0x4c],EAX
LAB_00ba1a0c:
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x00ba1a42
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00953540
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00953540
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0x20
LEA RSI,[0x150a6ef]
MOV EDX,0x1f81
CALL 0x00b95460
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00ba1a0c
LAB_00ba1a42:
JMP 0x00ba1a44
LAB_00ba1a44:
MOV RSI,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x68]
CALL 0x009a15a0
LAB_00ba1a57:
LEA RDI,[RBP + -0x68]
XOR ESI,ESI
CALL 0x009a15d0
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
JZ 0x00ba1a8a
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOVSX EAX,AL
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JZ 0x00ba1a88
JMP 0x00ba1a8a
LAB_00ba1a88:
JMP 0x00ba1a57
LAB_00ba1a8a:
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0x20
CALL 0x00b8c340
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x80
POP RBP
RET
|
/* int THD_list_iterator::iterate<processlist_callback_arg>(char (*)(THD*,
processlist_callback_arg*), processlist_callback_arg*) */
int __thiscall
THD_list_iterator::iterate<processlist_callback_arg>
(THD_list_iterator *this,_func_char_THD_ptr_processlist_callback_arg_ptr *param_1,
processlist_callback_arg *param_2)
{
char cVar1;
short sVar2;
THD *pTVar3;
I_List_iterator<THD> local_70 [24];
int4 local_58;
int local_54;
function<void()> *local_50;
int1 local_48 [16];
function<void()> *local_38;
THD *local_30;
int4 local_28;
int local_24;
processlist_callback_arg *local_20;
_func_char_THD_ptr_processlist_callback_arg_ptr *local_18;
THD_list_iterator *local_10;
local_24 = 0;
local_28 = 0;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
local_30 = (THD *)_current_thd();
if ((local_30 == (THD *)0x0) || (sVar2 = THD::ThdGroupId(local_30), sVar2 < 0)) {
local_28 = ::inline_mysql_rwlock_rdlock
((st_mysql_rwlock *)(this + 0x20),
"/workspace/llm4binary/github2025/eloqsql/sql/sql_class.h",0x1f81);
}
else {
local_48 = THD::CoroFunctors(local_30);
local_38 = local_48._0_8_;
local_50 = (function<void()> *)THD::CoroLongResumeFunctor(local_30);
local_54 = ::inline_mysql_rwlock_tryrdlock
((st_mysql_rwlock *)(this + 0x20),
"/workspace/llm4binary/github2025/eloqsql/sql/sql_class.h",0x1f81);
while (local_54 != 0) {
std::function<void()>::operator()(local_50);
std::function<void()>::operator()(local_38);
local_54 = ::inline_mysql_rwlock_tryrdlock
((st_mysql_rwlock *)(this + 0x20),
"/workspace/llm4binary/github2025/eloqsql/sql/sql_class.h",0x1f81);
}
}
local_58 = local_28;
I_List_iterator<THD>::I_List_iterator(local_70,(I_List *)this);
do {
pTVar3 = (THD *)I_List_iterator<THD>::operator++(local_70,0);
if (pTVar3 == (THD *)0x0) break;
cVar1 = (*local_18)(pTVar3,local_20);
local_24 = (int)cVar1;
} while (local_24 == 0);
::inline_mysql_rwlock_unlock((st_mysql_rwlock *)(this + 0x20));
return local_24;
}
| |
34,361 | my_instr_mb | eloqsql/strings/ctype-mb.c | uint my_instr_mb(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const char *end, *b0;
int res= 0;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
b0= b;
end= b+b_length-s_length+1;
while (b < end)
{
int mb_len;
if (!my_ci_strnncoll(cs, (const uchar *) b, s_length,
(const uchar *) s, s_length, 0))
{
if (nmatch)
{
match[0].beg= 0;
match[0].end= (uint) (b-b0);
match[0].mb_len= res;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= 0; /* Not computed */
}
}
return 2;
}
mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1;
b+= mb_len;
b_length-= mb_len;
res++;
}
}
return 0;
} | O3 | c | my_instr_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x40(%rbp)
xorl %eax, %eax
cmpq %rdx, %r8
ja 0x567ab
movq %r8, %r14
testq %r8, %r8
je 0x5673e
movq %rdx, %r13
addq %rsi, %r13
subq %r14, %r13
incq %r13
cmpq %rsi, %r13
jbe 0x567ab
movq %rdi, %rbx
movq %r9, -0x38(%rbp)
xorl %r12d, %r12d
movq %rsi, -0x30(%rbp)
movq %rsi, %r15
movq 0xc0(%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq -0x40(%rbp), %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq *0x8(%rax)
testl %eax, %eax
je 0x5676b
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x1, %ecx
cmovbl %ecx, %eax
cmovll %ecx, %eax
cltq
addq %rax, %r15
incl %r12d
cmpq %r13, %r15
jb 0x566e8
xorl %eax, %eax
jmp 0x567ab
cmpl $0x0, 0x10(%rbp)
je 0x567a6
movl $0x0, (%r9)
movl $0x1, %eax
movl $0x8, %ecx
xorl %r14d, %r14d
movl $0x4, %edx
movl %r14d, (%r9,%rdx)
movl $0x0, (%r9,%rcx)
jmp 0x567ab
movl $0x2, %eax
movl 0x10(%rbp), %ecx
testl %ecx, %ecx
je 0x567ab
movq -0x38(%rbp), %r9
movl $0x0, (%r9)
subl -0x30(%rbp), %r15d
movl %r15d, 0x4(%r9)
movl %r12d, 0x8(%r9)
cmpl $0x1, %ecx
je 0x567ab
movl %r15d, 0xc(%r9)
addl %r15d, %r14d
movl $0x14, %ecx
movl $0x10, %edx
jmp 0x5675d
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_instr_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], rcx
xor eax, eax
cmp r8, rdx
ja loc_567AB
mov r14, r8
test r8, r8
jz short loc_5673E
mov r13, rdx
add r13, rsi
sub r13, r14
inc r13
cmp r13, rsi
jbe loc_567AB
mov rbx, rdi
mov [rbp+var_38], r9
xor r12d, r12d
mov [rbp+var_30], rsi
mov r15, rsi
loc_566E8:
mov rax, [rbx+0C0h]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, [rbp+var_40]
mov r8, r14
xor r9d, r9d
call qword ptr [rax+8]
test eax, eax
jz short loc_5676B
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 1
cmovb eax, ecx
cmovl eax, ecx
cdqe
add r15, rax
inc r12d
cmp r15, r13
jb short loc_566E8
xor eax, eax
jmp short loc_567AB
loc_5673E:
cmp [rbp+arg_0], 0
jz short loc_567A6
mov dword ptr [r9], 0
mov eax, 1
mov ecx, 8
xor r14d, r14d
mov edx, 4
loc_5675D:
mov [r9+rdx], r14d
mov dword ptr [r9+rcx], 0
jmp short loc_567AB
loc_5676B:
mov eax, 2
mov ecx, [rbp+arg_0]
test ecx, ecx
jz short loc_567AB
mov r9, [rbp+var_38]
mov dword ptr [r9], 0
sub r15d, dword ptr [rbp+var_30]
mov [r9+4], r15d
mov [r9+8], r12d
cmp ecx, 1
jz short loc_567AB
mov [r9+0Ch], r15d
add r14d, r15d
mov ecx, 14h
mov edx, 10h
jmp short loc_5675D
loc_567A6:
mov eax, 1
loc_567AB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_instr_mb(
long long a1,
unsigned long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
_DWORD *a6,
int a7)
{
long long result; // rax
unsigned long long v9; // r13
int v10; // r12d
unsigned long long v11; // r15
int v12; // eax
bool v13; // cc
long long v14; // rcx
int v15; // r14d
long long v16; // rdx
int v17; // r15d
_DWORD *v19; // [rsp+8h] [rbp-38h]
result = 0LL;
if ( a5 <= a3 )
{
if ( a5 )
{
v9 = a2 + a3 - a5 + 1;
if ( v9 > a2 )
{
v19 = a6;
v10 = 0;
v11 = a2;
while ( (*(unsigned int ( **)(long long, unsigned long long, unsigned long long, long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 192) + 8LL))(
a1,
v11,
a5,
a4,
a5,
0LL) )
{
v12 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v11,
v9);
v13 = v12 < 2;
if ( (unsigned int)v12 < 2 )
v12 = 1;
if ( v13 )
v12 = 1;
v11 += v12;
++v10;
if ( v11 >= v9 )
return 0LL;
}
result = 2LL;
if ( a7 )
{
a6 = v19;
*v19 = 0;
v17 = v11 - a2;
v19[1] = v17;
v19[2] = v10;
if ( a7 != 1 )
{
v19[3] = v17;
v15 = v17 + a5;
v14 = 5LL;
v16 = 4LL;
goto LABEL_14;
}
}
}
}
else
{
if ( a7 )
{
*a6 = 0;
result = 1LL;
v14 = 2LL;
v15 = 0;
v16 = 1LL;
LABEL_14:
a6[v16] = v15;
a6[v14] = 0;
return result;
}
return 1LL;
}
}
return result;
}
| my_instr_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],RCX
XOR EAX,EAX
CMP R8,RDX
JA 0x001567ab
MOV R14,R8
TEST R8,R8
JZ 0x0015673e
MOV R13,RDX
ADD R13,RSI
SUB R13,R14
INC R13
CMP R13,RSI
JBE 0x001567ab
MOV RBX,RDI
MOV qword ptr [RBP + -0x38],R9
XOR R12D,R12D
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RSI
LAB_001566e8:
MOV RAX,qword ptr [RBX + 0xc0]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,R14
XOR R9D,R9D
CALL qword ptr [RAX + 0x8]
TEST EAX,EAX
JZ 0x0015676b
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x1
CMOVC EAX,ECX
CMOVL EAX,ECX
CDQE
ADD R15,RAX
INC R12D
CMP R15,R13
JC 0x001566e8
XOR EAX,EAX
JMP 0x001567ab
LAB_0015673e:
CMP dword ptr [RBP + 0x10],0x0
JZ 0x001567a6
MOV dword ptr [R9],0x0
MOV EAX,0x1
MOV ECX,0x8
XOR R14D,R14D
MOV EDX,0x4
LAB_0015675d:
MOV dword ptr [R9 + RDX*0x1],R14D
MOV dword ptr [R9 + RCX*0x1],0x0
JMP 0x001567ab
LAB_0015676b:
MOV EAX,0x2
MOV ECX,dword ptr [RBP + 0x10]
TEST ECX,ECX
JZ 0x001567ab
MOV R9,qword ptr [RBP + -0x38]
MOV dword ptr [R9],0x0
SUB R15D,dword ptr [RBP + -0x30]
MOV dword ptr [R9 + 0x4],R15D
MOV dword ptr [R9 + 0x8],R12D
CMP ECX,0x1
JZ 0x001567ab
MOV dword ptr [R9 + 0xc],R15D
ADD R14D,R15D
MOV ECX,0x14
MOV EDX,0x10
JMP 0x0015675d
LAB_001567a6:
MOV EAX,0x1
LAB_001567ab:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_instr_mb(long param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5,
int4 *param_6,int param_7)
{
int iVar1;
uint uVar2;
uint uVar3;
int8 uVar4;
long lVar5;
long lVar6;
int iVar7;
ulong uVar8;
ulong uVar9;
int local_38;
uVar4 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 == 0) {
uVar4 = 1;
}
else {
*param_6 = 0;
uVar4 = 1;
lVar5 = 8;
local_38 = 0;
lVar6 = 4;
LAB_0015675d:
*(int *)((long)param_6 + lVar6) = local_38;
*(int4 *)((long)param_6 + lVar5) = 0;
}
}
else {
uVar8 = ((param_3 + param_2) - param_5) + 1;
if (param_2 < uVar8) {
iVar7 = 0;
uVar9 = param_2;
do {
iVar1 = (**(code **)(*(long *)(param_1 + 0xc0) + 8))
(param_1,uVar9,param_5,param_4,param_5,0);
if (iVar1 == 0) {
uVar4 = 2;
if (param_7 == 0) {
return 2;
}
*param_6 = 0;
local_38 = (int)param_2;
local_38 = (int)uVar9 - local_38;
param_6[1] = local_38;
param_6[2] = iVar7;
if (param_7 == 1) {
return 2;
}
param_6[3] = local_38;
local_38 = (int)param_5 + local_38;
lVar5 = 0x14;
lVar6 = 0x10;
goto LAB_0015675d;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar9,uVar8);
uVar3 = uVar2;
if (uVar2 < 2) {
uVar3 = 1;
}
if ((int)uVar2 < 2) {
uVar3 = 1;
}
uVar9 = uVar9 + (long)(int)uVar3;
iVar7 = iVar7 + 1;
} while (uVar9 < uVar8);
uVar4 = 0;
}
}
}
return uVar4;
}
| |
34,362 | maria_page_crc_check_data | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_crc_check_data(int res, PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
if (res)
{
return 1;
}
return (maria_page_crc_check(page, (uint32) page_no, share,
MARIA_NO_CRC_NORMAL_PAGE,
share->block_size - CRC_SIZE));
} | O3 | c | maria_page_crc_check_data:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
je 0x40f93
movb $0x1, %al
popq %rbp
retq
movq 0x10(%rsi), %rdx
movl 0x8(%rsi), %eax
movq (%rsi), %rdi
movl 0x7bc(%rdx), %r8d
addl $-0x4, %r8d
movq %rax, %rsi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
popq %rbp
jmp 0x40e80
| maria_page_crc_check_data:
push rbp
mov rbp, rsp
test edi, edi
jz short loc_40F93
mov al, 1
pop rbp
retn
loc_40F93:
mov rdx, [rsi+10h]
mov eax, [rsi+8]
mov rdi, [rsi]
mov r8d, [rdx+7BCh]
add r8d, 0FFFFFFFCh
mov rsi, rax
mov ecx, 0FFFFFFFFh
pop rbp
jmp maria_page_crc_check
| char maria_page_crc_check_data(int a1, long long a2)
{
if ( a1 )
return 1;
else
return maria_page_crc_check(
*(_QWORD *)a2,
*(_DWORD *)(a2 + 8),
*(_QWORD *)(a2 + 16),
-1,
*(_DWORD *)(*(_QWORD *)(a2 + 16) + 1980LL) - 4);
}
| maria_page_crc_check_data:
PUSH RBP
MOV RBP,RSP
TEST EDI,EDI
JZ 0x00140f93
MOV AL,0x1
POP RBP
RET
LAB_00140f93:
MOV RDX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RSI + 0x8]
MOV RDI,qword ptr [RSI]
MOV R8D,dword ptr [RDX + 0x7bc]
ADD R8D,-0x4
MOV RSI,RAX
MOV ECX,0xffffffff
POP RBP
JMP 0x00140e80
|
int8 maria_page_crc_check_data(int param_1,int8 *param_2)
{
int8 uVar1;
if (param_1 != 0) {
return 1;
}
uVar1 = maria_page_crc_check
(*param_2,*(int4 *)(param_2 + 1),param_2[2],0xffffffff,
*(int *)(param_2[2] + 0x7bc) + -4);
return uVar1;
}
| |
34,363 | magnetron::tensor::operator+=(magnetron::tensor) const | magnetron/include/magnetron/magnetron.hpp | auto operator += (tensor other) const noexcept -> tensor { return add_(other); } | O3 | cpp | magnetron::tensor::operator+=(magnetron::tensor) const:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rdi
callq 0x107a0
movq (%r15), %rsi
movq %rsi, -0x20(%rbp)
movq (%r14), %rdi
callq 0x10970
movq %rax, (%rbx)
leaq -0x20(%rbp), %rdi
callq 0x1e89c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ace4
movq %rax, %rdi
callq 0x1a632
| _ZNK9magnetron6tensorpLES0_:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdx]
call _mag_tensor_incref
mov rsi, [r15]
mov [rbp+var_20], rsi
mov rdi, [r14]
call _mag_add_
mov [rbx], rax
lea rdi, [rbp+var_20]; this
call _ZN9magnetron6tensorD2Ev; magnetron::tensor::~tensor()
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_3ACE4:
mov rdi, rax
call __clang_call_terminate
| _QWORD * magnetron::tensor::operator+=(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
long long v3; // rax
_QWORD v6[4]; // [rsp+0h] [rbp-20h] BYREF
v6[0] = v3;
mag_tensor_incref(*a3);
v6[0] = *a3;
*a1 = mag_add_(*a2);
magnetron::tensor::~tensor((magnetron::tensor *)v6);
return a1;
}
| operator+=:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDX]
LAB_0013acb4:
CALL 0x001107a0
MOV RSI,qword ptr [R15]
MOV qword ptr [RBP + -0x20],RSI
MOV RDI,qword ptr [R14]
LAB_0013acc3:
CALL 0x00110970
MOV qword ptr [RBX],RAX
LEA RDI,[RBP + -0x20]
CALL 0x0011e89c
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* magnetron::tensor::TEMPNAMEPLACEHOLDERVALUE(magnetron::tensor) const */
tensor * __thiscall
magnetron::tensor::operator+=(tensor *this,int8 *param_2,int8 *param_3)
{
int8 uVar1;
int8 local_28;
/* try { // try from 0013acb4 to 0013acb8 has its CatchHandler @ 0013ace4 */
mag_tensor_incref(*param_3);
local_28 = *param_3;
/* try { // try from 0013acc3 to 0013acc7 has its CatchHandler @ 0013ace2 */
uVar1 = mag_add_(*param_2);
*(int8 *)this = uVar1;
~tensor((tensor *)&local_28);
return this;
}
| |
34,364 | mi_open_keyfile | eloqsql/storage/myisam/mi_open.c | int mi_open_keyfile(MYISAM_SHARE *share)
{
if ((share->kfile= mysql_file_open(mi_key_file_kfile,
share->unique_file_name,
share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS | MY_WME))) < 0)
return 1;
return 0;
} | O0 | c | mi_open_keyfile:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xbc07c9(%rip), %rax # 0xc7a5dc
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x258(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x358(%rax), %r8d
orl $0x0, %r8d
orl $0x20000, %r8d # imm = 0x20000
orl $0x80000, %r8d # imm = 0x80000
leaq 0x99d32(%rip), %rsi # 0x153b76
movl $0x504, %edx # imm = 0x504
movl $0x210, %r9d # imm = 0x210
callq 0xb4b90
movq -0x10(%rbp), %rcx
movl %eax, 0x350(%rcx)
cmpl $0x0, %eax
jge 0xb9e6c
movl $0x1, -0x4(%rbp)
jmp 0xb9e73
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| mi_open_keyfile:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
lea rax, mi_key_file_kfile
mov edi, [rax]
mov rax, [rbp+var_10]
mov rcx, [rax+258h]
mov rax, [rbp+var_10]
mov r8d, [rax+358h]
or r8d, 0
or r8d, 20000h
or r8d, 80000h
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 504h
mov r9d, 210h
call inline_mysql_file_open_2
mov rcx, [rbp+var_10]
mov [rcx+350h], eax
cmp eax, 0
jge short loc_B9E6C
mov [rbp+var_4], 1
jmp short loc_B9E73
loc_B9E6C:
mov [rbp+var_4], 0
loc_B9E73:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| _BOOL8 mi_open_keyfile(long long a1)
{
int v1; // eax
v1 = inline_mysql_file_open_2(
mi_key_file_kfile,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x504u,
*(_QWORD *)(a1 + 600),
*(_DWORD *)(a1 + 856) | 0xA0000u,
528LL);
*(_DWORD *)(a1 + 848) = v1;
return v1 < 0;
}
| mi_open_keyfile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0xd7a5dc]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x258]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0x358]
OR R8D,0x0
OR R8D,0x20000
OR R8D,0x80000
LEA RSI,[0x253b76]
MOV EDX,0x504
MOV R9D,0x210
CALL 0x001b4b90
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX + 0x350],EAX
CMP EAX,0x0
JGE 0x001b9e6c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b9e73
LAB_001b9e6c:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b9e73:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
bool mi_open_keyfile(long param_1)
{
int iVar1;
iVar1 = inline_mysql_file_open
(mi_key_file_kfile,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504,
*(int8 *)(param_1 + 600),*(uint *)(param_1 + 0x358) | 0xa0000,0x210);
*(int *)(param_1 + 0x350) = iVar1;
return iVar1 < 0;
}
| |
34,365 | ma_tls_write_async | eloqsql/libmariadb/libmariadb/secure/openssl.c | ssize_t ma_tls_write_async(MARIADB_PVIO *pvio,
const unsigned char *buffer,
size_t length)
{
int res;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
MARIADB_TLS *ctls= pvio->ctls;
for (;;)
{
res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length);
if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl))
return res;
}
} | O3 | c | ma_tls_write_async:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x38(%rdi), %r13
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %r15
movq 0x10(%r13), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x13830
movl %eax, %r12d
movq 0x10(%r13), %rdx
movl %eax, %edi
movq %r15, %rsi
callq 0x284fe
testb %al, %al
je 0x2859e
movslq %r12d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_write_async:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r13, [rdi+38h]
mov rax, [rdi+40h]
mov rax, [rax+480h]
mov r15, [rax+28h]
loc_2859E:
mov rdi, [r13+10h]
mov rsi, r14
mov edx, ebx
call _SSL_write
mov r12d, eax
mov rdx, [r13+10h]
mov edi, eax
mov rsi, r15
call ma_tls_async_check_result
test al, al
jz short loc_2859E
movsxd rax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_tls_write_async(long long a1, long long a2, unsigned int a3)
{
long long v4; // r13
long long v5; // r15
int v6; // r12d
v4 = *(_QWORD *)(a1 + 56);
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
do
v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3);
while ( !(unsigned __int8)ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) );
return v6;
}
| ma_tls_write_async:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R13,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RAX + 0x28]
LAB_0012859e:
MOV RDI,qword ptr [R13 + 0x10]
MOV RSI,R14
MOV EDX,EBX
CALL 0x00113830
MOV R12D,EAX
MOV RDX,qword ptr [R13 + 0x10]
MOV EDI,EAX
MOV RSI,R15
CALL 0x001284fe
TEST AL,AL
JZ 0x0012859e
MOVSXD RAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ma_tls_write_async(long param_1,void *param_2,int param_3)
{
long lVar1;
int8 uVar2;
char cVar3;
int iVar4;
lVar1 = *(long *)(param_1 + 0x38);
uVar2 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
do {
iVar4 = SSL_write(*(SSL **)(lVar1 + 0x10),param_2,param_3);
cVar3 = ma_tls_async_check_result(iVar4,uVar2,*(int8 *)(lVar1 + 0x10));
} while (cVar3 == '\0');
return (long)iVar4;
}
| |
34,366 | write_hook_for_undo | eloqsql/storage/maria/ma_blockrec.c | my_bool write_hook_for_undo(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info
__attribute__ ((unused)),
LSN *lsn, void *hook_arg
__attribute__ ((unused)))
{
DBUG_ASSERT(trn->trid != 0);
trn->undo_lsn= *lsn;
if (unlikely(LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn) == 0))
trn->first_undo_lsn=
trn->undo_lsn | LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
return 0;
/*
when we implement purging, we will specialize this hook: UNDO_PURGE
records will additionally set trn->undo_purge_lsn
*/
} | O0 | c | write_hook_for_undo:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
jmp 0x79659
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rcx
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
andq 0xa0(%rcx), %rax
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x796cd
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rdx
movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000
andq 0xa0(%rdx), %rax
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| write_hook_for_undo:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
jmp short $+2
loc_79659:
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rcx, [rbp+var_10]
mov rax, 0FFFFFFFFFFFFFFh
and rax, [rcx+0A0h]
cmp rax, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_796CD
mov rax, [rbp+var_10]
mov rcx, [rax+98h]
mov rdx, [rbp+var_10]
mov rax, 0FF00000000000000h
and rax, [rdx+0A0h]
or rcx, rax
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
loc_796CD:
xor eax, eax
pop rbp
retn
| long long write_hook_for_undo(long long a1, long long a2, long long a3, _QWORD *a4)
{
*(_QWORD *)(a2 + 152) = *a4;
if ( (*(_QWORD *)(a2 + 160) & 0xFFFFFFFFFFFFFFLL) == 0 )
*(_QWORD *)(a2 + 160) = *(_QWORD *)(a2 + 160) & 0xFF00000000000000LL | *(_QWORD *)(a2 + 152);
return 0LL;
}
| write_hook_for_undo:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
JMP 0x00179659
LAB_00179659:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,0xffffffffffffff
AND RAX,qword ptr [RCX + 0xa0]
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001796cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,-0x100000000000000
AND RAX,qword ptr [RDX + 0xa0]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
LAB_001796cd:
XOR EAX,EAX
POP RBP
RET
|
int8
write_hook_for_undo(int8 param_1,long param_2,int8 param_3,int8 *param_4)
{
*(int8 *)(param_2 + 0x98) = *param_4;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) =
*(ulong *)(param_2 + 0x98) | *(ulong *)(param_2 + 0xa0) & 0xff00000000000000;
}
return 0;
}
| |
34,367 | ma_net_safe_read | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong
ma_net_safe_read(MYSQL *mysql)
{
NET *net= &mysql->net;
ulong len=0;
restart:
if (net->pvio != 0)
len=ma_net_read(net);
if (len == packet_error || len == 0)
{
end_server(mysql);
#ifdef HAVE_TLS
/* don't overwrite possible tls protocol errors */
if (net->last_errno != CR_SSL_CONNECTION_ERROR)
#endif
{
my_set_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ?
CR_NET_PACKET_TOO_LARGE:
CR_SERVER_LOST,
SQLSTATE_UNKNOWN, 0, errno);
}
return(packet_error);
}
if (net->read_pos[0] == 255)
{
if (len > 3)
{
char *pos=(char*) net->read_pos+1;
uint last_errno=uint2korr(pos);
pos+=2;
len-=2;
if (last_errno== 65535 &&
((mariadb_connection(mysql) && (mysql->server_capabilities & CLIENT_PROGRESS)) ||
(!(mysql->extension->mariadb_server_capabilities & MARIADB_CLIENT_PROGRESS << 32))))
{
if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1)))
{
/* Wrong packet */
my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0);
return (packet_error);
}
goto restart;
}
net->last_errno= last_errno;
if (pos[0]== '#')
{
ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH);
pos+= SQLSTATE_LENGTH + 1;
}
else
{
strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
}
ma_strmake(net->last_error,(char*) pos,
min(len,sizeof(net->last_error)-1));
}
else
{
my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0);
}
mysql->server_status&= ~SERVER_MORE_RESULTS_EXIST;
return(packet_error);
}
return len;
} | O3 | c | ma_net_safe_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
cmpq $0x0, (%rbx)
movq %r12, %r14
je 0x1825f
movq %rbx, %rdi
callq 0x3449c
movq %rax, %r14
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r14
je 0x18386
testq %r14, %r14
je 0x18386
movq 0x20(%rbx), %r15
cmpb $-0x1, (%r15)
jne 0x1848c
cmpq $0x4, %r14
jb 0x18408
movzwl 0x1(%r15), %eax
leaq 0x3(%r15), %r13
leaq -0x2(%r14), %r12
cmpl $0xffff, %eax # imm = 0xFFFF
jne 0x18425
addl $-0x3, %r14d
cmpl $0x5, %r14d
jb 0x183e2
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x1824b
movq 0x80(%rax), %rax
testq %rax, %rax
je 0x1824b
movzbl 0x9(%r15), %r8d
cmpq $0xfa, %r8
ja 0x1832c
leaq 0xa(%r15), %rcx
movl %r8d, %edx
addq %rcx, %rdx
movl %r14d, %esi
addq %rsi, %r13
cmpq %r13, %rdx
ja 0x183e2
movzbl 0x4(%r15), %esi
movzbl 0x5(%r15), %edx
movzwl 0x6(%r15), %edi
movzbl 0x8(%r15), %r9d
shll $0x10, %r9d
orl %edi, %r9d
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
divsd 0x2379e(%rip), %xmm0 # 0x3bac0
movq %rbx, %rdi
callq *%rax
jmp 0x1824b
cmpq $0xfd, %r8
je 0x1835f
cmpl $0xfc, %r8d
je 0x18354
cmpl $0xfb, %r8d
jne 0x18379
leaq 0xa(%r15), %rcx
movq $-0x1, %r8
jmp 0x182e2
leaq 0xc(%r15), %rcx
movzwl 0xa(%r15), %r8d
jmp 0x182e2
leaq 0xd(%r15), %rcx
movzwl 0xa(%r15), %edx
movzbl 0xc(%r15), %r8d
shll $0x10, %r8d
orq %rdx, %r8
jmp 0x182e2
leaq 0x12(%r15), %rcx
movl 0xa(%r15), %r8d
jmp 0x182e2
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x1849e
movl 0x90(%rbx), %eax
cmpl $0x7ea, %eax # imm = 0x7EA
je 0x1848c
cmpl $0x481, %eax # imm = 0x481
movl $0x7e4, %eax # imm = 0x7E4
movl $0x7dd, %r15d # imm = 0x7DD
cmovel %eax, %r15d
leaq 0x359c0(%rip), %rax # 0x4dd80
movq (%rax), %r12
callq 0x13060
movl (%rax), %r8d
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x184d1
jmp 0x1848c
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
leaq 0x35991(%rip), %rax # 0x4dd80
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7eb, %esi # imm = 0x7EB
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x184d1
jmp 0x1848c
leaq 0x35971(%rip), %rax # 0x4dd80
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7d0, %esi # imm = 0x7D0
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x184d1
jmp 0x1847f
movl %eax, 0x90(%rbx)
leaq 0x297(%rbx), %rdi
cmpb $0x23, (%r13)
jne 0x18450
leaq 0x4(%r15), %rsi
movl $0x5, %edx
callq 0x27e03
addq $0x9, %r15
movq %r15, %r13
jmp 0x18464
leaq 0x35929(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
leaq 0x97(%rbx), %rdi
movl $0x1ff, %edx # imm = 0x1FF
cmpq %rdx, %r12
cmovbq %r12, %rdx
movq %r13, %rsi
callq 0x27e03
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
andb $-0x9, 0x380(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_net_safe_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
xor r12d, r12d
loc_1824B:
cmp qword ptr [rbx], 0
mov r14, r12
jz short loc_1825F
mov rdi, rbx
call ma_net_read
mov r14, rax
loc_1825F:
mov eax, 0FFFFFFFFh
cmp r14, rax
jz loc_18386
test r14, r14
jz loc_18386
mov r15, [rbx+20h]
cmp byte ptr [r15], 0FFh
jnz loc_1848C
cmp r14, 4
jb loc_18408
movzx eax, word ptr [r15+1]
lea r13, [r15+3]
lea r12, [r14-2]
cmp eax, 0FFFFh
jnz loc_18425
add r14d, 0FFFFFFFDh
cmp r14d, 5
jb loc_183E2
mov rax, [rbx+480h]
test rax, rax
jz short loc_1824B
mov rax, [rax+80h]
test rax, rax
jz loc_1824B
movzx r8d, byte ptr [r15+9]
cmp r8, 0FAh
ja short loc_1832C
lea rcx, [r15+0Ah]
loc_182E2:
mov edx, r8d
add rdx, rcx
mov esi, r14d
add r13, rsi
cmp rdx, r13
ja loc_183E2
movzx esi, byte ptr [r15+4]
movzx edx, byte ptr [r15+5]
movzx edi, word ptr [r15+6]
movzx r9d, byte ptr [r15+8]
shl r9d, 10h
or r9d, edi
xorps xmm0, xmm0
cvtsi2sd xmm0, r9d
divsd xmm0, cs:qword_3BAC0
mov rdi, rbx
call rax
jmp loc_1824B
loc_1832C:
cmp r8, 0FDh
jz short loc_1835F
cmp r8d, 0FCh
jz short loc_18354
cmp r8d, 0FBh
jnz short loc_18379
lea rcx, [r15+0Ah]
mov r8, 0FFFFFFFFFFFFFFFFh
jmp short loc_182E2
loc_18354:
lea rcx, [r15+0Ch]
movzx r8d, word ptr [r15+0Ah]
jmp short loc_182E2
loc_1835F:
lea rcx, [r15+0Dh]
movzx edx, word ptr [r15+0Ah]
movzx r8d, byte ptr [r15+0Ch]
shl r8d, 10h
or r8, rdx
jmp loc_182E2
loc_18379:
lea rcx, [r15+12h]
mov r8d, [r15+0Ah]
jmp loc_182E2
loc_18386:
mov r14d, 0FFFFFFFFh
mov rdi, rbx
call end_server
mov eax, [rbx+90h]
cmp eax, 7EAh
jz loc_1848C
cmp eax, 481h
mov eax, 7E4h
mov r15d, 7DDh
cmovz r15d, eax
lea rax, SQLSTATE_UNKNOWN
mov r12, [rax]
call ___errno_location
mov r8d, [rax]
mov rdi, rbx
mov esi, r15d
mov rdx, r12
xor ecx, ecx
xor eax, eax
call my_set_error
jmp loc_1848C
loc_183E2:
mov r14d, 0FFFFFFFFh
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7EBh
xor ecx, ecx
xor eax, eax
call my_set_error
jmp loc_1848C
loc_18408:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7D0h
xor ecx, ecx
xor eax, eax
call my_set_error
jmp short loc_1847F
loc_18425:
mov [rbx+90h], eax
lea rdi, [rbx+297h]
cmp byte ptr [r13+0], 23h ; '#'
jnz short loc_18450
lea rsi, [r15+4]
mov edx, 5
call ma_strmake
add r15, 9
mov r13, r15
jmp short loc_18464
loc_18450:
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
loc_18464:
lea rdi, [rbx+97h]
mov edx, 1FFh
cmp r12, rdx
cmovb rdx, r12
mov rsi, r13
call ma_strmake
loc_1847F:
mov r14d, 0FFFFFFFFh
and byte ptr [rbx+380h], 0F7h
loc_1848C:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long ma_net_safe_read(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
int a6)
{
char v6; // al
unsigned long long v8; // r12
unsigned long long v9; // r14
long long v10; // r15
int v11; // eax
_BYTE *v12; // r13
unsigned int v13; // r14d
long long v14; // rax
void ( *v15)(long long, _QWORD, _QWORD, double); // rax
long long v16; // rcx
int v17; // eax
int v18; // r15d
int v19; // r12d
_DWORD *v20; // rax
int v21; // r9d
long long v22; // rdi
long long v23; // rdx
char v25; // [rsp-8h] [rbp-30h]
v25 = v6;
v8 = 0LL;
while ( 1 )
{
v9 = v8;
if ( *(_QWORD *)a1 )
v9 = ma_net_read(a1);
if ( v9 == 0xFFFFFFFF || !v9 )
break;
v10 = *(_QWORD *)(a1 + 32);
if ( *(_BYTE *)v10 != 0xFF )
return v9;
if ( v9 < 4 )
{
my_set_error(a1, 2000, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25);
LABEL_35:
v9 = 0xFFFFFFFFLL;
*(_BYTE *)(a1 + 896) &= ~8u;
return v9;
}
v11 = *(unsigned __int16 *)(v10 + 1);
v12 = (_BYTE *)(v10 + 3);
v8 = v9 - 2;
if ( v11 != 0xFFFF )
{
*(_DWORD *)(a1 + 144) = v11;
v22 = a1 + 663;
if ( *v12 == 35 )
{
ma_strmake(v22, v10 + 4, 5LL);
v12 = (_BYTE *)(v10 + 9);
}
else
{
strncpy(v22, SQLSTATE_UNKNOWN, 5LL);
}
v23 = 511LL;
if ( v8 < 0x1FF )
v23 = v9 - 2;
ma_strmake(a1 + 151, v12, v23);
goto LABEL_35;
}
v13 = v9 - 3;
if ( v13 < 5 )
goto LABEL_27;
v14 = *(_QWORD *)(a1 + 1152);
if ( v14 )
{
v15 = *(void ( **)(long long, _QWORD, _QWORD, double))(v14 + 128);
if ( v15 )
{
a5 = *(unsigned __int8 *)(v10 + 9);
if ( a5 > 0xFA )
{
if ( a5 == 253 )
{
v16 = v10 + 13;
LODWORD(a5) = *(unsigned __int16 *)(v10 + 10) | (*(unsigned __int8 *)(v10 + 12) << 16);
}
else if ( (_DWORD)a5 == 252 )
{
v16 = v10 + 12;
LODWORD(a5) = *(unsigned __int16 *)(v10 + 10);
}
else if ( (_DWORD)a5 == 251 )
{
v16 = v10 + 10;
LODWORD(a5) = -1;
}
else
{
v16 = v10 + 18;
LODWORD(a5) = *(_DWORD *)(v10 + 10);
}
}
else
{
v16 = v10 + 10;
}
if ( v16 + (unsigned long long)(unsigned int)a5 > (unsigned long long)&v12[v13] )
{
LABEL_27:
v9 = 0xFFFFFFFFLL;
my_set_error(a1, 2027, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25);
return v9;
}
v15(
a1,
*(unsigned __int8 *)(v10 + 4),
*(unsigned __int8 *)(v10 + 5),
(double)(*(unsigned __int16 *)(v10 + 6) | (*(unsigned __int8 *)(v10 + 8) << 16)) / 1000.0);
}
}
}
v9 = 0xFFFFFFFFLL;
end_server(a1);
v17 = *(_DWORD *)(a1 + 144);
if ( v17 != 2026 )
{
v18 = 2013;
if ( v17 == 1153 )
v18 = 2020;
v19 = (int)SQLSTATE_UNKNOWN;
v20 = (_DWORD *)__errno_location();
my_set_error(a1, v18, v19, 0, *v20, v21, v25);
}
return v9;
}
| ma_net_safe_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR R12D,R12D
LAB_0011824b:
CMP qword ptr [RBX],0x0
MOV R14,R12
JZ 0x0011825f
MOV RDI,RBX
CALL 0x0013449c
MOV R14,RAX
LAB_0011825f:
MOV EAX,0xffffffff
CMP R14,RAX
JZ 0x00118386
TEST R14,R14
JZ 0x00118386
MOV R15,qword ptr [RBX + 0x20]
CMP byte ptr [R15],0xff
JNZ 0x0011848c
CMP R14,0x4
JC 0x00118408
MOVZX EAX,word ptr [R15 + 0x1]
LEA R13,[R15 + 0x3]
LEA R12,[R14 + -0x2]
CMP EAX,0xffff
JNZ 0x00118425
ADD R14D,-0x3
CMP R14D,0x5
JC 0x001183e2
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x0011824b
MOV RAX,qword ptr [RAX + 0x80]
TEST RAX,RAX
JZ 0x0011824b
MOVZX R8D,byte ptr [R15 + 0x9]
CMP R8,0xfa
JA 0x0011832c
LEA RCX,[R15 + 0xa]
LAB_001182e2:
MOV EDX,R8D
ADD RDX,RCX
MOV ESI,R14D
ADD R13,RSI
CMP RDX,R13
JA 0x001183e2
MOVZX ESI,byte ptr [R15 + 0x4]
MOVZX EDX,byte ptr [R15 + 0x5]
MOVZX EDI,word ptr [R15 + 0x6]
MOVZX R9D,byte ptr [R15 + 0x8]
SHL R9D,0x10
OR R9D,EDI
XORPS XMM0,XMM0
CVTSI2SD XMM0,R9D
DIVSD XMM0,qword ptr [0x0013bac0]
MOV RDI,RBX
CALL RAX
JMP 0x0011824b
LAB_0011832c:
CMP R8,0xfd
JZ 0x0011835f
CMP R8D,0xfc
JZ 0x00118354
CMP R8D,0xfb
JNZ 0x00118379
LEA RCX,[R15 + 0xa]
MOV R8,-0x1
JMP 0x001182e2
LAB_00118354:
LEA RCX,[R15 + 0xc]
MOVZX R8D,word ptr [R15 + 0xa]
JMP 0x001182e2
LAB_0011835f:
LEA RCX,[R15 + 0xd]
MOVZX EDX,word ptr [R15 + 0xa]
MOVZX R8D,byte ptr [R15 + 0xc]
SHL R8D,0x10
OR R8,RDX
JMP 0x001182e2
LAB_00118379:
LEA RCX,[R15 + 0x12]
MOV R8D,dword ptr [R15 + 0xa]
JMP 0x001182e2
LAB_00118386:
MOV R14D,0xffffffff
MOV RDI,RBX
CALL 0x0011849e
MOV EAX,dword ptr [RBX + 0x90]
CMP EAX,0x7ea
JZ 0x0011848c
CMP EAX,0x481
MOV EAX,0x7e4
MOV R15D,0x7dd
CMOVZ R15D,EAX
LEA RAX,[0x14dd80]
MOV R12,qword ptr [RAX]
CALL 0x00113060
MOV R8D,dword ptr [RAX]
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R12
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001184d1
JMP 0x0011848c
LAB_001183e2:
MOV R14D,0xffffffff
LEA RAX,[0x14dd80]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7eb
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001184d1
JMP 0x0011848c
LAB_00118408:
LEA RAX,[0x14dd80]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7d0
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001184d1
JMP 0x0011847f
LAB_00118425:
MOV dword ptr [RBX + 0x90],EAX
LEA RDI,[RBX + 0x297]
CMP byte ptr [R13],0x23
JNZ 0x00118450
LEA RSI,[R15 + 0x4]
MOV EDX,0x5
CALL 0x00127e03
ADD R15,0x9
MOV R13,R15
JMP 0x00118464
LAB_00118450:
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
LAB_00118464:
LEA RDI,[RBX + 0x97]
MOV EDX,0x1ff
CMP R12,RDX
CMOVC RDX,R12
MOV RSI,R13
CALL 0x00127e03
LAB_0011847f:
MOV R14D,0xffffffff
AND byte ptr [RBX + 0x380],0xf7
LAB_0011848c:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong ma_net_safe_read(long *param_1)
{
byte bVar1;
char *pcVar2;
code *pcVar3;
int *puVar4;
ulong uVar5;
int *piVar6;
char *pcVar7;
uint uVar8;
ulong uVar9;
uint uVar10;
int4 uVar11;
char *pcVar12;
uVar9 = 0;
do {
do {
uVar5 = uVar9;
if (*param_1 != 0) {
uVar5 = ma_net_read(param_1);
}
if ((uVar5 == 0xffffffff) || (uVar5 == 0)) {
end_server(param_1);
puVar4 = SQLSTATE_UNKNOWN;
if ((int)param_1[0x12] == 0x7ea) {
return 0xffffffff;
}
uVar11 = 0x7dd;
if ((int)param_1[0x12] == 0x481) {
uVar11 = 0x7e4;
}
piVar6 = __errno_location();
my_set_error(param_1,uVar11,puVar4,0,*piVar6);
return 0xffffffff;
}
pcVar2 = (char *)param_1[4];
if (*pcVar2 != -1) {
return uVar5;
}
if (uVar5 < 4) {
my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0);
LAB_0011847f:
*(byte *)(param_1 + 0x70) = *(byte *)(param_1 + 0x70) & 0xf7;
return 0xffffffff;
}
pcVar12 = pcVar2 + 3;
uVar9 = uVar5 - 2;
if (*(ushort *)(pcVar2 + 1) != 0xffff) {
*(uint *)(param_1 + 0x12) = (uint)*(ushort *)(pcVar2 + 1);
if (*pcVar12 == '#') {
ma_strmake((char *)((long)param_1 + 0x297),pcVar2 + 4,5);
pcVar12 = pcVar2 + 9;
}
else {
strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5);
}
uVar5 = 0x1ff;
if (uVar9 < 0x1ff) {
uVar5 = uVar9;
}
ma_strmake((long)param_1 + 0x97,pcVar12,uVar5);
goto LAB_0011847f;
}
uVar10 = (int)uVar5 - 3;
if (uVar10 < 5) goto LAB_001183e2;
} while ((param_1[0x90] == 0) ||
(pcVar3 = *(code **)(param_1[0x90] + 0x80), pcVar3 == (code *)0x0));
bVar1 = pcVar2[9];
uVar8 = (uint)bVar1;
if (uVar8 < 0xfb) {
pcVar7 = pcVar2 + 10;
}
else if (uVar8 == 0xfd) {
pcVar7 = pcVar2 + 0xd;
uVar8 = (uint)*(uint3 *)(pcVar2 + 10);
}
else if (bVar1 == 0xfc) {
pcVar7 = pcVar2 + 0xc;
uVar8 = (uint)*(ushort *)(pcVar2 + 10);
}
else if (bVar1 == 0xfb) {
pcVar7 = pcVar2 + 10;
uVar8 = 0xffffffff;
}
else {
pcVar7 = pcVar2 + 0x12;
uVar8 = *(uint *)(pcVar2 + 10);
}
if (pcVar12 + uVar10 < pcVar7 + uVar8) {
LAB_001183e2:
my_set_error(param_1,0x7eb,SQLSTATE_UNKNOWN,0);
return 0xffffffff;
}
(*pcVar3)((double)*(uint3 *)(pcVar2 + 6) / _DAT_0013bac0,param_1,pcVar2[4],pcVar2[5]);
} while( true );
}
| |
34,368 | log_server_request(httplib::Request const&, httplib::Response const&) | monkey531[P]llama/examples/server/server.cpp | static void log_server_request(const httplib::Request & req, const httplib::Response & res) {
// skip GH copilot requests when using default port
if (req.path == "/v1/health" || req.path == "/v1/completions") {
return;
}
LOG_INF("request: %s %s %s %d\n", req.method.c_str(), req.path.c_str(), req.remote_addr.c_str(), res.status);
LOG_DBG("request: %s\n", req.body.c_str());
LOG_DBG("response: %s\n", res.body.c_str());
} | O3 | cpp | log_server_request(httplib::Request const&, httplib::Response const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %r15
leaq 0x11d23f(%rip), %rsi # 0x145ef7
movq %r15, %rdi
callq 0x1f2b0
testl %eax, %eax
je 0x28d78
leaq 0x11cd8e(%rip), %rsi # 0x145a5d
movq %r15, %rdi
callq 0x1f2b0
testl %eax, %eax
je 0x28d78
leaq 0x2a7262(%rip), %r15 # 0x2cff48
cmpl $0x0, (%r15)
js 0x28d78
callq 0x13f3e3
movq (%r14), %rcx
movq 0x20(%r14), %r8
movq 0xc8(%r14), %r9
movl 0x20(%rbx), %edx
movl %edx, (%rsp)
leaq 0x11d1f2(%rip), %rdx # 0x145f02
movq %rax, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x13f480
cmpl $0x0, (%r15)
jle 0x28d78
callq 0x13f3e3
movq 0xa8(%r14), %rcx
leaq 0x11d1e0(%rip), %rdx # 0x145f18
movq %rax, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x13f480
cmpl $0x0, (%r15)
jle 0x28d78
callq 0x13f3e3
movq 0x80(%rbx), %rcx
leaq 0x11d1c6(%rip), %rdx # 0x145f26
movq %rax, %rdi
movl $0x1, %esi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x13f480
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZL18log_server_requestRKN7httplib7RequestERKNS_8ResponseE:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
lea r15, [rdi+20h]
lea rsi, aV1Health; "/v1/health"
mov rdi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_28D78
lea rsi, aV1Completions; "/v1/completions"
mov rdi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_28D78
lea r15, common_log_verbosity_thold
cmp dword ptr [r15], 0
js loc_28D78
call _Z15common_log_mainv; common_log_main(void)
mov rcx, [r14]
mov r8, [r14+20h]
mov r9, [r14+0C8h]
mov edx, [rbx+20h]
mov [rsp+28h+var_28], edx
lea rdx, aRequestSSSD; "request: %s %s %s %d\n"
mov rdi, rax
mov esi, 2
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
cmp dword ptr [r15], 0
jle short loc_28D78
call _Z15common_log_mainv; common_log_main(void)
mov rcx, [r14+0A8h]
lea rdx, aRequestS; "request: %s\n"
mov rdi, rax
mov esi, 1
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
cmp dword ptr [r15], 0
jle short loc_28D78
call _Z15common_log_mainv; common_log_main(void)
mov rcx, [rbx+80h]
lea rdx, aResponseS; "response: %s\n"
mov rdi, rax
mov esi, 1
xor eax, eax
add rsp, 10h
pop rbx
pop r14
pop r15
jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_28D78:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long log_server_request(const httplib::Request *a1, const httplib::Response *a2)
{
long long result; // rax
int v3; // eax
int v4; // eax
int v5; // r8d
int v6; // r9d
int v7; // eax
int v8; // r8d
int v9; // r9d
result = std::string::compare((char *)a1 + 32, "/v1/health");
if ( (_DWORD)result )
{
result = std::string::compare((char *)a1 + 32, "/v1/completions");
if ( (_DWORD)result )
{
if ( common_log_verbosity_thold >= 0 )
{
v3 = common_log_main();
result = common_log_add(
v3,
2,
(unsigned int)"request: %s %s %s %d\n",
*(_QWORD *)a1,
*((_QWORD *)a1 + 4),
*((_QWORD *)a1 + 25));
if ( common_log_verbosity_thold > 0 )
{
v4 = common_log_main();
result = common_log_add(v4, 1, (unsigned int)"request: %s\n", *((_QWORD *)a1 + 21), v5, v6);
if ( common_log_verbosity_thold > 0 )
{
v7 = common_log_main();
return common_log_add(v7, 1, (unsigned int)"response: %s\n", *((_QWORD *)a2 + 16), v8, v9);
}
}
}
}
}
return result;
}
| log_server_request:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RDI + 0x20]
LEA RSI,[0x245ef7]
MOV RDI,R15
CALL 0x0011f2b0
TEST EAX,EAX
JZ 0x00128d78
LEA RSI,[0x245a5d]
MOV RDI,R15
CALL 0x0011f2b0
TEST EAX,EAX
JZ 0x00128d78
LEA R15,[0x3cff48]
CMP dword ptr [R15],0x0
JS 0x00128d78
CALL 0x0023f3e3
MOV RCX,qword ptr [R14]
MOV R8,qword ptr [R14 + 0x20]
MOV R9,qword ptr [R14 + 0xc8]
MOV EDX,dword ptr [RBX + 0x20]
MOV dword ptr [RSP],EDX
LEA RDX,[0x245f02]
MOV RDI,RAX
MOV ESI,0x2
XOR EAX,EAX
CALL 0x0023f480
CMP dword ptr [R15],0x0
JLE 0x00128d78
CALL 0x0023f3e3
MOV RCX,qword ptr [R14 + 0xa8]
LEA RDX,[0x245f18]
MOV RDI,RAX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0023f480
CMP dword ptr [R15],0x0
JLE 0x00128d78
CALL 0x0023f3e3
MOV RCX,qword ptr [RBX + 0x80]
LEA RDX,[0x245f26]
MOV RDI,RAX
MOV ESI,0x1
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x0023f480
LAB_00128d78:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* log_server_request(httplib::Request const&, httplib::Response const&) */
void log_server_request(Request *param_1,Response *param_2)
{
int iVar1;
int8 uVar2;
iVar1 = std::__cxx11::string::compare((char *)(param_1 + 0x20));
if (iVar1 != 0) {
iVar1 = std::__cxx11::string::compare((char *)(param_1 + 0x20));
if ((iVar1 != 0) && (-1 < common_log_verbosity_thold)) {
uVar2 = common_log_main();
common_log_add(uVar2,2,"request: %s %s %s %d\n",*(int8 *)param_1,
*(int8 *)(param_1 + 0x20),*(int8 *)(param_1 + 200),
*(int4 *)(param_2 + 0x20));
if (0 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,1,"request: %s\n",*(int8 *)(param_1 + 0xa8));
if (0 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,1,"response: %s\n",*(int8 *)(param_2 + 0x80));
return;
}
}
}
}
return;
}
| |
34,369 | my_symlink | eloqsql/mysys/my_symlink.c | int my_symlink(const char *content, const char *linkname, myf MyFlags)
{
#ifndef HAVE_READLINK
return 0;
#else
int result;
DBUG_ENTER("my_symlink");
DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname));
result= 0;
if (symlink(content, linkname))
{
result= -1;
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags))
result= -1;
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O3 | c | my_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
callq 0x24080
testl %eax, %eax
je 0x2e302
callq 0x24060
movq %rax, %r13
movl (%rax), %r14d
callq 0x2ec32
movl %r14d, (%rax)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testb $0x10, %r15b
je 0x2e31e
movl (%r13), %r8d
movl $0x19, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2a00f
jmp 0x2e31e
xorl %r14d, %r14d
testw %r15w, %r15w
jns 0x2e31e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e753
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rbx, rsi
mov r12, rdi
call _symlink
test eax, eax
jz short loc_2E302
call ___errno_location
mov r13, rax
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov r14d, 0FFFFFFFFh
test r15b, 10h
jz short loc_2E31E
mov r8d, [r13+0]
mov edi, 19h
xor esi, esi
mov rdx, rbx
mov rcx, r12
xor eax, eax
call my_error
jmp short loc_2E31E
loc_2E302:
xor r14d, r14d
test r15w, r15w
jns short loc_2E31E
mov rdi, rbx
mov rsi, r15
call my_sync_dir_by_file
xor r14d, r14d
neg eax
sbb r14d, r14d
loc_2E31E:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_symlink(long long a1, long long a2, long long a3)
{
unsigned int *v4; // r13
unsigned int v5; // r14d
unsigned int v6; // r14d
if ( (unsigned int)symlink(a1) )
{
v4 = (unsigned int *)__errno_location(a1);
v5 = *v4;
*(_DWORD *)my_thread_var(a1) = v5;
v6 = -1;
if ( (a3 & 0x10) != 0 )
my_error(0x19u, 0LL, a2, a1, *v4);
}
else
{
v6 = 0;
if ( (a3 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(a2, a3) != 0);
}
return v6;
}
| my_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RBX,RSI
MOV R12,RDI
CALL 0x00124080
TEST EAX,EAX
JZ 0x0012e302
CALL 0x00124060
MOV R13,RAX
MOV R14D,dword ptr [RAX]
CALL 0x0012ec32
MOV dword ptr [RAX],R14D
MOV R14D,0xffffffff
TEST R15B,0x10
JZ 0x0012e31e
MOV R8D,dword ptr [R13]
MOV EDI,0x19
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,R12
XOR EAX,EAX
CALL 0x0012a00f
JMP 0x0012e31e
LAB_0012e302:
XOR R14D,R14D
TEST R15W,R15W
JNS 0x0012e31e
MOV RDI,RBX
MOV RSI,R15
CALL 0x0012e753
XOR R14D,R14D
NEG EAX
SBB R14D,R14D
LAB_0012e31e:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_symlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int *piVar3;
iVar1 = symlink(param_1,param_2);
if (iVar1 == 0) {
iVar1 = 0;
if ((short)param_3 < 0) {
iVar1 = my_sync_dir_by_file(param_2,param_3);
iVar1 = -(uint)(iVar1 != 0);
}
}
else {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
iVar1 = -1;
if ((param_3 & 0x10) != 0) {
my_error(0x19,0,param_2,param_1,*piVar2);
}
}
return iVar1;
}
| |
34,370 | 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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | monkey531[P]llama/common/json.hpp | const_reference operator[](const typename object_t::key_type& key) const
{
// const operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto it = m_data.m_value.object->find(key);
JSON_ASSERT(it != m_data.m_value.object->end());
return it->second;
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | 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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xb156a
movq 0x8(%r14), %rdi
callq 0xb1624
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xb15c8
addq $0x20, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x714aa
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x47b2e(%rip), %rsi # 0xf90bc
leaq 0x10(%rsp), %rdi
callq 0xb12b0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8c74a
xorl %ebp, %ebp
leaq 0x80bef(%rip), %rsi # 0x1321a8
leaq -0x43fb8(%rip), %rdx # 0x6d608
movq %rbx, %rdi
callq 0x1bf60
leaq 0x4372d(%rip), %rdi # 0xf4cfc
leaq 0x3bfff(%rip), %rdx # 0xed5d5
leaq 0x47b12(%rip), %rcx # 0xf90ef
movl $0x53ca, %esi # imm = 0x53CA
xorl %eax, %eax
callq 0x1bef0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb160f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xb160f
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb161c
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_B156A
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&)
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_B15C8
add rax, 20h ; ' '
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B156A:
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, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; 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
loc_B15C8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()"
mov esi, 53CAh
xor eax, eax
call _ggml_abort
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B160F
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B160F
mov r14, rax
mov bpl, 1
loc_B160F:
test bpl, bpl
jz short loc_B161C
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B161C:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1)
{
void *v1; // rbx
char v2; // bp
long long v3; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v6; // r14
const char *v7; // [rsp+8h] [rbp-40h] BYREF
void *v8[2]; // [rsp+10h] [rbp-38h] BYREF
long long v9; // [rsp+20h] [rbp-28h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = 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(&)[51],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a string argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8));
if ( v3 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v6 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
21450LL,
"GGML_ASSERT(%s) failed",
"it != m_data.m_value.object->end()");
if ( v8[0] != &v9 )
operator delete(v8[0], v9 + 1);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v6);
}
return v3 + 32;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001b156a
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x001b1624
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001b15c8
ADD RAX,0x20
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b156a:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001714aa
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b1587:
LEA RSI,[0x1f90bc]
LEA RDI,[RSP + 0x10]
CALL 0x001b12b0
MOV BPL,0x1
LAB_001b159b:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0018c74a
XOR EBP,EBP
LEA RSI,[0x2321a8]
LEA RDX,[0x16d608]
MOV RDI,RBX
CALL 0x0011bf60
LAB_001b15c8:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f90ef]
MOV ESI,0x53ca
XOR EAX,EAX
CALL 0x0011bef0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](std::__cxx11::string const&) const */
long __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>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_1)
{
long lVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001b1587 to 001b1597 has its CatchHandler @ 001b1609 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_38,"cannot use operator[] with a string argument with ",&local_40);
/* try { // try from 001b159b to 001b15c7 has its CatchHandler @ 001b15e9 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = ordered_map<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>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_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>>>>
::find(*(ordered_map<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>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_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>>>>
**)(this + 8),param_1);
if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) {
return lVar1 + 0x20;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x53ca,
"GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()");
}
| |
34,371 | POINTonE2_Deserialize_Z | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c | static BLST_ERROR POINTonE2_Deserialize_Z(POINTonE2_affine *out,
const unsigned char in[192])
{
unsigned char in0 = in[0];
if ((in0 & 0xe0) == 0)
return POINTonE2_Deserialize_BE(out, in);
if (in0 & 0x80) /* compressed bit */
return POINTonE2_Uncompress_Z(out, in);
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 191)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
}
return BLST_BAD_ENCODING;
} | O3 | c | POINTonE2_Deserialize_Z:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpq $0x1f, %rax
ja 0x5ce8c
leaq -0xf0(%rbp), %r14
movl $0x2f, %eax
xorl %ecx, %ecx
movq %rsi, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %edi
incq %rdx
orq %rdi, %rcx
movq %rax, %rdi
andq $-0x8, %rdi
movq %rcx, -0xf0(%rbp,%rdi)
addq $-0x1, %rax
jb 0x5cc50
leaq 0x30(%rsi), %rax
movl $0x2f, %ecx
xorl %edx, %edx
shlq $0x8, %rdx
movzbl (%rax), %edi
incq %rax
orq %rdi, %rdx
movq %rcx, %rdi
andq $-0x8, %rdi
movq %rdx, -0x120(%rbp,%rdi)
addq $-0x1, %rcx
jb 0x5cc7d
leaq -0x90(%rbp), %r12
leaq 0x60(%rsi), %rax
movl $0x2f, %ecx
xorl %edx, %edx
shlq $0x8, %rdx
movzbl (%rax), %edi
incq %rax
orq %rdi, %rdx
movq %rcx, %rdi
andq $-0x8, %rdi
movq %rdx, -0x90(%rbp,%rdi)
addq $-0x1, %rcx
jb 0x5ccb1
addq $0x90, %rsi
movl $0x2f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi), %edx
incq %rsi
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0xc0(%rbp,%rdx)
addq $-0x1, %rax
jb 0x5cce1
andb $0x1f, -0xc1(%rbp)
leaq 0x2fff7(%rip), %rdx # 0x8cd08
leaq 0x2ff88(%rip), %rcx # 0x8cca0
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70980
movl $0x1, %r13d
testq %rax, %rax
je 0x5cedf
movq %r12, %r14
leaq 0x2ffb8(%rip), %rdx # 0x8cd08
leaq 0x2ff49(%rip), %rcx # 0x8cca0
leaq -0x120(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x70980
testq %rax, %rax
je 0x5cedf
leaq 0x2ff7f(%rip), %rdx # 0x8cd08
leaq 0x2ff10(%rip), %rcx # 0x8cca0
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70980
testq %rax, %rax
je 0x5cedf
leaq 0x2ff4d(%rip), %rdx # 0x8cd08
leaq 0x2fede(%rip), %rcx # 0x8cca0
movq %r15, %rdi
leaq -0xc0(%rbp), %r14
movq %r14, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70980
testq %rax, %rax
je 0x5cedf
leaq 0x3012c(%rip), %r15 # 0x8cf20
leaq 0x2fea5(%rip), %r13 # 0x8cca0
leaq -0x120(%rbp), %rdi
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %rdi, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x74ea0
leaq -0xf0(%rbp), %rdi
movq %rdi, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x74ea0
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x74ea0
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x74ea0
leaq -0x120(%rbp), %rdi
callq 0x5c3a2
testq %rax, %rax
je 0x5cf0d
leaq -0x120(%rbp), %rsi
movl $0xc0, %edx
movq %rbx, %rdi
callq 0x22090
jmp 0x5cedc
testb %al, %al
js 0x5cef4
movl $0x1, %r13d
cmpb $0x40, %al
jb 0x5cedf
andl $0x3f, %eax
decq %rax
shrq $0x3f, %rax
movl $0x1, %edx
xorl %ecx, %ecx
orb (%rsi,%rdx), %cl
incq %rdx
cmpq $0xc0, %rdx
jne 0x5ceab
movzbl %cl, %ecx
decq %rcx
shrq $0x3f, %rcx
testq %rax, %rcx
je 0x5cedf
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x18, %rax
jne 0x5cecb
xorl %r13d, %r13d
movl %r13d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5c969
movl $0x2, %r13d
jmp 0x5cedf
| POINTonE2_Deserialize_Z:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rdi
movzx eax, byte ptr [rsi]
cmp rax, 1Fh
ja loc_5CE8C
lea r14, [rbp+var_F0]
mov eax, 2Fh ; '/'
xor ecx, ecx
mov rdx, rsi
loc_5CC50:
shl rcx, 8
movzx edi, byte ptr [rdx]
inc rdx
or rcx, rdi
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdi+var_F0], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_5CC50
lea rax, [rsi+30h]
mov ecx, 2Fh ; '/'
xor edx, edx
loc_5CC7D:
shl rdx, 8
movzx edi, byte ptr [rax]
inc rax
or rdx, rdi
mov rdi, rcx
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdi+var_120], rdx
add rcx, 0FFFFFFFFFFFFFFFFh
jb short loc_5CC7D
lea r12, [rbp+var_90]
lea rax, [rsi+60h]
mov ecx, 2Fh ; '/'
xor edx, edx
loc_5CCB1:
shl rdx, 8
movzx edi, byte ptr [rax]
inc rax
or rdx, rdi
mov rdi, rcx
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdi+var_90], rdx
add rcx, 0FFFFFFFFFFFFFFFFh
jb short loc_5CCB1
add rsi, 90h
mov eax, 2Fh ; '/'
xor ecx, ecx
loc_5CCE1:
shl rcx, 8
movzx edx, byte ptr [rsi]
inc rsi
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_C0], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_5CCE1
and [rbp+var_C1], 1Fh
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
lea r15, [rbp+var_60]
mov rdi, r15
mov rsi, r14
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r15
mov rsi, r14
call vec_is_equal_16x
mov r13d, 1
test rax, rax
jz loc_5CEDF
mov r14, r12
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
lea r12, [rbp+var_120]
mov rdi, r15
mov rsi, r12
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r15
mov rsi, r12
call vec_is_equal_16x
test rax, rax
jz loc_5CEDF
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
mov rdi, r15
mov rsi, r14
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r15
mov rsi, r14
call vec_is_equal_16x
test rax, rax
jz loc_5CEDF
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
mov rdi, r15
lea r14, [rbp+var_C0]
mov rsi, r14
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r15
mov rsi, r14
call vec_is_equal_16x
test rax, rax
jz loc_5CEDF
lea r15, BLS12_381_RR
lea r13, BLS12_381_P
lea rdi, [rbp+var_120]
mov r12, 89F3FFFCFFFCFFFDh
mov rsi, rdi
mov rdx, r15
mov rcx, r13
mov r8, r12
call mul_mont_384
lea rdi, [rbp+var_F0]
mov rsi, rdi
mov rdx, r15
mov rcx, r13
mov r8, r12
call mul_mont_384
mov rdi, r14
mov rsi, r14
mov rdx, r15
mov rcx, r13
mov r8, r12
call mul_mont_384
lea rdi, [rbp+var_90]
mov rsi, rdi
mov rdx, r15
mov rcx, r13
mov r8, r12
call mul_mont_384
lea rdi, [rbp+var_120]
call POINTonE2_affine_on_curve
test rax, rax
jz loc_5CF0D
lea rsi, [rbp+var_120]
mov edx, 0C0h
mov rdi, rbx
call _memcpy
jmp short loc_5CEDC
loc_5CE8C:
test al, al
js short loc_5CEF4
mov r13d, 1
cmp al, 40h ; '@'
jb short loc_5CEDF
and eax, 3Fh
dec rax
shr rax, 3Fh
mov edx, 1
xor ecx, ecx
loc_5CEAB:
or cl, [rsi+rdx]
inc rdx
cmp rdx, 0C0h
jnz short loc_5CEAB
movzx ecx, cl
dec rcx
shr rcx, 3Fh
test rcx, rax
jz short loc_5CEDF
xor eax, eax
loc_5CECB:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 18h
jnz short loc_5CECB
loc_5CEDC:
xor r13d, r13d
loc_5CEDF:
mov eax, r13d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5CEF4:
mov rdi, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp POINTonE2_Uncompress_Z
loc_5CF0D:
mov r13d, 2
jmp short loc_5CEDF
| long long POINTonE2_Deserialize_Z(long long a1, unsigned __int8 *a2)
{
unsigned long long v3; // rax
long long v4; // rax
long long v5; // rcx
unsigned __int8 *v6; // rdx
long long v7; // rdi
bool v8; // cf
unsigned __int8 *v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rdi
unsigned __int8 *v13; // rax
long long v14; // rcx
long long v15; // rdx
long long v16; // rdi
unsigned __int8 *v17; // rsi
long long v18; // rax
long long v19; // rcx
long long v20; // rdx
unsigned int v21; // r13d
unsigned long long v22; // rax
long long v23; // rdx
unsigned __int8 v24; // cl
long long i; // rax
_QWORD v27[6]; // [rsp+0h] [rbp-120h] BYREF
_QWORD v28[5]; // [rsp+30h] [rbp-F0h] BYREF
char v29; // [rsp+5Fh] [rbp-C1h]
_QWORD v30[6]; // [rsp+60h] [rbp-C0h] BYREF
_QWORD v31[6]; // [rsp+90h] [rbp-90h] BYREF
_BYTE v32[96]; // [rsp+C0h] [rbp-60h] BYREF
v3 = *a2;
if ( v3 <= 0x1F )
{
v4 = 47LL;
v5 = 0LL;
v6 = a2;
do
{
v7 = *v6++;
v5 = v7 | (v5 << 8);
*(_QWORD *)((char *)v28 + (v4 & 0xFFFFFFFFFFFFFFF8LL)) = v5;
v8 = v4-- != 0;
}
while ( v8 );
v9 = a2 + 48;
v10 = 47LL;
v11 = 0LL;
do
{
v12 = *v9++;
v11 = v12 | (v11 << 8);
*(_QWORD *)((char *)v27 + (v10 & 0xFFFFFFFFFFFFFFF8LL)) = v11;
v8 = v10-- != 0;
}
while ( v8 );
v13 = a2 + 96;
v14 = 47LL;
v15 = 0LL;
do
{
v16 = *v13++;
v15 = v16 | (v15 << 8);
*(_QWORD *)((char *)v31 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) = v15;
v8 = v14-- != 0;
}
while ( v8 );
v17 = a2 + 144;
v18 = 47LL;
v19 = 0LL;
do
{
v20 = *v17++;
v19 = v20 | (v19 << 8);
*(_QWORD *)((char *)v30 + (v18 & 0xFFFFFFFFFFFFFFF8LL)) = v19;
v8 = v18-- != 0;
}
while ( v8 );
v29 &= 0x1Fu;
add_mod_384(v32, v28, &unk_8CD08, &BLS12_381_P);
v21 = 1;
if ( !vec_is_equal_16x(v32, v28, 48LL) )
return v21;
add_mod_384(v32, v27, &unk_8CD08, &BLS12_381_P);
if ( !vec_is_equal_16x(v32, v27, 48LL) )
return v21;
add_mod_384(v32, v31, &unk_8CD08, &BLS12_381_P);
if ( !vec_is_equal_16x(v32, v31, 48LL) )
return v21;
add_mod_384(v32, v30, &unk_8CD08, &BLS12_381_P);
if ( !vec_is_equal_16x(v32, v30, 48LL) )
return v21;
mul_mont_384(v27, v27, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v28, v28, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v30, v30, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v31, v31, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
if ( !POINTonE2_affine_on_curve((long long)v27) )
return 2;
memcpy(a1);
return 0;
}
if ( (v3 & 0x80u) == 0LL )
{
v21 = 1;
if ( (unsigned __int8)v3 < 0x40u )
return v21;
v22 = ((v3 & 0x3F) - 1) >> 63;
v23 = 1LL;
v24 = 0;
do
v24 |= a2[v23++];
while ( v23 != 192 );
if ( (v22 & (((unsigned long long)v24 - 1) >> 63)) == 0 )
return v21;
for ( i = 0LL; i != 24; ++i )
*(_QWORD *)(a1 + 8 * i) = 0LL;
return 0;
}
return POINTonE2_Uncompress_Z(a1, a2);
}
| POINTonE2_Deserialize_Z:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RDI
MOVZX EAX,byte ptr [RSI]
CMP RAX,0x1f
JA 0x0015ce8c
LEA R14,[RBP + -0xf0]
MOV EAX,0x2f
XOR ECX,ECX
MOV RDX,RSI
LAB_0015cc50:
SHL RCX,0x8
MOVZX EDI,byte ptr [RDX]
INC RDX
OR RCX,RDI
MOV RDI,RAX
AND RDI,-0x8
MOV qword ptr [RBP + RDI*0x1 + -0xf0],RCX
ADD RAX,-0x1
JC 0x0015cc50
LEA RAX,[RSI + 0x30]
MOV ECX,0x2f
XOR EDX,EDX
LAB_0015cc7d:
SHL RDX,0x8
MOVZX EDI,byte ptr [RAX]
INC RAX
OR RDX,RDI
MOV RDI,RCX
AND RDI,-0x8
MOV qword ptr [RBP + RDI*0x1 + -0x120],RDX
ADD RCX,-0x1
JC 0x0015cc7d
LEA R12,[RBP + -0x90]
LEA RAX,[RSI + 0x60]
MOV ECX,0x2f
XOR EDX,EDX
LAB_0015ccb1:
SHL RDX,0x8
MOVZX EDI,byte ptr [RAX]
INC RAX
OR RDX,RDI
MOV RDI,RCX
AND RDI,-0x8
MOV qword ptr [RBP + RDI*0x1 + -0x90],RDX
ADD RCX,-0x1
JC 0x0015ccb1
ADD RSI,0x90
MOV EAX,0x2f
XOR ECX,ECX
LAB_0015cce1:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI]
INC RSI
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0xc0],RCX
ADD RAX,-0x1
JC 0x0015cce1
AND byte ptr [RBP + -0xc1],0x1f
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
LEA R15,[RBP + -0x60]
MOV RDI,R15
MOV RSI,R14
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R15
MOV RSI,R14
CALL 0x00170980
MOV R13D,0x1
TEST RAX,RAX
JZ 0x0015cedf
MOV R14,R12
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
LEA R12,[RBP + -0x120]
MOV RDI,R15
MOV RSI,R12
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R15
MOV RSI,R12
CALL 0x00170980
TEST RAX,RAX
JZ 0x0015cedf
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
MOV RDI,R15
MOV RSI,R14
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R15
MOV RSI,R14
CALL 0x00170980
TEST RAX,RAX
JZ 0x0015cedf
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
MOV RDI,R15
LEA R14,[RBP + -0xc0]
MOV RSI,R14
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R15
MOV RSI,R14
CALL 0x00170980
TEST RAX,RAX
JZ 0x0015cedf
LEA R15,[0x18cf20]
LEA R13,[0x18cca0]
LEA RDI,[RBP + -0x120]
MOV R12,-0x760c000300030003
MOV RSI,RDI
MOV RDX,R15
MOV RCX,R13
MOV R8,R12
CALL 0x00174ea0
LEA RDI,[RBP + -0xf0]
MOV RSI,RDI
MOV RDX,R15
MOV RCX,R13
MOV R8,R12
CALL 0x00174ea0
MOV RDI,R14
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
MOV R8,R12
CALL 0x00174ea0
LEA RDI,[RBP + -0x90]
MOV RSI,RDI
MOV RDX,R15
MOV RCX,R13
MOV R8,R12
CALL 0x00174ea0
LEA RDI,[RBP + -0x120]
CALL 0x0015c3a2
TEST RAX,RAX
JZ 0x0015cf0d
LEA RSI,[RBP + -0x120]
MOV EDX,0xc0
MOV RDI,RBX
CALL 0x00122090
JMP 0x0015cedc
LAB_0015ce8c:
TEST AL,AL
JS 0x0015cef4
MOV R13D,0x1
CMP AL,0x40
JC 0x0015cedf
AND EAX,0x3f
DEC RAX
SHR RAX,0x3f
MOV EDX,0x1
XOR ECX,ECX
LAB_0015ceab:
OR CL,byte ptr [RSI + RDX*0x1]
INC RDX
CMP RDX,0xc0
JNZ 0x0015ceab
MOVZX ECX,CL
DEC RCX
SHR RCX,0x3f
TEST RCX,RAX
JZ 0x0015cedf
XOR EAX,EAX
LAB_0015cecb:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x18
JNZ 0x0015cecb
LAB_0015cedc:
XOR R13D,R13D
LAB_0015cedf:
MOV EAX,R13D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015cef4:
MOV RDI,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015c969
LAB_0015cf0d:
MOV R13D,0x2
JMP 0x0015cedf
|
int8 POINTonE2_Deserialize_Z(void *param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
long lVar3;
int8 uVar4;
byte bVar5;
ulong uVar6;
byte *pbVar7;
bool bVar8;
ulong local_128 [6];
ulong local_f8 [5];
byte local_c9;
ulong local_c8 [6];
ulong local_98 [6];
int1 local_68 [56];
bVar1 = *param_2;
if (bVar1 < 0x20) {
uVar2 = 0x2f;
uVar6 = 0;
pbVar7 = param_2;
do {
bVar1 = *pbVar7;
pbVar7 = pbVar7 + 1;
uVar6 = uVar6 << 8 | (ulong)bVar1;
*(ulong *)((long)local_f8 + (uVar2 & 0xfffffffffffffff8)) = uVar6;
bVar8 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar8);
pbVar7 = param_2 + 0x30;
uVar2 = 0x2f;
uVar6 = 0;
do {
bVar1 = *pbVar7;
pbVar7 = pbVar7 + 1;
uVar6 = uVar6 << 8 | (ulong)bVar1;
*(ulong *)((long)local_128 + (uVar2 & 0xfffffffffffffff8)) = uVar6;
bVar8 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar8);
pbVar7 = param_2 + 0x60;
uVar2 = 0x2f;
uVar6 = 0;
do {
bVar1 = *pbVar7;
pbVar7 = pbVar7 + 1;
uVar6 = uVar6 << 8 | (ulong)bVar1;
*(ulong *)((long)local_98 + (uVar2 & 0xfffffffffffffff8)) = uVar6;
bVar8 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar8);
param_2 = param_2 + 0x90;
uVar2 = 0x2f;
uVar6 = 0;
do {
bVar1 = *param_2;
param_2 = param_2 + 1;
uVar6 = uVar6 << 8 | (ulong)bVar1;
*(ulong *)((long)local_c8 + (uVar2 & 0xfffffffffffffff8)) = uVar6;
bVar8 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar8);
local_c9 = local_c9 & 0x1f;
add_mod_384(local_68,local_f8,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_68,local_f8,0x30);
if (lVar3 == 0) {
return 1;
}
add_mod_384(local_68,local_128,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_68,local_128,0x30);
if (lVar3 == 0) {
return 1;
}
add_mod_384(local_68,local_98,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_68,local_98,0x30);
if (lVar3 == 0) {
return 1;
}
add_mod_384(local_68,local_c8,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_68,local_c8,0x30);
if (lVar3 == 0) {
return 1;
}
mul_mont_384(local_128,local_128,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_f8,local_f8,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c8,local_c8,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
lVar3 = POINTonE2_affine_on_curve(local_128);
if (lVar3 == 0) {
return 2;
}
memcpy(param_1,local_128,0xc0);
}
else {
if ((char)bVar1 < '\0') {
uVar4 = POINTonE2_Uncompress_Z(param_1);
return uVar4;
}
if (bVar1 < 0x40) {
return 1;
}
lVar3 = 1;
bVar5 = 0;
do {
bVar5 = bVar5 | param_2[lVar3];
lVar3 = lVar3 + 1;
} while (lVar3 != 0xc0);
if (-1 < (long)((ulong)bVar5 - 1 & (ulong)(bVar1 & 0x3f) - 1)) {
return 1;
}
lVar3 = 0;
do {
*(int8 *)((long)param_1 + lVar3 * 8) = 0;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x18);
}
return 0;
}
| |
34,372 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O1 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x856a0
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x843c2
testb %bpl, %bpl
je 0x843c2
leaq 0xacc4c(%rip), %rax # 0x130fa0
movb (%rax), %al
testb %al, %al
je 0x8449f
leaq 0xacc1b(%rip), %rdx # 0x130f80
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x84544
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x84396
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testq %r15, %r15
je 0x843c2
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x843fb
movq 0xabbc8(%rip), %rcx # 0x12ff80
cmpb $0x0, (%rcx)
je 0x843f7
incl 0x8(%rax)
jmp 0x843fb
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movaps (%rsp), %xmm0
movq %rax, 0x8(%rsp)
movups %xmm0, (%rbx)
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x843e7
callq 0x6d7f6
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x8592e
movl $0x60, %edi
callq 0x1b8a0
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xaa61c(%rip), %rax # 0x12ea58
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x98a3e
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x84478
callq 0x6d7f6
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x84487
callq 0x6d7f6
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x843d8
callq 0x6d7f6
jmp 0x843d8
leaq 0xacafa(%rip), %rdi # 0x130fa0
callq 0x1bff0
testl %eax, %eax
je 0x8435e
leaq 0xacac6(%rip), %rdi # 0x130f80
leaq 0x6f36e(%rip), %rsi # 0xf382f
movl $0x10, %edx
callq 0x62826
leaq -0x219a4(%rip), %rdi # 0x62b2e
leaq 0xacaa7(%rip), %rsi # 0x130f80
leaq 0xac3f8(%rip), %rdx # 0x1308d8
callq 0x1b7a0
leaq 0xacab4(%rip), %rdi # 0x130fa0
callq 0x1b5a0
jmp 0x8435e
movq %rax, %rbx
leaq 0xacaa0(%rip), %rdi # 0x130fa0
callq 0x1b590
jmp 0x8452d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x85b36
jmp 0x84519
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8452d
callq 0x6d7f6
jmp 0x8452d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8453c
callq 0x6d7f6
movq %rbx, %rdi
callq 0x1bf90
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_843C2
test bpl, bpl
jz short loc_843C2
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_8449F
loc_8435E:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_84396
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_84396:
test r15, r15
jz short loc_843C2
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_843FB
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_843F7
inc dword ptr [rax+8]
jmp short loc_843FB
loc_843C2:
xor eax, eax
mov [rbx+8], rax
movaps xmm0, [rsp+78h+var_78]
mov qword ptr [rsp+78h+var_78+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+78h+var_78], rax
loc_843D8:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz short loc_843E7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_843E7:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_843F7:
lock inc dword ptr [rax+8]
loc_843FB:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_84478
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84478:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_84487
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84487:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz loc_843D8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_843D8
loc_8449F:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_8435E
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_8435E
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_8452D
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_84519
mov rbx, rax
loc_84519:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_8452D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8452D
mov rbx, rax
loc_8452D:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_8453C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8453C:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
__int128 v8; // xmm0
_QWORD *v10; // r14
__int128 v11; // [rsp+0h] [rbp-78h] BYREF
long long v12; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v13; // [rsp+20h] [rbp-58h]
long long v14; // [rsp+28h] [rbp-50h]
long long *v15; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v16; // [rsp+38h] [rbp-40h]
long long v17; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v18; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v11);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
(long long)"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v15,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v11,
*((long long *)&v11 + 1));
v6 = v16;
if ( v15 != &v17 )
operator delete(v15, v17 + 1);
if ( v6 )
{
v12 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v13 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v14 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v15);
v10 = (_QWORD *)operator new(0x60uLL);
v10[1] = 0x100000001LL;
*v10 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::IfExpr::IfExpr(v10 + 2, &v12, &v15, &v11, &v17);
*(_QWORD *)this = v10 + 2;
*((_QWORD *)this + 1) = v10;
if ( v18 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18);
if ( v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
}
else
{
LABEL_10:
*((_QWORD *)this + 1) = 0LL;
v8 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v11 = 0LL;
}
if ( *((_QWORD *)&v11 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1));
return this;
}
| parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x001856a0
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x001843c2
TEST BPL,BPL
JZ 0x001843c2
LEA RAX,[0x230fa0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0018449f
LAB_0018435e:
LEA RDX,[0x230f80]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00184544
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00184396
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011b8c0
LAB_00184396:
TEST R15,R15
JZ 0x001843c2
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x001843fb
MOV RCX,qword ptr [0x0022ff80]
CMP byte ptr [RCX],0x0
JZ 0x001843f7
INC dword ptr [RAX + 0x8]
JMP 0x001843fb
LAB_001843c2:
XOR EAX,EAX
MOV qword ptr [RBX + 0x8],RAX
MOVAPS XMM0,xmmword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP],RAX
LAB_001843d8:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001843e7
CALL 0x0016d7f6
LAB_001843e7:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001843f7:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001843fb:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_00184408:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0018592e
LAB_00184415:
MOV EDI,0x60
CALL 0x0011b8a0
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x22ea58]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x00198a3e
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x00184478
CALL 0x0016d7f6
LAB_00184478:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00184487
CALL 0x0016d7f6
LAB_00184487:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001843d8
CALL 0x0016d7f6
JMP 0x001843d8
LAB_0018449f:
LEA RDI,[0x230fa0]
CALL 0x0011bff0
TEST EAX,EAX
JZ 0x0018435e
LAB_001844b3:
LEA RDI,[0x230f80]
LEA RSI,[0x1f382f]
MOV EDX,0x10
CALL 0x00162826
LAB_001844cb:
LEA RDI,[0x162b2e]
LEA RSI,[0x230f80]
LEA RDX,[0x2308d8]
CALL 0x0011b7a0
LEA RDI,[0x230fa0]
CALL 0x0011b5a0
JMP 0x0018435e
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001844b3 to 001844ca has its CatchHandler @ 001844f6 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001f382f,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
}
/* try { // try from 0018435e to 00184376 has its CatchHandler @ 0018452a */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022ff80 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 00184408 to 00184414 has its CatchHandler @ 00184516 */
parseIfExpression();
/* try { // try from 00184415 to 0018441e has its CatchHandler @ 00184507 */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_0022ea68;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
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);
}
goto LAB_001843d8;
}
}
p_Var1 = p_Stack_70;
puVar4[1] = 0;
p_Stack_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*puVar4 = local_78;
puVar4[1] = p_Var1;
local_78 = 0;
LAB_001843d8:
if (p_Stack_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
}
return puVar4;
}
| |
34,373 | js_std_loop | bluesky950520[P]quickjs/quickjs-libc.c | JSValue js_std_loop(JSContext *ctx)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSContext *ctx1;
JSValue ret;
int err;
for(;;) {
/* execute the pending jobs */
for(;;) {
err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1);
if (err <= 0) {
if (err < 0) {
ts->exc = JS_GetException(ctx1);
goto done;
}
break;
}
}
if (!ts->can_js_os_poll || js_os_poll(ctx))
break;
}
done:
ret = ts->exc;
ts->exc = JS_UNDEFINED;
return ret;
} | O2 | c | js_std_loop:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x1a185
movq %rax, %rdi
callq 0x1028a
movq %rax, %rbx
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x1a185
movq %rax, %rdi
movq %r15, %rsi
callq 0x17f5a
testl %eax, %eax
jg 0x10531
js 0x10566
cmpl $0x0, 0x60(%rbx)
je 0x1055c
movq %r14, %rdi
callq 0x1058a
testl %eax, %eax
je 0x10531
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rdx
jmp 0x10574
movq 0x8(%rsp), %rdi
callq 0x1c481
movq %rax, 0x50(%rbx)
andl $0x0, 0x50(%rbx)
movq $0x3, 0x58(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| js_std_loop:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdi
call JS_GetRuntime
mov rdi, rax
call js_get_thread_state
mov rbx, rax
lea r15, [rsp+28h+var_20]
loc_10531:
mov rdi, r14
call JS_GetRuntime
mov rdi, rax
mov rsi, r15
call JS_ExecutePendingJob
test eax, eax
jg short loc_10531
js short loc_10566
cmp dword ptr [rbx+60h], 0
jz short loc_1055C
mov rdi, r14
call js_os_poll
test eax, eax
jz short loc_10531
loc_1055C:
mov rax, [rbx+50h]
mov rdx, [rbx+58h]
jmp short loc_10574
loc_10566:
mov rdi, [rsp+28h+var_20]
call JS_GetException
mov [rbx+50h], rax
loc_10574:
and dword ptr [rbx+50h], 0
mov qword ptr [rbx+58h], 3
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long js_std_loop(long long a1, long long a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long thread_state; // rbx
long long Runtime; // rax
int v9; // eax
long long result; // rax
char v11; // [rsp+0h] [rbp-28h]
_QWORD v12[4]; // [rsp+8h] [rbp-20h] BYREF
v2 = ((long long (*)(void))JS_GetRuntime)();
thread_state = js_get_thread_state(v2, a2, v3, v4, v5, v6, v11);
while ( 1 )
{
do
{
Runtime = JS_GetRuntime(a1);
v9 = JS_ExecutePendingJob(Runtime, v12);
}
while ( v9 > 0 );
if ( v9 < 0 )
break;
if ( !*(_DWORD *)(thread_state + 96) || (unsigned int)js_os_poll(a1) )
{
result = *(_QWORD *)(thread_state + 80);
goto LABEL_8;
}
}
result = JS_GetException(v12[0]);
*(_QWORD *)(thread_state + 80) = result;
LABEL_8:
*(_DWORD *)(thread_state + 80) = 0;
*(_QWORD *)(thread_state + 88) = 3LL;
return result;
}
| js_std_loop:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
CALL 0x0011a185
MOV RDI,RAX
CALL 0x0011028a
MOV RBX,RAX
LEA R15,[RSP + 0x8]
LAB_00110531:
MOV RDI,R14
CALL 0x0011a185
MOV RDI,RAX
MOV RSI,R15
CALL 0x00117f5a
TEST EAX,EAX
JG 0x00110531
JS 0x00110566
CMP dword ptr [RBX + 0x60],0x0
JZ 0x0011055c
MOV RDI,R14
CALL 0x0011058a
TEST EAX,EAX
JZ 0x00110531
LAB_0011055c:
MOV RAX,qword ptr [RBX + 0x50]
MOV RDX,qword ptr [RBX + 0x58]
JMP 0x00110574
LAB_00110566:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c481
MOV qword ptr [RBX + 0x50],RAX
LAB_00110574:
AND dword ptr [RBX + 0x50],0x0
MOV qword ptr [RBX + 0x58],0x3
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int8 js_std_loop(int8 param_1)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 local_20;
uVar2 = JS_GetRuntime();
lVar3 = js_get_thread_state(uVar2);
do {
do {
uVar2 = JS_GetRuntime(param_1);
iVar1 = JS_ExecutePendingJob(uVar2,&local_20);
} while (0 < iVar1);
if (iVar1 < 0) {
uVar2 = JS_GetException(local_20);
*(int8 *)(lVar3 + 0x50) = uVar2;
goto LAB_00110574;
}
if (*(int *)(lVar3 + 0x60) == 0) break;
iVar1 = js_os_poll(param_1);
} while (iVar1 == 0);
uVar2 = *(int8 *)(lVar3 + 0x50);
LAB_00110574:
*(int4 *)(lVar3 + 0x50) = 0;
*(int8 *)(lVar3 + 0x58) = 3;
return uVar2;
}
| |
34,374 | MatrixTranspose | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix MatrixTranspose(Matrix mat)
{
Matrix result = { 0 };
result.m0 = mat.m0;
result.m1 = mat.m4;
result.m2 = mat.m8;
result.m3 = mat.m12;
result.m4 = mat.m1;
result.m5 = mat.m5;
result.m6 = mat.m9;
result.m7 = mat.m13;
result.m8 = mat.m2;
result.m9 = mat.m6;
result.m10 = mat.m10;
result.m11 = mat.m14;
result.m12 = mat.m3;
result.m13 = mat.m7;
result.m14 = mat.m11;
result.m15 = mat.m15;
return result;
} | O0 | c | MatrixTranspose:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rdi, %rax
movq %rax, -0x8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
xorl %esi, %esi
movl $0x40, %edx
callq 0xa2d0
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movss (%rcx), %xmm0
movss %xmm0, (%rdi)
movss 0x4(%rcx), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rcx), %xmm0
movss %xmm0, 0x20(%rdi)
movss 0xc(%rcx), %xmm0
movss %xmm0, 0x30(%rdi)
movss 0x10(%rcx), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x14(%rcx), %xmm0
movss %xmm0, 0x14(%rdi)
movss 0x18(%rcx), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x1c(%rcx), %xmm0
movss %xmm0, 0x34(%rdi)
movss 0x20(%rcx), %xmm0
movss %xmm0, 0x8(%rdi)
movss 0x24(%rcx), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x28(%rcx), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x2c(%rcx), %xmm0
movss %xmm0, 0x38(%rdi)
movss 0x30(%rcx), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x34(%rcx), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x38(%rcx), %xmm0
movss %xmm0, 0x2c(%rdi)
movss 0x3c(%rcx), %xmm0
movss %xmm0, 0x3c(%rdi)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| MatrixTranspose:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, rdi
mov [rbp+var_8], rax
lea rax, [rbp+arg_0]
mov [rbp+var_18], rax
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov rcx, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
movss xmm0, dword ptr [rcx]
movss dword ptr [rdi], xmm0
movss xmm0, dword ptr [rcx+4]
movss dword ptr [rdi+10h], xmm0
movss xmm0, dword ptr [rcx+8]
movss dword ptr [rdi+20h], xmm0
movss xmm0, dword ptr [rcx+0Ch]
movss dword ptr [rdi+30h], xmm0
movss xmm0, dword ptr [rcx+10h]
movss dword ptr [rdi+4], xmm0
movss xmm0, dword ptr [rcx+14h]
movss dword ptr [rdi+14h], xmm0
movss xmm0, dword ptr [rcx+18h]
movss dword ptr [rdi+24h], xmm0
movss xmm0, dword ptr [rcx+1Ch]
movss dword ptr [rdi+34h], xmm0
movss xmm0, dword ptr [rcx+20h]
movss dword ptr [rdi+8], xmm0
movss xmm0, dword ptr [rcx+24h]
movss dword ptr [rdi+18h], xmm0
movss xmm0, dword ptr [rcx+28h]
movss dword ptr [rdi+28h], xmm0
movss xmm0, dword ptr [rcx+2Ch]
movss dword ptr [rdi+38h], xmm0
movss xmm0, dword ptr [rcx+30h]
movss dword ptr [rdi+0Ch], xmm0
movss xmm0, dword ptr [rcx+34h]
movss dword ptr [rdi+1Ch], xmm0
movss xmm0, dword ptr [rcx+38h]
movss dword ptr [rdi+2Ch], xmm0
movss xmm0, dword ptr [rcx+3Ch]
movss dword ptr [rdi+3Ch], xmm0
add rsp, 20h
pop rbp
retn
| _DWORD * MatrixTranspose(
_DWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
_DWORD *result; // rax
memset(a1, 0LL, 64LL);
result = a1;
*a1 = a7;
a1[4] = HIDWORD(a7);
a1[8] = a8;
a1[12] = HIDWORD(a8);
a1[1] = a9;
a1[5] = HIDWORD(a9);
a1[9] = a10;
a1[13] = HIDWORD(a10);
a1[2] = a11;
a1[6] = HIDWORD(a11);
a1[10] = a12;
a1[14] = HIDWORD(a12);
a1[3] = a13;
a1[7] = HIDWORD(a13);
a1[11] = a14;
a1[15] = HIDWORD(a14);
return result;
}
| MatrixTranspose:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RAX
XOR ESI,ESI
MOV EDX,0x40
CALL 0x0010a2d0
MOV RCX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RCX]
MOVSS dword ptr [RDI],XMM0
MOVSS XMM0,dword ptr [RCX + 0x4]
MOVSS dword ptr [RDI + 0x10],XMM0
MOVSS XMM0,dword ptr [RCX + 0x8]
MOVSS dword ptr [RDI + 0x20],XMM0
MOVSS XMM0,dword ptr [RCX + 0xc]
MOVSS dword ptr [RDI + 0x30],XMM0
MOVSS XMM0,dword ptr [RCX + 0x10]
MOVSS dword ptr [RDI + 0x4],XMM0
MOVSS XMM0,dword ptr [RCX + 0x14]
MOVSS dword ptr [RDI + 0x14],XMM0
MOVSS XMM0,dword ptr [RCX + 0x18]
MOVSS dword ptr [RDI + 0x24],XMM0
MOVSS XMM0,dword ptr [RCX + 0x1c]
MOVSS dword ptr [RDI + 0x34],XMM0
MOVSS XMM0,dword ptr [RCX + 0x20]
MOVSS dword ptr [RDI + 0x8],XMM0
MOVSS XMM0,dword ptr [RCX + 0x24]
MOVSS dword ptr [RDI + 0x18],XMM0
MOVSS XMM0,dword ptr [RCX + 0x28]
MOVSS dword ptr [RDI + 0x28],XMM0
MOVSS XMM0,dword ptr [RCX + 0x2c]
MOVSS dword ptr [RDI + 0x38],XMM0
MOVSS XMM0,dword ptr [RCX + 0x30]
MOVSS dword ptr [RDI + 0xc],XMM0
MOVSS XMM0,dword ptr [RCX + 0x34]
MOVSS dword ptr [RDI + 0x1c],XMM0
MOVSS XMM0,dword ptr [RCX + 0x38]
MOVSS dword ptr [RDI + 0x2c],XMM0
MOVSS XMM0,dword ptr [RCX + 0x3c]
MOVSS dword ptr [RDI + 0x3c],XMM0
ADD RSP,0x20
POP RBP
RET
|
int4 * MatrixTranspose(int4 *param_1)
{
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int4 uStack0000000000000010;
int4 uStack0000000000000014;
int4 uStack0000000000000018;
int4 uStack000000000000001c;
int4 uStack0000000000000020;
int4 uStack0000000000000024;
int4 uStack0000000000000028;
int4 uStack000000000000002c;
int4 uStack0000000000000030;
int4 uStack0000000000000034;
int4 uStack0000000000000038;
int4 uStack000000000000003c;
int4 uStack0000000000000040;
int4 uStack0000000000000044;
memset(param_1,0,0x40);
*param_1 = uStack0000000000000008;
param_1[4] = uStack000000000000000c;
param_1[8] = uStack0000000000000010;
param_1[0xc] = uStack0000000000000014;
param_1[1] = uStack0000000000000018;
param_1[5] = uStack000000000000001c;
param_1[9] = uStack0000000000000020;
param_1[0xd] = uStack0000000000000024;
param_1[2] = uStack0000000000000028;
param_1[6] = uStack000000000000002c;
param_1[10] = uStack0000000000000030;
param_1[0xe] = uStack0000000000000034;
param_1[3] = uStack0000000000000038;
param_1[7] = uStack000000000000003c;
param_1[0xb] = uStack0000000000000040;
param_1[0xf] = uStack0000000000000044;
return param_1;
}
| |
34,375 | MatrixTranspose | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix MatrixTranspose(Matrix mat)
{
Matrix result = { 0 };
result.m0 = mat.m0;
result.m1 = mat.m4;
result.m2 = mat.m8;
result.m3 = mat.m12;
result.m4 = mat.m1;
result.m5 = mat.m5;
result.m6 = mat.m9;
result.m7 = mat.m13;
result.m8 = mat.m2;
result.m9 = mat.m6;
result.m10 = mat.m10;
result.m11 = mat.m14;
result.m12 = mat.m3;
result.m13 = mat.m7;
result.m14 = mat.m11;
result.m15 = mat.m15;
return result;
} | O1 | c | MatrixTranspose:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movss 0x8(%rsp), %xmm0
movss %xmm0, (%rdi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x20(%rdi)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x30(%rdi)
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x14(%rdi)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x34(%rdi)
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x8(%rdi)
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x34(%rsp), %xmm0
movss %xmm0, 0x38(%rdi)
movss 0x38(%rsp), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x40(%rsp), %xmm0
movss %xmm0, 0x2c(%rdi)
movss 0x44(%rsp), %xmm0
movss %xmm0, 0x3c(%rdi)
retq
| MatrixTranspose:
mov rax, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
movss xmm0, [rsp+arg_0]
movss dword ptr [rdi], xmm0
movss xmm0, [rsp+arg_4]
movss dword ptr [rdi+10h], xmm0
movss xmm0, [rsp+arg_8]
movss dword ptr [rdi+20h], xmm0
movss xmm0, [rsp+arg_C]
movss dword ptr [rdi+30h], xmm0
movss xmm0, [rsp+arg_10]
movss dword ptr [rdi+4], xmm0
movss xmm0, [rsp+arg_14]
movss dword ptr [rdi+14h], xmm0
movss xmm0, [rsp+arg_18]
movss dword ptr [rdi+24h], xmm0
movss xmm0, [rsp+arg_1C]
movss dword ptr [rdi+34h], xmm0
movss xmm0, [rsp+arg_20]
movss dword ptr [rdi+8], xmm0
movss xmm0, [rsp+arg_24]
movss dword ptr [rdi+18h], xmm0
movss xmm0, [rsp+arg_28]
movss dword ptr [rdi+28h], xmm0
movss xmm0, [rsp+arg_2C]
movss dword ptr [rdi+38h], xmm0
movss xmm0, [rsp+arg_30]
movss dword ptr [rdi+0Ch], xmm0
movss xmm0, [rsp+arg_34]
movss dword ptr [rdi+1Ch], xmm0
movss xmm0, [rsp+arg_38]
movss dword ptr [rdi+2Ch], xmm0
movss xmm0, [rsp+arg_3C]
movss dword ptr [rdi+3Ch], xmm0
retn
| long long MatrixTranspose(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long result; // rax
result = a1;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_DWORD *)a1 = a7;
*(_DWORD *)(a1 + 16) = HIDWORD(a7);
*(_DWORD *)(a1 + 32) = a8;
*(_DWORD *)(a1 + 48) = HIDWORD(a8);
*(_DWORD *)(a1 + 4) = a9;
*(_DWORD *)(a1 + 20) = HIDWORD(a9);
*(_DWORD *)(a1 + 36) = a10;
*(_DWORD *)(a1 + 52) = HIDWORD(a10);
*(_DWORD *)(a1 + 8) = a11;
*(_DWORD *)(a1 + 24) = HIDWORD(a11);
*(_DWORD *)(a1 + 40) = a12;
*(_DWORD *)(a1 + 56) = HIDWORD(a12);
*(_DWORD *)(a1 + 12) = a13;
*(_DWORD *)(a1 + 28) = HIDWORD(a13);
*(_DWORD *)(a1 + 44) = a14;
*(_DWORD *)(a1 + 60) = HIDWORD(a14);
return result;
}
| MatrixTranspose:
MOV RAX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RDI],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RDI + 0x10],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RDI + 0x20],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [RDI + 0x30],XMM0
MOVSS XMM0,dword ptr [RSP + 0x18]
MOVSS dword ptr [RDI + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS dword ptr [RDI + 0x14],XMM0
MOVSS XMM0,dword ptr [RSP + 0x20]
MOVSS dword ptr [RDI + 0x24],XMM0
MOVSS XMM0,dword ptr [RSP + 0x24]
MOVSS dword ptr [RDI + 0x34],XMM0
MOVSS XMM0,dword ptr [RSP + 0x28]
MOVSS dword ptr [RDI + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0x2c]
MOVSS dword ptr [RDI + 0x18],XMM0
MOVSS XMM0,dword ptr [RSP + 0x30]
MOVSS dword ptr [RDI + 0x28],XMM0
MOVSS XMM0,dword ptr [RSP + 0x34]
MOVSS dword ptr [RDI + 0x38],XMM0
MOVSS XMM0,dword ptr [RSP + 0x38]
MOVSS dword ptr [RDI + 0xc],XMM0
MOVSS XMM0,dword ptr [RSP + 0x3c]
MOVSS dword ptr [RDI + 0x1c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x40]
MOVSS dword ptr [RDI + 0x2c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x44]
MOVSS dword ptr [RDI + 0x3c],XMM0
RET
|
int8 * MatrixTranspose(int8 *param_1)
{
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int4 uStack0000000000000010;
int4 uStack0000000000000014;
int4 uStack0000000000000018;
int4 uStack000000000000001c;
int4 uStack0000000000000020;
int4 uStack0000000000000024;
int4 uStack0000000000000028;
int4 uStack000000000000002c;
int4 uStack0000000000000030;
int4 uStack0000000000000034;
int4 uStack0000000000000038;
int4 uStack000000000000003c;
int4 uStack0000000000000040;
int4 uStack0000000000000044;
param_1[6] = 0;
param_1[7] = 0;
param_1[4] = 0;
param_1[5] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
*(int4 *)param_1 = uStack0000000000000008;
*(int4 *)(param_1 + 2) = uStack000000000000000c;
*(int4 *)(param_1 + 4) = uStack0000000000000010;
*(int4 *)(param_1 + 6) = uStack0000000000000014;
*(int4 *)((long)param_1 + 4) = uStack0000000000000018;
*(int4 *)((long)param_1 + 0x14) = uStack000000000000001c;
*(int4 *)((long)param_1 + 0x24) = uStack0000000000000020;
*(int4 *)((long)param_1 + 0x34) = uStack0000000000000024;
*(int4 *)(param_1 + 1) = uStack0000000000000028;
*(int4 *)(param_1 + 3) = uStack000000000000002c;
*(int4 *)(param_1 + 5) = uStack0000000000000030;
*(int4 *)(param_1 + 7) = uStack0000000000000034;
*(int4 *)((long)param_1 + 0xc) = uStack0000000000000038;
*(int4 *)((long)param_1 + 0x1c) = uStack000000000000003c;
*(int4 *)((long)param_1 + 0x2c) = uStack0000000000000040;
*(int4 *)((long)param_1 + 0x3c) = uStack0000000000000044;
return param_1;
}
| |
34,376 | MatrixTranspose | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix MatrixTranspose(Matrix mat)
{
Matrix result = { 0 };
result.m0 = mat.m0;
result.m1 = mat.m4;
result.m2 = mat.m8;
result.m3 = mat.m12;
result.m4 = mat.m1;
result.m5 = mat.m5;
result.m6 = mat.m9;
result.m7 = mat.m13;
result.m8 = mat.m2;
result.m9 = mat.m6;
result.m10 = mat.m10;
result.m11 = mat.m14;
result.m12 = mat.m3;
result.m13 = mat.m7;
result.m14 = mat.m11;
result.m15 = mat.m15;
return result;
} | O2 | c | MatrixTranspose:
movq %rdi, %rax
movss 0x8(%rsp), %xmm0
movss %xmm0, (%rdi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x20(%rdi)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x30(%rdi)
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x14(%rdi)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x34(%rdi)
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x8(%rdi)
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x34(%rsp), %xmm0
movss %xmm0, 0x38(%rdi)
movss 0x38(%rsp), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x40(%rsp), %xmm0
movss %xmm0, 0x2c(%rdi)
movss 0x44(%rsp), %xmm0
movss %xmm0, 0x3c(%rdi)
retq
| MatrixTranspose:
mov rax, rdi
movss xmm0, [rsp+arg_0]
movss dword ptr [rdi], xmm0
movss xmm0, [rsp+arg_4]
movss dword ptr [rdi+10h], xmm0
movss xmm0, [rsp+arg_8]
movss dword ptr [rdi+20h], xmm0
movss xmm0, [rsp+arg_C]
movss dword ptr [rdi+30h], xmm0
movss xmm0, [rsp+arg_10]
movss dword ptr [rdi+4], xmm0
movss xmm0, [rsp+arg_14]
movss dword ptr [rdi+14h], xmm0
movss xmm0, [rsp+arg_18]
movss dword ptr [rdi+24h], xmm0
movss xmm0, [rsp+arg_1C]
movss dword ptr [rdi+34h], xmm0
movss xmm0, [rsp+arg_20]
movss dword ptr [rdi+8], xmm0
movss xmm0, [rsp+arg_24]
movss dword ptr [rdi+18h], xmm0
movss xmm0, [rsp+arg_28]
movss dword ptr [rdi+28h], xmm0
movss xmm0, [rsp+arg_2C]
movss dword ptr [rdi+38h], xmm0
movss xmm0, [rsp+arg_30]
movss dword ptr [rdi+0Ch], xmm0
movss xmm0, [rsp+arg_34]
movss dword ptr [rdi+1Ch], xmm0
movss xmm0, [rsp+arg_38]
movss dword ptr [rdi+2Ch], xmm0
movss xmm0, [rsp+arg_3C]
movss dword ptr [rdi+3Ch], xmm0
retn
| _DWORD * MatrixTranspose(
_DWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
_DWORD *result; // rax
result = a1;
*a1 = a7;
a1[4] = HIDWORD(a7);
a1[8] = a8;
a1[12] = HIDWORD(a8);
a1[1] = a9;
a1[5] = HIDWORD(a9);
a1[9] = a10;
a1[13] = HIDWORD(a10);
a1[2] = a11;
a1[6] = HIDWORD(a11);
a1[10] = a12;
a1[14] = HIDWORD(a12);
a1[3] = a13;
a1[7] = HIDWORD(a13);
a1[11] = a14;
a1[15] = HIDWORD(a14);
return result;
}
| MatrixTranspose:
MOV RAX,RDI
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RDI],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RDI + 0x10],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RDI + 0x20],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [RDI + 0x30],XMM0
MOVSS XMM0,dword ptr [RSP + 0x18]
MOVSS dword ptr [RDI + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS dword ptr [RDI + 0x14],XMM0
MOVSS XMM0,dword ptr [RSP + 0x20]
MOVSS dword ptr [RDI + 0x24],XMM0
MOVSS XMM0,dword ptr [RSP + 0x24]
MOVSS dword ptr [RDI + 0x34],XMM0
MOVSS XMM0,dword ptr [RSP + 0x28]
MOVSS dword ptr [RDI + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0x2c]
MOVSS dword ptr [RDI + 0x18],XMM0
MOVSS XMM0,dword ptr [RSP + 0x30]
MOVSS dword ptr [RDI + 0x28],XMM0
MOVSS XMM0,dword ptr [RSP + 0x34]
MOVSS dword ptr [RDI + 0x38],XMM0
MOVSS XMM0,dword ptr [RSP + 0x38]
MOVSS dword ptr [RDI + 0xc],XMM0
MOVSS XMM0,dword ptr [RSP + 0x3c]
MOVSS dword ptr [RDI + 0x1c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x40]
MOVSS dword ptr [RDI + 0x2c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x44]
MOVSS dword ptr [RDI + 0x3c],XMM0
RET
|
int4 * MatrixTranspose(int4 *param_1)
{
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int4 uStack0000000000000010;
int4 uStack0000000000000014;
int4 uStack0000000000000018;
int4 uStack000000000000001c;
int4 uStack0000000000000020;
int4 uStack0000000000000024;
int4 uStack0000000000000028;
int4 uStack000000000000002c;
int4 uStack0000000000000030;
int4 uStack0000000000000034;
int4 uStack0000000000000038;
int4 uStack000000000000003c;
int4 uStack0000000000000040;
int4 uStack0000000000000044;
*param_1 = uStack0000000000000008;
param_1[4] = uStack000000000000000c;
param_1[8] = uStack0000000000000010;
param_1[0xc] = uStack0000000000000014;
param_1[1] = uStack0000000000000018;
param_1[5] = uStack000000000000001c;
param_1[9] = uStack0000000000000020;
param_1[0xd] = uStack0000000000000024;
param_1[2] = uStack0000000000000028;
param_1[6] = uStack000000000000002c;
param_1[10] = uStack0000000000000030;
param_1[0xe] = uStack0000000000000034;
param_1[3] = uStack0000000000000038;
param_1[7] = uStack000000000000003c;
param_1[0xb] = uStack0000000000000040;
param_1[0xf] = uStack0000000000000044;
return param_1;
}
| |
34,377 | void reaction::Log::replace_placeholders<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&) | reaction/include/reaction/log.h | static void replace_placeholders(std::ostringstream &oss, const std::string &str, T &&first, Args &&...rest) {
size_t pos = str.find("{}");
if (pos != std::string::npos) {
oss << str.substr(0, pos);
oss << std::forward<T>(first);
replace_placeholders(oss, str.substr(pos + 2), std::forward<Args>(rest)...);
} else {
oss << str;
}
} | O0 | c | void reaction::Log::replace_placeholders<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xafae(%rip), %rsi # 0x211c4
xorl %eax, %eax
movl %eax, %edx
callq 0x14bd0
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x162fa
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x48(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x14c30
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3170
jmp 0x16264
leaq -0x48(%rbp), %rdi
callq 0x8d30
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3170
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq $0x2, %rdx
leaq -0x78(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movq $-0x1, %rcx
callq 0x14c30
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x14ab0
jmp 0x162c1
leaq -0x78(%rbp), %rdi
callq 0x8d30
jmp 0x16307
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8d30
jmp 0x16310
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x8d30
jmp 0x16310
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3170
addq $0xa0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x32a0
nopl (%rax)
| _ZN8reaction3Log20replace_placeholdersINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS7_EEEvRNS2_19basic_ostringstreamIcS5_S6_EERKS7_OT_DpOT0_:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_10]
lea rsi, aCycleDependenc+38h; "{}"
xor eax, eax
mov edx, eax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
mov [rbp+var_28], rax
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jz loc_162FA
mov rax, [rbp+var_8]
mov [rbp+var_88], rax
mov rsi, [rbp+var_10]
mov rcx, [rbp+var_28]
xor eax, eax
mov edx, eax
lea rdi, [rbp+var_48]
mov [rbp+var_80], rdi
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_16264:
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rax, [rbp+var_8]
mov [rbp+var_98], rax
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_28]
add rdx, 2
lea rdi, [rbp+var_78]
mov [rbp+var_90], rdi
mov rcx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_20]
call _ZN8reaction3Log20replace_placeholdersINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEEvRNS2_19basic_ostringstreamIcS5_S6_EERKS7_OT_DpOT0_; reaction::Log::replace_placeholders<std::string>(std::ostringstream &,std::string const&,std::string &&)
jmp short $+2
loc_162C1:
lea rdi, [rbp+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_16307
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_16310
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_16310
loc_162FA:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
loc_16307:
add rsp, 0A0h
pop rbp
retn
loc_16310:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long reaction::Log::replace_placeholders<std::string,std::string>(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v5; // [rsp+8h] [rbp-98h]
long long v6; // [rsp+18h] [rbp-88h]
_BYTE v7[36]; // [rsp+28h] [rbp-78h] BYREF
_BYTE v8[32]; // [rsp+58h] [rbp-48h] BYREF
long long v9; // [rsp+78h] [rbp-28h]
long long v10; // [rsp+80h] [rbp-20h]
long long v11; // [rsp+88h] [rbp-18h]
long long v12; // [rsp+90h] [rbp-10h]
long long v13; // [rsp+98h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = std::string::find(a2, (long long)"{}", 0LL);
if ( v9 == -1 )
return std::operator<<<char>(v13, v12);
v6 = v13;
std::string::substr((long long)v8, v12, 0LL, v9);
std::operator<<<char>(v6, v8);
std::string::~string((long long)v8);
std::operator<<<char>(v13, v11);
v5 = v13;
std::string::substr((long long)v7, v12, v9 + 2, -1LL);
reaction::Log::replace_placeholders<std::string>(v5, (long long)v7, v10);
return std::string::~string((long long)v7);
}
| replace_placeholders<std::__cxx11::string,std::__cxx11::string>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
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 RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1211c4]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00114bd0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],-0x1
JZ 0x001162fa
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x88],RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
MOV EDX,EAX
LEA RDI,[RBP + -0x48]
MOV qword ptr [RBP + -0x80],RDI
CALL 0x00114c30
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
LAB_0011625d:
CALL 0x00103170
LAB_00116262:
JMP 0x00116264
LAB_00116264:
LEA RDI,[RBP + -0x48]
CALL 0x00108d30
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00103170
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x98],RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
ADD RDX,0x2
LEA RDI,[RBP + -0x78]
MOV qword ptr [RBP + -0x90],RDI
MOV RCX,-0x1
CALL 0x00114c30
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x20]
LAB_001162ba:
CALL 0x00114ab0
LAB_001162bf:
JMP 0x001162c1
LAB_001162c1:
LEA RDI,[RBP + -0x78]
CALL 0x00108d30
JMP 0x00116307
LAB_001162fa:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00103170
LAB_00116307:
ADD RSP,0xa0
POP RBP
RET
|
/* void reaction::Log::replace_placeholders<std::__cxx11::string, std::__cxx11::string
>(std::__cxx11::ostringstream&, std::__cxx11::string const&, std::__cxx11::string&&,
std::__cxx11::string&&) */
void reaction::Log::replace_placeholders<std::__cxx11::string,std::__cxx11::string>
(ostringstream *param_1,string *param_2,string *param_3,string *param_4)
{
ostream *poVar1;
string local_80 [48];
string local_50 [32];
long local_30;
string *local_28;
string *local_20;
string *local_18;
ostream *local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = (ostream *)param_1;
local_30 = std::__cxx11::string::find(param_2,"{}",0);
poVar1 = local_10;
if (local_30 == -1) {
std::operator<<(local_10,local_18);
}
else {
std::__cxx11::string::substr((ulong)local_50,(ulong)local_18);
/* try { // try from 0011625d to 00116261 has its CatchHandler @ 001162cc */
std::operator<<(poVar1,local_50);
std::__cxx11::string::~string(local_50);
std::operator<<(local_10,local_20);
poVar1 = local_10;
std::__cxx11::string::substr((ulong)local_80,(ulong)local_18);
/* try { // try from 001162ba to 001162be has its CatchHandler @ 001162e3 */
replace_placeholders<std::__cxx11::string>((ostringstream *)poVar1,local_80,local_28);
std::__cxx11::string::~string(local_80);
}
return;
}
| |
34,378 | mysql_store_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_store_result,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O0 | c | mysql_store_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 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x44be0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_store_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+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_store_result
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_store_result_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_store_result(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_store_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 + 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 0x00144be0
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_store_result(*param_1);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
34,379 | cs_leave | eloqsql/strings/ctype.c | static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
int rc;
switch(state){
case _CS_COLLATION:
if (i->tailoring_length)
i->cs.tailoring= i->tailoring;
rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK;
break;
/* Rules: Logical Reset Positions */
case _CS_RESET_FIRST_NON_IGNORABLE:
rc= tailoring_append(st, "[first non-ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_NON_IGNORABLE:
rc= tailoring_append(st, "[last non-ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[first primary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[last primary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TRAILING:
rc= tailoring_append(st, "[first trailing]", 0, NULL);
break;
case _CS_RESET_LAST_TRAILING:
rc= tailoring_append(st, "[last trailing]", 0, NULL);
break;
case _CS_RESET_FIRST_VARIABLE:
rc= tailoring_append(st, "[first variable]", 0, NULL);
break;
case _CS_RESET_LAST_VARIABLE:
rc= tailoring_append(st, "[last variable]", 0, NULL);
break;
default:
rc=MY_XML_OK;
}
return rc;
} | O3 | c | cs_leave:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq 0x140(%rdi), %rbx
leaq 0x2b1820(%rip), %r13 # 0x384350
leaq 0xa270(%rip), %r12 # 0xdcda7
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x29190
testl %eax, %eax
jne 0xd2b50
cmpb $0x0, (%r12,%r14)
je 0xd2b6e
movq 0x18(%r13), %r12
addq $0x10, %r13
testq %r12, %r12
jne 0xd2b37
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r13), %ecx
leal -0x191(%rcx), %eax
cmpl $0xb, %eax
ja 0xd2b99
leaq 0x289e98(%rip), %rcx # 0x35ca1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xce57(%rip), %rsi # 0xdf9eb
jmp 0xd2c44
cmpl $0x9, %ecx
jne 0xd2b5d
cmpq $0x0, 0x690(%rbx)
je 0xd2bb6
movq 0x688(%rbx), %rax
movq %rax, 0x718(%rbx)
movq 0x7a8(%rbx), %rax
movq 0xa8(%rax), %rax
testq %rax, %rax
je 0xd2b5d
addq $0x6e0, %rbx # imm = 0x6E0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0xcdec(%rip), %rsi # 0xdf9d6
jmp 0xd2c44
leaq 0xce62(%rip), %rsi # 0xdfa55
jmp 0xd2c44
leaq 0xcec0(%rip), %rsi # 0xdfabc
jmp 0xd2c44
leaq 0xce19(%rip), %rsi # 0xdfa1e
jmp 0xd2c44
leaq 0xce2c(%rip), %rsi # 0xdfa3a
jmp 0xd2c44
leaq 0xce84(%rip), %rsi # 0xdfa9b
jmp 0xd2c44
leaq 0xcde5(%rip), %rsi # 0xdfa05
jmp 0xd2c44
leaq 0xce47(%rip), %rsi # 0xdfa70
jmp 0xd2c44
leaq 0xce58(%rip), %rsi # 0xdfa8a
jmp 0xd2c44
leaq 0xcd85(%rip), %rsi # 0xdf9c0
jmp 0xd2c44
leaq 0xce67(%rip), %rsi # 0xdfaab
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd3494
| cs_leave:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, [rdi+140h]
lea r13, sec
lea r12, aIndexXml+6; "xml"
loc_D2B37:
mov rdi, r15
mov rsi, r12
mov rdx, r14
call _strncmp
test eax, eax
jnz short loc_D2B50
cmp byte ptr [r12+r14], 0
jz short loc_D2B6E
loc_D2B50:
mov r12, [r13+18h]
add r13, 10h
test r12, r12
jnz short loc_D2B37
loc_D2B5D:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D2B6E:
mov ecx, [r13+0]
lea eax, [rcx-191h]; switch 12 cases
cmp eax, 0Bh
ja short def_D2B8B; jumptable 00000000000D2B8B default case
lea rcx, jpt_D2B8B
movsxd rax, ds:(jpt_D2B8B - 35CA1Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D2B8D:
lea rsi, aFirstPrimaryIg; jumptable 00000000000D2B8B case 401
jmp loc_D2C44
def_D2B8B:
cmp ecx, 9; jumptable 00000000000D2B8B default case
jnz short loc_D2B5D
cmp qword ptr [rbx+690h], 0
jz short loc_D2BB6
mov rax, [rbx+688h]
mov [rbx+718h], rax
loc_D2BB6:
mov rax, [rbx+7A8h]
mov rax, [rax+0A8h]
test rax, rax
jz short loc_D2B5D
add rbx, 6E0h
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_D2BE3:
lea rsi, aLastNonIgnorab; jumptable 00000000000D2B8B case 412
jmp short loc_D2C44
loc_D2BEC:
lea rsi, aFirstTertiaryI; jumptable 00000000000D2B8B case 405
jmp short loc_D2C44
loc_D2BF5:
lea rsi, aLastVariable; jumptable 00000000000D2B8B case 410
jmp short loc_D2C44
loc_D2BFE:
lea rsi, aFirstSecondary; jumptable 00000000000D2B8B case 403
jmp short loc_D2C44
loc_D2C07:
lea rsi, aLastSecondaryI; jumptable 00000000000D2B8B case 404
jmp short loc_D2C44
loc_D2C10:
lea rsi, aLastTrailing; jumptable 00000000000D2B8B case 408
jmp short loc_D2C44
loc_D2C19:
lea rsi, aLastPrimaryIgn; jumptable 00000000000D2B8B case 402
jmp short loc_D2C44
loc_D2C22:
lea rsi, aLastTertiaryIg; jumptable 00000000000D2B8B case 406
jmp short loc_D2C44
loc_D2C2B:
lea rsi, aFirstTrailing; jumptable 00000000000D2B8B case 407
jmp short loc_D2C44
loc_D2C34:
lea rsi, aFirstNonIgnora; jumptable 00000000000D2B8B case 411
jmp short loc_D2C44
loc_D2C3D:
lea rsi, aFirstVariable; jumptable 00000000000D2B8B case 409
loc_D2C44:
mov rdi, rbx
xor edx, edx
xor ecx, ecx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp tailoring_append
| long long cs_leave(long long a1, long long a2, long long a3)
{
_QWORD *v4; // rbx
char *v5; // r13
char *v6; // r12
long long result; // rax
long long ( *v8)(_QWORD *); // rax
v4 = *(_QWORD **)(a1 + 320);
v5 = (char *)&sec;
v6 = "xml";
while ( (unsigned int)strncmp(a2, v6, a3) || v6[a3] )
{
v6 = (char *)*((_QWORD *)v5 + 3);
v5 += 16;
if ( !v6 )
return 0LL;
}
switch ( *(_DWORD *)v5 )
{
case 0x191:
result = tailoring_append(v4, "[first primary ignorable]", 0LL, 0LL);
break;
case 0x192:
result = tailoring_append(v4, "[last primary ignorable]", 0LL, 0LL);
break;
case 0x193:
result = tailoring_append(v4, "[first secondary ignorable]", 0LL, 0LL);
break;
case 0x194:
result = tailoring_append(v4, "[last secondary ignorable]", 0LL, 0LL);
break;
case 0x195:
result = tailoring_append(v4, "[first tertiary ignorable]", 0LL, 0LL);
break;
case 0x196:
result = tailoring_append(v4, "[last tertiary ignorable]", 0LL, 0LL);
break;
case 0x197:
result = tailoring_append(v4, "[first trailing]", 0LL, 0LL);
break;
case 0x198:
result = tailoring_append(v4, "[last trailing]", 0LL, 0LL);
break;
case 0x199:
result = tailoring_append(v4, "[first variable]", 0LL, 0LL);
break;
case 0x19A:
result = tailoring_append(v4, "[last variable]", 0LL, 0LL);
break;
case 0x19B:
result = tailoring_append(v4, "[first non-ignorable]", 0LL, 0LL);
break;
case 0x19C:
result = tailoring_append(v4, "[last non-ignorable]", 0LL, 0LL);
break;
default:
if ( *(_DWORD *)v5 != 9 )
return 0LL;
if ( v4[210] )
v4[227] = v4[209];
v8 = *(long long ( **)(_QWORD *))(v4[245] + 168LL);
if ( !v8 )
return 0LL;
result = v8(v4 + 220);
break;
}
return result;
}
| cs_leave:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,qword ptr [RDI + 0x140]
LEA R13,[0x484350]
LEA R12,[0x1dcda7]
LAB_001d2b37:
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
CALL 0x00129190
TEST EAX,EAX
JNZ 0x001d2b50
CMP byte ptr [R12 + R14*0x1],0x0
JZ 0x001d2b6e
LAB_001d2b50:
MOV R12,qword ptr [R13 + 0x18]
ADD R13,0x10
TEST R12,R12
JNZ 0x001d2b37
LAB_001d2b5d:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d2b6e:
MOV ECX,dword ptr [R13]
LEA EAX,[RCX + -0x191]
CMP EAX,0xb
JA 0x001d2b99
LEA RCX,[0x45ca1c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_191:
LEA RSI,[0x1df9eb]
JMP 0x001d2c44
LAB_001d2b99:
CMP ECX,0x9
JNZ 0x001d2b5d
CMP qword ptr [RBX + 0x690],0x0
JZ 0x001d2bb6
MOV RAX,qword ptr [RBX + 0x688]
MOV qword ptr [RBX + 0x718],RAX
LAB_001d2bb6:
MOV RAX,qword ptr [RBX + 0x7a8]
MOV RAX,qword ptr [RAX + 0xa8]
TEST RAX,RAX
JZ 0x001d2b5d
ADD RBX,0x6e0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
caseD_19c:
LEA RSI,[0x1df9d6]
JMP 0x001d2c44
caseD_195:
LEA RSI,[0x1dfa55]
JMP 0x001d2c44
caseD_19a:
LEA RSI,[0x1dfabc]
JMP 0x001d2c44
caseD_193:
LEA RSI,[0x1dfa1e]
JMP 0x001d2c44
caseD_194:
LEA RSI,[0x1dfa3a]
JMP 0x001d2c44
caseD_198:
LEA RSI,[0x1dfa9b]
JMP 0x001d2c44
caseD_192:
LEA RSI,[0x1dfa05]
JMP 0x001d2c44
caseD_196:
LEA RSI,[0x1dfa70]
JMP 0x001d2c44
caseD_197:
LEA RSI,[0x1dfa8a]
JMP 0x001d2c44
caseD_19b:
LEA RSI,[0x1df9c0]
JMP 0x001d2c44
caseD_199:
LEA RSI,[0x1dfaab]
LAB_001d2c44:
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001d3494
|
int8 cs_leave(long param_1,char *param_2,size_t param_3)
{
long lVar1;
code *UNRECOVERED_JUMPTABLE;
int iVar2;
int8 uVar3;
char *pcVar4;
int *piVar5;
lVar1 = *(long *)(param_1 + 0x140);
piVar5 = &sec;
pcVar4 = "xml";
while ((iVar2 = strncmp(param_2,pcVar4,param_3), iVar2 != 0 || (pcVar4[param_3] != '\0'))) {
pcVar4 = *(char **)(piVar5 + 6);
piVar5 = piVar5 + 4;
if (pcVar4 == (char *)0x0) {
return 0;
}
}
switch(*piVar5) {
case 0x191:
pcVar4 = "[first primary ignorable]";
break;
case 0x192:
pcVar4 = "[last primary ignorable]";
break;
case 0x193:
pcVar4 = "[first secondary ignorable]";
break;
case 0x194:
pcVar4 = "[last secondary ignorable]";
break;
case 0x195:
pcVar4 = "[first tertiary ignorable]";
break;
case 0x196:
pcVar4 = "[last tertiary ignorable]";
break;
case 0x197:
pcVar4 = "[first trailing]";
break;
case 0x198:
pcVar4 = "[last trailing]";
break;
case 0x199:
pcVar4 = "[first variable]";
break;
case 0x19a:
pcVar4 = "[last variable]";
break;
case 0x19b:
pcVar4 = "[first non-ignorable]";
break;
case 0x19c:
pcVar4 = "[last non-ignorable]";
break;
default:
if (*piVar5 != 9) {
return 0;
}
if (*(long *)(lVar1 + 0x690) != 0) {
*(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688);
}
UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8);
if (UNRECOVERED_JUMPTABLE == (code *)0x0) {
return 0;
}
/* WARNING: Could not recover jumptable at 0x001d2be1. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(lVar1 + 0x6e0);
return uVar3;
}
uVar3 = tailoring_append(lVar1,pcVar4,0,0);
return uVar3;
}
| |
34,380 | 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool) | hkr04[P]cpp-mcp/common/json.hpp | JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json parse(InputType&& i,
const parser_callback_t cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false)
{
basic_json result;
parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
return result;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool):
subq $0x158, %rsp # imm = 0x158
movq %rdx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, 0x18(%rsp)
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
andb $0x1, %cl
movb %cl, 0x13f(%rsp)
andb $0x1, %al
movb %al, 0x13e(%rsp)
movb $0x0, 0x13d(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x131f0
movq 0x148(%rsp), %rdi
callq 0x304c0
movq %rdx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x238c1
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x304f0
jmp 0x238e6
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movzbl 0x13e(%rsp), %r9d
movzbl 0x13f(%rsp), %r8d
andl $0x1, %r8d
andl $0x1, %r9d
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rcx
callq 0x303e0
jmp 0x2391b
movq 0x10(%rsp), %rdx
leaq 0x70(%rsp), %rdi
movl $0x1, %esi
callq 0x305a0
jmp 0x23931
leaq 0x70(%rsp), %rdi
callq 0x30c80
leaq 0x30(%rsp), %rdi
callq 0x23a10
movb $0x1, 0x13d(%rsp)
testb $0x1, 0x13d(%rsp)
jne 0x239a7
jmp 0x2399d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x239b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x23991
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x30c80
leaq 0x30(%rsp), %rdi
callq 0x23a10
jmp 0x239b4
movq 0x10(%rsp), %rdi
callq 0x87f0
movq 0x18(%rsp), %rax
addq $0x158, %rsp # imm = 0x158
retq
movq 0x10(%rsp), %rdi
callq 0x87f0
movq 0x58(%rsp), %rdi
callq 0x6970
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb:
sub rsp, 158h
mov [rsp+158h+var_150], rdx
mov [rsp+158h+var_148], rdi
mov al, r8b
mov r8, rdi
mov [rsp+158h+var_140], r8
mov [rsp+158h+var_8], rdi
mov [rsp+158h+var_10], rsi
mov [rsp+158h+var_18], rdx
and cl, 1
mov [rsp+158h+var_19], cl
and al, 1
mov [rsp+158h+var_1A], al
mov [rsp+158h+var_1B], 0
xor eax, eax
mov esi, eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr))
mov rdi, [rsp+158h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail13input_adapterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_36container_input_adapter_factory_impl31container_input_adapter_factoryIT_vE12adapter_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::input_adapter<std::string>(std::string const&)
mov [rsp+158h+var_138], rdx
mov [rsp+158h+var_130], rax
jmp short $+2
loc_238C1:
mov rsi, [rsp+158h+var_150]
mov rax, [rsp+158h+var_138]
mov rcx, [rsp+158h+var_130]
mov [rsp+158h+var_F8], rcx
mov [rsp+158h+var_F0], rax
lea rdi, [rsp+158h+var_128]
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
jmp short $+2
loc_238E6:
mov rsi, [rsp+158h+var_F8]
mov rdx, [rsp+158h+var_F0]
movzx r9d, [rsp+158h+var_1A]
movzx r8d, [rsp+158h+var_19]
and r8d, 1
and r9d, 1
lea rdi, [rsp+158h+var_E8]
lea rcx, [rsp+158h+var_128]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
jmp short $+2
loc_2391B:
mov rdx, [rsp+158h+var_148]
lea rdi, [rsp+158h+var_E8]
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&)
jmp short $+2
loc_23931:
lea rdi, [rsp+158h+var_E8]
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser()
lea rdi, [rsp+158h+var_128]
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function()
mov [rsp+158h+var_1B], 1
test [rsp+158h+var_1B], 1
jnz short loc_239A7
jmp short loc_2399D
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_239B4
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_23991
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_68]
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser()
loc_23991:
lea rdi, [rsp+arg_28]
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function()
jmp short loc_239B4
loc_2399D:
mov rdi, [rsp+158h+var_148]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
loc_239A7:
mov rax, [rsp+158h+var_140]
add rsp, 158h
retn
loc_239B4:
mov rdi, [rsp+arg_8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>(
long long a1,
long long a2,
long long a3,
char a4,
char a5)
{
long long v5; // rdx
int v6; // r8d
int v7; // r9d
int v9; // [rsp+8h] [rbp-150h]
_BYTE v10[48]; // [rsp+30h] [rbp-128h] BYREF
long long v11; // [rsp+60h] [rbp-F8h]
long long v12; // [rsp+68h] [rbp-F0h]
_BYTE v13[206]; // [rsp+70h] [rbp-E8h] BYREF
char v14; // [rsp+13Eh] [rbp-1Ah]
char v15; // [rsp+13Fh] [rbp-19h]
long long v16; // [rsp+140h] [rbp-18h]
long long v17; // [rsp+148h] [rbp-10h]
long long v18; // [rsp+150h] [rbp-8h]
v9 = a3;
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4 & 1;
v14 = a5 & 1;
v13[205] = 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>::basic_json(a1);
v11 = nlohmann::json_abi_v3_11_3::detail::input_adapter<std::string>(a2, 0LL);
v12 = v5;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(unsigned int)v10,
v9,
v5,
v11,
v6,
v7);
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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
(unsigned int)v13,
v11,
v12,
(unsigned int)v10,
v15 & 1,
v14 & 1);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(
v13,
1LL,
a1);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser(v13);
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::~function(v10);
return a1;
}
| parse<std::__cxx11::string&>:
SUB RSP,0x158
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV AL,R8B
MOV R8,RDI
MOV qword ptr [RSP + 0x18],R8
MOV qword ptr [RSP + 0x150],RDI
MOV qword ptr [RSP + 0x148],RSI
MOV qword ptr [RSP + 0x140],RDX
AND CL,0x1
MOV byte ptr [RSP + 0x13f],CL
AND AL,0x1
MOV byte ptr [RSP + 0x13e],AL
MOV byte ptr [RSP + 0x13d],0x0
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001131f0
MOV RDI,qword ptr [RSP + 0x148]
LAB_001238b0:
CALL 0x001304c0
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001238c1
LAB_001238c1:
MOV RSI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x68],RAX
LEA RDI,[RSP + 0x30]
CALL 0x001304f0
JMP 0x001238e6
LAB_001238e6:
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOVZX R9D,byte ptr [RSP + 0x13e]
MOVZX R8D,byte ptr [RSP + 0x13f]
LAB_00123902:
AND R8D,0x1
AND R9D,0x1
LEA RDI,[RSP + 0x70]
LEA RCX,[RSP + 0x30]
CALL 0x001303e0
JMP 0x0012391b
LAB_0012391b:
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x70]
MOV ESI,0x1
CALL 0x001305a0
LAB_0012392f:
JMP 0x00123931
LAB_00123931:
LEA RDI,[RSP + 0x70]
CALL 0x00130c80
LEA RDI,[RSP + 0x30]
CALL 0x00123a10
MOV byte ptr [RSP + 0x13d],0x1
TEST byte ptr [RSP + 0x13d],0x1
JNZ 0x001239a7
JMP 0x0012399d
LAB_0012399d:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001087f0
LAB_001239a7:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x158
RET
|
/* WARNING: Removing unreachable block (ram,0x00123957) */
/* 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>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::parse<std::__cxx11::string&>
(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,string *param_1,function *param_3,byte param_4,byte param_5)
{
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
local_128 [48];
int1 local_f8 [16];
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
local_e8 [205];
int1 local_1b;
byte local_1a;
byte local_19;
function *local_18;
string *local_10;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_8;
local_19 = param_4 & 1;
local_1a = param_5 & 1;
local_1b = 0;
local_18 = param_3;
local_10 = param_1;
local_8 = this;
basic_json((_func_decltype_nullptr *)this);
/* try { // try from 001238b0 to 001238e3 has its CatchHandler @ 00123959 */
local_f8 = detail::input_adapter<std::__cxx11::string>(local_10);
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function(local_128,param_3);
/* try { // try from 00123902 to 00123918 has its CatchHandler @ 00123969 */
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(local_e8,local_f8._0_8_,local_f8._8_8_,local_128,local_19 & 1,local_1a & 1);
/* try { // try from 0012391b to 0012392e has its CatchHandler @ 00123979 */
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parse(local_e8,true,(basic_json *)this);
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::~parser(local_e8);
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::~function(local_128);
return this;
}
| |
34,381 | 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool) | hkr04[P]cpp-mcp/common/json.hpp | JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json parse(InputType&& i,
const parser_callback_t cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false)
{
basic_json result;
parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
return result;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
xorl %esi, %esi
callq 0x87e6
movq (%r12), %r15
movq 0x8(%r12), %r12
movq %rsp, %rdi
movq %r13, %rsi
callq 0x11c54
addq %r15, %r12
movzbl %r14b, %r8d
movzbl %bpl, %r9d
leaq 0x20(%rsp), %rdi
movq %rsp, %rcx
movq %r15, %rsi
movq %r12, %rdx
callq 0x11bd4
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rdx
callq 0x11c9a
leaq 0x20(%rsp), %rdi
callq 0x12072
movq %rsp, %rdi
callq 0x18a66
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x12072
jmp 0xe1aa
movq %rax, %r14
movq %rsp, %rdi
callq 0x18a66
jmp 0xe1b7
movq %rax, %r14
movq %rbx, %rdi
callq 0x69d6
movq %r14, %rdi
callq 0x5750
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov ebp, r8d
mov r14d, ecx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr))
mov r15, [r12]
mov r12, [r12+8]
mov rdi, rsp
mov rsi, r13
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
add r12, r15
movzx r8d, r14b
movzx r9d, bpl
lea rdi, [rsp+118h+var_F8]
mov rcx, rsp
mov rsi, r15
mov rdx, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
lea rdi, [rsp+118h+var_F8]
push 1
pop rsi
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&)
lea rdi, [rsp+118h+var_F8]; this
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser()
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rdi, [rsp+arg_18]; this
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser()
jmp short loc_E1AA
mov r14, rax
loc_E1AA:
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_E1B7
mov r14, rax
loc_E1B7:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>(
long long a1,
long long *a2,
long long a3,
unsigned __int8 a4,
unsigned __int8 a5)
{
long long v8; // r15
long long v9; // r12
int v10; // ecx
int v11; // r8d
int v12; // r9d
_DWORD v14[8]; // [rsp+0h] [rbp-118h] BYREF
int v15; // [rsp+20h] [rbp-F8h] BYREF
char v16; // [rsp+28h] [rbp-F0h]
int v17; // [rsp+30h] [rbp-E8h]
int v18; // [rsp+38h] [rbp-E0h]
int v19; // [rsp+40h] [rbp-D8h]
char v20; // [rsp+48h] [rbp-D0h]
int v21; // [rsp+50h] [rbp-C8h]
int v22; // [rsp+58h] [rbp-C0h]
int v23; // [rsp+60h] [rbp-B8h]
char v24; // [rsp+68h] [rbp-B0h]
int v25; // [rsp+70h] [rbp-A8h]
int v26; // [rsp+78h] [rbp-A0h]
int v27; // [rsp+80h] [rbp-98h]
char v28; // [rsp+88h] [rbp-90h]
int v29; // [rsp+90h] [rbp-88h]
int v30; // [rsp+98h] [rbp-80h]
int v31; // [rsp+A0h] [rbp-78h]
int v32; // [rsp+A8h] [rbp-70h]
int v33; // [rsp+B0h] [rbp-68h]
int v34; // [rsp+B8h] [rbp-60h]
int v35; // [rsp+C0h] [rbp-58h]
int v36; // [rsp+C8h] [rbp-50h]
char v37; // [rsp+D0h] [rbp-48h]
int v38; // [rsp+D8h] [rbp-40h]
int v39; // [rsp+E0h] [rbp-38h]
int v40; // [rsp+E8h] [rbp-30h]
int v41; // [rsp+F0h] [rbp-28h]
int v42; // [rsp+F8h] [rbp-20h]
char v43; // [rsp+100h] [rbp-18h]
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>::basic_json(a1);
v8 = *a2;
v9 = a2[1];
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
v14,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
&v15,
v8,
v8 + v9,
v14,
a4,
a5);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(
(unsigned int)&v15,
1,
a1,
v10,
v11,
v12,
v14[0],
v14[2],
v14[4],
v14[6],
v15,
v16,
v17,
v18,
v19,
v20,
v21,
v22,
v23,
v24,
v25,
v26,
v27,
v28,
v29,
v30,
v31,
v32,
v33,
v34,
v35,
v36,
v37,
v38,
v39,
v40,
v41,
v42,
v43);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser((std::_Function_base *)&v15);
std::_Function_base::~_Function_base((std::_Function_base *)v14);
return a1;
}
| parse<std::__cxx11::string&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV EBP,R8D
MOV R14D,ECX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
XOR ESI,ESI
CALL 0x001087e6
MOV R15,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
LAB_0010e138:
MOV RDI,RSP
MOV RSI,R13
CALL 0x00111c54
ADD R12,R15
LAB_0010e146:
MOVZX R8D,R14B
MOVZX R9D,BPL
LEA RDI,[RSP + 0x20]
MOV RCX,RSP
MOV RSI,R15
MOV RDX,R12
CALL 0x00111bd4
LAB_0010e161:
LEA RDI,[RSP + 0x20]
PUSH 0x1
POP RSI
MOV RDX,RBX
CALL 0x00111c9a
LAB_0010e171:
LEA RDI,[RSP + 0x20]
CALL 0x00112072
MOV RDI,RSP
CALL 0x00118a66
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
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> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::parse<std::__cxx11::string&>
(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,long *param_1,function *param_3,int1 param_4,int1 param_5)
{
long lVar1;
long lVar2;
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
afStack_118 [32];
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
local_f8 [200];
basic_json((_func_decltype_nullptr *)this);
lVar1 = *param_1;
lVar2 = param_1[1];
/* try { // try from 0010e138 to 0010e142 has its CatchHandler @ 0010e1b4 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function(afStack_118,param_3);
/* try { // try from 0010e146 to 0010e160 has its CatchHandler @ 0010e1a7 */
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5);
/* try { // try from 0010e161 to 0010e170 has its CatchHandler @ 0010e198 */
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parse(local_f8,true,(basic_json *)this);
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::~parser(local_f8);
std::_Function_base::~_Function_base((_Function_base *)afStack_118);
return this;
}
| |
34,382 | ftxui::TerminalInputParser::ParseCSI() | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp | TerminalInputParser::Output TerminalInputParser::ParseCSI() {
bool altered = false;
int argument = 0;
std::vector<int> arguments;
while (true) {
if (!Eat()) {
return UNCOMPLETED;
}
if (Current() == '<') {
altered = true;
continue;
}
if (Current() >= '0' && Current() <= '9') {
argument *= 10; // NOLINT
argument += Current() - '0';
continue;
}
if (Current() == ';') {
arguments.push_back(argument);
argument = 0;
continue;
}
// CSI is terminated by a character in the range 0x40–0x7E
// (ASCII @A–Z[\]^_`a–z{|}~),
if (Current() >= '@' && Current() <= '~' &&
// Note: I don't remember why we exclude '<'
Current() != '<' &&
// To handle F1-F4, we exclude '['.
Current() != '[') {
arguments.push_back(argument);
argument = 0; // NOLINT
switch (Current()) {
case 'M':
return ParseMouse(altered, true, std::move(arguments));
case 'm':
return ParseMouse(altered, false, std::move(arguments));
case 'R':
return ParseCursorReporting(std::move(arguments));
default:
return SPECIAL;
}
}
// Invalid ESC in CSI.
if (Current() == '\x1B') {
return SPECIAL;
}
}
} | O2 | cpp | ftxui::TerminalInputParser::ParseCSI():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rdi, %rbx
pxor %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movdqa %xmm0, (%r12)
andq $0x0, 0x10(%r12)
xorl %ebp, %ebp
movl 0x18(%r14), %edx
movq 0x10(%r14), %rax
movslq 0x8(%r14), %rcx
incq %rcx
movl %ecx, 0x8(%r14)
cmpl %edx, %ecx
jge 0x2aec3
movb (%rax,%rcx), %sil
cmpb $0x3c, %sil
je 0x2ae51
cmpb $0x30, %sil
jb 0x2ae92
cmpb $0x39, %sil
jbe 0x2ae9d
cmpb $0x3b, %sil
je 0x2aeb0
leal -0x7f(%rsi), %edi
cmpb $-0x3f, %dil
setb %dil
cmpb $0x5b, %sil
sete %sil
orb %dil, %sil
jne 0x2ae51
jmp 0x2aecb
cmpb $0x1b, %sil
jne 0x2ae51
jmp 0x2af34
imull $0xa, %ebp, %edx
movl %edx, 0xc(%rsp)
movzbl (%rax,%rcx), %eax
leal (%rdx,%rax), %ebp
addl $-0x30, %ebp
jmp 0x2aebd
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x18418
movl %ebp, 0xc(%rsp)
jmp 0x2ae45
andl $0x0, (%rbx)
jmp 0x2afd4
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x18418
andl $0x0, 0xc(%rsp)
movslq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x6d, %eax
je 0x2af88
cmpl $0x52, %eax
je 0x2af3f
cmpl $0x4d, %eax
jne 0x2af34
movdqa 0x10(%rsp), %xmm0
leaq 0x60(%rsp), %r14
movdqa %xmm0, (%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%r14)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x2afb8
movl $0x3, (%rbx)
jmp 0x2afd4
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rax, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x20(%rsp), %rdx
movq %rdx, 0x38(%rsp)
andq $0x0, 0x20(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
subq %rax, %rcx
cmpq $0x8, %rcx
jne 0x2afc5
movq (%rax), %xmm0
pshufd $0xe1, %xmm0, %xmm0 # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x4(%rbx)
pushq $0x5
jmp 0x2afc7
movdqa 0x10(%rsp), %xmm0
leaq 0x40(%rsp), %r14
movdqa %xmm0, (%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%r14)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2b052
movq %r14, %rdi
jmp 0x2afcf
pushq $0x3
popq %rax
movl %eax, (%rbx)
leaq 0x28(%rsp), %rdi
callq 0x1b19c
leaq 0x10(%rsp), %rdi
callq 0x1b19c
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2aff3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b19c
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui19TerminalInputParser8ParseCSIEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov r14, rsi
lea r15, [rsp+0A8h+var_9C]
and dword ptr [r15], 0
mov rbx, rdi
pxor xmm0, xmm0
lea r12, [rsp+0A8h+var_98]
movdqa xmmword ptr [r12], xmm0
and qword ptr [r12+10h], 0
xor ebp, ebp
loc_2AE45:
mov edx, [r14+18h]
mov rax, [r14+10h]
movsxd rcx, dword ptr [r14+8]
loc_2AE51:
inc rcx
mov [r14+8], ecx
cmp ecx, edx
jge short loc_2AEC3
mov sil, [rax+rcx]
cmp sil, 3Ch ; '<'
jz short loc_2AE51
cmp sil, 30h ; '0'
jb short loc_2AE92
cmp sil, 39h ; '9'
jbe short loc_2AE9D
cmp sil, 3Bh ; ';'
jz short loc_2AEB0
lea edi, [rsi-7Fh]
cmp dil, 0C1h
setb dil
cmp sil, 5Bh ; '['
setz sil
or sil, dil
jnz short loc_2AE51
jmp short loc_2AECB
loc_2AE92:
cmp sil, 1Bh
jnz short loc_2AE51
jmp loc_2AF34
loc_2AE9D:
imul edx, ebp, 0Ah
mov [rsp+0A8h+var_9C], edx
movzx eax, byte ptr [rax+rcx]
lea ebp, [rdx+rax]
add ebp, 0FFFFFFD0h
jmp short loc_2AEBD
loc_2AEB0:
xor ebp, ebp
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
loc_2AEBD:
mov [rsp+0A8h+var_9C], ebp
jmp short loc_2AE45
loc_2AEC3:
and dword ptr [rbx], 0
jmp loc_2AFD4
loc_2AECB:
lea rdi, [rsp+0A8h+var_98]
lea rsi, [rsp+0A8h+var_9C]
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
and [rsp+0A8h+var_9C], 0
movsxd rax, dword ptr [r14+8]
mov rcx, [r14+10h]
movzx eax, byte ptr [rcx+rax]
cmp eax, 6Dh ; 'm'
jz loc_2AF88
cmp eax, 52h ; 'R'
jz short loc_2AF3F
cmp eax, 4Dh ; 'M'
jnz short loc_2AF34
movdqa xmm0, [rsp+0A8h+var_98]
lea r14, [rsp+0A8h+var_48]
movdqa xmmword ptr [r14], xmm0
mov rax, [rsp+0A8h+var_88]
mov [r14+10h], rax
pxor xmm0, xmm0
movdqa [rsp+0A8h+var_98], xmm0
and [rsp+0A8h+var_88], 0
push 1
pop rcx
mov rdi, rbx
xor edx, edx
jmp loc_2AFB8
loc_2AF34:
mov dword ptr [rbx], 3
jmp loc_2AFD4
loc_2AF3F:
mov rax, qword ptr [rsp+0A8h+var_98]
mov rcx, qword ptr [rsp+0A8h+var_98+8]
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_78], rcx
mov rdx, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_70], rdx
and [rsp+0A8h+var_88], 0
pxor xmm0, xmm0
movdqa [rsp+0A8h+var_98], xmm0
sub rcx, rax
cmp rcx, 8
jnz short loc_2AFC5
movq xmm0, qword ptr [rax]
pshufd xmm0, xmm0, 0E1h
movq qword ptr [rbx+4], xmm0
push 5
jmp short loc_2AFC7
loc_2AF88:
movdqa xmm0, [rsp+0A8h+var_98]
lea r14, [rsp+0A8h+var_68]
movdqa xmmword ptr [r14], xmm0
mov rax, [rsp+0A8h+var_88]
mov [r14+10h], rax
pxor xmm0, xmm0
movdqa [rsp+0A8h+var_98], xmm0
and [rsp+0A8h+var_88], 0
mov rdi, rbx
xor edx, edx
xor ecx, ecx
loc_2AFB8:
mov r8, r14
call _ZN5ftxui19TerminalInputParser10ParseMouseEbbSt6vectorIiSaIiEE; ftxui::TerminalInputParser::ParseMouse(bool,bool,std::vector<int>)
mov rdi, r14
jmp short loc_2AFCF
loc_2AFC5:
push 3
loc_2AFC7:
pop rax
mov [rbx], eax
lea rdi, [rsp+0A8h+var_80]
loc_2AFCF:
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
loc_2AFD4:
lea rdi, [rsp+0A8h+var_98]
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rax, rbx
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_2AFF3:
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
| ftxui::TerminalInputParser * ftxui::TerminalInputParser::ParseCSI(
ftxui::TerminalInputParser *this,
long long a2)
{
int v4; // ebp
int v5; // edx
long long v6; // rax
long long v7; // rcx
unsigned __int8 v8; // si
int v9; // eax
__m128i *v10; // r14
long long v11; // rcx
const __m128i *v12; // rax
__m128i *v13; // rdi
int v15; // [rsp-8h] [rbp-B0h]
int v16; // [rsp+Ch] [rbp-9Ch] BYREF
__m128i v17; // [rsp+10h] [rbp-98h] BYREF
long long v18; // [rsp+20h] [rbp-88h]
__m128i v19; // [rsp+28h] [rbp-80h] BYREF
long long v20; // [rsp+38h] [rbp-70h]
__m128i v21; // [rsp+40h] [rbp-68h] BYREF
long long v22; // [rsp+50h] [rbp-58h]
__m128i v23; // [rsp+60h] [rbp-48h] BYREF
long long v24; // [rsp+70h] [rbp-38h]
v16 = 0;
v17 = 0LL;
v18 = 0LL;
v4 = 0;
LABEL_2:
v5 = *(_DWORD *)(a2 + 24);
v6 = *(_QWORD *)(a2 + 16);
v7 = *(int *)(a2 + 8);
do
{
while ( 1 )
{
do
{
*(_DWORD *)(a2 + 8) = ++v7;
if ( (int)v7 >= v5 )
{
*(_DWORD *)this = 0;
goto LABEL_28;
}
v8 = *(_BYTE *)(v6 + v7);
}
while ( v8 == 60 );
if ( v8 >= 0x30u )
break;
if ( v8 == 27 )
goto LABEL_20;
}
if ( v8 <= 0x39u )
{
v16 = 10 * v4;
v4 = 10 * v4 + *(unsigned __int8 *)(v6 + v7) - 48;
LABEL_14:
v16 = v4;
goto LABEL_2;
}
if ( v8 == 59 )
{
v4 = 0;
std::vector<int>::push_back((long long)&v17, (unsigned int *)&v16);
goto LABEL_14;
}
}
while ( (unsigned __int8)(v8 - 127) < 0xC1u || v8 == 91 );
std::vector<int>::push_back((long long)&v17, (unsigned int *)&v16);
v16 = 0;
v9 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 16) + *(int *)(a2 + 8));
switch ( v9 )
{
case 'm':
v10 = &v21;
v21 = _mm_load_si128(&v17);
v22 = v18;
v17 = 0LL;
v18 = 0LL;
v11 = 0LL;
LABEL_24:
ftxui::TerminalInputParser::ParseMouse(this, &v16, 0LL, v11, v10);
v13 = v10;
goto LABEL_27;
case 'R':
v12 = (const __m128i *)v17.m128i_i64[0];
v19 = v17;
v20 = v18;
v18 = 0LL;
v17 = 0LL;
if ( v19.m128i_i64[1] - v19.m128i_i64[0] == 8 )
{
*(_QWORD *)((char *)this + 4) = _mm_shuffle_epi32(_mm_loadl_epi64(v12), 225).m128i_u64[0];
v15 = 5;
}
else
{
v15 = 3;
}
*(_DWORD *)this = v15;
v13 = &v19;
LABEL_27:
std::_Vector_base<int>::~_Vector_base(v13);
goto LABEL_28;
case 'M':
v10 = &v23;
v23 = _mm_load_si128(&v17);
v24 = v18;
v17 = 0LL;
v18 = 0LL;
v11 = 1LL;
goto LABEL_24;
}
LABEL_20:
*(_DWORD *)this = 3;
LABEL_28:
std::_Vector_base<int>::~_Vector_base(&v17);
return this;
}
| ParseCSI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV R14,RSI
LEA R15,[RSP + 0xc]
AND dword ptr [R15],0x0
MOV RBX,RDI
PXOR XMM0,XMM0
LEA R12,[RSP + 0x10]
MOVDQA xmmword ptr [R12],XMM0
AND qword ptr [R12 + 0x10],0x0
XOR EBP,EBP
LAB_0012ae45:
MOV EDX,dword ptr [R14 + 0x18]
MOV RAX,qword ptr [R14 + 0x10]
MOVSXD RCX,dword ptr [R14 + 0x8]
LAB_0012ae51:
INC RCX
MOV dword ptr [R14 + 0x8],ECX
CMP ECX,EDX
JGE 0x0012aec3
MOV SIL,byte ptr [RAX + RCX*0x1]
CMP SIL,0x3c
JZ 0x0012ae51
CMP SIL,0x30
JC 0x0012ae92
CMP SIL,0x39
JBE 0x0012ae9d
CMP SIL,0x3b
JZ 0x0012aeb0
LEA EDI,[RSI + -0x7f]
CMP DIL,0xc1
SETC DIL
CMP SIL,0x5b
SETZ SIL
OR SIL,DIL
JNZ 0x0012ae51
JMP 0x0012aecb
LAB_0012ae92:
CMP SIL,0x1b
JNZ 0x0012ae51
JMP 0x0012af34
LAB_0012ae9d:
IMUL EDX,EBP,0xa
MOV dword ptr [RSP + 0xc],EDX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
LEA EBP,[RDX + RAX*0x1]
ADD EBP,-0x30
JMP 0x0012aebd
LAB_0012aeb0:
XOR EBP,EBP
LAB_0012aeb2:
MOV RDI,R12
MOV RSI,R15
CALL 0x00118418
LAB_0012aebd:
MOV dword ptr [RSP + 0xc],EBP
JMP 0x0012ae45
LAB_0012aec3:
AND dword ptr [RBX],0x0
JMP 0x0012afd4
LAB_0012aecb:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0xc]
CALL 0x00118418
LAB_0012aeda:
AND dword ptr [RSP + 0xc],0x0
MOVSXD RAX,dword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
MOVZX EAX,byte ptr [RCX + RAX*0x1]
CMP EAX,0x6d
JZ 0x0012af88
CMP EAX,0x52
JZ 0x0012af3f
CMP EAX,0x4d
JNZ 0x0012af34
MOVDQA XMM0,xmmword ptr [RSP + 0x10]
LEA R14,[RSP + 0x60]
MOVDQA xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [R14 + 0x10],RAX
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x10],XMM0
AND qword ptr [RSP + 0x20],0x0
PUSH 0x1
POP RCX
MOV RDI,RBX
XOR EDX,EDX
JMP 0x0012afb8
LAB_0012af34:
MOV dword ptr [RBX],0x3
JMP 0x0012afd4
LAB_0012af3f:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RCX
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RDX
AND qword ptr [RSP + 0x20],0x0
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x10],XMM0
SUB RCX,RAX
CMP RCX,0x8
JNZ 0x0012afc5
MOVQ XMM0,qword ptr [RAX]
PSHUFD XMM0,XMM0,0xe1
MOVQ qword ptr [RBX + 0x4],XMM0
PUSH 0x5
JMP 0x0012afc7
LAB_0012af88:
MOVDQA XMM0,xmmword ptr [RSP + 0x10]
LEA R14,[RSP + 0x40]
MOVDQA xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [R14 + 0x10],RAX
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x10],XMM0
AND qword ptr [RSP + 0x20],0x0
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
LAB_0012afb8:
MOV R8,R14
CALL 0x0012b052
MOV RDI,R14
JMP 0x0012afcf
LAB_0012afc5:
PUSH 0x3
LAB_0012afc7:
POP RAX
MOV dword ptr [RBX],EAX
LEA RDI,[RSP + 0x28]
LAB_0012afcf:
CALL 0x0011b19c
LAB_0012afd4:
LEA RDI,[RSP + 0x10]
CALL 0x0011b19c
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* ftxui::TerminalInputParser::ParseCSI() */
void ftxui::TerminalInputParser::ParseCSI(void)
{
int8 uVar1;
byte bVar2;
char cVar3;
int4 uVar4;
int8 uVar5;
long lVar6;
long in_RSI;
int4 *in_RDI;
_Vector_base<int,std::allocator<int>> *this;
int local_9c;
int1 local_98 [16];
int8 local_88;
int8 *local_80;
long local_78;
int8 local_70;
int8 *local_68;
long lStack_60;
int8 local_58;
int8 *local_48;
long lStack_40;
int8 local_38;
local_9c = 0;
local_98 = (int1 [16])0x0;
local_88 = 0;
LAB_0012ae45:
do {
lVar6 = (long)*(int *)(in_RSI + 8);
LAB_0012ae51:
while( true ) {
do {
lVar6 = lVar6 + 1;
*(int *)(in_RSI + 8) = (int)lVar6;
if (*(int *)(in_RSI + 0x18) <= (int)lVar6) {
*in_RDI = 0;
goto LAB_0012afd4;
}
bVar2 = *(byte *)(*(long *)(in_RSI + 0x10) + lVar6);
} while (bVar2 == 0x3c);
if (0x2f < bVar2) break;
if (bVar2 == 0x1b) {
LAB_0012af34:
*in_RDI = 3;
goto LAB_0012afd4;
}
}
if (bVar2 < 0x3a) {
local_9c = local_9c * 10 + (uint)*(byte *)(*(long *)(in_RSI + 0x10) + lVar6) + -0x30;
goto LAB_0012ae45;
}
if (bVar2 != 0x3b) {
if (bVar2 != 0x5b && 0xc0 < (byte)(bVar2 + 0x81)) {
/* try { // try from 0012aecb to 0012aed9 has its CatchHandler @ 0012aff1 */
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)local_98,&local_9c);
local_9c = 0;
cVar3 = *(char *)(*(long *)(in_RSI + 0x10) + (long)*(int *)(in_RSI + 8));
uVar1 = local_98._0_8_;
uVar5 = local_98._8_8_;
if (cVar3 == 'm') {
this = (_Vector_base<int,std::allocator<int>> *)&local_68;
local_68 = (int8 *)local_98._0_8_;
lStack_60 = local_98._8_8_;
local_58 = local_88;
LAB_0012afb8:
local_88 = 0;
local_98 = (int1 [16])0x0;
ParseMouse();
}
else {
if (cVar3 != 'R') {
if (cVar3 != 'M') goto LAB_0012af34;
this = (_Vector_base<int,std::allocator<int>> *)&local_48;
local_48 = (int8 *)local_98._0_8_;
lStack_40 = local_98._8_8_;
local_38 = local_88;
goto LAB_0012afb8;
}
local_80 = (int8 *)local_98._0_8_;
local_78 = local_98._8_8_;
local_70 = local_88;
local_88 = 0;
local_98 = (int1 [16])0x0;
if (uVar5 - uVar1 == 8) {
uVar1 = *(int8 *)uVar1;
*(ulong *)(in_RDI + 1) = CONCAT44((int)uVar1,(int)((ulong)uVar1 >> 0x20));
uVar4 = 5;
}
else {
uVar4 = 3;
}
*in_RDI = uVar4;
this = (_Vector_base<int,std::allocator<int>> *)&local_80;
}
std::_Vector_base<int,std::allocator<int>>::~_Vector_base(this);
LAB_0012afd4:
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)local_98);
return;
}
goto LAB_0012ae51;
}
/* try { // try from 0012aeb2 to 0012aebc has its CatchHandler @ 0012aff3 */
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)local_98,&local_9c);
local_9c = 0;
} while( true );
}
| |
34,383 | my_coll_lexem_next | eloqsql/strings/ctype-uca.c | static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
} | O3 | c | my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rcx
xorl %r15d, %r15d
cmpq %rcx, %r14
jae 0xdcce1
movzbl (%r14), %edx
cmpl $0xc, %edx
jle 0xdcae9
cmpl $0x1f, %edx
jle 0xdcaf6
cmpl $0x25, %edx
jg 0xdcb0f
cmpl $0x20, %edx
je 0xdcaff
jmp 0xdcc9b
leal -0x9(%rdx), %eax
cmpl $0x2, %eax
jb 0xdcaff
jmp 0xdcc9b
cmpl $0xd, %edx
jne 0xdcc9b
incq %r14
cmpq %rcx, %r14
jne 0xdcacc
movq %rcx, %rax
jmp 0xdcce4
cmpl $0x3c, %edx
jle 0xdcb6c
cmpl $0x5b, %edx
jg 0xdcbcd
cmpl $0x3d, %edx
je 0xdcbe9
cmpl $0x5b, %edx
jne 0xdcc9b
incq %r14
movl $0x6, %r15d
cmpq %rcx, %r14
jae 0xdcce1
movl $0x1, %eax
movzbl (%r14), %edx
cmpl $0x5d, %edx
je 0xdcb59
cmpl $0x5b, %edx
jne 0xdcb62
incq %rax
jmp 0xdcb62
decq %rax
je 0xdccfe
incq %r14
cmpq %rcx, %r14
jb 0xdcb46
jmp 0xdcb07
cmpl $0x26, %edx
je 0xdcc90
cmpl $0x2f, %edx
je 0xdcc85
cmpl $0x3c, %edx
jne 0xdcc9b
incq %r14
movl $0x1, 0x20(%rbx)
movl $0x1, %r15d
cmpq %rcx, %r14
jae 0xdcce1
movl $0x2, %eax
cmpb $0x3c, (%r14)
jne 0xdcce1
leal -0x1(%rax), %edx
cmpl $0x4, %edx
jae 0xdcce1
incq %r14
movl %eax, 0x20(%rbx)
incl %eax
cmpq %rcx, %r14
jb 0xdcba5
jmp 0xdcb07
cmpl $0x5c, %edx
je 0xdcbfe
cmpl $0x7c, %edx
jne 0xdcc9b
incq %r14
movl $0x9, %r15d
jmp 0xdcce1
incq %r14
movl $0x0, 0x20(%rbx)
movl $0x1, %r15d
jmp 0xdcce1
leaq 0x2(%r14), %rax
cmpq %rcx, %rax
jae 0xdccd5
cmpb $0x75, 0x1(%r14)
jne 0xdccd5
leaq 0x344e53(%rip), %rsi # 0x421a70
movq 0x40(%rsi), %rsi
movzbl (%rax), %edi
cmpb $0x0, 0x1(%rsi,%rdi)
jns 0xdccd5
movl $0x0, 0x24(%rbx)
xorl %edx, %edx
movsbl (%rax), %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0xdcc6d
leal -0x61(%rsi), %edi
cmpl $0x5, %edi
ja 0xdcc50
addl $-0x57, %esi
jmp 0xdcc6b
movl $0x5, %r15d
cmpb $0x37, %sil
jl 0xdcce4
leal -0x41(%rsi), %edi
cmpl $0x5, %edi
ja 0xdcce4
addl $-0x37, %esi
movl %esi, %edi
shll $0x4, %edx
addl %edi, %edx
movl %edx, 0x24(%rbx)
incq %rax
movl $0x5, %r15d
cmpq %rcx, %rax
jb 0xdcc38
jmp 0xdcce4
incq %r14
movl $0x8, %r15d
jmp 0xdcce1
incq %r14
movl $0x4, %r15d
jmp 0xdcce1
leal -0x7f(%rdx), %eax
cmpb $-0x5e, %al
jae 0xdccd5
movl $0x6, %r15d
testb %dl, %dl
jns 0xdcce1
leaq 0x344dbd(%rip), %rdi # 0x421a70
movq 0xb8(%rdi), %rax
leaq -0x20(%rbp), %rsi
movq %r14, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0xdcce1
movl %eax, %eax
addq %rax, %r14
movl -0x20(%rbp), %eax
movl %eax, 0x24(%rbx)
jmp 0xdccdb
incq %r14
movl %edx, 0x24(%rbx)
movl $0x5, %r15d
movq %r14, %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
incq %r14
movl $0x7, %r15d
jmp 0xdcce1
| my_coll_lexem_next:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+8]
mov rcx, [rdi+10h]
xor r15d, r15d
cmp r14, rcx
jnb loc_DCCE1
loc_DCACC:
movzx edx, byte ptr [r14]
cmp edx, 0Ch
jle short loc_DCAE9
cmp edx, 1Fh
jle short loc_DCAF6
cmp edx, 25h ; '%'
jg short loc_DCB0F
cmp edx, 20h ; ' '
jz short loc_DCAFF
jmp loc_DCC9B
loc_DCAE9:
lea eax, [rdx-9]
cmp eax, 2
jb short loc_DCAFF
jmp loc_DCC9B
loc_DCAF6:
cmp edx, 0Dh
jnz loc_DCC9B
loc_DCAFF:
inc r14
cmp r14, rcx
jnz short loc_DCACC
loc_DCB07:
mov rax, rcx
jmp loc_DCCE4
loc_DCB0F:
cmp edx, 3Ch ; '<'
jle short loc_DCB6C
cmp edx, 5Bh ; '['
jg loc_DCBCD
cmp edx, 3Dh ; '='
jz loc_DCBE9
cmp edx, 5Bh ; '['
jnz loc_DCC9B
inc r14
mov r15d, 6
cmp r14, rcx
jnb loc_DCCE1
mov eax, 1
loc_DCB46:
movzx edx, byte ptr [r14]
cmp edx, 5Dh ; ']'
jz short loc_DCB59
cmp edx, 5Bh ; '['
jnz short loc_DCB62
inc rax
jmp short loc_DCB62
loc_DCB59:
dec rax
jz loc_DCCFE
loc_DCB62:
inc r14
cmp r14, rcx
jb short loc_DCB46
jmp short loc_DCB07
loc_DCB6C:
cmp edx, 26h ; '&'
jz loc_DCC90
cmp edx, 2Fh ; '/'
jz loc_DCC85
cmp edx, 3Ch ; '<'
jnz loc_DCC9B
inc r14
mov dword ptr [rbx+20h], 1
mov r15d, 1
cmp r14, rcx
jnb loc_DCCE1
mov eax, 2
loc_DCBA5:
cmp byte ptr [r14], 3Ch ; '<'
jnz loc_DCCE1
lea edx, [rax-1]
cmp edx, 4
jnb loc_DCCE1
inc r14
mov [rbx+20h], eax
inc eax
cmp r14, rcx
jb short loc_DCBA5
jmp loc_DCB07
loc_DCBCD:
cmp edx, 5Ch ; '\'
jz short loc_DCBFE
cmp edx, 7Ch ; '|'
jnz loc_DCC9B
inc r14
mov r15d, 9
jmp loc_DCCE1
loc_DCBE9:
inc r14
mov dword ptr [rbx+20h], 0
mov r15d, 1
jmp loc_DCCE1
loc_DCBFE:
lea rax, [r14+2]
cmp rax, rcx
jnb loc_DCCD5
cmp byte ptr [r14+1], 75h ; 'u'
jnz loc_DCCD5
lea rsi, my_charset_utf8mb3_general_ci
mov rsi, [rsi+40h]
movzx edi, byte ptr [rax]
cmp byte ptr [rsi+rdi+1], 0
jns loc_DCCD5
mov dword ptr [rbx+24h], 0
xor edx, edx
loc_DCC38:
movsx esi, byte ptr [rax]
lea edi, [rsi-30h]
cmp edi, 0Ah
jb short loc_DCC6D
lea edi, [rsi-61h]
cmp edi, 5
ja short loc_DCC50
add esi, 0FFFFFFA9h
jmp short loc_DCC6B
loc_DCC50:
mov r15d, 5
cmp sil, 37h ; '7'
jl loc_DCCE4
lea edi, [rsi-41h]
cmp edi, 5
ja short loc_DCCE4
add esi, 0FFFFFFC9h
loc_DCC6B:
mov edi, esi
loc_DCC6D:
shl edx, 4
add edx, edi
mov [rbx+24h], edx
inc rax
mov r15d, 5
cmp rax, rcx
jb short loc_DCC38
jmp short loc_DCCE4
loc_DCC85:
inc r14
mov r15d, 8
jmp short loc_DCCE1
loc_DCC90:
inc r14
mov r15d, 4
jmp short loc_DCCE1
loc_DCC9B:
lea eax, [rdx-7Fh]
cmp al, 0A2h
jnb short loc_DCCD5
mov r15d, 6
test dl, dl
jns short loc_DCCE1
lea rdi, my_charset_utf8mb3_general_ci
mov rax, [rdi+0B8h]
lea rsi, [rbp+var_20]
mov rdx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_DCCE1
mov eax, eax
add r14, rax
mov eax, [rbp+var_20]
mov [rbx+24h], eax
jmp short loc_DCCDB
loc_DCCD5:
inc r14
mov [rbx+24h], edx
loc_DCCDB:
mov r15d, 5
loc_DCCE1:
mov rax, r14
loc_DCCE4:
mov rcx, [rbx+8]
mov [rbx+18h], rcx
mov [rbx+8], rax
mov [rbx], r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_DCCFE:
inc r14
mov r15d, 7
jmp short loc_DCCE1
| unsigned __int8 * my_coll_lexem_next(long long a1)
{
long long v1; // rax
unsigned __int8 *v3; // r14
unsigned long long v4; // rcx
int v5; // r15d
unsigned int v6; // edx
unsigned __int8 *result; // rax
long long v8; // rax
int v9; // edx
int v10; // eax
int v11; // edx
int v12; // esi
int v13; // edi
int v14; // esi
int v15; // eax
_QWORD v16[4]; // [rsp+0h] [rbp-20h] BYREF
v16[0] = v1;
v3 = *(unsigned __int8 **)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
v5 = 0;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
do
{
v6 = *v3;
if ( v6 <= 0xC )
{
if ( v6 - 9 >= 2 )
goto LABEL_52;
}
else
{
if ( *v3 > 0x1Fu )
{
if ( *v3 <= 0x25u )
{
if ( v6 != 32 )
goto LABEL_52;
goto LABEL_10;
}
if ( *v3 <= 0x3Cu )
{
switch ( v6 )
{
case '&':
++v3;
v5 = 4;
goto LABEL_58;
case '/':
++v3;
v5 = 8;
goto LABEL_58;
case '<':
++v3;
*(_DWORD *)(a1 + 32) = 1;
v5 = 1;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v10 = 2;
while ( *v3 == 60 && (unsigned int)(v10 - 1) < 4 )
{
++v3;
*(_DWORD *)(a1 + 32) = v10++;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_11;
}
goto LABEL_58;
}
}
else if ( *v3 > 0x5Bu )
{
if ( v6 == 92 )
{
result = v3 + 2;
if ( (unsigned long long)(v3 + 2) < v4
&& v3[1] == 117
&& *(char *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *result + 1LL) < 0 )
{
*(_DWORD *)(a1 + 36) = 0;
v11 = 0;
while ( 1 )
{
v12 = (char)*result;
v13 = v12 - 48;
if ( (unsigned int)(v12 - 48) >= 0xA )
{
if ( (unsigned int)(v12 - 97) > 5 )
{
v5 = 5;
if ( (char)v12 < 55 || (unsigned int)(v12 - 65) > 5 )
goto LABEL_59;
v14 = v12 - 55;
}
else
{
v14 = v12 - 87;
}
v13 = v14;
}
v11 = v13 + 16 * v11;
*(_DWORD *)(a1 + 36) = v11;
++result;
v5 = 5;
if ( (unsigned long long)result >= v4 )
goto LABEL_59;
}
}
goto LABEL_56;
}
if ( v6 == 124 )
{
++v3;
v5 = 9;
goto LABEL_58;
}
}
else
{
if ( v6 == 61 )
{
++v3;
*(_DWORD *)(a1 + 32) = 0;
v5 = 1;
goto LABEL_58;
}
if ( v6 == 91 )
{
++v3;
v5 = 6;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v8 = 1LL;
while ( 1 )
{
v9 = *v3;
if ( v9 == 93 )
{
if ( !--v8 )
{
++v3;
v5 = 7;
goto LABEL_58;
}
}
else if ( v9 == 91 )
{
++v8;
}
if ( (unsigned long long)++v3 >= v4 )
goto LABEL_11;
}
}
}
LABEL_52:
if ( (unsigned __int8)(v6 - 127) < 0xA2u )
{
v5 = 6;
if ( (v6 & 0x80u) != 0 )
{
v15 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v16,
v3);
if ( v15 > 0 )
{
v3 += (unsigned int)v15;
*(_DWORD *)(a1 + 36) = v16[0];
LABEL_57:
v5 = 5;
}
}
LABEL_58:
result = v3;
goto LABEL_59;
}
LABEL_56:
++v3;
*(_DWORD *)(a1 + 36) = v6;
goto LABEL_57;
}
if ( v6 != 13 )
goto LABEL_52;
}
LABEL_10:
++v3;
}
while ( v3 != (unsigned __int8 *)v4 );
LABEL_11:
result = (unsigned __int8 *)v4;
LABEL_59:
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = result;
*(_DWORD *)a1 = v5;
return result;
}
| my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
XOR R15D,R15D
CMP R14,RCX
JNC 0x001dcce1
LAB_001dcacc:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xc
JLE 0x001dcae9
CMP EDX,0x1f
JLE 0x001dcaf6
CMP EDX,0x25
JG 0x001dcb0f
CMP EDX,0x20
JZ 0x001dcaff
JMP 0x001dcc9b
LAB_001dcae9:
LEA EAX,[RDX + -0x9]
CMP EAX,0x2
JC 0x001dcaff
JMP 0x001dcc9b
LAB_001dcaf6:
CMP EDX,0xd
JNZ 0x001dcc9b
LAB_001dcaff:
INC R14
CMP R14,RCX
JNZ 0x001dcacc
LAB_001dcb07:
MOV RAX,RCX
JMP 0x001dcce4
LAB_001dcb0f:
CMP EDX,0x3c
JLE 0x001dcb6c
CMP EDX,0x5b
JG 0x001dcbcd
CMP EDX,0x3d
JZ 0x001dcbe9
CMP EDX,0x5b
JNZ 0x001dcc9b
INC R14
MOV R15D,0x6
CMP R14,RCX
JNC 0x001dcce1
MOV EAX,0x1
LAB_001dcb46:
MOVZX EDX,byte ptr [R14]
CMP EDX,0x5d
JZ 0x001dcb59
CMP EDX,0x5b
JNZ 0x001dcb62
INC RAX
JMP 0x001dcb62
LAB_001dcb59:
DEC RAX
JZ 0x001dccfe
LAB_001dcb62:
INC R14
CMP R14,RCX
JC 0x001dcb46
JMP 0x001dcb07
LAB_001dcb6c:
CMP EDX,0x26
JZ 0x001dcc90
CMP EDX,0x2f
JZ 0x001dcc85
CMP EDX,0x3c
JNZ 0x001dcc9b
INC R14
MOV dword ptr [RBX + 0x20],0x1
MOV R15D,0x1
CMP R14,RCX
JNC 0x001dcce1
MOV EAX,0x2
LAB_001dcba5:
CMP byte ptr [R14],0x3c
JNZ 0x001dcce1
LEA EDX,[RAX + -0x1]
CMP EDX,0x4
JNC 0x001dcce1
INC R14
MOV dword ptr [RBX + 0x20],EAX
INC EAX
CMP R14,RCX
JC 0x001dcba5
JMP 0x001dcb07
LAB_001dcbcd:
CMP EDX,0x5c
JZ 0x001dcbfe
CMP EDX,0x7c
JNZ 0x001dcc9b
INC R14
MOV R15D,0x9
JMP 0x001dcce1
LAB_001dcbe9:
INC R14
MOV dword ptr [RBX + 0x20],0x0
MOV R15D,0x1
JMP 0x001dcce1
LAB_001dcbfe:
LEA RAX,[R14 + 0x2]
CMP RAX,RCX
JNC 0x001dccd5
CMP byte ptr [R14 + 0x1],0x75
JNZ 0x001dccd5
LEA RSI,[0x521a70]
MOV RSI,qword ptr [RSI + 0x40]
MOVZX EDI,byte ptr [RAX]
CMP byte ptr [RSI + RDI*0x1 + 0x1],0x0
JNS 0x001dccd5
MOV dword ptr [RBX + 0x24],0x0
XOR EDX,EDX
LAB_001dcc38:
MOVSX ESI,byte ptr [RAX]
LEA EDI,[RSI + -0x30]
CMP EDI,0xa
JC 0x001dcc6d
LEA EDI,[RSI + -0x61]
CMP EDI,0x5
JA 0x001dcc50
ADD ESI,-0x57
JMP 0x001dcc6b
LAB_001dcc50:
MOV R15D,0x5
CMP SIL,0x37
JL 0x001dcce4
LEA EDI,[RSI + -0x41]
CMP EDI,0x5
JA 0x001dcce4
ADD ESI,-0x37
LAB_001dcc6b:
MOV EDI,ESI
LAB_001dcc6d:
SHL EDX,0x4
ADD EDX,EDI
MOV dword ptr [RBX + 0x24],EDX
INC RAX
MOV R15D,0x5
CMP RAX,RCX
JC 0x001dcc38
JMP 0x001dcce4
LAB_001dcc85:
INC R14
MOV R15D,0x8
JMP 0x001dcce1
LAB_001dcc90:
INC R14
MOV R15D,0x4
JMP 0x001dcce1
LAB_001dcc9b:
LEA EAX,[RDX + -0x7f]
CMP AL,0xa2
JNC 0x001dccd5
MOV R15D,0x6
TEST DL,DL
JNS 0x001dcce1
LEA RDI,[0x521a70]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[RBP + -0x20]
MOV RDX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001dcce1
MOV EAX,EAX
ADD R14,RAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBX + 0x24],EAX
JMP 0x001dccdb
LAB_001dccd5:
INC R14
MOV dword ptr [RBX + 0x24],EDX
LAB_001dccdb:
MOV R15D,0x5
LAB_001dcce1:
MOV RAX,R14
LAB_001dcce4:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001dccfe:
INC R14
MOV R15D,0x7
JMP 0x001dcce1
|
void my_coll_lexem_next(int4 *param_1)
{
byte bVar1;
byte *pbVar2;
int4 in_EAX;
uint uVar3;
long lVar4;
int iVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
int4 uVar9;
int4 local_28 [2];
pbVar7 = *(byte **)(param_1 + 2);
pbVar2 = *(byte **)(param_1 + 4);
uVar9 = 0;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
do {
bVar1 = *pbVar7;
uVar3 = (uint)bVar1;
if (0xc < bVar1) {
if (bVar1 < 0x20) {
if (uVar3 == 0xd) goto LAB_001dcaff;
LAB_001dcc9b:
if (0xa1 < (byte)(bVar1 + 0x81)) goto LAB_001dccd5;
uVar9 = 6;
pbVar8 = pbVar7;
if ((-1 < (char)bVar1) ||
(local_28[0] = in_EAX,
uVar3 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_28,pbVar7), (int)uVar3 < 1))
break;
pbVar8 = pbVar7 + uVar3;
param_1[9] = local_28[0];
}
else {
if (bVar1 < 0x26) {
if (uVar3 == 0x20) goto LAB_001dcaff;
goto LAB_001dcc9b;
}
if (bVar1 < 0x3d) {
if (uVar3 == 0x26) {
uVar9 = 4;
pbVar8 = pbVar7 + 1;
}
else if (uVar3 == 0x2f) {
uVar9 = 8;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x3c) goto LAB_001dcc9b;
pbVar7 = pbVar7 + 1;
param_1[8] = 1;
uVar9 = 1;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
iVar5 = 2;
goto LAB_001dcba5;
}
}
break;
}
if (bVar1 < 0x5c) {
if (uVar3 == 0x3d) {
param_1[8] = 0;
uVar9 = 1;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x5b) goto LAB_001dcc9b;
pbVar7 = pbVar7 + 1;
uVar9 = 6;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
lVar4 = 1;
goto LAB_001dcb46;
}
}
break;
}
if (uVar3 != 0x5c) {
if (uVar3 != 0x7c) goto LAB_001dcc9b;
uVar9 = 9;
pbVar8 = pbVar7 + 1;
break;
}
pbVar8 = pbVar7 + 2;
if (((pbVar8 < pbVar2) && (pbVar7[1] == 0x75)) &&
(*(char *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*pbVar8) < '\0')) {
param_1[9] = 0;
iVar5 = 0;
goto LAB_001dcc38;
}
LAB_001dccd5:
pbVar8 = pbVar7 + 1;
param_1[9] = uVar3;
}
uVar9 = 5;
break;
}
if (1 < bVar1 - 9) goto LAB_001dcc9b;
LAB_001dcaff:
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 != pbVar2);
}
goto LAB_001dcce4;
while( true ) {
pbVar7 = pbVar7 + 1;
param_1[8] = iVar5;
iVar5 = iVar5 + 1;
pbVar8 = pbVar2;
if (pbVar2 <= pbVar7) break;
LAB_001dcba5:
pbVar8 = pbVar7;
if ((*pbVar7 != 0x3c) || (3 < iVar5 - 1U)) break;
}
goto LAB_001dcce4;
LAB_001dcb46:
do {
if (*pbVar7 == 0x5d) {
lVar4 = lVar4 + -1;
if (lVar4 == 0) {
uVar9 = 7;
pbVar8 = pbVar7 + 1;
break;
}
}
else if (*pbVar7 == 0x5b) {
lVar4 = lVar4 + 1;
}
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 < pbVar2);
goto LAB_001dcce4;
LAB_001dcc38:
do {
iVar6 = (int)(char)*pbVar8;
uVar3 = iVar6 - 0x30;
if (9 < uVar3) {
if (iVar6 - 0x61U < 6) {
uVar3 = iVar6 - 0x57;
}
else {
uVar9 = 5;
if (((char)*pbVar8 < '7') || (5 < iVar6 - 0x41U)) break;
uVar3 = iVar6 - 0x37;
}
}
iVar5 = iVar5 * 0x10 + uVar3;
param_1[9] = iVar5;
pbVar8 = pbVar8 + 1;
uVar9 = 5;
} while (pbVar8 < pbVar2);
LAB_001dcce4:
*(int8 *)(param_1 + 6) = *(int8 *)(param_1 + 2);
*(byte **)(param_1 + 2) = pbVar8;
*param_1 = uVar9;
return;
}
| |
34,384 | list_super_states | qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/engine.c | static uint32_t
list_super_states (const STATEMACHINE_T* statemachine,
const STATEMACHINE_STATE_T *state,
const STATEMACHINE_STATE_T *superstate[], uint32_t count)
{
uint32_t i = 0 ;
if (state) {
superstate[0] = state ;
for (i=1; i<count; i++) {
if (state && (state->super_idx != STATEMACHINE_INVALID_STATE)) {
state = GET_STATEMACHINE_STATE_REF(statemachine, state->super_idx) ;
superstate[i] = state ;
} else {
break ;
}
}
}
return i ;
} | O0 | c | list_super_states:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1525f
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1525d
cmpq $0x0, -0x10(%rbp)
je 0x1524e
movq -0x10(%rbp), %rax
movzwl 0x20(%rax), %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x1524e
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzwl 0x20(%rdx), %edx
movq 0x28(%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x15250
jmp 0x1525d
jmp 0x15252
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x15203
jmp 0x1525f
movl -0x20(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| list_super_states:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], 0
cmp [rbp+var_10], 0
jz short loc_1525F
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_20], 1
loc_15203:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_1C]
jnb short loc_1525D
cmp [rbp+var_10], 0
jz short loc_1524E
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+20h]
cmp eax, 0FFFFh
jz short loc_1524E
mov rax, [rbp+var_8]
mov rcx, [rbp+var_8]
mov rdx, [rbp+var_10]
movzx edx, word ptr [rdx+20h]
mov rcx, [rcx+rdx*8+28h]
add rax, rcx
mov [rbp+var_10], rax
mov rdx, [rbp+var_10]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_20]
mov [rax+rcx*8], rdx
jmp short loc_15250
loc_1524E:
jmp short loc_1525D
loc_15250:
jmp short $+2
loc_15252:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_15203
loc_1525D:
jmp short $+2
loc_1525F:
mov eax, [rbp+var_20]
pop rbp
retn
| long long list_super_states(long long a1, long long a2, _QWORD *a3, unsigned int a4)
{
unsigned int i; // [rsp+0h] [rbp-20h]
long long v6; // [rsp+10h] [rbp-10h]
v6 = a2;
i = 0;
if ( a2 )
{
*a3 = a2;
for ( i = 1; i < a4 && v6 && *(unsigned __int16 *)(v6 + 32) != 0xFFFF; ++i )
{
v6 = *(_QWORD *)(a1 + 8LL * *(unsigned __int16 *)(v6 + 32) + 40) + a1;
a3[i] = v6;
}
}
return i;
}
| list_super_states:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0011525f
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x20],0x1
LAB_00115203:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x1c]
JNC 0x0011525d
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0011524e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x20]
CMP EAX,0xffff
JZ 0x0011524e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOVZX EDX,word ptr [RDX + 0x20]
MOV RCX,qword ptr [RCX + RDX*0x8 + 0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x20]
MOV qword ptr [RAX + RCX*0x8],RDX
JMP 0x00115250
LAB_0011524e:
JMP 0x0011525d
LAB_00115250:
JMP 0x00115252
LAB_00115252:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00115203
LAB_0011525d:
JMP 0x0011525f
LAB_0011525f:
MOV EAX,dword ptr [RBP + -0x20]
POP RBP
RET
|
uint list_super_states(long param_1,long param_2,long *param_3,uint param_4)
{
uint local_28;
long local_18;
local_28 = 0;
if (param_2 != 0) {
*param_3 = param_2;
local_28 = 1;
local_18 = param_2;
while (((local_28 < param_4 && (local_18 != 0)) && (*(short *)(local_18 + 0x20) != -1))) {
local_18 = param_1 + *(long *)(param_1 + 0x28 + (ulong)*(ushort *)(local_18 + 0x20) * 8);
param_3[local_28] = local_18;
local_28 = local_28 + 1;
}
}
return local_28;
}
| |
34,385 | 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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
} | O2 | c | 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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
xorl %r13d, %r13d
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x27000
movq %rax, %r15
leaq 0x8(%rsp), %r12
movsbl %bpl, %eax
movl %eax, 0x4(%rsp)
cmpq $-0x1, %r15
je 0x5d175
movq %r15, %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x26ce0
movq %rbx, %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x621da
incq %r15
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq %r15, %rdx
callq 0x27000
movq %rax, %rbx
movq %r12, %rdi
callq 0x27998
movq %r15, %r13
movq %rbx, %r15
movq %rbp, %rbx
jmp 0x5d125
movq %r13, %rcx
notq %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x26ce0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x62216
leaq 0x8(%rsp), %rdi
callq 0x27998
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rbp
jmp 0x5d1c3
jmp 0x5d1bb
movq %rbx, %rbp
movq %rax, %r14
jmp 0x5d1d0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27998
movq %rbp, %rdi
callq 0x2b0d2
movq %r14, %rdi
callq 0x27660
| _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
xor r13d, r13d
mov rdi, rsi
mov esi, edx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r15, rax
lea r12, [rsp+58h+var_50]
movsx eax, bpl
mov [rsp+58h+var_54], eax
loc_5D125:
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_5D175
mov rcx, r15
sub rcx, r13
mov rdi, r12
mov rsi, r14
mov rdx, r13
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbp, rbx
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
inc r15
mov rdi, r14
mov esi, [rsp+58h+var_54]
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov rbx, rax
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r13, r15
mov r15, rbx
mov rbx, rbp
jmp short loc_5D125
loc_5D175:
mov rcx, r13
not rcx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, r13
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rdi, [rsp+58h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbp, rbx
jmp short loc_5D1C3
jmp short $+2
loc_5D1BB:
mov rbp, rbx
mov r14, rax
jmp short loc_5D1D0
loc_5D1C3:
mov r14, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5D1D0:
mov rdi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long string_split<std::string>(long long a1, long long a2, unsigned int a3)
{
char v3; // bp
long long v4; // rbx
long long v5; // r13
long long v6; // r15
long long v7; // rbp
long long v8; // r15
long long v9; // rbx
unsigned int v11; // [rsp+4h] [rbp-54h]
_BYTE v12[80]; // [rsp+8h] [rbp-50h] BYREF
v3 = a3;
v4 = a1;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v5 = 0LL;
v6 = std::string::find(a2, a3, 0LL);
v11 = v3;
while ( v6 != -1 )
{
std::string::substr(v12, a2, v5, v6 - v5);
v7 = v4;
std::vector<std::string>::emplace_back<std::string&>(v4, v12);
v8 = v6 + 1;
v9 = std::string::find(a2, v11, v8);
std::string::~string(v12);
v5 = v8;
v6 = v9;
v4 = v7;
}
std::string::substr(v12, a2, v5, ~v5);
std::vector<std::string>::emplace_back<std::string>(v4, v12);
std::string::~string(v12);
return v4;
}
| string_split<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
XOR R13D,R13D
MOV RDI,RSI
MOV ESI,EDX
XOR EDX,EDX
CALL 0x00127000
MOV R15,RAX
LEA R12,[RSP + 0x8]
MOVSX EAX,BPL
MOV dword ptr [RSP + 0x4],EAX
LAB_0015d125:
CMP R15,-0x1
JZ 0x0015d175
MOV RCX,R15
SUB RCX,R13
LAB_0015d131:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R13
CALL 0x00126ce0
LAB_0015d13f:
MOV RBP,RBX
MOV RDI,RBX
MOV RSI,R12
CALL 0x001621da
INC R15
MOV RDI,R14
MOV ESI,dword ptr [RSP + 0x4]
MOV RDX,R15
CALL 0x00127000
MOV RBX,RAX
MOV RDI,R12
CALL 0x00127998
MOV R13,R15
MOV R15,RBX
MOV RBX,RBP
JMP 0x0015d125
LAB_0015d175:
MOV RCX,R13
NOT RCX
LAB_0015d17b:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R13
CALL 0x00126ce0
LAB_0015d18b:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00162216
LAB_0015d198:
LEA RDI,[RSP + 0x8]
CALL 0x00127998
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
string * string_split<std::__cxx11::string>(string *param_1,char param_2)
{
long lVar1;
uint in_EDX;
int7 in_register_00000031;
string local_50 [32];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX);
while (lVar1 != -1) {
/* try { // try from 0015d131 to 0015d13e has its CatchHandler @ 0015d1bb */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0015d13f to 0015d14c has its CatchHandler @ 0015d1c3 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50
);
lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX);
std::__cxx11::string::~string(local_50);
}
/* try { // try from 0015d17b to 0015d18a has its CatchHandler @ 0015d1b9 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0015d18b to 0015d197 has its CatchHandler @ 0015d1b4 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50);
std::__cxx11::string::~string(local_50);
return param_1;
}
| |
34,386 | bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)) | nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h | inline bool parse_header(const char *beg, const char *end, T fn) {
// Skip trailing spaces and tabs.
while (beg < end && is_space_or_tab(end[-1])) {
end--;
}
auto p = beg;
while (p < end && *p != ':') {
p++;
}
if (p == end) { return false; }
auto key_end = p;
if (*p++ != ':') { return false; }
while (p < end && is_space_or_tab(*p)) {
p++;
}
if (p < end) {
fn(std::string(beg, key_end), decode_url(std::string(p, end), false));
return true;
}
return false;
} | O1 | c | bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
cmpq %rdi, %r14
jbe 0x1b14d
movzbl -0x1(%r14), %eax
cmpl $0x20, %eax
je 0x1b142
cmpl $0x9, %eax
jne 0x1b14d
decq %r14
cmpq %rsi, %r14
ja 0x1b133
movq %rsi, %r14
movq %rsi, %r15
cmpq %rsi, %r14
jbe 0x1b169
movq %rsi, %r15
cmpb $0x3a, (%r15)
je 0x1b169
incq %r15
cmpq %r14, %r15
jne 0x1b158
movq %r14, %r15
cmpq %r14, %r15
je 0x1b1a9
cmpb $0x3a, (%r15)
sete %al
leaq 0x1(%r15), %rcx
cmpq %r14, %rcx
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b1a9
movq %r14, %rax
subq %r15, %rax
movl $0x1, %r12d
movzbl (%r15,%r12), %ecx
cmpl $0x20, %ecx
je 0x1b1a1
cmpl $0x9, %ecx
jne 0x1b1ba
incq %r12
cmpq %r12, %rax
jne 0x1b192
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x107fc
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
addq %r15, %r12
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x107fc
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x1b28d
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x1b576
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b222
callq 0x8520
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1b231
callq 0x8520
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b240
callq 0x8520
movb $0x1, %al
jmp 0x1b1ab
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b262
callq 0x8520
jmp 0x1b262
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1b276
callq 0x8520
jmp 0x1b276
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1b285
callq 0x8520
movq %rbx, %rdi
callq 0x8990
| _ZN7httplib6detail12parse_headerIZNS0_12read_headersERNS_6StreamERSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_NS0_2ciESaISt4pairIKSA_SA_EEEEUlOSA_SI_E_EEbPKcSL_T_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
cmp r14, rdi
jbe short loc_1B14D
loc_1B133:
movzx eax, byte ptr [r14-1]
cmp eax, 20h ; ' '
jz short loc_1B142
cmp eax, 9
jnz short loc_1B14D
loc_1B142:
dec r14
cmp r14, rsi
ja short loc_1B133
mov r14, rsi
loc_1B14D:
mov r15, rsi
cmp r14, rsi
jbe short loc_1B169
mov r15, rsi
loc_1B158:
cmp byte ptr [r15], 3Ah ; ':'
jz short loc_1B169
inc r15
cmp r15, r14
jnz short loc_1B158
mov r15, r14
loc_1B169:
cmp r15, r14
jz short loc_1B1A9
cmp byte ptr [r15], 3Ah ; ':'
setz al
lea rcx, [r15+1]
cmp rcx, r14
setb cl
and cl, al
cmp cl, 1
jnz short loc_1B1A9
mov rax, r14
sub rax, r15
mov r12d, 1
loc_1B192:
movzx ecx, byte ptr [r15+r12]
cmp ecx, 20h ; ' '
jz short loc_1B1A1
cmp ecx, 9
jnz short loc_1B1BA
loc_1B1A1:
inc r12
cmp rax, r12
jnz short loc_1B192
loc_1B1A9:
xor eax, eax
loc_1B1AB:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1B1BA:
lea r13, [rsp+98h+var_60]
mov [r13-10h], r13
lea rdi, [rsp+98h+var_70]
mov rdx, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rbp, [rsp+98h+var_80]
mov [rbp-10h], rbp
add r12, r15
lea rdi, [rsp+98h+var_90]
mov rsi, r12
mov rdx, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+98h+var_50]
lea rsi, [rsp+98h+var_90]
xor edx, edx
call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool)
lea rsi, [rsp+98h+var_70]
lea rdx, [rsp+98h+var_50]
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN7httplib6detail2ciESaIS8_EE16_M_emplace_equalIJS5_S5_EEESt17_Rb_tree_iteratorIS8_EDpOT_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_emplace_equal<std::string,std::string>(std::string,std::string &&)
lea rax, [rsp+98h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1B222
call __ZdlPv; operator delete(void *)
loc_1B222:
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, rbp
jz short loc_1B231
call __ZdlPv; operator delete(void *)
loc_1B231:
mov rdi, [rsp+98h+var_70]; void *
cmp rdi, r13
jz short loc_1B240
call __ZdlPv; operator delete(void *)
loc_1B240:
mov al, 1
jmp loc_1B1AB
mov rbx, rax
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1B262
call __ZdlPv; operator delete(void *)
jmp short loc_1B262
mov rbx, rax
loc_1B262:
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_1B276
call __ZdlPv; operator delete(void *)
jmp short loc_1B276
mov rbx, rax
loc_1B276:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_1B285
call __ZdlPv; operator delete(void *)
loc_1B285:
mov rdi, rbx
loc_1B288:
call __Unwind_Resume
| char httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}>(
_BYTE *a1,
unsigned long long a2,
long long a3)
{
unsigned long long v4; // r14
int v5; // eax
_BYTE *v6; // r15
long long v7; // r12
int v8; // ecx
int v10; // ecx
int v11; // r8d
int v12; // r9d
void *v13[2]; // [rsp+8h] [rbp-90h] BYREF
_BYTE v14[16]; // [rsp+18h] [rbp-80h] BYREF
void *v15[2]; // [rsp+28h] [rbp-70h] BYREF
_BYTE v16[16]; // [rsp+38h] [rbp-60h] BYREF
void *v17[2]; // [rsp+48h] [rbp-50h] BYREF
char v18; // [rsp+58h] [rbp-40h] BYREF
v4 = a2;
if ( a2 > (unsigned long long)a1 )
{
while ( 1 )
{
v5 = *(unsigned __int8 *)(v4 - 1);
if ( v5 != 32 && v5 != 9 )
break;
if ( --v4 <= (unsigned long long)a1 )
{
v4 = (unsigned long long)a1;
break;
}
}
}
v6 = a1;
if ( v4 > (unsigned long long)a1 )
{
v6 = a1;
while ( *v6 != 58 )
{
if ( ++v6 == (_BYTE *)v4 )
{
v6 = (_BYTE *)v4;
break;
}
}
}
if ( v6 == (_BYTE *)v4 || *v6 != 58 || (unsigned long long)(v6 + 1) >= v4 )
return 0;
v7 = 1LL;
while ( 1 )
{
v8 = (unsigned __int8)v6[v7];
if ( v8 != 32 && v8 != 9 )
break;
if ( v4 - (_QWORD)v6 == ++v7 )
return 0;
}
v15[0] = v16;
std::string::_M_construct<char const*>(v15, a1, (long long)v6);
v13[0] = v14;
std::string::_M_construct<char const*>(v13, &v6[v7], v4);
httplib::detail::decode_url((unsigned int)v17, (unsigned int)v13, 0, v10, v11, v12);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_emplace_equal<std::string,std::string>(
a3,
v15,
v17);
if ( v17[0] != &v18 )
operator delete(v17[0]);
if ( v13[0] != v14 )
operator delete(v13[0]);
if ( v15[0] != v16 )
operator delete(v15[0]);
return 1;
}
| parse_header<httplib::detail::read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::{lambda(std::__cxx11::string&&,std::__cxx11::string&&)#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
CMP R14,RDI
JBE 0x0011b14d
LAB_0011b133:
MOVZX EAX,byte ptr [R14 + -0x1]
CMP EAX,0x20
JZ 0x0011b142
CMP EAX,0x9
JNZ 0x0011b14d
LAB_0011b142:
DEC R14
CMP R14,RSI
JA 0x0011b133
MOV R14,RSI
LAB_0011b14d:
MOV R15,RSI
CMP R14,RSI
JBE 0x0011b169
MOV R15,RSI
LAB_0011b158:
CMP byte ptr [R15],0x3a
JZ 0x0011b169
INC R15
CMP R15,R14
JNZ 0x0011b158
MOV R15,R14
LAB_0011b169:
CMP R15,R14
JZ 0x0011b1a9
CMP byte ptr [R15],0x3a
SETZ AL
LEA RCX,[R15 + 0x1]
CMP RCX,R14
SETC CL
AND CL,AL
CMP CL,0x1
JNZ 0x0011b1a9
MOV RAX,R14
SUB RAX,R15
MOV R12D,0x1
LAB_0011b192:
MOVZX ECX,byte ptr [R15 + R12*0x1]
CMP ECX,0x20
JZ 0x0011b1a1
CMP ECX,0x9
JNZ 0x0011b1ba
LAB_0011b1a1:
INC R12
CMP RAX,R12
JNZ 0x0011b192
LAB_0011b1a9:
XOR EAX,EAX
LAB_0011b1ab:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011b1ba:
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LEA RDI,[RSP + 0x28]
MOV RDX,R15
CALL 0x001107fc
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
ADD R12,R15
LAB_0011b1dc:
LEA RDI,[RSP + 0x8]
MOV RSI,R12
MOV RDX,R14
CALL 0x001107fc
LAB_0011b1ec:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x8]
XOR EDX,EDX
CALL 0x0011b28d
LAB_0011b1fd:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x48]
MOV RDI,RBX
CALL 0x0011b576
LAB_0011b20f:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011b222
CALL 0x00108520
LAB_0011b222:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x0011b231
CALL 0x00108520
LAB_0011b231:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0011b240
CALL 0x00108520
LAB_0011b240:
MOV AL,0x1
JMP 0x0011b1ab
|
/* bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&,
std::multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::ci,
std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > >
>&)::{lambda(std::__cxx11::string&&, std::__cxx11::string&&)#1}>(char const*, char const*,
httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::string,
std::__cxx11::string, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::string const,
std::__cxx11::string > > >&)::{lambda(std::__cxx11::string&&, std::__cxx11::string&&)#1}) */
bool httplib::detail::
parse_header<httplib::detail::read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::_lambda(std::__cxx11::string&&,std::__cxx11::string&&)_1_>
(char *param_1,char *param_2,
_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>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*param_3)
{
long lVar1;
char *pcVar2;
char *pcVar3;
char *pcVar4;
int1 *local_90 [2];
int1 local_80 [16];
int1 *local_70 [2];
int1 local_60 [16];
int1 *local_50 [2];
int1 local_40 [16];
pcVar2 = param_2;
if (param_1 < param_2) {
do {
if ((param_2[-1] != ' ') && (pcVar2 = param_2, param_2[-1] != '\t')) break;
param_2 = param_2 + -1;
pcVar2 = param_1;
} while (param_1 < param_2);
}
pcVar4 = param_1;
pcVar3 = param_1;
if (param_1 < pcVar2) {
do {
pcVar4 = pcVar3;
if (*pcVar3 == ':') break;
pcVar3 = pcVar3 + 1;
pcVar4 = pcVar2;
} while (pcVar3 != pcVar2);
}
if ((pcVar4 != pcVar2) && (pcVar4 + 1 < pcVar2 && *pcVar4 == ':')) {
lVar1 = 1;
do {
if ((pcVar4[lVar1] != ' ') && (pcVar4[lVar1] != '\t')) {
local_70[0] = local_60;
std::__cxx11::string::_M_construct<char_const*>(local_70,param_1,pcVar4);
/* try { // try from 0011b1dc to 0011b1eb has its CatchHandler @ 0011b273 */
local_90[0] = local_80;
std::__cxx11::string::_M_construct<char_const*>(local_90,pcVar4 + lVar1,pcVar2);
/* try { // try from 0011b1ec to 0011b1fc has its CatchHandler @ 0011b25f */
decode_url((string *)local_50,SUB81(local_90,0));
/* try { // try from 0011b1fd to 0011b20e has its CatchHandler @ 0011b247 */
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>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_M_emplace_equal<std::__cxx11::string,std::__cxx11::string>
(param_3,(string *)local_70,(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0]);
}
if (local_70[0] != local_60) {
operator_delete(local_70[0]);
}
return true;
}
lVar1 = lVar1 + 1;
} while ((long)pcVar2 - (long)pcVar4 != lVar1);
}
return false;
}
| |
34,387 | minja::Value::to_bool() const | monkey531[P]llama/common/./minja.hpp | bool to_bool() const {
if (is_null()) return false;
if (is_boolean()) return get<bool>();
if (is_number()) return get<double>() != 0;
if (is_string()) return !get<std::string>().empty();
if (is_array()) return !empty();
return true;
} | O2 | cpp | minja::Value::to_bool() const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x3b982
testb %al, %al
je 0x3c4a9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movb 0x40(%rbx), %al
cmpb $0x4, %al
jne 0x3c4bf
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x3c526
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x3c4e2
movq %rbx, %rdi
callq 0x3c5dc
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rbx
andl $0x1, %ebx
jmp 0x3c49f
cmpb $0x3, %al
jne 0x3c508
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c692
cmpq $0x0, 0x8(%r14)
setne %bl
movq %r14, %rdi
callq 0x22078
jmp 0x3c49f
cmpq $0x0, 0x10(%rbx)
je 0x3c51e
movq %rbx, %rdi
callq 0x3c756
movl %eax, %ebx
xorb $0x1, %bl
jmp 0x3c49f
movb $0x1, %bl
jmp 0x3c49f
nop
| _ZNK5minja5Value7to_boolEv:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jz short loc_3C4A9
xor ebx, ebx
loc_3C49F:
mov eax, ebx
add rsp, 28h
pop rbx
pop r14
retn
loc_3C4A9:
mov al, [rbx+40h]
cmp al, 4
jnz short loc_3C4BF
mov rdi, rbx
add rsp, 28h
pop rbx
pop r14
jmp _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
loc_3C4BF:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_3C4E2
mov rdi, rbx
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorpd xmm1, xmm1
cmpneqsd xmm1, xmm0
movq rbx, xmm1
and ebx, 1
jmp short loc_3C49F
loc_3C4E2:
cmp al, 3
jnz short loc_3C508
lea r14, [rsp+38h+var_30]
mov rdi, r14
mov rsi, rbx
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
cmp qword ptr [r14+8], 0
setnz bl
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3C49F
loc_3C508:
cmp qword ptr [rbx+10h], 0
jz short loc_3C51E
mov rdi, rbx; this
call _ZNK5minja5Value5emptyEv; minja::Value::empty(void)
mov ebx, eax
xor bl, 1
jmp short loc_3C49F
loc_3C51E:
mov bl, 1
jmp loc_3C49F
| long long minja::Value::to_bool(minja::Value *this)
{
unsigned int v1; // ebx
char v3; // al
__m128d v4; // xmm0
_BYTE v5[8]; // [rsp+8h] [rbp-30h] BYREF
long long v6; // [rsp+10h] [rbp-28h]
v1 = (unsigned int)this;
if ( minja::Value::is_null(this) )
return 0;
v3 = *((_BYTE *)this + 64);
if ( v3 != 4 )
{
if ( (unsigned __int8)(v3 - 5) > 2u )
{
if ( v3 == 3 )
{
minja::Value::get<std::string>(v5, this);
LOBYTE(v1) = v6 != 0;
std::string::~string(v5);
}
else if ( *((_QWORD *)this + 2) )
{
v1 = minja::Value::empty(this);
LOBYTE(v1) = v1 ^ 1;
}
else
{
LOBYTE(v1) = 1;
}
}
else
{
v4.m128d_f64[0] = minja::Value::get<double>(this);
return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v4) & 1;
}
return v1;
}
return minja::Value::get<bool>(this);
}
| to_bool:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
CALL 0x0013b982
TEST AL,AL
JZ 0x0013c4a9
XOR EBX,EBX
LAB_0013c49f:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_0013c4a9:
MOV AL,byte ptr [RBX + 0x40]
CMP AL,0x4
JNZ 0x0013c4bf
MOV RDI,RBX
ADD RSP,0x28
POP RBX
POP R14
JMP 0x0013c526
LAB_0013c4bf:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x0013c4e2
MOV RDI,RBX
CALL 0x0013c5dc
XORPD XMM1,XMM1
CMPNEQSD XMM1,XMM0
MOVQ RBX,XMM1
AND EBX,0x1
JMP 0x0013c49f
LAB_0013c4e2:
CMP AL,0x3
JNZ 0x0013c508
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013c692
CMP qword ptr [R14 + 0x8],0x0
SETNZ BL
MOV RDI,R14
CALL 0x00122078
JMP 0x0013c49f
LAB_0013c508:
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0013c51e
MOV RDI,RBX
CALL 0x0013c756
MOV EBX,EAX
XOR BL,0x1
JMP 0x0013c49f
LAB_0013c51e:
MOV BL,0x1
JMP 0x0013c49f
|
/* minja::Value::to_bool() const */
byte __thiscall minja::Value::to_bool(Value *this)
{
Value VVar1;
char cVar2;
bool bVar3;
byte bVar4;
double dVar5;
string local_30 [8];
long local_28;
cVar2 = is_null(this);
if (cVar2 == '\0') {
VVar1 = this[0x40];
if (VVar1 == (Value)0x4) {
bVar3 = get<bool>(this);
return bVar3;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar5 = get<double>(this);
bVar4 = -(dVar5 != 0.0) & 1;
}
else if (VVar1 == (Value)0x3) {
get<std::__cxx11::string>();
bVar4 = local_28 != 0;
std::__cxx11::string::~string(local_30);
}
else if (*(long *)(this + 0x10) == 0) {
bVar4 = 1;
}
else {
bVar4 = empty(this);
bVar4 = bVar4 ^ 1;
}
}
else {
bVar4 = 0;
}
return bVar4;
}
| |
34,388 | ma_clear_session_state | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_clear_session_state(MYSQL *mysql)
{
uint i;
if (!mysql || !mysql->extension)
return;
for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++)
{
list_free(mysql->extension->session_state[i].list, 0);
}
memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES);
} | O3 | c | ma_clear_session_state:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1a4f8
movq %rdi, %rbx
cmpq $0x0, 0x4f0(%rdi)
je 0x1a4f8
movl $0x8, %r14d
movq 0x4f0(%rbx), %rax
movq (%rax,%r14), %rdi
xorl %esi, %esi
callq 0x1cf03
addq $0x10, %r14
cmpq $0x68, %r14
jne 0x1a4ba
movq 0x4f0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| ma_clear_session_state:
push rbp
mov rbp, rsp
push r14
push rbx
test rdi, rdi
jz short loc_1A4F8
mov rbx, rdi
cmp qword ptr [rdi+4F0h], 0
jz short loc_1A4F8
mov r14d, 8
loc_1A4BA:
mov rax, [rbx+4F0h]
mov rdi, [rax+r14]
xor esi, esi
call list_free
add r14, 10h
cmp r14, 68h ; 'h'
jnz short loc_1A4BA
mov rax, [rbx+4F0h]
xorps xmm0, xmm0
movups xmmword ptr [rax+58h], xmm0
movups xmmword ptr [rax+48h], xmm0
movups xmmword ptr [rax+38h], xmm0
movups xmmword ptr [rax+28h], xmm0
movups xmmword ptr [rax+18h], xmm0
movups xmmword ptr [rax+8], xmm0
loc_1A4F8:
pop rbx
pop r14
pop rbp
retn
| long long ma_clear_session_state(long long a1)
{
long long i; // r14
long long result; // rax
if ( a1 && *(_QWORD *)(a1 + 1264) )
{
for ( i = 8LL; i != 104; i += 16LL )
list_free(*(_QWORD *)(*(_QWORD *)(a1 + 1264) + i), 0LL);
result = *(_QWORD *)(a1 + 1264);
*(_OWORD *)(result + 88) = 0LL;
*(_OWORD *)(result + 72) = 0LL;
*(_OWORD *)(result + 56) = 0LL;
*(_OWORD *)(result + 40) = 0LL;
*(_OWORD *)(result + 24) = 0LL;
*(_OWORD *)(result + 8) = 0LL;
}
return result;
}
| ma_clear_session_state:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x0011a4f8
MOV RBX,RDI
CMP qword ptr [RDI + 0x4f0],0x0
JZ 0x0011a4f8
MOV R14D,0x8
LAB_0011a4ba:
MOV RAX,qword ptr [RBX + 0x4f0]
MOV RDI,qword ptr [RAX + R14*0x1]
XOR ESI,ESI
CALL 0x0011cf03
ADD R14,0x10
CMP R14,0x68
JNZ 0x0011a4ba
MOV RAX,qword ptr [RBX + 0x4f0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x58],XMM0
MOVUPS xmmword ptr [RAX + 0x48],XMM0
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOVUPS xmmword ptr [RAX + 0x28],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
LAB_0011a4f8:
POP RBX
POP R14
POP RBP
RET
|
void ma_clear_session_state(long param_1)
{
long lVar1;
if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) {
lVar1 = 8;
do {
list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + lVar1),0);
lVar1 = lVar1 + 0x10;
} while (lVar1 != 0x68);
lVar1 = *(long *)(param_1 + 0x4f0);
*(int8 *)(lVar1 + 0x58) = 0;
*(int8 *)(lVar1 + 0x60) = 0;
*(int8 *)(lVar1 + 0x48) = 0;
*(int8 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x38) = 0;
*(int8 *)(lVar1 + 0x40) = 0;
*(int8 *)(lVar1 + 0x28) = 0;
*(int8 *)(lVar1 + 0x30) = 0;
*(int8 *)(lVar1 + 0x18) = 0;
*(int8 *)(lVar1 + 0x20) = 0;
*(int8 *)(lVar1 + 8) = 0;
*(int8 *)(lVar1 + 0x10) = 0;
}
return;
}
| |
34,389 | LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerRoutingSpacingInfluenceWidth(double width,
double distance,
double spacing)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTINGWIDTH)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile,
(char*) "\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g",
width, distance, spacing);
else
fprintf(lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", width,
distance, spacing);
lefwLines++;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double):
leaq 0x198df(%rip), %rax # 0x24e00
movq (%rax), %rdi
testq %rdi, %rdi
je 0xb554
leaq 0x19b20(%rip), %rcx # 0x25050
movl $0x2, %eax
cmpl $0x20, (%rcx)
jne 0xb577
pushq %rax
cmpb $0x1, 0x19baa(%rip) # 0x250ec
jne 0xb55a
leaq 0xf6fa(%rip), %rsi # 0x1ac45
movb $0x3, %al
callq 0x18c35
jmp 0xb568
movl $0x1, %eax
retq
leaq 0xf716(%rip), %rsi # 0x1ac77
movb $0x3, %al
callq 0x10f0
leaq 0x19add(%rip), %rax # 0x2504c
incl (%rax)
xorl %eax, %eax
addq $0x8, %rsp
retq
| _ZN12LefDefParser37lefwLayerRoutingSpacingInfluenceWidthEddd:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
test rdi, rdi
jz short loc_B554
lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov eax, 2
cmp dword ptr [rcx], 20h ; ' '
jnz short locret_B577
push rax
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_B55A
lea rsi, aWidth11gWithin; "\n WIDTH %.11g WITHIN %.11%.11gSP"...
mov al, 3
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_B568
loc_B554:
mov eax, 1
retn
loc_B55A:
lea rsi, aWidth11gWithin_0; "\n WIDTH %.11g WITHIN %.11g SPACI"...
mov al, 3
call _fprintf
loc_B568:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
add rsp, 8
locret_B577:
retn
| long long LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(
LefDefParser *this,
double a2,
double a3,
double a4,
long long a5,
int a6,
long long a7,
int a8,
int a9)
{
long long result; // rax
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwState == 32 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g",
a6,
(unsigned int)&LefDefParser::lefwState,
a8,
a9);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", a2, a3, a4);
++LefDefParser::lefwLines;
return 0LL;
}
return result;
}
| lefwLayerRoutingSpacingInfluenceWidth:
LEA RAX,[0x124e00]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0010b554
LEA RCX,[0x125050]
MOV EAX,0x2
CMP dword ptr [RCX],0x20
JNZ 0x0010b577
PUSH RAX
CMP byte ptr [0x001250ec],0x1
JNZ 0x0010b55a
LEA RSI,[0x11ac45]
MOV AL,0x3
CALL 0x00118c35
JMP 0x0010b568
LAB_0010b554:
MOV EAX,0x1
RET
LAB_0010b55a:
LEA RSI,[0x11ac77]
MOV AL,0x3
CALL 0x001010f0
LAB_0010b568:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
XOR EAX,EAX
ADD RSP,0x8
LAB_0010b577:
RET
|
/* LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double) */
int8
LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double param_1,double param_2,double param_3)
{
int8 uVar1;
if (lefwFile != (_IO_FILE *)0x0) {
uVar1 = 2;
if (lefwState == 0x20) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g");
}
else {
fprintf(lefwFile,"\n WIDTH %.11g WITHIN %.11g SPACING %.11g");
}
lefwLines = lefwLines + 1;
uVar1 = 0;
}
return uVar1;
}
return 1;
}
| |
34,390 | calc_hashnr | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | static uint calc_hashnr(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) *key++))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
} | O0 | c | calc_hashnr:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x44850
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movzbl (%rcx), %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x44809
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| calc_hashnr:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_44809:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_44850
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
movzx ecx, byte ptr [rcx]
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_44809
loc_44850:
mov eax, [rbp+var_10]
pop rbp
retn
| long long calc_hashnr(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rcx
int i; // [rsp+0h] [rbp-14h]
unsigned int v6; // [rsp+4h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + *v3 * (i + (v6 & 0x3F));
}
return v6;
}
| calc_hashnr:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_00144809:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x00144850
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOVZX ECX,byte ptr [RCX]
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00144809
LAB_00144850:
MOV EAX,dword ptr [RBP + -0x10]
POP RBP
RET
|
uint calc_hashnr(byte *param_1,int param_2)
{
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
local_18 = ((local_18 & 0x3f) + local_1c) * (uint)*local_10 + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
| |
34,391 | minja::Value::contains(minja::Value const&) const | llama.cpp/common/minja/minja.hpp | bool contains(const Value & value) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (const auto& item : *array_) {
if (item.to_bool() && item == value) return true;
}
return false;
} else if (object_) {
if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump());
return object_->find(value.primitive_) != object_->end();
} else {
throw std::runtime_error("contains can only be called on arrays and objects: " + dump());
}
} | O3 | cpp | minja::Value::contains(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r12
testq %r12, %r12
jne 0xbf754
testq %rax, %rax
jne 0xbf754
cmpb $0x0, 0x40(%r15)
jne 0xbf754
cmpq $0x0, 0x30(%r15)
je 0xbf804
testq %rax, %rax
je 0xbf78a
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0xbf786
movq %r14, %rdi
callq 0xbe444
testb %al, %al
je 0xbf780
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbfb30
testb %al, %al
jne 0xbf7f5
addq $0x50, %r14
jmp 0xbf760
xorl %eax, %eax
jmp 0xbf7f7
testq %r12, %r12
je 0xbf836
cmpq $0x0, 0x10(%rbx)
jne 0xbf893
cmpq $0x0, 0x20(%rbx)
jne 0xbf893
cmpq $0x0, 0x30(%rbx)
jne 0xbf893
movq (%r12), %r14
cmpq 0x8(%r12), %r14
je 0xbf7ea
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbbab0
testb %al, %al
jne 0xbf7dd
addq $0x60, %r14
cmpq 0x8(%r12), %r14
jne 0xbf7c3
movq %r14, %rax
movq 0x20(%r15), %rcx
movq 0x8(%rcx), %r14
jmp 0xbf7ed
movq %r14, %rax
cmpq %r14, %rax
setne %al
jmp 0xbf7f7
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
leaq 0x61e75(%rip), %rsi # 0x12168d
movq %rax, %rdi
callq 0x21400
movq 0xa5799(%rip), %rsi # 0x164fc0
movq 0xa574a(%rip), %rdx # 0x164f78
movq %r14, %rdi
callq 0x21a50
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb571c
leaq 0x61e82(%rip), %rsi # 0x1216de
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaefbc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0xa573e(%rip), %rsi # 0x164fc0
movq 0xa56ef(%rip), %rdx # 0x164f78
movq %r14, %rdi
callq 0x21a50
jmp 0xbf8ee
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb571c
leaq 0x61e14(%rip), %rsi # 0x1216cd
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaefbc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0xa56e1(%rip), %rsi # 0x164fc0
movq 0xa5692(%rip), %rdx # 0x164f78
movq %r14, %rdi
callq 0x21a50
jmp 0xbf8f2
jmp 0xbf932
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf910
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf92b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xbf959
jmp 0xbf961
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf959
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xbf959
jmp 0xbf956
jmp 0xbf956
movq %rax, %rbx
movq %r14, %rdi
callq 0x21ef0
movq %rbx, %rdi
callq 0x21af0
nop
| _ZNK5minja5Value8containsERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rsi
mov r15, rdi
mov rax, [rdi+10h]
mov r12, [rdi+20h]
test r12, r12
jnz short loc_BF754
test rax, rax
jnz short loc_BF754
cmp byte ptr [r15+40h], 0
jnz short loc_BF754
cmp qword ptr [r15+30h], 0
jz loc_BF804
loc_BF754:
test rax, rax
jz short loc_BF78A
mov r14, [rax]
mov r15, [rax+8]
loc_BF760:
cmp r14, r15
jz short loc_BF786
mov rdi, r14; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
test al, al
jz short loc_BF780
mov rdi, r14
mov rsi, rbx
call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&)
test al, al
jnz short loc_BF7F5
loc_BF780:
add r14, 50h ; 'P'
jmp short loc_BF760
loc_BF786:
xor eax, eax
jmp short loc_BF7F7
loc_BF78A:
test r12, r12
jz loc_BF836
cmp qword ptr [rbx+10h], 0
jnz loc_BF893
cmp qword ptr [rbx+20h], 0
jnz loc_BF893
cmp qword ptr [rbx+30h], 0
jnz loc_BF893
mov r14, [r12]
cmp r14, [r12+8]
jz short loc_BF7EA
add rbx, 40h ; '@'
loc_BF7C3:
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_BF7DD
add r14, 60h ; '`'
cmp r14, [r12+8]
jnz short loc_BF7C3
loc_BF7DD:
mov rax, r14
mov rcx, [r15+20h]
mov r14, [rcx+8]
jmp short loc_BF7ED
loc_BF7EA:
mov rax, r14
loc_BF7ED:
cmp rax, r14
setnz al
jmp short loc_BF7F7
loc_BF7F5:
mov al, 1
loc_BF7F7:
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_BF804:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_BF836:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContainsCanOnl; "contains can only be called on arrays a"...
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_BF8EE
loc_BF893:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_BF8EE:
jmp short loc_BF8F2
jmp short loc_BF932
loc_BF8F2:
mov rbx, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF910
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF910:
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF92B
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF92B:
test bpl, bpl
jnz short loc_BF959
jmp short loc_BF961
loc_BF932:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF959
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF959
jmp short loc_BF956
jmp short $+2
loc_BF956:
mov rbx, rax
loc_BF959:
mov rdi, r14; void *
call ___cxa_free_exception
loc_BF961:
mov rdi, rbx
call __Unwind_Resume
| bool minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3)
{
minja::Value **v3; // rax
unsigned __int8 **v4; // r12
minja::Value *v5; // r14
minja::Value *v6; // r15
unsigned __int8 *v8; // r14
unsigned __int8 *v9; // rax
std::runtime_error *exception; // r14
void *v11; // r14
void *v12; // r14
_BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
v3 = (minja::Value **)*((_QWORD *)this + 2);
v4 = (unsigned __int8 **)*((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = *v3;
v6 = v3[1];
while ( 1 )
{
if ( v5 == v6 )
return 0;
if ( (unsigned __int8)minja::Value::to_bool(v5) && (unsigned __int8)minja::Value::operator==(v5, a2) )
break;
v5 = (minja::Value *)((char *)v5 + 80);
}
return 1;
}
else
{
if ( !v4 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13);
std::runtime_error::runtime_error(v11, v14);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
v12 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"Unashable type: ", (long long)v13);
std::runtime_error::runtime_error(v12, v14);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8 = *v4;
if ( *v4 == v4[1] )
{
v9 = *v4;
}
else
{
do
{
if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v8, (unsigned __int8 *)a2 + 64, a3) )
break;
v8 += 96;
}
while ( v8 != v4[1] );
v9 = v8;
v8 = *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL);
}
return v9 != v8;
}
}
| contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV R12,qword ptr [RDI + 0x20]
TEST R12,R12
JNZ 0x001bf754
TEST RAX,RAX
JNZ 0x001bf754
CMP byte ptr [R15 + 0x40],0x0
JNZ 0x001bf754
CMP qword ptr [R15 + 0x30],0x0
JZ 0x001bf804
LAB_001bf754:
TEST RAX,RAX
JZ 0x001bf78a
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001bf760:
CMP R14,R15
JZ 0x001bf786
MOV RDI,R14
CALL 0x001be444
TEST AL,AL
JZ 0x001bf780
MOV RDI,R14
MOV RSI,RBX
CALL 0x001bfb30
TEST AL,AL
JNZ 0x001bf7f5
LAB_001bf780:
ADD R14,0x50
JMP 0x001bf760
LAB_001bf786:
XOR EAX,EAX
JMP 0x001bf7f7
LAB_001bf78a:
TEST R12,R12
JZ 0x001bf836
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001bf893
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001bf893
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001bf893
MOV R14,qword ptr [R12]
CMP R14,qword ptr [R12 + 0x8]
JZ 0x001bf7ea
ADD RBX,0x40
LAB_001bf7c3:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001bbab0
TEST AL,AL
JNZ 0x001bf7dd
ADD R14,0x60
CMP R14,qword ptr [R12 + 0x8]
JNZ 0x001bf7c3
LAB_001bf7dd:
MOV RAX,R14
MOV RCX,qword ptr [R15 + 0x20]
MOV R14,qword ptr [RCX + 0x8]
JMP 0x001bf7ed
LAB_001bf7ea:
MOV RAX,R14
LAB_001bf7ed:
CMP RAX,R14
SETNZ AL
JMP 0x001bf7f7
LAB_001bf7f5:
MOV AL,0x1
LAB_001bf7f7:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001bf804:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001bf811:
LEA RSI,[0x22168d]
MOV RDI,RAX
CALL 0x00121400
LAB_001bf820:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R14
CALL 0x00121a50
LAB_001bf836:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001bf843:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b571c
LAB_001bf855:
LEA RSI,[0x2216de]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aefbc
MOV BPL,0x1
LAB_001bf86c:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R14
CALL 0x00121a50
LAB_001bf893:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001bf8a0:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b571c
LAB_001bf8b2:
LEA RSI,[0x2216cd]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aefbc
MOV BPL,0x1
LAB_001bf8c9:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R14
CALL 0x00121a50
|
/* minja::Value::contains(minja::Value const&) const */
bool __thiscall minja::Value::contains(Value *this,Value *param_1)
{
int8 *puVar1;
long *plVar2;
Value *pVVar3;
char cVar4;
runtime_error *prVar5;
Value *this_00;
basic_json *pbVar6;
basic_json *pbVar7;
bool bVar8;
int1 auStack_68 [32];
string local_48 [32];
puVar1 = *(int8 **)(this + 0x10);
plVar2 = *(long **)(this + 0x20);
if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bf811 to 001bf81f has its CatchHandler @ 001bf956 */
std::runtime_error::runtime_error(prVar5,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
if (puVar1 == (int8 *)0x0) {
if (plVar2 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bf843 to 001bf854 has its CatchHandler @ 001bf954 */
dump_abi_cxx11_((int)auStack_68,SUB81(this,0));
/* try { // try from 001bf855 to 001bf868 has its CatchHandler @ 001bf932 */
std::operator+((char *)local_48,
(string *)"contains can only be called on arrays and objects: ");
/* try { // try from 001bf86c to 001bf890 has its CatchHandler @ 001bf8f2 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) ||
(*(long *)(param_1 + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bf8a0 to 001bf8b1 has its CatchHandler @ 001bf952 */
dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0));
/* try { // try from 001bf8b2 to 001bf8c5 has its CatchHandler @ 001bf8f0 */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 001bf8c9 to 001bf8ed has its CatchHandler @ 001bf8ee */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
pbVar6 = (basic_json *)*plVar2;
pbVar7 = pbVar6;
if (pbVar6 != (basic_json *)plVar2[1]) {
do {
cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar6,(basic_json *)(param_1 + 0x40));
if (cVar4 != '\0') break;
pbVar6 = pbVar6 + 0x60;
} while (pbVar6 != (basic_json *)plVar2[1]);
pbVar7 = *(basic_json **)(*(long *)(this + 0x20) + 8);
}
bVar8 = pbVar6 != pbVar7;
}
else {
pVVar3 = (Value *)puVar1[1];
for (this_00 = (Value *)*puVar1; this_00 != pVVar3; this_00 = this_00 + 0x50) {
cVar4 = to_bool(this_00);
if ((cVar4 != '\0') && (cVar4 = operator==(this_00,param_1), cVar4 != '\0')) {
return true;
}
}
bVar8 = false;
}
return bVar8;
}
| |
34,392 | common_sampler_print[abi:cxx11](common_sampler const*) | monkey531[P]llama/common/sampling.cpp | std::string common_sampler_print(const struct common_sampler * gsmpl) {
std::string result = "logits ";
for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) {
const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i);
result += std::string("-> ") + llama_sampler_name(smpl) + " ";
}
return result;
} | O1 | cpp | common_sampler_print[abi:cxx11](common_sampler const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0x22cb8(%rip), %rsi # 0xf246e
leaq 0x22cb8(%rip), %rdx # 0xf2475
movq %rdi, 0x10(%rsp)
callq 0x2337c
leaq 0x48(%rsp), %rbx
xorl %ebp, %ebp
leaq 0x28(%rsp), %r12
leaq 0x58(%rsp), %r13
movq 0x140(%r14), %rdi
callq 0x1bfa0
cmpl %eax, %ebp
jge 0xcf92a
movq 0x140(%r14), %rdi
movl %ebp, %esi
callq 0x1b9d0
movq %rax, %r15
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r13, %rdi
leaq 0x293c7(%rip), %rsi # 0xf8bd8
leaq 0x293c3(%rip), %rdx # 0xf8bdb
callq 0x2337c
movq %r15, %rdi
callq 0x1b370
movq %r13, %rdi
movq %rax, %rsi
callq 0x1c100
movq %rbx, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcf853
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0xcf859
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rdi
leaq 0x23410(%rip), %rsi # 0xf2c8d
callq 0x1c100
movq %r12, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcf8a5
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0xcf8ad
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rdi
callq 0x1b270
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0xcf8f0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcf907
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xcf923
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1b8f0
incl %ebp
jmp 0xcf7d8
movq 0x10(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcf97a
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0xcf95f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xcf95f
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcf982
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xcf982
jmp 0xcf97a
movq %rax, %r14
jmp 0xcf99e
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xcf99e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rdi
cmpq %rax, %rdi
je 0xcf9bb
movq (%rax), %rsi
incq %rsi
callq 0x1b8f0
movq %r14, %rdi
callq 0x1bfb0
| _Z20common_sampler_printB5cxx11PK14common_sampler:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rsi
lea rax, [rdi+10h]
mov [rsp+0A8h+var_A0], rax
mov [rdi], rax
lea rsi, aLogits+2; "logits "
lea rdx, aLogits+9; ""
mov [rsp+0A8h+var_98], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rbx, [rsp+0A8h+var_60]
xor ebp, ebp
lea r12, [rsp+0A8h+var_80]
lea r13, [rsp+0A8h+var_50]
loc_CF7D8:
mov rdi, [r14+140h]
call _llama_sampler_chain_n
cmp ebp, eax
jge loc_CF92A
mov rdi, [r14+140h]
mov esi, ebp
call _llama_sampler_chain_get
mov r15, rax
lea rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_50], rax
mov rdi, r13
lea rsi, asc_F8BD8; "-> "
lea rdx, asc_F8BD8+3; ""
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 rdi, r15
call _llama_sampler_name
mov rdi, r13
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+0A8h+var_70], rbx
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_CF853
mov [rsp+0A8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_60], rdx
jmp short loc_CF859
loc_CF853:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbx], xmm0
loc_CF859:
mov rdx, [rax+8]
mov [rsp+0A8h+var_68], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0A8h+var_70]
lea rsi, aForMessageInMe+144h; " "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+0A8h+var_90], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_CF8A5
mov [rsp+0A8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_80], rdx
jmp short loc_CF8AD
loc_CF8A5:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_CF8AD:
mov rdx, [rax+8]
mov [rsp+0A8h+var_88], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [rsp+0A8h+var_90]
mov rdx, [rsp+0A8h+var_88]
mov rdi, [rsp+0A8h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0A8h+var_90]; void *
cmp rdi, r12
jz short loc_CF8F0
mov rsi, [rsp+0A8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF8F0:
mov rdi, [rsp+0A8h+var_70]; void *
cmp rdi, rbx
jz short loc_CF907
mov rsi, [rsp+0A8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF907:
mov rdi, [rsp+0A8h+var_50]; void *
lea rax, [rsp+0A8h+var_40]
cmp rdi, rax
jz short loc_CF923
mov rsi, [rsp+0A8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF923:
inc ebp
jmp loc_CF7D8
loc_CF92A:
mov rax, [rsp+0A8h+var_98]
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_CF97A
mov r14, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r12
jz short loc_CF95F
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF95F
mov r14, rax
loc_CF95F:
mov rdi, [rsp+arg_30]; void *
cmp rdi, rbx
jz short loc_CF982
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF982
jmp short $+2
loc_CF97A:
mov r14, rax
jmp short loc_CF99E
mov r14, rax
loc_CF982:
mov rdi, [rsp+arg_50]; void *
lea rax, [rsp+arg_60]
cmp rdi, rax
jz short loc_CF99E
mov rsi, [rsp+arg_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF99E:
mov rax, [rsp+arg_0]
mov rcx, [rsp+arg_8]
mov rdi, [rcx]; void *
cmp rdi, rax
jz short loc_CF9BB
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF9BB:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2)
{
int i; // ebp
long long v3; // r15
long long v4; // rax
long long v5; // rax
__int128 *v6; // rcx
long long v7; // rax
__int128 *v8; // rcx
__int128 *v10; // [rsp+18h] [rbp-90h]
long long v11; // [rsp+20h] [rbp-88h]
__int128 v12; // [rsp+28h] [rbp-80h] BYREF
void *v13[2]; // [rsp+38h] [rbp-70h] BYREF
__int128 v14; // [rsp+48h] [rbp-60h] BYREF
void *v15[2]; // [rsp+58h] [rbp-50h] BYREF
_QWORD v16[8]; // [rsp+68h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "logits ", (long long)"");
for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i )
{
v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i);
v15[0] = v16;
std::string::_M_construct<char const*>(v15, "-> ", (long long)"");
v4 = llama_sampler_name(v3);
v5 = std::string::append(v15, v4);
v13[0] = &v14;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v14 = *v6;
}
else
{
v13[0] = *(void **)v5;
*(_QWORD *)&v14 = *(_QWORD *)v6;
}
v13[1] = *(void **)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
v7 = std::string::append(v13, " ");
v10 = &v12;
v8 = (__int128 *)(v7 + 16);
if ( *(_QWORD *)v7 == v7 + 16 )
{
v12 = *v8;
}
else
{
v10 = *(__int128 **)v7;
*(_QWORD *)&v12 = *(_QWORD *)v8;
}
v11 = *(_QWORD *)(v7 + 8);
*(_QWORD *)v7 = v8;
*(_QWORD *)(v7 + 8) = 0LL;
*(_BYTE *)(v7 + 16) = 0;
std::string::_M_append(a1, v10, v11);
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
}
return a1;
}
| common_sampler_print[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
LEA RSI,[0x1f246e]
LEA RDX,[0x1f2475]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0012337c
LEA RBX,[RSP + 0x48]
XOR EBP,EBP
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x58]
LAB_001cf7d8:
MOV RDI,qword ptr [R14 + 0x140]
LAB_001cf7df:
CALL 0x0011bfa0
CMP EBP,EAX
JGE 0x001cf92a
MOV RDI,qword ptr [R14 + 0x140]
LAB_001cf7f3:
MOV ESI,EBP
CALL 0x0011b9d0
MOV R15,RAX
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP + 0x58],RAX
LAB_001cf807:
MOV RDI,R13
LEA RSI,[0x1f8bd8]
LEA RDX,[0x1f8bdb]
CALL 0x0012337c
LAB_001cf81d:
MOV RDI,R15
CALL 0x0011b370
MOV RDI,R13
MOV RSI,RAX
CALL 0x0011c100
MOV qword ptr [RSP + 0x38],RBX
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001cf853
MOV qword ptr [RSP + 0x38],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x48],RDX
JMP 0x001cf859
LAB_001cf853:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBX],XMM0
LAB_001cf859:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001cf871:
LEA RDI,[RSP + 0x38]
LEA RSI,[0x1f2c8d]
CALL 0x0011c100
MOV qword ptr [RSP + 0x18],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001cf8a5
MOV qword ptr [RSP + 0x18],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x28],RDX
JMP 0x001cf8ad
LAB_001cf8a5:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_001cf8ad:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_001cf8cf:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011b270
LAB_001cf8d9:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R12
JZ 0x001cf8f0
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8f0
LAB_001cf8f0:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,RBX
JZ 0x001cf907
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011b8f0
LAB_001cf907:
MOV RDI,qword ptr [RSP + 0x58]
LEA RAX,[RSP + 0x68]
CMP RDI,RAX
JZ 0x001cf923
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x0011b8f0
LAB_001cf923:
INC EBP
JMP 0x001cf7d8
LAB_001cf92a:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_sampler_print[abi:cxx11](common_sampler const*) */
common_sampler * common_sampler_print_abi_cxx11_(common_sampler *param_1)
{
int iVar1;
int8 uVar2;
long *plVar3;
long *plVar4;
int iVar5;
long in_RSI;
long *local_90;
long local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
*(common_sampler **)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<char_const*>(param_1,"logits ","");
iVar5 = 0;
while( true ) {
/* try { // try from 001cf7df to 001cf7e3 has its CatchHandler @ 001cf97a */
iVar1 = llama_sampler_chain_n(*(int8 *)(in_RSI + 0x140));
if (iVar1 <= iVar5) break;
/* try { // try from 001cf7f3 to 001cf7f9 has its CatchHandler @ 001cf93e */
uVar2 = llama_sampler_chain_get(*(int8 *)(in_RSI + 0x140),iVar5);
local_50[0] = local_40;
/* try { // try from 001cf807 to 001cf81c has its CatchHandler @ 001cf978 */
std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_001f8bd8,&DAT_001f8bdb);
/* try { // try from 001cf81d to 001cf82f has its CatchHandler @ 001cf97f */
llama_sampler_name(uVar2);
plVar3 = (long *)std::__cxx11::string::append((char *)local_50);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_60 = *plVar4;
lStack_58 = plVar3[3];
local_70 = &local_60;
}
else {
local_60 = *plVar4;
local_70 = (long *)*plVar3;
}
local_68 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 001cf871 to 001cf881 has its CatchHandler @ 001cf95c */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_70);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_80 = *plVar4;
lStack_78 = plVar3[3];
local_90 = &local_80;
}
else {
local_80 = *plVar4;
local_90 = (long *)*plVar3;
}
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 001cf8cf to 001cf8d8 has its CatchHandler @ 001cf940 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_90);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
iVar5 = iVar5 + 1;
}
return param_1;
}
| |
34,393 | minja::BinaryOpExpr::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 {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
} | O2 | cpp | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x6f8eb
cmpq $0x0, 0x30(%r15)
je 0x6f907
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x62cd8
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x6f8bd
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x6893e
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x6fa0e
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f9c2
leaq 0x18(%rsp), %rdi
callq 0x47dd4
leaq 0x88(%rsp), %rdi
callq 0x62f68
jmp 0x6f8cf
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x6fa56
leaq 0x38(%rsp), %rdi
callq 0x62f68
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x44f23(%rip), %rsi # 0xb4820
movq %rax, %rdi
callq 0x23330
jmp 0x6f921
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x44f21(%rip), %rsi # 0xb483a
movq %rax, %rdi
callq 0x23330
movq 0x8e6c8(%rip), %rsi # 0xfdff0
movq 0x8e629(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f40
jmp 0x6f969
jmp 0x6f93b
movq %rax, %rbx
movq %r14, %rdi
callq 0x236a0
jmp 0x6f976
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x47dd4
jmp 0x6f95a
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x62f68
jmp 0x6f96c
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x62f68
movq %rbx, %rdi
callq 0x23fc0
| _ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_6F8EB
cmp qword ptr [r15+30h], 0
jz loc_6F907
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz short loc_6F8BD
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
lea rdi, [rsp+108h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+108h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6F8CF
loc_6F8BD:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
loc_6F8CF:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_6F8EB:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6F921
loc_6F907:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6F921:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6F969
jmp short $+2
loc_6F93B:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6F976
mov rbx, rax
lea rdi, [rsp+108h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_6F95A
mov rbx, rax
loc_6F95A:
lea rdi, [rsp+108h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6F96C
loc_6F969:
mov rbx, rax
loc_6F96C:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6F976:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
std::runtime_error *exception; // r14
__int128 v12; // [rsp+8h] [rbp-100h]
_BYTE v13[32]; // [rsp+18h] [rbp-F0h] BYREF
_BYTE v14[48]; // [rsp+38h] [rbp-D0h] BYREF
long long v15; // [rsp+68h] [rbp-A0h]
_BYTE v16[80]; // [rsp+88h] [rbp-80h] BYREF
__int128 v17; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_9;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_9:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v14, v4);
*(_QWORD *)&v12 = a2;
*((_QWORD *)&v12 + 1) = a3;
if ( v15 )
{
minja::Value::Value((minja::Value *)v16, (const minja::Value *)v14);
v17 = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v13);
minja::Value::callable((_DWORD)this, (unsigned int)v13, v6, v7, v8, v9);
std::_Function_base::~_Function_base((std::_Function_base *)v13);
minja::Value::~Value((minja::Value *)v16);
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
minja::Value::~Value((minja::Value *)v14);
return this;
}
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0016f8eb
CMP qword ptr [R15 + 0x30],0x0
JZ 0x0016f907
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00162cd8
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0016f8bd
LAB_0016f86a:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0016893e
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_0016f88d:
LEA RDI,[RSP + 0x18]
CALL 0x0016fa0e
LAB_0016f897:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0016f9c2
LEA RDI,[RSP + 0x18]
CALL 0x00147dd4
LEA RDI,[RSP + 0x88]
CALL 0x00162f68
JMP 0x0016f8cf
LAB_0016f8bd:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0016fa56
LAB_0016f8cf:
LEA RDI,[RSP + 0x38]
CALL 0x00162f68
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016f8eb:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_0016f8f6:
LEA RSI,[0x1b4820]
MOV RDI,RAX
CALL 0x00123330
LAB_0016f905:
JMP 0x0016f921
LAB_0016f907:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_0016f912:
LEA RSI,[0x1b483a]
MOV RDI,RAX
CALL 0x00123330
LAB_0016f921:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f40
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [32];
Expression local_d0 [48];
long local_a0;
Value local_80 [80];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016f8f6 to 0016f904 has its CatchHandler @ 0016f93b */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 0016f8bd to 0016f8ce has its CatchHandler @ 0016f937 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 0016f86a to 0016f87b has its CatchHandler @ 0016f969 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 0016f88d to 0016f896 has its CatchHandler @ 0016f957 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 0016f897 to 0016f8a3 has its CatchHandler @ 0016f948 */
Value::callable(param_1);
std::_Function_base::~_Function_base((_Function_base *)local_f0);
Value::~Value(local_80);
}
Value::~Value((Value *)local_d0);
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016f912 to 0016f920 has its CatchHandler @ 0016f939 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
| |
34,394 | mysql_stmt_reset_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_reset_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
TRUE,
r_my_bool)
} | O3 | c | mysql_stmt_reset_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x3dfc1
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x3efaf
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x3e024
movl (%r15), %r15d
jmp 0x3e09a
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x24a15(%rip), %rax # 0x629f0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x14230
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x249fa(%rip), %rax # 0x62a00
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x14230
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, (%rbx)
jmp 0x3e09a
movb $0x0, 0x15(%r15)
js 0x3e031
movb 0x8(%r15), %al
jmp 0x3e095
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x249a1(%rip), %rax # 0x629f0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x14230
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x24986(%rip), %rax # 0x62a00
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x14230
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, %al
movb %al, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_reset_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_3DFC1
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_3E024
mov r15d, [r15]
jmp loc_3E09A
loc_3DFC1:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov byte ptr [rbx], 1
jmp short loc_3E09A
loc_3E024:
mov byte ptr [r15+15h], 0
js short loc_3E031
mov al, [r15+8]
jmp short loc_3E095
loc_3E031:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov al, 1
loc_3E095:
mov [rbx], al
xor r15d, r15d
loc_3E09A:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_reset_cont(char *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
char v7; // al
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = *((_BYTE *)v4 + 8);
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_reset_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0013dfc1
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0013efaf
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0013e024
MOV R15D,dword ptr [R15]
JMP 0x0013e09a
LAB_0013dfc1:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1629f0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00114230
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x162a00]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00114230
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV byte ptr [RBX],0x1
JMP 0x0013e09a
LAB_0013e024:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0013e031
MOV AL,byte ptr [R15 + 0x8]
JMP 0x0013e095
LAB_0013e031:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1629f0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00114230
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x162a00]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00114230
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV AL,0x1
LAB_0013e095:
MOV byte ptr [RBX],AL
XOR R15D,R15D
LAB_0013e09a:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_reset_cont(int1 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int1 uVar2;
int iVar3;
int4 uVar4;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar4 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_00162a70,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar3 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar3 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar3 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00162a40,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar2 = 1;
}
else {
uVar2 = *(int1 *)(puVar1 + 2);
}
*param_1 = uVar2;
uVar4 = 0;
}
else {
uVar4 = *puVar1;
}
}
return uVar4;
}
| |
34,395 | maria_reset | eloqsql/storage/maria/ma_extra.c | int maria_reset(MARIA_HA *info)
{
int error= 0;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("maria_reset");
/*
Free buffers and reset the following flags:
EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
If the row buffer cache is large (for dynamic tables), reduce it
to save memory.
*/
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error= end_io_cache(&info->rec_cache);
}
/* Free memory used for keeping blobs */
if (share->base.blobs)
{
if (info->rec_buff_size > share->base.default_rec_buff_size)
{
info->rec_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
share->base.default_rec_buff_size, flag);
}
if (info->blob_buff_size > MARIA_SMALL_BLOB_BUFFER)
{
info->blob_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size,
MARIA_SMALL_BLOB_BUFFER, flag);
}
}
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM);
#endif
info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
info->quick_mode= 0;
info->lastinx= ~0; /* detect index changes */
info->last_search_keypage= info->cur_row.lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
info->error_count= 0;
DBUG_RETURN(error);
} | O0 | c | maria_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0x381d7
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
callq 0xb13a0
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x38282
movq -0x8(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x420(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x3823c
movq -0x8(%rbp), %rax
movq $0x1, 0x460(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a0, %rdi # imm = 0x3A0
movq -0x8(%rbp), %rsi
addq $0x460, %rsi # imm = 0x460
movq -0x18(%rbp), %rax
movl 0x420(%rax), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
callq 0x6fe10
movq -0x8(%rbp), %rax
cmpq $0x400, 0x468(%rax) # imm = 0x400
jbe 0x38280
movq -0x8(%rbp), %rax
movq $0x1, 0x468(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a8, %rdi # imm = 0x3A8
movq -0x8(%rbp), %rsi
addq $0x468, %rsi # imm = 0x468
movq -0x20(%rbp), %rcx
movl $0x400, %edx # imm = 0x400
callq 0x6fe10
jmp 0x38282
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x382b1
movq -0x18(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x27500
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x49, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x682(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x448(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x8(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0x1, %ecx
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x624(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x628(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| maria_reset:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, offset stru_10000
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 12h
cmp eax, 0
jz short loc_381D7
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFEDh
mov [rax+61Ch], ecx
mov rdi, [rbp+var_8]
add rdi, 4B8h
call end_io_cache
mov [rbp+var_C], eax
loc_381D7:
mov rax, [rbp+var_18]
cmp dword ptr [rax+3F0h], 0
jz loc_38282
mov rax, [rbp+var_8]
mov rax, [rax+460h]
mov rcx, [rbp+var_18]
mov ecx, [rcx+420h]
cmp rax, rcx
jbe short loc_3823C
mov rax, [rbp+var_8]
mov qword ptr [rax+460h], 1
mov rdi, [rbp+var_8]
add rdi, 3A0h
mov rsi, [rbp+var_8]
add rsi, 460h
mov rax, [rbp+var_18]
mov eax, [rax+420h]
mov edx, eax
mov rcx, [rbp+var_20]
call _ma_alloc_buffer
loc_3823C:
mov rax, [rbp+var_8]
cmp qword ptr [rax+468h], 400h
jbe short loc_38280
mov rax, [rbp+var_8]
mov qword ptr [rax+468h], 1
mov rdi, [rbp+var_8]
add rdi, 3A8h
mov rsi, [rbp+var_8]
add rsi, 468h
mov rcx, [rbp+var_20]
mov edx, 400h
call _ma_alloc_buffer
loc_38280:
jmp short $+2
loc_38282:
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 20h
cmp eax, 0
jz short loc_382B1
mov rax, [rbp+var_18]
mov rdi, [rax+5F0h]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov edx, 1
call _madvise
loc_382B1:
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFB7h
mov [rax+61Ch], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+682h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+62Ch], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+448h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_8]
mov ecx, [rax+624h]
and ecx, 1
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_8]
mov [rax+624h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+628h], 0
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
| long long maria_reset(long long *a1)
{
unsigned int v1; // eax
long long v3; // [rsp+10h] [rbp-20h]
long long v4; // [rsp+18h] [rbp-18h]
unsigned int v5; // [rsp+24h] [rbp-Ch]
v5 = 0;
v4 = *a1;
v1 = 0;
if ( *(_BYTE *)(*a1 + 2009) )
v1 = (unsigned int)&stru_10000;
v3 = v1 | 0x10;
if ( (*((_DWORD *)a1 + 391) & 0x12) != 0 )
{
*((_DWORD *)a1 + 391) &= 0xFFFFFFED;
v5 = end_io_cache(a1 + 151);
}
if ( *(_DWORD *)(v4 + 1008) )
{
if ( a1[140] > (unsigned long long)*(unsigned int *)(v4 + 1056) )
{
a1[140] = 1LL;
ma_alloc_buffer(a1 + 116, a1 + 140, *(unsigned int *)(v4 + 1056), v3);
}
if ( (unsigned long long)a1[141] > 0x400 )
{
a1[141] = 1LL;
ma_alloc_buffer(a1 + 117, a1 + 141, 1024LL, v3);
}
}
if ( (*((_DWORD *)a1 + 391) & 0x20) != 0 )
madvise(*(_QWORD *)(v4 + 1520), *(_QWORD *)(v4 + 64), 1LL);
*((_DWORD *)a1 + 391) &= 0xFFFFFFB7;
*((_BYTE *)a1 + 1666) = 0;
*((_DWORD *)a1 + 395) = -1;
a1[19] = -1LL;
a1[137] = -1LL;
*((_BYTE *)a1 + 1668) = 1;
*(long long *)((char *)a1 + 1572) = *((_DWORD *)a1 + 393) & 1 | 0x30u;
return v5;
}
| maria_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x12
CMP EAX,0x0
JZ 0x001381d7
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffed
MOV dword ptr [RAX + 0x61c],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x4b8
CALL 0x001b13a0
MOV dword ptr [RBP + -0xc],EAX
LAB_001381d7:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x00138282
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x460]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x420]
CMP RAX,RCX
JBE 0x0013823c
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x460],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x460
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x420]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0016fe10
LAB_0013823c:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x468],0x400
JBE 0x00138280
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x468],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x468
MOV RCX,qword ptr [RBP + -0x20]
MOV EDX,0x400
CALL 0x0016fe10
LAB_00138280:
JMP 0x00138282
LAB_00138282:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001382b1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x5f0]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1
CALL 0x00127500
LAB_001382b1:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffb7
MOV dword ptr [RAX + 0x61c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x682],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x62c],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x448],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0x1
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x624],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x628],0x0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int4 maria_reset(long *param_1)
{
long lVar1;
uint uVar2;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
uVar2 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar2 = 0x10000;
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x12) != 0) {
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffed;
local_14 = end_io_cache(param_1 + 0x97);
}
if (*(int *)(lVar1 + 0x3f0) != 0) {
if ((ulong)*(uint *)(lVar1 + 0x420) < (ulong)param_1[0x8c]) {
param_1[0x8c] = 1;
_ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c,*(int4 *)(lVar1 + 0x420),uVar2 | 0x10);
}
if (0x400 < (ulong)param_1[0x8d]) {
param_1[0x8d] = 1;
_ma_alloc_buffer(param_1 + 0x75,param_1 + 0x8d,0x400,uVar2 | 0x10);
}
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x5f0),*(size_t *)(lVar1 + 0x40),1);
}
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffb7;
*(int1 *)((long)param_1 + 0x682) = 0;
*(int4 *)((long)param_1 + 0x62c) = 0xffffffff;
param_1[0x13] = -1;
param_1[0x89] = -1;
*(int1 *)((long)param_1 + 0x684) = 1;
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 1 | 0x30;
*(int4 *)(param_1 + 0xc5) = 0;
return local_14;
}
| |
34,396 | otp_command::otp_command() | msxemulator/build_O3/_deps/picotool-src/main.cpp | otp_command() : multi_cmd("otp", otp_sub_commands) {} | O3 | cpp | otp_command::otp_command():
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6d6ef(%rip), %rsi # 0xa5be3
leaq 0x6d6eb(%rip), %rdx # 0xa5be6
movq %rsp, %rdi
callq 0x5c00c
leaq 0xb48ce(%rip), %rsi # 0xecdd8
leaq 0x20(%rsp), %rdi
callq 0x50850
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x508ee
leaq 0x20(%rsp), %rdi
callq 0x380ee
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x38544
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0xa7e65(%rip), %rax # 0xe03b0
movq %rax, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x380ee
jmp 0x38568
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3857e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rdi
callq 0xf7d0
| _ZN11otp_commandC2Ev:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
lea r14, [rsp+48h+var_38]
mov [r14-10h], r14
lea rsi, aOtp; "otp"
lea rdx, aOtp+3; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, otp_sub_commands
lea rdi, [rsp+48h+var_28]
call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EEC2ERKS4_; std::vector<std::shared_ptr<cmd>>::vector(std::vector<std::shared_ptr<cmd>> const&)
mov rsi, rsp
lea rdx, [rsp+48h+var_28]
mov rdi, rbx
call _ZN9multi_cmdC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI3cmdESaIS9_EE; multi_cmd::multi_cmd(std::string,std::vector<std::shared_ptr<cmd>>)
lea rdi, [rsp+48h+var_28]; void *
call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EED2Ev; std::vector<std::shared_ptr<cmd>>::~vector()
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r14
jz short loc_38544
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_38544:
lea rax, off_E03B0
mov [rbx], rax
add rsp, 38h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_18]; void *
call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EED2Ev; std::vector<std::shared_ptr<cmd>>::~vector()
jmp short loc_38568
mov rbx, rax
loc_38568:
mov rdi, [rsp+0]; void *
cmp rdi, r14
jz short loc_3857E
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3857E:
mov rdi, rbx
call __Unwind_Resume
| void otp_command::otp_command(otp_command *this)
{
void *v1[2]; // [rsp+0h] [rbp-48h] BYREF
_QWORD v2[2]; // [rsp+10h] [rbp-38h] BYREF
_QWORD v3[5]; // [rsp+20h] [rbp-28h] BYREF
v1[0] = v2;
std::string::_M_construct<char const*>(v1, "otp", "");
std::vector<std::shared_ptr<cmd>>::vector(v3, &otp_sub_commands);
multi_cmd::multi_cmd(this, v1, v3);
std::vector<std::shared_ptr<cmd>>::~vector(v3);
if ( v1[0] != v2 )
operator delete(v1[0], v2[0] + 1LL);
*(_QWORD *)this = off_E03B0;
}
| otp_command:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA R14,[RSP + 0x10]
MOV qword ptr [R14 + -0x10],R14
LEA RSI,[0x1a5be3]
LEA RDX,[0x1a5be6]
MOV RDI,RSP
CALL 0x0015c00c
LAB_00138503:
LEA RSI,[0x1ecdd8]
LEA RDI,[RSP + 0x20]
CALL 0x00150850
LAB_00138514:
MOV RSI,RSP
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x001508ee
LAB_00138524:
LEA RDI,[RSP + 0x20]
CALL 0x001380ee
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x00138544
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010f470
LAB_00138544:
LEA RAX,[0x1e03b0]
MOV qword ptr [RBX],RAX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* otp_command::otp_command() */
void __thiscall otp_command::otp_command(otp_command *this)
{
long *local_48 [2];
long local_38 [2];
vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>> local_28 [24];
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>((string *)local_48,&DAT_001a5be3,&DAT_001a5be6);
/* try { // try from 00138503 to 00138513 has its CatchHandler @ 00138565 */
std::vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>>::vector
(local_28,otp_sub_commands);
/* try { // try from 00138514 to 00138523 has its CatchHandler @ 00138556 */
multi_cmd::multi_cmd((multi_cmd *)this,local_48,local_28);
std::vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>>::~vector(local_28);
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
*(int ***)this = &PTR__multi_cmd_001e03b0;
return;
}
| |
34,397 | mp_shl_dec | bluesky950520[P]quickjs/libbf.c | static limb_t mp_shl_dec(limb_t *tab_r, const limb_t *tab, mp_size_t n,
limb_t shift, limb_t low)
{
mp_size_t i;
limb_t l, a, q, r;
assert(shift >= 1 && shift < LIMB_DIGITS);
l = low;
for(i = 0; i < n; i++) {
a = tab[i];
fast_shr_rem_dec(q, r, a, LIMB_DIGITS - shift);
tab_r[i] = r * mp_pow_dec[shift] + l;
l = q;
}
return l;
} | O0 | c | mp_shl_dec:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x40(%rsp), %rax
jge 0xf3bac
movq 0x48(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x13, %eax
subq 0x38(%rsp), %rax
movl %eax, %esi
callq 0xf5680
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movl $0x13, %esi
subq 0x38(%rsp), %rsi
leaq 0x1e1d7(%rip), %rdx # 0x111d30
imulq (%rdx,%rsi,8), %rcx
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x1e1b9(%rip), %rax # 0x111d30
imulq (%rax,%rcx,8), %rdx
addq 0x20(%rsp), %rdx
movq 0x50(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0xf3b00
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| mp_shl_dec:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_20], rcx
mov [rsp+58h+var_28], r8
mov rax, [rsp+58h+var_28]
mov [rsp+58h+var_38], rax
mov [rsp+58h+var_30], 0
loc_F3B00:
mov rax, [rsp+58h+var_30]
cmp rax, [rsp+58h+var_18]
jge loc_F3BAC
mov rax, [rsp+58h+var_10]
mov rcx, [rsp+58h+var_30]
mov rax, [rax+rcx*8]
mov [rsp+58h+var_40], rax
mov rdi, [rsp+58h+var_40]
mov eax, 13h
sub rax, [rsp+58h+var_20]
mov esi, eax
call fast_shr_dec
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_40]
mov rcx, [rsp+58h+var_48]
mov esi, 13h
sub rsi, [rsp+58h+var_20]
lea rdx, mp_pow_dec
imul rcx, [rdx+rsi*8]
sub rax, rcx
mov [rsp+58h+var_50], rax
mov rdx, [rsp+58h+var_50]
mov rcx, [rsp+58h+var_20]
lea rax, mp_pow_dec
imul rdx, [rax+rcx*8]
add rdx, [rsp+58h+var_38]
mov rax, [rsp+58h+var_8]
mov rcx, [rsp+58h+var_30]
mov [rax+rcx*8], rdx
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_30]
add rax, 1
mov [rsp+58h+var_30], rax
jmp loc_F3B00
loc_F3BAC:
mov rax, [rsp+58h+var_38]
add rsp, 58h
retn
| long long mp_shl_dec(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v6; // [rsp+10h] [rbp-48h]
long long v7; // [rsp+18h] [rbp-40h]
long long i; // [rsp+28h] [rbp-30h]
for ( i = 0LL; i < a3; ++i )
{
v7 = *(_QWORD *)(a2 + 8 * i);
v6 = fast_shr_dec(v7, (unsigned int)(19 - a4));
*(_QWORD *)(a1 + 8 * i) = a5 + mp_pow_dec[a4] * (v7 - mp_pow_dec[19 - a4] * v6);
a5 = v6;
}
return a5;
}
| mp_shl_dec:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x30],R8
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],0x0
LAB_001f3b00:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x40]
JGE 0x001f3bac
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV EAX,0x13
SUB RAX,qword ptr [RSP + 0x38]
MOV ESI,EAX
CALL 0x001f5680
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV ESI,0x13
SUB RSI,qword ptr [RSP + 0x38]
LEA RDX,[0x211d30]
IMUL RCX,qword ptr [RDX + RSI*0x8]
SUB RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x38]
LEA RAX,[0x211d30]
IMUL RDX,qword ptr [RAX + RCX*0x8]
ADD RDX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001f3b00
LAB_001f3bac:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x58
RET
|
long mp_shl_dec(long param_1,long param_2,long param_3,long param_4,long param_5)
{
long lVar1;
long lVar2;
long local_38;
long local_30;
local_38 = param_5;
for (local_30 = 0; local_30 < param_3; local_30 = local_30 + 1) {
lVar1 = *(long *)(param_2 + local_30 * 8);
lVar2 = fast_shr_dec(lVar1,0x13 - (int)param_4);
*(long *)(param_1 + local_30 * 8) =
(lVar1 - lVar2 * *(long *)(mp_pow_dec + (0x13 - param_4) * 8)) *
*(long *)(mp_pow_dec + param_4 * 8) + local_38;
local_38 = lVar2;
}
return local_38;
}
| |
34,398 | sp_make_key | eloqsql/storage/myisam/sp_key.c | uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
const uchar *record, my_off_t filepos)
{
HA_KEYSEG *keyseg;
MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr];
uint len = 0;
uchar *pos;
uint dlen;
uchar *dptr;
double mbr[SPDIMS * 2];
uint i;
keyseg = &keyinfo->seg[-1];
pos = (uchar*)record + keyseg->start;
dlen = _mi_calc_blob_length(keyseg->bit_start, pos);
memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*));
if (!dptr)
{
my_errno= HA_ERR_NULL_IN_SPATIAL;
return 0;
}
sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */
for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++)
{
uint length = keyseg->length, start= keyseg->start;
double val;
DBUG_ASSERT(length == sizeof(double));
DBUG_ASSERT(!(start % sizeof(double)));
DBUG_ASSERT(start < sizeof(mbr));
DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE);
val= mbr[start / sizeof (double)];
if (isnan(val))
{
bzero(key, length);
key+= length;
len+= length;
continue;
}
if (keyseg->flag & HA_SWAP_KEY)
{
uchar buf[sizeof(double)];
float8store(buf, val);
pos= &buf[length];
while (pos > buf)
*key++ = *--pos;
}
else
{
float8store((uchar *)key, val);
key += length;
}
len+= length;
}
_mi_dpointer(info, key, filepos);
return len;
} | O0 | c | sp_make_key:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
addq $-0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x60(%rbp), %rsi
callq 0xab0c0
movl %eax, -0x64(%rbp)
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0xd60e9
callq 0xf6090
movl $0x9e, (%rax)
movl $0x0, -0x14(%rbp)
jmp 0xd6282
movq -0x70(%rbp), %rdi
addq $0x4, %rdi
movl -0x64(%rbp), %esi
subl $0x4, %esi
leaq -0x90(%rbp), %rcx
movl $0x2, %edx
callq 0xd62c0
movl $0x0, -0x94(%rbp)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0xd626b
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x9c(%rbp)
jmp 0xd6149
jmp 0xd614b
jmp 0xd614d
jmp 0xd614f
jmp 0xd6151
jmp 0xd6153
jmp 0xd6155
movl -0x9c(%rbp), %eax
shrq $0x3, %rax
movsd -0x90(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd -0xa8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0xd6185
jmp 0xd61bc
movq -0x30(%rbp), %rdi
movl -0x98(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x98(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x98(%rbp), %eax
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0xd624b
movq -0x48(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xd621e
movq -0xa8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x98(%rbp), %eax
movl %eax, %ecx
leaq -0x10(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
leaq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xd621c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x60(%rbp)
movb -0x1(%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0xd61ea
jmp 0xd623f
movq -0x30(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movl -0x98(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x98(%rbp), %eax
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0xd611e
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xc0ae0
movl -0x54(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd62ac
movl -0xac(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| sp_make_key:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_38], rcx
mov [rbp+var_40], r8
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_24]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rbp+var_50], rax
mov [rbp+var_54], 0
mov rax, [rbp+var_50]
mov rax, [rax+28h]
add rax, 0FFFFFFFFFFFFFFE0h
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_48]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_60]
call _mi_calc_blob_length
mov [rbp+var_64], eax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_70], rax
cmp [rbp+var_70], 0
jnz short loc_D60E9
call _my_thread_var
mov dword ptr [rax], 9Eh
mov [rbp+var_14], 0
jmp loc_D6282
loc_D60E9:
mov rdi, [rbp+var_70]
add rdi, 4
mov esi, [rbp+var_64]
sub esi, 4
lea rcx, [rbp+var_90]
mov edx, 2
call sp_mbr_from_wkb_0
mov [rbp+var_94], 0
mov rax, [rbp+var_50]
mov rax, [rax+28h]
mov [rbp+var_48], rax
loc_D611E:
mov rax, [rbp+var_48]
cmp byte ptr [rax+18h], 0
jz loc_D626B
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_98], eax
mov rax, [rbp+var_48]
mov eax, [rax+8]
mov [rbp+var_9C], eax
jmp short $+2
loc_D6149:
jmp short $+2
loc_D614B:
jmp short $+2
loc_D614D:
jmp short $+2
loc_D614F:
jmp short $+2
loc_D6151:
jmp short $+2
loc_D6153:
jmp short $+2
loc_D6155:
mov eax, [rbp+var_9C]
shr rax, 3
movsd xmm0, [rbp+rax*8+var_90]
movsd [rbp+var_A8], xmm0
movsd xmm0, [rbp+var_A8]
ucomisd xmm0, xmm0
setp al
test al, 1
jnz short loc_D6185
jmp short loc_D61BC
loc_D6185:
mov rdi, [rbp+var_30]
mov eax, [rbp+var_98]
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_98]
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov eax, [rbp+var_98]
add eax, [rbp+var_54]
mov [rbp+var_54], eax
jmp loc_D624B
loc_D61BC:
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+12h]
and eax, 40h
cmp eax, 0
jz short loc_D621E
mov rax, [rbp+var_A8]
mov [rbp+var_10], rax
mov eax, [rbp+var_98]
mov ecx, eax
lea rax, [rbp+var_10]
add rax, rcx
mov [rbp+var_60], rax
loc_D61EA:
mov rax, [rbp+var_60]
lea rcx, [rbp+var_10]
cmp rax, rcx
jbe short loc_D621C
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_60], rcx
mov cl, [rax-1]
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
jmp short loc_D61EA
loc_D621C:
jmp short loc_D623F
loc_D621E:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_A8]
mov [rax], rcx
mov ecx, [rbp+var_98]
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
loc_D623F:
mov eax, [rbp+var_98]
add eax, [rbp+var_54]
mov [rbp+var_54], eax
loc_D624B:
mov rax, [rbp+var_48]
add rax, 20h ; ' '
mov [rbp+var_48], rax
mov eax, [rbp+var_94]
add eax, 1
mov [rbp+var_94], eax
jmp loc_D611E
loc_D626B:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_40]
call _mi_dpointer
mov eax, [rbp+var_54]
mov [rbp+var_14], eax
loc_D6282:
mov eax, [rbp+var_14]
mov [rbp+var_AC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_D62AC
mov eax, [rbp+var_AC]
add rsp, 0B0h
pop rbp
retn
loc_D62AC:
call ___stack_chk_fail
| long long sp_make_key(long long a1, unsigned int a2, _BYTE *a3, long long a4, unsigned long long a5)
{
long long v5; // rdi
unsigned __int8 *v6; // rax
char v7; // cl
_BYTE *v8; // rax
unsigned int v10; // [rsp+18h] [rbp-98h]
int v11; // [rsp+1Ch] [rbp-94h]
_QWORD v12[4]; // [rsp+20h] [rbp-90h] BYREF
long long v13; // [rsp+40h] [rbp-70h]
int v14; // [rsp+4Ch] [rbp-64h]
unsigned __int8 *v15; // [rsp+50h] [rbp-60h]
unsigned int v16; // [rsp+5Ch] [rbp-54h]
long long v17; // [rsp+60h] [rbp-50h]
long long v18; // [rsp+68h] [rbp-48h]
unsigned long long v19; // [rsp+70h] [rbp-40h]
long long v20; // [rsp+78h] [rbp-38h]
_BYTE *v21; // [rsp+80h] [rbp-30h]
unsigned int v22; // [rsp+8Ch] [rbp-24h]
long long v23; // [rsp+90h] [rbp-20h]
_QWORD v25[2]; // [rsp+A0h] [rbp-10h] BYREF
v25[1] = __readfsqword(0x28u);
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v17 = 112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v16 = 0;
v18 = *(_QWORD *)(v17 + 40) - 32LL;
v15 = (unsigned __int8 *)(*(unsigned int *)(v18 + 8) + a4);
v5 = *(unsigned __int8 *)(v18 + 26);
v14 = mi_calc_blob_length(v5, v15);
v13 = *(_QWORD *)&v15[*(unsigned __int8 *)(v18 + 26)];
if ( v13 )
{
sp_mbr_from_wkb_0(v13 + 4, (unsigned int)(v14 - 4), 2LL, v12);
v11 = 0;
v18 = *(_QWORD *)(v17 + 40);
while ( *(_BYTE *)(v18 + 24) )
{
v10 = *(unsigned __int16 *)(v18 + 20);
if ( (*(_WORD *)(v18 + 18) & 0x40) != 0 )
{
v25[0] = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3];
v15 = (unsigned __int8 *)v25 + v10;
while ( v15 > (unsigned __int8 *)v25 )
{
v6 = v15--;
v7 = *(v6 - 1);
v8 = v21++;
*v8 = v7;
}
}
else
{
*(_QWORD *)v21 = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3];
v21 += v10;
}
v16 += v10;
v18 += 32LL;
++v11;
}
mi_dpointer(v23, v21, v19);
return v16;
}
else
{
*(_DWORD *)my_thread_var(v5, (const char *)v15) = 158;
return 0;
}
}
| sp_make_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV qword ptr [RBP + -0x38],RCX
MOV qword ptr [RBP + -0x40],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x24]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBP + -0x54],0x0
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x28]
ADD RAX,-0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x60]
CALL 0x001ab0c0
MOV dword ptr [RBP + -0x64],EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
JNZ 0x001d60e9
CALL 0x001f6090
MOV dword ptr [RAX],0x9e
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001d6282
LAB_001d60e9:
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x4
MOV ESI,dword ptr [RBP + -0x64]
SUB ESI,0x4
LEA RCX,[RBP + -0x90]
MOV EDX,0x2
CALL 0x001d62c0
MOV dword ptr [RBP + -0x94],0x0
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_001d611e:
MOV RAX,qword ptr [RBP + -0x48]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x001d626b
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x98],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x001d6149
LAB_001d6149:
JMP 0x001d614b
LAB_001d614b:
JMP 0x001d614d
LAB_001d614d:
JMP 0x001d614f
LAB_001d614f:
JMP 0x001d6151
LAB_001d6151:
JMP 0x001d6153
LAB_001d6153:
JMP 0x001d6155
LAB_001d6155:
MOV EAX,dword ptr [RBP + -0x9c]
SHR RAX,0x3
MOVSD XMM0,qword ptr [RBP + RAX*0x8 + -0x90]
MOVSD qword ptr [RBP + -0xa8],XMM0
MOVSD XMM0,qword ptr [RBP + -0xa8]
UCOMISD XMM0,XMM0
SETP AL
TEST AL,0x1
JNZ 0x001d6185
JMP 0x001d61bc
LAB_001d6185:
MOV RDI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x98]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV ECX,dword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x98]
ADD EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001d624b
LAB_001d61bc:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001d621e
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x98]
MOV ECX,EAX
LEA RAX,[RBP + -0x10]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_001d61ea:
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RBP + -0x10]
CMP RAX,RCX
JBE 0x001d621c
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x60],RCX
MOV CL,byte ptr [RAX + -0x1]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
JMP 0x001d61ea
LAB_001d621c:
JMP 0x001d623f
LAB_001d621e:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0xa8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_001d623f:
MOV EAX,dword ptr [RBP + -0x98]
ADD EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x54],EAX
LAB_001d624b:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x94]
ADD EAX,0x1
MOV dword ptr [RBP + -0x94],EAX
JMP 0x001d611e
LAB_001d626b:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001c0ae0
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x14],EAX
LAB_001d6282:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0xac],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001d62ac
MOV EAX,dword ptr [RBP + -0xac]
ADD RSP,0xb0
POP RBP
RET
LAB_001d62ac:
CALL 0x0012a270
|
int sp_make_key(long *param_1,uint param_2,double *param_3,long param_4,int8 param_5)
{
double dVar1;
long lVar2;
double *pdVar3;
double *pdVar4;
uint uVar5;
int4 *puVar6;
long in_FS_OFFSET;
double local_98 [4];
long local_78;
int local_6c;
double *local_68;
int local_5c;
long local_58;
long local_50;
int8 local_48;
long local_40;
double *local_38;
uint local_2c;
long *local_28;
int local_1c;
double local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_58 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70;
local_5c = 0;
lVar2 = *(long *)(local_58 + 0x28);
local_50 = lVar2 + -0x20;
local_68 = (double *)(param_4 + (ulong)*(uint *)(lVar2 + -0x18));
local_48 = param_5;
local_40 = param_4;
local_38 = param_3;
local_2c = param_2;
local_28 = param_1;
local_6c = _mi_calc_blob_length(*(int1 *)(lVar2 + -6),local_68);
local_78 = *(long *)((long)local_68 + (long)(int)(uint)*(byte *)(local_50 + 0x1a));
if (local_78 == 0) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x9e;
local_1c = 0;
}
else {
sp_mbr_from_wkb(local_78 + 4,local_6c + -4,2,local_98);
for (local_50 = *(long *)(local_58 + 0x28); *(char *)(local_50 + 0x18) != '\0';
local_50 = local_50 + 0x20) {
uVar5 = (uint)*(ushort *)(local_50 + 0x14);
dVar1 = local_98[*(uint *)(local_50 + 8) >> 3];
if (NAN(dVar1)) {
memset(local_38,0,(ulong)uVar5);
local_38 = (double *)((long)local_38 + (ulong)uVar5);
local_5c = uVar5 + local_5c;
}
else {
if ((*(ushort *)(local_50 + 0x12) & 0x40) == 0) {
*local_38 = dVar1;
local_38 = (double *)((long)local_38 + (ulong)uVar5);
}
else {
local_18 = dVar1;
local_68 = (double *)((long)&local_18 + (ulong)uVar5);
while (pdVar4 = local_38, pdVar3 = local_68, &local_18 < local_68) {
local_68 = (double *)((long)local_68 + -1);
local_38 = (double *)((long)local_38 + 1);
*(int1 *)pdVar4 = *(int1 *)((long)pdVar3 + -1);
}
}
local_5c = uVar5 + local_5c;
}
}
_mi_dpointer(local_28,local_38,local_48);
local_1c = local_5c;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_1c;
}
| |
34,399 | cxxopts::exceptions::option_has_no_value::option_has_no_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | zkingston[P]unknot/build_O0/_deps/cxxopts-src/include/cxxopts.hpp | explicit option_has_no_value(const std::string& option)
: exception(
!option.empty() ?
("Option " + LQUOTE + option + RQUOTE + " has no value") :
"Option has no value")
{
} | O0 | cpp | cxxopts::exceptions::option_has_no_value::option_has_no_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x13420
movb $0x0, 0x37(%rsp)
movb $0x0, 0x23(%rsp)
movb $0x0, 0x22(%rsp)
movb $0x0, 0x21(%rsp)
movb $0x0, 0x1f(%rsp)
movb $0x0, 0x1e(%rsp)
testb $0x1, %al
jne 0x75192
leaq 0x558658(%rip), %rsi # 0x5cd772
leaq 0x61a36f(%rip), %rdx # 0x68f490
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x50bf0
movq 0x8(%rsp), %rsi
movb $0x1, 0x37(%rsp)
movq 0xb8(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x50ba0
jmp 0x7514e
movb $0x1, 0x23(%rsp)
leaq 0x61a356(%rip), %rdx # 0x68f4b0
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x50ba0
jmp 0x7516b
movb $0x1, 0x22(%rsp)
leaq 0x55889b(%rip), %rdx # 0x5cda12
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x537c0
jmp 0x7518b
movb $0x1, 0x21(%rsp)
jmp 0x751c4
leaq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x13550
movq (%rsp), %rdx
movb $0x1, 0x1f(%rsp)
leaq 0x55885c(%rip), %rsi # 0x5cda0c
leaq 0x98(%rsp), %rdi
callq 0x169d0
jmp 0x751bf
movb $0x1, 0x1e(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x50e00
testb $0x1, 0x1e(%rsp)
jne 0x751df
jmp 0x751ec
leaq 0x98(%rsp), %rdi
callq 0x13768
testb $0x1, 0x1f(%rsp)
jne 0x751f5
jmp 0x751ff
leaq 0x20(%rsp), %rdi
callq 0x12d00
testb $0x1, 0x21(%rsp)
jne 0x75208
jmp 0x75215
leaq 0x98(%rsp), %rdi
callq 0x13768
testb $0x1, 0x22(%rsp)
jne 0x7521e
jmp 0x75228
leaq 0x78(%rsp), %rdi
callq 0x13768
testb $0x1, 0x23(%rsp)
jne 0x75231
jmp 0x7523b
leaq 0x58(%rsp), %rdi
callq 0x13768
testb $0x1, 0x37(%rsp)
jne 0x75244
jmp 0x7524e
leaq 0x38(%rsp), %rdi
callq 0x13768
movq 0x10(%rsp), %rax
leaq 0x616746(%rip), %rcx # 0x68b9a0
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0xc8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x752ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x752ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x752d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
testb $0x1, 0x1f(%rsp)
jne 0x752b3
jmp 0x752bd
leaq 0x20(%rsp), %rdi
callq 0x12d00
testb $0x1, 0x21(%rsp)
jne 0x752c6
jmp 0x752d3
leaq 0x98(%rsp), %rdi
callq 0x13768
jmp 0x752d5
testb $0x1, 0x22(%rsp)
jne 0x752de
jmp 0x752e8
leaq 0x78(%rsp), %rdi
callq 0x13768
jmp 0x752ea
testb $0x1, 0x23(%rsp)
jne 0x752f3
jmp 0x752fd
leaq 0x58(%rsp), %rdi
callq 0x13768
jmp 0x752ff
testb $0x1, 0x37(%rsp)
jne 0x75308
jmp 0x75312
leaq 0x38(%rsp), %rdi
callq 0x13768
jmp 0x75314
movq 0x28(%rsp), %rdi
callq 0x13540
nop
| _ZN7cxxopts10exceptions19option_has_no_valueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0C8h
mov [rsp+0C8h+var_8], rdi
mov [rsp+0C8h+var_10], rsi
mov rax, [rsp+0C8h+var_8]
mov [rsp+0C8h+var_B8], rax; void *
mov rdi, [rsp+0C8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
mov [rsp+0C8h+var_91], 0
mov [rsp+0C8h+var_A5], 0
mov [rsp+0C8h+var_A6], 0
mov [rsp+0C8h+var_A7], 0
mov [rsp+0C8h+var_A9], 0
mov [rsp+0C8h+var_AA], 0
test al, 1
jnz short loc_75192
lea rsi, aOption_0; "Option "
lea rdx, _ZN7cxxopts12_GLOBAL__N_16LQUOTEB5cxx11E; int
lea rdi, [rsp+0C8h+var_90]; int
mov qword ptr [rsp+0C8h+var_C0], rdi; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rsi, qword ptr [rsp+0C8h+var_C0]
mov [rsp+0C8h+var_91], 1
mov rdx, [rsp+0C8h+var_10]
lea rdi, [rsp+0C8h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_7514E:
mov [rsp+0C8h+var_A5], 1
lea rdx, _ZN7cxxopts12_GLOBAL__N_16RQUOTEB5cxx11E; cxxopts::`anonymous namespace'::RQUOTE
lea rdi, [rsp+0C8h+var_50]
lea rsi, [rsp+0C8h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_7516B:
mov [rsp+0C8h+var_A6], 1
lea rdx, aOptionHasNoVal+6; " has no value"
lea rdi, [rsp+0C8h+var_30]
lea rsi, [rsp+0C8h+var_50]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_7518B:
mov [rsp+0C8h+var_A7], 1
jmp short loc_751C4
loc_75192:
lea rdi, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0C8h+var_C8]
mov [rsp+0C8h+var_A9], 1
lea rsi, aOptionHasNoVal; "Option has no value"
lea rdi, [rsp+0C8h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_751BF:
mov [rsp+0C8h+var_AA], 1
loc_751C4:
mov rdi, [rsp+0C8h+var_B8]
lea rsi, [rsp+0C8h+var_30]
call _ZN7cxxopts10exceptions9exceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::exceptions::exception::exception(std::string)
test [rsp+0C8h+var_AA], 1
jnz short loc_751DF
jmp short loc_751EC
loc_751DF:
lea rdi, [rsp+0C8h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_751EC:
test [rsp+0C8h+var_A9], 1
jnz short loc_751F5
jmp short loc_751FF
loc_751F5:
lea rdi, [rsp+0C8h+var_A8]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_751FF:
test [rsp+0C8h+var_A7], 1
jnz short loc_75208
jmp short loc_75215
loc_75208:
lea rdi, [rsp+0C8h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_75215:
test [rsp+0C8h+var_A6], 1
jnz short loc_7521E
jmp short loc_75228
loc_7521E:
lea rdi, [rsp+0C8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_75228:
test [rsp+0C8h+var_A5], 1
jnz short loc_75231
jmp short loc_7523B
loc_75231:
lea rdi, [rsp+0C8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_7523B:
test [rsp+0C8h+var_91], 1
jnz short loc_75244
jmp short loc_7524E
loc_75244:
lea rdi, [rsp+0C8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_7524E:
mov rax, [rsp+0C8h+var_B8]
lea rcx, _ZTVN7cxxopts10exceptions19option_has_no_valueE; `vtable for'cxxopts::exceptions::option_has_no_value
add rcx, 10h
mov [rax], rcx
add rsp, 0C8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp loc_752FF
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_752EA
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_752D5
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
test [rsp+arg_17], 1
jnz short loc_752B3
jmp short loc_752BD
loc_752B3:
lea rdi, [rsp+arg_18]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_752BD:
test [rsp+arg_19], 1
jnz short loc_752C6
jmp short loc_752D3
loc_752C6:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_752D3:
jmp short $+2
loc_752D5:
test [rsp+arg_1A], 1
jnz short loc_752DE
jmp short loc_752E8
loc_752DE:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_752E8:
jmp short $+2
loc_752EA:
test [rsp+arg_1B], 1
jnz short loc_752F3
jmp short loc_752FD
loc_752F3:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_752FD:
jmp short $+2
loc_752FF:
test [rsp+arg_2F], 1
jnz short loc_75308
jmp short loc_75312
loc_75308:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_75312:
jmp short $+2
loc_75314:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| _QWORD * cxxopts::exceptions::option_has_no_value::option_has_no_value(_QWORD *a1, long long a2)
{
long long v2; // rdx
_QWORD *result; // rax
char v4; // [rsp+1Eh] [rbp-AAh]
char v5; // [rsp+1Fh] [rbp-A9h]
char v6; // [rsp+20h] [rbp-A8h] BYREF
char v7; // [rsp+21h] [rbp-A7h]
char v8; // [rsp+22h] [rbp-A6h]
char v9; // [rsp+23h] [rbp-A5h]
char v10; // [rsp+37h] [rbp-91h]
int v11[8]; // [rsp+38h] [rbp-90h] BYREF
_BYTE v12[32]; // [rsp+58h] [rbp-70h] BYREF
_BYTE v13[32]; // [rsp+78h] [rbp-50h] BYREF
_BYTE v14[32]; // [rsp+98h] [rbp-30h] BYREF
long long v15; // [rsp+B8h] [rbp-10h]
void *v16; // [rsp+C0h] [rbp-8h]
v16 = a1;
v15 = a2;
v10 = 0;
v9 = 0;
v8 = 0;
v7 = 0;
v5 = 0;
v4 = 0;
if ( (std::string::empty(a2) & 1) != 0 )
{
std::allocator<char>::allocator(&v6, a2, v2);
v5 = 1;
std::string::basic_string<std::allocator<char>>((long long)v14, (long long)"Option has no value", (long long)&v6);
v4 = 1;
}
else
{
std::operator+<char>((long long)v11, (long long)"Option ", (long long)&cxxopts::`anonymous namespace'::LQUOTE[abi:cxx11]);
v10 = 1;
std::operator+<char>((long long)v12, (long long)v11, v15);
v9 = 1;
std::operator+<char>((long long)v13, (long long)v12, (long long)&cxxopts::`anonymous namespace'::RQUOTE[abi:cxx11]);
v8 = 1;
std::operator+<char>((long long)v14, (long long)v13, (long long)" has no value");
v7 = 1;
}
cxxopts::exceptions::exception::exception((std::exception *)a1, (long long)v14);
if ( (v4 & 1) != 0 )
std::string::~string(v14);
if ( (v5 & 1) != 0 )
std::allocator<char>::~allocator(&v6);
if ( (v7 & 1) != 0 )
std::string::~string(v14);
if ( (v8 & 1) != 0 )
std::string::~string(v13);
if ( (v9 & 1) != 0 )
std::string::~string(v12);
if ( (v10 & 1) != 0 )
std::string::~string(v11);
result = a1;
*a1 = &`vtable for'cxxopts::exceptions::option_has_no_value + 2;
return result;
}
| option_has_no_value:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xc0],RDI
MOV qword ptr [RSP + 0xb8],RSI
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x00113420
MOV byte ptr [RSP + 0x37],0x0
MOV byte ptr [RSP + 0x23],0x0
MOV byte ptr [RSP + 0x22],0x0
MOV byte ptr [RSP + 0x21],0x0
MOV byte ptr [RSP + 0x1f],0x0
MOV byte ptr [RSP + 0x1e],0x0
TEST AL,0x1
JNZ 0x00175192
LEA RSI,[0x6cd772]
LEA RDX,[0x78f490]
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00150bf0
MOV RSI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x37],0x1
MOV RDX,qword ptr [RSP + 0xb8]
LAB_00175142:
LEA RDI,[RSP + 0x58]
CALL 0x00150ba0
JMP 0x0017514e
LAB_0017514e:
MOV byte ptr [RSP + 0x23],0x1
LAB_00175153:
LEA RDX,[0x78f4b0]
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
CALL 0x00150ba0
JMP 0x0017516b
LAB_0017516b:
MOV byte ptr [RSP + 0x22],0x1
LAB_00175170:
LEA RDX,[0x6cda12]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
CALL 0x001537c0
JMP 0x0017518b
LAB_0017518b:
MOV byte ptr [RSP + 0x21],0x1
JMP 0x001751c4
LAB_00175192:
LEA RDI,[RSP + 0x20]
MOV qword ptr [RSP],RDI
CALL 0x00113550
MOV RDX,qword ptr [RSP]
MOV byte ptr [RSP + 0x1f],0x1
LAB_001751a9:
LEA RSI,[0x6cda0c]
LEA RDI,[RSP + 0x98]
CALL 0x001169d0
LAB_001751bd:
JMP 0x001751bf
LAB_001751bf:
MOV byte ptr [RSP + 0x1e],0x1
LAB_001751c4:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x98]
CALL 0x00150e00
TEST byte ptr [RSP + 0x1e],0x1
JNZ 0x001751df
JMP 0x001751ec
LAB_001751df:
LEA RDI,[RSP + 0x98]
CALL 0x00113768
LAB_001751ec:
TEST byte ptr [RSP + 0x1f],0x1
JNZ 0x001751f5
JMP 0x001751ff
LAB_001751f5:
LEA RDI,[RSP + 0x20]
CALL 0x00112d00
LAB_001751ff:
TEST byte ptr [RSP + 0x21],0x1
JNZ 0x00175208
JMP 0x00175215
LAB_00175208:
LEA RDI,[RSP + 0x98]
CALL 0x00113768
LAB_00175215:
TEST byte ptr [RSP + 0x22],0x1
JNZ 0x0017521e
JMP 0x00175228
LAB_0017521e:
LEA RDI,[RSP + 0x78]
CALL 0x00113768
LAB_00175228:
TEST byte ptr [RSP + 0x23],0x1
JNZ 0x00175231
JMP 0x0017523b
LAB_00175231:
LEA RDI,[RSP + 0x58]
CALL 0x00113768
LAB_0017523b:
TEST byte ptr [RSP + 0x37],0x1
JNZ 0x00175244
JMP 0x0017524e
LAB_00175244:
LEA RDI,[RSP + 0x38]
CALL 0x00113768
LAB_0017524e:
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x78b9a0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0xc8
RET
|
/* cxxopts::exceptions::option_has_no_value::option_has_no_value(std::__cxx11::string const&) */
void __thiscall
cxxopts::exceptions::option_has_no_value::option_has_no_value
(option_has_no_value *this,string *param_1)
{
ulong uVar1;
bool bVar2;
allocator local_a8;
byte local_a7;
byte local_a6;
byte local_a5;
byte local_91;
string local_90 [32];
string local_70 [32];
string local_50 [32];
string local_30 [32];
string *local_10;
option_has_no_value *local_8;
local_10 = param_1;
local_8 = this;
uVar1 = std::__cxx11::string::empty();
local_91 = 0;
local_a5 = 0;
local_a6 = 0;
local_a7 = 0;
bVar2 = (uVar1 & 1) != 0;
if (bVar2) {
std::allocator<char>::allocator();
/* try { // try from 001751a9 to 001751bc has its CatchHandler @ 0017529c */
std::__cxx11::string::string<std::allocator<char>>(local_30,"Option has no value",&local_a8);
}
else {
std::operator+((char *)local_90,(string *)"Option ");
local_91 = 1;
/* try { // try from 00175142 to 0017514b has its CatchHandler @ 00175269 */
std::operator+(local_70,local_90);
local_a5 = 1;
/* try { // try from 00175153 to 00175168 has its CatchHandler @ 0017527c */
std::operator+(local_50,local_70);
local_a6 = 1;
/* try { // try from 00175170 to 00175188 has its CatchHandler @ 0017528c */
std::operator+(local_30,(char *)local_50);
local_a7 = 1;
}
exception::exception((exception *)this,local_30);
if (bVar2) {
std::__cxx11::string::~string(local_30);
std::allocator<char>::~allocator((allocator<char> *)&local_a8);
}
if ((local_a7 & 1) != 0) {
std::__cxx11::string::~string(local_30);
}
if ((local_a6 & 1) != 0) {
std::__cxx11::string::~string(local_50);
}
if ((local_a5 & 1) != 0) {
std::__cxx11::string::~string(local_70);
}
if ((local_91 & 1) != 0) {
std::__cxx11::string::~string(local_90);
}
*(int ***)this = &PTR__option_has_no_value_0078b9b0;
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.