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
|
---|---|---|---|---|---|---|---|---|---|---|---|
600 | get_segment_footer | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | uint32_t *get_segment_footer(segment_t *s) {
if (!s) return 0;
// Calculate the end of the segment's memory block
uintptr_t segment_end = (uintptr_t) (s) + (s->size * BLOCK_SIZE);
// Check for reasonable segment size
if (s->size <= 0 || s->size > MAX_REASONABLE_BLOCKS) {
HEAP_LOG("WARNING: Cannot get footer - segment %p has unreasonable size: %d\n", s, s->size);
return 0;
}
// Subtract the size of the guard value and return the pointer
uintptr_t footer_addr = segment_end - sizeof(uint32_t);
// Check that the footer is within the segment bounds
uintptr_t segment_start = (uintptr_t) (s);
if (footer_addr <= segment_start || footer_addr >= segment_end) {
HEAP_LOG("WARNING: Footer address %p is outside segment bounds [%p-%p]\n",
(void*)footer_addr, s, (void*)segment_end);
return 0;
}
HEAP_LOG("Footer guard address for segment %p: %p\n", s, (void*)footer_addr);
return (uint32_t *) (footer_addr);
} | O1 | c | get_segment_footer:
testq %rdi, %rdi
je 0x29af
movl 0x4(%rdi), %ecx
leal -0x4001(%rcx), %eax
cmpl $0xffffc000, %eax # imm = 0xFFFFC000
jae 0x29b2
xorl %eax, %eax
retq
shlq $0xc, %rcx
leaq (%rcx,%rdi), %rax
addq $-0x4, %rax
addq %rdi, %rcx
xorl %edx, %edx
cmpq %rdi, %rax
cmovbeq %rdx, %rax
cmpq $0x4, %rcx
cmovbq %rdx, %rax
retq
| get_segment_footer:
test rdi, rdi
jz short loc_29AF
mov ecx, [rdi+4]
lea eax, [rcx-4001h]
cmp eax, 0FFFFC000h
jnb short loc_29B2
loc_29AF:
xor eax, eax
retn
loc_29B2:
shl rcx, 0Ch
lea rax, [rcx+rdi]
add rax, 0FFFFFFFFFFFFFFFCh
add rcx, rdi
xor edx, edx
cmp rax, rdi
cmovbe rax, rdx
cmp rcx, 4
cmovb rax, rdx
retn
| unsigned long long get_segment_footer(unsigned long long a1)
{
long long v1; // rcx
unsigned long long result; // rax
long long v3; // rcx
unsigned long long v4; // rcx
if ( !a1 )
return 0LL;
v1 = *(unsigned int *)(a1 + 4);
if ( (unsigned int)(v1 - 16385) < 0xFFFFC000 )
return 0LL;
v3 = v1 << 12;
result = v3 + a1 - 4;
v4 = a1 + v3;
if ( result <= a1 )
result = 0LL;
if ( v4 < 4 )
return 0LL;
return result;
}
| get_segment_footer:
TEST RDI,RDI
JZ 0x001029af
MOV ECX,dword ptr [RDI + 0x4]
LEA EAX,[RCX + -0x4001]
CMP EAX,0xffffc000
JNC 0x001029b2
LAB_001029af:
XOR EAX,EAX
RET
LAB_001029b2:
SHL RCX,0xc
LEA RAX,[RCX + RDI*0x1]
ADD RAX,-0x4
ADD RCX,RDI
XOR EDX,EDX
CMP RAX,RDI
CMOVBE RAX,RDX
CMP RCX,0x4
CMOVC RAX,RDX
RET
|
ulong get_segment_footer(ulong param_1)
{
ulong uVar1;
long lVar2;
if ((param_1 != 0) && (0xffffbfff < *(uint *)(param_1 + 4) - 0x4001)) {
lVar2 = (ulong)*(uint *)(param_1 + 4) * 0x1000;
uVar1 = (lVar2 + param_1) - 4;
if (uVar1 <= param_1) {
uVar1 = 0;
}
if (lVar2 + param_1 < 4) {
uVar1 = 0;
}
return uVar1;
}
return 0;
}
|
|
601 | get_segment_footer | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | uint32_t *get_segment_footer(segment_t *s) {
if (!s) return 0;
// Calculate the end of the segment's memory block
uintptr_t segment_end = (uintptr_t) (s) + (s->size * BLOCK_SIZE);
// Check for reasonable segment size
if (s->size <= 0 || s->size > MAX_REASONABLE_BLOCKS) {
HEAP_LOG("WARNING: Cannot get footer - segment %p has unreasonable size: %d\n", s, s->size);
return 0;
}
// Subtract the size of the guard value and return the pointer
uintptr_t footer_addr = segment_end - sizeof(uint32_t);
// Check that the footer is within the segment bounds
uintptr_t segment_start = (uintptr_t) (s);
if (footer_addr <= segment_start || footer_addr >= segment_end) {
HEAP_LOG("WARNING: Footer address %p is outside segment bounds [%p-%p]\n",
(void*)footer_addr, s, (void*)segment_end);
return 0;
}
HEAP_LOG("Footer guard address for segment %p: %p\n", s, (void*)footer_addr);
return (uint32_t *) (footer_addr);
} | O3 | c | get_segment_footer:
testq %rdi, %rdi
je 0x28fc
movl 0x4(%rdi), %ecx
leal -0x4001(%rcx), %eax
cmpl $0xffffc000, %eax # imm = 0xFFFFC000
jae 0x28ff
xorl %eax, %eax
retq
shlq $0xc, %rcx
leaq (%rcx,%rdi), %rax
addq $-0x4, %rax
addq %rdi, %rcx
xorl %edx, %edx
cmpq %rdi, %rax
cmovbeq %rdx, %rax
cmpq $0x4, %rcx
cmovbq %rdx, %rax
retq
| get_segment_footer:
test rdi, rdi
jz short loc_28FC
mov ecx, [rdi+4]
lea eax, [rcx-4001h]
cmp eax, 0FFFFC000h
jnb short loc_28FF
loc_28FC:
xor eax, eax
retn
loc_28FF:
shl rcx, 0Ch
lea rax, [rcx+rdi]
add rax, 0FFFFFFFFFFFFFFFCh
add rcx, rdi
xor edx, edx
cmp rax, rdi
cmovbe rax, rdx
cmp rcx, 4
cmovb rax, rdx
retn
| unsigned long long get_segment_footer(unsigned long long a1)
{
long long v1; // rcx
unsigned long long result; // rax
long long v3; // rcx
unsigned long long v4; // rcx
if ( !a1 )
return 0LL;
v1 = *(unsigned int *)(a1 + 4);
if ( (unsigned int)(v1 - 16385) < 0xFFFFC000 )
return 0LL;
v3 = v1 << 12;
result = v3 + a1 - 4;
v4 = a1 + v3;
if ( result <= a1 )
result = 0LL;
if ( v4 < 4 )
return 0LL;
return result;
}
| get_segment_footer:
TEST RDI,RDI
JZ 0x001028fc
MOV ECX,dword ptr [RDI + 0x4]
LEA EAX,[RCX + -0x4001]
CMP EAX,0xffffc000
JNC 0x001028ff
LAB_001028fc:
XOR EAX,EAX
RET
LAB_001028ff:
SHL RCX,0xc
LEA RAX,[RCX + RDI*0x1]
ADD RAX,-0x4
ADD RCX,RDI
XOR EDX,EDX
CMP RAX,RDI
CMOVBE RAX,RDX
CMP RCX,0x4
CMOVC RAX,RDX
RET
|
ulong get_segment_footer(ulong param_1)
{
ulong uVar1;
long lVar2;
if ((param_1 != 0) && (0xffffbfff < *(uint *)(param_1 + 4) - 0x4001)) {
lVar2 = (ulong)*(uint *)(param_1 + 4) * 0x1000;
uVar1 = (lVar2 + param_1) - 4;
if (uVar1 <= param_1) {
uVar1 = 0;
}
if (lVar2 + param_1 < 4) {
uVar1 = 0;
}
return uVar1;
}
return 0;
}
|
|
602 | my_casedn_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_casedn_utf8mb4(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O0 | c | my_casedn_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x74aea
jmp 0x74aec
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x74b1c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x74660
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x74b25
jmp 0x74b78
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x78ac0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x74690
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x74b51
jmp 0x74b78
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x74aec
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_casedn_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_74AEA:
jmp short $+2
loc_74AEC:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_74B1C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_74B1C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_74B25
jmp short loc_74B78
loc_74B25:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_wc_mb_utf8mb4
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_74B51
jmp short loc_74B78
loc_74B51:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_74AEC
loc_74B78:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_tolower_utf8mb4(v8, v14);
v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
| my_casedn_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00174aea
LAB_00174aea:
JMP 0x00174aec
LAB_00174aec:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x00174b1c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00174660
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_00174b1c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x00174b25
JMP 0x00174b78
LAB_00174b25:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x00178ac0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00174690
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x00174b51
JMP 0x00174b78
LAB_00174b51:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00174aec
LAB_00174b78:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tolower_utf8mb4(uVar1,&local_38);
iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
|
|
603 | minja::Value::to_str[abi:cxx11]() const | llama.cpp/common/minja/minja.hpp | std::string to_str() const {
if (is_string()) return get<std::string>();
if (is_number_integer()) return std::to_string(get<int64_t>());
if (is_number_float()) return std::to_string(get<double>());
if (is_boolean()) return get<bool>() ? "True" : "False";
if (is_null()) return "None";
return dump();
} | O3 | cpp | minja::Value::to_str[abi:cxx11]() const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x40(%rsi), %eax
cmpl $0x3, %eax
jne 0x7e3bd
movq %rbx, %rdi
callq 0x75e92
jmp 0x7e526
leal -0x5(%rax), %ecx
cmpb $0x1, %cl
ja 0x7e444
movq %rsi, %rdi
callq 0x790b6
movq %rax, %r15
movq %rax, %r14
negq %r14
cmovsq %rax, %r14
movl $0x1, %r12d
cmpq $0xa, %r14
jb 0x7e4f9
movl $0x4, %r12d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0x7e4f0
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x7e4f6
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x7e4f9
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r12d
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x7e3fd
addl $-0x3, %r12d
jmp 0x7e4f9
cmpl $0x4, %eax
je 0x7e478
cmpl $0x7, %eax
jne 0x7e4a7
movq %rsi, %rdi
callq 0x75d7c
movq 0x81b0b(%rip), %rsi # 0xfff68
leaq 0x4e0dd(%rip), %rcx # 0xcc541
movl $0x148, %edx # imm = 0x148
movq %rbx, %rdi
movb $0x1, %al
callq 0x7e535
jmp 0x7e526
movq %rsi, %rdi
callq 0x75c6c
leaq 0x4da6c(%rip), %rcx # 0xcbef3
leaq 0x4da6a(%rip), %rsi # 0xcbef8
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movzbl %al, %edx
xorq $0x5, %rdx
addq %rsi, %rdx
jmp 0x7e4d5
testl %eax, %eax
jne 0x7e4df
cmpq $0x0, 0x20(%rsi)
jne 0x7e4df
cmpq $0x0, 0x10(%rsi)
jne 0x7e4df
cmpq $0x0, 0x30(%rsi)
jne 0x7e4df
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x4e06e(%rip), %rsi # 0xcc53c
leaq 0x4e06b(%rip), %rdx # 0xcc540
movq %rbx, %rdi
callq 0x3fe82
jmp 0x7e526
movq %rbx, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6cb9a
jmp 0x7e526
addl $-0x2, %r12d
jmp 0x7e4f9
decl %r12d
shrq $0x3f, %r15
leal (%r15,%r12), %esi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x1c750
addq (%rbx), %r15
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x2fca1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZNK5minja5Value6to_strB5cxx11Ev:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
movzx eax, byte ptr [rsi+40h]
cmp eax, 3
jnz short loc_7E3BD
mov rdi, rbx
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
jmp loc_7E526
loc_7E3BD:
lea ecx, [rax-5]
cmp cl, 1
ja short loc_7E444
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov r14, rax
neg r14
cmovs r14, rax
mov r12d, 1
cmp r14, 0Ah
jb loc_7E4F9
mov r12d, 4
mov rsi, 346DC5D63886594Bh
mov rcx, r14
loc_7E3FD:
cmp rcx, 63h ; 'c'
jbe loc_7E4F0
cmp rcx, 3E7h
jbe loc_7E4F6
cmp rcx, 2710h
jb loc_7E4F9
mov rax, rcx
mul rsi
shr rdx, 0Bh
add r12d, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_7E3FD
add r12d, 0FFFFFFFDh
jmp loc_7E4F9
loc_7E444:
cmp eax, 4
jz short loc_7E478
cmp eax, 7
jnz short loc_7E4A7
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
mov rsi, cs:vsnprintf_ptr
lea rcx, asc_CC541; "%f"
mov edx, 148h
mov rdi, rbx
mov al, 1
call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...)
jmp loc_7E526
loc_7E478:
mov rdi, rsi
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse_1; "False"
test al, al
cmovnz rsi, rcx
lea rcx, [rbx+10h]
mov [rbx], rcx
movzx edx, al
xor rdx, 5
add rdx, rsi
jmp short loc_7E4D5
loc_7E4A7:
test eax, eax
jnz short loc_7E4DF
cmp qword ptr [rsi+20h], 0
jnz short loc_7E4DF
cmp qword ptr [rsi+10h], 0
jnz short loc_7E4DF
cmp qword ptr [rsi+30h], 0
jnz short loc_7E4DF
lea rax, [rbx+10h]
mov [rbx], rax
lea rsi, aNone_0; "None"
lea rdx, aNone_0+4; ""
loc_7E4D5:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
jmp short loc_7E526
loc_7E4DF:
mov rdi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short loc_7E526
loc_7E4F0:
add r12d, 0FFFFFFFEh
jmp short loc_7E4F9
loc_7E4F6:
dec r12d
loc_7E4F9:
shr r15, 3Fh
lea esi, [r15+r12]
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, rbx
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r15, [rbx]
mov rdi, r15
mov esi, r12d
mov rdx, r14
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
loc_7E526:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _QWORD * minja::Value::to_str[abi:cxx11](_QWORD *a1, long long a2)
{
char v2; // al
int v3; // eax
long long v4; // rax
unsigned long long v5; // r14
int v6; // r12d
unsigned long long v7; // rcx
bool v8; // cc
int v9; // r8d
int v10; // r9d
unsigned __int8 v11; // al
char *v12; // rsi
char *v13; // rdx
unsigned long long v14; // r15
char v16; // [rsp-8h] [rbp-28h]
v16 = v2;
v3 = *(unsigned __int8 *)(a2 + 64);
if ( v3 == 3 )
{
minja::Value::get<std::string>((long long)a1, (_QWORD *)a2);
}
else
{
if ( (unsigned __int8)(v3 - 5) > 1u )
{
if ( v3 == 4 )
{
v11 = minja::Value::get<bool>((_QWORD *)a2);
v12 = "False";
if ( v11 )
v12 = "True";
*a1 = a1 + 2;
v13 = &v12[v11 ^ 5LL];
}
else
{
if ( v3 == 7 )
{
minja::Value::get<double>((_QWORD *)a2);
__gnu_cxx::__to_xstring<std::string,char>(
(_DWORD)a1,
(unsigned int)&vsnprintf,
328,
(unsigned int)"%f",
v9,
v10,
v16);
return a1;
}
if ( *(_BYTE *)(a2 + 64) || *(_QWORD *)(a2 + 32) || *(_QWORD *)(a2 + 16) || *(_QWORD *)(a2 + 48) )
{
minja::Value::dump[abi:cxx11]((long long)a1, a2, 0xFFFFFFFF, 0);
return a1;
}
*a1 = a1 + 2;
v12 = "None";
v13 = "";
}
std::string::_M_construct<char const*>((long long)a1, v12, (long long)v13);
return a1;
}
v4 = minja::Value::get<long>((_QWORD *)a2);
v5 = -v4;
if ( v4 > 0 )
v5 = v4;
v6 = 1;
if ( v5 >= 0xA )
{
v6 = 4;
v7 = v5;
while ( 1 )
{
if ( v7 <= 0x63 )
{
v6 -= 2;
goto LABEL_28;
}
if ( v7 <= 0x3E7 )
break;
if ( v7 < 0x2710 )
goto LABEL_28;
v6 += 4;
v8 = v7 <= 0x1869F;
v7 /= 0x2710uLL;
if ( v8 )
{
v6 -= 3;
goto LABEL_28;
}
}
--v6;
}
LABEL_28:
v14 = (unsigned long long)v4 >> 63;
*a1 = a1 + 2;
std::string::_M_construct(a1, (unsigned int)((unsigned long long)v4 >> 63) + v6, 45LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)(*a1 + v14), v6, v5);
}
return a1;
}
| to_str[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVZX EAX,byte ptr [RSI + 0x40]
CMP EAX,0x3
JNZ 0x0017e3bd
MOV RDI,RBX
CALL 0x00175e92
JMP 0x0017e526
LAB_0017e3bd:
LEA ECX,[RAX + -0x5]
CMP CL,0x1
JA 0x0017e444
MOV RDI,RSI
CALL 0x001790b6
MOV R15,RAX
MOV R14,RAX
NEG R14
CMOVS R14,RAX
MOV R12D,0x1
CMP R14,0xa
JC 0x0017e4f9
MOV R12D,0x4
MOV RSI,0x346dc5d63886594b
MOV RCX,R14
LAB_0017e3fd:
CMP RCX,0x63
JBE 0x0017e4f0
CMP RCX,0x3e7
JBE 0x0017e4f6
CMP RCX,0x2710
JC 0x0017e4f9
MOV RAX,RCX
MUL RSI
SHR RDX,0xb
ADD R12D,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x0017e3fd
ADD R12D,-0x3
JMP 0x0017e4f9
LAB_0017e444:
CMP EAX,0x4
JZ 0x0017e478
CMP EAX,0x7
JNZ 0x0017e4a7
MOV RDI,RSI
CALL 0x00175d7c
MOV RSI,qword ptr [0x001fff68]
LEA RCX,[0x1cc541]
MOV EDX,0x148
MOV RDI,RBX
MOV AL,0x1
CALL 0x0017e535
JMP 0x0017e526
LAB_0017e478:
MOV RDI,RSI
CALL 0x00175c6c
LEA RCX,[0x1cbef3]
LEA RSI,[0x1cbef8]
TEST AL,AL
CMOVNZ RSI,RCX
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOVZX EDX,AL
XOR RDX,0x5
ADD RDX,RSI
JMP 0x0017e4d5
LAB_0017e4a7:
TEST EAX,EAX
JNZ 0x0017e4df
CMP qword ptr [RSI + 0x20],0x0
JNZ 0x0017e4df
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x0017e4df
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x0017e4df
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1cc53c]
LEA RDX,[0x1cc540]
LAB_0017e4d5:
MOV RDI,RBX
CALL 0x0013fe82
JMP 0x0017e526
LAB_0017e4df:
MOV RDI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016cb9a
JMP 0x0017e526
LAB_0017e4f0:
ADD R12D,-0x2
JMP 0x0017e4f9
LAB_0017e4f6:
DEC R12D
LAB_0017e4f9:
SHR R15,0x3f
LEA ESI,[R15 + R12*0x1]
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDI,RBX
MOV EDX,0x2d
CALL 0x0011c750
ADD R15,qword ptr [RBX]
MOV RDI,R15
MOV ESI,R12D
MOV RDX,R14
CALL 0x0012fca1
LAB_0017e526:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Value::to_str[abi:cxx11]() const */
void minja::Value::to_str_abi_cxx11_(void)
{
Value VVar1;
bool bVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
Value *in_RSI;
_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *in_RDI;
uint uVar6;
ulong uVar7;
VVar1 = in_RSI[0x40];
if (VVar1 == (Value)0x3) {
get<std::__cxx11::string>();
}
else if ((byte)((char)VVar1 - 5U) < 2) {
uVar4 = get<long>(in_RSI);
uVar7 = -uVar4;
if (0 < (long)uVar4) {
uVar7 = uVar4;
}
uVar6 = 1;
if (9 < uVar7) {
uVar5 = uVar7;
uVar3 = 4;
do {
uVar6 = uVar3;
if (uVar5 < 100) {
uVar6 = uVar6 - 2;
goto LAB_0017e4f9;
}
if (uVar5 < 1000) {
uVar6 = uVar6 - 1;
goto LAB_0017e4f9;
}
if (uVar5 < 10000) goto LAB_0017e4f9;
bVar2 = 99999 < uVar5;
uVar5 = uVar5 / 10000;
uVar3 = uVar6 + 4;
} while (bVar2);
uVar6 = uVar6 + 1;
}
LAB_0017e4f9:
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
std::__cxx11::string::_M_construct((ulong)in_RDI,(char)uVar6 - (char)((long)uVar4 >> 0x3f));
std::__detail::__to_chars_10_impl<unsigned_long>
((char *)(*(long *)in_RDI - ((long)uVar4 >> 0x3f)),uVar6,uVar7);
}
else {
if (VVar1 == (Value)0x4) {
get<bool>(in_RSI);
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
}
else {
if (VVar1 == (Value)0x7) {
get<double>(in_RSI);
__gnu_cxx::__to_xstring<std::__cxx11::string,char>
(in_RDI,(ulong)PTR_vsnprintf_001fff68,(char *)0x148,&DAT_001cc541);
return;
}
if ((((VVar1 != (Value)0x0) || (*(long *)(in_RSI + 0x20) != 0)) ||
(*(long *)(in_RSI + 0x10) != 0)) || (*(long *)(in_RSI + 0x30) != 0)) {
dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0));
return;
}
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
}
std::__cxx11::string::_M_construct<char_const*>();
}
return;
}
|
|
604 | my_open | eloqsql/mysys/my_open.c | File my_open(const char *FileName, int Flags, myf MyFlags)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
{
File fd;
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu",
FileName, Flags, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF)))
MyFlags|= my_global_flags;
#if defined(_WIN32)
fd= my_win_open(FileName, Flags);
#else
if (MyFlags & MY_NOSYMLINKS)
fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask);
else
fd = open(FileName, Flags | O_CLOEXEC, my_umask);
#endif
fd= my_register_filename(fd, FileName, FILE_BY_OPEN,
EE_FILENOTFOUND, MyFlags);
DBUG_RETURN(fd);
} | O0 | c | my_open:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x81045
movq -0x18(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
jne 0x81065
leaq 0x3779de(%rip), %rax # 0x3f8a38
movq (%rax), %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x81095
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x1b79ff(%rip), %rax # 0x238a88
movl (%rax), %edx
callq 0x810f0
movl %eax, -0x1c(%rbp)
jmp 0x810b5
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x1b79df(%rip), %rax # 0x238a88
movl (%rax), %edx
movb $0x0, %al
callq 0x28610
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %r8
movl $0x1, %edx
movl $0x1d, %ecx
callq 0x81160
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_open:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
jmp short $+2
loc_81045:
mov rax, [rbp+var_18]
and rax, 19h
cmp rax, 0
jnz short loc_81065
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_81065:
mov rax, [rbp+var_18]
and rax, 200h
cmp rax, 0
jz short loc_81095
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
call open_nosymlinks
mov [rbp+var_1C], eax
jmp short loc_810B5
loc_81095:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
mov al, 0
call _open64
mov [rbp+var_1C], eax
loc_810B5:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_8]
mov r8, [rbp+var_18]
mov edx, 1
mov ecx, 1Dh
call my_register_filename
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long my_open(long long a1, int a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = a3;
if ( (a3 & 0x19) == 0 )
v5 = a3 | my_global_flags;
if ( (v5 & 0x200) != 0 )
v4 = open_nosymlinks(a1, a2 | 0x80000u, my_umask);
else
v4 = open64(a1, a2 | 0x80000u, my_umask);
return (unsigned int)my_register_filename(v4, a1, 1LL, 29LL, v5);
}
| my_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x00181045
LAB_00181045:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x19
CMP RAX,0x0
JNZ 0x00181065
LEA RAX,[0x4f8a38]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
LAB_00181065:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x200
CMP RAX,0x0
JZ 0x00181095
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x338a88]
MOV EDX,dword ptr [RAX]
CALL 0x001810f0
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001810b5
LAB_00181095:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x338a88]
MOV EDX,dword ptr [RAX]
MOV AL,0x0
CALL 0x00128610
MOV dword ptr [RBP + -0x1c],EAX
LAB_001810b5:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RBP + -0x18]
MOV EDX,0x1
MOV ECX,0x1d
CALL 0x00181160
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int4 my_open(char *param_1,uint param_2,ulong param_3)
{
int4 uVar1;
int4 local_24;
int8 local_20;
local_20 = param_3;
if ((param_3 & 0x19) == 0) {
local_20 = my_global_flags | param_3;
}
if ((local_20 & 0x200) == 0) {
local_24 = open64(param_1,param_2 | 0x80000,(ulong)my_umask);
}
else {
local_24 = open_nosymlinks(param_1,param_2 | 0x80000,my_umask);
}
uVar1 = my_register_filename(local_24,param_1,1,0x1d,local_20);
return uVar1;
}
|
|
605 | clampVec | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_forward.c | static void clampVec(mjtNum* vec, const mjtNum* range, const mjtByte* limited, int n,
const int* index) {
for (int i=0; i < n; i++) {
int j = index ? index[i] : i;
if (limited[i]) {
vec[j] = mju_clip(vec[j], range[2*i], range[2*i + 1]);
}
}
} | O0 | c | clampVec:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x8edeb
cmpq $0x0, 0x10(%rsp)
je 0x8ed6d
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x4(%rsp)
jmp 0x8ed75
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x8edd9
movq 0x30(%rsp), %rax
movslq 0x8(%rsp), %rcx
vmovsd (%rax,%rcx,8), %xmm0
movq 0x28(%rsp), %rax
movl 0xc(%rsp), %ecx
shll %ecx
movslq %ecx, %rcx
vmovsd (%rax,%rcx,8), %xmm1
movq 0x28(%rsp), %rax
movl 0xc(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
vmovsd (%rax,%rcx,8), %xmm2
callq 0x496b0
movq 0x30(%rsp), %rax
movslq 0x8(%rsp), %rcx
vmovsd %xmm0, (%rax,%rcx,8)
jmp 0x8eddb
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x8ed44
addq $0x38, %rsp
retq
| clampVec:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_1C], ecx
mov [rsp+38h+var_28], r8
mov [rsp+38h+var_2C], 0
loc_8ED44:
mov eax, [rsp+38h+var_2C]
cmp eax, [rsp+38h+var_1C]
jge loc_8EDEB
cmp [rsp+38h+var_28], 0
jz short loc_8ED6D
mov rax, [rsp+38h+var_28]
movsxd rcx, [rsp+38h+var_2C]
mov eax, [rax+rcx*4]
mov [rsp+38h+var_34], eax
jmp short loc_8ED75
loc_8ED6D:
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_34], eax
loc_8ED75:
mov eax, [rsp+38h+var_34]
mov [rsp+38h+var_30], eax
mov rax, [rsp+38h+var_18]
movsxd rcx, [rsp+38h+var_2C]
cmp byte ptr [rax+rcx], 0
jz short loc_8EDD9
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_30]
vmovsd xmm0, qword ptr [rax+rcx*8]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_2C]
shl ecx, 1
movsxd rcx, ecx
vmovsd xmm1, qword ptr [rax+rcx*8]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_2C]
shl ecx, 1
add ecx, 1
movsxd rcx, ecx
vmovsd xmm2, qword ptr [rax+rcx*8]
call _mju_clip
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_30]
vmovsd qword ptr [rax+rcx*8], xmm0
loc_8EDD9:
jmp short $+2
loc_8EDDB:
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp loc_8ED44
loc_8EDEB:
add rsp, 38h
retn
| long long clampVec(long long a1, long long a2, long long a3, int a4, long long a5)
{
long long result; // rax
unsigned int v17; // [rsp+4h] [rbp-34h]
unsigned int i; // [rsp+Ch] [rbp-2Ch]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a4 )
break;
if ( a5 )
v17 = *(_DWORD *)(a5 + 4LL * (int)i);
else
v17 = i;
if ( *(_BYTE *)(a3 + (int)i) )
{
_RAX = a1;
_RCX = (int)v17;
__asm { vmovsd xmm0, qword ptr [rax+rcx*8] }
_RAX = a2;
_RCX = (int)(2 * i);
__asm { vmovsd xmm1, qword ptr [rax+rcx*8] }
_RAX = a2;
_RCX = (int)(2 * i + 1);
__asm { vmovsd xmm2, qword ptr [rax+rcx*8] }
*(double *)&_XMM0 = mju_clip(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2);
_RAX = a1;
_RCX = (int)v17;
__asm { vmovsd qword ptr [rax+rcx*8], xmm0 }
}
}
return result;
}
| clampVec:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV dword ptr [RSP + 0xc],0x0
LAB_0018ed44:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x1c]
JGE 0x0018edeb
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0018ed6d
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0018ed75
LAB_0018ed6d:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x4],EAX
LAB_0018ed75:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x8],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x0018edd9
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x8]
VMOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0xc]
SHL ECX,0x1
MOVSXD RCX,ECX
VMOVSD XMM1,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0xc]
SHL ECX,0x1
ADD ECX,0x1
MOVSXD RCX,ECX
VMOVSD XMM2,qword ptr [RAX + RCX*0x8]
CALL 0x001496b0
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x8]
VMOVSD qword ptr [RAX + RCX*0x8],XMM0
LAB_0018edd9:
JMP 0x0018eddb
LAB_0018eddb:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0018ed44
LAB_0018edeb:
ADD RSP,0x38
RET
|
void clampVec(long param_1,long param_2,long param_3,int param_4,long param_5)
{
int8 uVar1;
int4 local_34;
int4 local_2c;
for (local_2c = 0; local_2c < param_4; local_2c = local_2c + 1) {
if (param_5 == 0) {
local_34 = local_2c;
}
else {
local_34 = *(int *)(param_5 + (long)local_2c * 4);
}
if (*(char *)(param_3 + local_2c) != '\0') {
uVar1 = mju_clip(*(int8 *)(param_1 + (long)local_34 * 8),
*(int8 *)(param_2 + (long)(local_2c << 1) * 8),
*(int8 *)(param_2 + (long)(local_2c * 2 + 1) * 8));
*(int8 *)(param_1 + (long)local_34 * 8) = uVar1;
}
}
return;
}
|
|
606 | ma_cmp_static_unique | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_cmp_static_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record, MARIA_RECORD_POS pos)
{
DBUG_ENTER("_ma_cmp_static_unique");
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, info->rec_buff, info->s->base.reclength,
pos, MYF(MY_NABP)))
DBUG_RETURN(1);
DBUG_RETURN(_ma_unique_comp(def, record, info->rec_buff,
def->null_are_equal));
} | O0 | c | ma_cmp_static_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x3a0(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x45ffb
jmp 0x45ff5
movb $0x1, -0x1(%rbp)
jmp 0x46020
jmp 0x45ffd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rdx
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0x68780
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_cmp_static_unique:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+3A0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_28]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_45FFB
jmp short $+2
loc_45FF5:
mov [rbp+var_1], 1
jmp short loc_46020
loc_45FFB:
jmp short $+2
loc_45FFD:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax+3]
call _ma_unique_comp
mov [rbp+var_1], al
loc_46020:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_cmp_static_unique(long long a1, long long a2, long long a3, long long a4)
{
*(_DWORD *)(a1 + 1432) = 1;
if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
*(_QWORD *)(a1 + 928),
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a4,
4LL) )
{
return 1;
}
else
{
return ma_unique_comp(a2, a3, *(_QWORD *)(a1 + 928), (unsigned int)*(char *)(a2 + 3));
}
}
| _ma_cmp_static_unique:
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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x00145ffb
JMP 0x00145ff5
LAB_00145ff5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00146020
LAB_00145ffb:
JMP 0x00145ffd
LAB_00145ffd:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x00168780
MOV byte ptr [RBP + -0x1],AL
LAB_00146020:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 local_9;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_4,4);
if (lVar1 == 0) {
local_9 = _ma_unique_comp(param_2,param_3,param_1[0x74],(int)*(char *)(param_2 + 3));
}
else {
local_9 = 1;
}
return local_9;
}
|
|
607 | ma_pvio_wait_io_or_timeout | eloqsql/libmariadb/libmariadb/ma_pvio.c | int ma_pvio_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout)
{
if (pvio)
{
if (IS_PVIO_ASYNC_ACTIVE(pvio))
return ma_pvio_wait_async(pvio->mysql->options.extension->async_context,
(is_read) ? VIO_IO_EVENT_READ : VIO_IO_EVENT_WRITE,
timeout);
if (pvio && pvio->methods->wait_io_or_timeout)
return pvio->methods->wait_io_or_timeout(pvio, is_read, timeout);
}
return 1;
} | O3 | c | ma_pvio_wait_io_or_timeout:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %eax
testq %rdi, %rdi
je 0x2049d
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
je 0x20484
movq 0x480(%rcx), %rcx
testq %rcx, %rcx
je 0x20484
movq 0x28(%rcx), %rbx
testq %rbx, %rbx
je 0x20484
cmpb $0x0, 0x14(%rbx)
je 0x20484
xorl %eax, %eax
cmpb $0x1, %sil
adcl $0x1, %eax
movl %eax, (%rbx)
testl %edx, %edx
js 0x2044b
orl $0x8, %eax
movl %eax, (%rbx)
movl %edx, 0x10(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x2045f
movq 0x28(%rbx), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%rbx), %rdi
callq 0x3068d
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x20479
movq 0x28(%rbx), %rsi
xorl %edi, %edi
callq *%rax
xorl %eax, %eax
testb $0x8, 0x4(%rbx)
sete %al
jmp 0x2049d
movq 0x48(%rdi), %rcx
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
je 0x2049d
movsbl %sil, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ma_pvio_wait_io_or_timeout:
push rbp
mov rbp, rsp
push rbx
push rax
mov eax, 1
test rdi, rdi
jz loc_2049D
mov rcx, [rdi+40h]
test rcx, rcx
jz short loc_20484
mov rcx, [rcx+480h]
test rcx, rcx
jz short loc_20484
mov rbx, [rcx+28h]
test rbx, rbx
jz short loc_20484
cmp byte ptr [rbx+14h], 0
jz short loc_20484
xor eax, eax
cmp sil, 1
adc eax, 1
mov [rbx], eax
test edx, edx
js short loc_2044B
or eax, 8
mov [rbx], eax
mov [rbx+10h], edx
loc_2044B:
mov rax, [rbx+20h]
test rax, rax
jz short loc_2045F
mov rsi, [rbx+28h]
mov edi, 1
call rax
loc_2045F:
lea rdi, [rbx+38h]
call my_context_yield
mov rax, [rbx+20h]
test rax, rax
jz short loc_20479
mov rsi, [rbx+28h]
xor edi, edi
call rax
loc_20479:
xor eax, eax
test byte ptr [rbx+4], 8
setz al
jmp short loc_2049D
loc_20484:
mov rcx, [rdi+48h]
mov rcx, [rcx+30h]
test rcx, rcx
jz short loc_2049D
movsx esi, sil
add rsp, 8
pop rbx
pop rbp
jmp rcx
loc_2049D:
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_pvio_wait_io_or_timeout(long long a1, char a2, int a3)
{
long long result; // rax
long long v4; // rcx
long long v5; // rcx
long long v6; // rbx
int v7; // eax
void ( *v8)(long long, _QWORD); // rax
void ( *v9)(_QWORD, _QWORD); // rax
long long ( *v10)(long long, _QWORD); // rcx
result = 1LL;
if ( a1 )
{
v4 = *(_QWORD *)(a1 + 64);
if ( v4 && (v5 = *(_QWORD *)(v4 + 1152)) != 0 && (v6 = *(_QWORD *)(v5 + 40)) != 0 && *(_BYTE *)(v6 + 20) )
{
v7 = (a2 == 0) + 1;
*(_DWORD *)v6 = v7;
if ( a3 >= 0 )
{
*(_DWORD *)v6 = v7 | 8;
*(_DWORD *)(v6 + 16) = a3;
}
v8 = *(void ( **)(long long, _QWORD))(v6 + 32);
if ( v8 )
v8(1LL, *(_QWORD *)(v6 + 40));
my_context_yield(v6 + 56);
v9 = *(void ( **)(_QWORD, _QWORD))(v6 + 32);
if ( v9 )
v9(0LL, *(_QWORD *)(v6 + 40));
return (*(_BYTE *)(v6 + 4) & 8) == 0;
}
else
{
v10 = *(long long ( **)(long long, _QWORD))(*(_QWORD *)(a1 + 72) + 48LL);
if ( v10 )
return v10(a1, (unsigned int)a2);
}
}
return result;
}
| ma_pvio_wait_io_or_timeout:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EAX,0x1
TEST RDI,RDI
JZ 0x0012049d
MOV RCX,qword ptr [RDI + 0x40]
TEST RCX,RCX
JZ 0x00120484
MOV RCX,qword ptr [RCX + 0x480]
TEST RCX,RCX
JZ 0x00120484
MOV RBX,qword ptr [RCX + 0x28]
TEST RBX,RBX
JZ 0x00120484
CMP byte ptr [RBX + 0x14],0x0
JZ 0x00120484
XOR EAX,EAX
CMP SIL,0x1
ADC EAX,0x1
MOV dword ptr [RBX],EAX
TEST EDX,EDX
JS 0x0012044b
OR EAX,0x8
MOV dword ptr [RBX],EAX
MOV dword ptr [RBX + 0x10],EDX
LAB_0012044b:
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x0012045f
MOV RSI,qword ptr [RBX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0012045f:
LEA RDI,[RBX + 0x38]
CALL 0x0013068d
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x00120479
MOV RSI,qword ptr [RBX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_00120479:
XOR EAX,EAX
TEST byte ptr [RBX + 0x4],0x8
SETZ AL
JMP 0x0012049d
LAB_00120484:
MOV RCX,qword ptr [RDI + 0x48]
MOV RCX,qword ptr [RCX + 0x30]
TEST RCX,RCX
JZ 0x0012049d
MOVSX ESI,SIL
ADD RSP,0x8
POP RBX
POP RBP
JMP RCX
LAB_0012049d:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
ulong ma_pvio_wait_io_or_timeout(long param_1,char param_2,uint param_3)
{
long lVar1;
uint *puVar2;
code *UNRECOVERED_JUMPTABLE;
uint uVar3;
ulong uVar4;
uVar4 = 1;
if (param_1 != 0) {
if ((((*(long *)(param_1 + 0x40) == 0) ||
(lVar1 = *(long *)(*(long *)(param_1 + 0x40) + 0x480), lVar1 == 0)) ||
(puVar2 = *(uint **)(lVar1 + 0x28), puVar2 == (uint *)0x0)) || ((char)puVar2[5] == '\0')) {
UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1 + 0x48) + 0x30);
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
/* WARNING: Could not recover jumptable at 0x0012049b. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*UNRECOVERED_JUMPTABLE)(param_1,(int)param_2);
return uVar4;
}
}
else {
uVar3 = (param_2 == '\0') + 1;
*puVar2 = uVar3;
if (-1 < (int)param_3) {
*puVar2 = uVar3 | 8;
puVar2[4] = param_3;
}
if (*(code **)(puVar2 + 8) != (code *)0x0) {
(**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10));
}
my_context_yield(puVar2 + 0xe);
if (*(code **)(puVar2 + 8) != (code *)0x0) {
(**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10));
}
uVar4 = (ulong)((puVar2[1] & 8) == 0);
}
}
return uVar4;
}
|
|
608 | my_realloc | eloqsql/mysys/my_malloc.c | void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags)
{
my_memory_header *old_mh, *mh;
void *point;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_realloc");
DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags));
DBUG_ASSERT(size > 0);
if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(key, size, my_flags));
old_mh= USER_TO_HEADER(old_point);
old_size= old_mh->m_size & ~1;
old_flags= old_mh->m_size & 1;
DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED);
DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC));
size= ALIGN_SIZE(size);
mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
if (size < old_size)
DBUG_RETURN(old_point);
my_errno=errno;
if (my_flags & MY_FREE_ON_ERROR)
{
/* my_free will take care of size accounting */
my_free(old_point);
old_point= 0;
}
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
point= NULL;
}
else
{
mh->m_size= size | old_flags;
mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner);
update_malloc_size((longlong)size - (longlong)old_size, old_flags);
point= HEADER_TO_USER(mh);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O0 | c | my_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
jmp 0x28619
jmp 0x2861b
jmp 0x2861d
cmpq $0x0, -0x18(%rbp)
jne 0x2864d
movq -0x28(%rbp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x2864d
jmp 0x28634
movl -0xc(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x28430
movq %rax, -0x8(%rbp)
jmp 0x28797
movq -0x18(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x1, %rax
movb %al, -0x49(%rbp)
jmp 0x2867a
jmp 0x2867c
jmp 0x2867e
movq -0x20(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
callq 0x244e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x28729
movq -0x20(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x286c7
jmp 0x286ba
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28797
callq 0x24040
movl (%rax), %eax
movl %eax, -0x50(%rbp)
callq 0x29050
movl -0x50(%rbp), %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x286fc
movq -0x18(%rbp), %rdi
callq 0x287b0
movq $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x2871f
movq -0x20(%rbp), %rdx
movl $0x5, %edi
movl $0x1004, %esi # imm = 0x1004
movb $0x0, %al
callq 0x303c0
movq $0x0, -0x40(%rbp)
jmp 0x28789
movq -0x20(%rbp), %rcx
movsbq -0x49(%rbp), %rax
orq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq 0x1a831c(%rip), %rax # 0x1d0a60
movq (%rax), %rax
movq 0x3e8(%rax), %rax
movl -0xc(%rbp), %edi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq *%rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq 0x1a7e01(%rip), %rax # 0x1d0570
movq -0x20(%rbp), %rdi
subq -0x48(%rbp), %rdi
movsbl -0x49(%rbp), %esi
callq *%rax
movq -0x38(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
jmp 0x2878b
jmp 0x2878d
jmp 0x2878f
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_realloc:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
jmp short $+2
loc_28619:
jmp short $+2
loc_2861B:
jmp short $+2
loc_2861D:
cmp [rbp+var_18], 0
jnz short loc_2864D
mov rax, [rbp+var_28]
and rax, 40h
cmp rax, 0
jz short loc_2864D
jmp short $+2
loc_28634:
mov edi, [rbp+var_C]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_malloc
mov [rbp+var_8], rax
jmp loc_28797
loc_2864D:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
and rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
and rax, 1
mov [rbp+var_49], al
jmp short $+2
loc_2867A:
jmp short $+2
loc_2867C:
jmp short $+2
loc_2867E:
mov rax, [rbp+var_20]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_20], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
add rsi, 18h
call _realloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_28729
mov rax, [rbp+var_20]
cmp rax, [rbp+var_48]
jnb short loc_286C7
jmp short $+2
loc_286BA:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp loc_28797
loc_286C7:
call ___errno_location
mov eax, [rax]
mov [rbp+var_50], eax
call _my_thread_var
mov ecx, [rbp+var_50]
mov [rax], ecx
mov rax, [rbp+var_28]
and rax, 80h
cmp rax, 0
jz short loc_286FC
mov rdi, [rbp+var_18]
call my_free
mov [rbp+var_18], 0
loc_286FC:
mov rax, [rbp+var_28]
and rax, 18h
cmp rax, 0
jz short loc_2871F
mov rdx, [rbp+var_20]
mov edi, 5
mov esi, 1004h
mov al, 0
call my_error
loc_2871F:
mov [rbp+var_40], 0
jmp short loc_28789
loc_28729:
mov rcx, [rbp+var_20]
movsx rax, [rbp+var_49]
or rcx, rax
mov rax, [rbp+var_38]
mov [rax+8], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+3E8h]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_38]
call rax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, cs:update_malloc_size
mov rdi, [rbp+var_20]
sub rdi, [rbp+var_48]
movsx esi, [rbp+var_49]
call rax ; dummy
mov rax, [rbp+var_38]
add rax, 18h
mov [rbp+var_40], rax
loc_28789:
jmp short $+2
loc_2878B:
jmp short $+2
loc_2878D:
jmp short $+2
loc_2878F:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_28797:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long my_realloc(unsigned int a1, long long a2, unsigned long long a3, char a4)
{
_DWORD *v4; // rax
int v5; // r8d
int v6; // r9d
int v7; // ecx
int v9; // [rsp+0h] [rbp-50h]
char v10; // [rsp+7h] [rbp-49h]
unsigned long long v11; // [rsp+8h] [rbp-48h]
long long v13; // [rsp+18h] [rbp-38h]
unsigned long long v15; // [rsp+30h] [rbp-20h]
if ( a2 || (a4 & 0x40) == 0 )
{
v11 = *(_QWORD *)(a2 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL;
v10 = *(_BYTE *)(a2 - 24 + 8) & 1;
v15 = (a3 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v13 = realloc(a2 - 24, v15 + 24);
if ( v13 )
{
*(_QWORD *)(v13 + 8) = v10 | v15;
*(_DWORD *)(v13 + 16) = (*((long long ( **)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[0]
+ 125))(
a1,
v11,
v15,
v13);
update_malloc_size(v15 - v11, v10);
return v13 + 24;
}
else
{
if ( v15 < v11 )
return a2;
v9 = *(_DWORD *)__errno_location();
v4 = (_DWORD *)my_thread_var();
v7 = v9;
*v4 = v9;
if ( a4 < 0 )
my_free(a2);
if ( (a4 & 0x18) != 0 )
my_error(5, 4100, v15, v7, v5, v6);
return 0LL;
}
}
return my_malloc(a1, a3, a4);
}
| my_realloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
JMP 0x00128619
LAB_00128619:
JMP 0x0012861b
LAB_0012861b:
JMP 0x0012861d
LAB_0012861d:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0012864d
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x40
CMP RAX,0x0
JZ 0x0012864d
JMP 0x00128634
LAB_00128634:
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00128430
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00128797
LAB_0012864d:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x18
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,-0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,0x1
MOV byte ptr [RBP + -0x49],AL
JMP 0x0012867a
LAB_0012867a:
JMP 0x0012867c
LAB_0012867c:
JMP 0x0012867e
LAB_0012867e:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x18
CALL 0x001244e0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00128729
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001286c7
JMP 0x001286ba
LAB_001286ba:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00128797
LAB_001286c7:
CALL 0x00124040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
CALL 0x00129050
MOV ECX,dword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x80
CMP RAX,0x0
JZ 0x001286fc
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001287b0
MOV qword ptr [RBP + -0x18],0x0
LAB_001286fc:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x18
CMP RAX,0x0
JZ 0x0012871f
MOV RDX,qword ptr [RBP + -0x20]
MOV EDI,0x5
MOV ESI,0x1004
MOV AL,0x0
CALL 0x001303c0
LAB_0012871f:
MOV qword ptr [RBP + -0x40],0x0
JMP 0x00128789
LAB_00128729:
MOV RCX,qword ptr [RBP + -0x20]
MOVSX RAX,byte ptr [RBP + -0x49]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LEA RAX,[0x2d0a60]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3e8]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x38]
CALL RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [0x002d0570]
MOV RDI,qword ptr [RBP + -0x20]
SUB RDI,qword ptr [RBP + -0x48]
MOVSX ESI,byte ptr [RBP + -0x49]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x18
MOV qword ptr [RBP + -0x40],RAX
LAB_00128789:
JMP 0x0012878b
LAB_0012878b:
JMP 0x0012878d
LAB_0012878d:
JMP 0x0012878f
LAB_0012878f:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00128797:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_realloc(int4 param_1,long param_2,long param_3,ulong param_4)
{
int iVar1;
byte bVar2;
int4 uVar3;
ulong uVar4;
ulong uVar5;
void *pvVar6;
int *piVar7;
long local_48;
long local_10;
if ((param_2 == 0) && ((param_4 & 0x40) != 0)) {
local_10 = my_malloc(param_1,param_3,param_4);
}
else {
uVar4 = *(ulong *)(param_2 + -0x10) & 0xfffffffffffffffe;
bVar2 = (byte)*(int8 *)(param_2 + -0x10) & 1;
uVar5 = param_3 + 7U & 0xfffffffffffffff8;
pvVar6 = realloc((void *)(param_2 + -0x18),uVar5 + 0x18);
if (pvVar6 == (void *)0x0) {
if (uVar5 < uVar4) {
return param_2;
}
piVar7 = __errno_location();
iVar1 = *piVar7;
piVar7 = (int *)_my_thread_var();
*piVar7 = iVar1;
if ((param_4 & 0x80) != 0) {
my_free(param_2);
}
if ((param_4 & 0x18) != 0) {
my_error(5,0x1004,uVar5);
}
local_48 = 0;
}
else {
*(ulong *)((long)pvVar6 + 8) = uVar5 | (long)(char)bVar2;
uVar3 = (**(code **)(PSI_server + 1000))(param_1,uVar4,uVar5,pvVar6);
*(int4 *)((long)pvVar6 + 0x10) = uVar3;
(*(code *)update_malloc_size)(uVar5 - uVar4,bVar2);
local_48 = (long)pvVar6 + 0x18;
}
local_10 = local_48;
}
return local_10;
}
|
|
609 | my_realloc | eloqsql/mysys/my_malloc.c | void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags)
{
my_memory_header *old_mh, *mh;
void *point;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_realloc");
DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags));
DBUG_ASSERT(size > 0);
if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(key, size, my_flags));
old_mh= USER_TO_HEADER(old_point);
old_size= old_mh->m_size & ~1;
old_flags= old_mh->m_size & 1;
DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED);
DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC));
size= ALIGN_SIZE(size);
mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
if (size < old_size)
DBUG_RETURN(old_point);
my_errno=errno;
if (my_flags & MY_FREE_ON_ERROR)
{
/* my_free will take care of size accounting */
my_free(old_point);
old_point= 0;
}
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
point= NULL;
}
else
{
mh->m_size= size | old_flags;
mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner);
update_malloc_size((longlong)size - (longlong)old_size, old_flags);
point= HEADER_TO_USER(mh);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O3 | c | my_realloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
setne %al
testb $0x40, %cl
sete %dl
orb %al, %dl
je 0x27a58
movq %rsi, %r15
movl %edi, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
leaq -0x18(%rsi), %rdi
movq -0x10(%rsi), %r12
movq %r12, %r13
andq $-0x2, %r13
addq $0x7, %rbx
andq $-0x8, %rbx
leaq 0x18(%rbx), %rsi
callq 0x24520
testq %rax, %rax
je 0x27a71
movq %rax, %r14
andl $0x1, %r12d
movq %r12, %rax
orq %rbx, %rax
movq %rax, 0x8(%r14)
leaq 0x2c9039(%rip), %rax # 0x2f0a60
movq (%rax), %rax
movl -0x2c(%rbp), %edi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *0x3e8(%rax)
movl %eax, 0x10(%r14)
subq %r13, %rbx
movq %rbx, %rdi
movl %r12d, %esi
callq *0x2c8b21(%rip) # 0x2f0570
addq $0x18, %r14
movq %r14, %r15
jmp 0x27ab4
movq %rbx, %rsi
movq %rcx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27899
cmpq %r13, %rbx
jb 0x27ab4
callq 0x24050
movl (%rax), %r14d
callq 0x282b6
movl %r14d, (%rax)
movq -0x38(%rbp), %r14
testb %r14b, %r14b
jns 0x27a97
movq %r15, %rdi
callq 0x27ac6
xorl %r15d, %r15d
testb $0x18, %r14b
je 0x27ab4
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2c0f7
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_realloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
test rsi, rsi
setnz al
test cl, 40h
setz dl
or dl, al
jz short loc_27A58
mov r15, rsi
mov [rbp+var_2C], edi
mov [rbp+var_38], rcx
lea rdi, [rsi-18h]
mov r12, [rsi-10h]
mov r13, r12
and r13, 0FFFFFFFFFFFFFFFEh
add rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
lea rsi, [rbx+18h]
call _realloc
test rax, rax
jz short loc_27A71
mov r14, rax
and r12d, 1
mov rax, r12
or rax, rbx
mov [r14+8], rax
lea rax, PSI_server
mov rax, [rax]
mov edi, [rbp+var_2C]
mov rsi, r13
mov rdx, rbx
mov rcx, r14
call qword ptr [rax+3E8h]
mov [r14+10h], eax
sub rbx, r13
mov rdi, rbx
mov esi, r12d
call cs:update_malloc_size
add r14, 18h
mov r15, r14
jmp short loc_27AB4
loc_27A58:
mov rsi, rbx
mov rdx, rcx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_malloc
loc_27A71:
cmp rbx, r13
jb short loc_27AB4
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov r14, [rbp+var_38]
test r14b, r14b
jns short loc_27A97
mov rdi, r15
call my_free
loc_27A97:
xor r15d, r15d
test r14b, 18h
jz short loc_27AB4
mov esi, 1004h
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_27AB4:
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_realloc(unsigned int a1, long long a2, unsigned long long a3, char a4)
{
long long v4; // r15
long long v5; // r12
unsigned long long v6; // r13
unsigned long long v7; // rbx
long long v8; // rax
long long v9; // r14
int v11; // r14d
int v12; // ecx
int v13; // r8d
int v14; // r9d
if ( a2 == 0 && (a4 & 0x40) != 0 )
return my_malloc(a1, a3, a4);
v4 = a2;
v5 = *(_QWORD *)(a2 - 16);
v6 = v5 & 0xFFFFFFFFFFFFFFFELL;
v7 = (a3 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v8 = realloc(a2 - 24, v7 + 24);
if ( v8 )
{
v9 = v8;
*(_QWORD *)(v8 + 8) = v7 | v5 & 1;
*(_DWORD *)(v8 + 16) = (*((long long ( **)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[0]
+ 125))(
a1,
v6,
v7,
v8);
update_malloc_size();
return v9 + 24;
}
else if ( v7 >= v6 )
{
v11 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a2 - 24) = v11;
if ( a4 < 0 )
my_free(a2);
v4 = 0LL;
if ( (a4 & 0x18) != 0 )
my_error(5, 4100, v7, v12, v13, v14);
}
return v4;
}
| my_realloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
TEST RSI,RSI
SETNZ AL
TEST CL,0x40
SETZ DL
OR DL,AL
JZ 0x00127a58
MOV R15,RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x38],RCX
LEA RDI,[RSI + -0x18]
MOV R12,qword ptr [RSI + -0x10]
MOV R13,R12
AND R13,-0x2
ADD RBX,0x7
AND RBX,-0x8
LEA RSI,[RBX + 0x18]
CALL 0x00124520
TEST RAX,RAX
JZ 0x00127a71
MOV R14,RAX
AND R12D,0x1
MOV RAX,R12
OR RAX,RBX
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x3f0a60]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
CALL qword ptr [RAX + 0x3e8]
MOV dword ptr [R14 + 0x10],EAX
SUB RBX,R13
MOV RDI,RBX
MOV ESI,R12D
CALL qword ptr [0x003f0570]
ADD R14,0x18
MOV R15,R14
JMP 0x00127ab4
LAB_00127a58:
MOV RSI,RBX
MOV RDX,RCX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00127899
LAB_00127a71:
CMP RBX,R13
JC 0x00127ab4
CALL 0x00124050
MOV R14D,dword ptr [RAX]
CALL 0x001282b6
MOV dword ptr [RAX],R14D
MOV R14,qword ptr [RBP + -0x38]
TEST R14B,R14B
JNS 0x00127a97
MOV RDI,R15
CALL 0x00127ac6
LAB_00127a97:
XOR R15D,R15D
TEST R14B,0x18
JZ 0x00127ab4
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012c0f7
LAB_00127ab4:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_realloc(ulong param_1,long param_2,long param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
void *pvVar3;
long lVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
if ((param_4 & 0x40) == 0 || param_2 != 0) {
uVar7 = *(ulong *)(param_2 + -0x10);
uVar8 = uVar7 & 0xfffffffffffffffe;
uVar6 = param_3 + 7U & 0xfffffffffffffff8;
pvVar3 = realloc((void *)(param_2 + -0x18),uVar6 + 0x18);
if (pvVar3 == (void *)0x0) {
if (uVar8 <= uVar6) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
if ((char)param_4 < '\0') {
my_free(param_2);
}
param_2 = 0;
if ((param_4 & 0x18) != 0) {
my_error(5,0x1004,uVar6);
param_2 = 0;
}
}
}
else {
uVar7 = (ulong)((uint)uVar7 & 1);
*(ulong *)((long)pvVar3 + 8) = uVar7 | uVar6;
uVar2 = (**(code **)(PSI_server + 1000))(param_1 & 0xffffffff,uVar8,uVar6,pvVar3);
*(int4 *)((long)pvVar3 + 0x10) = uVar2;
(*(code *)update_malloc_size)(uVar6 - uVar8,uVar7);
param_2 = (long)pvVar3 + 0x18;
}
return param_2;
}
lVar4 = my_malloc(param_1,param_3,param_4);
return lVar4;
}
|
|
610 | mi_cmp_dynamic_unique | eloqsql/storage/myisam/mi_dynrec.c | int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def,
const uchar *record, my_off_t pos)
{
uchar *rec_buff,*old_record;
int error;
DBUG_ENTER("_mi_cmp_dynamic_unique");
if (!(old_record=my_alloca(info->s->base.reclength)))
DBUG_RETURN(1);
/* Don't let the compare destroy blobs that may be in use */
rec_buff=info->rec_buff;
if (info->s->base.blobs)
info->rec_buff=0;
error=_mi_read_dynamic_record(info,pos,old_record);
if (!error)
error=mi_unique_comp(def, record, old_record, def->null_are_equal);
if (info->s->base.blobs)
{
my_free(mi_get_rec_buff_ptr(info, info->rec_buff));
info->rec_buff=rec_buff;
}
my_afree(old_record);
DBUG_RETURN(error);
} | O0 | c | mi_cmp_dynamic_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x140(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xf37f0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xab969
jmp 0xab95d
movl $0x1, -0x4(%rbp)
jmp 0xaba4e
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x188(%rax)
je 0xab997
movq -0x10(%rbp), %rax
movq $0x0, 0x120(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xab520
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0xab9cd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0xc4bb0
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x188(%rax)
je 0xaba3f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaba18
movq -0x10(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0xaba18
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
addq $-0x18, %rax
movq %rax, -0x48(%rbp)
jmp 0xaba27
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xf3b70
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x38(%rbp), %rdi
callq 0xf3b70
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _mi_cmp_dynamic_unique:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+140h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_AB969
jmp short $+2
loc_AB95D:
mov [rbp+var_4], 1
jmp loc_ABA4E
loc_AB969:
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+188h], 0
jz short loc_AB997
mov rax, [rbp+var_10]
mov qword ptr [rax+120h], 0
loc_AB997:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call _mi_read_dynamic_record
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jnz short loc_AB9CD
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax+3]
call mi_unique_comp
mov [rbp+var_3C], eax
loc_AB9CD:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+188h], 0
jz short loc_ABA3F
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+318h]
and rax, 1
cmp rax, 0
jz short loc_ABA18
mov rax, [rbp+var_10]
cmp qword ptr [rax+120h], 0
jz short loc_ABA18
mov rax, [rbp+var_10]
mov rax, [rax+120h]
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_48], rax
jmp short loc_ABA27
loc_ABA18:
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov [rbp+var_48], rax
loc_ABA27:
mov rdi, [rbp+var_48]
call my_free
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
loc_ABA3F:
mov rdi, [rbp+var_38]
call my_free
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
loc_ABA4E:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long mi_cmp_dynamic_unique(char *a1, long long a2, long long a3, const char *a4)
{
unsigned int dynamic_record; // [rsp+14h] [rbp-3Ch]
const char *v6; // [rsp+18h] [rbp-38h]
long long v7; // [rsp+20h] [rbp-30h]
v6 = (const char *)my_malloc(0LL, *(_QWORD *)(*(_QWORD *)a1 + 320LL), 0LL);
if ( v6 )
{
v7 = *((_QWORD *)a1 + 36);
if ( *(_DWORD *)(*(_QWORD *)a1 + 392LL) )
*((_QWORD *)a1 + 36) = 0LL;
dynamic_record = mi_read_dynamic_record(a1, a4, v6);
if ( !dynamic_record )
dynamic_record = mi_unique_comp(a2, a3, v6, (unsigned int)*(char *)(a2 + 3));
if ( *(_DWORD *)(*(_QWORD *)a1 + 392LL) )
{
if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 1LL) != 0 && *((_QWORD *)a1 + 36) )
my_free(*((_QWORD *)a1 + 36) - 24LL);
else
my_free(*((_QWORD *)a1 + 36));
*((_QWORD *)a1 + 36) = v7;
}
my_free(v6);
return dynamic_record;
}
else
{
return 1;
}
}
| _mi_cmp_dynamic_unique:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x140]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f37f0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x001ab969
JMP 0x001ab95d
LAB_001ab95d:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001aba4e
LAB_001ab969:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001ab997
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],0x0
LAB_001ab997:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001ab520
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x001ab9cd
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x001c4bb0
MOV dword ptr [RBP + -0x3c],EAX
LAB_001ab9cd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001aba3f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001aba18
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x120],0x0
JZ 0x001aba18
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
ADD RAX,-0x18
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001aba27
LAB_001aba18:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x48],RAX
LAB_001aba27:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001f3b70
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
LAB_001aba3f:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001f3b70
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001aba4e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int _mi_cmp_dynamic_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
long lVar2;
long local_50;
int local_44;
int local_c;
lVar2 = my_malloc(0,*(int8 *)(*param_1 + 0x140),0);
if (lVar2 == 0) {
local_c = 1;
}
else {
lVar1 = param_1[0x24];
if (*(int *)(*param_1 + 0x188) != 0) {
param_1[0x24] = 0;
}
local_44 = _mi_read_dynamic_record(param_1,param_4,lVar2);
if (local_44 == 0) {
local_44 = mi_unique_comp(param_2,param_3,lVar2,(int)*(char *)(param_2 + 3));
}
if (*(int *)(*param_1 + 0x188) != 0) {
if (((*(ulong *)(*param_1 + 0x318) & 1) == 0) || (param_1[0x24] == 0)) {
local_50 = param_1[0x24];
}
else {
local_50 = param_1[0x24] + -0x18;
}
my_free(local_50);
param_1[0x24] = lVar1;
}
my_free(lVar2);
local_c = local_44;
}
return local_c;
}
|
|
611 | qh_flippedmerges | aimrt_mujoco_sim/_deps/qhull-src/src/libqhull_r/merge_r.c | void qh_flippedmerges(qhT *qh, facetT *facetlist, boolT *wasmerge) {
facetT *facet, *neighbor, *facet1;
realT dist, mindist, maxdist;
mergeT *merge, **mergep;
setT *othermerges;
int nummerge= 0, numdegen= 0;
trace4((qh, qh->ferr, 4024, "qh_flippedmerges: begin\n"));
FORALLfacet_(facetlist) {
if (facet->flipped && !facet->visible)
qh_appendmergeset(qh, facet, facet, MRGflip, 0.0, 1.0);
}
othermerges= qh_settemppop(qh);
if(othermerges != qh->facet_mergeset) {
qh_fprintf(qh, qh->ferr, 6392, "qhull internal error (qh_flippedmerges): facet_mergeset (%d merges) not at top of tempstack (%d merges)\n",
qh_setsize(qh, qh->facet_mergeset), qh_setsize(qh, othermerges));
qh_errexit(qh, qh_ERRqhull, NULL, NULL);
}
qh->facet_mergeset= qh_settemp(qh, qh->TEMPsize);
qh_settemppush(qh, othermerges);
FOREACHmerge_(othermerges) {
facet1= merge->facet1;
if (merge->mergetype != MRGflip || facet1->visible)
continue;
if (qh->TRACEmerge-1 == zzval_(Ztotmerge))
qh->qhmem.IStracing= qh->IStracing= qh->TRACElevel;
neighbor= qh_findbestneighbor(qh, facet1, &dist, &mindist, &maxdist);
trace0((qh, qh->ferr, 15, "qh_flippedmerges: merge flipped f%d into f%d dist %2.2g during p%d\n",
facet1->id, neighbor->id, dist, qh->furthest_id));
qh_mergefacet(qh, facet1, neighbor, merge->mergetype, &mindist, &maxdist, !qh_MERGEapex);
nummerge++;
if (qh->PRINTstatistics) {
zinc_(Zflipped);
wadd_(Wflippedtot, dist);
wmax_(Wflippedmax, dist);
}
}
FOREACHmerge_(othermerges) {
if (merge->facet1->visible || merge->facet2->visible)
qh_memfree(qh, merge, (int)sizeof(mergeT)); /* invalidates merge and othermerges */
else
qh_setappend(qh, &qh->facet_mergeset, merge);
}
qh_settempfree(qh, &othermerges);
numdegen += qh_merge_degenredundant(qh); /* somewhat better here than after each flipped merge -- qtest.sh 10 '500 C1,2e-13 D4' 'd Qbb' */
if (nummerge)
*wasmerge= True;
trace1((qh, qh->ferr, 1010, "qh_flippedmerges: merged %d flipped and %d degenredundant facets into a good neighbor\n",
nummerge, numdegen));
} | O0 | c | qh_flippedmerges:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x4, 0x88(%rax)
jl 0x4d63d4
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x978(%rax), %rsi
movl $0xfb8, %edx # imm = 0xFB8
leaq 0x6ab47(%rip), %rcx # 0x540f14
movb $0x0, %al
callq 0x4fdcb0
cmpq $0x0, 0x78(%rsp)
je 0x4d6477
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x68(%rsp)
movb %al, 0x1f(%rsp)
je 0x4d6409
movq 0x68(%rsp), %rax
cmpq $0x0, 0x38(%rax)
setne %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x4d6413
jmp 0x4d6475
movq 0x68(%rsp), %rax
movl 0x70(%rax), %eax
shrl $0x10, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4d6460
movq 0x68(%rsp), %rax
movl 0x70(%rax), %eax
shrl $0xb, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4d6460
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x68(%rsp), %rdx
movl $0x6, %ecx
xorps %xmm0, %xmm0
movsd 0x416fd(%rip), %xmm1 # 0x517b58
callq 0x4d9d70
jmp 0x4d6462
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x68(%rsp)
jmp 0x4d63ea
jmp 0x4d6477
movq 0x80(%rsp), %rdi
callq 0x4fbd50
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x80(%rsp), %rcx
cmpq 0xaf0(%rcx), %rax
je 0x4d6534
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq 0x978(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0xaf0(%rax), %rsi
callq 0x4fadf0
movl %eax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4fadf0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %r8d
movl %eax, %r9d
movl $0x18f8, %edx # imm = 0x18F8
leaq 0x6aa19(%rip), %rcx # 0x540f2d
movb $0x0, %al
callq 0x4fdcb0
movq 0x80(%rsp), %rdi
movl $0x5, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x50ccd0
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movl 0x990(%rax), %esi
callq 0x4fbb50
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0xaf0(%rax)
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4fbe50
movq $0x0, 0x38(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x4d677a
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x4d6778
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x6, 0x40(%rax)
jne 0x4d65e5
movq 0x58(%rsp), %rax
movl 0x70(%rax), %eax
shrl $0xb, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4d65e7
jmp 0x4d6596
movq 0x80(%rsp), %rax
movl 0x230(%rax), %eax
subl $0x1, %eax
movq 0x80(%rsp), %rcx
cmpl 0x1420(%rcx), %eax
jne 0x4d6632
movq 0x80(%rsp), %rax
movl 0x218(%rax), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x88(%rax)
movq 0x80(%rsp), %rax
movl %ecx, 0xd20(%rax)
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x48(%rsp), %rcx
leaq 0x40(%rsp), %r8
callq 0x4dd750
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x88(%rax)
je 0x4d66bc
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x978(%rax), %rsi
movq 0x58(%rsp), %rax
movl 0x6c(%rax), %r8d
movq 0x60(%rsp), %rax
movl 0x6c(%rax), %r9d
movsd 0x50(%rsp), %xmm0
movq 0x80(%rsp), %rax
movl 0xa3c(%rax), %eax
movl $0xf, %edx
leaq 0x6a8e4(%rip), %rcx # 0x540f96
movl %eax, (%rsp)
movb $0x1, %al
callq 0x4fdcb0
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %rax
movl 0x40(%rax), %ecx
leaq 0x48(%rsp), %r8
leaq 0x40(%rsp), %r9
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x4ddae0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x1a8(%rax)
je 0x4d6773
movq 0x80(%rsp), %rax
movl 0x1000(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1000(%rax)
movsd 0x50(%rsp), %xmm0
movq 0x80(%rsp), %rax
addsd 0x1010(%rax), %xmm0
movsd %xmm0, 0x1010(%rax)
movq 0x80(%rsp), %rax
movsd 0x1008(%rax), %xmm1
movsd 0x50(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4d6771
movsd 0x50(%rsp), %xmm0
movq 0x80(%rsp), %rax
movsd %xmm0, 0x1008(%rax)
jmp 0x4d6773
jmp 0x4d6596
jmp 0x4d677a
movq $0x0, 0x38(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x4d682b
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x4d6829
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x70(%rax), %eax
shrl $0xb, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4d67ea
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x70(%rax), %eax
shrl $0xb, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4d6803
movq 0x80(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl $0x48, %edx
callq 0x4fc9c0
jmp 0x4d6824
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rsi
addq $0xaf0, %rsi # imm = 0xAF0
movq 0x38(%rsp), %rdx
callq 0x4f9f60
jmp 0x4d679d
jmp 0x4d682b
movq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x4fbc20
movq 0x80(%rsp), %rdi
callq 0x4d7e80
addl 0x20(%rsp), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x4d6864
movq 0x70(%rsp), %rax
movl $0x1, (%rax)
movq 0x80(%rsp), %rax
cmpl $0x1, 0x88(%rax)
jl 0x4d68a9
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x978(%rax), %rsi
movl 0x24(%rsp), %r8d
movl 0x20(%rsp), %r9d
movl $0x3f2, %edx # imm = 0x3F2
leaq 0x6a738(%rip), %rcx # 0x540fda
movb $0x0, %al
callq 0x4fdcb0
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| qh_flippedmerges:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_64], 0
mov [rsp+88h+var_68], 0
mov rax, [rsp+88h+var_8]
cmp dword ptr [rax+88h], 4
jl short loc_4D63D4
mov rdi, [rsp+88h+var_8]
mov rax, [rsp+88h+var_8]
mov rsi, [rax+978h]
mov edx, 0FB8h
lea rcx, aQhFlippedmerge; "qh_flippedmerges: begin\n"
mov al, 0
call qh_fprintf
loc_4D63D4:
cmp [rsp+88h+var_10], 0
jz loc_4D6477
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_20], rax
loc_4D63EA:
xor eax, eax
cmp [rsp+88h+var_20], 0
mov [rsp+88h+var_69], al
jz short loc_4D6409
mov rax, [rsp+88h+var_20]
cmp qword ptr [rax+38h], 0
setnz al
mov [rsp+88h+var_69], al
loc_4D6409:
mov al, [rsp+88h+var_69]
test al, 1
jnz short loc_4D6413
jmp short loc_4D6475
loc_4D6413:
mov rax, [rsp+88h+var_20]
mov eax, [rax+70h]
shr eax, 10h
and eax, 1
cmp eax, 0
jz short loc_4D6460
mov rax, [rsp+88h+var_20]
mov eax, [rax+70h]
shr eax, 0Bh
and eax, 1
cmp eax, 0
jnz short loc_4D6460
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_20]
mov rdx, [rsp+88h+var_20]
mov ecx, 6
xorps xmm0, xmm0
movsd xmm1, cs:qword_517B58
call qh_appendmergeset
loc_4D6460:
jmp short $+2
loc_4D6462:
mov rax, [rsp+88h+var_20]
mov rax, [rax+38h]
mov [rsp+88h+var_20], rax
jmp loc_4D63EA
loc_4D6475:
jmp short $+2
loc_4D6477:
mov rdi, [rsp+88h+var_8]
call qh_settemppop
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_60]
mov rcx, [rsp+88h+var_8]
cmp rax, [rcx+0AF0h]
jz loc_4D6534
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_8]
mov rax, [rax+978h]
mov [rsp+88h+var_78], rax
mov rdi, [rsp+88h+var_8]
mov rax, [rsp+88h+var_8]
mov rsi, [rax+0AF0h]
call qh_setsize
mov [rsp+88h+var_70], eax
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_60]
call qh_setsize
mov rdi, [rsp+88h+var_80]
mov rsi, [rsp+88h+var_78]
mov r8d, [rsp+88h+var_70]
mov r9d, eax
mov edx, 18F8h
lea rcx, aQhullInternalE_90; "qhull internal error (qh_flippedmerges)"...
mov al, 0
call qh_fprintf
mov rdi, [rsp+88h+var_8]
mov esi, 5
xor eax, eax
mov ecx, eax
mov rdx, rcx
call qh_errexit
loc_4D6534:
mov rdi, [rsp+88h+var_8]
mov rax, [rsp+88h+var_8]
mov esi, [rax+990h]
call qh_settemp
mov rcx, rax
mov rax, [rsp+88h+var_8]
mov [rax+0AF0h], rcx
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_60]
call qh_settemppush
mov [rsp+88h+var_50], 0
cmp [rsp+88h+var_60], 0
jz loc_4D677A
mov rax, [rsp+88h+var_60]
add rax, 8
mov [rsp+88h+var_58], rax
loc_4D6596:
mov rax, [rsp+88h+var_58]
mov rcx, rax
add rcx, 8
mov [rsp+88h+var_58], rcx
mov rax, [rax]
mov [rsp+88h+var_50], rax
cmp rax, 0
jz loc_4D6778
mov rax, [rsp+88h+var_50]
mov rax, [rax+10h]
mov [rsp+88h+var_30], rax
mov rax, [rsp+88h+var_50]
cmp dword ptr [rax+40h], 6
jnz short loc_4D65E5
mov rax, [rsp+88h+var_30]
mov eax, [rax+70h]
shr eax, 0Bh
and eax, 1
cmp eax, 0
jz short loc_4D65E7
loc_4D65E5:
jmp short loc_4D6596
loc_4D65E7:
mov rax, [rsp+88h+var_8]
mov eax, [rax+230h]
sub eax, 1
mov rcx, [rsp+88h+var_8]
cmp eax, [rcx+1420h]
jnz short loc_4D6632
mov rax, [rsp+88h+var_8]
mov ecx, [rax+218h]
mov rax, [rsp+88h+var_8]
mov [rax+88h], ecx
mov rax, [rsp+88h+var_8]
mov [rax+0D20h], ecx
loc_4D6632:
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_30]
lea rdx, [rsp+88h+var_38]
lea rcx, [rsp+88h+var_40]
lea r8, [rsp+88h+var_48]
call qh_findbestneighbor
mov [rsp+88h+var_28], rax
mov rax, [rsp+88h+var_8]
cmp dword ptr [rax+88h], 0
jz short loc_4D66BC
mov rdi, [rsp+88h+var_8]
mov rax, [rsp+88h+var_8]
mov rsi, [rax+978h]
mov rax, [rsp+88h+var_30]
mov r8d, [rax+6Ch]
mov rax, [rsp+88h+var_28]
mov r9d, [rax+6Ch]
movsd xmm0, [rsp+88h+var_38]
mov rax, [rsp+88h+var_8]
mov eax, [rax+0A3Ch]
mov edx, 0Fh
lea rcx, aQhFlippedmerge_0; "qh_flippedmerges: merge flipped f%d int"...
mov [rsp+88h+var_88], eax
mov al, 1
call qh_fprintf
loc_4D66BC:
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
mov rax, [rsp+88h+var_50]
mov ecx, [rax+40h]
lea r8, [rsp+88h+var_40]
lea r9, [rsp+88h+var_48]
xor eax, eax
mov [rsp+88h+var_88], 0
call qh_mergefacet
mov eax, [rsp+88h+var_64]
add eax, 1
mov [rsp+88h+var_64], eax
mov rax, [rsp+88h+var_8]
cmp dword ptr [rax+1A8h], 0
jz short loc_4D6773
mov rax, [rsp+88h+var_8]
mov ecx, [rax+1000h]
add ecx, 1
mov [rax+1000h], ecx
movsd xmm0, [rsp+88h+var_38]
mov rax, [rsp+88h+var_8]
addsd xmm0, qword ptr [rax+1010h]
movsd qword ptr [rax+1010h], xmm0
mov rax, [rsp+88h+var_8]
movsd xmm1, qword ptr [rax+1008h]
movsd xmm0, [rsp+88h+var_38]
ucomisd xmm0, xmm1
jbe short loc_4D6771
movsd xmm0, [rsp+88h+var_38]
mov rax, [rsp+88h+var_8]
movsd qword ptr [rax+1008h], xmm0
loc_4D6771:
jmp short $+2
loc_4D6773:
jmp loc_4D6596
loc_4D6778:
jmp short $+2
loc_4D677A:
mov [rsp+88h+var_50], 0
cmp [rsp+88h+var_60], 0
jz loc_4D682B
mov rax, [rsp+88h+var_60]
add rax, 8
mov [rsp+88h+var_58], rax
loc_4D679D:
mov rax, [rsp+88h+var_58]
mov rcx, rax
add rcx, 8
mov [rsp+88h+var_58], rcx
mov rax, [rax]
mov [rsp+88h+var_50], rax
cmp rax, 0
jz short loc_4D6829
mov rax, [rsp+88h+var_50]
mov rax, [rax+10h]
mov eax, [rax+70h]
shr eax, 0Bh
and eax, 1
cmp eax, 0
jnz short loc_4D67EA
mov rax, [rsp+88h+var_50]
mov rax, [rax+18h]
mov eax, [rax+70h]
shr eax, 0Bh
and eax, 1
cmp eax, 0
jz short loc_4D6803
loc_4D67EA:
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_50]
mov edx, 48h ; 'H'
call qh_memfree
jmp short loc_4D6824
loc_4D6803:
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_8]
add rsi, 0AF0h
mov rdx, [rsp+88h+var_50]
call qh_setappend
loc_4D6824:
jmp loc_4D679D
loc_4D6829:
jmp short $+2
loc_4D682B:
mov rdi, [rsp+88h+var_8]
lea rsi, [rsp+88h+var_60]
call qh_settempfree
mov rdi, [rsp+88h+var_8]
call qh_merge_degenredundant
add eax, [rsp+88h+var_68]
mov [rsp+88h+var_68], eax
cmp [rsp+88h+var_64], 0
jz short loc_4D6864
mov rax, [rsp+88h+var_18]
mov dword ptr [rax], 1
loc_4D6864:
mov rax, [rsp+88h+var_8]
cmp dword ptr [rax+88h], 1
jl short loc_4D68A9
mov rdi, [rsp+88h+var_8]
mov rax, [rsp+88h+var_8]
mov rsi, [rax+978h]
mov r8d, [rsp+88h+var_64]
mov r9d, [rsp+88h+var_68]
mov edx, 3F2h
lea rcx, aQhFlippedmerge_1; "qh_flippedmerges: merged %d flipped and"...
mov al, 0
call qh_fprintf
loc_4D68A9:
add rsp, 88h
retn
| long long qh_flippedmerges(long long a1, long long a2, _DWORD *a3, long long a4, int a5, int a6)
{
int v6; // eax
long long *v7; // rax
int v8; // ecx
long long *v9; // rax
long long result; // rax
long long v11; // [rsp+10h] [rbp-78h]
int v12; // [rsp+18h] [rbp-70h]
bool v13; // [rsp+1Fh] [rbp-69h]
int v14; // [rsp+20h] [rbp-68h]
int v15; // [rsp+24h] [rbp-64h]
long long v16; // [rsp+28h] [rbp-60h] BYREF
long long *v17; // [rsp+30h] [rbp-58h]
long long v18; // [rsp+38h] [rbp-50h]
char v19[8]; // [rsp+40h] [rbp-48h] BYREF
char v20[8]; // [rsp+48h] [rbp-40h] BYREF
double v21; // [rsp+50h] [rbp-38h] BYREF
long long v22; // [rsp+58h] [rbp-30h]
long long v23; // [rsp+60h] [rbp-28h]
long long i; // [rsp+68h] [rbp-20h]
_DWORD *v25; // [rsp+70h] [rbp-18h]
long long v26; // [rsp+78h] [rbp-10h]
long long v27; // [rsp+80h] [rbp-8h]
v27 = a1;
v26 = a2;
v25 = a3;
v15 = 0;
if ( *(int *)(a1 + 136) >= 4 )
qh_fprintf(v27, *(_QWORD *)(v27 + 2424), 4024, (unsigned int)"qh_flippedmerges: begin\n", a5, a6);
if ( v26 )
{
for ( i = v26; ; i = *(_QWORD *)(i + 56) )
{
v13 = 0;
if ( i )
v13 = *(_QWORD *)(i + 56) != 0LL;
if ( !v13 )
break;
if ( (*(_DWORD *)(i + 112) & 0x10000) != 0 && ((*(_DWORD *)(i + 112) >> 11) & 1) == 0 )
qh_appendmergeset(v27, i, i, 6LL, 0.0, 1.0);
}
}
v16 = qh_settemppop(v27);
if ( v16 != *(_QWORD *)(v27 + 2800) )
{
v11 = *(_QWORD *)(v27 + 2424);
v12 = qh_setsize(v27, *(_QWORD *)(v27 + 2800));
v6 = qh_setsize(v27, v16);
qh_fprintf(
v27,
v11,
6392,
(unsigned int)"qhull internal error (qh_flippedmerges): facet_mergeset (%d merges) not at top of tempstack (%d merges)\n",
v12,
v6);
qh_errexit(v27, 5LL, 0LL);
}
*(_QWORD *)(v27 + 2800) = qh_settemp(v27, *(unsigned int *)(v27 + 2448));
qh_settemppush(v27, v16);
v18 = 0LL;
if ( v16 )
{
v17 = (long long *)(v16 + 8);
while ( 1 )
{
v7 = v17++;
v18 = *v7;
if ( !v18 )
break;
v22 = *(_QWORD *)(v18 + 16);
if ( *(_DWORD *)(v18 + 64) == 6 && ((*(_DWORD *)(v22 + 112) >> 11) & 1) == 0 )
{
if ( *(_DWORD *)(v27 + 560) - 1 == *(_DWORD *)(v27 + 5152) )
{
v8 = *(_DWORD *)(v27 + 536);
*(_DWORD *)(v27 + 136) = v8;
*(_DWORD *)(v27 + 3360) = v8;
}
v23 = qh_findbestneighbor(v27, v22, &v21, v20, v19);
if ( *(_DWORD *)(v27 + 136) )
qh_fprintf(
v27,
*(_QWORD *)(v27 + 2424),
15,
(unsigned int)"qh_flippedmerges: merge flipped f%d into f%d dist %2.2g during p%d\n",
*(_DWORD *)(v22 + 108),
*(_DWORD *)(v23 + 108));
qh_mergefacet(v27, v22, v23, *(_DWORD *)(v18 + 64), (unsigned int)v20, (unsigned int)v19, 0);
++v15;
if ( *(_DWORD *)(v27 + 424) )
{
++*(_DWORD *)(v27 + 4096);
*(double *)(v27 + 4112) = v21 + *(double *)(v27 + 4112);
if ( v21 > *(double *)(v27 + 4104) )
*(double *)(v27 + 4104) = v21;
}
}
}
}
v18 = 0LL;
if ( v16 )
{
v17 = (long long *)(v16 + 8);
while ( 1 )
{
v9 = v17++;
v18 = *v9;
if ( !v18 )
break;
if ( ((*(_DWORD *)(*(_QWORD *)(v18 + 16) + 112LL) >> 11) & 1) != 0
|| ((*(_DWORD *)(*(_QWORD *)(v18 + 24) + 112LL) >> 11) & 1) != 0 )
{
qh_memfree(v27, v18, 72LL);
}
else
{
qh_setappend(v27, v27 + 2800, v18);
}
}
}
qh_settempfree(v27, &v16);
v14 = qh_merge_degenredundant(v27);
if ( v15 )
*v25 = 1;
result = v27;
if ( *(int *)(v27 + 136) >= 1 )
return qh_fprintf(
v27,
*(_QWORD *)(v27 + 2424),
1010,
(unsigned int)"qh_flippedmerges: merged %d flipped and %d degenredundant facets into a good neighbor\n",
v15,
v14);
return result;
}
| lower_bound:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
CALL 0x004d6450
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x004d6460
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x10]
CALL 0x0014df70
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* std::_Rb_tree<std::__cxx11::string, std::pair<std::__cxx11::string const, std::vector<int,
std::allocator<int> > >, std::_Select1st<std::pair<std::__cxx11::string const, std::vector<int,
std::allocator<int> > > >, std::less<std::__cxx11::string >,
std::allocator<std::pair<std::__cxx11::string const, std::vector<int, std::allocator<int> > > >
>::lower_bound(std::__cxx11::string const&) */
int8 __thiscall
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>>>
::lower_bound(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<int,std::allocator<int>>>>>
*this,string *param_1)
{
_Rb_tree_node *p_Var1;
_Rb_tree_node_base *p_Var2;
int8 uVar3;
p_Var1 = (_Rb_tree_node *)_M_begin(this);
p_Var2 = (_Rb_tree_node_base *)_M_end(this);
uVar3 = _M_lower_bound(this,p_Var1,p_Var2,param_1);
return uVar3;
}
|
|
612 | ma_crypt_set_data_pagecache_callbacks | eloqsql/storage/maria/ma_crypt.c | void ma_crypt_set_data_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share
__attribute__((unused)))
{
/* Only use encryption if we have defined it */
if (encryption_key_id_exists(get_encryption_key_id(share)))
{
file->pre_read_hook= ma_crypt_pre_read_hook;
file->post_read_hook= ma_crypt_data_post_read_hook;
file->pre_write_hook= ma_crypt_data_pre_write_hook;
file->post_write_hook= ma_crypt_post_write_hook;
}
} | O0 | c | ma_crypt_set_data_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x88930
movl %eax, %edi
callq 0x88e30
cmpl $0x0, %eax
je 0x88e21
movq -0x8(%rbp), %rax
leaq 0x70(%rip), %rcx # 0x88e60
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
leaq 0xe1(%rip), %rcx # 0x88ee0
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
leaq 0x2b2(%rip), %rcx # 0x890c0
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x4a3(%rip), %rcx # 0x892c0
movq %rcx, 0x30(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ma_crypt_set_data_pagecache_callbacks:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call get_encryption_key_id
mov edi, eax
call encryption_key_id_exists
cmp eax, 0
jz short loc_88E21
mov rax, [rbp+var_8]
lea rcx, ma_crypt_pre_read_hook
mov [rax+18h], rcx
mov rax, [rbp+var_8]
lea rcx, ma_crypt_data_post_read_hook
mov [rax+20h], rcx
mov rax, [rbp+var_8]
lea rcx, ma_crypt_data_pre_write_hook
mov [rax+28h], rcx
mov rax, [rbp+var_8]
lea rcx, ma_crypt_post_write_hook
mov [rax+30h], rcx
loc_88E21:
add rsp, 10h
pop rbp
retn
| long long ma_crypt_set_data_pagecache_callbacks(_QWORD *a1, long long a2)
{
unsigned int encryption_key_id; // eax
long long result; // rax
encryption_key_id = get_encryption_key_id(a2);
result = encryption_key_id_exists(encryption_key_id);
if ( (_DWORD)result )
{
a1[3] = ma_crypt_pre_read_hook;
a1[4] = ma_crypt_data_post_read_hook;
a1[5] = ma_crypt_data_pre_write_hook;
result = (long long)a1;
a1[6] = ma_crypt_post_write_hook;
}
return result;
}
| ma_crypt_set_data_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00188930
MOV EDI,EAX
CALL 0x00188e30
CMP EAX,0x0
JZ 0x00188e21
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x188e60]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x188ee0]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1890c0]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1892c0]
MOV qword ptr [RAX + 0x30],RCX
LAB_00188e21:
ADD RSP,0x10
POP RBP
RET
|
void ma_crypt_set_data_pagecache_callbacks(long param_1,int8 param_2)
{
int4 uVar1;
int iVar2;
uVar1 = get_encryption_key_id(param_2);
iVar2 = encryption_key_id_exists(uVar1);
if (iVar2 != 0) {
*(code **)(param_1 + 0x18) = ma_crypt_pre_read_hook;
*(code **)(param_1 + 0x20) = ma_crypt_data_post_read_hook;
*(code **)(param_1 + 0x28) = ma_crypt_data_pre_write_hook;
*(code **)(param_1 + 0x30) = ma_crypt_post_write_hook;
}
return;
}
|
|
613 | google::protobuf::MethodOptions_IdempotencyLevel_IsValid(int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | bool MethodOptions_IdempotencyLevel_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
} | O0 | cpp | google::protobuf::MethodOptions_IdempotencyLevel_IsValid(int):
movl %edi, -0x8(%rsp)
movl -0x8(%rsp), %eax
subl $0x2, %eax
ja 0xa84f6
jmp 0xa84ef
movb $0x1, -0x1(%rsp)
jmp 0xa84fb
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf38MethodOptions_IdempotencyLevel_IsValidEi:
mov [rsp+var_8], edi
mov eax, [rsp+var_8]
sub eax, 2
ja short loc_A84F6
jmp short $+2
loc_A84EF:
mov [rsp+var_1], 1
jmp short loc_A84FB
loc_A84F6:
mov [rsp+var_1], 0
loc_A84FB:
mov al, [rsp+var_1]
and al, 1
retn
| bool google::protobuf::MethodOptions_IdempotencyLevel_IsValid(google::protobuf *this)
{
return (unsigned int)this <= 2;
}
| MethodOptions_IdempotencyLevel_IsValid:
MOV dword ptr [RSP + -0x8],EDI
MOV EAX,dword ptr [RSP + -0x8]
SUB EAX,0x2
JA 0x001a84f6
JMP 0x001a84ef
LAB_001a84ef:
MOV byte ptr [RSP + -0x1],0x1
JMP 0x001a84fb
LAB_001a84f6:
MOV byte ptr [RSP + -0x1],0x0
LAB_001a84fb:
MOV AL,byte ptr [RSP + -0x1]
AND AL,0x1
RET
|
/* google::protobuf::MethodOptions_IdempotencyLevel_IsValid(int) */
int4 google::protobuf::MethodOptions_IdempotencyLevel_IsValid(int param_1)
{
bool local_1;
local_1 = (uint)param_1 < 2 || param_1 + -2 == 0;
return CONCAT31((int3)((uint)(param_1 + -2) >> 8),local_1);
}
|
|
614 | ring_buffer<int>::rat(unsigned long) const | monkey531[P]llama/common/sampling.cpp | const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
} | O2 | cpp | ring_buffer<int>::rat(unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0xb502c
notq %rsi
addq %rsi, %rax
addq 0x10(%rdi), %rax
xorl %edx, %edx
divq (%rdi)
leaq (,%rdx,4), %rax
addq 0x20(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x2296f(%rip), %rsi # 0xd79ad
movq %rax, %rdi
callq 0x26420
movq 0x6cfa3(%rip), %rsi # 0x121ff0
movq 0x6cf04(%rip), %rdx # 0x121f58
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
nop
| _ZNK11ring_bufferIiE3ratEm:
push r14
push rbx
push rax
mov rax, [rdi+8]
cmp rax, rsi
jbe short loc_B502C
not rsi
add rax, rsi
add rax, [rdi+10h]
xor edx, edx
div qword ptr [rdi]
lea rax, ds:0[rdx*4]
add rax, [rdi+20h]
add rsp, 8
pop rbx
pop r14
retn
loc_B502C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
unsigned long long v2; // rax
std::runtime_error *exception; // rbx
v2 = a1[1];
if ( v2 <= a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1[4] + 4 * ((a1[2] + ~a2 + v2) % *a1);
}
| rat:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RSI
JBE 0x001b502c
NOT RSI
ADD RAX,RSI
ADD RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV qword ptr [RDI]
LEA RAX,[RDX*0x4]
ADD RAX,qword ptr [RDI + 0x20]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001b502c:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_001b5037:
LEA RSI,[0x1d79ad]
MOV RDI,RAX
CALL 0x00126420
LAB_001b5046:
MOV RSI,qword ptr [0x00221ff0]
MOV RDX,qword ptr [0x00221f58]
MOV RDI,RBX
CALL 0x001275b0
|
/* ring_buffer<int>::rat(unsigned long) const */
long __thiscall ring_buffer<int>::rat(ring_buffer<int> *this,ulong param_1)
{
runtime_error *this_00;
if (param_1 < *(ulong *)(this + 8)) {
return ((*(ulong *)(this + 8) + ~param_1 + *(long *)(this + 0x10)) % *(ulong *)this) * 4 +
*(long *)(this + 0x20);
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b5037 to 001b5045 has its CatchHandler @ 001b505c */
std::runtime_error::runtime_error(this_00,"ring buffer: index out of bounds");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00221ff0,PTR__runtime_error_00221f58);
}
|
|
615 | LefDefParser::defwRowStr(char const*, char const*, int, int, char const*, int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwRowStr(const char *rowName,
const char *rowType,
int x_orig,
int y_orig,
const char *orient,
int do_count,
int do_increment,
int do_x,
int do_y)
{
defwFunc = DEFW_ROW; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwDidInit)
return DEFW_BAD_ORDER;
if (defwState == DEFW_ROW)
fprintf(defwFile, ";\n");// add the ; and newline for the previous row.
if ((!rowName || !*rowName) || (!rowType || !*rowType)) // required
return DEFW_BAD_DATA;
// do not have ; because the row may have properties
// do not end with newline, if there is no property, ; need to be concat.
fprintf(defwFile, "ROW %s %s %d %d %s ", rowName, rowType, x_orig, y_orig,
orient);
if ((do_count != 0) || (do_increment != 0)) {
fprintf(defwFile, "DO %d BY %d ", do_count, do_increment);
if ((do_x != 0) || (do_y != 0))
fprintf(defwFile, "STEP %d %d ", do_x, do_y);
}
defwLines++;
defwState = DEFW_ROW;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwRowStr(char const*, char const*, int, int, char const*, int, int, int, int):
subq $0x38, %rsp
movl 0x50(%rsp), %eax
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %eax
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
leaq 0x18d35(%rip), %rax # 0x2b168
movl $0x10, (%rax)
leaq 0x18d18(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x12453
movl $0x1, 0x34(%rsp)
jmp 0x1257e
leaq 0x18d1a(%rip), %rax # 0x2b174
cmpl $0x0, (%rax)
jne 0x1246c
movl $0x2, 0x34(%rsp)
jmp 0x1257e
leaq 0x18cf1(%rip), %rax # 0x2b164
cmpl $0x10, (%rax)
jne 0x12490
leaq 0x18cd9(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x119ca(%rip), %rsi # 0x23e53
movb $0x0, %al
callq 0x10f0
cmpq $0x0, 0x28(%rsp)
je 0x124b4
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
je 0x124b4
cmpq $0x0, 0x20(%rsp)
je 0x124b4
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x124c1
movl $0x3, 0x34(%rsp)
jmp 0x1257e
leaq 0x18c90(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movl 0x18(%rsp), %r9d
movq 0x10(%rsp), %rax
leaq 0x11bdd(%rip), %rsi # 0x240c8
movq %rax, (%rsp)
movb $0x0, %al
callq 0x10f0
cmpl $0x0, 0xc(%rsp)
jne 0x12504
cmpl $0x0, 0x40(%rsp)
je 0x12554
leaq 0x18c4d(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0xc(%rsp), %edx
movl 0x40(%rsp), %ecx
leaq 0x11bbf(%rip), %rsi # 0x240dc
movb $0x0, %al
callq 0x10f0
cmpl $0x0, 0x48(%rsp)
jne 0x12532
cmpl $0x0, 0x50(%rsp)
je 0x12552
leaq 0x18c1f(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x48(%rsp), %edx
movl 0x50(%rsp), %ecx
leaq 0x11b9e(%rip), %rsi # 0x240e9
movb $0x0, %al
callq 0x10f0
jmp 0x12554
leaq 0x18c05(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x18bf9(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x18bf4(%rip), %rax # 0x2b164
movl $0x10, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser10defwRowStrEPKcS1_iiS1_iiii:
sub rsp, 38h
mov eax, [rsp+38h+arg_10]
mov eax, [rsp+38h+arg_8]
mov eax, [rsp+38h+arg_0]
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov [rsp+38h+var_20], ecx
mov [rsp+38h+var_28], r8
mov [rsp+38h+var_2C], r9d
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 10h
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_12453
mov [rsp+38h+var_4], 1
jmp loc_1257E
loc_12453:
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
cmp dword ptr [rax], 0
jnz short loc_1246C
mov [rsp+38h+var_4], 2
jmp loc_1257E
loc_1246C:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 10h
jnz short loc_12490
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _fprintf
loc_12490:
cmp [rsp+38h+var_10], 0
jz short loc_124B4
mov rax, [rsp+38h+var_10]
cmp byte ptr [rax], 0
jz short loc_124B4
cmp [rsp+38h+var_18], 0
jz short loc_124B4
mov rax, [rsp+38h+var_18]
cmp byte ptr [rax], 0
jnz short loc_124C1
loc_124B4:
mov [rsp+38h+var_4], 3
jmp loc_1257E
loc_124C1:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+38h+var_10]
mov rcx, [rsp+38h+var_18]
mov r8d, [rsp+38h+var_1C]
mov r9d, [rsp+38h+var_20]
mov rax, [rsp+38h+var_28]
lea rsi, aRowSSDDS; "ROW %s %s %d %d %s "
mov [rsp+38h+var_38], rax
mov al, 0
call _fprintf
cmp [rsp+38h+var_2C], 0
jnz short loc_12504
cmp [rsp+38h+arg_0], 0
jz short loc_12554
loc_12504:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+38h+var_2C]
mov ecx, [rsp+38h+arg_0]
lea rsi, aDoDByD; "DO %d BY %d "
mov al, 0
call _fprintf
cmp [rsp+38h+arg_8], 0
jnz short loc_12532
cmp [rsp+38h+arg_10], 0
jz short loc_12552
loc_12532:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+38h+arg_8]
mov ecx, [rsp+38h+arg_10]
lea rsi, aStepDD; "STEP %d %d "
mov al, 0
call _fprintf
loc_12552:
jmp short $+2
loc_12554:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 10h
mov [rsp+38h+var_4], 0
loc_1257E:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long LefDefParser::defwRowStr(
LefDefParser *this,
const char *a2,
const char *a3,
int a4,
const char *a5,
const char *a6,
int a7,
int a8,
int a9)
{
int v10; // [rsp+Ch] [rbp-2Ch]
int v13; // [rsp+1Ch] [rbp-1Ch]
v13 = (int)a3;
v10 = (int)a6;
LefDefParser::defwFunc = 16;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwDidInit )
{
if ( LefDefParser::defwState == 16 )
fprintf(LefDefParser::defwFile, ";\n");
if ( this && *(_BYTE *)this && a2 && *a2 )
{
fprintf(LefDefParser::defwFile, "ROW %s %s %d %d %s ", (const char *)this, a2, v13, a4, a5);
if ( v10 || a7 )
{
fprintf(LefDefParser::defwFile, "DO %d BY %d ", v10, a7);
if ( a8 || a9 )
fprintf(LefDefParser::defwFile, "STEP %d %d ", a8, a9);
}
++LefDefParser::defwLines;
LefDefParser::defwState = 16;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwRowStr:
SUB RSP,0x38
MOV EAX,dword ptr [RSP + 0x50]
MOV EAX,dword ptr [RSP + 0x48]
MOV EAX,dword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV dword ptr [RSP + 0x18],ECX
MOV qword ptr [RSP + 0x10],R8
MOV dword ptr [RSP + 0xc],R9D
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x10
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00112453
MOV dword ptr [RSP + 0x34],0x1
JMP 0x0011257e
LAB_00112453:
LEA RAX,[0x12b174]
CMP dword ptr [RAX],0x0
JNZ 0x0011246c
MOV dword ptr [RSP + 0x34],0x2
JMP 0x0011257e
LAB_0011246c:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x10
JNZ 0x00112490
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123e53]
MOV AL,0x0
CALL 0x001010f0
LAB_00112490:
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001124b4
MOV RAX,qword ptr [RSP + 0x28]
CMP byte ptr [RAX],0x0
JZ 0x001124b4
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001124b4
MOV RAX,qword ptr [RSP + 0x20]
CMP byte ptr [RAX],0x0
JNZ 0x001124c1
LAB_001124b4:
MOV dword ptr [RSP + 0x34],0x3
JMP 0x0011257e
LAB_001124c1:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8D,dword ptr [RSP + 0x1c]
MOV R9D,dword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[0x1240c8]
MOV qword ptr [RSP],RAX
MOV AL,0x0
CALL 0x001010f0
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x00112504
CMP dword ptr [RSP + 0x40],0x0
JZ 0x00112554
LAB_00112504:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x40]
LEA RSI,[0x1240dc]
MOV AL,0x0
CALL 0x001010f0
CMP dword ptr [RSP + 0x48],0x0
JNZ 0x00112532
CMP dword ptr [RSP + 0x50],0x0
JZ 0x00112552
LAB_00112532:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x50]
LEA RSI,[0x1240e9]
MOV AL,0x0
CALL 0x001010f0
LAB_00112552:
JMP 0x00112554
LAB_00112554:
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x10
MOV dword ptr [RSP + 0x34],0x0
LAB_0011257e:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* LefDefParser::defwRowStr(char const*, char const*, int, int, char const*, int, int, int, int) */
int4
LefDefParser::defwRowStr
(char *param_1,char *param_2,int param_3,int param_4,char *param_5,int param_6,int param_7
,int param_8,int param_9)
{
int4 local_4;
defwFunc = 0x10;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwDidInit == 0) {
local_4 = 2;
}
else {
if (defwState == 0x10) {
fprintf(defwFile,";\n");
}
if ((((param_1 == (char *)0x0) || (*param_1 == '\0')) || (param_2 == (char *)0x0)) ||
(*param_2 == '\0')) {
local_4 = 3;
}
else {
fprintf(defwFile,"ROW %s %s %d %d %s ",param_1,param_2,(ulong)(uint)param_3,
(ulong)(uint)param_4,param_5);
if (((param_6 != 0) || (param_7 != 0)) &&
((fprintf(defwFile,"DO %d BY %d ",(ulong)(uint)param_6,(ulong)(uint)param_7), param_8 != 0
|| (param_9 != 0)))) {
fprintf(defwFile,"STEP %d %d ",(ulong)(uint)param_8,(ulong)(uint)param_9);
}
defwLines = defwLines + 1;
defwState = 0x10;
local_4 = 0;
}
}
return local_4;
}
|
|
616 | ft_boolean_reinit_search | eloqsql/storage/myisam/ft_boolean_search.c | void ft_boolean_reinit_search(FT_INFO *ftb)
{
_ftb_init_index_search(ftb);
} | O3 | c | ft_boolean_reinit_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x348(%rdi)
je 0x4e94d
movq %rdi, %rbx
cmpl $-0x1, 0x340(%rdi)
je 0x4e94d
movl $0x2, 0x348(%rbx)
leaq 0x70(%rbx), %r14
movslq 0x80(%rbx), %r12
testq %r12, %r12
jle 0x4e937
leaq 0xa0(%rbx), %r15
movq (%r14), %rax
movq (%rax,%r12,8), %r13
testb $0x1, 0x8(%r13)
je 0x4e90c
movq (%r13), %rax
testq %rax, %rax
je 0x4e8b9
movq %r13, %rcx
movl 0x8(%rax), %edx
testb $0x1, %dl
jne 0x4e8b9
movl 0x8(%rcx), %esi
testb $0x4, %sil
jne 0x4e8c9
movl 0x48(%rax), %edi
subl 0x4c(%rax), %edi
btl $0x1, %esi
sbbl $0x0, %edi
ja 0x4e8c9
orl $0x1, %edx
movl %edx, 0x8(%rax)
movq (%rcx), %rcx
movq (%rcx), %rax
testq %rax, %rax
jne 0x4e888
cmpq $0x0, (%r15)
je 0x4e8ea
movq %r15, %rdi
callq 0x61a1d
jmp 0x4e90c
movq $-0x1, 0x10(%r13)
cmpq %rax, %r13
je 0x4e925
testb $0x4, 0x8(%r13)
jne 0x4e925
movq (%r13), %rcx
incl 0x4c(%rcx)
movq (%r13), %r13
jmp 0x4e8d1
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x8, %ecx
leaq 0x504(%rip), %r8 # 0x4ee08
xorl %r9d, %r9d
callq 0x6181c
movb $0x0, 0x4c(%r13)
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x4e344
testl %eax, %eax
jne 0x4e94d
leaq -0x1(%r12), %rax
cmpq $0x1, %r12
movq %rax, %r12
jg 0x4e86a
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5f6e3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_boolean_reinit_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rdi+348h], 0
jz loc_4E94D
mov rbx, rdi
cmp dword ptr [rdi+340h], 0FFFFFFFFh
jz loc_4E94D
mov dword ptr [rbx+348h], 2
lea r14, [rbx+70h]
movsxd r12, dword ptr [rbx+80h]
test r12, r12
jle loc_4E937
lea r15, [rbx+0A0h]
loc_4E86A:
mov rax, [r14]
mov r13, [rax+r12*8]
test byte ptr [r13+8], 1
jz loc_4E90C
mov rax, [r13+0]
test rax, rax
jz short loc_4E8B9
mov rcx, r13
loc_4E888:
mov edx, [rax+8]
test dl, 1
jnz short loc_4E8B9
mov esi, [rcx+8]
test sil, 4
jnz short loc_4E8C9
mov edi, [rax+48h]
sub edi, [rax+4Ch]
bt esi, 1
sbb edi, 0
ja short loc_4E8C9
or edx, 1
mov [rax+8], edx
mov rcx, [rcx]
mov rax, [rcx]
test rax, rax
jnz short loc_4E888
loc_4E8B9:
cmp qword ptr [r15], 0
jz short loc_4E8EA
mov rdi, r15
call reset_tree
jmp short loc_4E90C
loc_4E8C9:
mov qword ptr [r13+10h], 0FFFFFFFFFFFFFFFFh
loc_4E8D1:
cmp r13, rax
jz short loc_4E925
test byte ptr [r13+8], 4
jnz short loc_4E925
mov rcx, [r13+0]
inc dword ptr [rcx+4Ch]
mov r13, [r13+0]
jmp short loc_4E8D1
loc_4E8EA:
xorps xmm0, xmm0
movups [rsp+40h+var_40], xmm0
mov rdi, r15
xor esi, esi
xor edx, edx
mov ecx, 8
lea r8, _ftb_no_dupes_cmp
xor r9d, r9d
call init_tree
loc_4E90C:
mov byte ptr [r13+4Ch], 0
mov rdi, rbx
mov rsi, r13
mov edx, 1
call _ft2_search
test eax, eax
jnz short loc_4E94D
loc_4E925:
lea rax, [r12-1]
cmp r12, 1
mov r12, rax
jg loc_4E86A
loc_4E937:
mov rdi, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp queue_fix
loc_4E94D:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ft_boolean_reinit_search(long long a1)
{
_QWORD *v1; // r14
long long v2; // r12
long long v3; // r13
_DWORD *v4; // rax
_DWORD *v5; // rcx
int v6; // edx
if ( *(_DWORD *)(a1 + 840) && *(_DWORD *)(a1 + 832) != -1 )
{
*(_DWORD *)(a1 + 840) = 2;
v1 = (_QWORD *)(a1 + 112);
v2 = *(int *)(a1 + 128);
if ( v2 <= 0 )
{
LABEL_20:
queue_fix(a1 + 112);
}
else
{
while ( 1 )
{
v3 = *(_QWORD *)(*v1 + 8 * v2);
if ( (*(_BYTE *)(v3 + 8) & 1) != 0 )
{
v4 = *(_DWORD **)v3;
if ( *(_QWORD *)v3 )
{
v5 = *(_DWORD **)(*v1 + 8 * v2);
do
{
v6 = v4[2];
if ( (v6 & 1) != 0 )
break;
if ( (v5[2] & 4) != 0 || v4[18] - v4[19] > (unsigned int)((v5[2] & 2) != 0) )
{
*(_QWORD *)(v3 + 16) = -1LL;
while ( (_DWORD *)v3 != v4 && (*(_BYTE *)(v3 + 8) & 4) == 0 )
{
++*(_DWORD *)(*(_QWORD *)v3 + 76LL);
v3 = *(_QWORD *)v3;
}
goto LABEL_19;
}
v4[2] = v6 | 1;
v5 = *(_DWORD **)v5;
v4 = *(_DWORD **)v5;
}
while ( *(_QWORD *)v5 );
}
if ( *(_QWORD *)(a1 + 160) )
reset_tree(a1 + 160);
else
init_tree(a1 + 160, 0, 0, 8, (unsigned int)ftb_no_dupes_cmp, 0, 0LL, 0LL);
}
*(_BYTE *)(v3 + 76) = 0;
if ( (unsigned int)ft2_search(a1, v3, 1) )
break;
LABEL_19:
if ( v2-- <= 1 )
goto LABEL_20;
}
}
}
}
| ft_boolean_reinit_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RDI + 0x348],0x0
JZ 0x0014e94d
MOV RBX,RDI
CMP dword ptr [RDI + 0x340],-0x1
JZ 0x0014e94d
MOV dword ptr [RBX + 0x348],0x2
LEA R14,[RBX + 0x70]
MOVSXD R12,dword ptr [RBX + 0x80]
TEST R12,R12
JLE 0x0014e937
LEA R15,[RBX + 0xa0]
LAB_0014e86a:
MOV RAX,qword ptr [R14]
MOV R13,qword ptr [RAX + R12*0x8]
TEST byte ptr [R13 + 0x8],0x1
JZ 0x0014e90c
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0014e8b9
MOV RCX,R13
LAB_0014e888:
MOV EDX,dword ptr [RAX + 0x8]
TEST DL,0x1
JNZ 0x0014e8b9
MOV ESI,dword ptr [RCX + 0x8]
TEST SIL,0x4
JNZ 0x0014e8c9
MOV EDI,dword ptr [RAX + 0x48]
SUB EDI,dword ptr [RAX + 0x4c]
BT ESI,0x1
SBB EDI,0x0
JA 0x0014e8c9
OR EDX,0x1
MOV dword ptr [RAX + 0x8],EDX
MOV RCX,qword ptr [RCX]
MOV RAX,qword ptr [RCX]
TEST RAX,RAX
JNZ 0x0014e888
LAB_0014e8b9:
CMP qword ptr [R15],0x0
JZ 0x0014e8ea
MOV RDI,R15
CALL 0x00161a1d
JMP 0x0014e90c
LAB_0014e8c9:
MOV qword ptr [R13 + 0x10],-0x1
LAB_0014e8d1:
CMP R13,RAX
JZ 0x0014e925
TEST byte ptr [R13 + 0x8],0x4
JNZ 0x0014e925
MOV RCX,qword ptr [R13]
INC dword ptr [RCX + 0x4c]
MOV R13,qword ptr [R13]
JMP 0x0014e8d1
LAB_0014e8ea:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
MOV ECX,0x8
LEA R8,[0x14ee08]
XOR R9D,R9D
CALL 0x0016181c
LAB_0014e90c:
MOV byte ptr [R13 + 0x4c],0x0
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x1
CALL 0x0014e344
TEST EAX,EAX
JNZ 0x0014e94d
LAB_0014e925:
LEA RAX,[R12 + -0x1]
CMP R12,0x1
MOV R12,RAX
JG 0x0014e86a
LAB_0014e937:
MOV RDI,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015f6e3
LAB_0014e94d:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ft_boolean_reinit_search(long param_1)
{
long *plVar1;
bool bVar2;
int iVar3;
long *plVar4;
long *plVar5;
long lVar6;
long *plVar7;
if ((*(int *)(param_1 + 0x348) == 0) || (*(int *)(param_1 + 0x340) == -1)) {
return;
}
*(int4 *)(param_1 + 0x348) = 2;
if (0 < (long)*(int *)(param_1 + 0x80)) {
plVar1 = (long *)(param_1 + 0xa0);
lVar6 = (long)*(int *)(param_1 + 0x80);
do {
plVar7 = *(long **)(*(long *)(param_1 + 0x70) + lVar6 * 8);
if ((*(byte *)(plVar7 + 1) & 1) != 0) {
plVar4 = (long *)*plVar7;
plVar5 = plVar7;
if (plVar4 != (long *)0x0) {
LAB_0014e888:
if ((*(uint *)(plVar4 + 1) & 1) == 0) {
if (((*(uint *)(plVar5 + 1) & 4) == 0) &&
((uint)((int)plVar4[9] - *(int *)((long)plVar4 + 0x4c)) <=
(uint)((*(uint *)(plVar5 + 1) >> 1 & 1) != 0))) goto code_r0x0014e8a8;
plVar7[2] = -1;
for (; (plVar7 != plVar4 && ((*(byte *)(plVar7 + 1) & 4) == 0));
plVar7 = (long *)*plVar7) {
*(int *)(*plVar7 + 0x4c) = *(int *)(*plVar7 + 0x4c) + 1;
}
goto LAB_0014e925;
}
}
LAB_0014e8b9:
if (*plVar1 == 0) {
init_tree(plVar1,0,0,8,_ftb_no_dupes_cmp,0,0,0);
}
else {
reset_tree(plVar1);
}
}
*(int1 *)((long)plVar7 + 0x4c) = 0;
iVar3 = _ft2_search(param_1,plVar7,1);
if (iVar3 != 0) {
return;
}
LAB_0014e925:
bVar2 = 1 < lVar6;
lVar6 = lVar6 + -1;
} while (bVar2);
}
queue_fix((long *)(param_1 + 0x70));
return;
code_r0x0014e8a8:
*(uint *)(plVar4 + 1) = *(uint *)(plVar4 + 1) | 1;
plVar4 = *(long **)*plVar5;
plVar5 = (long *)*plVar5;
if (plVar4 == (long *)0x0) goto LAB_0014e8b9;
goto LAB_0014e888;
}
|
|
617 | JS_GetIterator | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_GetIterator(JSContext *ctx, JSValue obj, BOOL is_async)
{
JSValue method, ret, sync_iter;
if (is_async) {
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_asyncIterator);
if (JS_IsException(method))
return method;
if (JS_IsUndefined(method) || JS_IsNull(method)) {
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return method;
sync_iter = JS_GetIterator2(ctx, obj, method);
JS_FreeValue(ctx, method);
if (JS_IsException(sync_iter))
return sync_iter;
ret = JS_CreateAsyncFromSyncIterator(ctx, sync_iter);
JS_FreeValue(ctx, sync_iter);
return ret;
}
} else {
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return method;
}
if (!JS_IsFunction(ctx, method)) {
JS_FreeValue(ctx, method);
return JS_ThrowTypeError(ctx, "value is not iterable");
}
ret = JS_GetIterator2(ctx, obj, method);
JS_FreeValue(ctx, method);
return ret;
} | O1 | c | JS_GetIterator:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testl %ecx, %ecx
je 0x40cac
movl $0xdf, %ecx
movq %r12, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r13
leal -0x2(%rdx), %eax
cmpl $0x2, %eax
jae 0x40cc7
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0xd4, %ecx
movq %r12, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x40de4
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x40e5c
movq %rax, %r12
movq %rdx, %r15
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1ccb2
cmpl $0x6, %r15d
jne 0x40d48
movq %r12, %r13
movq %r15, %r14
jmp 0x40de4
movl $0xd4, %ecx
movq %r12, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x40de4
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x221aa
testl %eax, %eax
je 0x40d1a
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x40e5c
movq %rax, %r15
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1ccb2
movq %r15, %r13
movq %r12, %r14
jmp 0x40de4
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1ccb2
leaq 0x5d07c(%rip), %rsi # 0x9ddac
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %r14d
jmp 0x40de4
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x6b, %ecx
movq %r12, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x40d7e
xorl %r13d, %r13d
xorl %eax, %eax
movl $0x6, %r14d
jmp 0x40dcf
movq %rax, 0x8(%rsp)
movq 0x40(%rbx), %rax
movq 0x370(%rax), %rsi
movq 0x378(%rax), %rdx
movq %rbx, %rdi
movl $0x37, %ecx
callq 0x202f1
movq %rax, %r13
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x40df9
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x1ccb2
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r13, %rax
andq %rcx, %rax
movl %r13d, %r13d
orq %rax, %r13
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1ccb2
movq %r13, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %esi
movq %rbx, %rdi
callq 0xed7d
testq %rax, %rax
je 0x40e37
movq %r12, 0x10(%rsp)
cmpl $-0x9, %r15d
jb 0x40e1d
movq 0x10(%rsp), %rcx
incl (%rcx)
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq %rax, 0x30(%r13)
jmp 0x40dbf
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x1ccb2
jmp 0x40d71
| JS_GetIterator:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r12, rsi
mov rbx, rdi
test ecx, ecx
jz loc_40CAC
mov ecx, 0DFh
mov r8, r12
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
lea eax, [rdx-2]
cmp eax, 2
jnb loc_40CC7
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, 0D4h
mov r8, r12
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
mov r14, rdx
cmp r14d, 6
jz loc_40DE4
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r13
mov r8, r14
call JS_GetIterator2
mov r12, rax
mov r15, rdx
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
cmp r15d, 6
jnz loc_40D48
mov r13, r12
mov r14, r15
jmp loc_40DE4
loc_40CAC:
mov ecx, 0D4h
mov r8, r12
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
loc_40CC7:
mov r14, rdx
cmp r14d, 6
jz loc_40DE4
mov rdi, rbx
mov rsi, r13
mov rdx, r14
call JS_IsFunction
test eax, eax
jz short loc_40D1A
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r13
mov r8, r14
call JS_GetIterator2
mov r15, rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
mov r13, r15
mov r14, r12
jmp loc_40DE4
loc_40D1A:
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
lea rsi, aValueIsNotIter; "value is not iterable"
xor r13d, r13d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp loc_40DE4
loc_40D48:
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, 6Bh ; 'k'
mov r8, r12
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rbp, rdx
cmp ebp, 6
jnz short loc_40D7E
loc_40D71:
xor r13d, r13d
xor eax, eax
mov r14d, 6
jmp short loc_40DCF
loc_40D7E:
mov [rsp+48h+var_40], rax
mov rax, [rbx+40h]
mov rsi, [rax+370h]
mov rdx, [rax+378h]
mov rdi, rbx
mov ecx, 37h ; '7'
call JS_NewObjectProtoClass
mov r13, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_40DF9
mov rdi, [rbx+18h]
mov rsi, [rsp+48h+var_40]
mov rdx, rbp
call JS_FreeValueRT
loc_40DBF:
mov rcx, 0FFFFFFFF00000000h
mov rax, r13
and rax, rcx
loc_40DCF:
mov r13d, r13d
or r13, rax
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r15
call JS_FreeValueRT
loc_40DE4:
mov rax, r13
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40DF9:
mov esi, 20h ; ' '
mov rdi, rbx
call js_mallocz
test rax, rax
jz short loc_40E37
mov [rsp+48h+var_38], r12
cmp r15d, 0FFFFFFF7h
jb short loc_40E1D
mov rcx, [rsp+48h+var_38]
inc dword ptr [rcx]
loc_40E1D:
mov [rax], r12
mov [rax+8], r15
mov rcx, [rsp+48h+var_40]
mov [rax+10h], rcx
mov [rax+18h], rbp
mov [r13+30h], rax
jmp short loc_40DBF
loc_40E37:
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rsp+48h+var_40]
mov rdx, rbp
call JS_FreeValueRT
jmp loc_40D71
| _DWORD * JS_GetIterator(
long long a1,
long long a2,
long long a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rdx
_DWORD *PropertyInternal2; // r13
unsigned long long v15; // rax
long long v16; // rdx
long long v17; // r14
_DWORD *v18; // r12
long long v19; // rdx
long long v20; // r15
long long v21; // r14
long long Iterator2; // r15
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
unsigned long long v29; // rax
long long v30; // rdx
long long v31; // rbp
long long v32; // r13
unsigned long long v33; // rax
long long v34; // rdx
long long v35; // r14
_QWORD *v37; // rax
char v38; // [rsp+0h] [rbp-48h]
_DWORD *v39; // [rsp+8h] [rbp-40h]
if ( !a4 )
{
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0xD4u, a2, a3, 0LL, 0);
LABEL_7:
v21 = v13;
if ( (_DWORD)v13 != 6 )
{
if ( (unsigned int)JS_IsFunction(a1, (long long)PropertyInternal2, v13) )
{
Iterator2 = JS_GetIterator2(a1, a2, a3, PropertyInternal2, v21);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v21);
return (_DWORD *)Iterator2;
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v21);
PropertyInternal2 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"value is not iterable",
v23,
v24,
v25,
v26,
a5,
a6,
a7,
a8,
v27,
v28,
a11,
a12,
v38);
}
}
return PropertyInternal2;
}
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0xDFu, a2, a3, 0LL, 0);
if ( (unsigned int)(v13 - 2) >= 2 )
goto LABEL_7;
v15 = JS_GetPropertyInternal2(a1, a2, a3, 0xD4u, a2, a3, 0LL, 0);
PropertyInternal2 = (_DWORD *)v15;
v17 = v16;
if ( (_DWORD)v16 != 6 )
{
v18 = (_DWORD *)JS_GetIterator2(a1, a2, a3, v15, v16);
v20 = v19;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v17);
if ( (_DWORD)v20 == 6 )
return v18;
v29 = JS_GetPropertyInternal2(a1, (long long)v18, v20, 0x6Bu, (long long)v18, v20, 0LL, 0);
v31 = v30;
if ( (_DWORD)v30 == 6 )
goto LABEL_12;
v39 = (_DWORD *)v29;
v32 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 880LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 888LL),
0x37u);
v35 = v34;
if ( (_DWORD)v34 == 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v31);
}
else
{
v37 = (_QWORD *)js_mallocz(a1, 0x20uLL);
if ( !v37 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v32, v35);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v31);
LABEL_12:
LODWORD(v32) = 0;
v33 = 0LL;
LABEL_16:
PropertyInternal2 = (_DWORD *)(v33 | (unsigned int)v32);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v18, v20);
return PropertyInternal2;
}
if ( (unsigned int)v20 >= 0xFFFFFFF7 )
++*v18;
*v37 = v18;
v37[1] = v20;
v37[2] = v39;
v37[3] = v31;
*(_QWORD *)(v32 + 48) = v37;
}
v33 = v32 & 0xFFFFFFFF00000000LL;
goto LABEL_16;
}
return PropertyInternal2;
}
| JS_GetIterator:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
TEST ECX,ECX
JZ 0x00140cac
MOV ECX,0xdf
MOV R8,R12
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R13,RAX
LEA EAX,[RDX + -0x2]
CMP EAX,0x2
JNC 0x00140cc7
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,0xd4
MOV R8,R12
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R13,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00140de4
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R13
MOV R8,R14
CALL 0x00140e5c
MOV R12,RAX
MOV R15,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011ccb2
CMP R15D,0x6
JNZ 0x00140d48
MOV R13,R12
MOV R14,R15
JMP 0x00140de4
LAB_00140cac:
MOV ECX,0xd4
MOV R8,R12
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R13,RAX
LAB_00140cc7:
MOV R14,RDX
CMP R14D,0x6
JZ 0x00140de4
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R14
CALL 0x001221aa
TEST EAX,EAX
JZ 0x00140d1a
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R13
MOV R8,R14
CALL 0x00140e5c
MOV R15,RAX
MOV R12,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011ccb2
MOV R13,R15
MOV R14,R12
JMP 0x00140de4
LAB_00140d1a:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011ccb2
LEA RSI,[0x19ddac]
XOR R13D,R13D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
MOV R14D,0x6
JMP 0x00140de4
LAB_00140d48:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,0x6b
MOV R8,R12
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00140d7e
LAB_00140d71:
XOR R13D,R13D
XOR EAX,EAX
MOV R14D,0x6
JMP 0x00140dcf
LAB_00140d7e:
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x370]
MOV RDX,qword ptr [RAX + 0x378]
MOV RDI,RBX
MOV ECX,0x37
CALL 0x001202f1
MOV R13,RAX
MOV R14,RDX
CMP R14D,0x6
JNZ 0x00140df9
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x0011ccb2
LAB_00140dbf:
MOV RCX,-0x100000000
MOV RAX,R13
AND RAX,RCX
LAB_00140dcf:
MOV R13D,R13D
OR R13,RAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R15
CALL 0x0011ccb2
LAB_00140de4:
MOV RAX,R13
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140df9:
MOV ESI,0x20
MOV RDI,RBX
CALL 0x0010ed7d
TEST RAX,RAX
JZ 0x00140e37
MOV qword ptr [RSP + 0x10],R12
CMP R15D,-0x9
JC 0x00140e1d
MOV RCX,qword ptr [RSP + 0x10]
INC dword ptr [RCX]
LAB_00140e1d:
MOV qword ptr [RAX],R12
MOV qword ptr [RAX + 0x8],R15
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBP
MOV qword ptr [R13 + 0x30],RAX
JMP 0x00140dbf
LAB_00140e37:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x0011ccb2
JMP 0x00140d71
|
int1 [16] JS_GetIterator(long param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
int *piVar2;
ulong uVar3;
int1 (*pauVar4) [16];
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
if (param_4 == 0) {
auVar7 = JS_GetPropertyInternal2();
LAB_00140cc7:
uVar5 = auVar7._8_8_;
uVar6 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
iVar1 = JS_IsFunction(param_1,uVar6,uVar5);
if (iVar1 == 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar5);
JS_ThrowTypeError(param_1,"value is not iterable");
auVar7 = ZEXT816(6) << 0x40;
}
else {
auVar7 = JS_GetIterator2(param_1,param_2,param_3,uVar6,uVar5);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar5);
}
}
return auVar7;
}
auVar7 = JS_GetPropertyInternal2();
if (1 < auVar7._8_4_ - 2U) goto LAB_00140cc7;
auVar7 = JS_GetPropertyInternal2(param_1,param_2,param_3,0xd4,param_2,param_3,0,0);
if (auVar7._8_4_ == 6) {
return auVar7;
}
auVar8 = JS_GetIterator2(param_1,param_2,param_3,auVar7._0_8_,auVar7._8_8_);
uVar5 = auVar8._8_8_;
piVar2 = auVar8._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
if (auVar8._8_4_ == 6) {
return auVar8;
}
auVar7 = JS_GetPropertyInternal2(param_1,piVar2,uVar5,0x6b,piVar2,uVar5,0,0);
if (auVar7._8_4_ == 6) {
LAB_00140d71:
uVar3 = 0;
auVar9 = ZEXT816(6) << 0x40;
}
else {
auVar9 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x370),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x378),0x37);
uVar3 = auVar9._0_8_;
if (auVar9._8_4_ == 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
}
else {
pauVar4 = (int1 (*) [16])js_mallocz(param_1,0x20);
if (pauVar4 == (int1 (*) [16])0x0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,auVar9._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
goto LAB_00140d71;
}
if (0xfffffff6 < auVar8._8_4_) {
*piVar2 = *piVar2 + 1;
}
*pauVar4 = auVar8;
pauVar4[1] = auVar7;
*(int1 (**) [16])(uVar3 + 0x30) = pauVar4;
}
uVar3 = uVar3 & 0xffffffff00000000;
}
auVar7._8_8_ = auVar9._8_8_;
auVar7._0_8_ = auVar9._0_8_ & 0xffffffff | uVar3;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar2,uVar5);
return auVar7;
}
|
|
618 | ftxui::separatorDouble() | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp | Element separatorDouble() {
return std::make_shared<SeparatorAuto>(DOUBLE);
} | O1 | cpp | ftxui::separatorDouble():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x70, %edi
callq 0xb3e0
movq %rax, %rbx
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbx)
leaq 0x34037(%rip), %rax # 0x585f8
movq %rax, (%rbx)
movq %rbx, %r15
addq $0x10, %r15
movq %r15, %rdi
callq 0x240c8
leaq 0x3406e(%rip), %rax # 0x58648
movq %rax, 0x10(%rbx)
movl $0x3, 0x6c(%rbx)
movq %r15, (%r14)
movq %rbx, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x70, %esi
movq %rbx, %rdi
callq 0xb400
movq %r14, %rdi
callq 0xb780
| _ZN5ftxui15separatorDoubleEv:
push r15
push r14
push rbx
mov r14, rdi
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rax, 100000001h
mov [rbx+8], rax
lea rax, off_585F8
mov [rbx], rax
mov r15, rbx
add r15, 10h
mov rdi, r15; this
call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void)
lea rax, off_58648
mov [rbx+10h], rax
mov dword ptr [rbx+6Ch], 3
mov [r14], r15
mov [r14+8], rbx
mov rax, r14
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
| ftxui * ftxui::separatorDouble(ftxui *this)
{
long long v1; // rbx
v1 = operator new(0x70uLL);
*(_QWORD *)(v1 + 8) = 0x100000001LL;
*(_QWORD *)v1 = off_585F8;
ftxui::Node::Node((ftxui::Node *)(v1 + 16));
*(_QWORD *)(v1 + 16) = off_58648;
*(_DWORD *)(v1 + 108) = 3;
*(_QWORD *)this = v1 + 16;
*((_QWORD *)this + 1) = v1;
return this;
}
| separatorDouble:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
MOV EDI,0x70
CALL 0x0010b3e0
MOV RBX,RAX
MOV RAX,0x100000001
MOV qword ptr [RBX + 0x8],RAX
LEA RAX,[0x1585f8]
MOV qword ptr [RBX],RAX
MOV R15,RBX
ADD R15,0x10
LAB_001245cb:
MOV RDI,R15
CALL 0x001240c8
LAB_001245d3:
LEA RAX,[0x158648]
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x6c],0x3
MOV qword ptr [R14],R15
MOV qword ptr [R14 + 0x8],RBX
MOV RAX,R14
POP RBX
POP R14
POP R15
RET
|
/* ftxui::separatorDouble() */
ftxui * __thiscall ftxui::separatorDouble(ftxui *this)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0x70);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_001585f8;
/* try { // try from 001245cb to 001245d2 has its CatchHandler @ 001245f5 */
Node::Node((Node *)(puVar1 + 2));
puVar1[2] = &PTR__Node_00158648;
*(int4 *)((long)puVar1 + 0x6c) = 3;
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
return this;
}
|
|
619 | postprocess_cpu_params(cpu_params&, cpu_params const*) | monkey531[P]llama/common/common.cpp | void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) {
int32_t n_set = 0;
if (cpuparams.n_threads < 0) {
// Assuming everything about cpuparams is invalid
if (role_model != nullptr) {
cpuparams = *role_model;
} else {
cpuparams.n_threads = cpu_get_num_math();
}
}
for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) {
if (cpuparams.cpumask[i]) {
n_set++;
}
}
if (n_set && n_set < cpuparams.n_threads) {
// Not enough set bits, may experience performance issues.
LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads);
}
} | O3 | cpp | postprocess_cpu_params(cpu_params&, cpu_params const*):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jns 0x22852
testq %rsi, %rsi
je 0x2284b
movl $0x214, %edx # imm = 0x214
movq %rbx, %rdi
callq 0x1a5e0
jmp 0x22852
callq 0x2263e
movl %eax, (%rbx)
pxor %xmm1, %xmm1
movl $0x4, %eax
pxor %xmm0, %xmm0
movd (%rbx,%rax), %xmm2
punpcklbw %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
punpcklwd %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
paddd %xmm2, %xmm0
addq $0x4, %rax
cmpq $0x204, %rax # imm = 0x204
jne 0x2285f
pshufd $0xee, %xmm0, %xmm1 # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0 # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %ebp
testl %ebp, %ebp
je 0x228cc
cmpl (%rbx), %ebp
jge 0x228cc
leaq 0xc182f(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x228cc
callq 0x842cf
movl (%rbx), %r8d
leaq 0x8b282(%rip), %rdx # 0xadb37
movq %rax, %rdi
movl $0x3, %esi
movl %ebp, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8436c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _Z22postprocess_cpu_paramsR10cpu_paramsPKS_:
push rbp
push rbx
push rax
mov rbx, rdi
cmp dword ptr [rdi], 0
jns short loc_22852
test rsi, rsi
jz short loc_2284B
mov edx, 214h
mov rdi, rbx
call _memcpy
jmp short loc_22852
loc_2284B:
call _Z16cpu_get_num_mathv; cpu_get_num_math(void)
mov [rbx], eax
loc_22852:
pxor xmm1, xmm1
mov eax, 4
pxor xmm0, xmm0
loc_2285F:
movd xmm2, dword ptr [rbx+rax]
punpcklbw xmm2, xmm1
punpcklwd xmm2, xmm1
paddd xmm0, xmm2
add rax, 4
cmp rax, 204h
jnz short loc_2285F
pshufd xmm1, xmm0, 0EEh
paddd xmm1, xmm0
pshufd xmm0, xmm1, 55h ; 'U'
paddd xmm0, xmm1
movd ebp, xmm0
test ebp, ebp
jz short loc_228CC
cmp ebp, [rbx]
jge short loc_228CC
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_228CC
call _Z15common_log_mainv; common_log_main(void)
mov r8d, [rbx]
lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"...
mov rdi, rax
mov esi, 3
mov ecx, ebp
xor eax, eax
add rsp, 8
pop rbx
pop rbp
jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_228CC:
add rsp, 8
pop rbx
pop rbp
retn
| int * postprocess_cpu_params(int *a1, long long a2)
{
int *result; // rax
__m128i v3; // xmm0
__m128i v4; // xmm1
int v5; // ebp
int v6; // eax
int v7; // r9d
if ( *a1 < 0 )
{
if ( a2 )
memcpy(a1, a2, 532LL);
else
*a1 = cpu_get_num_math();
}
result = (_DWORD *)&byte_4;
v3 = 0LL;
do
v3 = _mm_add_epi32(
v3,
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(*(int *)((char *)result++ + (_QWORD)a1)), (__m128i)0LL),
(__m128i)0LL));
while ( result != &dword_204 );
v4 = _mm_add_epi32(_mm_shuffle_epi32(v3, 238), v3);
v5 = _mm_cvtsi128_si32(_mm_add_epi32(_mm_shuffle_epi32(v4, 85), v4));
if ( v5 && v5 < *a1 )
{
result = (int *)&common_log_verbosity_thold;
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
return (int *)common_log_add(
v6,
3,
(unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n",
v5,
*a1,
v7);
}
}
return result;
}
| postprocess_cpu_params:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP dword ptr [RDI],0x0
JNS 0x00122852
TEST RSI,RSI
JZ 0x0012284b
MOV EDX,0x214
MOV RDI,RBX
CALL 0x0011a5e0
JMP 0x00122852
LAB_0012284b:
CALL 0x0012263e
MOV dword ptr [RBX],EAX
LAB_00122852:
PXOR XMM1,XMM1
MOV EAX,0x4
PXOR XMM0,XMM0
LAB_0012285f:
MOVD XMM2,dword ptr [RBX + RAX*0x1]
PUNPCKLBW XMM2,XMM1
PUNPCKLWD XMM2,XMM1
PADDD XMM0,XMM2
ADD RAX,0x4
CMP RAX,0x204
JNZ 0x0012285f
PSHUFD XMM1,XMM0,0xee
PADDD XMM1,XMM0
PSHUFD XMM0,XMM1,0x55
PADDD XMM0,XMM1
MOVD EBP,XMM0
TEST EBP,EBP
JZ 0x001228cc
CMP EBP,dword ptr [RBX]
JGE 0x001228cc
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x001228cc
CALL 0x001842cf
MOV R8D,dword ptr [RBX]
LEA RDX,[0x1adb37]
MOV RDI,RAX
MOV ESI,0x3
MOV ECX,EBP
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0018436c
LAB_001228cc:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */
void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2)
{
int1 auVar1 [13];
int1 auVar2 [13];
int1 auVar3 [13];
ulong uVar4;
int1 auVar5 [13];
int4 uVar6;
long lVar7;
int8 uVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
if (*(int *)param_1 < 0) {
if (param_2 == (cpu_params *)0x0) {
uVar6 = cpu_get_num_math();
*(int4 *)param_1 = uVar6;
}
else {
memcpy(param_1,param_2,0x214);
}
}
lVar7 = 4;
iVar9 = 0;
iVar10 = 0;
iVar11 = 0;
iVar12 = 0;
do {
uVar6 = *(int4 *)(param_1 + lVar7);
uVar4 = (ulong)(ushort)uVar6 & 0xffffffffffff00ff;
auVar1._8_4_ = 0;
auVar1._0_8_ = uVar4;
auVar1[0xc] = (char)((uint)uVar6 >> 0x18);
auVar2[8] = (char)((uint)uVar6 >> 0x10);
auVar2._0_8_ = uVar4;
auVar2[9] = 0;
auVar2._10_3_ = auVar1._10_3_;
auVar5._5_8_ = 0;
auVar5._0_5_ = auVar2._8_5_;
auVar3[4] = (char)((uint)uVar6 >> 8);
auVar3._0_4_ = (int)uVar4;
auVar3[5] = 0;
auVar3._6_7_ = SUB137(auVar5 << 0x40,6);
iVar9 = iVar9 + (int)uVar4;
iVar10 = iVar10 + auVar3._4_4_;
iVar11 = iVar11 + auVar2._8_4_;
iVar12 = iVar12 + (uint)(uint3)(auVar1._10_3_ >> 0x10);
lVar7 = lVar7 + 4;
} while (lVar7 != 0x204);
iVar9 = iVar12 + iVar10 + iVar11 + iVar9;
if (((iVar9 != 0) && (iVar9 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) {
uVar8 = common_log_main();
common_log_add(uVar8,3,
"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n",
iVar9,*(int4 *)param_1);
return;
}
return;
}
|
|
620 | string_replace_all(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | void string_replace_all(std::string & s, const std::string & search, const std::string & replace) {
if (search.empty()) {
return;
}
std::string builder;
builder.reserve(s.length());
size_t pos = 0;
size_t last_pos = 0;
while ((pos = s.find(search, last_pos)) != std::string::npos) {
builder.append(s, last_pos, pos - last_pos);
builder.append(replace);
last_pos = pos + search.length();
}
builder.append(s, last_pos, std::string::npos);
s = std::move(builder);
} | O0 | cpp | string_replace_all(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x4f3f0
testb $0x1, %al
jne 0x57973
jmp 0x57978
jmp 0x57a74
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4f4e0
movq 0x60(%rsp), %rdi
callq 0x4f880
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x4fbb0
jmp 0x579a0
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x4f970
movq %rax, 0x18(%rsp)
cmpq $-0x1, %rax
je 0x57a3e
movq 0x60(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
subq %rdx, %rcx
leaq 0x30(%rsp), %rdi
callq 0x4fe50
jmp 0x579ef
movq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x4fc30
jmp 0x57a00
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rdi
callq 0x4f880
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0x579b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x50100
jmp 0x57a79
movq 0x60(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rdi
movq $-0x1, %rcx
callq 0x4fe50
jmp 0x57a5b
movq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4f7d0
leaq 0x30(%rsp), %rdi
callq 0x50100
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x4f990
nopw %cs:(%rax,%rax)
| _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov rdi, [rsp+68h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_57973
jmp short loc_57978
loc_57973:
jmp loc_57A74
loc_57978:
lea rdi, [rsp+68h+var_38]
mov [rsp+68h+var_60], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+68h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+68h+var_60]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_579A0:
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_58], 0
loc_579B2:
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
mov rdx, [rsp+68h+var_58]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong)
mov [rsp+68h+var_50], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_57A3E
mov rsi, [rsp+68h+var_8]
mov rdx, [rsp+68h+var_58]
mov rcx, [rsp+68h+var_50]
sub rcx, rdx
lea rdi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong)
jmp short $+2
loc_579EF:
mov rsi, [rsp+68h+var_18]
lea rdi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
jmp short $+2
loc_57A00:
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_68], rax
mov rdi, [rsp+68h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rcx, rax
mov rax, [rsp+68h+var_68]
add rax, rcx
mov [rsp+68h+var_58], rax
jmp short loc_579B2
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_57A79
loc_57A3E:
mov rsi, [rsp+68h+var_8]
mov rdx, [rsp+68h+var_58]
lea rdi, [rsp+68h+var_38]
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong)
jmp short $+2
loc_57A5B:
mov rdi, [rsp+68h+var_8]
lea rsi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_57A74:
add rsp, 68h
retn
loc_57A79:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| void string_replace_all(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long i; // rax
long long v5; // [rsp+10h] [rbp-58h]
long long v6; // [rsp+18h] [rbp-50h]
_BYTE v7[32]; // [rsp+30h] [rbp-38h] BYREF
long long v8; // [rsp+50h] [rbp-18h]
long long v9; // [rsp+58h] [rbp-10h]
long long v10; // [rsp+60h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
if ( (std::string::empty(a2) & 1) == 0 )
{
std::string::basic_string(v7);
v3 = std::string::length(v10);
std::string::reserve(v7, v3);
v5 = 0LL;
for ( i = std::string::find(v10, v9, 0LL); ; i = std::string::find(v10, v9, v5) )
{
v6 = i;
if ( i == -1 )
break;
std::string::append(v7, v10, v5, i - v5);
std::string::append(v7, v8);
v5 = std::string::length(v9) + v6;
}
std::string::append(v7, v10, v5, -1LL);
std::string::operator=(v10, v7);
std::string::~string(v7);
}
}
| string_replace_all:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0014f3f0
TEST AL,0x1
JNZ 0x00157973
JMP 0x00157978
LAB_00157973:
JMP 0x00157a74
LAB_00157978:
LEA RDI,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0014f4e0
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0014f880
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
LAB_00157999:
CALL 0x0014fbb0
JMP 0x001579a0
LAB_001579a0:
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x10],0x0
LAB_001579b2:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0014f970
MOV qword ptr [RSP + 0x18],RAX
CMP RAX,-0x1
JZ 0x00157a3e
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
SUB RCX,RDX
LEA RDI,[RSP + 0x30]
CALL 0x0014fe50
JMP 0x001579ef
LAB_001579ef:
MOV RSI,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x30]
CALL 0x0014fc30
JMP 0x00157a00
LAB_00157a00:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0014f880
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001579b2
LAB_00157a3e:
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x30]
MOV RCX,-0x1
CALL 0x0014fe50
LAB_00157a59:
JMP 0x00157a5b
LAB_00157a5b:
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[RSP + 0x30]
CALL 0x0014f7d0
LEA RDI,[RSP + 0x30]
CALL 0x00150100
LAB_00157a74:
ADD RSP,0x68
RET
|
/* string_replace_all(std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string
const&) */
void string_replace_all(string *param_1,string *param_2,string *param_3)
{
ulong uVar1;
long lVar2;
long lVar3;
ulong local_58;
string local_38 [32];
string *local_18;
string *local_10;
string *local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
uVar1 = std::__cxx11::string::empty();
if ((uVar1 & 1) == 0) {
std::__cxx11::string::string(local_38);
std::__cxx11::string::length();
/* try { // try from 00157999 to 00157a58 has its CatchHandler @ 00157a24 */
std::__cxx11::string::reserve((ulong)local_38);
local_58 = 0;
while (lVar2 = std::__cxx11::string::find(local_8,(ulong)local_10), lVar2 != -1) {
std::__cxx11::string::append(local_38,(ulong)local_8,local_58);
std::__cxx11::string::append(local_38);
lVar3 = std::__cxx11::string::length();
local_58 = lVar2 + lVar3;
}
std::__cxx11::string::append(local_38,(ulong)local_8,local_58);
std::__cxx11::string::operator=(local_8,local_38);
std::__cxx11::string::~string(local_38);
}
return;
}
|
|
621 | CLI::ArgumentMismatch::AtLeast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long) | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/Error.hpp | static ArgumentMismatch AtLeast(std::string name, int num, std::size_t received) {
return ArgumentMismatch(name + ": At least " + std::to_string(num) + " required but received " +
std::to_string(received));
} | O2 | cpp | CLI::ArgumentMismatch::AtLeast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x18b16(%rip), %rdx # 0x294f2
leaq 0x40(%rsp), %rdi
callq 0x105fb
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x113ef
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xe3ee
leaq 0x18af1(%rip), %rdx # 0x294fe
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xfaba
movq %rsp, %rdi
movq %r14, %rsi
callq 0x11448
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq %rsp, %rdx
callq 0xe3ee
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1148a
leaq 0xa0(%rsp), %rdi
callq 0x7860
movq %rsp, %rdi
callq 0x7860
leaq 0x80(%rsp), %rdi
callq 0x7860
leaq 0x60(%rsp), %rdi
callq 0x7860
leaq 0x20(%rsp), %rdi
callq 0x7860
leaq 0x40(%rsp), %rdi
callq 0x7860
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x7860
jmp 0x10ab6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7860
jmp 0x10ac3
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7860
jmp 0x10ad5
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7860
jmp 0x10ae4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7860
leaq 0x40(%rsp), %rdi
callq 0x7860
movq %rbx, %rdi
callq 0x7770
movq %rax, %rbx
jmp 0x10aee
nop
| _ZN3CLI16ArgumentMismatch7AtLeastENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEim:
push rbp
push r14
push rbx
sub rsp, 0C0h
mov r14, rcx
mov ebp, edx
mov rbx, rdi
lea rdx, aAtLeast_0; ": At least "
lea rdi, [rsp+0D8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+0D8h+var_B8]; this
mov esi, ebp; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea rdi, [rsp+0D8h+var_78]
lea rsi, [rsp+0D8h+var_98]
lea rdx, [rsp+0D8h+var_B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, aRequiredButRec; " required but received "
lea rdi, [rsp+0D8h+var_58]
lea rsi, [rsp+0D8h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, rsp; this
mov rsi, r14; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rdi, [rsp+0D8h+var_38]
lea rsi, [rsp+0D8h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+0D8h+var_38]
mov rdi, rbx
call _ZN3CLI16ArgumentMismatchC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::ArgumentMismatch::ArgumentMismatch(std::string)
lea rdi, [rsp+0D8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_10AB6
mov rbx, rax
loc_10AB6:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_10AC3
mov rbx, rax
loc_10AC3:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_10AD5
mov rbx, rax
loc_10AD5:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_10AE4
mov rbx, rax
loc_10AE4:
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_10AEE:
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_10AEE
| long long CLI::ArgumentMismatch::AtLeast(long long a1, long long a2, int a3, unsigned long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v11; // [rsp+0h] [rbp-D8h] BYREF
int v12; // [rsp+8h] [rbp-D0h]
int v13; // [rsp+10h] [rbp-C8h]
int v14; // [rsp+18h] [rbp-C0h]
_QWORD v15[4]; // [rsp+20h] [rbp-B8h] BYREF
_QWORD v16[4]; // [rsp+40h] [rbp-98h] BYREF
_BYTE v17[32]; // [rsp+60h] [rbp-78h] BYREF
_QWORD v18[4]; // [rsp+80h] [rbp-58h] BYREF
_BYTE v19[56]; // [rsp+A0h] [rbp-38h] BYREF
std::operator+<char>((long long)v16, a2, (long long)": At least ");
std::to_string((std::__cxx11 *)v15, a3);
std::operator+<char>((long long)v17, v16, v15);
std::operator+<char>((long long)v18, (long long)v17, (long long)" required but received ");
std::to_string((std::__cxx11 *)&v11, a4);
std::operator+<char>((long long)v19, v18, &v11);
CLI::ArgumentMismatch::ArgumentMismatch(a1, (unsigned int)v19, v6, v7, v8, v9, v11, v12, v13, v14, v15[0]);
std::string::~string(v19);
std::string::~string(&v11);
std::string::~string(v18);
std::string::~string(v17);
std::string::~string(v15);
std::string::~string(v16);
return a1;
}
| AtLeast:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV R14,RCX
MOV EBP,EDX
MOV RBX,RDI
LEA RDX,[0x1294f2]
LEA RDI,[RSP + 0x40]
CALL 0x001105fb
LAB_001109e6:
LEA RDI,[RSP + 0x20]
MOV ESI,EBP
CALL 0x001113ef
LAB_001109f2:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0x40]
LEA RDX,[RSP + 0x20]
CALL 0x0010e3ee
LAB_00110a06:
LEA RDX,[0x1294fe]
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x60]
CALL 0x0010faba
LAB_00110a1f:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00111448
LAB_00110a2a:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x80]
MOV RDX,RSP
CALL 0x0010e3ee
LAB_00110a42:
LEA RSI,[RSP + 0xa0]
MOV RDI,RBX
CALL 0x0011148a
LAB_00110a52:
LEA RDI,[RSP + 0xa0]
CALL 0x00107860
MOV RDI,RSP
CALL 0x00107860
LEA RDI,[RSP + 0x80]
CALL 0x00107860
LEA RDI,[RSP + 0x60]
CALL 0x00107860
LEA RDI,[RSP + 0x20]
CALL 0x00107860
LEA RDI,[RSP + 0x40]
CALL 0x00107860
MOV RAX,RBX
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
|
/* CLI::ArgumentMismatch::AtLeast(std::__cxx11::string, int, unsigned long) */
ArgumentMismatch * __thiscall
CLI::ArgumentMismatch::AtLeast(ArgumentMismatch *this,char *param_2,int param_3,ulong param_4)
{
__cxx11 a_Stack_d8 [32];
__cxx11 local_b8 [32];
string local_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [32];
std::operator+(local_98,param_2);
/* try { // try from 001109e6 to 001109f1 has its CatchHandler @ 00110b00 */
std::__cxx11::to_string(local_b8,param_3);
/* try { // try from 001109f2 to 00110a05 has its CatchHandler @ 00110ae1 */
std::operator+(local_78,local_98);
/* try { // try from 00110a06 to 00110a1e has its CatchHandler @ 00110ad2 */
std::operator+(local_58,(char *)local_78);
/* try { // try from 00110a1f to 00110a29 has its CatchHandler @ 00110ac0 */
std::__cxx11::to_string(a_Stack_d8,param_4);
/* try { // try from 00110a2a to 00110a41 has its CatchHandler @ 00110ab3 */
std::operator+(local_38,local_58);
/* try { // try from 00110a42 to 00110a51 has its CatchHandler @ 00110aa1 */
ArgumentMismatch(this,local_38);
std::__cxx11::string::~string(local_38);
std::__cxx11::string::~string((string *)a_Stack_d8);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string((string *)local_b8);
std::__cxx11::string::~string(local_98);
return this;
}
|
|
622 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const | monkey531[P]llama/common/json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl (%rax), %eax
movq %rax, 0x10(%rsp)
subq $0x9, %rax
ja 0xc6ead
movq 0x10(%rsp), %rax
leaq 0xfafa7(%rip), %rcx # 0x1c1e14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0x20(%rsp)
jmp 0xc6eb6
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xaf420
movq %rax, 0x20(%rsp)
jmp 0xc6eb6
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xaf540
movq %rax, 0x20(%rsp)
jmp 0xc6eb6
jmp 0xc6ead
movq $0x1, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
movzx eax, byte ptr [rax]
mov [rsp+28h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_C6E74; jumptable 00000000000C6E74 default case
mov rax, [rsp+28h+var_18]
lea rcx, jpt_C6E74
movsxd rax, ds:(jpt_C6E74 - 1C1E14h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C6E76:
mov [rsp+28h+var_8], 0; jumptable 00000000000C6E74 case 0
jmp short loc_C6EB6
loc_C6E81:
mov rax, [rsp+28h+var_20]; jumptable 00000000000C6E74 case 2
mov rdi, [rax+8]
call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void)
mov [rsp+28h+var_8], rax
jmp short loc_C6EB6
loc_C6E96:
mov rax, [rsp+28h+var_20]; jumptable 00000000000C6E74 case 1
mov rdi, [rax+8]
call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE4sizeEv; std::vector<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>>>::size(void)
mov [rsp+28h+var_8], rax
jmp short loc_C6EB6
loc_C6EAB:
jmp short $+2; jumptable 00000000000C6E74 cases 3-9
def_C6E74:
mov [rsp+28h+var_8], 1; jumptable 00000000000C6E74 default case
loc_C6EB6:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(
long long a1)
{
long long v2; // [rsp+20h] [rbp-8h]
switch ( *(_BYTE *)a1 )
{
case 0:
v2 = 0LL;
break;
case 1:
v2 = std::vector<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>>>::size(*(_QWORD **)(a1 + 8));
break;
case 2:
v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD **)(a1 + 8));
break;
default:
v2 = 1LL;
break;
}
return v2;
}
| size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
SUB RAX,0x9
JA 0x001c6ead
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x2c1e14]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV qword ptr [RSP + 0x20],0x0
JMP 0x001c6eb6
caseD_2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001af420
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c6eb6
caseD_1:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001af540
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c6eb6
caseD_3:
JMP 0x001c6ead
default:
MOV qword ptr [RSP + 0x20],0x1
LAB_001c6eb6:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
int8 local_8;
switch(*this) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0:
local_8 = 0;
break;
case (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:
local_8 = std::
vector<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>>,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>>>>
::size(*(vector<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>>,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));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2:
local_8 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8));
break;
case (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>
)0x3:
case (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>
)0x4:
case (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:
case (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:
case (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:
case (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>
)0x8:
case (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>
)0x9:
default:
local_8 = 1;
}
return local_8;
}
|
|
623 | line_add | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/pairing.c | static void line_add(vec384fp6 line, POINTonE2 *T, const POINTonE2 *R,
const POINTonE2_affine *Q)
{
vec384x Z1Z1, U2, S2, H, HH, I, J, V;
#if 1
# define r line[1]
#else
vec384x r;
#endif
/*
* https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#addition-madd-2007-bl
* with XYZ3 being |T|, XYZ1 - |R|, XY2 - |Q|, i.e. Q is affine
*/
sqr_fp2(Z1Z1, R->Z); /* Z1Z1 = Z1^2 */
mul_fp2(U2, Q->X, Z1Z1); /* U2 = X2*Z1Z1 */
mul_fp2(S2, Q->Y, R->Z);
mul_fp2(S2, S2, Z1Z1); /* S2 = Y2*Z1*Z1Z1 */
sub_fp2(H, U2, R->X); /* H = U2-X1 */
sqr_fp2(HH, H); /* HH = H^2 */
add_fp2(I, HH, HH);
add_fp2(I, I, I); /* I = 4*HH */
mul_fp2(J, H, I); /* J = H*I */
sub_fp2(r, S2, R->Y);
add_fp2(r, r, r); /* r = 2*(S2-Y1) */
mul_fp2(V, R->X, I); /* V = X1*I */
sqr_fp2(T->X, r);
sub_fp2(T->X, T->X, J);
sub_fp2(T->X, T->X, V);
sub_fp2(T->X, T->X, V); /* X3 = r^2-J-2*V */
mul_fp2(J, J, R->Y);
sub_fp2(T->Y, V, T->X);
mul_fp2(T->Y, T->Y, r);
sub_fp2(T->Y, T->Y, J);
sub_fp2(T->Y, T->Y, J); /* Y3 = r*(V-X3)-2*Y1*J */
add_fp2(T->Z, R->Z, H);
sqr_fp2(T->Z, T->Z);
sub_fp2(T->Z, T->Z, Z1Z1);
sub_fp2(T->Z, T->Z, HH); /* Z3 = (Z1+H)^2-Z1Z1-HH */
/*
* line evaluation
*/
mul_fp2(I, r, Q->X);
mul_fp2(J, Q->Y, T->Z);
sub_fp2(I, I, J);
add_fp2(line[0], I, I); /* 2*(r*X2 - Y2*Z3) */
#ifdef r
# undef r
#else
vec_copy(line[1], r, sizeof(r));
#endif
vec_copy(line[2], T->Z, sizeof(T->Z));
} | O0 | c | line_add:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp # imm = 0x320
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0xc0, %rsi
callq 0xb5100
leaq -0xe0(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0xb5090
leaq -0x140(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x60, %rsi
movq -0x18(%rbp), %rdx
addq $0xc0, %rdx
callq 0xb5090
leaq -0x140(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0xb5090
leaq -0x1a0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xb4ed0
leaq -0x200(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xb5100
leaq -0x260(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0xb4e60
leaq -0x260(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0xb4e60
leaq -0x2c0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0xb5090
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x140(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x60, %rdx
callq 0xb4ed0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
callq 0xb4e60
leaq -0x320(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0xb5090
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
callq 0xb5100
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x320(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x320(%rbp), %rdx
callq 0xb4ed0
leaq -0x2c0(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x60, %rdx
callq 0xb5090
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
leaq -0x320(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
callq 0xb5090
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
leaq -0x2c0(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
leaq -0x2c0(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x18(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x1a0(%rbp), %rdx
callq 0xb4e60
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
callq 0xb5100
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x80(%rbp), %rdx
callq 0xb4ed0
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x200(%rbp), %rdx
callq 0xb4ed0
leaq -0x260(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x20(%rbp), %rdx
callq 0xb5090
leaq -0x2c0(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
addq $0xc0, %rdx
callq 0xb5090
leaq -0x260(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0xb4ed0
movq -0x8(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0xb4e60
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
movl $0x60, %edx
callq 0xa7480
addq $0x320, %rsp # imm = 0x320
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| line_add:
push rbp
mov rbp, rsp
sub rsp, 320h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rdi, [rbp+var_80]
mov rsi, [rbp+var_18]
add rsi, 0C0h
call sqr_fp2
lea rdi, [rbp+var_E0]
mov rsi, [rbp+var_20]
lea rdx, [rbp+var_80]
call mul_fp2
lea rdi, [rbp+var_140]
mov rsi, [rbp+var_20]
add rsi, 60h ; '`'
mov rdx, [rbp+var_18]
add rdx, 0C0h
call mul_fp2
lea rdi, [rbp+var_140]
lea rsi, [rbp+var_140]
lea rdx, [rbp+var_80]
call mul_fp2
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_E0]
mov rdx, [rbp+var_18]
call _sub_fp2
lea rdi, [rbp+var_200]
lea rsi, [rbp+var_1A0]
call sqr_fp2
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_200]
lea rdx, [rbp+var_200]
call add_fp2
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_260]
lea rdx, [rbp+var_260]
call add_fp2
lea rdi, [rbp+var_2C0]
lea rsi, [rbp+var_1A0]
lea rdx, [rbp+var_260]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, [rbp+var_140]
mov rdx, [rbp+var_18]
add rdx, 60h ; '`'
call _sub_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
call add_fp2
lea rdi, [rbp+var_320]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_260]
call mul_fp2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
call sqr_fp2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_2C0]
call _sub_fp2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_320]
call _sub_fp2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_320]
call _sub_fp2
lea rdi, [rbp+var_2C0]
lea rsi, [rbp+var_2C0]
mov rdx, [rbp+var_18]
add rdx, 60h ; '`'
call mul_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
lea rsi, [rbp+var_320]
mov rdx, [rbp+var_10]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
call mul_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
lea rdx, [rbp+var_2C0]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
lea rdx, [rbp+var_2C0]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_18]
add rsi, 0C0h
lea rdx, [rbp+var_1A0]
call add_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
call sqr_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
lea rdx, [rbp+var_80]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
lea rdx, [rbp+var_200]
call _sub_fp2
lea rdi, [rbp+var_260]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
mov rdx, [rbp+var_20]
call mul_fp2
lea rdi, [rbp+var_2C0]
mov rsi, [rbp+var_20]
add rsi, 60h ; '`'
mov rdx, [rbp+var_10]
add rdx, 0C0h
call mul_fp2
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_260]
lea rdx, [rbp+var_2C0]
call _sub_fp2
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_260]
lea rdx, [rbp+var_260]
call add_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
mov edx, 60h ; '`'
call vec_copy
add rsp, 320h
pop rbp
retn
| unsigned long long line_add(long long a1, long long a2, long long a3, long long a4)
{
_BYTE v5[96]; // [rsp+0h] [rbp-320h] BYREF
_BYTE v6[96]; // [rsp+60h] [rbp-2C0h] BYREF
_BYTE v7[96]; // [rsp+C0h] [rbp-260h] BYREF
_BYTE v8[96]; // [rsp+120h] [rbp-200h] BYREF
_BYTE v9[96]; // [rsp+180h] [rbp-1A0h] BYREF
_BYTE v10[96]; // [rsp+1E0h] [rbp-140h] BYREF
_BYTE v11[96]; // [rsp+240h] [rbp-E0h] BYREF
_BYTE v12[96]; // [rsp+2A0h] [rbp-80h] BYREF
long long v13; // [rsp+300h] [rbp-20h]
long long v14; // [rsp+308h] [rbp-18h]
long long v15; // [rsp+310h] [rbp-10h]
long long v16; // [rsp+318h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
sqr_fp2((long long)v12, a3 + 192);
mul_fp2((long long)v11, v13, (long long)v12);
mul_fp2((long long)v10, v13 + 96, v14 + 192);
mul_fp2((long long)v10, (long long)v10, (long long)v12);
sub_fp2((long long)v9, (long long)v11, v14);
sqr_fp2((long long)v8, (long long)v9);
add_fp2((long long)v7, (long long)v8, (long long)v8);
add_fp2((long long)v7, (long long)v7, (long long)v7);
mul_fp2((long long)v6, (long long)v9, (long long)v7);
sub_fp2(v16 + 96, (long long)v10, v14 + 96);
add_fp2(v16 + 96, v16 + 96, v16 + 96);
mul_fp2((long long)v5, v14, (long long)v7);
sqr_fp2(v15, v16 + 96);
sub_fp2(v15, v15, (long long)v6);
sub_fp2(v15, v15, (long long)v5);
sub_fp2(v15, v15, (long long)v5);
mul_fp2((long long)v6, (long long)v6, v14 + 96);
sub_fp2(v15 + 96, (long long)v5, v15);
mul_fp2(v15 + 96, v15 + 96, v16 + 96);
sub_fp2(v15 + 96, v15 + 96, (long long)v6);
sub_fp2(v15 + 96, v15 + 96, (long long)v6);
add_fp2(v15 + 192, v14 + 192, (long long)v9);
sqr_fp2(v15 + 192, v15 + 192);
sub_fp2(v15 + 192, v15 + 192, (long long)v12);
sub_fp2(v15 + 192, v15 + 192, (long long)v8);
mul_fp2((long long)v7, v16 + 96, v13);
mul_fp2((long long)v6, v13 + 96, v15 + 192);
sub_fp2((long long)v7, (long long)v7, (long long)v6);
add_fp2(v16, (long long)v7, (long long)v7);
return vec_copy(v16 + 192, v15 + 192, 0x60uLL);
}
| line_add:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x320
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RDI,[RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0xc0
CALL 0x001b5100
LEA RDI,[RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[RBP + -0x80]
CALL 0x001b5090
LEA RDI,[RBP + -0x140]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0xc0
CALL 0x001b5090
LEA RDI,[RBP + -0x140]
LEA RSI,[RBP + -0x140]
LEA RDX,[RBP + -0x80]
CALL 0x001b5090
LEA RDI,[RBP + -0x1a0]
LEA RSI,[RBP + -0xe0]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001b4ed0
LEA RDI,[RBP + -0x200]
LEA RSI,[RBP + -0x1a0]
CALL 0x001b5100
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x200]
LEA RDX,[RBP + -0x200]
CALL 0x001b4e60
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x260]
LEA RDX,[RBP + -0x260]
CALL 0x001b4e60
LEA RDI,[RBP + -0x2c0]
LEA RSI,[RBP + -0x1a0]
LEA RDX,[RBP + -0x260]
CALL 0x001b5090
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[RBP + -0x140]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x60
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
CALL 0x001b4e60
LEA RDI,[RBP + -0x320]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x260]
CALL 0x001b5090
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
CALL 0x001b5100
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x2c0]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x320]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x320]
CALL 0x001b4ed0
LEA RDI,[RBP + -0x2c0]
LEA RSI,[RBP + -0x2c0]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x60
CALL 0x001b5090
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
LEA RSI,[RBP + -0x320]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
CALL 0x001b5090
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
LEA RDX,[RBP + -0x2c0]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
LEA RDX,[RBP + -0x2c0]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0xc0
LEA RDX,[RBP + -0x1a0]
CALL 0x001b4e60
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
CALL 0x001b5100
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
LEA RDX,[RBP + -0x80]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
LEA RDX,[RBP + -0x200]
CALL 0x001b4ed0
LEA RDI,[RBP + -0x260]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001b5090
LEA RDI,[RBP + -0x2c0]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0xc0
CALL 0x001b5090
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x260]
LEA RDX,[RBP + -0x2c0]
CALL 0x001b4ed0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x260]
LEA RDX,[RBP + -0x260]
CALL 0x001b4e60
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
MOV EDX,0x60
CALL 0x001a7480
ADD RSP,0x320
POP RBP
RET
|
void line_add(long param_1,long param_2,long param_3,long param_4)
{
int1 local_328 [96];
int1 local_2c8 [96];
int1 local_268 [96];
int1 local_208 [96];
int1 local_1a8 [96];
int1 local_148 [96];
int1 local_e8 [96];
int1 local_88 [96];
long local_28;
long local_20;
long local_18;
long local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
sqr_fp2(local_88,param_3 + 0xc0);
mul_fp2(local_e8,local_28,local_88);
mul_fp2(local_148,local_28 + 0x60,local_20 + 0xc0);
mul_fp2(local_148,local_148,local_88);
sub_fp2(local_1a8,local_e8,local_20);
sqr_fp2(local_208,local_1a8);
add_fp2(local_268,local_208,local_208);
add_fp2(local_268,local_268,local_268);
mul_fp2(local_2c8,local_1a8,local_268);
sub_fp2(local_10 + 0x60,local_148,local_20 + 0x60);
add_fp2(local_10 + 0x60,local_10 + 0x60,local_10 + 0x60);
mul_fp2(local_328,local_20,local_268);
sqr_fp2(local_18,local_10 + 0x60);
sub_fp2(local_18,local_18,local_2c8);
sub_fp2(local_18,local_18,local_328);
sub_fp2(local_18,local_18,local_328);
mul_fp2(local_2c8,local_2c8,local_20 + 0x60);
sub_fp2(local_18 + 0x60,local_328,local_18);
mul_fp2(local_18 + 0x60,local_18 + 0x60,local_10 + 0x60);
sub_fp2(local_18 + 0x60,local_18 + 0x60,local_2c8);
sub_fp2(local_18 + 0x60,local_18 + 0x60,local_2c8);
add_fp2(local_18 + 0xc0,local_20 + 0xc0,local_1a8);
sqr_fp2(local_18 + 0xc0,local_18 + 0xc0);
sub_fp2(local_18 + 0xc0,local_18 + 0xc0,local_88);
sub_fp2(local_18 + 0xc0,local_18 + 0xc0,local_208);
mul_fp2(local_268,local_10 + 0x60,local_28);
mul_fp2(local_2c8,local_28 + 0x60,local_18 + 0xc0);
sub_fp2(local_268,local_268,local_2c8);
add_fp2(local_10,local_268,local_268);
vec_copy(local_10 + 0xc0,local_18 + 0xc0,0x60);
return;
}
|
|
624 | js_date_setYear | bluesky950520[P]quickjs/quickjs.c | static JSValue js_date_setYear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setYear(y)
double y;
JSValue args[1];
if (JS_ThisTimeValue(ctx, &y, this_val) || JS_ToFloat64(ctx, &y, argv[0]))
return JS_EXCEPTION;
y = +y;
if (isnan(y))
return JS_SetThisTimeValue(ctx, this_val, y);
if (isfinite(y)) {
y = trunc(y);
if (y >= 0 && y < 100)
y += 1900;
}
args[0] = js_float64(y);
return set_date_field(ctx, this_val, 1, args, 0x011);
} | O1 | c | js_date_setYear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x56a0c
movl $0x6, %r12d
testl %eax, %eax
jne 0x567be
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x27681
testl %eax, %eax
je 0x567d9
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
movq %r12, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x56876
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x5683d
callq 0xe140
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5683d
movsd 0x480c7(%rip), %xmm1 # 0x9e8f0
ucomisd %xmm0, %xmm1
jbe 0x5683d
addsd 0x480c1(%rip), %xmm0 # 0x9e8f8
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq $0x7, 0x8(%r8)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
movl $0x11, %r9d
callq 0x56621
movq %rdx, %r12
andq %rax, %r13
jmp 0x567c3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56f3c
jmp 0x5686b
| js_date_setYear:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_40]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
mov r12d, 6
test eax, eax
jnz short loc_567BE
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_567D9
loc_567BE:
xor eax, eax
xor r13d, r13d
loc_567C3:
mov eax, eax
or rax, r13
mov rdx, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_567D9:
mov r13, 0FFFFFFFF00000000h
movsd xmm0, [rsp+48h+var_40]
ucomisd xmm0, xmm0
jp loc_56876
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_5683D
call _trunc
movsd [rsp+48h+var_40], xmm0
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_5683D
movsd xmm1, cs:qword_9E8F0
ucomisd xmm1, xmm0
jbe short loc_5683D
addsd xmm0, cs:qword_9E8F8
movsd [rsp+48h+var_40], xmm0
loc_5683D:
mov rax, [rsp+48h+var_40]
lea r8, [rsp+48h+var_38]
mov [r8], rax
mov qword ptr [r8+8], 7
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov ecx, 1
mov r9d, 11h
call set_date_field
loc_5686B:
mov r12, rdx
and r13, rax
jmp loc_567C3
loc_56876:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
jmp short loc_5686B
| unsigned long long js_date_setYear(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rdx
long long v8; // rax
unsigned long long v9; // r13
double v11; // xmm0_8
double v12; // [rsp+8h] [rbp-40h] BYREF
double v13[7]; // [rsp+10h] [rbp-38h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, &v12, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, &v12, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v8) = 0;
v9 = 0LL;
}
else
{
v11 = v12;
if ( (*(_QWORD *)&v12 & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v11 = trunc(a1, &v12, v7);
v12 = v11;
if ( v11 >= 0.0 && v11 < 100.0 )
{
v11 = v11 + 1900.0;
v12 = v11;
}
}
v13[0] = v12;
*(_QWORD *)&v13[1] = 7LL;
v8 = set_date_field(a1, a2, a3, 1, (long long)v13, 0x11u, v11);
v9 = v8 & 0xFFFFFFFF00000000LL;
}
return v9 | (unsigned int)v8;
}
| js_date_setYear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x00156a0c
MOV R12D,0x6
TEST EAX,EAX
JNZ 0x001567be
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00127681
TEST EAX,EAX
JZ 0x001567d9
LAB_001567be:
XOR EAX,EAX
XOR R13D,R13D
LAB_001567c3:
MOV EAX,EAX
OR RAX,R13
MOV RDX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001567d9:
MOV R13,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x00156876
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x0015683d
CALL 0x0010e140
MOVSD qword ptr [RSP + 0x8],XMM0
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x0015683d
MOVSD XMM1,qword ptr [0x0019e8f0]
UCOMISD XMM1,XMM0
JBE 0x0015683d
ADDSD XMM0,qword ptr [0x0019e8f8]
MOVSD qword ptr [RSP + 0x8],XMM0
LAB_0015683d:
MOV RAX,qword ptr [RSP + 0x8]
LEA R8,[RSP + 0x10]
MOV qword ptr [R8],RAX
MOV qword ptr [R8 + 0x8],0x7
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
MOV ECX,0x1
MOV R9D,0x11
CALL 0x00156621
LAB_0015686b:
MOV R12,RDX
AND R13,RAX
JMP 0x001567c3
LAB_00156876:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00156f3c
JMP 0x0015686b
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setYear(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
double local_40;
double local_38 [2];
iVar1 = JS_ThisTimeValue(param_1,&local_40,param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64(param_1,&local_40,*param_5,param_5[1]);
if (iVar1 == 0) {
if (NAN(local_40)) {
auVar4 = JS_SetThisTimeValue(param_1,param_2,param_3);
}
else {
if ((ulong)ABS(local_40) < 0x7ff0000000000000) {
local_40 = trunc(local_40);
if ((0.0 <= local_40) && (local_40 < DAT_0019e8f0)) {
local_40 = local_40 + _DAT_0019e8f8;
}
}
local_38[0] = local_40;
local_38[1] = 3.45845952088873e-323;
auVar4 = set_date_field(param_1,param_2,param_3,1,local_38,0x11);
}
uVar2 = auVar4._0_8_ & 0xffffffff00000000;
goto LAB_001567c3;
}
}
auVar4 = ZEXT816(6) << 0x40;
uVar2 = 0;
LAB_001567c3:
auVar3._0_8_ = auVar4._0_8_ & 0xffffffff | uVar2;
auVar3._8_8_ = auVar4._8_8_;
return auVar3;
}
|
|
625 | js_date_setYear | bluesky950520[P]quickjs/quickjs.c | static JSValue js_date_setYear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setYear(y)
double y;
JSValue args[1];
if (JS_ThisTimeValue(ctx, &y, this_val) || JS_ToFloat64(ctx, &y, argv[0]))
return JS_EXCEPTION;
y = +y;
if (isnan(y))
return JS_SetThisTimeValue(ctx, this_val, y);
if (isfinite(y)) {
y = trunc(y);
if (y >= 0 && y < 100)
y += 1900;
}
args[0] = js_float64(y);
return set_date_field(ctx, this_val, 1, args, 0x011);
} | O2 | c | js_date_setYear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4a403
pushq $0x6
popq %r12
testl %eax, %eax
jne 0x4a1ee
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2127f
testl %eax, %eax
je 0x4a209
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
movq %r12, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4a28f
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x4a25d
callq 0xe150
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4a25d
movsd 0x3b5c9(%rip), %xmm1 # 0x85818
ucomisd %xmm0, %xmm1
jbe 0x4a25d
addsd 0x3b5c3(%rip), %xmm0 # 0x85820
leaq 0x10(%rsp), %r8
movsd %xmm0, (%r8)
movq $0x7, 0x8(%r8)
pushq $0x1
popq %rcx
pushq $0x11
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4a066
movq %rdx, %r12
andq %rax, %r13
jmp 0x4a1f3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4a767
jmp 0x4a284
| js_date_setYear:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_40]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
push 6
pop r12
test eax, eax
jnz short loc_4A1EE
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_4A209
loc_4A1EE:
xor eax, eax
xor r13d, r13d
loc_4A1F3:
mov eax, eax
or rax, r13
mov rdx, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4A209:
mov r13, 0FFFFFFFF00000000h
movsd xmm0, [rsp+48h+var_40]
ucomisd xmm0, xmm0
jp short loc_4A28F
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_4A25D
call _trunc
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_4A25D
movsd xmm1, cs:qword_85818
ucomisd xmm1, xmm0
jbe short loc_4A25D
addsd xmm0, cs:qword_85820
loc_4A25D:
lea r8, [rsp+48h+var_38]
movsd qword ptr [r8], xmm0
mov qword ptr [r8+8], 7
push 1
pop rcx
push 11h
pop r9
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call set_date_field
loc_4A284:
mov r12, rdx
and r13, rax
jmp loc_4A1F3
loc_4A28F:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
jmp short loc_4A284
| unsigned long long js_date_setYear(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rax
unsigned long long v8; // r13
double v10; // xmm0_8
double v11; // [rsp+8h] [rbp-40h] BYREF
double v12[7]; // [rsp+10h] [rbp-38h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, &v11, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, (long long)&v11, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v7) = 0;
v8 = 0LL;
}
else
{
v10 = v11;
if ( (*(_QWORD *)&v11 & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v10 = trunc(v11);
if ( v10 >= 0.0 && v10 < 100.0 )
v10 = v10 + 1900.0;
}
v12[0] = v10;
*(_QWORD *)&v12[1] = 7LL;
v7 = set_date_field(a1, a2, a3, 1, (long long)v12, 0x11u, v10);
v8 = v7 & 0xFFFFFFFF00000000LL;
}
return v8 | (unsigned int)v7;
}
| js_date_setYear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x0014a403
PUSH 0x6
POP R12
TEST EAX,EAX
JNZ 0x0014a1ee
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x0012127f
TEST EAX,EAX
JZ 0x0014a209
LAB_0014a1ee:
XOR EAX,EAX
XOR R13D,R13D
LAB_0014a1f3:
MOV EAX,EAX
OR RAX,R13
MOV RDX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014a209:
MOV R13,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x0014a28f
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x0014a25d
CALL 0x0010e150
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x0014a25d
MOVSD XMM1,qword ptr [0x00185818]
UCOMISD XMM1,XMM0
JBE 0x0014a25d
ADDSD XMM0,qword ptr [0x00185820]
LAB_0014a25d:
LEA R8,[RSP + 0x10]
MOVSD qword ptr [R8],XMM0
MOV qword ptr [R8 + 0x8],0x7
PUSH 0x1
POP RCX
PUSH 0x11
POP R9
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014a066
LAB_0014a284:
MOV R12,RDX
AND R13,RAX
JMP 0x0014a1f3
LAB_0014a28f:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014a767
JMP 0x0014a284
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setYear(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
double local_40;
double local_38 [2];
iVar1 = JS_ThisTimeValue(param_1,&local_40,param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64(param_1,&local_40,*param_5,param_5[1]);
if (iVar1 == 0) {
if (NAN(local_40)) {
auVar4 = JS_SetThisTimeValue(param_1,param_2,param_3);
}
else {
if ((ulong)ABS(local_40) < 0x7ff0000000000000) {
local_40 = trunc(local_40);
if ((0.0 <= local_40) && (local_40 < DAT_00185818)) {
local_40 = local_40 + _DAT_00185820;
}
}
local_38[1] = 3.45845952088873e-323;
local_38[0] = local_40;
auVar4 = set_date_field(param_1,param_2,param_3,1,local_38,0x11);
}
uVar2 = auVar4._0_8_ & 0xffffffff00000000;
goto LAB_0014a1f3;
}
}
auVar4 = ZEXT816(6) << 0x40;
uVar2 = 0;
LAB_0014a1f3:
auVar3._0_8_ = auVar4._0_8_ & 0xffffffff | uVar2;
auVar3._8_8_ = auVar4._8_8_;
return auVar3;
}
|
|
626 | create_storage_proof | corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_account.c | static ssz_builder_t create_storage_proof(proofer_ctx_t* ctx, const ssz_def_t* def, json_t storage_list) {
ssz_builder_t storage_proof = {.def = def};
bytes32_t tmp;
buffer_t tmp_buffer = stack_buffer(tmp);
int len = json_len(storage_list);
json_for_each_value(storage_list, entry) {
ssz_builder_t storage_builder = {.def = def->def.vector.type};
ssz_add_bytes(&storage_builder, "key", json_as_bytes(json_get(entry, "key"), &tmp_buffer));
add_dynamic_byte_list(json_get(entry, "proof"), &storage_builder, "proof");
ssz_add_dynamic_list_builders(&storage_proof, len, storage_builder);
}
return storage_proof;
} | O0 | c | create_storage_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp # imm = 0x150
movq %rdi, -0x108(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x100(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rdi)
movl $0x0, -0x48(%rbp)
leaq -0x30(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movl $0xffffffe0, -0x38(%rbp) # imm = 0xFFFFFFE0
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20790
movq %rax, %rcx
movq -0x100(%rbp), %rax
movl %ecx, -0x4c(%rbp)
leaq -0x68(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20290
xorl %eax, %eax
cmpl $-0x1, -0x58(%rbp)
movb %al, -0x111(%rbp)
je 0x77d4
cmpl $0x0, -0x58(%rbp)
setne %al
movb %al, -0x111(%rbp)
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0x77e3
jmp 0x797d
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0x68(%rbp), %rax
leaq 0x4b8d7(%rip), %rsi # 0x530ee
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0xc8(%rbp), %rax
leaq -0x48(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20a60
movl %eax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movl -0xb0(%rbp), %edx
movq -0xa8(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
leaq 0x4b868(%rip), %rsi # 0x530ee
callq 0x1e730
leaq -0xe0(%rbp), %rdi
leaq -0x68(%rbp), %rax
leaq 0x4cb9b(%rip), %rsi # 0x54438
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0xe0(%rbp), %rax
leaq -0xa0(%rbp), %rdi
leaq 0x4cb68(%rip), %rsi # 0x54438
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7570
movq -0x108(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x70(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x30(%rax)
movups -0xa0(%rbp), %xmm0
movups -0x90(%rbp), %xmm1
movups -0x80(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x1e930
leaq -0xf8(%rbp), %rdi
leaq -0x68(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl $0x2, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20290
movq -0xf8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x77b9
movq -0x110(%rbp), %rax
addq $0x150, %rsp # imm = 0x150
popq %rbp
retq
nopl (%rax)
| create_storage_proof:
push rbp
mov rbp, rsp
sub rsp, 150h
mov [rbp+var_108], rdi
mov rax, rdi
mov [rbp+var_110], rax
lea rax, [rbp+arg_0]
mov [rbp+var_100], rax
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov rdi, [rbp+var_108]
mov rax, [rbp+var_100]
mov rcx, [rbp+var_10]
mov [rdi], rcx
mov [rbp+var_48], 0
lea rcx, [rbp+var_30]
mov [rbp+var_40], rcx
mov [rbp+var_38], 0FFFFFFE0h
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_len
mov rcx, rax
mov rax, [rbp+var_100]
mov [rbp+var_4C], ecx
lea rdi, [rbp+var_68]
xor ecx, ecx
mov esi, ecx
xor edx, edx
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_next_value
loc_77B9:
xor eax, eax
cmp dword ptr [rbp+var_58], 0FFFFFFFFh
mov [rbp+var_111], al
jz short loc_77D4
cmp dword ptr [rbp+var_58], 0
setnz al
mov [rbp+var_111], al
loc_77D4:
mov al, [rbp+var_111]
test al, 1
jnz short loc_77E3
jmp loc_797D
loc_77E3:
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov qword ptr [rbp+var_A0], rax
lea rdi, [rbp+var_C8]
lea rax, [rbp+var_68]
lea rsi, aAggregatepubke+0Ch; "key"
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_get
lea rax, [rbp+var_C8]
lea rdi, [rbp+var_48]
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_as_bytes
mov [rbp+var_B0], eax
mov [rbp+var_A8], rdx
mov edx, [rbp+var_B0]
mov rcx, [rbp+var_A8]
lea rdi, [rbp+var_A0]
lea rsi, aAggregatepubke+0Ch; "key"
call ssz_add_bytes
lea rdi, [rbp+var_E0]
lea rax, [rbp+var_68]
lea rsi, aMerkleProof+7; "proof"
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_get
lea rax, [rbp+var_E0]
lea rdi, [rbp+var_A0]
lea rsi, aMerkleProof+7; "proof"
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call add_dynamic_byte_list
mov rdi, [rbp+var_108]
mov esi, [rbp+var_4C]
mov rcx, [rbp+var_70]
mov rax, rsp
mov [rax+30h], rcx
movups xmm0, [rbp+var_A0]
movups xmm1, [rbp+var_90]
movups xmm2, [rbp+var_80]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
call ssz_add_dynamic_list_builders
lea rdi, [rbp+var_F8]
lea rax, [rbp+var_68]
xor ecx, ecx
mov esi, ecx
mov edx, 2
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call json_next_value
mov rax, [rbp+var_F8]
mov [rbp+var_68], rax
mov rax, [rbp+var_F0]
mov [rbp+var_60], rax
mov rax, [rbp+var_E8]
mov [rbp+var_58], rax
jmp loc_77B9
loc_797D:
mov rax, [rbp+var_110]
add rsp, 150h
pop rbp
retn
| _QWORD * create_storage_proof(
_QWORD *a1,
long long a2,
long long a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9)
{
int v9; // edx
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // r8d
int v16; // r9d
int v17; // edx
int v18; // r8d
int v19; // r9d
long long v20; // rdx
int v21; // edx
int v22; // r8d
int v23; // r9d
int v24; // edx
int v25; // r8d
int v26; // r9d
int v27; // edx
int v28; // r8d
int v29; // r9d
int v30; // r8d
int v31; // r9d
bool v33; // [rsp+3Fh] [rbp-111h]
_QWORD v34[3]; // [rsp+58h] [rbp-F8h] BYREF
long long v35; // [rsp+70h] [rbp-E0h] BYREF
long long v36; // [rsp+78h] [rbp-D8h]
long long v37; // [rsp+80h] [rbp-D0h]
long long v38; // [rsp+88h] [rbp-C8h] BYREF
long long v39; // [rsp+90h] [rbp-C0h]
long long v40; // [rsp+98h] [rbp-B8h]
unsigned int v41; // [rsp+A0h] [rbp-B0h]
long long v42; // [rsp+A8h] [rbp-A8h]
_OWORD v43[3]; // [rsp+B0h] [rbp-A0h] BYREF
long long v44; // [rsp+E0h] [rbp-70h]
long long v45; // [rsp+E8h] [rbp-68h] BYREF
long long v46; // [rsp+F0h] [rbp-60h]
long long v47; // [rsp+F8h] [rbp-58h]
int v48; // [rsp+104h] [rbp-4Ch]
int v49; // [rsp+108h] [rbp-48h] BYREF
char *v50; // [rsp+110h] [rbp-40h]
int v51; // [rsp+118h] [rbp-38h]
char v52; // [rsp+120h] [rbp-30h] BYREF
long long v53; // [rsp+140h] [rbp-10h]
long long v54; // [rsp+148h] [rbp-8h]
v54 = a2;
v53 = a3;
memset(a1, 0LL, 56LL);
*a1 = v53;
v49 = 0;
v50 = &v52;
v51 = -32;
v48 = json_len((_DWORD)a1, 0, v9, a8, v10, v11, a7, a8, a9);
json_next_value((unsigned int)&v45, 0, 0, a8, v12, v13, a7, a8, a9);
while ( 1 )
{
v33 = 0;
if ( (_DWORD)v47 != -1 )
v33 = (_DWORD)v47 != 0;
if ( !v33 )
break;
memset(v43, 0LL, 56LL);
*(_QWORD *)&v43[0] = *(_QWORD *)(v53 + 16);
json_get((unsigned int)&v38, (unsigned int)"key", v14, v46, v15, v16, v45, v46, v47);
v41 = json_as_bytes((unsigned int)&v49, (unsigned int)"key", v17, v39, v18, v19, v38, v39, v40);
v42 = v20;
ssz_add_bytes(v43, "key", v41, v20);
json_get((unsigned int)&v35, (unsigned int)"proof", v21, v46, v22, v23, v45, v46, v47);
add_dynamic_byte_list((long long)v43, (long long)"proof", v24, v36, v25, v26, v35, v36, v37);
ssz_add_dynamic_list_builders((_DWORD)a1, v48, v27, v44, v28, v29, v43[0], v43[1], v43[2], v44);
json_next_value((unsigned int)v34, 0, 2, v46, v30, v31, v45, v46, v47);
v45 = v34[0];
v46 = v34[1];
v47 = v34[2];
}
return a1;
}
| create_storage_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x150
MOV qword ptr [RBP + -0x108],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x110],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x100],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV RDI,qword ptr [RBP + -0x108]
MOV RAX,qword ptr [RBP + -0x100]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RDI],RCX
MOV dword ptr [RBP + -0x48],0x0
LEA RCX,[RBP + -0x30]
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RBP + -0x38],0xffffffe0
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120790
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x100]
MOV dword ptr [RBP + -0x4c],ECX
LEA RDI,[RBP + -0x68]
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120290
LAB_001077b9:
XOR EAX,EAX
CMP dword ptr [RBP + -0x58],-0x1
MOV byte ptr [RBP + -0x111],AL
JZ 0x001077d4
CMP dword ptr [RBP + -0x58],0x0
SETNZ AL
MOV byte ptr [RBP + -0x111],AL
LAB_001077d4:
MOV AL,byte ptr [RBP + -0x111]
TEST AL,0x1
JNZ 0x001077e3
JMP 0x0010797d
LAB_001077e3:
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xa0],RAX
LEA RDI,[RBP + -0xc8]
LEA RAX,[RBP + -0x68]
LEA RSI,[0x1530ee]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0xc8]
LEA RDI,[RBP + -0x48]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120a60
MOV dword ptr [RBP + -0xb0],EAX
MOV qword ptr [RBP + -0xa8],RDX
MOV EDX,dword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0xa8]
LEA RDI,[RBP + -0xa0]
LEA RSI,[0x1530ee]
CALL 0x0011e730
LEA RDI,[RBP + -0xe0]
LEA RAX,[RBP + -0x68]
LEA RSI,[0x154438]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0xe0]
LEA RDI,[RBP + -0xa0]
LEA RSI,[0x154438]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00107570
MOV RDI,qword ptr [RBP + -0x108]
MOV ESI,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,RSP
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0xa0]
MOVUPS XMM1,xmmword ptr [RBP + -0x90]
MOVUPS XMM2,xmmword ptr [RBP + -0x80]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x0011e930
LEA RDI,[RBP + -0xf8]
LEA RAX,[RBP + -0x68]
XOR ECX,ECX
MOV ESI,ECX
MOV EDX,0x2
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120290
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0xf0]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0xe8]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001077b9
LAB_0010797d:
MOV RAX,qword ptr [RBP + -0x110]
ADD RSP,0x150
POP RBP
RET
|
long * create_storage_proof
(long *param_1,int8 param_2,long param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int8 extraout_RDX;
int8 uVar1;
int8 uVar2;
int8 uVar3;
int1 local_100 [16];
int8 local_f0;
int1 local_e8 [24];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int4 local_b8;
int8 local_b0;
int8 local_a8 [7];
int1 local_70 [16];
int8 local_60;
int4 local_54;
int4 local_50 [2];
int1 *local_48;
int4 local_40;
int1 local_38 [32];
long local_18;
int8 local_10;
local_18 = param_3;
local_10 = param_2;
memset(param_1,0,0x38);
*param_1 = local_18;
local_50[0] = 0;
local_48 = local_38;
local_40 = 0xffffffe0;
local_54 = json_len();
json_next_value(local_70,0,0);
while ((int)local_60 != -1 && (int)local_60 != 0) {
memset(local_a8,0,0x38);
local_a8[0] = *(int8 *)(local_18 + 0x10);
json_get(&local_d0,"key");
uVar1 = local_d0;
uVar2 = local_c8;
uVar3 = local_c0;
local_b8 = json_as_bytes(local_50);
local_b0 = extraout_RDX;
ssz_add_bytes(local_a8,"key",local_b8,extraout_RDX,param_5,param_6,uVar1,uVar2,uVar3);
json_get(local_e8,"proof");
add_dynamic_byte_list(local_a8,"proof");
ssz_add_dynamic_list_builders(param_1,local_54);
json_next_value(local_100,0,2);
local_60 = local_f0;
}
return param_1;
}
|
|
627 | google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::BuildExtensionRange(
const DescriptorProto::ExtensionRange& proto, const Descriptor* parent,
Descriptor::ExtensionRange* result, internal::FlatAllocator& alloc) {
result->start = proto.start();
result->end = proto.end();
if (result->start <= 0) {
message_hints_[parent].RequestHintOnFieldNumbers(
proto, DescriptorPool::ErrorCollector::NUMBER, result->start,
result->end);
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Extension numbers must be positive integers.");
}
// Checking of the upper bound of the extension range is deferred until after
// options interpreting. This allows messages with message_set_wire_format to
// have extensions beyond FieldDescriptor::kMaxNumber, since the extension
// numbers are actually used as int32s in the message_set_wire_format.
if (result->start >= result->end) {
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Extension range end number must be greater than start number.");
}
result->options_ = nullptr; // Set to default_instance later if necessary.
if (proto.has_options()) {
std::vector<int> options_path;
parent->GetLocationPath(&options_path);
options_path.push_back(DescriptorProto::kExtensionRangeFieldNumber);
// find index of this extension range in order to compute path
int index;
for (index = 0; parent->extension_ranges_ + index != result; index++) {
}
options_path.push_back(index);
options_path.push_back(DescriptorProto_ExtensionRange::kOptionsFieldNumber);
AllocateOptionsImpl(parent->full_name(), parent->full_name(),
proto.options(), result, options_path,
"google.protobuf.ExtensionRangeOptions", alloc);
}
} | O3 | cpp | google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
movl 0x20(%rsi), %eax
movl %eax, (%rcx)
movl 0x24(%rsi), %ecx
movl %ecx, 0x4(%r14)
testl %eax, %eax
jg 0x30c58
leaq 0x98(%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0x44592
movl (%r14), %ecx
movl 0x4(%r14), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
movl $0x1fffffff, %edi # imm = 0x1FFFFFFF
cmpl %edi, %edx
cmovgel %edi, %edx
testl %ecx, %ecx
cmovlel %esi, %ecx
cmpl %edi, %ecx
cmovgel %edi, %ecx
subl %ecx, %edx
testl %edx, %edx
cmovlel %esi, %edx
addl (%rax), %edx
testl %edx, %edx
cmovlel %esi, %edx
cmpl %edi, %edx
cmovgel %edi, %edx
movl %edx, (%rax)
cmpq $0x0, 0x8(%rax)
jne 0x30c2d
movq %r12, 0x8(%rax)
movl $0x1, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
addq $0x20, %rsi
leaq 0x86044(%rip), %r8 # 0xb6c85
movq %r15, %rdi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x27ade
movl (%r14), %eax
movl 0x4(%r14), %ecx
cmpl %ecx, %eax
jl 0x30c80
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
addq $0x20, %rsi
leaq 0x86042(%rip), %r8 # 0xb6cb2
movq %r15, %rdi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x27ade
movq $0x0, 0x8(%r14)
testb $0x1, 0x10(%r12)
je 0x30de2
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq 0x8(%rsp), %rdi
callq 0x260f8
movl $0x5, 0x38(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
cmpq %rax, %rsi
je 0x30cd9
movl $0x5, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x30cf2
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x434d2
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rdx
movq %r14, %rcx
subq 0x48(%rdx), %rcx
shrq $0x4, %rcx
movl %ecx, 0x34(%rsp)
cmpq %rax, %rsi
je 0x30d18
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x30d31
leaq 0x10(%rsp), %rdi
leaq 0x34(%rsp), %rdx
callq 0x44c5e
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
movl $0x3, 0x38(%rsp)
cmpq %rax, %rsi
je 0x30d4f
movl $0x3, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x30d5e
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x434d2
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r13
movq 0x18(%r12), %r12
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x85f74(%rip), %rsi # 0xb6cf0
leaq 0x85f92(%rip), %rdx # 0xb6d15
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
callq 0x137ec
testq %r12, %r12
jne 0x30d9c
leaq 0xd17c4(%rip), %r12 # 0x102560
addq $0x20, %r13
leaq 0x10(%rsp), %r9
movq %r15, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
pushq %rbx
pushq %rbp
callq 0x3eb7a
addq $0x10, %rsp
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x30dd3
callq 0xf330
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x30de2
callq 0xf330
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30e12
jmp 0x30e12
jmp 0x30e12
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x30e15
callq 0xf330
jmp 0x30e15
jmp 0x30e12
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x30e24
callq 0xf330
movq %r14, %rdi
callq 0xf570
| _ZN6google8protobuf17DescriptorBuilder19BuildExtensionRangeERKNS0_30DescriptorProto_ExtensionRangeEPKNS0_10DescriptorEPNS5_14ExtensionRangeERNS0_8internal13FlatAllocatorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r8
mov r14, rcx
mov r12, rsi
mov r15, rdi
mov [rsp+88h+var_80], rdx
mov eax, [rsi+20h]
mov [rcx], eax
mov ecx, [rsi+24h]
mov [r14+4], ecx
test eax, eax
jg loc_30C58
lea rdi, [r15+98h]
lea rsi, [rsp+88h+var_80]
call _ZNSt8__detail9_Map_baseIPKN6google8protobuf10DescriptorESt4pairIKS5_NS2_17DescriptorBuilder12MessageHintsEESaISA_ENS_10_Select1stESt8equal_toIS5_ESt4hashIS5_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS7_; std::__detail::_Map_base<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](google::protobuf::Descriptor const* const&)
mov ecx, [r14]
mov edx, [r14+4]
xor esi, esi
test edx, edx
cmovle edx, esi
mov edi, 1FFFFFFFh
cmp edx, edi
cmovge edx, edi
test ecx, ecx
cmovle ecx, esi
cmp ecx, edi
cmovge ecx, edi
sub edx, ecx
test edx, edx
cmovle edx, esi
add edx, [rax]
test edx, edx
cmovle edx, esi
cmp edx, edi
cmovge edx, edi
mov [rax], edx
cmp qword ptr [rax+8], 0
jnz short loc_30C2D
mov [rax+8], r12
mov dword ptr [rax+10h], 1
loc_30C2D:
mov rax, [rsp+88h+var_80]
mov rsi, [rax+8]
add rsi, 20h ; ' '
lea r8, aExtensionNumbe; "Extension numbers must be positive inte"...
mov rdi, r15
mov rdx, r12
mov ecx, 1
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
mov eax, [r14]
mov ecx, [r14+4]
loc_30C58:
cmp eax, ecx
jl short loc_30C80
mov rax, [rsp+88h+var_80]
mov rsi, [rax+8]
add rsi, 20h ; ' '
lea r8, aExtensionRange_2; "Extension range end number must be grea"...
mov rdi, r15
mov rdx, r12
mov ecx, 1
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_30C80:
mov qword ptr [r14+8], 0
test byte ptr [r12+10h], 1
jz loc_30DE2
xorps xmm0, xmm0
lea rsi, [rsp+88h+var_78]
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
mov rdi, [rsp+88h+var_80]
call _ZNK6google8protobuf10Descriptor15GetLocationPathEPSt6vectorIiSaIiEE; google::protobuf::Descriptor::GetLocationPath(std::vector<int> *)
mov dword ptr [rsp+88h+var_50], 5
mov rsi, [rsp+88h+var_70]
mov rax, [rsp+88h+var_68]
cmp rsi, rax
jz short loc_30CD9
mov dword ptr [rsi], 5
add rsi, 4
mov [rsp+88h+var_70], rsi
jmp short loc_30CF2
loc_30CD9:
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_50]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
mov rsi, [rsp+88h+var_70]
mov rax, [rsp+88h+var_68]
loc_30CF2:
mov rdx, [rsp+88h+var_80]
mov rcx, r14
sub rcx, [rdx+48h]
shr rcx, 4
mov [rsp+88h+var_54], ecx
cmp rsi, rax
jz short loc_30D18
mov [rsi], ecx
add rsi, 4
mov [rsp+88h+var_70], rsi
jmp short loc_30D31
loc_30D18:
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_54]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rsi, [rsp+88h+var_70]
mov rax, [rsp+88h+var_68]
loc_30D31:
mov dword ptr [rsp+88h+var_50], 3
cmp rsi, rax
jz short loc_30D4F
mov dword ptr [rsi], 3
add rsi, 4
mov [rsp+88h+var_70], rsi
jmp short loc_30D5E
loc_30D4F:
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_50]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_30D5E:
mov rax, [rsp+88h+var_80]
mov r13, [rax+8]
mov r12, [r12+18h]
lea rax, [rsp+88h+var_40]
mov [rax-10h], rax
lea rsi, aGoogleProtobuf_20; "google.protobuf.ExtensionRangeOptions"
lea rdx, aGoogleProtobuf_20+25h; ""
lea rbp, [rsp+88h+var_50]
mov rdi, rbp
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)
test r12, r12
jnz short loc_30D9C
lea r12, _ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E; google::protobuf::_ExtensionRangeOptions_default_instance_
loc_30D9C:
add r13, 20h ; ' '
lea r9, [rsp+88h+var_78]
mov rdi, r15
mov rsi, r13
mov rdx, r13
mov rcx, r12
mov r8, r14
push rbx
push rbp
call _ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_10Descriptor14ExtensionRangeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_RKNT_11OptionsTypeEPSD_RKSt6vectorIiSaIiEESC_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::string const&,std::string const&,google::protobuf::Descriptor::ExtensionRange::OptionsType const&,google::protobuf::Descriptor::ExtensionRange::OptionsType*,std::vector<int> const&,std::string const&,google::protobuf::internal::FlatAllocator &)
add rsp, 10h
mov rdi, [rsp+88h+var_50]; void *
lea rax, [rsp+88h+var_40]
cmp rdi, rax
jz short loc_30DD3
call __ZdlPv; operator delete(void *)
loc_30DD3:
mov rdi, [rsp+88h+var_78]; void *
test rdi, rdi
jz short loc_30DE2
call __ZdlPv; operator delete(void *)
loc_30DE2:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_30E12
jmp short loc_30E12
jmp short loc_30E12
mov r14, rax
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_30E15
call __ZdlPv; operator delete(void *)
jmp short loc_30E15
jmp short $+2
loc_30E12:
mov r14, rax
loc_30E15:
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_30E24
call __ZdlPv; operator delete(void *)
loc_30E24:
mov rdi, r14
call __Unwind_Resume
| void google::protobuf::DescriptorBuilder::BuildExtensionRange(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
int v8; // eax
int v9; // ecx
long long v10; // rax
int v11; // ecx
int v12; // edx
int v13; // edx
int v14; // edx
long long v15; // rsi
_DWORD *v16; // rax
_DWORD *v17; // rsi
unsigned long long v18; // rcx
_DWORD *v19; // rsi
long long v20; // r13
void ( ***v21)(google::protobuf::ExtensionRangeOptions *__hidden); // r12
long long v22; // [rsp+8h] [rbp-80h] BYREF
__int128 v23; // [rsp+10h] [rbp-78h] BYREF
_DWORD *v24; // [rsp+20h] [rbp-68h]
int v25; // [rsp+34h] [rbp-54h] BYREF
void *v26[2]; // [rsp+38h] [rbp-50h] BYREF
_BYTE v27[64]; // [rsp+48h] [rbp-40h] BYREF
v22 = a3;
v8 = *(_DWORD *)(a2 + 32);
*(_DWORD *)a4 = v8;
v9 = *(_DWORD *)(a2 + 36);
*(_DWORD *)(a4 + 4) = v9;
if ( v8 <= 0 )
{
v10 = std::__detail::_Map_base<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1 + 152,
&v22);
v11 = *(_DWORD *)a4;
v12 = *(_DWORD *)(a4 + 4);
if ( v12 <= 0 )
v12 = 0;
if ( v12 >= 0x1FFFFFFF )
v12 = 0x1FFFFFFF;
if ( v11 <= 0 )
v11 = 0;
if ( v11 >= 0x1FFFFFFF )
v11 = 0x1FFFFFFF;
v13 = v12 - v11;
if ( v13 <= 0 )
v13 = 0;
v14 = *(_DWORD *)v10 + v13;
if ( v14 <= 0 )
v14 = 0;
if ( v14 >= 0x1FFFFFFF )
v14 = 0x1FFFFFFF;
*(_DWORD *)v10 = v14;
if ( !*(_QWORD *)(v10 + 8) )
{
*(_QWORD *)(v10 + 8) = a2;
*(_DWORD *)(v10 + 16) = 1;
}
google::protobuf::DescriptorBuilder::AddError(
a1,
*(_QWORD *)(v22 + 8) + 32LL,
a2,
1u,
(long long)"Extension numbers must be positive integers.");
v8 = *(_DWORD *)a4;
v9 = *(_DWORD *)(a4 + 4);
}
if ( v8 >= v9 )
google::protobuf::DescriptorBuilder::AddError(
a1,
*(_QWORD *)(v22 + 8) + 32LL,
a2,
1u,
(long long)"Extension range end number must be greater than start number.");
*(_QWORD *)(a4 + 8) = 0LL;
if ( (*(_BYTE *)(a2 + 16) & 1) != 0 )
{
v23 = 0LL;
v24 = 0LL;
google::protobuf::Descriptor::GetLocationPath(v22, (long long)&v23);
LODWORD(v26[0]) = 5;
v15 = *((_QWORD *)&v23 + 1);
v16 = v24;
if ( *((_DWORD **)&v23 + 1) == v24 )
{
std::vector<int>::_M_realloc_insert<int>(&v23, *((_QWORD *)&v23 + 1), v26);
v17 = (_DWORD *)*((_QWORD *)&v23 + 1);
v16 = v24;
}
else
{
**((_DWORD **)&v23 + 1) = 5;
v17 = (_DWORD *)(v15 + 4);
*((_QWORD *)&v23 + 1) = v17;
}
v18 = (unsigned long long)(a4 - *(_QWORD *)(v22 + 72)) >> 4;
v25 = v18;
if ( v17 == v16 )
{
std::vector<int>::_M_realloc_insert<int const&>(&v23, v17, &v25);
v19 = (_DWORD *)*((_QWORD *)&v23 + 1);
v16 = v24;
}
else
{
*v17 = v18;
v19 = v17 + 1;
*((_QWORD *)&v23 + 1) = v19;
}
LODWORD(v26[0]) = 3;
if ( v19 == v16 )
{
std::vector<int>::_M_realloc_insert<int>(&v23, v19, v26);
}
else
{
*v19 = 3;
*((_QWORD *)&v23 + 1) = v19 + 1;
}
v20 = *(_QWORD *)(v22 + 8);
v21 = *(void ( ****)(google::protobuf::ExtensionRangeOptions *__hidden))(a2 + 24);
v26[0] = v27;
std::string::_M_construct<char const*>((long long)v26, "google.protobuf.ExtensionRangeOptions", (long long)"");
if ( !v21 )
v21 = &google::protobuf::_ExtensionRangeOptions_default_instance_;
google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(
a1,
v20 + 32,
v20 + 32,
v21,
a4,
&v23,
v26,
a5);
if ( v26[0] != v27 )
operator delete(v26[0]);
if ( (_QWORD)v23 )
operator delete((void *)v23);
}
}
| BuildExtensionRange:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R8
MOV R14,RCX
MOV R12,RSI
MOV R15,RDI
MOV qword ptr [RSP + 0x8],RDX
MOV EAX,dword ptr [RSI + 0x20]
MOV dword ptr [RCX],EAX
MOV ECX,dword ptr [RSI + 0x24]
MOV dword ptr [R14 + 0x4],ECX
TEST EAX,EAX
JG 0x00130c58
LEA RDI,[R15 + 0x98]
LEA RSI,[RSP + 0x8]
CALL 0x00144592
MOV ECX,dword ptr [R14]
MOV EDX,dword ptr [R14 + 0x4]
XOR ESI,ESI
TEST EDX,EDX
CMOVLE EDX,ESI
MOV EDI,0x1fffffff
CMP EDX,EDI
CMOVGE EDX,EDI
TEST ECX,ECX
CMOVLE ECX,ESI
CMP ECX,EDI
CMOVGE ECX,EDI
SUB EDX,ECX
TEST EDX,EDX
CMOVLE EDX,ESI
ADD EDX,dword ptr [RAX]
TEST EDX,EDX
CMOVLE EDX,ESI
CMP EDX,EDI
CMOVGE EDX,EDI
MOV dword ptr [RAX],EDX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00130c2d
MOV qword ptr [RAX + 0x8],R12
MOV dword ptr [RAX + 0x10],0x1
LAB_00130c2d:
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x20
LEA R8,[0x1b6c85]
MOV RDI,R15
MOV RDX,R12
MOV ECX,0x1
CALL 0x00127ade
MOV EAX,dword ptr [R14]
MOV ECX,dword ptr [R14 + 0x4]
LAB_00130c58:
CMP EAX,ECX
JL 0x00130c80
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x20
LEA R8,[0x1b6cb2]
MOV RDI,R15
MOV RDX,R12
MOV ECX,0x1
CALL 0x00127ade
LAB_00130c80:
MOV qword ptr [R14 + 0x8],0x0
TEST byte ptr [R12 + 0x10],0x1
JZ 0x00130de2
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
LAB_00130cac:
CALL 0x001260f8
MOV dword ptr [RSP + 0x38],0x5
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
CMP RSI,RAX
JZ 0x00130cd9
MOV dword ptr [RSI],0x5
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00130cf2
LAB_00130cd9:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x38]
CALL 0x001434d2
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
LAB_00130cf2:
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,R14
SUB RCX,qword ptr [RDX + 0x48]
SHR RCX,0x4
MOV dword ptr [RSP + 0x34],ECX
CMP RSI,RAX
JZ 0x00130d18
MOV dword ptr [RSI],ECX
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00130d31
LAB_00130d18:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x34]
CALL 0x00144c5e
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
LAB_00130d31:
MOV dword ptr [RSP + 0x38],0x3
CMP RSI,RAX
JZ 0x00130d4f
MOV dword ptr [RSI],0x3
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00130d5e
LAB_00130d4f:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x38]
CALL 0x001434d2
LAB_00130d5e:
MOV RAX,qword ptr [RSP + 0x8]
MOV R13,qword ptr [RAX + 0x8]
MOV R12,qword ptr [R12 + 0x18]
LEA RAX,[RSP + 0x48]
MOV qword ptr [RAX + -0x10],RAX
LAB_00130d75:
LEA RSI,[0x1b6cf0]
LEA RDX,[0x1b6d15]
LEA RBP,[RSP + 0x38]
MOV RDI,RBP
CALL 0x001137ec
TEST R12,R12
JNZ 0x00130d9c
LEA R12,[0x202560]
LAB_00130d9c:
ADD R13,0x20
LAB_00130da0:
LEA R9,[RSP + 0x10]
MOV RDI,R15
MOV RSI,R13
MOV RDX,R13
MOV RCX,R12
MOV R8,R14
PUSH RBX
PUSH RBP
CALL 0x0013eb7a
ADD RSP,0x10
LAB_00130dbf:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x00130dd3
CALL 0x0010f330
LAB_00130dd3:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00130de2
CALL 0x0010f330
LAB_00130de2:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange
const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*,
google::protobuf::internal::FlatAllocator&) */
void __thiscall
google::protobuf::DescriptorBuilder::BuildExtensionRange
(DescriptorBuilder *this,DescriptorProto_ExtensionRange *param_1,Descriptor *param_2,
ExtensionRange *param_3,FlatAllocator *param_4)
{
long lVar1;
int iVar2;
int *piVar3;
int iVar4;
int1 *puVar5;
Descriptor *local_80;
void *local_78;
int4 *puStack_70;
int4 *local_68;
int4 local_54;
int1 *local_50 [2];
int1 local_40 [16];
iVar2 = *(int *)(param_1 + 0x20);
*(int *)param_3 = iVar2;
iVar4 = *(int *)(param_1 + 0x24);
*(int *)(param_3 + 4) = iVar4;
local_80 = param_2;
if (iVar2 < 1) {
piVar3 = (int *)std::__detail::
_Map_base<google::protobuf::Descriptor_const*,std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<google::protobuf::Descriptor_const*,std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(this + 0x98),&local_80);
iVar2 = *(int *)param_3;
iVar4 = *(int *)(param_3 + 4);
if (*(int *)(param_3 + 4) < 1) {
iVar4 = 0;
}
if (0x1ffffffe < iVar4) {
iVar4 = 0x1fffffff;
}
if (iVar2 < 1) {
iVar2 = 0;
}
if (0x1ffffffe < iVar2) {
iVar2 = 0x1fffffff;
}
iVar4 = iVar4 - iVar2;
if (iVar4 < 1) {
iVar4 = 0;
}
iVar4 = iVar4 + *piVar3;
if (iVar4 < 1) {
iVar4 = 0;
}
if (0x1ffffffe < iVar4) {
iVar4 = 0x1fffffff;
}
*piVar3 = iVar4;
if (*(long *)(piVar3 + 2) == 0) {
*(DescriptorProto_ExtensionRange **)(piVar3 + 2) = param_1;
piVar3[4] = 1;
}
AddError(this,*(long *)(local_80 + 8) + 0x20,param_1,1,
"Extension numbers must be positive integers.");
iVar2 = *(int *)param_3;
iVar4 = *(int *)(param_3 + 4);
}
if (iVar4 <= iVar2) {
AddError(this,*(long *)(local_80 + 8) + 0x20,param_1,1,
"Extension range end number must be greater than start number.");
}
*(int8 *)(param_3 + 8) = 0;
if (((byte)param_1[0x10] & 1) != 0) {
local_78 = (void *)0x0;
puStack_70 = (int4 *)0x0;
local_68 = (int4 *)0x0;
/* try { // try from 00130cac to 00130cb0 has its CatchHandler @ 00130e12 */
Descriptor::GetLocationPath(local_80,(vector *)&local_78);
local_50[0] = (int1 *)CONCAT44(local_50[0]._4_4_,5);
if (puStack_70 == local_68) {
/* try { // try from 00130cd9 to 00130ce7 has its CatchHandler @ 00130df5 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)&local_78,puStack_70,local_50);
}
else {
*puStack_70 = 5;
puStack_70 = puStack_70 + 1;
}
local_54 = (int4)((ulong)((long)param_3 - *(long *)(local_80 + 0x48)) >> 4);
if (puStack_70 == local_68) {
/* try { // try from 00130d18 to 00130d26 has its CatchHandler @ 00130df3 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)&local_78,puStack_70,&local_54);
}
else {
*puStack_70 = local_54;
puStack_70 = puStack_70 + 1;
}
local_50[0] = (int1 *)CONCAT44(local_50[0]._4_4_,3);
if (puStack_70 == local_68) {
/* try { // try from 00130d4f to 00130d5d has its CatchHandler @ 00130df1 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)&local_78,puStack_70,local_50);
}
else {
*puStack_70 = 3;
puStack_70 = puStack_70 + 1;
}
lVar1 = *(long *)(local_80 + 8);
puVar5 = *(int1 **)(param_1 + 0x18);
local_50[0] = local_40;
/* try { // try from 00130d75 to 00130d8f has its CatchHandler @ 00130e10 */
std::__cxx11::string::_M_construct<char_const*>
((string *)local_50,"google.protobuf.ExtensionRangeOptions","");
if ((OptionsType *)puVar5 == (OptionsType *)0x0) {
puVar5 = _ExtensionRangeOptions_default_instance_;
}
/* try { // try from 00130da0 to 00130dbe has its CatchHandler @ 00130df7 */
AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>
(this,(string *)(lVar1 + 0x20),(string *)(lVar1 + 0x20),(OptionsType *)puVar5,param_3,
(vector *)&local_78,(string *)local_50,param_4);
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
if (local_78 != (void *)0x0) {
operator_delete(local_78);
}
}
return;
}
|
|
628 | decode_bytes | eloqsql/storage/maria/ma_packrec.c | static void decode_bytes(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
reg1 uint bits,low_byte;
reg3 uint16 *pos;
reg4 uint table_bits,table_and;
MARIA_DECODE_TREE *decode_tree;
decode_tree=rec->huff_tree;
bits=bit_buff->bits; /* Save in reg for quicker access */
table_bits=decode_tree->quick_table_bits;
table_and= (1 << table_bits)-1;
do
{
if (bits < table_bits)
{
if (bit_buff->pos > bit_buff->end+1)
{
bit_buff->error=1;
return; /* Can't be right */
}
#if BITS_SAVED == 32
bit_buff->current_byte= (bit_buff->current_byte << 24) |
(((uint) ((uchar) bit_buff->pos[2]))) |
(((uint) ((uchar) bit_buff->pos[1])) << 8) |
(((uint) ((uchar) bit_buff->pos[0])) << 16);
bit_buff->pos+=3;
bits+=24;
#else
if (bits) /* We must have at leasts 9 bits */
{
bit_buff->current_byte= (bit_buff->current_byte << 8) |
(uint) ((uchar) bit_buff->pos[0]);
bit_buff->pos++;
bits+=8;
}
else
{
bit_buff->current_byte= ((uint) ((uchar) bit_buff->pos[0]) << 8) |
((uint) ((uchar) bit_buff->pos[1]));
bit_buff->pos+=2;
bits+=16;
}
#endif
}
/* First use info in quick_table */
low_byte=(bit_buff->current_byte >> (bits - table_bits)) & table_and;
low_byte=decode_tree->table[low_byte];
if (low_byte & IS_CHAR)
{
*to++ = (low_byte & 255); /* Found char in quick table */
bits-= ((low_byte >> 8) & 31); /* Remove bits used */
}
else
{ /* Map through rest of decode-table */
pos=decode_tree->table+low_byte;
bits-=table_bits;
for (;;)
{
if (bits < 8)
{ /* We don't need to check end */
#if BITS_SAVED == 32
bit_buff->current_byte= (bit_buff->current_byte << 24) |
(((uint) ((uchar) bit_buff->pos[2]))) |
(((uint) ((uchar) bit_buff->pos[1])) << 8) |
(((uint) ((uchar) bit_buff->pos[0])) << 16);
bit_buff->pos+=3;
bits+=24;
#else
bit_buff->current_byte= (bit_buff->current_byte << 8) |
(uint) ((uchar) bit_buff->pos[0]);
bit_buff->pos+=1;
bits+=8;
#endif
}
low_byte=(uint) (bit_buff->current_byte >> (bits-8));
decode_bytes_test_bit(0);
decode_bytes_test_bit(1);
decode_bytes_test_bit(2);
decode_bytes_test_bit(3);
decode_bytes_test_bit(4);
decode_bytes_test_bit(5);
decode_bytes_test_bit(6);
decode_bytes_test_bit(7);
bits-=8;
}
*to++ = (char) *pos;
}
} while (to != end);
bit_buff->bits=bits;
return;
} | O3 | c | decode_bytes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rax
movq 0x30(%rdi), %r8
movl 0x4(%rsi), %ebx
movl 0x8(%r8), %edi
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
movl %edi, %ecx
shll %cl, %r9d
notl %r9d
cmpl %edi, %ebx
jae 0x3a9ba
movq 0x8(%rsi), %rcx
movq 0x10(%rsi), %r10
incq %r10
cmpq %r10, %rcx
ja 0x3ab59
movl (%rsi), %r10d
shll $0x18, %r10d
movzbl 0x2(%rcx), %r11d
orl %r10d, %r11d
movzbl 0x1(%rcx), %r14d
shll $0x8, %r14d
orl %r11d, %r14d
movzbl (%rcx), %r10d
shll $0x10, %r10d
orl %r14d, %r10d
movl %r10d, (%rsi)
addq $0x3, %rcx
movq %rcx, 0x8(%rsi)
addl $0x18, %ebx
jmp 0x3a9bd
movl (%rsi), %r10d
movl %ebx, %ecx
subl %edi, %ecx
movl %r10d, %r11d
shrl %cl, %r11d
andl %r9d, %r11d
movq (%r8), %r14
movzwl (%r14,%r11,2), %r11d
testw %r11w, %r11w
js 0x3ab10
cmpl $0x7, %ecx
ja 0x3aa16
shll $0x18, %r10d
movq 0x8(%rsi), %rbx
movzbl 0x2(%rbx), %r15d
orl %r10d, %r15d
movzbl 0x1(%rbx), %r12d
shll $0x8, %r12d
orl %r15d, %r12d
movzbl (%rbx), %r10d
shll $0x10, %r10d
orl %r12d, %r10d
movl %r10d, (%rsi)
addq $0x3, %rbx
movq %rbx, 0x8(%rsi)
orl $0x18, %ecx
movl %ecx, %ebx
movzwl %r11w, %ecx
leaq (%r14,%rcx,2), %r15
leal -0x8(%rbx), %ecx
movl %r10d, %r14d
shrl %cl, %r14d
movl %r14d, %r12d
shrl $0x6, %r12d
andl $0x2, %r12d
movswq (%r15,%r12), %r11
testq %r11, %r11
js 0x3ab21
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
shrl $0x5, %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab25
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
shrl $0x4, %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab2a
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
shrl $0x3, %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab2f
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
shrl $0x2, %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab34
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
shrl %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab39
addq %r12, %r15
leaq (%r15,%r11,2), %r15
movl %r14d, %r12d
andl $0x2, %r12d
movswq (%r12,%r15), %r11
testq %r11, %r11
js 0x3ab3e
addq %r12, %r15
leaq (%r15,%r11,2), %r11
andl $0x1, %r14d
leaq (%r11,%r14,2), %r14
movzwl (%r14), %r11d
testw %r11w, %r11w
jns 0x3a9dc
jmp 0x3ab43
movzwl %r11w, %ecx
movb %r11b, (%rdx)
shrl $0x8, %ecx
andl $0x1f, %ecx
subl %ecx, %ebx
jmp 0x3ab48
decl %ebx
jmp 0x3ab41
addl $-0x2, %ebx
jmp 0x3ab41
addl $-0x3, %ebx
jmp 0x3ab41
addl $-0x4, %ebx
jmp 0x3ab41
addl $-0x5, %ebx
jmp 0x3ab41
addl $-0x6, %ebx
jmp 0x3ab41
addl $-0x7, %ebx
movl %ebx, %ecx
movb %r11b, (%rdx)
movl %ecx, %ebx
incq %rdx
cmpq %rax, %rdx
jne 0x3a96c
movl %ebx, 0x4(%rsi)
jmp 0x3ab60
movl $0x1, 0x28(%rsi)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| decode_bytes:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rax, rcx
mov r8, [rdi+30h]
mov ebx, [rsi+4]
mov edi, [r8+8]
mov r9d, 0FFFFFFFFh
mov ecx, edi
shl r9d, cl
not r9d
loc_3A96C:
cmp ebx, edi
jnb short loc_3A9BA
mov rcx, [rsi+8]
mov r10, [rsi+10h]
inc r10
cmp rcx, r10
ja loc_3AB59
mov r10d, [rsi]
shl r10d, 18h
movzx r11d, byte ptr [rcx+2]
or r11d, r10d
movzx r14d, byte ptr [rcx+1]
shl r14d, 8
or r14d, r11d
movzx r10d, byte ptr [rcx]
shl r10d, 10h
or r10d, r14d
mov [rsi], r10d
add rcx, 3
mov [rsi+8], rcx
add ebx, 18h
jmp short loc_3A9BD
loc_3A9BA:
mov r10d, [rsi]
loc_3A9BD:
mov ecx, ebx
sub ecx, edi
mov r11d, r10d
shr r11d, cl
and r11d, r9d
mov r14, [r8]
movzx r11d, word ptr [r14+r11*2]
test r11w, r11w
js loc_3AB10
loc_3A9DC:
cmp ecx, 7
ja short loc_3AA16
shl r10d, 18h
mov rbx, [rsi+8]
movzx r15d, byte ptr [rbx+2]
or r15d, r10d
movzx r12d, byte ptr [rbx+1]
shl r12d, 8
or r12d, r15d
movzx r10d, byte ptr [rbx]
shl r10d, 10h
or r10d, r12d
mov [rsi], r10d
add rbx, 3
mov [rsi+8], rbx
or ecx, 18h
loc_3AA16:
mov ebx, ecx
movzx ecx, r11w
lea r15, [r14+rcx*2]
lea ecx, [rbx-8]
mov r14d, r10d
shr r14d, cl
mov r12d, r14d
shr r12d, 6
and r12d, 2
movsx r11, word ptr [r15+r12]
test r11, r11
js loc_3AB21
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
shr r12d, 5
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js loc_3AB25
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
shr r12d, 4
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js loc_3AB2A
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
shr r12d, 3
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js loc_3AB2F
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
shr r12d, 2
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js short loc_3AB34
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
shr r12d, 1
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js short loc_3AB39
add r15, r12
lea r15, [r15+r11*2]
mov r12d, r14d
and r12d, 2
movsx r11, word ptr [r12+r15]
test r11, r11
js short loc_3AB3E
add r15, r12
lea r11, [r15+r11*2]
and r14d, 1
lea r14, [r11+r14*2]
movzx r11d, word ptr [r14]
test r11w, r11w
jns loc_3A9DC
jmp short loc_3AB43
loc_3AB10:
movzx ecx, r11w
mov [rdx], r11b
shr ecx, 8
and ecx, 1Fh
sub ebx, ecx
jmp short loc_3AB48
loc_3AB21:
dec ebx
jmp short loc_3AB41
loc_3AB25:
add ebx, 0FFFFFFFEh
jmp short loc_3AB41
loc_3AB2A:
add ebx, 0FFFFFFFDh
jmp short loc_3AB41
loc_3AB2F:
add ebx, 0FFFFFFFCh
jmp short loc_3AB41
loc_3AB34:
add ebx, 0FFFFFFFBh
jmp short loc_3AB41
loc_3AB39:
add ebx, 0FFFFFFFAh
jmp short loc_3AB41
loc_3AB3E:
add ebx, 0FFFFFFF9h
loc_3AB41:
mov ecx, ebx
loc_3AB43:
mov [rdx], r11b
mov ebx, ecx
loc_3AB48:
inc rdx
cmp rdx, rax
jnz loc_3A96C
mov [rsi+4], ebx
jmp short loc_3AB60
loc_3AB59:
mov dword ptr [rsi+28h], 1
loc_3AB60:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| _BYTE * decode_bytes(long long a1, long long a2, _BYTE *a3, _BYTE *a4)
{
_BYTE *result; // rax
long long v5; // r8
unsigned int v6; // ebx
unsigned int v7; // edi
unsigned __int8 *v8; // rcx
unsigned int v9; // r10d
unsigned int v10; // ecx
_WORD *v11; // r14
long long v12; // r11
unsigned __int8 *v13; // rbx
unsigned int v14; // ebx
_WORD *v15; // r15
unsigned int v16; // r14d
long long v17; // r12
long long v18; // r15
long long v19; // r12
long long v20; // r15
long long v21; // r12
long long v22; // r15
long long v23; // r12
long long v24; // r15
long long v25; // r12
long long v26; // r15
long long v27; // r12
long long v28; // r15
long long v29; // r12
unsigned int v30; // ebx
result = a4;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a2 + 4);
v7 = *(_DWORD *)(v5 + 8);
while ( 1 )
{
if ( v6 >= v7 )
{
v9 = *(_DWORD *)a2;
goto LABEL_6;
}
v8 = *(unsigned __int8 **)(a2 + 8);
if ( (unsigned long long)v8 > *(_QWORD *)(a2 + 16) + 1LL )
break;
v9 = (*(_DWORD *)a2 << 24) | v8[2] | (v8[1] << 8) | (*v8 << 16);
*(_DWORD *)a2 = v9;
*(_QWORD *)(a2 + 8) = v8 + 3;
v6 += 24;
LABEL_6:
v10 = v6 - v7;
v11 = *(_WORD **)v5;
LOWORD(v12) = *(_WORD *)(*(_QWORD *)v5 + 2LL * (~(-1 << v7) & (v9 >> (v6 - v7))));
if ( (v12 & 0x8000u) != 0LL )
{
*a3 = v12;
v6 -= BYTE1(v12) & 0x1F;
}
else
{
while ( 1 )
{
if ( v10 <= 7 )
{
v13 = *(unsigned __int8 **)(a2 + 8);
v9 = (v9 << 24) | v13[2] | (v13[1] << 8) | (*v13 << 16);
*(_DWORD *)a2 = v9;
*(_QWORD *)(a2 + 8) = v13 + 3;
v10 |= 0x18u;
}
v14 = v10;
v15 = &v11[(unsigned __int16)v12];
v10 -= 8;
v16 = v9 >> v10;
v17 = (v9 >> v10 >> 6) & 2;
v12 = *(__int16 *)((char *)v15 + v17);
if ( v12 < 0 )
{
v30 = v14 - 1;
goto LABEL_26;
}
v18 = (long long)&v15[v12] + v17;
v19 = (v16 >> 5) & 2;
v12 = *(__int16 *)(v19 + v18);
if ( v12 < 0 )
{
v30 = v14 - 2;
goto LABEL_26;
}
v20 = v19 + v18 + 2 * v12;
v21 = (v16 >> 4) & 2;
v12 = *(__int16 *)(v21 + v20);
if ( v12 < 0 )
{
v30 = v14 - 3;
goto LABEL_26;
}
v22 = v21 + v20 + 2 * v12;
v23 = (v16 >> 3) & 2;
v12 = *(__int16 *)(v23 + v22);
if ( v12 < 0 )
{
v30 = v14 - 4;
goto LABEL_26;
}
v24 = v23 + v22 + 2 * v12;
v25 = (v16 >> 2) & 2;
v12 = *(__int16 *)(v25 + v24);
if ( v12 < 0 )
{
v30 = v14 - 5;
goto LABEL_26;
}
v26 = v25 + v24 + 2 * v12;
v27 = (v16 >> 1) & 2;
v12 = *(__int16 *)(v27 + v26);
if ( v12 < 0 )
{
v30 = v14 - 6;
goto LABEL_26;
}
v28 = v27 + v26 + 2 * v12;
v29 = v16 & 2;
v12 = *(__int16 *)(v29 + v28);
if ( v12 < 0 )
break;
v11 = (_WORD *)(v29 + v28 + 2 * v12 + 2LL * (v16 & 1));
LOWORD(v12) = *v11;
if ( (__int16)*v11 < 0 )
goto LABEL_27;
}
v30 = v14 - 7;
LABEL_26:
v10 = v30;
LABEL_27:
*a3 = v12;
v6 = v10;
}
if ( ++a3 == result )
{
*(_DWORD *)(a2 + 4) = v6;
return result;
}
}
*(_DWORD *)(a2 + 40) = 1;
return result;
}
| decode_bytes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,RCX
MOV R8,qword ptr [RDI + 0x30]
MOV EBX,dword ptr [RSI + 0x4]
MOV EDI,dword ptr [R8 + 0x8]
MOV R9D,0xffffffff
MOV ECX,EDI
SHL R9D,CL
NOT R9D
LAB_0013a96c:
CMP EBX,EDI
JNC 0x0013a9ba
MOV RCX,qword ptr [RSI + 0x8]
MOV R10,qword ptr [RSI + 0x10]
INC R10
CMP RCX,R10
JA 0x0013ab59
MOV R10D,dword ptr [RSI]
SHL R10D,0x18
MOVZX R11D,byte ptr [RCX + 0x2]
OR R11D,R10D
MOVZX R14D,byte ptr [RCX + 0x1]
SHL R14D,0x8
OR R14D,R11D
MOVZX R10D,byte ptr [RCX]
SHL R10D,0x10
OR R10D,R14D
MOV dword ptr [RSI],R10D
ADD RCX,0x3
MOV qword ptr [RSI + 0x8],RCX
ADD EBX,0x18
JMP 0x0013a9bd
LAB_0013a9ba:
MOV R10D,dword ptr [RSI]
LAB_0013a9bd:
MOV ECX,EBX
SUB ECX,EDI
MOV R11D,R10D
SHR R11D,CL
AND R11D,R9D
MOV R14,qword ptr [R8]
MOVZX R11D,word ptr [R14 + R11*0x2]
TEST R11W,R11W
JS 0x0013ab10
LAB_0013a9dc:
CMP ECX,0x7
JA 0x0013aa16
SHL R10D,0x18
MOV RBX,qword ptr [RSI + 0x8]
MOVZX R15D,byte ptr [RBX + 0x2]
OR R15D,R10D
MOVZX R12D,byte ptr [RBX + 0x1]
SHL R12D,0x8
OR R12D,R15D
MOVZX R10D,byte ptr [RBX]
SHL R10D,0x10
OR R10D,R12D
MOV dword ptr [RSI],R10D
ADD RBX,0x3
MOV qword ptr [RSI + 0x8],RBX
OR ECX,0x18
LAB_0013aa16:
MOV EBX,ECX
MOVZX ECX,R11W
LEA R15,[R14 + RCX*0x2]
LEA ECX,[RBX + -0x8]
MOV R14D,R10D
SHR R14D,CL
MOV R12D,R14D
SHR R12D,0x6
AND R12D,0x2
MOVSX R11,word ptr [R15 + R12*0x1]
TEST R11,R11
JS 0x0013ab21
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
SHR R12D,0x5
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab25
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
SHR R12D,0x4
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab2a
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
SHR R12D,0x3
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab2f
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
SHR R12D,0x2
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab34
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
SHR R12D,0x1
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab39
ADD R15,R12
LEA R15,[R15 + R11*0x2]
MOV R12D,R14D
AND R12D,0x2
MOVSX R11,word ptr [R12 + R15*0x1]
TEST R11,R11
JS 0x0013ab3e
ADD R15,R12
LEA R11,[R15 + R11*0x2]
AND R14D,0x1
LEA R14,[R11 + R14*0x2]
MOVZX R11D,word ptr [R14]
TEST R11W,R11W
JNS 0x0013a9dc
JMP 0x0013ab43
LAB_0013ab10:
MOVZX ECX,R11W
MOV byte ptr [RDX],R11B
SHR ECX,0x8
AND ECX,0x1f
SUB EBX,ECX
JMP 0x0013ab48
LAB_0013ab21:
DEC EBX
JMP 0x0013ab41
LAB_0013ab25:
ADD EBX,-0x2
JMP 0x0013ab41
LAB_0013ab2a:
ADD EBX,-0x3
JMP 0x0013ab41
LAB_0013ab2f:
ADD EBX,-0x4
JMP 0x0013ab41
LAB_0013ab34:
ADD EBX,-0x5
JMP 0x0013ab41
LAB_0013ab39:
ADD EBX,-0x6
JMP 0x0013ab41
LAB_0013ab3e:
ADD EBX,-0x7
LAB_0013ab41:
MOV ECX,EBX
LAB_0013ab43:
MOV byte ptr [RDX],R11B
MOV EBX,ECX
LAB_0013ab48:
INC RDX
CMP RDX,RAX
JNZ 0x0013a96c
MOV dword ptr [RSI + 0x4],EBX
JMP 0x0013ab60
LAB_0013ab59:
MOV dword ptr [RSI + 0x28],0x1
LAB_0013ab60:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void decode_bytes(long param_1,uint *param_2,int1 *param_3,int1 *param_4)
{
ushort uVar1;
uint uVar2;
int8 *puVar3;
byte *pbVar4;
long lVar5;
uint uVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
puVar3 = *(int8 **)(param_1 + 0x30);
uVar7 = param_2[1];
uVar2 = *(uint *)(puVar3 + 1);
do {
if (uVar7 < uVar2) {
pbVar4 = *(byte **)(param_2 + 2);
if ((byte *)(*(long *)(param_2 + 4) + 1) < pbVar4) {
param_2[10] = 1;
return;
}
uVar8 = (uint)*pbVar4 << 0x10 | (uint)pbVar4[1] << 8 | (uint)pbVar4[2] | *param_2 << 0x18;
*param_2 = uVar8;
*(byte **)(param_2 + 2) = pbVar4 + 3;
uVar7 = uVar7 + 0x18;
}
else {
uVar8 = *param_2;
}
uVar6 = uVar7 - uVar2;
puVar13 = (ushort *)*puVar3;
uVar1 = puVar13[uVar8 >> ((byte)uVar6 & 0x1f) & ~(-1 << ((byte)uVar2 & 0x1f))];
uVar10 = (ulong)uVar1;
if ((short)uVar1 < 0) {
*param_3 = (char)uVar1;
uVar7 = uVar7 - (uVar1 >> 8 & 0x1f);
}
else {
do {
uVar7 = uVar6;
if (uVar6 < 8) {
pbVar4 = *(byte **)(param_2 + 2);
uVar8 = (uint)*pbVar4 << 0x10 | (uint)pbVar4[1] << 8 | (uint)pbVar4[2] | uVar8 << 0x18;
*param_2 = uVar8;
*(byte **)(param_2 + 2) = pbVar4 + 3;
uVar7 = uVar6 | 0x18;
}
uVar6 = uVar7 - 8;
uVar12 = uVar8 >> ((byte)uVar6 & 0x1f);
uVar11 = (ulong)(uVar12 >> 6 & 2);
uVar9 = (ulong)*(short *)((long)puVar13 + uVar11 + uVar10 * 2);
if ((long)uVar9 < 0) {
uVar10 = uVar9;
uVar7 = uVar7 - 1;
break;
}
lVar5 = uVar9 * 2 + uVar11 + uVar10 * 2;
uVar9 = (ulong)(uVar12 >> 5 & 2);
uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 2;
break;
}
lVar5 = uVar10 * 2 + uVar9 + lVar5;
uVar9 = (ulong)(uVar12 >> 4 & 2);
uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 3;
break;
}
lVar5 = uVar10 * 2 + uVar9 + lVar5;
uVar9 = (ulong)(uVar12 >> 3 & 2);
uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 4;
break;
}
lVar5 = uVar10 * 2 + uVar9 + lVar5;
uVar9 = (ulong)(uVar12 >> 2 & 2);
uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 5;
break;
}
lVar5 = uVar10 * 2 + uVar9 + lVar5;
uVar9 = (ulong)(uVar12 >> 1 & 2);
uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 6;
break;
}
lVar5 = uVar10 * 2 + uVar9 + lVar5;
uVar10 = (ulong)*(short *)((long)puVar13 + (ulong)(uVar12 & 2) + lVar5);
if ((long)uVar10 < 0) {
uVar7 = uVar7 - 7;
break;
}
puVar13 = (ushort *)
((long)puVar13 +
(ulong)(uVar12 & 1) * 2 + uVar10 * 2 + (ulong)(uVar12 & 2) + lVar5);
uVar10 = (ulong)*puVar13;
uVar7 = uVar6;
} while (-1 < (short)*puVar13);
*param_3 = (char)uVar10;
}
param_3 = param_3 + 1;
if (param_3 == param_4) {
param_2[1] = uVar7;
return;
}
} while( true );
}
|
|
629 | mi_pack_key | eloqsql/storage/myisam/mi_key.c | uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
key_part_map keypart_map, HA_KEYSEG **last_used_keyseg)
{
uchar *start_key=key;
HA_KEYSEG *keyseg;
my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT;
DBUG_ENTER("_mi_pack_key");
/* "one part" rtree key is 2*SPDIMS part key in MyISAM */
if (info->s->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE)
keypart_map= (((key_part_map)1) << (2*SPDIMS)) - 1;
/* only key prefixes are supported */
DBUG_ASSERT(((keypart_map+1) & keypart_map) == 0);
for (keyseg= info->s->keyinfo[keynr].seg ; keyseg->type && keypart_map;
old+= keyseg->length, keyseg++)
{
enum ha_base_keytype type= (enum ha_base_keytype) keyseg->type;
size_t length= keyseg->length;
size_t char_length;
uchar *pos;
CHARSET_INFO *cs=keyseg->charset;
keypart_map>>= 1;
if (keyseg->null_bit)
{
if (!(*key++= (char) 1-*old++)) /* Copy null marker */
{
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
old+= 2;
continue; /* Found NULL */
}
}
char_length= (!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length;
pos=old;
if (keyseg->flag & HA_SPACE_PACK)
{
if (type == HA_KEYTYPE_NUM)
{
uchar *end= pos + length;
while (pos < end && pos[0] == ' ')
pos++;
length= (size_t)(end - pos);
}
else if (type != HA_KEYTYPE_BINARY)
{
length= my_ci_lengthsp(cs, (char*) pos, length);
}
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
memcpy(key,pos,char_length);
key+= char_length;
continue;
}
else if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
{
/* Length of key-part used with mi_rkey() always 2 */
uint tmp_length=uint2korr(pos);
pos+=2;
set_if_smaller(length,tmp_length); /* Safety */
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
old+=2; /* Skip length */
memcpy(key, pos, char_length);
key+= char_length;
continue;
}
else if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
pos+=length;
while (length--)
*key++ = *--pos;
continue;
}
FIX_LENGTH(cs, pos, length, char_length);
memcpy((uchar*) key, pos, char_length);
if (length > char_length)
my_ci_fill(cs, (char*) key+char_length, length-char_length, ' ');
key+= length;
}
if (last_used_keyseg)
*last_used_keyseg= keyseg;
DBUG_RETURN((uint) (key-start_key));
} | O3 | c | mi_pack_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x50(%rbp)
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %esi
imulq $0x70, %rsi, %rsi
cmpb $0x2, 0xc(%rax,%rsi)
movq %rcx, %r12
movl $0xf, %r15d
cmovneq %r8, %r15
movq %rdx, -0x40(%rbp)
movq 0x28(%rax,%rsi), %r14
movb 0x18(%r14), %cl
testb %cl, %cl
je 0x7b4c8
testq %r15, %r15
je 0x7b4c8
addq %rsi, %rax
movzwl 0xa(%rax), %eax
movw %ax, -0x32(%rbp)
movq -0x40(%rbp), %rdi
movzwl 0x14(%r14), %ebx
movq (%r14), %r13
cmpb $0x0, 0x19(%r14)
je 0x7b285
leaq 0x1(%r12), %rdx
movb (%r12), %sil
leaq 0x1(%rdi), %rax
movq %rdi, %r8
leal -0x1(%rsi), %edi
negb %dil
movb %dil, (%r8)
decb %sil
jne 0x7b27f
addq $0x3, %r12
testb $0x28, 0x12(%r14)
cmoveq %rdx, %r12
movq %rax, %rdi
jmp 0x7b486
movq %rdx, %r12
movq %rax, %rdi
movq %rbx, %rdx
cmpb $0x0, -0x32(%rbp)
js 0x7b2ad
movq %rbx, %rdx
testq %r13, %r13
je 0x7b2ad
movl 0x9c(%r13), %esi
movq %rbx, %rdx
cmpl $0x2, %esi
jb 0x7b2ad
movl %ebx, %eax
xorl %edx, %edx
divl %esi
movl %eax, %edx
movzwl 0x12(%r14), %eax
testb $0x1, %al
jne 0x7b315
testb $0x28, %al
je 0x7b357
movzwl (%r12), %eax
addq $0x2, %r12
cmpw %ax, %bx
cmovbl %ebx, %eax
movzwl %ax, %ebx
cmpl %ebx, %edx
jae 0x7b2f6
movq %rdx, %rcx
leaq (%r12,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %rdi, -0x30(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq *0x10(%rax)
movq -0x30(%rbp), %rdi
movq %rax, %rdx
cmpq %rbx, %rdx
cmovaeq %rbx, %rdx
cmpq $0xff, %rdx
jae 0x7b464
leaq 0x1(%rdi), %rbx
movl %edx, %eax
jmp 0x7b470
cmpb $0x2, %cl
movq %r15, -0x48(%rbp)
je 0x7b3fa
movzbl %cl, %eax
cmpl $0x7, %eax
jne 0x7b3d6
movq %rbx, %rax
addq %r12, %rax
movq %r12, %r15
testl %ebx, %ebx
je 0x7b34c
movq %r12, %r15
cmpb $0x20, (%r15)
jne 0x7b34c
incq %r15
cmpq %rax, %r15
jb 0x7b33e
subq %r15, %rax
movq %rax, %rbx
jmp 0x7b3fd
testb $0x40, %al
jne 0x7b4b2
cmpl %ebx, %edx
movq %r15, -0x48(%rbp)
jae 0x7b387
movq %rdx, %rcx
leaq (%r12,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %rdi, %r15
movq %r13, %rdi
movq %r12, %rsi
callq *0x10(%rax)
movq %r15, %rdi
movq %rax, %rdx
movq %rdx, -0x58(%rbp)
cmpq %rbx, %rdx
movq %rbx, %r15
cmovbq %rdx, %r15
movq %rdi, -0x30(%rbp)
movq %r12, %rsi
movq %r15, %rdx
callq 0x29080
cmpq %rbx, -0x58(%rbp)
jae 0x7b3ca
movq -0x30(%rbp), %rax
leaq (%rax,%r15), %rsi
movq %rbx, %rdx
subq %r15, %rdx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movl $0x20, %ecx
callq *0x78(%rax)
movq -0x30(%rbp), %rdi
addq %rbx, %rdi
jmp 0x7b45e
movq 0xb8(%r13), %rax
movq %rdi, -0x30(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movq %rdx, %r15
movq %rbx, %rdx
callq *0x18(%rax)
movq %r15, %rdx
movq -0x30(%rbp), %rdi
movq %rax, %rbx
movq %r12, %r15
cmpq %rdx, %rbx
jbe 0x7b424
movq %rdx, %rcx
leaq (%r15,%rbx), %rdx
movq 0xb8(%r13), %rax
movq %rdi, -0x30(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq *0x10(%rax)
movq -0x30(%rbp), %rdi
movq %rax, %rdx
cmpq %rbx, %rdx
cmovbq %rdx, %rbx
cmpq $0xff, %rbx
jae 0x7b43c
leaq 0x1(%rdi), %r13
movl %ebx, %eax
jmp 0x7b448
movb %bl, 0x2(%rdi)
movb %bh, 0x1(%rdi)
leaq 0x3(%rdi), %r13
movb $-0x1, %al
movb %al, (%rdi)
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r13
movq %r13, %rdi
movq -0x48(%rbp), %r15
jmp 0x7b486
movb %dl, 0x2(%rdi)
movb %dh, 0x1(%rdi)
leaq 0x3(%rdi), %rbx
movb $-0x1, %al
movb %al, (%rdi)
movq %rbx, %rdi
movq %r12, %rsi
movq %rdx, %r13
callq 0x29080
addq %r13, %rbx
movq %rbx, %rdi
leaq 0x20(%r14), %rax
movb 0x38(%r14), %cl
testb %cl, %cl
je 0x7b4cf
movq %r15, %rdx
shrq %rdx
movzwl 0x14(%r14), %esi
addq %rsi, %r12
movq %rax, %r14
cmpq $0x1, %r15
movq %rdx, %r15
ja 0x7b23d
jmp 0x7b4cf
testq %rbx, %rbx
je 0x7b486
movb -0x1(%r12,%rbx), %cl
movb %cl, (%rdi)
incq %rdi
decq %rbx
jne 0x7b4b7
jmp 0x7b486
movq %r14, %rax
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rcx
testq %rcx, %rcx
je 0x7b4db
movq %rax, (%rcx)
subl -0x40(%rbp), %edi
movl %edi, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_pack_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_50], r9
mov rax, [rdi]
mov rax, [rax+218h]
mov esi, esi
imul rsi, 70h ; 'p'
cmp byte ptr [rax+rsi+0Ch], 2
mov r12, rcx
mov r15d, 0Fh
cmovnz r15, r8
mov [rbp+var_40], rdx
mov r14, [rax+rsi+28h]
mov cl, [r14+18h]
test cl, cl
jz loc_7B4C8
test r15, r15
jz loc_7B4C8
add rax, rsi
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_32], ax
mov rdi, [rbp+var_40]
loc_7B23D:
movzx ebx, word ptr [r14+14h]
mov r13, [r14]
cmp byte ptr [r14+19h], 0
jz short loc_7B285
lea rdx, [r12+1]
mov sil, [r12]
lea rax, [rdi+1]
mov r8, rdi
lea edi, [rsi-1]
neg dil
mov [r8], dil
dec sil
jnz short loc_7B27F
add r12, 3
test byte ptr [r14+12h], 28h
cmovz r12, rdx
mov rdi, rax
jmp loc_7B486
loc_7B27F:
mov r12, rdx
mov rdi, rax
loc_7B285:
mov rdx, rbx
cmp byte ptr [rbp+var_32], 0
js short loc_7B2AD
mov rdx, rbx
test r13, r13
jz short loc_7B2AD
mov esi, [r13+9Ch]
mov rdx, rbx
cmp esi, 2
jb short loc_7B2AD
mov eax, ebx
xor edx, edx
div esi
mov edx, eax
loc_7B2AD:
movzx eax, word ptr [r14+12h]
test al, 1
jnz short loc_7B315
test al, 28h
jz loc_7B357
movzx eax, word ptr [r12]
add r12, 2
cmp bx, ax
cmovb eax, ebx
movzx ebx, ax
cmp edx, ebx
jnb short loc_7B2F6
mov rcx, rdx
lea rdx, [r12+rbx]
mov rax, [r13+0B8h]
mov [rbp+var_30], rdi
mov rdi, r13
mov rsi, r12
call qword ptr [rax+10h]
mov rdi, [rbp+var_30]
mov rdx, rax
loc_7B2F6:
cmp rdx, rbx
cmovnb rdx, rbx
cmp rdx, 0FFh
jnb loc_7B464
lea rbx, [rdi+1]
mov eax, edx
jmp loc_7B470
loc_7B315:
cmp cl, 2
mov [rbp+var_48], r15
jz loc_7B3FA
movzx eax, cl
cmp eax, 7
jnz loc_7B3D6
mov rax, rbx
add rax, r12
mov r15, r12
test ebx, ebx
jz short loc_7B34C
mov r15, r12
loc_7B33E:
cmp byte ptr [r15], 20h ; ' '
jnz short loc_7B34C
inc r15
cmp r15, rax
jb short loc_7B33E
loc_7B34C:
sub rax, r15
mov rbx, rax
jmp loc_7B3FD
loc_7B357:
test al, 40h
jnz loc_7B4B2
cmp edx, ebx
mov [rbp+var_48], r15
jnb short loc_7B387
mov rcx, rdx
lea rdx, [r12+rbx]
mov rax, [r13+0B8h]
mov r15, rdi
mov rdi, r13
mov rsi, r12
call qword ptr [rax+10h]
mov rdi, r15
mov rdx, rax
loc_7B387:
mov [rbp+var_58], rdx
cmp rdx, rbx
mov r15, rbx
cmovb r15, rdx
mov [rbp+var_30], rdi
mov rsi, r12
mov rdx, r15
call _memcpy
cmp [rbp+var_58], rbx
jnb short loc_7B3CA
mov rax, [rbp+var_30]
lea rsi, [rax+r15]
mov rdx, rbx
sub rdx, r15
mov rax, [r13+0B8h]
mov rdi, r13
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_7B3CA:
mov rdi, [rbp+var_30]
add rdi, rbx
jmp loc_7B45E
loc_7B3D6:
mov rax, [r13+0B8h]
mov [rbp+var_30], rdi
mov rdi, r13
mov rsi, r12
mov r15, rdx
mov rdx, rbx
call qword ptr [rax+18h]
mov rdx, r15
mov rdi, [rbp+var_30]
mov rbx, rax
loc_7B3FA:
mov r15, r12
loc_7B3FD:
cmp rbx, rdx
jbe short loc_7B424
mov rcx, rdx
lea rdx, [r15+rbx]
mov rax, [r13+0B8h]
mov [rbp+var_30], rdi
mov rdi, r13
mov rsi, r15
call qword ptr [rax+10h]
mov rdi, [rbp+var_30]
mov rdx, rax
loc_7B424:
cmp rdx, rbx
cmovb rbx, rdx
cmp rbx, 0FFh
jnb short loc_7B43C
lea r13, [rdi+1]
mov eax, ebx
jmp short loc_7B448
loc_7B43C:
mov [rdi+2], bl
mov [rdi+1], bh
lea r13, [rdi+3]
mov al, 0FFh
loc_7B448:
mov [rdi], al
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memcpy
add r13, rbx
mov rdi, r13
loc_7B45E:
mov r15, [rbp+var_48]
jmp short loc_7B486
loc_7B464:
mov [rdi+2], dl
mov [rdi+1], dh
lea rbx, [rdi+3]
mov al, 0FFh
loc_7B470:
mov [rdi], al
mov rdi, rbx
mov rsi, r12
mov r13, rdx
call _memcpy
add rbx, r13
mov rdi, rbx
loc_7B486:
lea rax, [r14+20h]
mov cl, [r14+38h]
test cl, cl
jz short loc_7B4CF
mov rdx, r15
shr rdx, 1
movzx esi, word ptr [r14+14h]
add r12, rsi
mov r14, rax
cmp r15, 1
mov r15, rdx
ja loc_7B23D
jmp short loc_7B4CF
loc_7B4B2:
test rbx, rbx
jz short loc_7B486
loc_7B4B7:
mov cl, [r12+rbx-1]
mov [rdi], cl
inc rdi
dec rbx
jnz short loc_7B4B7
jmp short loc_7B486
loc_7B4C8:
mov rax, r14
mov rdi, [rbp+var_40]
loc_7B4CF:
mov rcx, [rbp+var_50]
test rcx, rcx
jz short loc_7B4DB
mov [rcx], rax
loc_7B4DB:
sub edi, dword ptr [rbp+var_40]
mov eax, edi
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_pack_key(long long a1, unsigned int a2, char *a3, _BYTE *a4, unsigned long long a5, long long **a6)
{
long long v6; // rax
long long v7; // rsi
unsigned long long v9; // r15
long long *v10; // r14
char v11; // cl
char *v12; // rdi
unsigned long long v13; // rbx
long long v14; // r13
_BYTE *v15; // rdx
char v16; // si
unsigned long long v17; // rdx
unsigned int v18; // esi
__int16 v19; // ax
unsigned __int16 v20; // ax
unsigned long long v21; // rbx
_BYTE *v22; // rbx
char v23; // al
_BYTE *v24; // rax
_BYTE *v25; // r15
unsigned long long v26; // r15
unsigned long long v27; // r15
long long v28; // rax
_BYTE *v29; // r13
char v30; // al
unsigned long long v31; // r13
long long *v32; // rax
bool v33; // cc
unsigned long long v35; // [rsp+8h] [rbp-58h]
unsigned long long v37; // [rsp+18h] [rbp-48h]
int v38; // [rsp+20h] [rbp-40h]
__int16 v39; // [rsp+2Eh] [rbp-32h]
v6 = *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v7 = 112LL * a2;
v9 = 15LL;
if ( *(_BYTE *)(v6 + v7 + 12) != 2 )
v9 = a5;
v38 = (int)a3;
v10 = *(long long **)(v6 + v7 + 40);
v11 = *((_BYTE *)v10 + 24);
if ( v11 && v9 )
{
v39 = *(_WORD *)(v7 + v6 + 10);
v12 = a3;
while ( 1 )
{
v13 = *((unsigned __int16 *)v10 + 10);
v14 = *v10;
if ( *((_BYTE *)v10 + 25) )
{
v15 = a4 + 1;
v16 = *a4;
*v12 = 1 - *a4;
if ( v16 == 1 )
{
a4 += 3;
if ( (*((_BYTE *)v10 + 18) & 0x28) == 0 )
a4 = v15;
++v12;
goto LABEL_54;
}
++a4;
++v12;
}
v17 = v13;
if ( (v39 & 0x80u) == 0 )
{
v17 = v13;
if ( v14 )
{
v18 = *(_DWORD *)(v14 + 156);
v17 = v13;
if ( v18 >= 2 )
v17 = (unsigned int)v13 / v18;
}
}
v19 = *((_WORD *)v10 + 9);
if ( (v19 & 1) == 0 )
{
if ( (v19 & 0x28) != 0 )
{
v20 = *(_WORD *)a4;
a4 += 2;
if ( (unsigned __int16)v13 < v20 )
v20 = v13;
v21 = v20;
if ( (unsigned int)v17 < v20 )
v17 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v14 + 184) + 16LL))(
v14,
a4,
&a4[v20],
v17);
if ( v17 >= v21 )
v17 = v21;
if ( v17 >= 0xFF )
{
v12[2] = v17;
v12[1] = BYTE1(v17);
v22 = v12 + 3;
v23 = -1;
}
else
{
v22 = v12 + 1;
v23 = v17;
}
*v12 = v23;
v31 = v17;
memcpy(v22, a4, v17);
v12 = &v22[v31];
goto LABEL_54;
}
if ( (v19 & 0x40) != 0 )
{
for ( ; v13; --v13 )
*v12++ = a4[v13 - 1];
goto LABEL_54;
}
v37 = v9;
if ( (unsigned int)v17 < (unsigned int)v13 )
v17 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v14 + 184) + 16LL))(
v14,
a4,
&a4[v13],
v17);
v35 = v17;
v26 = v13;
if ( v17 < v13 )
v26 = v17;
memcpy(v12, a4, v26);
if ( v35 < v13 )
(*(void ( **)(long long, char *, unsigned long long, long long))(*(_QWORD *)(v14 + 184) + 120LL))(
v14,
&v12[v26],
v13 - v26,
32LL);
v12 += v13;
goto LABEL_51;
}
v37 = v9;
if ( v11 != 2 )
{
if ( v11 == 7 )
{
v24 = &a4[v13];
v25 = a4;
if ( (_DWORD)v13 )
{
v25 = a4;
do
{
if ( *v25 != 32 )
break;
++v25;
}
while ( v25 < v24 );
}
v13 = v24 - v25;
goto LABEL_43;
}
v27 = v17;
v28 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(v14 + 184) + 24LL))(
v14,
a4,
v13);
v17 = v27;
v13 = v28;
}
v25 = a4;
LABEL_43:
if ( v13 > v17 )
v17 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v14 + 184) + 16LL))(
v14,
v25,
&v25[v13],
v17);
if ( v17 < v13 )
v13 = v17;
if ( v13 >= 0xFF )
{
v12[2] = v13;
v12[1] = BYTE1(v13);
v29 = v12 + 3;
v30 = -1;
}
else
{
v29 = v12 + 1;
v30 = v13;
}
*v12 = v30;
memcpy(v29, v25, v13);
v12 = &v29[v13];
LABEL_51:
v9 = v37;
LABEL_54:
v32 = v10 + 4;
v11 = *((_BYTE *)v10 + 56);
if ( v11 )
{
a4 += *((unsigned __int16 *)v10 + 10);
v10 += 4;
v33 = v9 <= 1;
v9 >>= 1;
if ( !v33 )
continue;
}
goto LABEL_61;
}
}
v32 = *(long long **)(v6 + v7 + 40);
LODWORD(v12) = (_DWORD)a3;
LABEL_61:
if ( a6 )
*a6 = v32;
return (unsigned int)((_DWORD)v12 - v38);
}
| _mi_pack_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x50],R9
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ESI,ESI
IMUL RSI,RSI,0x70
CMP byte ptr [RAX + RSI*0x1 + 0xc],0x2
MOV R12,RCX
MOV R15D,0xf
CMOVNZ R15,R8
MOV qword ptr [RBP + -0x40],RDX
MOV R14,qword ptr [RAX + RSI*0x1 + 0x28]
MOV CL,byte ptr [R14 + 0x18]
TEST CL,CL
JZ 0x0017b4c8
TEST R15,R15
JZ 0x0017b4c8
ADD RAX,RSI
MOVZX EAX,word ptr [RAX + 0xa]
MOV word ptr [RBP + -0x32],AX
MOV RDI,qword ptr [RBP + -0x40]
LAB_0017b23d:
MOVZX EBX,word ptr [R14 + 0x14]
MOV R13,qword ptr [R14]
CMP byte ptr [R14 + 0x19],0x0
JZ 0x0017b285
LEA RDX,[R12 + 0x1]
MOV SIL,byte ptr [R12]
LEA RAX,[RDI + 0x1]
MOV R8,RDI
LEA EDI,[RSI + -0x1]
NEG DIL
MOV byte ptr [R8],DIL
DEC SIL
JNZ 0x0017b27f
ADD R12,0x3
TEST byte ptr [R14 + 0x12],0x28
CMOVZ R12,RDX
MOV RDI,RAX
JMP 0x0017b486
LAB_0017b27f:
MOV R12,RDX
MOV RDI,RAX
LAB_0017b285:
MOV RDX,RBX
CMP byte ptr [RBP + -0x32],0x0
JS 0x0017b2ad
MOV RDX,RBX
TEST R13,R13
JZ 0x0017b2ad
MOV ESI,dword ptr [R13 + 0x9c]
MOV RDX,RBX
CMP ESI,0x2
JC 0x0017b2ad
MOV EAX,EBX
XOR EDX,EDX
DIV ESI
MOV EDX,EAX
LAB_0017b2ad:
MOVZX EAX,word ptr [R14 + 0x12]
TEST AL,0x1
JNZ 0x0017b315
TEST AL,0x28
JZ 0x0017b357
MOVZX EAX,word ptr [R12]
ADD R12,0x2
CMP BX,AX
CMOVC EAX,EBX
MOVZX EBX,AX
CMP EDX,EBX
JNC 0x0017b2f6
MOV RCX,RDX
LEA RDX,[R12 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV qword ptr [RBP + -0x30],RDI
MOV RDI,R13
MOV RSI,R12
CALL qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,RAX
LAB_0017b2f6:
CMP RDX,RBX
CMOVNC RDX,RBX
CMP RDX,0xff
JNC 0x0017b464
LEA RBX,[RDI + 0x1]
MOV EAX,EDX
JMP 0x0017b470
LAB_0017b315:
CMP CL,0x2
MOV qword ptr [RBP + -0x48],R15
JZ 0x0017b3fa
MOVZX EAX,CL
CMP EAX,0x7
JNZ 0x0017b3d6
MOV RAX,RBX
ADD RAX,R12
MOV R15,R12
TEST EBX,EBX
JZ 0x0017b34c
MOV R15,R12
LAB_0017b33e:
CMP byte ptr [R15],0x20
JNZ 0x0017b34c
INC R15
CMP R15,RAX
JC 0x0017b33e
LAB_0017b34c:
SUB RAX,R15
MOV RBX,RAX
JMP 0x0017b3fd
LAB_0017b357:
TEST AL,0x40
JNZ 0x0017b4b2
CMP EDX,EBX
MOV qword ptr [RBP + -0x48],R15
JNC 0x0017b387
MOV RCX,RDX
LEA RDX,[R12 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV R15,RDI
MOV RDI,R13
MOV RSI,R12
CALL qword ptr [RAX + 0x10]
MOV RDI,R15
MOV RDX,RAX
LAB_0017b387:
MOV qword ptr [RBP + -0x58],RDX
CMP RDX,RBX
MOV R15,RBX
CMOVC R15,RDX
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,R12
MOV RDX,R15
CALL 0x00129080
CMP qword ptr [RBP + -0x58],RBX
JNC 0x0017b3ca
MOV RAX,qword ptr [RBP + -0x30]
LEA RSI,[RAX + R15*0x1]
MOV RDX,RBX
SUB RDX,R15
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_0017b3ca:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,RBX
JMP 0x0017b45e
LAB_0017b3d6:
MOV RAX,qword ptr [R13 + 0xb8]
MOV qword ptr [RBP + -0x30],RDI
MOV RDI,R13
MOV RSI,R12
MOV R15,RDX
MOV RDX,RBX
CALL qword ptr [RAX + 0x18]
MOV RDX,R15
MOV RDI,qword ptr [RBP + -0x30]
MOV RBX,RAX
LAB_0017b3fa:
MOV R15,R12
LAB_0017b3fd:
CMP RBX,RDX
JBE 0x0017b424
MOV RCX,RDX
LEA RDX,[R15 + RBX*0x1]
MOV RAX,qword ptr [R13 + 0xb8]
MOV qword ptr [RBP + -0x30],RDI
MOV RDI,R13
MOV RSI,R15
CALL qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,RAX
LAB_0017b424:
CMP RDX,RBX
CMOVC RBX,RDX
CMP RBX,0xff
JNC 0x0017b43c
LEA R13,[RDI + 0x1]
MOV EAX,EBX
JMP 0x0017b448
LAB_0017b43c:
MOV byte ptr [RDI + 0x2],BL
MOV byte ptr [RDI + 0x1],BH
LEA R13,[RDI + 0x3]
MOV AL,0xff
LAB_0017b448:
MOV byte ptr [RDI],AL
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00129080
ADD R13,RBX
MOV RDI,R13
LAB_0017b45e:
MOV R15,qword ptr [RBP + -0x48]
JMP 0x0017b486
LAB_0017b464:
MOV byte ptr [RDI + 0x2],DL
MOV byte ptr [RDI + 0x1],DH
LEA RBX,[RDI + 0x3]
MOV AL,0xff
LAB_0017b470:
MOV byte ptr [RDI],AL
MOV RDI,RBX
MOV RSI,R12
MOV R13,RDX
CALL 0x00129080
ADD RBX,R13
MOV RDI,RBX
LAB_0017b486:
LEA RAX,[R14 + 0x20]
MOV CL,byte ptr [R14 + 0x38]
TEST CL,CL
JZ 0x0017b4cf
MOV RDX,R15
SHR RDX,0x1
MOVZX ESI,word ptr [R14 + 0x14]
ADD R12,RSI
MOV R14,RAX
CMP R15,0x1
MOV R15,RDX
JA 0x0017b23d
JMP 0x0017b4cf
LAB_0017b4b2:
TEST RBX,RBX
JZ 0x0017b486
LAB_0017b4b7:
MOV CL,byte ptr [R12 + RBX*0x1 + -0x1]
MOV byte ptr [RDI],CL
INC RDI
DEC RBX
JNZ 0x0017b4b7
JMP 0x0017b486
LAB_0017b4c8:
MOV RAX,R14
MOV RDI,qword ptr [RBP + -0x40]
LAB_0017b4cf:
MOV RCX,qword ptr [RBP + -0x50]
TEST RCX,RCX
JZ 0x0017b4db
MOV qword ptr [RCX],RAX
LAB_0017b4db:
SUB EDI,dword ptr [RBP + -0x40]
MOV EAX,EDI
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _mi_pack_key(long *param_1,uint param_2,char *param_3,ushort *param_4,ulong param_5,
long *param_6)
{
int2 uVar1;
ushort uVar2;
long lVar3;
bool bVar4;
char cVar5;
ushort uVar6;
ulong __n;
long *plVar7;
char *pcVar8;
char *__dest;
ulong uVar9;
long lVar10;
ushort *__src;
long *plVar11;
ulong uVar12;
ushort *puVar13;
ulong __n_00;
int local_48;
char local_3a;
lVar3 = *(long *)(*param_1 + 0x218);
lVar10 = (ulong)param_2 * 0x70;
uVar12 = 0xf;
if (*(char *)(lVar3 + 0xc + lVar10) != '\x02') {
uVar12 = param_5;
}
plVar7 = *(long **)(lVar3 + 0x28 + lVar10);
cVar5 = (char)plVar7[3];
__dest = param_3;
if ((cVar5 != '\0') && (uVar12 != 0)) {
uVar1 = *(int2 *)(lVar3 + lVar10 + 10);
pcVar8 = param_3;
plVar11 = plVar7;
do {
uVar2 = *(ushort *)((long)plVar11 + 0x14);
uVar9 = (ulong)uVar2;
lVar3 = *plVar11;
__dest = pcVar8;
__src = param_4;
if (*(char *)((long)plVar11 + 0x19) == '\0') {
LAB_0017b285:
local_3a = (char)uVar1;
__n = uVar9;
if (((-1 < local_3a) && (lVar3 != 0)) && (1 < *(uint *)(lVar3 + 0x9c))) {
__n = uVar9 / *(uint *)(lVar3 + 0x9c);
}
uVar6 = *(ushort *)((long)plVar11 + 0x12);
if ((uVar6 & 1) == 0) {
if ((uVar6 & 0x28) == 0) {
if ((uVar6 & 0x40) == 0) {
if ((uint)__n < (uint)uVar2) {
__n = (**(code **)(*(long *)(lVar3 + 0xb8) + 0x10))
(lVar3,__src,(char *)((long)__src + uVar9),__n);
}
__n_00 = uVar9;
if (__n < uVar9) {
__n_00 = __n;
}
memcpy(__dest,__src,__n_00);
if (__n < uVar9) {
(**(code **)(*(long *)(lVar3 + 0xb8) + 0x78))
(lVar3,__dest + __n_00,uVar9 - __n_00,0x20);
}
__dest = __dest + uVar9;
}
else {
for (; uVar9 != 0; uVar9 = uVar9 - 1) {
*__dest = *(char *)((long)__src + (uVar9 - 1));
__dest = __dest + 1;
}
}
}
else {
puVar13 = __src + 1;
uVar6 = *__src;
if (uVar2 < *__src) {
uVar6 = uVar2;
}
uVar9 = (ulong)uVar6;
if ((uint)__n < (uint)uVar6) {
__n = (**(code **)(*(long *)(lVar3 + 0xb8) + 0x10))
(lVar3,puVar13,(char *)((long)puVar13 + uVar9),__n);
}
if (uVar9 <= __n) {
__n = uVar9;
}
cVar5 = (char)__n;
if (__n < 0xff) {
pcVar8 = __dest + 1;
}
else {
__dest[2] = cVar5;
__dest[1] = (char)(__n >> 8);
pcVar8 = __dest + 3;
cVar5 = -1;
}
*__dest = cVar5;
memcpy(pcVar8,puVar13,__n);
__dest = pcVar8 + __n;
__src = puVar13;
}
}
else {
puVar13 = __src;
if (cVar5 != '\x02') {
if (cVar5 == '\a') {
if (uVar2 != 0) {
do {
if ((char)*puVar13 != ' ') break;
puVar13 = (ushort *)((long)puVar13 + 1);
} while (puVar13 < (ushort *)(uVar9 + (long)__src));
}
uVar9 = (long)(uVar9 + (long)__src) - (long)puVar13;
}
else {
uVar9 = (**(code **)(*(long *)(lVar3 + 0xb8) + 0x18))(lVar3,__src,uVar9);
}
}
if (__n < uVar9) {
__n = (**(code **)(*(long *)(lVar3 + 0xb8) + 0x10))
(lVar3,puVar13,(char *)((long)puVar13 + uVar9),__n);
}
if (__n < uVar9) {
uVar9 = __n;
}
cVar5 = (char)uVar9;
if (uVar9 < 0xff) {
pcVar8 = __dest + 1;
}
else {
__dest[2] = cVar5;
__dest[1] = (char)(uVar9 >> 8);
pcVar8 = __dest + 3;
cVar5 = -1;
}
*__dest = cVar5;
memcpy(pcVar8,puVar13,uVar9);
__dest = pcVar8 + uVar9;
}
}
else {
uVar6 = *param_4;
__dest = pcVar8 + 1;
*pcVar8 = -((char)uVar6 + -1);
__src = (ushort *)((long)param_4 + 1);
if ((char)uVar6 != '\x01') goto LAB_0017b285;
__src = (ushort *)((long)param_4 + 3);
if ((*(byte *)((long)plVar11 + 0x12) & 0x28) == 0) {
__src = (ushort *)((long)param_4 + 1);
}
}
plVar7 = plVar11 + 4;
cVar5 = (char)plVar11[7];
if (cVar5 == '\0') break;
param_4 = (ushort *)((long)__src + (ulong)*(ushort *)((long)plVar11 + 0x14));
bVar4 = 1 < uVar12;
pcVar8 = __dest;
plVar11 = plVar7;
uVar12 = uVar12 >> 1;
} while (bVar4);
}
if (param_6 != (long *)0x0) {
*param_6 = (long)plVar7;
}
local_48 = (int)param_3;
return (int)__dest - local_48;
}
|
|
630 | my_mb_wc_big5 | eloqsql/strings/ctype-big5.c | static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x52e32
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x52dfc
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x52e32
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0x52e32
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0x52e33
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0x52e5a
movl %edx, %eax
leaq 0x86788(%rip), %rcx # 0xd95e0
jmp 0x52e71
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0x52e8a
movl %eax, %eax
leaq 0x8b4ef(%rip), %rcx # 0xde360
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x52e96
jmp 0x52e91
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_52E32
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_52DFC
mov [rsi], rdi
mov eax, 1
retn
loc_52DFC:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_52E32
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_52E32
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_52E33
locret_52E32:
retn
loc_52E33:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_52E5A
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_52E71
loc_52E5A:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_52E8A
mov eax, eax
lea rcx, tab_big5_uni1
loc_52E71:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_52E96
jmp short loc_52E91
loc_52E8A:
mov qword ptr [rsi], 0
loc_52E91:
mov eax, 0FFFFFFFEh
loc_52E96:
pop rbp
retn
| long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00152e32
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00152dfc
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_00152dfc:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00152e32
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x00152e32
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x00152e33
LAB_00152e32:
RET
LAB_00152e33:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x00152e5a
MOV EAX,EDX
LEA RCX,[0x1d95e0]
JMP 0x00152e71
LAB_00152e5a:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x00152e8a
MOV EAX,EAX
LEA RCX,[0x1de360]
LAB_00152e71:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00152e96
JMP 0x00152e91
LAB_00152e8a:
MOV qword ptr [RSI],0x0
LAB_00152e91:
MOV EAX,0xfffffffe
LAB_00152e96:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
631 | mysql_cset_escape_slashes | eloqsql/libmariadb/libmariadb/ma_charset.c | size_t mysql_cset_escape_slashes(const MARIADB_CHARSET_INFO * cset, char *newstr,
const char * escapestr, size_t escapestr_len )
{
const char *newstr_s = newstr;
const char *newstr_e = newstr + 2 * escapestr_len;
const char *end = escapestr + escapestr_len;
my_bool escape_overflow = FALSE;
for (;escapestr < end; escapestr++) {
char esc = '\0';
unsigned int len = 0;
/* check unicode characters */
if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) {
/* check possible overflow */
if ((newstr + len) > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy mb char without escaping it */
while (len--) {
*newstr++ = *escapestr++;
}
escapestr--;
continue;
}
if (cset->char_maxlen > 1 && cset->mb_charlen(*escapestr) > 1) {
esc = *escapestr;
} else {
switch (*escapestr) {
case 0:
esc = '0';
break;
case '\n':
esc = 'n';
break;
case '\r':
esc = 'r';
break;
case '\\':
case '\'':
case '"':
esc = *escapestr;
break;
case '\032':
esc = 'Z';
break;
}
}
if (esc) {
if (newstr + 2 > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy escaped character */
*newstr++ = '\\';
*newstr++ = esc;
} else {
if (newstr + 1 > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy non escaped character */
*newstr++ = *escapestr;
}
}
*newstr = '\0';
if (escape_overflow) {
return((size_t)~0);
}
return((size_t)(newstr - newstr_s));
} | O3 | c | mysql_cset_escape_slashes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %rcx, %rcx
jle 0x303e4
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movq -0x30(%rbp), %rbx
leaq (%rbx,%rcx,2), %r13
addq %rdx, %r14
cmpl $0x2, 0x34(%r15)
jb 0x30376
movq %r12, %rdi
movq %r14, %rsi
callq *0x40(%r15)
testl %eax, %eax
je 0x30355
movl %eax, %ecx
movl %eax, %eax
addq %rbx, %rax
cmpq %r13, %rax
ja 0x303ed
decq %r12
movq %r12, %rdx
leaq 0x1(%rdx), %r12
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r12, %rdx
movq %rax, %rbx
decl %ecx
jne 0x30339
jmp 0x303d5
cmpl $0x2, 0x34(%r15)
jb 0x30376
movsbl (%r12), %edi
callq *0x38(%r15)
cmpl $0x1, %eax
jbe 0x30376
movb (%r12), %cl
testb %cl, %cl
jne 0x303c6
xorl %ecx, %ecx
jmp 0x303af
movb (%r12), %cl
movzbl %cl, %eax
cmpl $0x19, %eax
jle 0x30393
cmpl $0x26, %eax
jg 0x303a5
cmpl $0x1a, %eax
je 0x303c0
cmpl $0x22, %eax
je 0x303c6
jmp 0x303af
testl %eax, %eax
je 0x303bc
cmpl $0xa, %eax
je 0x303c4
cmpl $0xd, %eax
jne 0x303af
movb $0x72, %cl
jmp 0x303c6
cmpl $0x27, %eax
je 0x303c6
cmpl $0x5c, %eax
je 0x303c6
leaq 0x1(%rbx), %rax
cmpq %r13, %rax
ja 0x303ed
movb %cl, (%rbx)
jmp 0x303d5
movb $0x30, %cl
jmp 0x303c6
movb $0x5a, %cl
jmp 0x303c6
movb $0x6e, %cl
leaq 0x2(%rbx), %rax
cmpq %r13, %rax
ja 0x303ed
movb $0x5c, (%rbx)
movb %cl, 0x1(%rbx)
incq %r12
movq %rax, %rbx
cmpq %r14, %r12
jb 0x3030e
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
jmp 0x303f7
movb $0x0, (%rbx)
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mysql_cset_escape_slashes:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rbp+var_30], rsi
mov rax, rsi
test rcx, rcx
jle loc_303E4
mov r14, rcx
mov r12, rdx
mov r15, rdi
mov rbx, [rbp+var_30]
lea r13, [rbx+rcx*2]
add r14, rdx
loc_3030E:
cmp dword ptr [r15+34h], 2
jb short loc_30376
mov rdi, r12
mov rsi, r14
call qword ptr [r15+40h]
test eax, eax
jz short loc_30355
mov ecx, eax
mov eax, eax
add rax, rbx
cmp rax, r13
ja loc_303ED
dec r12
mov rdx, r12
loc_30339:
lea r12, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r12
mov rbx, rax
dec ecx
jnz short loc_30339
jmp loc_303D5
loc_30355:
cmp dword ptr [r15+34h], 2
jb short loc_30376
movsx edi, byte ptr [r12]
call qword ptr [r15+38h]
cmp eax, 1
jbe short loc_30376
mov cl, [r12]
test cl, cl
jnz short loc_303C6
xor ecx, ecx
jmp short loc_303AF
loc_30376:
mov cl, [r12]
movzx eax, cl
cmp eax, 19h
jle short loc_30393
cmp eax, 26h ; '&'
jg short loc_303A5
cmp eax, 1Ah
jz short loc_303C0
cmp eax, 22h ; '"'
jz short loc_303C6
jmp short loc_303AF
loc_30393:
test eax, eax
jz short loc_303BC
cmp eax, 0Ah
jz short loc_303C4
cmp eax, 0Dh
jnz short loc_303AF
mov cl, 72h ; 'r'
jmp short loc_303C6
loc_303A5:
cmp eax, 27h ; '''
jz short loc_303C6
cmp eax, 5Ch ; '\'
jz short loc_303C6
loc_303AF:
lea rax, [rbx+1]
cmp rax, r13
ja short loc_303ED
mov [rbx], cl
jmp short loc_303D5
loc_303BC:
mov cl, 30h ; '0'
jmp short loc_303C6
loc_303C0:
mov cl, 5Ah ; 'Z'
jmp short loc_303C6
loc_303C4:
mov cl, 6Eh ; 'n'
loc_303C6:
lea rax, [rbx+2]
cmp rax, r13
ja short loc_303ED
mov byte ptr [rbx], 5Ch ; '\'
mov [rbx+1], cl
loc_303D5:
inc r12
mov rbx, rax
cmp r12, r14
jb loc_3030E
loc_303E4:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
jmp short loc_303F7
loc_303ED:
mov byte ptr [rbx], 0
mov rax, 0FFFFFFFFFFFFFFFFh
loc_303F7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mysql_cset_escape_slashes(long long a1, char *a2, char *a3, long long a4)
{
char *v4; // rax
char *v5; // r12
char *v6; // rbx
unsigned long long v7; // r13
unsigned long long v8; // r14
int v9; // eax
int v10; // ecx
char *v11; // rdx
char v12; // cl
unsigned int v13; // eax
v4 = a2;
if ( a4 <= 0 )
{
LABEL_32:
*v4 = 0;
return v4 - a2;
}
v5 = a3;
v6 = a2;
v7 = (unsigned long long)&a2[2 * a4];
v8 = (unsigned long long)&a3[a4];
while ( *(_DWORD *)(a1 + 52) >= 2u )
{
v9 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v5, v8);
if ( v9 )
{
v10 = v9;
if ( (unsigned long long)&v6[v9] > v7 )
goto LABEL_33;
v11 = v5 - 1;
do
{
v5 = v11 + 1;
v4 = v6 + 1;
*v6++ = *++v11;
--v10;
}
while ( v10 );
goto LABEL_31;
}
if ( *(_DWORD *)(a1 + 52) < 2u || (*(unsigned int ( **)(_QWORD))(a1 + 56))((unsigned int)*v5) <= 1 )
break;
v12 = *v5;
if ( *v5 )
goto LABEL_29;
v12 = 0;
LABEL_24:
v4 = v6 + 1;
if ( (unsigned long long)(v6 + 1) > v7 )
goto LABEL_33;
*v6 = v12;
LABEL_31:
++v5;
v6 = v4;
if ( (unsigned long long)v5 >= v8 )
goto LABEL_32;
}
v12 = *v5;
v13 = (unsigned __int8)*v5;
if ( v13 > 0x19 )
{
if ( (unsigned __int8)*v5 > 0x26u )
{
if ( v13 == 39 || v13 == 92 )
goto LABEL_29;
}
else
{
if ( v13 == 26 )
{
v12 = 90;
goto LABEL_29;
}
if ( v13 == 34 )
goto LABEL_29;
}
goto LABEL_24;
}
if ( !*v5 )
{
v12 = 48;
goto LABEL_29;
}
if ( v13 != 10 )
{
if ( v13 == 13 )
{
v12 = 114;
goto LABEL_29;
}
goto LABEL_24;
}
v12 = 110;
LABEL_29:
v4 = v6 + 2;
if ( (unsigned long long)(v6 + 2) <= v7 )
{
*v6 = 92;
v6[1] = v12;
goto LABEL_31;
}
LABEL_33:
*v6 = 0;
return -1LL;
}
| mysql_cset_escape_slashes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST RCX,RCX
JLE 0x001303e4
MOV R14,RCX
MOV R12,RDX
MOV R15,RDI
MOV RBX,qword ptr [RBP + -0x30]
LEA R13,[RBX + RCX*0x2]
ADD R14,RDX
LAB_0013030e:
CMP dword ptr [R15 + 0x34],0x2
JC 0x00130376
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [R15 + 0x40]
TEST EAX,EAX
JZ 0x00130355
MOV ECX,EAX
MOV EAX,EAX
ADD RAX,RBX
CMP RAX,R13
JA 0x001303ed
DEC R12
MOV RDX,R12
LAB_00130339:
LEA R12,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R12
MOV RBX,RAX
DEC ECX
JNZ 0x00130339
JMP 0x001303d5
LAB_00130355:
CMP dword ptr [R15 + 0x34],0x2
JC 0x00130376
MOVSX EDI,byte ptr [R12]
CALL qword ptr [R15 + 0x38]
CMP EAX,0x1
JBE 0x00130376
MOV CL,byte ptr [R12]
TEST CL,CL
JNZ 0x001303c6
XOR ECX,ECX
JMP 0x001303af
LAB_00130376:
MOV CL,byte ptr [R12]
MOVZX EAX,CL
CMP EAX,0x19
JLE 0x00130393
CMP EAX,0x26
JG 0x001303a5
CMP EAX,0x1a
JZ 0x001303c0
CMP EAX,0x22
JZ 0x001303c6
JMP 0x001303af
LAB_00130393:
TEST EAX,EAX
JZ 0x001303bc
CMP EAX,0xa
JZ 0x001303c4
CMP EAX,0xd
JNZ 0x001303af
MOV CL,0x72
JMP 0x001303c6
LAB_001303a5:
CMP EAX,0x27
JZ 0x001303c6
CMP EAX,0x5c
JZ 0x001303c6
LAB_001303af:
LEA RAX,[RBX + 0x1]
CMP RAX,R13
JA 0x001303ed
MOV byte ptr [RBX],CL
JMP 0x001303d5
LAB_001303bc:
MOV CL,0x30
JMP 0x001303c6
LAB_001303c0:
MOV CL,0x5a
JMP 0x001303c6
LAB_001303c4:
MOV CL,0x6e
LAB_001303c6:
LEA RAX,[RBX + 0x2]
CMP RAX,R13
JA 0x001303ed
MOV byte ptr [RBX],0x5c
MOV byte ptr [RBX + 0x1],CL
LAB_001303d5:
INC R12
MOV RBX,RAX
CMP R12,R14
JC 0x0013030e
LAB_001303e4:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
JMP 0x001303f7
LAB_001303ed:
MOV byte ptr [RBX],0x0
MOV RAX,-0x1
LAB_001303f7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long mysql_cset_escape_slashes(long param_1,byte *param_2,byte *param_3,long param_4)
{
byte *pbVar1;
uint uVar2;
byte *pbVar3;
byte bVar4;
byte *pbVar5;
byte *pbVar6;
byte *pbVar7;
pbVar3 = param_2;
if (0 < param_4) {
pbVar1 = param_2 + param_4 * 2;
pbVar7 = param_3 + param_4;
pbVar6 = param_2;
do {
if (*(uint *)(param_1 + 0x34) < 2) {
LAB_00130376:
bVar4 = *param_3;
if (bVar4 < 0x1a) {
if (bVar4 == 0) {
bVar4 = 0x30;
}
else if (bVar4 == 10) {
bVar4 = 0x6e;
}
else {
if (bVar4 != 0xd) goto LAB_001303af;
bVar4 = 0x72;
}
}
else if (bVar4 < 0x27) {
if (bVar4 == 0x1a) {
bVar4 = 0x5a;
}
else if (bVar4 != 0x22) goto LAB_001303af;
}
else if ((bVar4 != 0x27) && (bVar4 != 0x5c)) {
LAB_001303af:
pbVar3 = pbVar6 + 1;
if (pbVar1 < pbVar3) goto LAB_001303ed;
*pbVar6 = bVar4;
goto LAB_001303d5;
}
LAB_001303c6:
pbVar3 = pbVar6 + 2;
if (pbVar1 < pbVar3) {
LAB_001303ed:
*pbVar6 = 0;
return -1;
}
*pbVar6 = 0x5c;
pbVar6[1] = bVar4;
}
else {
uVar2 = (**(code **)(param_1 + 0x40))(param_3,pbVar7);
if (uVar2 == 0) {
if ((*(uint *)(param_1 + 0x34) < 2) ||
(uVar2 = (**(code **)(param_1 + 0x38))((int)(char)*param_3), uVar2 < 2))
goto LAB_00130376;
bVar4 = *param_3;
if (bVar4 == 0) {
bVar4 = 0;
goto LAB_001303af;
}
goto LAB_001303c6;
}
if (pbVar1 < pbVar6 + uVar2) goto LAB_001303ed;
pbVar5 = param_3 + -1;
do {
param_3 = pbVar5 + 1;
pbVar3 = pbVar6 + 1;
*pbVar6 = pbVar5[1];
uVar2 = uVar2 - 1;
pbVar5 = param_3;
pbVar6 = pbVar3;
} while (uVar2 != 0);
}
LAB_001303d5:
param_3 = param_3 + 1;
pbVar6 = pbVar3;
} while (param_3 < pbVar7);
}
*pbVar3 = 0;
return (long)pbVar3 - (long)param_2;
}
|
|
632 | google::protobuf::compiler::java::ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo(google::protobuf::io::Printer*, std::vector<unsigned short, std::allocator<unsigned short>>*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/primitive_field_lite.cc | void ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo(
io::Printer* printer, std::vector<uint16_t>* output) const {
WriteIntToUtf16CharSequence(descriptor_->number(), output);
WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_),
output);
if (HasHasbit(descriptor_)) {
WriteIntToUtf16CharSequence(messageBitIndex_, output);
}
printer->Print(variables_, "\"$name$_\",\n");
} | O3 | cpp | google::protobuf::compiler::java::ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo(google::protobuf::io::Printer*, std::vector<unsigned short, std::allocator<unsigned short>>*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movl 0x4(%rax), %edi
movq %rdx, %rsi
callq 0x45d05
movq 0x8(%r14), %rdi
callq 0x45ef8
movl %eax, %edi
movq %r15, %rsi
callq 0x45d05
movq 0x8(%r14), %rax
movb 0x1(%rax), %cl
movl %ecx, %edx
notb %dl
testb $0x60, %dl
je 0xe5567
testb $0x2, %cl
jne 0xe555b
movq 0x10(%rax), %rax
cmpb $0x2, 0x3(%rax)
jne 0xe5567
movl 0x40(%r14), %edi
movq %r15, %rsi
callq 0x45d05
addq $0x10, %r14
leaq 0xf85be(%rip), %rdx # 0x1ddb30
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x16cd32
| _ZNK6google8protobuf8compiler4java36ImmutablePrimitiveFieldLiteGenerator17GenerateFieldInfoEPNS0_2io7PrinterEPSt6vectorItSaItEE:
push r15
push r14
push rbx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+8]
mov edi, [rax+4]
mov rsi, rdx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler4java30WriteUInt32ToUtf16CharSequenceEjPSt6vectorItSaItEE; google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(uint,std::vector<ushort> *)
mov rdi, [r14+8]; this
call _ZN6google8protobuf8compiler4java28GetExperimentalJavaFieldTypeEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::GetExperimentalJavaFieldType(google::protobuf::FieldDescriptor const*)
mov edi, eax
mov rsi, r15
call _ZN6google8protobuf8compiler4java30WriteUInt32ToUtf16CharSequenceEjPSt6vectorItSaItEE; google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(uint,std::vector<ushort> *)
mov rax, [r14+8]
mov cl, [rax+1]
mov edx, ecx
not dl
test dl, 60h
jz short loc_E5567
test cl, 2
jnz short loc_E555B
mov rax, [rax+10h]
cmp byte ptr [rax+3], 2
jnz short loc_E5567
loc_E555B:
mov edi, [r14+40h]
mov rsi, r15
call _ZN6google8protobuf8compiler4java30WriteUInt32ToUtf16CharSequenceEjPSt6vectorItSaItEE; google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(uint,std::vector<ushort> *)
loc_E5567:
add r14, 10h
lea rdx, aName_0; "\"$name$_\",\n"
mov rdi, rbx; this
mov rsi, r14
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
| long long google::protobuf::compiler::java::ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo(
long long a1,
google::protobuf::io::Printer *a2,
const google::protobuf::FieldDescriptor *a3,
long long a4,
long long a5,
long long a6,
void *a7,
int a8,
char a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
void *a16,
int a17,
char a18)
{
unsigned int ExperimentalJavaFieldType; // eax
long long v22; // rax
char v23; // cl
google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(*(_DWORD *)(*(_QWORD *)(a1 + 8) + 4LL), (long long)a3);
ExperimentalJavaFieldType = google::protobuf::compiler::java::GetExperimentalJavaFieldType(
*(google::protobuf::compiler::java **)(a1 + 8),
a3);
google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(ExperimentalJavaFieldType, (long long)a3);
v22 = *(_QWORD *)(a1 + 8);
v23 = *(_BYTE *)(v22 + 1);
if ( (~v23 & 0x60) != 0 && ((v23 & 2) != 0 || *(_BYTE *)(*(_QWORD *)(v22 + 16) + 3LL) == 2) )
google::protobuf::compiler::java::WriteUInt32ToUtf16CharSequence(*(_DWORD *)(a1 + 64), (long long)a3);
return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18);
}
| GenerateFieldInfo:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV EDI,dword ptr [RAX + 0x4]
MOV RSI,RDX
CALL 0x00145d05
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x00145ef8
MOV EDI,EAX
MOV RSI,R15
CALL 0x00145d05
MOV RAX,qword ptr [R14 + 0x8]
MOV CL,byte ptr [RAX + 0x1]
MOV EDX,ECX
NOT DL
TEST DL,0x60
JZ 0x001e5567
TEST CL,0x2
JNZ 0x001e555b
MOV RAX,qword ptr [RAX + 0x10]
CMP byte ptr [RAX + 0x3],0x2
JNZ 0x001e5567
LAB_001e555b:
MOV EDI,dword ptr [R14 + 0x40]
MOV RSI,R15
CALL 0x00145d05
LAB_001e5567:
ADD R14,0x10
LEA RDX,[0x2ddb30]
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R14
POP R15
JMP 0x0026cd32
|
/* google::protobuf::compiler::java::ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo(google::protobuf::io::Printer*,
std::vector<unsigned short, std::allocator<unsigned short> >*) const */
void __thiscall
google::protobuf::compiler::java::ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo
(ImmutablePrimitiveFieldLiteGenerator *this,Printer *param_1,vector *param_2)
{
byte bVar1;
uint uVar2;
WriteUInt32ToUtf16CharSequence(*(uint *)(*(long *)(this + 8) + 4),param_2);
uVar2 = GetExperimentalJavaFieldType(*(FieldDescriptor **)(this + 8));
WriteUInt32ToUtf16CharSequence(uVar2,param_2);
bVar1 = *(byte *)(*(long *)(this + 8) + 1);
if (((~bVar1 & 0x60) != 0) &&
(((bVar1 & 2) != 0 || (*(char *)(*(long *)(*(long *)(this + 8) + 0x10) + 3) == '\x02')))) {
WriteUInt32ToUtf16CharSequence(*(uint *)(this + 0x40),param_2);
}
io::Printer::Print(param_1,(map *)(this + 0x10),"\"$name$_\",\n");
return;
}
|
|
633 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O3 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x31a8d
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x33b3d4(%rip), %rax # 0x36ce00
cmpb $0x0, (%rax)
je 0x31a47
decq %rdx
leaq 0x33b3c5(%rip), %rsi # 0x36ce00
movq %r14, %rdi
callq 0x606d8
xorl %ebx, %ebx
jmp 0x31a8d
cmpq $0x1, %rdx
je 0x31a8d
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x24150
testb $0x10, %r15b
je 0x31a9a
testq %rax, %rax
jne 0x31a9a
callq 0x24050
movq %rax, %r14
movl (%rax), %r15d
callq 0x2a59a
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x315bf
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x60690
cmpb $0x2f, -0x1(%rax)
je 0x31aad
movw $0x2f, (%rax)
leaq 0x33b34c(%rip), %rdi # 0x36ce00
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x31a3e
| my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_31A8D
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_31A47
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_31A3E:
call strmake
xor ebx, ebx
jmp short loc_31A8D
loc_31A47:
cmp rdx, 1
jz short loc_31A8D
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_31A9A
test rax, rax
jnz short loc_31A9A
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_31A8D:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_31A9A:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_31AAD
mov word ptr [rax], 2Fh ; '/'
loc_31AAD:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_31A3E
| long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
long long v8; // rax
unsigned int *v9; // r14
unsigned int v10; // r15d
_WORD *v12; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = getcwd(a1, (unsigned int)(a2 - 2));
if ( (a3 & 0x10) != 0 && !v8 )
{
v9 = (unsigned int *)__errno_location(a1);
v10 = *v9;
*(_DWORD *)my_thread_var() = v10;
my_error(0x10u, 4, *v9);
return v3;
}
v12 = (_WORD *)strend(a1);
if ( *((_BYTE *)v12 - 1) != 47 )
*v12 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake(a1, v7, v6);
return 0;
}
return v3;
}
| my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x00131a8d
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0x46ce00]
CMP byte ptr [RAX],0x0
JZ 0x00131a47
DEC RDX
LEA RSI,[0x46ce00]
MOV RDI,R14
LAB_00131a3e:
CALL 0x001606d8
XOR EBX,EBX
JMP 0x00131a8d
LAB_00131a47:
CMP RDX,0x1
JZ 0x00131a8d
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x00124150
TEST R15B,0x10
JZ 0x00131a9a
TEST RAX,RAX
JNZ 0x00131a9a
CALL 0x00124050
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x0012a59a
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x001315bf
LAB_00131a8d:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00131a9a:
MOV RDI,R14
CALL 0x00160690
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x00131aad
MOV word ptr [RAX],0x2f
LAB_00131aad:
LEA RDI,[0x46ce00]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x00131a3e
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
|
|
634 | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | Parser(const std::shared_ptr<std::string>& template_str, const Options & options) : template_str(template_str), options(options) {
if (!template_str) throw std::runtime_error("Template string is null");
start = it = this->template_str->begin();
end = this->template_str->end();
} | O3 | cpp | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x2d43e
movq 0xb0b68(%rip), %rcx # 0xddf98
cmpb $0x0, (%rcx)
je 0x2d43a
incl 0x8(%rax)
jmp 0x2d43e
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movb 0x2(%rdx), %al
movb %al, 0x2a(%rbx)
movzwl (%rdx), %eax
movw %ax, 0x28(%rbx)
cmpq $0x0, (%rsi)
je 0x2d47f
movq (%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x10(%rbx)
movq (%rax), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x18350
movq %rax, %r15
leaq 0x7c693(%rip), %rsi # 0xa9b26
movq %rax, %rdi
callq 0x18260
movq 0xb0b4e(%rip), %rsi # 0xddff0
movq 0xb0ac7(%rip), %rdx # 0xddf70
movq %r15, %rdi
callq 0x18b50
movq %rax, %r14
jmp 0x2d4c1
movq %rax, %r14
movq %r15, %rdi
callq 0x184f0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2d4cf
callq 0x30ed6
movq %r14, %rdi
callq 0x18bc0
nop
| _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE:
push r15
push r14
push rbx
mov rbx, rdi
mov rax, [rsi]
mov [rdi], rax
mov rax, [rsi+8]
mov [rdi+8], rax
test rax, rax
jz short loc_2D43E
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2D43A
inc dword ptr [rax+8]
jmp short loc_2D43E
loc_2D43A:
lock inc dword ptr [rax+8]
loc_2D43E:
xorps xmm0, xmm0
movups xmmword ptr [rbx+10h], xmm0
mov qword ptr [rbx+20h], 0
mov al, [rdx+2]
mov [rbx+2Ah], al
movzx eax, word ptr [rdx]
mov [rbx+28h], ax
cmp qword ptr [rsi], 0
jz short loc_2D47F
mov rax, [rbx]
mov rcx, [rax]
mov [rbx+20h], rcx
mov [rbx+10h], rcx
mov rcx, [rax]
add rcx, [rax+8]
mov [rbx+18h], rcx
pop rbx
pop r14
pop r15
retn
loc_2D47F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aTemplateString; "Template string is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
jmp short loc_2D4C1
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_2D4C1:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_2D4CF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2D4CF:
mov rdi, r14
call __Unwind_Resume
| long long * minja::Parser::Parser(long long **a1, long long **a2, long long a3)
{
long long *v3; // rax
long long *result; // rax
long long *v5; // rcx
std::runtime_error *exception; // r15
*a1 = *a2;
v3 = a2[1];
a1[1] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement((volatile signed __int32 *)v3 + 2);
}
*((_OWORD *)a1 + 1) = 0LL;
a1[4] = 0LL;
*((_BYTE *)a1 + 42) = *(_BYTE *)(a3 + 2);
*((_WORD *)a1 + 20) = *(_WORD *)a3;
if ( !*a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Template string is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
result = *a1;
v5 = (long long *)**a1;
a1[4] = v5;
a1[2] = v5;
a1[3] = (long long *)(result[1] + *result);
return result;
}
| Parser:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x8],RAX
TEST RAX,RAX
JZ 0x0012d43e
MOV RCX,qword ptr [0x001ddf98]
CMP byte ptr [RCX],0x0
JZ 0x0012d43a
INC dword ptr [RAX + 0x8]
JMP 0x0012d43e
LAB_0012d43a:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012d43e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RDX + 0x2]
MOV byte ptr [RBX + 0x2a],AL
MOVZX EAX,word ptr [RDX]
MOV word ptr [RBX + 0x28],AX
CMP qword ptr [RSI],0x0
JZ 0x0012d47f
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x10],RCX
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
POP RBX
POP R14
POP R15
RET
LAB_0012d47f:
MOV EDI,0x10
CALL 0x00118350
MOV R15,RAX
LAB_0012d48c:
LEA RSI,[0x1a9b26]
MOV RDI,RAX
CALL 0x00118260
LAB_0012d49b:
MOV RSI,qword ptr [0x001ddff0]
MOV RDX,qword ptr [0x001ddf70]
MOV RDI,R15
CALL 0x00118b50
|
/* minja::Parser::Parser(std::shared_ptr<std::__cxx11::string > const&, minja::Options const&) */
void __thiscall minja::Parser::Parser(Parser *this,shared_ptr *param_1,Options *param_2)
{
long lVar1;
long *plVar2;
runtime_error *this_00;
*(int8 *)this = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 8) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001ddf98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(Options *)(this + 0x2a) = param_2[2];
*(int2 *)(this + 0x28) = *(int2 *)param_2;
if (*(long *)param_1 != 0) {
plVar2 = *(long **)this;
lVar1 = *plVar2;
*(long *)(this + 0x20) = lVar1;
*(long *)(this + 0x10) = lVar1;
*(long *)(this + 0x18) = *plVar2 + plVar2[1];
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0012d48c to 0012d49a has its CatchHandler @ 0012d4b6 */
std::runtime_error::runtime_error(this_00,"Template string is null");
/* try { // try from 0012d49b to 0012d4b0 has its CatchHandler @ 0012d4b1 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70);
}
|
|
635 | nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&) | ng-log[P]ng-log/src/logging.cc | void LogFileObject::FlushUnlocked(
const std::chrono::system_clock::time_point& now) {
if (file_ != nullptr) {
fflush(file_.get());
bytes_since_flush_ = 0;
}
// Figure out when we are due for another flush.
next_flush_time_ =
now + std::chrono::duration_cast<std::chrono::system_clock::duration>(
std::chrono::duration<int32>{FLAGS_logbufsecs});
} | O2 | cpp | nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0xf042
callq 0x7680
andl $0x0, 0xa4(%rbx)
leaq 0x21aa7(%rip), %rax # 0x30af0
movslq (%rax), %rax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
addq (%r14), %rax
movq %rax, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+98h]
test rdi, rdi
jz short loc_F042
call _fflush
and dword ptr [rbx+0A4h], 0
loc_F042:
lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs
movsxd rax, dword ptr [rax]
imul rax, 3B9ACA00h
add rax, [r14]
mov [rbx+0B8h], rax
add rsp, 8
pop rbx
pop r14
retn
| long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, _QWORD *a2)
{
long long v3; // rdi
long long result; // rax
v3 = *(_QWORD *)(a1 + 152);
if ( v3 )
{
fflush(v3);
*(_DWORD *)(a1 + 164) = 0;
}
result = *a2 + 1000000000LL * fLI::FLAGS_logbufsecs;
*(_QWORD *)(a1 + 184) = result;
return result;
}
| FlushUnlocked:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x98]
TEST RDI,RDI
JZ 0x0010f042
CALL 0x00107680
AND dword ptr [RBX + 0xa4],0x0
LAB_0010f042:
LEA RAX,[0x130af0]
MOVSXD RAX,dword ptr [RAX]
IMUL RAX,RAX,0x3b9aca00
ADD RAX,qword ptr [R14]
MOV qword ptr [RBX + 0xb8],RAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* nglog::(anonymous
namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */
void __thiscall
nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1)
{
if (*(FILE **)(this + 0x98) != (FILE *)0x0) {
fflush(*(FILE **)(this + 0x98));
*(int4 *)(this + 0xa4) = 0;
}
*(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + *(long *)param_1;
return;
}
|
|
636 | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&) | llama.cpp/common/chat.cpp | static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct templates_params & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? inputs.tools : json::array();
std::string python_code_argument_name;
auto has_raw_python = false;
data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED;
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool.at("function");
const auto & parameters = function.at("parameters");
std::string name = function.at("name");
if (name == "python" || name == "ipython") {
if (!parameters.contains("type")) {
throw std::runtime_error("Missing type in python tool");
}
has_raw_python = true;
const auto & type = parameters.at("type");
if (type == "object") {
auto properties = parameters.at("properties");
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (it.value().at("type") == "string") {
if (!python_code_argument_name.empty()) {
throw std::runtime_error("Multiple string arguments found in python tool");
}
python_code_argument_name = it.key();
}
}
if (python_code_argument_name.empty()) {
throw std::runtime_error("No string argument found in python tool");
}
} else if (type != "string") {
throw std::runtime_error("Invalid type in python tool: " + type.dump());
}
}
tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space"));
});
if (has_raw_python) {
tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*"));
data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<|python_tag|>"});
data.preserved_tokens.push_back("<|python_tag|>");
}
auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space";
builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<function="});
});
data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
// TODO: if (has_raw_python)
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1;
return data;
} | O3 | cpp | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
movb %al, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rax, 0x90(%rdi)
leaq 0x10(%rdx), %r12
cmpb %al, 0x10(%rdx)
je 0x9b9a9
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xb11f4
jmp 0x9b9b6
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x8944c
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
movb %al, 0x7(%rsp)
cmpl $0x1, 0x20(%r14)
setne 0x48(%rbx)
movq %rax, 0x10(%rsp)
movl $0x20, %edi
callq 0x21200
movq %r14, (%rax)
leaq 0x7(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xb360(%rip), %rax # 0xa6d6c
movq %rax, 0x18(%rsi)
leaq 0xbb25(%rip), %rax # 0xa753c
movq %rax, 0x10(%rsi)
leaq 0x28(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x38(%rsp), %rdi
callq 0xfce42
leaq 0x28(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %r13, %rsi
callq 0x218c0
movq (%r13), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x9ba59
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21170
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x9ba72
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl (%r12), %eax
testl %eax, %eax
je 0x9baa4
cmpl $0x2, %eax
je 0x9ba85
cmpl $0x1, %eax
jne 0x9ba92
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x9baa4
movq %rbp, %r13
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x8944c
jmp 0x9bad4
movq %rbp, %r13
leaq 0x8(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x851fe
movq %r12, %rdi
movl $0x1, %esi
callq 0x851fe
movzbl 0x60(%r14), %ebp
leaq 0x28(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x851fe
movq %r12, %rdi
movl $0x1, %esi
callq 0x851fe
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r13, %rsi
movq %r14, %rdx
movl %ebp, %r8d
movq %r12, %r9
callq 0x9c619
leaq 0x8(%rbx), %rdi
leaq 0x38(%rsp), %r14
movq %r14, %rsi
callq 0x218c0
movq (%r14), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x9bb4c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r14, %rdi
callq 0x89918
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r14, %rdi
callq 0x89918
movl $0x9, (%rbx)
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x9bb97
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x851fe
movq %rbx, %rdi
callq 0x89918
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bc1d
jmp 0x9bc15
movq %rax, %r14
leaq 0x28(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r12, %rdi
callq 0x89918
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r12, %rdi
callq 0x89918
jmp 0x9bc20
movq %rax, %r14
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x9bc20
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9bc20
movq %rax, %rdi
callq 0x27a0f
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x9bc37
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x58(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r15, %rdi
callq 0x89918
jmp 0x9bc53
movq %rax, %r14
movq %rbx, %rdi
callq 0xb1aaa
movq %r14, %rdi
callq 0x21af0
| _ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_params:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov rbp, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
lea rax, [rdi+18h]
mov [rdi+8], rax
xor eax, eax
mov [rdi+10h], rax
mov [rdi+18h], al
lea rcx, [rdi+38h]
mov [rdi+28h], rcx
mov [rdi+30h], rax
mov [rdi+38h], al
mov [rdi+48h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
movups xmmword ptr [rdi+80h], xmm0
mov [rdi+90h], rax
lea r12, [rdx+10h]
cmp [rdx+10h], al
jz short loc_9B9A9
lea rdi, [rsp+0B8h+var_60]
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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,nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short loc_9B9B6
loc_9B9A9:
lea rdi, [rsp+0B8h+var_60]
mov rsi, r12
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&)
loc_9B9B6:
lea r15, [rsp+0B8h+var_40]
mov [r15-10h], r15
xor eax, eax
mov [r15-8], rax
mov [r15], al
mov [rsp+0B8h+var_B1], al
cmp dword ptr [r14+20h], 1
setnz byte ptr [rbx+48h]
mov [rsp+0B8h+var_A8], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
lea rcx, [rsp+0B8h+var_B1]
mov [rax+8], rcx
lea rcx, [rsp+0B8h+var_50]
mov [rax+10h], rcx
mov [rax+18h], rbx
lea rsi, [rsp+0B8h+var_B0]
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, [rsp+0B8h+var_90]
mov byte ptr [rdx], 0
lea rdi, [rsp+0B8h+var_80]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+28h]
lea r13, [rsp+0B8h+var_80]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea rax, [rsp+0B8h+var_70]
cmp rdi, rax
jz short loc_9BA59
mov rsi, [rsp+0B8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9BA59:
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_9BA72
lea rdi, [rsp+0B8h+var_B0]
mov rsi, rdi
mov edx, 3
call rax
loc_9BA72:
movzx eax, byte ptr [r12]
test eax, eax
jz short loc_9BAA4
cmp eax, 2
jz short loc_9BA85
cmp eax, 1
jnz short loc_9BA92
loc_9BA85:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_9BAA4
loc_9BA92:
mov r13, rbp
lea rdi, [rsp+0B8h+var_B0]
mov rsi, r12
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&)
jmp short loc_9BAD4
loc_9BAA4:
mov r13, rbp
lea r12, [rsp+0B8h+var_B0]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 0
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_9BAD4:
movzx ebp, byte ptr [r14+60h]
lea r12, [rsp+0B8h+var_90]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 0
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
lea rdi, [rsp+0B8h+var_80]
lea rcx, [rsp+0B8h+var_B0]
mov rsi, r13
mov rdx, r14
mov r8d, ebp
mov r9, r12
call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template 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&,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&,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> const&)
lea rdi, [rbx+8]
lea r14, [rsp+0B8h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+0B8h+var_70]
cmp rdi, rax
jz short loc_9BB4C
mov rsi, [rsp+0B8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9BB4C:
lea r14, [rsp+0B8h+var_90]
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()
lea r14, [rsp+0B8h+var_B0]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 9
mov rdi, [rsp+0B8h+var_50]; void *
cmp rdi, r15
jz short loc_9BB97
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9BB97:
lea rbx, [rsp+0B8h+var_60]
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()
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_9BC1D
jmp short loc_9BC15
mov r14, rax
lea r12, [rsp+0B8h+var_90]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea r12, [rsp+0B8h+var_B0]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_9BC20
mov r14, rax
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_9BC20
lea rdi, [rsp+0B8h+var_B0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9BC20
loc_9BC15:
mov rdi, rax
call __clang_call_terminate
loc_9BC1D:
mov r14, rax
loc_9BC20:
mov rdi, [rsp+0B8h+var_50]; void *
cmp rdi, r15
jz short loc_9BC37
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9BC37:
lea r15, [rsp+0B8h+var_60]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_9BC53
mov r14, rax
loc_9BC53:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
| long long common_chat_params_init_functionary_v3_1_llama_3_1(long long a1, int a2, long long a3)
{
unsigned __int8 *v4; // r12
_QWORD *v5; // rax
int v6; // eax
int v7; // r13d
int v8; // ebp
char v10; // [rsp+7h] [rbp-B1h] BYREF
_QWORD *v11; // [rsp+8h] [rbp-B0h] BYREF
long long v12; // [rsp+10h] [rbp-A8h]
long long ( *v13)(); // [rsp+18h] [rbp-A0h]
long long ( *v14)(); // [rsp+20h] [rbp-98h]
char v15[8]; // [rsp+28h] [rbp-90h] BYREF
long long v16; // [rsp+30h] [rbp-88h]
void *v17[2]; // [rsp+38h] [rbp-80h] BYREF
_QWORD v18[2]; // [rsp+48h] [rbp-70h] BYREF
unsigned __int8 v19[16]; // [rsp+58h] [rbp-60h] BYREF
void *v20[2]; // [rsp+68h] [rbp-50h] BYREF
_QWORD v21[8]; // [rsp+78h] [rbp-40h] BYREF
*(_DWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = a1 + 24;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = a1 + 56;
*(_QWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 56) = 0;
*(_BYTE *)(a1 + 72) = 0;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = 0LL;
v4 = (unsigned __int8 *)(a3 + 16);
if ( *(_BYTE *)(a3 + 16) )
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(
v19,
0LL,
0LL,
0LL,
2LL);
else
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(
v19,
(unsigned __int8 *)(a3 + 16));
v20[0] = v21;
v20[1] = 0LL;
LOBYTE(v21[0]) = 0;
v10 = 0;
*(_BYTE *)(a1 + 72) = *(_DWORD *)(a3 + 32) != 1;
v12 = 0LL;
v5 = (_QWORD *)operator new(0x20uLL);
*v5 = a3;
v5[1] = &v10;
v5[2] = v20;
v5[3] = a1;
v11 = v5;
v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke;
v13 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager;
v15[0] = 0;
build_grammar[abi:cxx11](v17, &v11, v15);
std::string::operator=(a1 + 40, v17);
if ( v17[0] != v18 )
operator delete(v17[0], v18[0] + 1LL);
if ( v13 )
((void ( *)(_QWORD **, _QWORD **, long long))v13)(&v11, &v11, 3LL);
v6 = *v4;
if ( !*v4 || (v6 == 2 || v6 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
v7 = a2;
LOBYTE(v11) = 0;
v12 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11);
}
else
{
v7 = 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>::basic_json(
(unsigned __int8 *)&v11,
v4);
}
v8 = *(unsigned __int8 *)(a3 + 96);
v15[0] = 0;
v16 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v15);
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(v15);
apply((unsigned int)v17, v7, a3, (unsigned int)&v11, v8, (unsigned int)v15);
std::string::operator=(a1 + 8, v17);
if ( v17[0] != v18 )
operator delete(v17[0], v18[0] + 1LL);
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(v15);
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(v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11);
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(&v11);
*(_DWORD *)a1 = 9;
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v19);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
}
| common_chat_params_init_functionary_v3_1_llama_3_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV RBP,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
LEA RAX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x38]
MOV qword ptr [RDI + 0x28],RCX
MOV qword ptr [RDI + 0x30],RAX
MOV byte ptr [RDI + 0x38],AL
MOV byte ptr [RDI + 0x48],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOVUPS xmmword ptr [RDI + 0x80],XMM0
MOV qword ptr [RDI + 0x90],RAX
LEA R12,[RDX + 0x10]
CMP byte ptr [RDX + 0x10],AL
JZ 0x0019b9a9
LAB_0019b991:
LEA RDI,[RSP + 0x58]
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x2
CALL 0x001b11f4
JMP 0x0019b9b6
LAB_0019b9a9:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x0018944c
LAB_0019b9b6:
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
XOR EAX,EAX
MOV qword ptr [R15 + -0x8],RAX
MOV byte ptr [R15],AL
MOV byte ptr [RSP + 0x7],AL
CMP dword ptr [R14 + 0x20],0x1
SETNZ byte ptr [RBX + 0x48]
MOV qword ptr [RSP + 0x10],RAX
LAB_0019b9da:
MOV EDI,0x20
CALL 0x00121200
MOV qword ptr [RAX],R14
LEA RCX,[RSP + 0x7]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x68]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RAX,[0x1a6d6c]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1a753c]
MOV qword ptr [RSI + 0x10],RAX
LEA RDX,[RSP + 0x28]
MOV byte ptr [RDX],0x0
LAB_0019ba23:
LEA RDI,[RSP + 0x38]
CALL 0x001fce42
LEA RDI,[RBX + 0x28]
LEA R13,[RSP + 0x38]
MOV RSI,R13
CALL 0x001218c0
MOV RDI,qword ptr [R13]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x0019ba59
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00121170
LAB_0019ba59:
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x0019ba72
LAB_0019ba63:
LEA RDI,[RSP + 0x8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019ba72:
MOVZX EAX,byte ptr [R12]
TEST EAX,EAX
JZ 0x0019baa4
CMP EAX,0x2
JZ 0x0019ba85
CMP EAX,0x1
JNZ 0x0019ba92
LAB_0019ba85:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x0019baa4
LAB_0019ba92:
MOV R13,RBP
LEA RDI,[RSP + 0x8]
MOV RSI,R12
CALL 0x0018944c
JMP 0x0019bad4
LAB_0019baa4:
MOV R13,RBP
LEA R12,[RSP + 0x8]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x001851fe
MOV RDI,R12
MOV ESI,0x1
CALL 0x001851fe
LAB_0019bad4:
MOVZX EBP,byte ptr [R14 + 0x60]
LEA R12,[RSP + 0x28]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x001851fe
MOV RDI,R12
MOV ESI,0x1
CALL 0x001851fe
LAB_0019bb06:
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x8]
MOV RSI,R13
MOV RDX,R14
MOV R8D,EBP
MOV R9,R12
CALL 0x0019c619
LEA RDI,[RBX + 0x8]
LEA R14,[RSP + 0x38]
MOV RSI,R14
CALL 0x001218c0
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x0019bb4c
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00121170
LAB_0019bb4c:
LEA R14,[RSP + 0x28]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R14
CALL 0x00189918
LEA R14,[RSP + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R14
CALL 0x00189918
MOV dword ptr [RBX],0x9
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x0019bb97
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00121170
LAB_0019bb97:
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,RBX
CALL 0x00189918
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params
const&) */
void common_chat_params_init_functionary_v3_1_llama_3_1
(chat_template *param_1,templates_params *param_2)
{
basic_json *pbVar1;
basic_json bVar2;
basic_json *in_RDX;
int1 local_b1;
int8 *local_b0;
int8 local_a8;
code *local_a0;
code *local_98;
data local_90 [8];
int8 local_88;
long *local_80 [2];
long local_70 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_60 [16];
int1 *local_50;
int8 local_48;
int1 local_40;
int7 uStack_3f;
*(int4 *)param_1 = 0;
*(chat_template **)(param_1 + 8) = param_1 + 0x18;
*(int8 *)(param_1 + 0x10) = 0;
param_1[0x18] = (chat_template)0x0;
*(chat_template **)(param_1 + 0x28) = param_1 + 0x38;
*(int8 *)(param_1 + 0x30) = 0;
param_1[0x38] = (chat_template)0x0;
param_1[0x48] = (chat_template)0x0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x88) = 0;
*(int8 *)(param_1 + 0x90) = 0;
pbVar1 = in_RDX + 0x10;
if (in_RDX[0x10] == (basic_json)0x0) {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_60,pbVar1);
}
else {
/* try { // try from 0019b991 to 0019b9b5 has its CatchHandler @ 0019bc50 */
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(local_60,0,0,0,2);
}
local_48 = 0;
local_40 = 0;
local_b1 = 0;
param_1[0x48] = (chat_template)(*(int *)(in_RDX + 0x20) != 1);
local_a8 = 0;
local_50 = &local_40;
/* try { // try from 0019b9da to 0019b9e3 has its CatchHandler @ 0019bc1d */
local_b0 = (int8 *)operator_new(0x20);
*local_b0 = in_RDX;
local_b0[1] = &local_b1;
local_b0[2] = &local_50;
local_b0[3] = param_1;
local_98 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0>
::_M_invoke;
local_a0 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0>
::_M_manager;
local_90[0] = (data)0x0;
/* try { // try from 0019ba23 to 0019ba2c has its CatchHandler @ 0019bbf7 */
build_grammar_abi_cxx11_((function *)local_80,(common_grammar_options *)&local_b0);
std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)local_80);
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0 != (code *)0x0) {
/* try { // try from 0019ba63 to 0019ba71 has its CatchHandler @ 0019bbc2 */
(*local_a0)(&local_b0,&local_b0,3);
}
bVar2 = *pbVar1;
if ((bVar2 == (basic_json)0x0) ||
(((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_b0 = (int8 *)((ulong)local_b0 & 0xffffffffffffff00);
local_a8 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_b0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_b0,0));
}
else {
/* try { // try from 0019ba92 to 0019baa1 has its CatchHandler @ 0019bbc0 */
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((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_b0,pbVar1);
}
bVar2 = in_RDX[0x60];
local_90[0] = (data)0x0;
local_88 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
/* try { // try from 0019bb06 to 0019bb20 has its CatchHandler @ 0019bbc4 */
apply((chat_template *)local_80,(basic_json *)param_2,in_RDX,SUB81(&local_b0,0),
(basic_json *)(ulong)(byte)bVar2);
std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)local_80);
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_b0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_b0);
*(int4 *)param_1 = 9;
if (local_50 != &local_40) {
operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_60,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_60);
return;
}
|
|
637 | bf_acos | bluesky950520[P]quickjs/libbf.c | int bf_acos(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_const_pi(r, prec, flags);
bf_mul_2exp(r, -1, BF_PREC_INF, BF_RNDZ);
return BF_ST_INEXACT;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else if (res == 0 && a->sign == 0) {
bf_set_zero(r, 0);
return 0;
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)TRUE);
} | O0 | c | bf_acos:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xf7636
movq 0x50(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
jne 0xf75ca
movq 0x58(%rsp), %rdi
callq 0xec490
movl $0x0, 0x64(%rsp)
jmp 0xf76df
movq 0x50(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, 0x10(%rax)
jne 0xf75f6
movq 0x58(%rsp), %rdi
callq 0xec490
movl $0x1, 0x64(%rsp)
jmp 0xf76df
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
callq 0xf4140
movq 0x58(%rsp), %rdi
movq $-0x1, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0xeee00
movl $0x10, 0x64(%rsp)
jmp 0xf76df
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xec260
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xec390
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xed230
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0xef6c0
cmpl $0x0, 0x4(%rsp)
jle 0xf768c
movq 0x58(%rsp), %rdi
callq 0xec490
movl $0x1, 0x64(%rsp)
jmp 0xf76df
cmpl $0x0, 0x4(%rsp)
jne 0xf76b4
movq 0x50(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xf76b4
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0xec530
movl $0x0, 0x64(%rsp)
jmp 0xf76df
jmp 0xf76b6
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl 0x44(%rsp), %ecx
leaq -0x2a0(%rip), %r8 # 0xf7430
movl $0x1, %r9d
callq 0xf47d0
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
| bf_acos:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_20], rdx
mov [rsp+68h+var_24], ecx
mov rax, [rsp+68h+var_10]
mov rax, [rax]
mov [rsp+68h+var_30], rax
lea rax, [rsp+68h+var_58]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_18]
cmp qword ptr [rax+18h], 0
jnz loc_F7636
mov rax, [rsp+68h+var_18]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jnz short loc_F75CA
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 0
jmp loc_F76DF
loc_F75CA:
mov rax, [rsp+68h+var_18]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp [rax+10h], rcx
jnz short loc_F75F6
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 1
jmp loc_F76DF
loc_F75F6:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_20]
mov edx, [rsp+68h+var_24]
call bf_const_pi
mov rdi, [rsp+68h+var_10]
mov rsi, 0FFFFFFFFFFFFFFFFh
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov [rsp+68h+var_4], 10h
jmp loc_F76DF
loc_F7636:
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_60]
call bf_init
mov rdi, [rsp+68h+var_60]
mov esi, 1
call bf_set_ui
mov rdi, [rsp+68h+var_18]
mov rsi, [rsp+68h+var_60]
call bf_cmpu
mov [rsp+68h+var_64], eax
mov rdi, [rsp+68h+var_60]
call bf_delete_0
cmp [rsp+68h+var_64], 0
jle short loc_F768C
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 1
jmp short loc_F76DF
loc_F768C:
cmp [rsp+68h+var_64], 0
jnz short loc_F76B4
mov rax, [rsp+68h+var_18]
cmp dword ptr [rax+8], 0
jnz short loc_F76B4
mov rdi, [rsp+68h+var_10]
xor esi, esi
call bf_set_zero
mov [rsp+68h+var_4], 0
jmp short loc_F76DF
loc_F76B4:
jmp short $+2
loc_F76B6:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_20]
mov ecx, [rsp+68h+var_24]
lea r8, bf_asin_internal
mov r9d, 1
call bf_ziv_rounding
mov [rsp+68h+var_4], eax
loc_F76DF:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long bf_acos(_QWORD *a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
int v9; // [rsp+4h] [rbp-64h]
long long v10[5]; // [rsp+10h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-30h]
unsigned int v12; // [rsp+44h] [rbp-24h]
long long v13; // [rsp+48h] [rbp-20h]
long long v14; // [rsp+50h] [rbp-18h]
_QWORD *v15; // [rsp+58h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = *a1;
if ( !*(_QWORD *)(a2 + 24) )
{
if ( *(_QWORD *)(v14 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)v15);
return 0;
}
if ( *(_QWORD *)(v14 + 16) != 0x7FFFFFFFFFFFFFFELL )
{
bf_const_pi((long long)v15, v13, v12);
bf_mul_2exp(v15, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1u);
return 16;
}
LABEL_5:
bf_set_nan((long long)v15);
return 1;
}
bf_init(v11, (long long)v10);
bf_set_ui((long long)v10, 1LL);
v9 = bf_cmpu(v14, (long long)v10);
bf_delete_0(v10, (long long)v10, v4, v5, v6, v7);
if ( v9 > 0 )
goto LABEL_5;
if ( v9 || *(_DWORD *)(v14 + 8) )
{
return (unsigned int)bf_ziv_rounding(
v15,
v14,
v13,
v12,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
1LL);
}
else
{
bf_set_zero((long long)v15, 0);
return 0;
}
}
| bf_acos:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV dword ptr [RSP + 0x44],ECX
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x38],RAX
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x50]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001f7636
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001f75ca
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001ec490
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001f76df
LAB_001f75ca:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,0x7ffffffffffffffe
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001f75f6
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001ec490
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001f76df
LAB_001f75f6:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0x44]
CALL 0x001f4140
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,-0x1
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x001eee00
MOV dword ptr [RSP + 0x64],0x10
JMP 0x001f76df
LAB_001f7636:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001ec260
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x001ec390
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001ed230
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001ef6c0
CMP dword ptr [RSP + 0x4],0x0
JLE 0x001f768c
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001ec490
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001f76df
LAB_001f768c:
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x001f76b4
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x001f76b4
MOV RDI,qword ptr [RSP + 0x58]
XOR ESI,ESI
CALL 0x001ec530
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001f76df
LAB_001f76b4:
JMP 0x001f76b6
LAB_001f76b6:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x44]
LEA R8,[0x1f7430]
MOV R9D,0x1
CALL 0x001f47d0
MOV dword ptr [RSP + 0x64],EAX
LAB_001f76df:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 bf_acos(int8 *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
int1 local_58 [40];
int8 local_30;
int4 local_24;
int8 local_20;
long local_18;
int8 *local_10;
int4 local_4;
local_30 = *param_1;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
bf_set_nan(param_1);
local_4 = 0;
}
else if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) {
bf_set_nan(param_1);
local_4 = 1;
}
else {
bf_const_pi(param_1,param_3,param_4);
bf_mul_2exp(local_10,0xffffffffffffffff,0x3fffffffffffffff,1);
local_4 = 0x10;
}
}
else {
bf_init(local_30,local_58);
bf_set_ui(local_58,1);
iVar1 = bf_cmpu(local_18,local_58);
bf_delete(local_58);
if (iVar1 < 1) {
if ((iVar1 == 0) && (*(int *)(local_18 + 8) == 0)) {
bf_set_zero(local_10,0);
local_4 = 0;
}
else {
local_4 = bf_ziv_rounding(local_10,local_18,local_20,local_24,bf_asin_internal,1);
}
}
else {
bf_set_nan(local_10);
local_4 = 1;
}
}
return local_4;
}
|
|
638 | bf_acos | bluesky950520[P]quickjs/libbf.c | int bf_acos(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_const_pi(r, prec, flags);
bf_mul_2exp(r, -1, BF_PREC_INF, BF_RNDZ);
return BF_ST_INEXACT;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else if (res == 0 && a->sign == 0) {
bf_set_zero(r, 0);
return 0;
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)TRUE);
} | O2 | c | bf_acos:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0x79e1d
movq (%rbx), %rax
movq %rsp, %r12
movq %rax, (%r12)
andl $0x0, 0x8(%r12)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x73106
movq %r15, %rdi
movq %r12, %rsi
callq 0x73916
movl %eax, %r13d
movq %r12, %rdi
callq 0x7500e
testl %r13d, %r13d
jg 0x79e4b
jne 0x79df4
cmpl $0x0, 0x8(%r15)
je 0x79e90
leaq -0x162(%rip), %r8 # 0x79c99
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x78034
movq 0x10(%r15), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x79e4b
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x79e67
movq %rbx, %rdi
callq 0x7317d
xorl %ebp, %ebp
jmp 0x79e56
movq %rbx, %rdi
callq 0x7317d
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x77ca8
pushq $-0x1
popq %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x74b92
pushq $0x10
jmp 0x79e55
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x731c2
jmp 0x79e56
| bf_acos:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
cmp qword ptr [rsi+18h], 0
jz loc_79E1D
mov rax, [rbx]
mov r12, rsp
mov [r12], rax
and dword ptr [r12+8], 0
mov rax, 8000000000000000h
mov [r12+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r12+18h], xmm0
push 1
pop rsi
mov rdi, r12
call bf_set_ui
mov rdi, r15
mov rsi, r12
call bf_cmpu
mov r13d, eax
mov rdi, r12
call bf_delete_0
test r13d, r13d
jg short loc_79E4B
jnz short loc_79DF4
cmp dword ptr [r15+8], 0
jz loc_79E90
loc_79DF4:
lea r8, bf_asin_internal
push 1
pop r9
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_79E1D:
mov rax, [r15+10h]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_79E4B
mov rcx, 7FFFFFFFFFFFFFFFh
cmp rax, rcx
jnz short loc_79E67
mov rdi, rbx
call bf_set_nan
xor ebp, ebp
jmp short loc_79E56
loc_79E4B:
mov rdi, rbx
call bf_set_nan
push 1
loc_79E55:
pop rbp
loc_79E56:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79E67:
mov rdi, rbx
mov rsi, r14
mov edx, ebp
call bf_const_pi
push 0FFFFFFFFFFFFFFFFh
pop rsi
mov rdx, 3FFFFFFFFFFFFFFFh
push 1
pop rcx
mov rdi, rbx
call bf_mul_2exp
push 10h
jmp short loc_79E55
loc_79E90:
xor ebp, ebp
mov rdi, rbx
xor esi, esi
call bf_set_zero
jmp short loc_79E56
| long long bf_acos(long long *a1, long long a2, long long a3, unsigned int a4)
{
int v6; // r13d
long long v8; // rax
unsigned int v9; // ebp
long long v11; // [rsp+0h] [rbp-58h] BYREF
int v12; // [rsp+8h] [rbp-50h]
unsigned long long v13; // [rsp+10h] [rbp-48h]
__int128 v14; // [rsp+18h] [rbp-40h]
if ( !*(_QWORD *)(a2 + 24) )
{
v8 = *(_QWORD *)(a2 + 16);
if ( v8 != 0x7FFFFFFFFFFFFFFELL )
{
if ( v8 == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)a1);
return 0;
}
bf_const_pi((long long)a1, a3, a4);
bf_mul_2exp((long long)a1, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1u);
return 16;
}
LABEL_9:
bf_set_nan((long long)a1);
return 1;
}
v11 = *a1;
v12 = 0;
v13 = 0x8000000000000000LL;
v14 = 0LL;
bf_set_ui((long long)&v11, 1uLL);
v6 = bf_cmpu((_QWORD *)a2, &v11);
bf_delete_0(&v11);
if ( v6 > 0 )
goto LABEL_9;
if ( v6 || *(_DWORD *)(a2 + 8) )
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
1LL);
v9 = 0;
bf_set_zero((long long)a1, 0);
return v9;
}
| bf_acos:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x18],0x0
JZ 0x00179e1d
MOV RAX,qword ptr [RBX]
MOV R12,RSP
MOV qword ptr [R12],RAX
AND dword ptr [R12 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R12 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x18],XMM0
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x00173106
MOV RDI,R15
MOV RSI,R12
CALL 0x00173916
MOV R13D,EAX
MOV RDI,R12
CALL 0x0017500e
TEST R13D,R13D
JG 0x00179e4b
JNZ 0x00179df4
CMP dword ptr [R15 + 0x8],0x0
JZ 0x00179e90
LAB_00179df4:
LEA R8,[0x179c99]
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00178034
LAB_00179e1d:
MOV RAX,qword ptr [R15 + 0x10]
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x00179e4b
MOV RCX,0x7fffffffffffffff
CMP RAX,RCX
JNZ 0x00179e67
MOV RDI,RBX
CALL 0x0017317d
XOR EBP,EBP
JMP 0x00179e56
LAB_00179e4b:
MOV RDI,RBX
CALL 0x0017317d
PUSH 0x1
LAB_00179e55:
POP RBP
LAB_00179e56:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179e67:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,EBP
CALL 0x00177ca8
PUSH -0x1
POP RSI
MOV RDX,0x3fffffffffffffff
PUSH 0x1
POP RCX
MOV RDI,RBX
CALL 0x00174b92
PUSH 0x10
JMP 0x00179e55
LAB_00179e90:
XOR EBP,EBP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001731c2
JMP 0x00179e56
|
int8 bf_acos(int8 *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
int8 uVar2;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_2 + 0x10) != 0x7fffffffffffffff) {
bf_const_pi(param_1,param_3,param_4);
bf_mul_2exp(param_1,0xffffffffffffffff,0x3fffffffffffffff,1);
return 0x10;
}
bf_set_nan(param_1);
return 0;
}
}
else {
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
bf_set_ui(&local_58,1);
iVar1 = bf_cmpu(param_2,&local_58);
bf_delete(&local_58);
if (iVar1 < 1) {
if ((iVar1 == 0) && (*(int *)(param_2 + 8) == 0)) {
bf_set_zero(param_1,0);
return 0;
}
uVar2 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,1);
return uVar2;
}
}
bf_set_nan(param_1);
return 1;
}
|
|
639 | aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::~ImuSensorPublisherBase() | aimrt_mujoco_sim/src/module/mujoco_sim_module/../mujoco_sim_module/publisher/imu_sensor_publisher.h | virtual ~ImuSensorPublisherBase() override = default; | O3 | c | aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::~ImuSensorPublisherBase():
pushq %rbx
movq %rdi, %rbx
leaq 0x1b870b(%rip), %rax # 0x208c60
movq %rax, (%rdi)
movq 0x68(%rdi), %rdi
leaq 0x78(%rbx), %rax
cmpq %rax, %rdi
je 0x50570
movq (%rax), %rsi
incq %rsi
callq 0x2d2d0
movq 0x48(%rbx), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x50588
movq (%rax), %rsi
incq %rsi
callq 0x2d2d0
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0x505a0
movq (%rax), %rsi
incq %rsi
callq 0x2d2d0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x505b9
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x2d2d0
popq %rbx
retq
nop
| _ZN16aimrt_mujoco_sim17mujoco_sim_module9publisher22ImuSensorPublisherBaseD2Ev:
push rbx
mov rbx, rdi
lea rax, off_208C60
mov [rdi], rax
mov rdi, [rdi+68h]; void *
lea rax, [rbx+78h]
cmp rdi, rax
jz short loc_50570
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_50570:
mov rdi, [rbx+48h]; void *
lea rax, [rbx+58h]
cmp rdi, rax
jz short loc_50588
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_50588:
mov rdi, [rbx+28h]; void *
lea rax, [rbx+38h]
cmp rdi, rax
jz short loc_505A0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_505A0:
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_505B9
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_505B9:
pop rbx
retn
| void aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::~ImuSensorPublisherBase(
aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase *this)
{
char *v2; // rdi
char *v3; // rdi
char *v4; // rdi
_QWORD *v5; // rdi
_QWORD *v6; // rbx
*(_QWORD *)this = &off_208C60;
v2 = (char *)*((_QWORD *)this + 13);
if ( v2 != (char *)this + 120 )
operator delete(v2, *((_QWORD *)this + 15) + 1LL);
v3 = (char *)*((_QWORD *)this + 9);
if ( v3 != (char *)this + 88 )
operator delete(v3, *((_QWORD *)this + 11) + 1LL);
v4 = (char *)*((_QWORD *)this + 5);
if ( v4 != (char *)this + 56 )
operator delete(v4, *((_QWORD *)this + 7) + 1LL);
v5 = (_QWORD *)*((_QWORD *)this + 1);
v6 = (_QWORD *)((char *)this + 24);
if ( v5 != v6 )
operator delete(v5, *v6 + 1LL);
}
| ~ImuSensorPublisherBase:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x308c60]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x68]
LEA RAX,[RBX + 0x78]
CMP RDI,RAX
JZ 0x00150570
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0012d2d0
LAB_00150570:
MOV RDI,qword ptr [RBX + 0x48]
LEA RAX,[RBX + 0x58]
CMP RDI,RAX
JZ 0x00150588
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0012d2d0
LAB_00150588:
MOV RDI,qword ptr [RBX + 0x28]
LEA RAX,[RBX + 0x38]
CMP RDI,RAX
JZ 0x001505a0
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0012d2d0
LAB_001505a0:
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x001505b9
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x0012d2d0
LAB_001505b9:
POP RBX
RET
|
/* aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::~ImuSensorPublisherBase()
*/
void __thiscall
aimrt_mujoco_sim::mujoco_sim_module::publisher::ImuSensorPublisherBase::~ImuSensorPublisherBase
(ImuSensorPublisherBase *this)
{
*(int ***)this = &PTR__ImuSensorPublisherBase_00308c60;
if (*(ImuSensorPublisherBase **)(this + 0x68) != this + 0x78) {
operator_delete(*(ImuSensorPublisherBase **)(this + 0x68),*(long *)(this + 0x78) + 1);
}
if (*(ImuSensorPublisherBase **)(this + 0x48) != this + 0x58) {
operator_delete(*(ImuSensorPublisherBase **)(this + 0x48),*(long *)(this + 0x58) + 1);
}
if (*(ImuSensorPublisherBase **)(this + 0x28) != this + 0x38) {
operator_delete(*(ImuSensorPublisherBase **)(this + 0x28),*(long *)(this + 0x38) + 1);
}
if (*(ImuSensorPublisherBase **)(this + 8) != this + 0x18) {
operator_delete(*(ImuSensorPublisherBase **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
|
|
640 | lunasvg::Document::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp | std::unique_ptr<Document> Document::loadFromFile(const std::string& filename)
{
std::ifstream fs;
fs.open(filename);
if(!fs.is_open())
return nullptr;
std::string content;
std::getline(fs, content, '\0');
fs.close();
return loadFromData(content);
} | O0 | cpp | lunasvg::Document::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp # imm = 0x270
movq %rdi, -0x260(%rbp)
movq %rdi, %rax
movq %rax, -0x258(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0xb440
movq -0x250(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0xb310
jmp 0xdd3e
leaq -0x218(%rbp), %rdi
callq 0xb620
movb %al, -0x261(%rbp)
jmp 0xdd52
movb -0x261(%rbp), %al
testb $0x1, %al
jne 0xdd94
jmp 0xdd5e
movq -0x260(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xeb30
movl $0x1, -0x228(%rbp)
jmp 0xde19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0xde35
leaq -0x248(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0xb520
movq -0x270(%rbp), %rsi
leaq -0x218(%rbp), %rdi
xorl %edx, %edx
callq 0xb720
jmp 0xddbe
leaq -0x218(%rbp), %rdi
callq 0xb0b0
jmp 0xddcc
movq -0x260(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xde50
jmp 0xdde1
movl $0x1, -0x228(%rbp)
leaq -0x248(%rbp), %rdi
callq 0xb7a8
jmp 0xde19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x248(%rbp), %rdi
callq 0xb7a8
jmp 0xde35
leaq -0x218(%rbp), %rdi
callq 0xb0e0
movq -0x258(%rbp), %rax
addq $0x270, %rsp # imm = 0x270
popq %rbp
retq
leaq -0x218(%rbp), %rdi
callq 0xb0e0
movq -0x220(%rbp), %rdi
callq 0xb6c0
nopl (%rax)
| _ZN7lunasvg8Document12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 270h
mov [rbp+var_260], rdi
mov rax, rdi
mov [rbp+var_258], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_218]
mov [rbp+var_250], rdi
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev; std::ifstream::basic_ifstream(void)
mov rdi, [rbp+var_250]
mov rsi, [rbp+var_10]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::open(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_DD3E:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rbp+var_261], al
jmp short $+2
loc_DD52:
mov al, [rbp+var_261]
test al, 1
jnz short loc_DD94
jmp short $+2
loc_DD5E:
mov rdi, [rbp+var_260]
xor eax, eax
mov esi, eax
call _ZNSt10unique_ptrIN7lunasvg8DocumentESt14default_deleteIS1_EEC2IS3_vEEDn; std::unique_ptr<lunasvg::Document>::unique_ptr<std::default_delete<lunasvg::Document>,void>(decltype(nullptr))
mov [rbp+var_228], 1
jmp loc_DE19
mov rcx, rax
mov eax, edx
mov [rbp+var_220], rcx
mov [rbp+var_224], eax
jmp loc_DE35
loc_DD94:
lea rdi, [rbp+var_248]
mov [rbp+var_270], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rsi, [rbp+var_270]
lea rdi, [rbp+var_218]
xor edx, edx
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
jmp short $+2
loc_DDBE:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
jmp short $+2
loc_DDCC:
mov rdi, [rbp+var_260]
lea rsi, [rbp+var_248]
call _ZN7lunasvg8Document12loadFromDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; lunasvg::Document::loadFromData(std::string const&)
jmp short $+2
loc_DDE1:
mov [rbp+var_228], 1
lea rdi, [rbp+var_248]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_DE19
mov rcx, rax
mov eax, edx
mov [rbp+var_220], rcx
mov [rbp+var_224], eax
lea rdi, [rbp+var_248]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_DE35
loc_DE19:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rax, [rbp+var_258]
add rsp, 270h
pop rbp
retn
loc_DE35:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, [rbp+var_220]
call __Unwind_Resume
| long long lunasvg::Document::loadFromFile(long long a1, long long a2)
{
_BYTE v3[32]; // [rsp+28h] [rbp-248h] BYREF
int v4; // [rsp+48h] [rbp-228h]
_BYTE v5[520]; // [rsp+58h] [rbp-218h] BYREF
long long v6; // [rsp+260h] [rbp-10h]
long long v7; // [rsp+268h] [rbp-8h]
v7 = a1;
v6 = a2;
std::ifstream::basic_ifstream();
std::ifstream::open(v5, v6, 8LL);
if ( (std::ifstream::is_open(v5) & 1) != 0 )
{
std::string::basic_string(v3);
std::getline<char,std::char_traits<char>,std::allocator<char>>(v5, v3, 0LL);
std::ifstream::close(v5);
lunasvg::Document::loadFromData(a1, v3);
v4 = 1;
std::string::~string(v3);
}
else
{
std::unique_ptr<lunasvg::Document>::unique_ptr<std::default_delete<lunasvg::Document>,void>(a1, 0LL);
v4 = 1;
}
std::ifstream::~ifstream(v5);
return a1;
}
| loadFromFile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x270
MOV qword ptr [RBP + -0x260],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x258],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x218]
MOV qword ptr [RBP + -0x250],RDI
CALL 0x0010b440
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,qword ptr [RBP + -0x10]
LAB_0010dd32:
MOV EDX,0x8
CALL 0x0010b310
JMP 0x0010dd3e
LAB_0010dd3e:
LEA RDI,[RBP + -0x218]
CALL 0x0010b620
MOV byte ptr [RBP + -0x261],AL
JMP 0x0010dd52
LAB_0010dd52:
MOV AL,byte ptr [RBP + -0x261]
TEST AL,0x1
JNZ 0x0010dd94
JMP 0x0010dd5e
LAB_0010dd5e:
MOV RDI,qword ptr [RBP + -0x260]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010eb30
MOV dword ptr [RBP + -0x228],0x1
JMP 0x0010de19
LAB_0010dd94:
LEA RDI,[RBP + -0x248]
MOV qword ptr [RBP + -0x270],RDI
CALL 0x0010b520
MOV RSI,qword ptr [RBP + -0x270]
LAB_0010ddae:
LEA RDI,[RBP + -0x218]
XOR EDX,EDX
CALL 0x0010b720
JMP 0x0010ddbe
LAB_0010ddbe:
LEA RDI,[RBP + -0x218]
CALL 0x0010b0b0
JMP 0x0010ddcc
LAB_0010ddcc:
MOV RDI,qword ptr [RBP + -0x260]
LEA RSI,[RBP + -0x248]
CALL 0x0010de50
LAB_0010dddf:
JMP 0x0010dde1
LAB_0010dde1:
MOV dword ptr [RBP + -0x228],0x1
LEA RDI,[RBP + -0x248]
CALL 0x0010b7a8
JMP 0x0010de19
LAB_0010de19:
LEA RDI,[RBP + -0x218]
CALL 0x0010b0e0
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x270
POP RBP
RET
|
/* lunasvg::Document::loadFromFile(std::__cxx11::string const&) */
Document * __thiscall lunasvg::Document::loadFromFile(Document *this,string *param_1)
{
byte bVar1;
string local_250 [32];
int4 local_230;
ifstream local_220 [520];
string *local_18;
Document *local_10;
local_18 = param_1;
local_10 = this;
std::ifstream::ifstream(local_220);
/* try { // try from 0010dd32 to 0010dd49 has its CatchHandler @ 0010dd7d */
std::ifstream::open(local_220,local_18,8);
bVar1 = std::ifstream::is_open();
if ((bVar1 & 1) == 0) {
std::unique_ptr<lunasvg::Document,std::default_delete<lunasvg::Document>>::
unique_ptr<std::default_delete<lunasvg::Document>,void>((_func_decltype_nullptr *)this);
local_230 = 1;
}
else {
std::__cxx11::string::string(local_250);
/* try { // try from 0010ddae to 0010ddde has its CatchHandler @ 0010ddf9 */
std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_220,local_250,'\0');
std::ifstream::close();
loadFromData((string *)this);
local_230 = 1;
std::__cxx11::string::~string(local_250);
}
std::ifstream::~ifstream(local_220);
return this;
}
|
|
641 | insert_dynamic | eloqsql/mysys/array.c | my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element)
{
void *buffer;
if (array->elements == array->max_element)
{ /* Call only when necessary */
if (!(buffer=alloc_dynamic(array)))
return TRUE;
}
else
{
buffer=array->buffer+(array->elements * array->size_of_element);
array->elements++;
}
memcpy(buffer,element,(size_t) array->size_of_element);
return FALSE;
} | O3 | c | insert_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %ecx
cmpl 0xc(%rdi), %ecx
jne 0x91a51
movq %r14, %rdi
callq 0x91a78
testq %rax, %rax
je 0x91a74
movq %rax, %rdi
movl 0x14(%r14), %eax
jmp 0x91a63
movl 0x14(%r14), %eax
movl %eax, %edi
imull %ecx, %edi
addq (%r14), %rdi
incl %ecx
movl %ecx, 0x8(%r14)
movl %eax, %edx
movq %rbx, %rsi
callq 0x29080
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
jmp 0x91a6f
| insert_dynamic:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov ecx, [rdi+8]
cmp ecx, [rdi+0Ch]
jnz short loc_91A51
mov rdi, r14
call alloc_dynamic
test rax, rax
jz short loc_91A74
mov rdi, rax
mov eax, [r14+14h]
jmp short loc_91A63
loc_91A51:
mov eax, [r14+14h]
mov edi, eax
imul edi, ecx
add rdi, [r14]
inc ecx
mov [r14+8], ecx
loc_91A63:
mov edx, eax
mov rsi, rbx
call _memcpy
xor eax, eax
loc_91A6F:
pop rbx
pop r14
pop rbp
retn
loc_91A74:
mov al, 1
jmp short loc_91A6F
| long long insert_dynamic(long long a1, long long a2)
{
int v3; // ecx
long long v4; // rax
long long v5; // rdi
unsigned int v6; // eax
v3 = *(_DWORD *)(a1 + 8);
if ( v3 != *(_DWORD *)(a1 + 12) )
{
v6 = *(_DWORD *)(a1 + 20);
v5 = *(_QWORD *)a1 + v3 * v6;
*(_DWORD *)(a1 + 8) = v3 + 1;
goto LABEL_5;
}
v4 = alloc_dynamic(a1);
if ( v4 )
{
v5 = v4;
v6 = *(_DWORD *)(a1 + 20);
LABEL_5:
memcpy(v5, a2, v6);
return 0LL;
}
return 1LL;
}
| insert_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ECX,dword ptr [RDI + 0x8]
CMP ECX,dword ptr [RDI + 0xc]
JNZ 0x00191a51
MOV RDI,R14
CALL 0x00191a78
TEST RAX,RAX
JZ 0x00191a74
MOV RDI,RAX
MOV EAX,dword ptr [R14 + 0x14]
JMP 0x00191a63
LAB_00191a51:
MOV EAX,dword ptr [R14 + 0x14]
MOV EDI,EAX
IMUL EDI,ECX
ADD RDI,qword ptr [R14]
INC ECX
MOV dword ptr [R14 + 0x8],ECX
LAB_00191a63:
MOV EDX,EAX
MOV RSI,RBX
CALL 0x00129080
XOR EAX,EAX
LAB_00191a6f:
POP RBX
POP R14
POP RBP
RET
LAB_00191a74:
MOV AL,0x1
JMP 0x00191a6f
|
int8 insert_dynamic(long *param_1,void *param_2)
{
int iVar1;
uint uVar2;
void *__dest;
iVar1 = (int)param_1[1];
if (iVar1 == *(int *)((long)param_1 + 0xc)) {
__dest = (void *)alloc_dynamic(param_1);
if (__dest == (void *)0x0) {
return 1;
}
uVar2 = *(uint *)((long)param_1 + 0x14);
}
else {
uVar2 = *(uint *)((long)param_1 + 0x14);
__dest = (void *)((ulong)(uVar2 * iVar1) + *param_1);
*(int *)(param_1 + 1) = iVar1 + 1;
}
memcpy(__dest,param_2,(ulong)uVar2);
return 0;
}
|
|
642 | ma_store_blob_length | eloqsql/storage/maria/ma_dynrec.c | void _ma_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O0 | c | ma_store_blob_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x4103a
movq -0x28(%rbp), %rax
leaq 0x11910f(%rip), %rcx # 0x15a0d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
jmp 0x4103c
jmp 0x40fe1
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0x4103c
jmp 0x40ffa
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x4103c
jmp 0x41027
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4103a
jmp 0x4103c
popq %rbp
retq
nop
| _ma_store_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 3
ja short def_40FD0; jumptable 0000000000040FD0 default case
mov rax, [rbp+var_28]
lea rcx, jpt_40FD0
movsxd rax, ds:(jpt_40FD0 - 15A0D8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_40FD2:
mov eax, [rbp+var_10]; jumptable 0000000000040FD0 case 1
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
jmp short loc_4103C
loc_40FDF:
jmp short $+2; jumptable 0000000000040FD0 case 2
loc_40FE1:
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov eax, [rbp+var_10]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax], cx
jmp short loc_4103C
loc_40FF8:
jmp short $+2; jumptable 0000000000040FD0 case 3
loc_40FFA:
mov eax, [rbp+var_10]
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
mov eax, [rbp+var_10]
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov [rax+1], cl
mov eax, [rbp+var_10]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_8]
mov [rax+2], cl
jmp short loc_4103C
loc_41025:
jmp short $+2; jumptable 0000000000040FD0 case 4
loc_41027:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov ecx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], ecx
jmp short $+2; jumptable 0000000000040FD0 default case
def_40FD0:
jmp short $+2; jumptable 0000000000040FD0 default case
loc_4103C:
pop rbp
retn
| unsigned long long ma_store_blob_length(_BYTE *a1, int a2, int a3)
{
unsigned long long result; // rax
result = (unsigned int)(a2 - 1);
switch ( a2 )
{
case 1:
result = (unsigned long long)a1;
*a1 = a3;
break;
case 2:
result = (unsigned long long)a1;
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
result = (unsigned long long)a1;
a1[2] = BYTE2(a3);
break;
case 4:
result = (unsigned long long)a1;
*(_DWORD *)a1 = a3;
break;
default:
return result;
}
return result;
}
| _ma_store_blob_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x3
JA 0x0014103a
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x25a0d8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
JMP 0x0014103c
caseD_2:
JMP 0x00140fe1
LAB_00140fe1:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],CX
JMP 0x0014103c
caseD_3:
JMP 0x00140ffa
LAB_00140ffa:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],CL
JMP 0x0014103c
caseD_4:
JMP 0x00141027
LAB_00141027:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
JMP 0x0014103a
LAB_0014103a:
JMP 0x0014103c
default:
POP RBP
RET
|
void _ma_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
|
|
643 | ma_store_blob_length | eloqsql/storage/maria/ma_dynrec.c | void _ma_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O3 | c | ma_store_blob_length:
pushq %rbp
movq %rsp, %rbp
decl %esi
cmpl $0x3, %esi
ja 0x3f681
leaq 0xa2eac(%rip), %rax # 0xe250c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb %dl, (%rdi)
jmp 0x3f681
movb %dl, (%rdi)
movb %dh, 0x1(%rdi)
shrl $0x10, %edx
movb %dl, 0x2(%rdi)
jmp 0x3f681
movl %edx, (%rdi)
jmp 0x3f681
movw %dx, (%rdi)
popq %rbp
retq
| _ma_store_blob_length:
push rbp
mov rbp, rsp
dec esi; switch 4 cases
cmp esi, 3
ja short def_3F667; jumptable 000000000003F667 default case
lea rax, jpt_3F667
movsxd rcx, ds:(jpt_3F667 - 0E250Ch)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_3F669:
mov [rdi], dl; jumptable 000000000003F667 case 1
jmp short def_3F667; jumptable 000000000003F667 default case
loc_3F66D:
mov [rdi], dl; jumptable 000000000003F667 case 3
mov [rdi+1], dh
shr edx, 10h
mov [rdi+2], dl
jmp short def_3F667; jumptable 000000000003F667 default case
loc_3F67A:
mov [rdi], edx; jumptable 000000000003F667 case 4
jmp short def_3F667; jumptable 000000000003F667 default case
loc_3F67E:
mov [rdi], dx; jumptable 000000000003F667 case 2
def_3F667:
pop rbp; jumptable 000000000003F667 default case
retn
| void ma_store_blob_length(_BYTE *a1, int a2, int a3)
{
switch ( a2 )
{
case 1:
*a1 = a3;
break;
case 2:
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
a1[2] = BYTE2(a3);
break;
case 4:
*(_DWORD *)a1 = a3;
break;
default:
return;
}
}
| _ma_store_blob_length:
PUSH RBP
MOV RBP,RSP
DEC ESI
CMP ESI,0x3
JA 0x0013f681
LEA RAX,[0x1e250c]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOV byte ptr [RDI],DL
JMP 0x0013f681
caseD_3:
MOV byte ptr [RDI],DL
MOV byte ptr [RDI + 0x1],DH
SHR EDX,0x10
MOV byte ptr [RDI + 0x2],DL
JMP 0x0013f681
caseD_4:
MOV dword ptr [RDI],EDX
JMP 0x0013f681
caseD_2:
MOV word ptr [RDI],DX
default:
POP RBP
RET
|
void _ma_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
|
|
644 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom() | monkey531[P]llama/common/json.hpp | bool skip_bom()
{
if (get() == 0xEF)
{
// check if we completely parse the BOM
return get() == 0xBB && get() == 0xBF;
}
// the first character is not the beginning of the BOM; unget it to
// process is later
unget();
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom():
pushq %rbx
movq %rdi, %rbx
callq 0x1c1fc
cmpl $0xef, %eax
je 0x58dc2
movq %rbx, %rdi
callq 0x596b8
movb $0x1, %al
popq %rbx
retq
movq %rbx, %rdi
callq 0x1c1fc
cmpl $0xbb, %eax
je 0x58dd5
xorl %eax, %eax
jmp 0x58dc0
movq %rbx, %rdi
callq 0x1c1fc
cmpl $0xbf, %eax
sete %al
jmp 0x58dc0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv:
push rbx
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0EFh
jz short loc_58DC2
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov al, 1
loc_58DC0:
pop rbx
retn
loc_58DC2:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BBh
jz short loc_58DD5
xor eax, eax
jmp short loc_58DC0
loc_58DD5:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BFh
setz al
jmp short loc_58DC0
| bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(
__m128i *a1)
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 239 )
return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187
&& (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
return 1;
}
| skip_bom:
PUSH RBX
MOV RBX,RDI
CALL 0x0011c1fc
CMP EAX,0xef
JZ 0x00158dc2
MOV RDI,RBX
CALL 0x001596b8
MOV AL,0x1
LAB_00158dc0:
POP RBX
RET
LAB_00158dc2:
MOV RDI,RBX
CALL 0x0011c1fc
CMP EAX,0xbb
JZ 0x00158dd5
XOR EAX,EAX
JMP 0x00158dc0
LAB_00158dd5:
MOV RDI,RBX
CALL 0x0011c1fc
CMP EAX,0xbf
SETZ AL
JMP 0x00158dc0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::skip_bom() */
bool __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
bool bVar2;
iVar1 = get(this);
if (iVar1 == 0xef) {
iVar1 = get(this);
if (iVar1 == 0xbb) {
iVar1 = get(this);
bVar2 = iVar1 == 0xbf;
}
else {
bVar2 = false;
}
}
else {
unget(this);
bVar2 = true;
}
return bVar2;
}
|
|
645 | fmt::v10::detail::compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h | constexpr auto size() const noexcept -> size_t { return size_; } | O3 | c | fmt::v10::detail::compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&):
movq 0x10(%rdi), %r8
movl 0xa0(%rdi), %eax
addl %r8d, %eax
movl 0x10(%rsi), %ecx
movl 0xa0(%rsi), %edx
addl %ecx, %edx
cmpl %edx, %eax
jne 0x9225b
movl %r8d, %edx
subl %ecx, %r8d
xorl %eax, %eax
testl %r8d, %r8d
cmovgl %r8d, %eax
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
cmpl %edx, %eax
jge 0x92263
decl %ecx
movl -0x4(%rdi,%rdx,4), %r8d
decq %rdx
movl (%rsi,%rcx,4), %r9d
cmpl %r9d, %r8d
je 0x92238
xorl %eax, %eax
cmpl %r8d, %r9d
adcl $-0x1, %eax
orl $0x1, %eax
retq
setg %al
movzbl %al, %eax
jmp 0x92270
xorl %eax, %eax
cmpl %edx, %ecx
je 0x92277
xorl %eax, %eax
cmpl %edx, %ecx
setl %al
leal -0x1(,%rax,2), %eax
retq
| _ZN3fmt3v106detail7compareERKNS1_6bigintES4_:
mov r8, [rdi+10h]
mov eax, [rdi+0A0h]
add eax, r8d
mov ecx, [rsi+10h]
mov edx, [rsi+0A0h]
add edx, ecx
cmp eax, edx
jnz short loc_9225B
mov edx, r8d
sub r8d, ecx
xor eax, eax
test r8d, r8d
cmovg eax, r8d
mov rdi, [rdi+8]
mov rsi, [rsi+8]
loc_92238:
cmp eax, edx
jge short loc_92263
dec ecx
mov r8d, [rdi+rdx*4-4]
dec rdx
mov r9d, [rsi+rcx*4]
cmp r8d, r9d
jz short loc_92238
xor eax, eax
cmp r9d, r8d
adc eax, 0FFFFFFFFh
or eax, 1
retn
loc_9225B:
setnle al
movzx eax, al
jmp short loc_92270
loc_92263:
xor eax, eax
cmp ecx, edx
jz short locret_92277
xor eax, eax
cmp ecx, edx
setl al
loc_92270:
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
locret_92277:
retn
| long long fmt::v10::detail::compare(
fmt::v10::detail *this,
const fmt::v10::detail::bigint *a2,
const fmt::v10::detail::bigint *a3)
{
long long v3; // r8
int v4; // eax
long long v5; // rcx
int v6; // edx
long long v7; // rdx
int v8; // r8d
int v9; // eax
long long v10; // rdi
long long v11; // rsi
unsigned int v12; // r8d
unsigned int v13; // r9d
long long result; // rax
BOOL v15; // eax
v3 = *((_QWORD *)this + 2);
v4 = v3 + *((_DWORD *)this + 40);
LODWORD(v5) = *((_DWORD *)a2 + 4);
v6 = v5 + *((_DWORD *)a2 + 40);
if ( v4 != v6 )
{
v15 = v4 > v6;
return (unsigned int)(2 * v15 - 1);
}
v7 = (unsigned int)v3;
v8 = v3 - v5;
v9 = 0;
if ( v8 > 0 )
v9 = v8;
v10 = *((_QWORD *)this + 1);
v11 = *((_QWORD *)a2 + 1);
while ( v9 < (int)v7 )
{
v5 = (unsigned int)(v5 - 1);
v12 = *(_DWORD *)(v10 + 4 * v7-- - 4);
v13 = *(_DWORD *)(v11 + 4 * v5);
if ( v12 != v13 )
return v13 < v12 ? 1 : -1;
}
result = 0LL;
if ( (_DWORD)v5 != (_DWORD)v7 )
{
v15 = (int)v5 < (int)v7;
return (unsigned int)(2 * v15 - 1);
}
return result;
}
| compare:
MOV R8,qword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0xa0]
ADD EAX,R8D
MOV ECX,dword ptr [RSI + 0x10]
MOV EDX,dword ptr [RSI + 0xa0]
ADD EDX,ECX
CMP EAX,EDX
JNZ 0x0019225b
MOV EDX,R8D
SUB R8D,ECX
XOR EAX,EAX
TEST R8D,R8D
CMOVG EAX,R8D
MOV RDI,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RSI + 0x8]
LAB_00192238:
CMP EAX,EDX
JGE 0x00192263
DEC ECX
MOV R8D,dword ptr [RDI + RDX*0x4 + -0x4]
DEC RDX
MOV R9D,dword ptr [RSI + RCX*0x4]
CMP R8D,R9D
JZ 0x00192238
XOR EAX,EAX
CMP R9D,R8D
ADC EAX,-0x1
OR EAX,0x1
RET
LAB_0019225b:
SETG AL
MOVZX EAX,AL
JMP 0x00192270
LAB_00192263:
XOR EAX,EAX
CMP ECX,EDX
JZ 0x00192277
XOR EAX,EAX
CMP ECX,EDX
SETL AL
LAB_00192270:
LEA EAX,[-0x1 + RAX*0x2]
LAB_00192277:
RET
|
/* fmt::v10::detail::compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&) */
uint fmt::v10::detail::compare(bigint *param_1,bigint *param_2)
{
uint uVar1;
uint uVar2;
bool bVar3;
int iVar4;
ulong uVar5;
int iVar6;
ulong uVar7;
int iVar8;
iVar8 = (int)*(ulong *)(param_1 + 0x10);
iVar4 = *(int *)(param_1 + 0xa0) + iVar8;
uVar1 = *(uint *)(param_2 + 0x10);
uVar5 = (ulong)uVar1;
if (iVar4 == *(int *)(param_2 + 0xa0) + uVar1) {
uVar7 = *(ulong *)(param_1 + 0x10) & 0xffffffff;
iVar8 = iVar8 - uVar1;
iVar4 = 0;
if (0 < iVar8) {
iVar4 = iVar8;
}
while( true ) {
iVar6 = (int)uVar7;
iVar8 = (int)uVar5;
if (iVar6 <= iVar4) break;
uVar5 = (ulong)(iVar8 - 1);
uVar1 = *(uint *)(*(long *)(param_1 + 8) + -4 + uVar7 * 4);
uVar7 = uVar7 - 1;
uVar2 = *(uint *)(*(long *)(param_2 + 8) + uVar5 * 4);
if (uVar1 != uVar2) {
return (uVar2 < uVar1) - 1 | 1;
}
}
if (iVar8 == iVar6) {
return 0;
}
bVar3 = iVar8 < iVar6;
}
else {
bVar3 = (int)(*(int *)(param_2 + 0xa0) + uVar1) < iVar4;
}
return (uint)bVar3 * 2 - 1;
}
|
|
646 | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block*) | angrymouse[P]emittra/include/concurrentqueue.h | inline void add(N* node)
{
#ifdef MCDBGQ_NOLOCKFREE_FREELIST
debug::DebugLock lock(mutex);
#endif
// We know that the should-be-on-freelist bit is 0 at this point, so it's safe to
// set it using a fetch_add
if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) {
// Oh look! We were the last ones referencing this node, and we know
// we want to add it to the free list, so let's do it!
add_knowing_refcount_is_zero(node);
}
} | O2 | c | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block*):
movl $0x80000000, %eax # imm = 0x80000000
lock
xaddl %eax, 0x530(%rsi)
testl %eax, %eax
je 0x7316
retq
| _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE8FreeListINS5_5BlockEE3addEPS7_:
mov eax, 80000000h
lock xadd [rsi+530h], eax
test eax, eax
jz _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE8FreeListINS5_5BlockEE28add_knowing_refcount_is_zeroEPS7_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>::add_knowing_refcount_is_zero(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block*)
retn
| long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(
long long a1,
long long a2)
{
long long result; // rax
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(a2 + 1328), 0x80000000);
if ( !(_DWORD)result )
return moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>::add_knowing_refcount_is_zero();
return result;
}
| add:
MOV EAX,0x80000000
XADD.LOCK dword ptr [RSI + 0x530],EAX
TEST EAX,EAX
JZ 0x00107316
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::Block*) */
void __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::
FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
::add(FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
*this,Block *param_1)
{
Block *pBVar1;
int iVar2;
long lVar3;
long lVar4;
bool bVar5;
LOCK();
pBVar1 = param_1 + 0x530;
iVar2 = *(int *)pBVar1;
*(int *)pBVar1 = *(int *)pBVar1 + -0x80000000;
UNLOCK();
if (iVar2 != 0) {
return;
}
lVar3 = *(long *)this;
while( true ) {
*(long *)(param_1 + 0x538) = lVar3;
*(int4 *)(param_1 + 0x530) = 1;
LOCK();
lVar4 = *(long *)this;
bVar5 = lVar3 == lVar4;
if (bVar5) {
*(Block **)this = param_1;
lVar4 = lVar3;
}
UNLOCK();
if (bVar5) break;
LOCK();
pBVar1 = param_1 + 0x530;
iVar2 = *(int *)pBVar1;
*(int *)pBVar1 = *(int *)pBVar1 + 0x7fffffff;
UNLOCK();
lVar3 = lVar4;
if (iVar2 != 1) {
return;
}
}
return;
}
|
|
647 | ft_outline_cubic_to | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-rasterize.c | static void ft_outline_cubic_to(PVG_FT_Outline* ft, float x1, float y1, float x2, float y2, float x3, float y3)
{
ft->points[ft->n_points].x = FT_COORD(x1);
ft->points[ft->n_points].y = FT_COORD(y1);
ft->tags[ft->n_points] = PVG_FT_CURVE_TAG_CUBIC;
ft->n_points++;
ft->points[ft->n_points].x = FT_COORD(x2);
ft->points[ft->n_points].y = FT_COORD(y2);
ft->tags[ft->n_points] = PVG_FT_CURVE_TAG_CUBIC;
ft->n_points++;
ft->points[ft->n_points].x = FT_COORD(x3);
ft->points[ft->n_points].y = FT_COORD(y3);
ft->tags[ft->n_points] = PVG_FT_CURVE_TAG_ON;
ft->n_points++;
} | O0 | c | ft_outline_cubic_to:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movss %xmm3, -0x18(%rbp)
movss %xmm4, -0x1c(%rbp)
movss %xmm5, -0x20(%rbp)
movss 0x29c0a(%rip), %xmm0 # 0x8e828
mulss -0xc(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movss 0x29bde(%rip), %xmm0 # 0x8e828
mulss -0x10(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x2, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movss 0x29b90(%rip), %xmm0 # 0x8e828
mulss -0x14(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movss 0x29b64(%rip), %xmm0 # 0x8e828
mulss -0x18(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x2, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movss 0x29b16(%rip), %xmm0 # 0x8e828
mulss -0x1c(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movss 0x29aea(%rip), %xmm0 # 0x8e828
mulss -0x20(%rbp), %xmm0
cvttss2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ft_outline_cubic_to:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
movss [rbp+var_C], xmm0
movss [rbp+var_10], xmm1
movss [rbp+var_14], xmm2
movss [rbp+var_18], xmm3
movss [rbp+var_1C], xmm4
movss [rbp+var_20], xmm5
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_C]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax], rcx
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_10]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+4]
mov byte ptr [rax+rcx], 2
mov rax, [rbp+var_8]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_14]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax], rcx
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_18]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+4]
mov byte ptr [rax+rcx], 2
mov rax, [rbp+var_8]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_1C]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax], rcx
movss xmm0, cs:dword_8E828
mulss xmm0, [rbp+var_20]
cvttss2si rcx, xmm0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rdx, [rbp+var_8]
movsxd rdx, dword ptr [rdx+4]
shl rdx, 4
add rax, rdx
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+4]
mov byte ptr [rax+rcx], 1
mov rax, [rbp+var_8]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
pop rbp
retn
| long long ft_outline_cubic_to(long long a1, float a2, float a3, float a4, float a5, float a6, float a7)
{
long long result; // rax
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8)) = (unsigned int)(int)(float)(64.0 * a2);
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8) + 8) = (unsigned int)(int)(float)(64.0 * a3);
*(_BYTE *)(*(_QWORD *)(a1 + 16) + (int)(*(_DWORD *)(a1 + 4))++) = 2;
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8)) = (unsigned int)(int)(float)(64.0 * a4);
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8) + 8) = (unsigned int)(int)(float)(64.0 * a5);
*(_BYTE *)(*(_QWORD *)(a1 + 16) + (int)(*(_DWORD *)(a1 + 4))++) = 2;
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8)) = (unsigned int)(int)(float)(64.0 * a6);
*(_QWORD *)(16LL * *(int *)(a1 + 4) + *(_QWORD *)(a1 + 8) + 8) = (unsigned int)(int)(float)(64.0 * a7);
*(_BYTE *)(*(_QWORD *)(a1 + 16) + *(int *)(a1 + 4)) = 1;
result = a1;
++*(_DWORD *)(a1 + 4);
return result;
}
| ft_outline_cubic_to:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOVSS dword ptr [RBP + -0xc],XMM0
MOVSS dword ptr [RBP + -0x10],XMM1
MOVSS dword ptr [RBP + -0x14],XMM2
MOVSS dword ptr [RBP + -0x18],XMM3
MOVSS dword ptr [RBP + -0x1c],XMM4
MOVSS dword ptr [RBP + -0x20],XMM5
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0xc]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0x10]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x4]
MOV byte ptr [RAX + RCX*0x1],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0x14]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0x18]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x4]
MOV byte ptr [RAX + RCX*0x1],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0x1c]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
MOVSS XMM0,dword ptr [0x0018e828]
MULSS XMM0,dword ptr [RBP + -0x20]
CVTTSS2SI RCX,XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x4]
MOV byte ptr [RAX + RCX*0x1],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
POP RBP
RET
|
void ft_outline_cubic_to(float param_1,float param_2,float param_3,float param_4,float param_5,
float param_6,long param_7)
{
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10) =
(long)(DAT_0018e828 * param_1);
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10 + 8) =
(long)(DAT_0018e828 * param_2);
*(int1 *)(*(long *)(param_7 + 0x10) + (long)*(int *)(param_7 + 4)) = 2;
*(int *)(param_7 + 4) = *(int *)(param_7 + 4) + 1;
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10) =
(long)(DAT_0018e828 * param_3);
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10 + 8) =
(long)(DAT_0018e828 * param_4);
*(int1 *)(*(long *)(param_7 + 0x10) + (long)*(int *)(param_7 + 4)) = 2;
*(int *)(param_7 + 4) = *(int *)(param_7 + 4) + 1;
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10) =
(long)(DAT_0018e828 * param_5);
*(long *)(*(long *)(param_7 + 8) + (long)*(int *)(param_7 + 4) * 0x10 + 8) =
(long)(DAT_0018e828 * param_6);
*(int1 *)(*(long *)(param_7 + 0x10) + (long)*(int *)(param_7 + 4)) = 1;
*(int *)(param_7 + 4) = *(int *)(param_7 + 4) + 1;
return;
}
|
|
648 | ma_get_hash_keyval | eloqsql/libmariadb/libmariadb/mariadb_lib.c | uchar *ma_get_hash_keyval(const uchar *hash_entry,
unsigned int *length,
my_bool not_used __attribute__((unused)))
{
/* Hash entry has the following format:
Offset: 0 key (\0 terminated)
key_length + 1 value (\0 terminated)
*/
uchar *p= (uchar *)hash_entry;
size_t len= strlen((char *)p);
*length= (unsigned int)len;
return p;
} | O0 | c | ma_get_hash_keyval:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x131a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| ma_get_hash_keyval:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _strlen
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long ma_get_hash_keyval(long long a1, _DWORD *a2)
{
*a2 = strlen(a1);
return a1;
}
| ma_get_hash_keyval:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001131a0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
char * ma_get_hash_keyval(char *param_1,int4 *param_2)
{
size_t sVar1;
sVar1 = strlen(param_1);
*param_2 = (int)sVar1;
return param_1;
}
|
|
649 | 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();
} | O2 | cpp | common_log::set_colors(bool):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x75338
testl %ebp, %ebp
je 0x75719
movq 0x62a56(%rip), %rax # 0xd80f8
leaq 0x24cd6(%rip), %rcx # 0x9a37f
movq %rcx, (%rax)
movq 0x62a45(%rip), %rax # 0xd80f8
leaq 0x24cca(%rip), %rcx # 0x9a384
movq %rcx, 0x8(%rax)
leaq 0x24cc4(%rip), %rcx # 0x9a389
movq %rcx, 0x10(%rax)
leaq 0x24cbf(%rip), %rcx # 0x9a38f
movq %rcx, 0x18(%rax)
leaq 0x24cba(%rip), %rcx # 0x9a395
movq %rcx, 0x20(%rax)
leaq 0x24cb5(%rip), %rcx # 0x9a39b
movq %rcx, 0x28(%rax)
leaq 0x24cb0(%rip), %rcx # 0x9a3a1
movq %rcx, 0x30(%rax)
leaq 0x24cab(%rip), %rcx # 0x9a3a7
movq %rcx, 0x38(%rax)
leaq 0x24ca6(%rip), %rcx # 0x9a3ad
movq %rcx, 0x40(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x753ae
xorl %eax, %eax
leaq 0x1b9cc(%rip), %rcx # 0x910ee
movq 0x629d7(%rip), %rsi # 0xd8100
movq 0x629c8(%rip), %rdx # 0xd80f8
subq %rdx, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rax
jae 0x7570b
movq %rcx, (%rdx,%rax,8)
incq %rax
jmp 0x75722
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_75719
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
loc_7570B:
mov rdi, rbx; this
add rsp, 8
pop rbx
pop rbp
jmp _ZN10common_log6resumeEv; common_log::resume(void)
loc_75719:
xor eax, eax
lea rcx, aSUnableToOpenT+2Bh; ""
loc_75722:
mov rsi, cs:qword_D8100
mov rdx, cs:_ZL5g_col; g_col
sub rsi, rdx
sar rsi, 3
cmp rax, rsi
jnb short loc_7570B
mov [rdx+rax*8], rcx
inc rax
jmp short loc_75722
| long long common_log::set_colors(common_log *this, int a2)
{
_QWORD *v2; // rax
unsigned long long i; // rax
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
{
for ( i = 0LL; i < (qword_D8100 - g_col) >> 3; ++i )
*(_QWORD *)(g_col + 8 * i) = "";
}
return common_log::resume(this);
}
| set_colors:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00175338
TEST EBP,EBP
JZ 0x00175719
MOV RAX,qword ptr [0x001d80f8]
LEA RCX,[0x19a37f]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [0x001d80f8]
LEA RCX,[0x19a384]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x19a389]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[0x19a38f]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x19a395]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[0x19a39b]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[0x19a3a1]
MOV qword ptr [RAX + 0x30],RCX
LEA RCX,[0x19a3a7]
MOV qword ptr [RAX + 0x38],RCX
LEA RCX,[0x19a3ad]
MOV qword ptr [RAX + 0x40],RCX
LAB_0017570b:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001753ae
LAB_00175719:
XOR EAX,EAX
LEA RCX,[0x1910ee]
LAB_00175722:
MOV RSI,qword ptr [0x001d8100]
MOV RDX,qword ptr [0x001d80f8]
SUB RSI,RDX
SAR RSI,0x3
CMP RAX,RSI
JNC 0x0017570b
MOV qword ptr [RDX + RAX*0x8],RCX
INC RAX
JMP 0x00175722
|
/* 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) {
for (uVar2 = 0; uVar2 < (ulong)(DAT_001d8100 - (long)g_col >> 3); uVar2 = uVar2 + 1) {
g_col[uVar2] = "";
}
}
else {
*g_col = &DAT_0019a37f;
puVar1 = g_col;
g_col[1] = &DAT_0019a384;
puVar1[2] = &DAT_0019a389;
puVar1[3] = &DAT_0019a38f;
puVar1[4] = &DAT_0019a395;
puVar1[5] = &DAT_0019a39b;
puVar1[6] = &DAT_0019a3a1;
puVar1[7] = &DAT_0019a3a7;
puVar1[8] = &DAT_0019a3ad;
}
resume(this);
return;
}
|
|
650 | 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 0x844b8
testl %ebp, %ebp
je 0x84977
movq 0x5f7cc(%rip), %rax # 0xe40d8
leaq 0x30a6c(%rip), %rcx # 0xb537f
movq %rcx, (%rax)
movq 0x5f7bb(%rip), %rax # 0xe40d8
leaq 0x30a60(%rip), %rcx # 0xb5384
movq %rcx, 0x8(%rax)
leaq 0x30a5a(%rip), %rcx # 0xb5389
movq %rcx, 0x10(%rax)
leaq 0x30a55(%rip), %rcx # 0xb538f
movq %rcx, 0x18(%rax)
leaq 0x30a50(%rip), %rcx # 0xb5395
movq %rcx, 0x20(%rax)
leaq 0x30a4b(%rip), %rcx # 0xb539b
movq %rcx, 0x28(%rax)
leaq 0x30a46(%rip), %rcx # 0xb53a1
movq %rcx, 0x30(%rax)
leaq 0x30a41(%rip), %rcx # 0xb53a7
movq %rcx, 0x38(%rax)
leaq 0x30a3c(%rip), %rcx # 0xb53ad
movq %rcx, 0x40(%rax)
jmp 0x849b1
movq 0x5f75a(%rip), %rax # 0xe40d8
cmpq %rax, 0x5f75b(%rip) # 0xe40e0
je 0x849b1
xorl %ecx, %ecx
leaq 0x2773e(%rip), %rdx # 0xac0ce
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq 0x5f742(%rip), %rsi # 0xe40e0
movq 0x5f733(%rip), %rax # 0xe40d8
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rcx
jb 0x84990
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x84540
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_84977
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_849B1
loc_84977:
mov rax, cs:_ZL5g_col; g_col
cmp cs:qword_E40E0, rax
jz short loc_849B1
xor ecx, ecx
lea rdx, aSUnableToOpenT+2Bh; ""
loc_84990:
mov [rax+rcx*8], rdx
inc rcx
mov rsi, cs:qword_E40E0
mov rax, cs:_ZL5g_col; g_col
sub rsi, rax
sar rsi, 3
cmp rcx, rsi
jb short loc_84990
loc_849B1:
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_E40E0 != g_col )
{
v4 = 0LL;
do
{
*(_QWORD *)(v3 + 8 * v4++) = "";
v3 = g_col;
}
while ( v4 < (qword_E40E0 - g_col) >> 3 );
}
}
return common_log::resume(this);
}
| set_colors:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001844b8
TEST EBP,EBP
JZ 0x00184977
MOV RAX,qword ptr [0x001e40d8]
LEA RCX,[0x1b537f]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [0x001e40d8]
LEA RCX,[0x1b5384]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x1b5389]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[0x1b538f]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1b5395]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[0x1b539b]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[0x1b53a1]
MOV qword ptr [RAX + 0x30],RCX
LEA RCX,[0x1b53a7]
MOV qword ptr [RAX + 0x38],RCX
LEA RCX,[0x1b53ad]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x001849b1
LAB_00184977:
MOV RAX,qword ptr [0x001e40d8]
CMP qword ptr [0x001e40e0],RAX
JZ 0x001849b1
XOR ECX,ECX
LEA RDX,[0x1ac0ce]
LAB_00184990:
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RSI,qword ptr [0x001e40e0]
MOV RAX,qword ptr [0x001e40d8]
SUB RSI,RAX
SAR RSI,0x3
CMP RCX,RSI
JC 0x00184990
LAB_001849b1:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00184540
|
/* 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_001e40e0 != g_col) {
uVar2 = 0;
do {
g_col[uVar2] = "";
uVar2 = uVar2 + 1;
} while (uVar2 < (ulong)((long)DAT_001e40e0 - (long)g_col >> 3));
}
}
else {
*g_col = &DAT_001b537f;
puVar1 = g_col;
g_col[1] = &DAT_001b5384;
puVar1[2] = &DAT_001b5389;
puVar1[3] = &DAT_001b538f;
puVar1[4] = &DAT_001b5395;
puVar1[5] = &DAT_001b539b;
puVar1[6] = &DAT_001b53a1;
puVar1[7] = &DAT_001b53a7;
puVar1[8] = &DAT_001b53ad;
}
resume(this);
return;
}
|
|
651 | ImPlot3DQuat::operator*(ImPlot3DPoint const&) const | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | ImPlot3DPoint ImPlot3DQuat::operator*(const ImPlot3DPoint& point) const {
// Extract vector part of the quaternion
ImPlot3DPoint qv(x, y, z);
// Compute the cross products needed for rotation
ImPlot3DPoint uv = qv.Cross(point); // uv = qv x point
ImPlot3DPoint uuv = qv.Cross(uv); // uuv = qv x uv
// Compute the rotated vector
return point + (uv * w * 2.0f) + (uuv * 2.0f);
} | O1 | cpp | ImPlot3DQuat::operator*(ImPlot3DPoint const&) const:
movss (%rdi), %xmm3
movss 0x8(%rsi), %xmm2
movss 0xc(%rdi), %xmm4
movsd 0x4(%rdi), %xmm5
movaps %xmm3, %xmm6
shufps $0xd4, %xmm5, %xmm6 # xmm6 = xmm6[0,1],xmm5[1,3]
shufps $0x52, %xmm5, %xmm6 # xmm6 = xmm6[2,0],xmm5[1,1]
movsd (%rsi), %xmm0
movsd 0x4(%rsi), %xmm7
mulps %xmm6, %xmm7
movaps %xmm2, %xmm1
unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
mulps %xmm5, %xmm1
subps %xmm7, %xmm1
movaps %xmm0, %xmm7
movaps %xmm4, %xmm8
shufps $0x0, %xmm4, %xmm8 # xmm8 = xmm8[0,0],xmm4[0,0]
mulps %xmm1, %xmm8
addps %xmm8, %xmm8
addps %xmm0, %xmm8
mulss %xmm5, %xmm0
shufps $0x55, %xmm7, %xmm7 # xmm7 = xmm7[1,1,1,1]
mulss %xmm3, %xmm7
subss %xmm0, %xmm7
movaps %xmm7, %xmm9
shufps $0xd4, %xmm1, %xmm9 # xmm9 = xmm9[0,1],xmm1[1,3]
shufps $0x52, %xmm1, %xmm9 # xmm9 = xmm9[2,0],xmm1[1,1]
movaps %xmm1, %xmm0
movlhps %xmm7, %xmm0 # xmm0 = xmm0[0],xmm7[0]
shufps $0x52, %xmm1, %xmm0 # xmm0 = xmm0[2,0],xmm1[1,1]
mulps %xmm5, %xmm0
mulss %xmm1, %xmm5
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulps %xmm6, %xmm9
subps %xmm9, %xmm0
mulss %xmm3, %xmm1
subss %xmm5, %xmm1
mulss %xmm4, %xmm7
addss %xmm7, %xmm7
addss %xmm2, %xmm7
addps %xmm0, %xmm0
addps %xmm8, %xmm0
addss %xmm1, %xmm1
addss %xmm7, %xmm1
retq
| _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint:
movss xmm3, dword ptr [rdi]
movss xmm2, dword ptr [rsi+8]
movss xmm4, dword ptr [rdi+0Ch]
movsd xmm5, qword ptr [rdi+4]
movaps xmm6, xmm3
shufps xmm6, xmm5, 0D4h
shufps xmm6, xmm5, 52h ; 'R'
movsd xmm0, qword ptr [rsi]
movsd xmm7, qword ptr [rsi+4]
mulps xmm7, xmm6
movaps xmm1, xmm2
unpcklps xmm1, xmm0
mulps xmm1, xmm5
subps xmm1, xmm7
movaps xmm7, xmm0
movaps xmm8, xmm4
shufps xmm8, xmm4, 0
mulps xmm8, xmm1
addps xmm8, xmm8
addps xmm8, xmm0
mulss xmm0, xmm5
shufps xmm7, xmm7, 55h ; 'U'
mulss xmm7, xmm3
subss xmm7, xmm0
movaps xmm9, xmm7
shufps xmm9, xmm1, 0D4h
shufps xmm9, xmm1, 52h ; 'R'
movaps xmm0, xmm1
movlhps xmm0, xmm7
shufps xmm0, xmm1, 52h ; 'R'
mulps xmm0, xmm5
mulss xmm5, xmm1
shufps xmm1, xmm1, 55h ; 'U'
mulps xmm9, xmm6
subps xmm0, xmm9
mulss xmm1, xmm3
subss xmm1, xmm5
mulss xmm7, xmm4
addss xmm7, xmm7
addss xmm7, xmm2
addps xmm0, xmm0
addps xmm0, xmm8
addss xmm1, xmm1
addss xmm1, xmm7
retn
| __m128 ImPlot3DQuat::operator*(unsigned int *a1, unsigned long long *a2)
{
__m128 v2; // xmm5
__m128 v3; // xmm6
__m128 v4; // xmm0
__m128 v5; // xmm1
__m128 v6; // xmm8
__m128 v7; // xmm8
__m128 v8; // xmm7
__m128 v9; // xmm0
v2 = (__m128)*(unsigned long long *)(a1 + 1);
v3 = _mm_shuffle_ps(_mm_shuffle_ps((__m128)*a1, v2, 212), v2, 82);
v4 = (__m128)*a2;
v5 = _mm_sub_ps(
_mm_mul_ps(_mm_unpacklo_ps((__m128)*((unsigned int *)a2 + 2), v4), v2),
_mm_mul_ps((__m128)*(unsigned long long *)((char *)a2 + 4), v3));
v6 = _mm_mul_ps(_mm_shuffle_ps((__m128)a1[3], (__m128)a1[3], 0), v5);
v7 = _mm_add_ps(_mm_add_ps(v6, v6), v4);
v8 = _mm_shuffle_ps(v4, v4, 85);
v8.m128_f32[0] = (float)(v8.m128_f32[0] * *(float *)a1) - (float)(v4.m128_f32[0] * v2.m128_f32[0]);
v9 = _mm_sub_ps(
_mm_mul_ps(_mm_shuffle_ps(_mm_movelh_ps(v5, v8), v5, 82), v2),
_mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(v8, v5, 212), v5, 82), v3));
return _mm_add_ps(_mm_add_ps(v9, v9), v7);
}
| operator*:
MOVSS XMM3,dword ptr [RDI]
MOVSS XMM2,dword ptr [RSI + 0x8]
MOVSS XMM4,dword ptr [RDI + 0xc]
MOVSD XMM5,qword ptr [RDI + 0x4]
MOVAPS XMM6,XMM3
SHUFPS XMM6,XMM5,0xd4
SHUFPS XMM6,XMM5,0x52
MOVSD XMM0,qword ptr [RSI]
MOVSD XMM7,qword ptr [RSI + 0x4]
MULPS XMM7,XMM6
MOVAPS XMM1,XMM2
UNPCKLPS XMM1,XMM0
MULPS XMM1,XMM5
SUBPS XMM1,XMM7
MOVAPS XMM7,XMM0
MOVAPS XMM8,XMM4
SHUFPS XMM8,XMM4,0x0
MULPS XMM8,XMM1
ADDPS XMM8,XMM8
ADDPS XMM8,XMM0
MULSS XMM0,XMM5
SHUFPS XMM7,XMM7,0x55
MULSS XMM7,XMM3
SUBSS XMM7,XMM0
MOVAPS XMM9,XMM7
SHUFPS XMM9,XMM1,0xd4
SHUFPS XMM9,XMM1,0x52
MOVAPS XMM0,XMM1
MOVLHPS XMM0,XMM7
SHUFPS XMM0,XMM1,0x52
MULPS XMM0,XMM5
MULSS XMM5,XMM1
SHUFPS XMM1,XMM1,0x55
MULPS XMM9,XMM6
SUBPS XMM0,XMM9
MULSS XMM1,XMM3
SUBSS XMM1,XMM5
MULSS XMM7,XMM4
ADDSS XMM7,XMM7
ADDSS XMM7,XMM2
ADDPS XMM0,XMM0
ADDPS XMM0,XMM8
ADDSS XMM1,XMM1
ADDSS XMM1,XMM7
RET
|
/* ImPlot3DQuat::TEMPNAMEPLACEHOLDERVALUE(ImPlot3DPoint const&) const */
int8 __thiscall ImPlot3DQuat::operator*(ImPlot3DQuat *this,ImPlot3DPoint *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
fVar3 = *(float *)this;
fVar6 = (float)*(int8 *)(this + 4);
fVar7 = (float)((ulong)*(int8 *)(this + 4) >> 0x20);
fVar2 = (float)((ulong)*(int8 *)param_1 >> 0x20);
fVar1 = (float)*(int8 *)param_1;
fVar4 = *(float *)(param_1 + 8) * fVar6 - (float)*(int8 *)(param_1 + 4) * fVar7;
fVar5 = fVar1 * fVar7 - (float)((ulong)*(int8 *)(param_1 + 4) >> 0x20) * fVar3;
fVar9 = *(float *)(this + 0xc) * fVar4;
fVar10 = *(float *)(this + 0xc) * fVar5;
fVar8 = fVar2 * fVar3 - fVar1 * fVar6;
fVar5 = fVar8 * fVar6 - fVar5 * fVar7;
fVar3 = fVar4 * fVar7 - fVar8 * fVar3;
return CONCAT44(fVar3 + fVar3 + fVar10 + fVar10 + fVar2,fVar5 + fVar5 + fVar9 + fVar9 + fVar1);
}
|
|
652 | set_page_bits | eloqsql/storage/maria/ma_bitmap.c | static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page, uint fill_pattern)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp, org_tmp, used_offset;
uchar *data;
DBUG_ENTER("set_page_bits");
DBUG_ASSERT(fill_pattern <= 7);
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
org_tmp= tmp= uint2korr(data);
tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset);
if (tmp == org_tmp)
DBUG_RETURN(0); /* No changes */
/*
Take care to not write bytes outside of bitmap.
fill_pattern is 3 bits, so we need to write two bytes
if bit position we write to is > (8-3)
*/
if (offset > 5)
int2store(data, tmp);
else
data[0]= tmp;
/*
Reset full_head_size or full_tail_size if we are releasing data before
it. Increase used_size if we are allocating data.
*/
used_offset= (uint) (data - bitmap->map);
if (fill_pattern < 4)
set_if_smaller(bitmap->full_head_size, used_offset);
if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7))
set_if_smaller(bitmap->full_tail_size, used_offset);
if (fill_pattern != 0)
{
/* Calulcate which was the last changed byte */
used_offset+= offset > 5 ? 2 : 1;
set_if_bigger(bitmap->used_size, used_offset);
}
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE)
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
/*
Note that if the condition above is false (page is full), and all pages of
this bitmap are now full, and that bitmap page was
first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed
its value still tells us where to start our search for a bitmap with space
(which is for sure after this full one).
That does mean that first_bitmap_with_space is only a lower bound.
*/
DBUG_RETURN(0);
} | O0 | c | set_page_bits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
jmp 0x43c89
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x60(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x43cdf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x43190
movsbl %al, %eax
cmpl $0x0, %eax
je 0x43cdf
jmp 0x43cd6
movb $0x1, -0x1(%rbp)
jmp 0x43e6d
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x10(%rcx), %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
imull $0x3, -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x3c(%rbp)
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl -0x38(%rbp), %ecx
movl $0x7, %edx
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl -0x24(%rbp), %edx
movl -0x38(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x43d5c
jmp 0x43d53
movb $0x0, -0x1(%rbp)
jmp 0x43e6d
cmpl $0x5, -0x38(%rbp)
jbe 0x43d7b
jmp 0x43d64
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x58(%rbp), %rax
movw %cx, (%rax)
jmp 0x43d86
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
cmpl $0x4, -0x24(%rbp)
jae 0x43dba
jmp 0x43da0
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x43db6
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x43db8
jmp 0x43dba
cmpl $0x0, -0x24(%rbp)
je 0x43dcc
cmpl $0x4, -0x24(%rbp)
jbe 0x43de8
cmpl $0x7, -0x24(%rbp)
jae 0x43de8
jmp 0x43dce
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x43de4
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x43de6
jmp 0x43de8
cmpl $0x0, -0x24(%rbp)
je 0x43e21
movl -0x38(%rbp), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x5, %edx
cmoval %ecx, %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x44(%rbp), %eax
jae 0x43e1d
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x43e1f
jmp 0x43e21
jmp 0x43e23
jmp 0x43e25
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x43e2f
cmpl $0x4, -0x24(%rbp)
je 0x43e67
cmpl $0x7, -0x24(%rbp)
je 0x43e67
jmp 0x43e3d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x43e63
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x43e65
jmp 0x43e67
jmp 0x43e69
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| set_page_bits:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
jmp short $+2
loc_43C89:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_60]
sub rax, rdx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_43CDF
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_43CDF
jmp short $+2
loc_43CD6:
mov [rbp+var_1], 1
jmp loc_43E6D
loc_43CDF:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+10h]
sub rax, 1
mov [rbp+var_34], eax
imul eax, [rbp+var_34], 3
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
and eax, 7
mov [rbp+var_38], eax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_34]
shr ecx, 3
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movzx eax, word ptr [rax]
mov [rbp+var_3C], eax
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, [rbp+var_38]
mov edx, 7
shl edx, cl
mov ecx, edx
xor ecx, 0FFFFFFFFh
and eax, ecx
mov edx, [rbp+var_24]
mov ecx, [rbp+var_38]
shl edx, cl
mov ecx, edx
or eax, ecx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_40]
jnz short loc_43D5C
jmp short $+2
loc_43D53:
mov [rbp+var_1], 0
jmp loc_43E6D
loc_43D5C:
cmp [rbp+var_38], 5
jbe short loc_43D7B
jmp short $+2
loc_43D64:
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_58]
mov [rax], cx
jmp short loc_43D86
loc_43D7B:
mov eax, [rbp+var_3C]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
loc_43D86:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
sub rax, rcx
mov [rbp+var_44], eax
cmp [rbp+var_24], 4
jnb short loc_43DBA
jmp short $+2
loc_43DA0:
mov rax, [rbp+var_18]
mov eax, [rax+28h]
cmp eax, [rbp+var_44]
jbe short loc_43DB6
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+28h], ecx
loc_43DB6:
jmp short $+2
loc_43DB8:
jmp short $+2
loc_43DBA:
cmp [rbp+var_24], 0
jz short loc_43DCC
cmp [rbp+var_24], 4
jbe short loc_43DE8
cmp [rbp+var_24], 7
jnb short loc_43DE8
loc_43DCC:
jmp short $+2
loc_43DCE:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
cmp eax, [rbp+var_44]
jbe short loc_43DE4
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+2Ch], ecx
loc_43DE4:
jmp short $+2
loc_43DE6:
jmp short $+2
loc_43DE8:
cmp [rbp+var_24], 0
jz short loc_43E21
mov edx, [rbp+var_38]
mov eax, 1
mov ecx, 2
cmp edx, 5
cmova eax, ecx
add eax, [rbp+var_44]
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov eax, [rax+24h]
cmp eax, [rbp+var_44]
jnb short loc_43E1D
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+24h], ecx
loc_43E1D:
jmp short $+2
loc_43E1F:
jmp short $+2
loc_43E21:
jmp short $+2
loc_43E23:
jmp short $+2
loc_43E25:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_43E2F:
cmp [rbp+var_24], 4
jz short loc_43E67
cmp [rbp+var_24], 7
jz short loc_43E67
jmp short $+2
loc_43E3D:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_30]
jbe short loc_43E63
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_43E63:
jmp short $+2
loc_43E65:
jmp short $+2
loc_43E67:
jmp short $+2
loc_43E69:
mov [rbp+var_1], 0
loc_43E6D:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char set_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4)
{
int v4; // eax
_BYTE *v6; // [rsp+10h] [rbp-50h]
unsigned int v7; // [rsp+1Ch] [rbp-44h]
unsigned int v8; // [rsp+1Ch] [rbp-44h]
int v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
unsigned int v11; // [rsp+28h] [rbp-38h]
unsigned int v12; // [rsp+2Ch] [rbp-34h]
unsigned long long v13; // [rsp+30h] [rbp-30h]
int v15; // [rsp+40h] [rbp-20h]
v15 = a3;
v13 = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v13 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v13) )
return 1;
v12 = 3 * (v15 - *(_DWORD *)(a2 + 16) - 1);
v11 = v12 & 7;
v6 = (_BYTE *)((v12 >> 3) + *(_QWORD *)(a2 + 8));
v9 = *(unsigned __int16 *)v6;
v10 = (a4 << (v12 & 7)) | ~(7 << (v12 & 7)) & v9;
if ( v10 == v9 )
return 0;
if ( v11 <= 5 )
*v6 = v10;
else
*(_WORD *)v6 = v10;
v7 = (_DWORD)v6 - *(_QWORD *)(a2 + 8);
if ( a4 < 4 && *(_DWORD *)(a2 + 40) > v7 )
*(_DWORD *)(a2 + 40) = v7;
if ( (!a4 || a4 > 4 && a4 < 7) && *(_DWORD *)(a2 + 44) > v7 )
*(_DWORD *)(a2 + 44) = v7;
if ( a4 )
{
v4 = 1;
if ( v11 > 5 )
v4 = 2;
v8 = v7 + v4;
if ( *(_DWORD *)(a2 + 36) < v8 )
*(_DWORD *)(a2 + 36) = v8;
}
*(_BYTE *)(a2 + 32) = 1;
if ( a4 != 4 && a4 != 7 && *(_QWORD *)(*a1 + 208) > v13 )
*(_QWORD *)(*a1 + 208) = v13;
return 0;
}
| set_page_bits:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
JMP 0x00143c89
LAB_00143c89:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00143cdf
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00143190
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00143cdf
JMP 0x00143cd6
LAB_00143cd6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143e6d
LAB_00143cdf:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x10]
SUB RAX,0x1
MOV dword ptr [RBP + -0x34],EAX
IMUL EAX,dword ptr [RBP + -0x34],0x3
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x7
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x34]
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,0x7
SHL EDX,CL
MOV ECX,EDX
XOR ECX,0xffffffff
AND EAX,ECX
MOV EDX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x38]
SHL EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x00143d5c
JMP 0x00143d53
LAB_00143d53:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00143e6d
LAB_00143d5c:
CMP dword ptr [RBP + -0x38],0x5
JBE 0x00143d7b
JMP 0x00143d64
LAB_00143d64:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x58]
MOV word ptr [RAX],CX
JMP 0x00143d86
LAB_00143d7b:
MOV EAX,dword ptr [RBP + -0x3c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
LAB_00143d86:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x24],0x4
JNC 0x00143dba
JMP 0x00143da0
LAB_00143da0:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00143db6
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],ECX
LAB_00143db6:
JMP 0x00143db8
LAB_00143db8:
JMP 0x00143dba
LAB_00143dba:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00143dcc
CMP dword ptr [RBP + -0x24],0x4
JBE 0x00143de8
CMP dword ptr [RBP + -0x24],0x7
JNC 0x00143de8
LAB_00143dcc:
JMP 0x00143dce
LAB_00143dce:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00143de4
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00143de4:
JMP 0x00143de6
LAB_00143de6:
JMP 0x00143de8
LAB_00143de8:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00143e21
MOV EDX,dword ptr [RBP + -0x38]
MOV EAX,0x1
MOV ECX,0x2
CMP EDX,0x5
CMOVA EAX,ECX
ADD EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x24]
CMP EAX,dword ptr [RBP + -0x44]
JNC 0x00143e1d
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
LAB_00143e1d:
JMP 0x00143e1f
LAB_00143e1f:
JMP 0x00143e21
LAB_00143e21:
JMP 0x00143e23
LAB_00143e23:
JMP 0x00143e25
LAB_00143e25:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x00143e2f
LAB_00143e2f:
CMP dword ptr [RBP + -0x24],0x4
JZ 0x00143e67
CMP dword ptr [RBP + -0x24],0x7
JZ 0x00143e67
JMP 0x00143e3d
LAB_00143e3d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00143e63
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00143e63:
JMP 0x00143e65
LAB_00143e65:
JMP 0x00143e67
LAB_00143e67:
JMP 0x00143e69
LAB_00143e69:
MOV byte ptr [RBP + -0x1],0x0
LAB_00143e6d:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
int iVar4;
ulong uVar5;
ushort *puVar6;
int1 local_9;
uVar5 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((uVar5 == *(ulong *)(param_2 + 0x10)) ||
(cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar5), cVar1 == '\0')) {
uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3;
uVar3 = uVar2 & 7;
puVar6 = (ushort *)(*(long *)(param_2 + 8) + (ulong)(uVar2 >> 3));
uVar2 = (uint)*puVar6 & (7 << (sbyte)uVar3 ^ 0xffffffffU) | param_4 << (sbyte)uVar3;
if (uVar2 == *puVar6) {
local_9 = 0;
}
else {
if (uVar3 < 6) {
*(char *)puVar6 = (char)uVar2;
}
else {
*puVar6 = (ushort)uVar2;
}
uVar2 = (int)puVar6 - (int)*(int8 *)(param_2 + 8);
if ((param_4 < 4) && (uVar2 < *(uint *)(param_2 + 0x28))) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (((param_4 == 0) || ((4 < param_4 && (param_4 < 7)))) &&
(uVar2 < *(uint *)(param_2 + 0x2c))) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
if (param_4 != 0) {
iVar4 = 1;
if (5 < uVar3) {
iVar4 = 2;
}
if (*(uint *)(param_2 + 0x24) < iVar4 + uVar2) {
*(uint *)(param_2 + 0x24) = iVar4 + uVar2;
}
}
*(int1 *)(param_2 + 0x20) = 1;
if (((param_4 != 4) && (param_4 != 7)) && (uVar5 < *(ulong *)(*param_1 + 0xd0))) {
*(ulong *)(*param_1 + 0xd0) = uVar5;
}
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
653 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double) | hkr04[P]cpp-mcp/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0xc6660
testb $0x1, %al
jne 0xd5a29
movq 0x8(%rsp), %rdi
callq 0xd43f0
movq %rax, %rdi
movq (%rdi), %rax
leaq 0xe421(%rip), %rsi # 0xe3e40
movl $0x4, %edx
callq *0x8(%rax)
jmp 0xd5a39
movq 0x8(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0xd6310
addq $0x28, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
movsd [rsp+28h+var_10], xmm0
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
movsd xmm0, [rsp+28h+var_10]; double
call _ZSt8isfinited; std::isfinite(double)
test al, 1
jnz short loc_D5A29
mov rdi, [rsp+28h+var_20]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
lea rsi, aNull; "null"
mov edx, 4
call qword ptr [rax+8]
jmp short loc_D5A39
loc_D5A29:
mov rdi, [rsp+28h+var_20]
movsd xmm0, [rsp+28h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<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_float(double,std::integral_constant<bool,true>)
loc_D5A39:
add rsp, 28h
retn
| long long nlohmann::json_abi_v3_11_3::detail::serializer<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_float(
long long a1,
double a2)
{
long long v2; // rax
if ( std::isfinite(a2) )
return nlohmann::json_abi_v3_11_3::detail::serializer<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_float(
a1,
a2);
v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (*(long long ( **)(long long, const char *, long long))(*(_QWORD *)v2 + 8LL))(v2, "null", 4LL);
}
| dump_float:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOVSD qword ptr [RSP + 0x18],XMM0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOVSD XMM0,qword ptr [RSP + 0x18]
CALL 0x001c6660
TEST AL,0x1
JNZ 0x001d5a29
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001d43f0
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
LEA RSI,[0x1e3e40]
MOV EDX,0x4
CALL qword ptr [RAX + 0x8]
JMP 0x001d5a39
LAB_001d5a29:
MOV RDI,qword ptr [RSP + 0x8]
MOVSD XMM0,qword ptr [RSP + 0x18]
CALL 0x001d6310
LAB_001d5a39:
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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_float(serializer<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,double param_1)
{
ulong uVar1;
long *plVar2;
uVar1 = std::isfinite(param_1);
if ((uVar1 & 1) == 0) {
plVar2 = (long *)std::
__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>
*)this);
(**(code **)(*plVar2 + 8))(plVar2,&DAT_001e3e40,4);
}
else {
dump_float(param_1,this);
}
return;
}
|
|
654 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double) | hkr04[P]cpp-mcp/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x5022f
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x60df(%rip), %rsi # 0x56300
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x503f3
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_5022F
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aNull; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_5022F:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<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_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, const char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>(a1 + 2, a1 + 10);
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x0015022f
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x156300]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_0015022f:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001503f3
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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_float(serializer<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,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x0015022d. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,&DAT_00156300,4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x00150259. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
|
|
655 | spdlog::logger::should_flush_(spdlog::details::log_msg const&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger-inl.h | SPDLOG_INLINE bool logger::should_flush_(const details::log_msg &msg) {
auto flush_level = flush_level_.load(std::memory_order_relaxed);
return (msg.level >= flush_level) && (msg.level != level::off);
} | O0 | c | spdlog::logger::should_flush_(spdlog::details::log_msg const&):
subq $0x48, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $0x44, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x3c(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x24460
movl %eax, 0x38(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x18(%rsp)
decl %eax
subl $0x2, %eax
jb 0x79499
jmp 0x79481
movl 0x18(%rsp), %eax
subl $0x5, %eax
je 0x794a6
jmp 0x7948c
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0x794b1
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0x794b1
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movl 0x10(%rax), %ecx
xorl %eax, %eax
cmpl 0x1c(%rsp), %ecx
movb %al, 0xf(%rsp)
jl 0x794dd
movq 0x20(%rsp), %rax
cmpl $0x6, 0x10(%rax)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN6spdlog6logger13should_flush_ERKNS_7details7log_msgE:
sub rsp, 48h
mov [rsp+48h+var_20], rdi
mov [rsp+48h+var_28], rsi
mov rax, [rsp+48h+var_20]
add rax, 44h ; 'D'
mov [rsp+48h+var_8], rax
mov [rsp+48h+var_C], 0
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
mov edi, [rsp+48h+var_C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+48h+var_10], eax
mov eax, [rsp+48h+var_C]
mov [rsp+48h+var_30], eax
dec eax
sub eax, 2
jb short loc_79499
jmp short $+2
loc_79481:
mov eax, [rsp+48h+var_30]
sub eax, 5
jz short loc_794A6
jmp short $+2
loc_7948C:
mov rax, [rsp+48h+var_38]
mov eax, [rax]
mov [rsp+48h+var_14], eax
jmp short loc_794B1
loc_79499:
mov rax, [rsp+48h+var_38]
mov eax, [rax]
mov [rsp+48h+var_14], eax
jmp short loc_794B1
loc_794A6:
mov rax, [rsp+48h+var_38]
mov eax, [rax]
mov [rsp+48h+var_14], eax
loc_794B1:
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_2C], eax
mov rax, [rsp+48h+var_28]
mov ecx, [rax+10h]
xor eax, eax
cmp ecx, [rsp+48h+var_2C]
mov [rsp+48h+var_39], al
jl short loc_794DD
mov rax, [rsp+48h+var_28]
cmp dword ptr [rax+10h], 6
setnz al
mov [rsp+48h+var_39], al
loc_794DD:
mov al, [rsp+48h+var_39]
and al, 1
add rsp, 48h
retn
| bool spdlog::logger::should_flush_(spdlog::logger *this, const spdlog::details::log_msg *a2)
{
bool v3; // [rsp+Fh] [rbp-39h]
std::operator&(0, 0xFFFF);
v3 = 0;
if ( *((_DWORD *)a2 + 4) >= *((_DWORD *)this + 17) )
return *((_DWORD *)a2 + 4) != 6;
return v3;
}
| should_flush_:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x44
MOV qword ptr [RSP + 0x40],RAX
MOV dword ptr [RSP + 0x3c],0x0
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,dword ptr [RSP + 0x3c]
MOV ESI,0xffff
CALL 0x00124460
MOV dword ptr [RSP + 0x38],EAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x18],EAX
DEC EAX
SUB EAX,0x2
JC 0x00179499
JMP 0x00179481
LAB_00179481:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x5
JZ 0x001794a6
JMP 0x0017948c
LAB_0017948c:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001794b1
LAB_00179499:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001794b1
LAB_001794a6:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x34],EAX
LAB_001794b1:
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x1c],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX + 0x10]
XOR EAX,EAX
CMP ECX,dword ptr [RSP + 0x1c]
MOV byte ptr [RSP + 0xf],AL
JL 0x001794dd
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0x10],0x6
SETNZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_001794dd:
MOV AL,byte ptr [RSP + 0xf]
AND AL,0x1
ADD RSP,0x48
RET
|
/* WARNING: Removing unreachable block (ram,0x001794a6) */
/* WARNING: Removing unreachable block (ram,0x00179499) */
/* spdlog::logger::should_flush_(spdlog::details::log_msg const&) */
int8 __thiscall spdlog::logger::should_flush_(logger *this,log_msg *param_1)
{
int7 uVar1;
bool local_39;
std::operator&(0,0xffff);
uVar1 = 0;
local_39 = false;
if (*(int *)(this + 0x44) <= *(int *)(param_1 + 0x10)) {
local_39 = *(int *)(param_1 + 0x10) != 6;
uVar1 = (int7)((ulong)param_1 >> 8);
}
return CONCAT71(uVar1,local_39);
}
|
|
656 | QUICK_INDEX_INTERSECT_SELECT::get_next() | eloqsql/sql/opt_range.cc | int QUICK_INDEX_INTERSECT_SELECT::get_next()
{
int result;
DBUG_ENTER("QUICK_INDEX_INTERSECT_SELECT::get_next");
if ((result= read_record.read_record()) == -1)
{
result= HA_ERR_END_OF_FILE;
end_read_record(&read_record);
unique->sort.reset(); // Free things early
}
DBUG_RETURN(result);
} | O0 | cpp | QUICK_INDEX_INTERSECT_SELECT::get_next():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0xb0, %rdi
callq 0x522bb0
movl %eax, -0xc(%rbp)
cmpl $-0x1, %eax
jne 0xa504c3
movq -0x18(%rbp), %rdi
movl $0x89, -0xc(%rbp)
addq $0xb0, %rdi
callq 0xa656d0
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
addq $0x3f8, %rdi # imm = 0x3F8
callq 0xa5d3f0
jmp 0xa504c5
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZN28QUICK_INDEX_INTERSECT_SELECT8get_nextEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_18], rdi
add rdi, 0B0h; this
call _ZN11READ_RECORD11read_recordEv; READ_RECORD::read_record(void)
mov [rbp+var_C], eax
cmp eax, 0FFFFFFFFh
jnz short loc_A504C3
mov rdi, [rbp+var_18]
mov [rbp+var_C], 89h
add rdi, 0B0h; READ_RECORD *
call _Z15end_read_recordP11READ_RECORD; end_read_record(READ_RECORD *)
mov rax, [rbp+var_18]
mov rdi, [rax+40h]
add rdi, 3F8h; this
call _ZN9SORT_INFO5resetEv; SORT_INFO::reset(void)
loc_A504C3:
jmp short $+2
loc_A504C5:
mov eax, [rbp+var_C]
add rsp, 20h
pop rbp
retn
| long long QUICK_INDEX_INTERSECT_SELECT::get_next(long long ( **this)(READ_RECORD *))
{
unsigned int record; // [rsp+14h] [rbp-Ch]
record = READ_RECORD::read_record(this + 22);
if ( record == -1 )
{
record = 137;
end_read_record((READ_RECORD *)(this + 22));
SORT_INFO::reset((SORT_INFO *)((char *)this[8] + 1016));
}
return record;
}
| ~Create_func_json_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00a4ac00
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x8
CALL 0x00533290
ADD RSP,0x10
POP RBP
RET
|
/* Create_func_json_length::~Create_func_json_length() */
void __thiscall Create_func_json_length::~Create_func_json_length(Create_func_json_length *this)
{
~Create_func_json_length(this);
::operator_delete(this,8);
return;
}
|
|
657 | ma_trid_from_key | eloqsql/storage/maria/ma_search.c | TrID _ma_trid_from_key(const MARIA_KEY *key)
{
if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID |
SEARCH_USER_KEY_HAS_TRANSID)))
return 0;
return transid_get_packed(key->keyinfo->share,
key->data + key->data_length +
key->keyinfo->share->rec_reflength);
} | O0 | c | ma_trid_from_key:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x180000, %eax # imm = 0x180000
cmpl $0x0, %eax
jne 0x956d7
movq $0x0, -0x8(%rbp)
jmp 0x95710
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl 0x740(%rax), %eax
addq %rax, %rsi
callq 0x44fd0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_trid_from_key:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+18h]
and eax, 180000h
cmp eax, 0
jnz short loc_956D7
mov [rbp+var_8], 0
jmp short loc_95710
loc_956D7:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+10h]
add rsi, rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax]
mov eax, [rax+740h]
add rsi, rax
call transid_get_packed
mov [rbp+var_8], rax
loc_95710:
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| unsigned long long ma_trid_from_key(long long a1)
{
if ( (*(_DWORD *)(a1 + 24) & 0x180000) != 0 )
return transid_get_packed(
**(_QWORD **)(a1 + 8),
(unsigned __int8 *)(*(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL)
+ *(unsigned int *)(a1 + 16)
+ *(_QWORD *)a1));
else
return 0LL;
}
| _ma_trid_from_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x180000
CMP EAX,0x0
JNZ 0x001956d7
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00195710
LAB_001956d7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x740]
ADD RSI,RAX
CALL 0x00144fd0
MOV qword ptr [RBP + -0x8],RAX
LAB_00195710:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
int8 _ma_trid_from_key(long *param_1)
{
int8 local_10;
if ((*(uint *)(param_1 + 3) & 0x180000) == 0) {
local_10 = 0;
}
else {
local_10 = transid_get_packed(*(int8 *)param_1[1],
*param_1 + (ulong)*(uint *)(param_1 + 2) +
(ulong)*(uint *)(*(long *)param_1[1] + 0x740));
}
return local_10;
}
|
|
658 | ma_trid_from_key | eloqsql/storage/maria/ma_search.c | TrID _ma_trid_from_key(const MARIA_KEY *key)
{
if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID |
SEARCH_USER_KEY_HAS_TRANSID)))
return 0;
return transid_get_packed(key->keyinfo->share,
key->data + key->data_length +
key->keyinfo->share->rec_reflength);
} | O3 | c | ma_trid_from_key:
pushq %rbp
movq %rsp, %rbp
testb $0x18, 0x1a(%rdi)
je 0x6ebb5
movq 0x8(%rdi), %rax
movq (%rax), %rax
movl 0x10(%rdi), %ecx
addq (%rdi), %rcx
movl 0x740(%rax), %esi
addq %rcx, %rsi
movq %rax, %rdi
popq %rbp
jmp 0x41e01
xorl %eax, %eax
popq %rbp
retq
| _ma_trid_from_key:
push rbp
mov rbp, rsp
test byte ptr [rdi+1Ah], 18h
jz short loc_6EBB5
mov rax, [rdi+8]
mov rax, [rax]
mov ecx, [rdi+10h]
add rcx, [rdi]
mov esi, [rax+740h]
add rsi, rcx
mov rdi, rax
pop rbp
jmp transid_get_packed
loc_6EBB5:
xor eax, eax
pop rbp
retn
| unsigned long long ma_trid_from_key(long long a1)
{
if ( (*(_BYTE *)(a1 + 26) & 0x18) != 0 )
return transid_get_packed(
**(_QWORD **)(a1 + 8),
(unsigned __int8 *)(*(_QWORD *)a1
+ *(unsigned int *)(a1 + 16)
+ *(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL)));
else
return 0LL;
}
| _ma_trid_from_key:
PUSH RBP
MOV RBP,RSP
TEST byte ptr [RDI + 0x1a],0x18
JZ 0x0016ebb5
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RDI + 0x10]
ADD RCX,qword ptr [RDI]
MOV ESI,dword ptr [RAX + 0x740]
ADD RSI,RCX
MOV RDI,RAX
POP RBP
JMP 0x00141e01
LAB_0016ebb5:
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_trid_from_key(long *param_1)
{
int8 uVar1;
if ((*(byte *)((long)param_1 + 0x1a) & 0x18) != 0) {
uVar1 = transid_get_packed(*(long *)param_1[1],
(ulong)*(uint *)(*(long *)param_1[1] + 0x740) +
(ulong)*(uint *)(param_1 + 2) + *param_1);
return uVar1;
}
return 0;
}
|
|
659 | my_caseup_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
} | O3 | c | my_caseup_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0xe3033
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0xe390c
testl %eax, %eax
je 0xe3033
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0xe2fc2
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0xe301c
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0xe3003
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0xe3033
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0xe2f8d
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_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz loc_E3033
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_E2F8D:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_E3033
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_E2FC2
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4]
mov [rbp+var_30], rcx
loc_E2FC2:
mov edx, 1
cmp rcx, 80h
jb short loc_E301C
mov edx, 2
cmp rcx, 800h
jb short loc_E3003
cmp rcx, 0FFFFh
ja short loc_E3033
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_E3003:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_E301C:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_E2F8D
loc_E3033:
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_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
| my_caseup_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x001e3033
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_001e2f8d:
MOV RDI,R15
MOV RSI,R12
CALL 0x001e390c
TEST EAX,EAX
JZ 0x001e3033
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x001e2fc2
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_001e2fc2:
MOV EDX,0x1
CMP RCX,0x80
JC 0x001e301c
MOV EDX,0x2
CMP RCX,0x800
JC 0x001e3003
CMP RCX,0xffff
JA 0x001e3033
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_001e3003:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_001e301c:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x001e2f8d
LAB_001e3033:
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_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
|
|
660 | js_dataview_get_buffer | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_get_buffer(JSContext *ctx, JSValue this_val)
{
JSObject *p;
JSTypedArray *ta;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
ta = p->u.typed_array;
return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer));
} | O1 | c | js_dataview_get_buffer:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x8390c
movq 0x8(%rsp), %rbx
cmpw $0x21, 0x6(%rbx)
je 0x8391c
leaq 0x1ee36(%rip), %rsi # 0xa2749
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
testq %rbx, %rbx
je 0x83934
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rax
incl (%rax)
movq $-0x1, %rdx
jmp 0x8393b
movl $0x6, %edx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
| js_dataview_get_buffer:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_8390C
mov rbx, [rsp+18h+var_10]
cmp word ptr [rbx+6], 21h ; '!'
jz short loc_8391C
loc_8390C:
lea rsi, aNotADataview; "not a DataView"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
loc_8391C:
test rbx, rbx
jz short loc_83934
mov rax, [rbx+30h]
mov rax, [rax+18h]
inc dword ptr [rax]
mov rdx, 0FFFFFFFFFFFFFFFFh
jmp short loc_8393B
loc_83934:
mov edx, 6
xor eax, eax
loc_8393B:
add rsp, 10h
pop rbx
retn
| _DWORD * js_dataview_get_buffer(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
_DWORD *result; // rax
char v16; // [rsp+0h] [rbp-18h]
if ( (_DWORD)a3 != -1 || (v14 = a2, *(_WORD *)(a2 + 6) != 33) )
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a DataView", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16);
}
if ( !v14 )
return 0LL;
result = *(_DWORD **)(*(_QWORD *)(v14 + 48) + 24LL);
++*result;
return result;
}
| js_dataview_get_buffer:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x0018390c
MOV RBX,qword ptr [RSP + 0x8]
CMP word ptr [RBX + 0x6],0x21
JZ 0x0018391c
LAB_0018390c:
LEA RSI,[0x1a2749]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00122567
LAB_0018391c:
TEST RBX,RBX
JZ 0x00183934
MOV RAX,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
INC dword ptr [RAX]
MOV RDX,-0x1
JMP 0x0018393b
LAB_00183934:
MOV EDX,0x6
XOR EAX,EAX
LAB_0018393b:
ADD RSP,0x10
POP RBX
RET
|
int1 [16] js_dataview_get_buffer(int8 param_1,long param_2,int param_3)
{
int *piVar1;
int8 uVar2;
int1 auVar3 [16];
if ((param_3 != -1) || (*(short *)(param_2 + 6) != 0x21)) {
param_2 = 0;
JS_ThrowTypeError(param_1,"not a DataView");
}
if (param_2 == 0) {
uVar2 = 6;
piVar1 = (int *)0x0;
}
else {
piVar1 = *(int **)(*(long *)(param_2 + 0x30) + 0x18);
*piVar1 = *piVar1 + 1;
uVar2 = 0xffffffffffffffff;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = piVar1;
return auVar3;
}
|
|
661 | js_dataview_get_buffer | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_get_buffer(JSContext *ctx, JSValue this_val)
{
JSObject *p;
JSTypedArray *ta;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
ta = p->u.typed_array;
return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer));
} | O2 | c | js_dataview_get_buffer:
pushq %rax
callq 0x6ecea
testq %rax, %rax
je 0x6e785
movq 0x30(%rax), %rax
movq 0x18(%rax), %rax
incl (%rax)
pushq $-0x1
popq %rdx
jmp 0x6e78a
pushq $0x6
popq %rdx
xorl %eax, %eax
popq %rcx
retq
| js_dataview_get_buffer:
push rax
call get_dataview
test rax, rax
jz short loc_6E785
mov rax, [rax+30h]
mov rax, [rax+18h]
inc dword ptr [rax]
push 0FFFFFFFFFFFFFFFFh
pop rdx
jmp short loc_6E78A
loc_6E785:
push 6
pop rdx
xor eax, eax
loc_6E78A:
pop rcx
retn
| _DWORD * js_dataview_get_buffer(long long a1)
{
long long dataview; // rax
_DWORD *result; // rax
dataview = get_dataview(a1);
if ( !dataview )
return 0LL;
result = *(_DWORD **)(*(_QWORD *)(dataview + 48) + 24LL);
++*result;
return result;
}
| js_dataview_get_buffer:
PUSH RAX
CALL 0x0016ecea
TEST RAX,RAX
JZ 0x0016e785
MOV RAX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
INC dword ptr [RAX]
PUSH -0x1
POP RDX
JMP 0x0016e78a
LAB_0016e785:
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_0016e78a:
POP RCX
RET
|
int1 [16] js_dataview_get_buffer(void)
{
long lVar1;
int *piVar2;
int8 uVar3;
int1 auVar4 [16];
lVar1 = get_dataview();
if (lVar1 == 0) {
uVar3 = 6;
piVar2 = (int *)0x0;
}
else {
piVar2 = *(int **)(*(long *)(lVar1 + 0x30) + 0x18);
*piVar2 = *piVar2 + 1;
uVar3 = 0xffffffffffffffff;
}
auVar4._8_8_ = uVar3;
auVar4._0_8_ = piVar2;
return auVar4;
}
|
|
662 | freeze_size | eloqsql/mysys/array.c | void freeze_size(DYNAMIC_ARRAY *array)
{
uint elements;
/*
Do nothing if we are using a static buffer
*/
if (array->malloc_flags & MY_INIT_BUFFER_USED)
return;
elements= MY_MAX(array->elements, 1);
if (array->buffer && array->max_element > elements)
{
array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer,
elements * array->size_of_element,
MYF(MY_WME | array->malloc_flags));
array->max_element= elements;
}
} | O0 | c | freeze_size:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0xdc2e2
jmp 0xdc360
movq -0x8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jbe 0xdc2f8
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0xdc302
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdc302
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdc360
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0xdc360
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x10, %rcx
callq 0xf4db0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| freeze_size:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_DC2E2
jmp short loc_DC360
loc_DC2E2:
mov rax, [rbp+var_8]
cmp dword ptr [rax+8], 1
jbe short loc_DC2F8
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_10], eax
jmp short loc_DC302
loc_DC2F8:
mov eax, 1
mov [rbp+var_10], eax
jmp short $+2
loc_DC302:
mov eax, [rbp+var_10]
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_DC360
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
cmp eax, [rbp+var_C]
jbe short loc_DC360
mov rax, [rbp+var_8]
mov edi, [rax+18h]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
or rcx, 10h
call my_realloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+0Ch], ecx
loc_DC360:
add rsp, 10h
pop rbp
retn
| long long freeze_size(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+0h] [rbp-10h]
result = *(_QWORD *)(a1 + 32) & 0x100LL;
if ( !result )
{
if ( *(_DWORD *)(a1 + 8) <= 1u )
v2 = 1;
else
v2 = *(_DWORD *)(a1 + 8);
result = a1;
if ( *(_QWORD *)a1 )
{
result = *(unsigned int *)(a1 + 12);
if ( (unsigned int)result > v2 )
{
*(_QWORD *)a1 = my_realloc(
*(unsigned int *)(a1 + 24),
*(_QWORD *)a1,
*(_DWORD *)(a1 + 20) * v2,
*(_QWORD *)(a1 + 32) | 0x10LL);
result = a1;
*(_DWORD *)(a1 + 12) = v2;
}
}
}
return result;
}
| freeze_size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x001dc2e2
JMP 0x001dc360
LAB_001dc2e2:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8],0x1
JBE 0x001dc2f8
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x10],EAX
JMP 0x001dc302
LAB_001dc2f8:
MOV EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x001dc302
LAB_001dc302:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001dc360
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x001dc360
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x10
CALL 0x001f4db0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],ECX
LAB_001dc360:
ADD RSP,0x10
POP RBP
RET
|
void freeze_size(long *param_1)
{
long lVar1;
uint local_18;
if ((param_1[4] & 0x100U) == 0) {
if (*(uint *)(param_1 + 1) < 2) {
local_18 = 1;
}
else {
local_18 = *(uint *)(param_1 + 1);
}
if ((*param_1 != 0) && (local_18 < *(uint *)((long)param_1 + 0xc))) {
lVar1 = my_realloc((int)param_1[3],*param_1,local_18 * *(int *)((long)param_1 + 0x14),
param_1[4] | 0x10);
*param_1 = lVar1;
*(uint *)((long)param_1 + 0xc) = local_18;
}
}
return;
}
|
|
663 | 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 | llama.cpp/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 0xc25d9
movq %rdi, %r14
cmpb $0x1, (%rax)
jne 0xc257b
movq 0x8(%r14), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5a80a(%rip), %rsi # 0x11cda2
leaq 0x5a82c(%rip), %rdx # 0x11cdcb
leaq 0x8(%rsp), %rdi
callq 0x28112
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcf, %esi
callq 0x89a12
xorl %ebp, %ebp
leaq 0xa0a26(%rip), %rsi # 0x162ff0
leaq -0x4c8d9(%rip), %rdx # 0x75cf8
movq %rbx, %rdi
callq 0x21a50
leaq 0x58f32(%rip), %rdi # 0x11b512
leaq 0x51b4a(%rip), %rdx # 0x114131
leaq 0x5f279(%rip), %rcx # 0x121867
movl $0x3519, %esi # imm = 0x3519
xorl %eax, %eax
callq 0x21e60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xc2614
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xc261e
jmp 0xc2626
movq %rax, %r14
movq %rbx, %rdi
callq 0x21ef0
movq %r14, %rdi
callq 0x21af0
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
push rbp; void *
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz short loc_C25D9
mov r14, rdi
cmp byte ptr [rax], 1
jnz short loc_C257B
mov rax, [r14+8]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_C257B:
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_C25D9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
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_C2614
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2614:
test bpl, bpl
jnz short loc_C261E
jmp short loc_C2626
mov r14, rax
loc_C261E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C2626:
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; // rax
long long v7; // r14
void *v8[2]; // [rsp+8h] [rbp-40h] BYREF
long long v9; // [rsp+18h] [rbp-30h] BYREF
if ( !*a1 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
13593LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
v7 = v6;
if ( v8[0] != v3 )
operator delete(v8[0], v9 + 1);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v7);
}
if ( *(_BYTE *)*a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v8[0] = &v9;
std::string::_M_construct<char const*>((long long)v8, "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,
v8);
__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 0x001c25d9
MOV R14,RDI
CMP byte ptr [RAX],0x1
JNZ 0x001c257b
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001c257b:
MOV EDI,0x20
CALL 0x00121630
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_001c2591:
LEA RSI,[0x21cda2]
LEA RDX,[0x21cdcb]
LEA RDI,[RSP + 0x8]
CALL 0x00128112
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_001c25af:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcf
CALL 0x00189a12
XOR EBP,EBP
LEA RSI,[0x262ff0]
LEA RDX,[0x175cf8]
MOV RDI,RBX
CALL 0x00121a50
LAB_001c25d9:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x221867]
MOV ESI,0x3519
XOR EAX,EAX
CALL 0x00121e60
|
/* 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/github2025/llama.cpp/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 001c2591 to 001c25a8 has its CatchHandler @ 001c261b */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot use key() for non-object iterators","");
/* try { // try from 001c25af to 001c25d8 has its CatchHandler @ 001c25fa */
_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);
}
|
|
664 | my_coll_parser_scan_rule | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p)
{
if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_RESET) ||
!my_coll_parser_scan_reset_sequence(p))
return 0;
/* Scan the first required shift command */
if (!my_coll_parser_scan_shift(p))
return my_coll_parser_expected_error(p, MY_COLL_LEXEM_SHIFT);
/* Scan the first shift sequence */
if (!my_coll_parser_scan_shift_sequence(p))
return 0;
/* Scan subsequent shift rules */
while (my_coll_parser_scan_shift(p))
{
if (!my_coll_parser_scan_shift_sequence(p))
return 0;
}
return 1;
} | O0 | c | my_coll_parser_scan_rule:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5f6d0
cmpl $0x0, %eax
je 0x5f64d
movq -0x10(%rbp), %rdi
callq 0x5f930
cmpl $0x0, %eax
jne 0x5f656
movl $0x0, -0x4(%rbp)
jmp 0x5f6be
movq -0x10(%rbp), %rdi
callq 0x5f9e0
cmpl $0x0, %eax
jne 0x5f677
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5fa40
movl %eax, -0x4(%rbp)
jmp 0x5f6be
movq -0x10(%rbp), %rdi
callq 0x5fa90
cmpl $0x0, %eax
jne 0x5f68e
movl $0x0, -0x4(%rbp)
jmp 0x5f6be
jmp 0x5f690
movq -0x10(%rbp), %rdi
callq 0x5f9e0
cmpl $0x0, %eax
je 0x5f6b7
movq -0x10(%rbp), %rdi
callq 0x5fa90
cmpl $0x0, %eax
jne 0x5f6b5
movl $0x0, -0x4(%rbp)
jmp 0x5f6be
jmp 0x5f690
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_coll_parser_scan_rule:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
mov esi, 4
call my_coll_parser_scan_term
cmp eax, 0
jz short loc_5F64D
mov rdi, [rbp+var_10]
call my_coll_parser_scan_reset_sequence
cmp eax, 0
jnz short loc_5F656
loc_5F64D:
mov [rbp+var_4], 0
jmp short loc_5F6BE
loc_5F656:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift
cmp eax, 0
jnz short loc_5F677
mov rdi, [rbp+var_10]
mov esi, 1
call my_coll_parser_expected_error
mov [rbp+var_4], eax
jmp short loc_5F6BE
loc_5F677:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift_sequence
cmp eax, 0
jnz short loc_5F68E
mov [rbp+var_4], 0
jmp short loc_5F6BE
loc_5F68E:
jmp short $+2
loc_5F690:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift
cmp eax, 0
jz short loc_5F6B7
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift_sequence
cmp eax, 0
jnz short loc_5F6B5
mov [rbp+var_4], 0
jmp short loc_5F6BE
loc_5F6B5:
jmp short loc_5F690
loc_5F6B7:
mov [rbp+var_4], 1
loc_5F6BE:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| long long my_coll_parser_scan_rule(long long a1)
{
if ( (unsigned int)my_coll_parser_scan_term(a1, 4LL) && (unsigned int)my_coll_parser_scan_reset_sequence(a1) )
{
if ( (unsigned int)my_coll_parser_scan_shift(a1) )
{
if ( (unsigned int)my_coll_parser_scan_shift_sequence(a1) )
{
while ( (unsigned int)my_coll_parser_scan_shift(a1) )
{
if ( !(unsigned int)my_coll_parser_scan_shift_sequence(a1) )
return 0;
}
return 1;
}
else
{
return 0;
}
}
else
{
return (unsigned int)my_coll_parser_expected_error(a1, 1LL);
}
}
else
{
return 0;
}
}
| my_coll_parser_scan_rule:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x4
CALL 0x0015f6d0
CMP EAX,0x0
JZ 0x0015f64d
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015f930
CMP EAX,0x0
JNZ 0x0015f656
LAB_0015f64d:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015f6be
LAB_0015f656:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015f9e0
CMP EAX,0x0
JNZ 0x0015f677
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x0015fa40
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015f6be
LAB_0015f677:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015fa90
CMP EAX,0x0
JNZ 0x0015f68e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015f6be
LAB_0015f68e:
JMP 0x0015f690
LAB_0015f690:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015f9e0
CMP EAX,0x0
JZ 0x0015f6b7
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015fa90
CMP EAX,0x0
JNZ 0x0015f6b5
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015f6be
LAB_0015f6b5:
JMP 0x0015f690
LAB_0015f6b7:
MOV dword ptr [RBP + -0x4],0x1
LAB_0015f6be:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_scan_rule(int8 param_1)
{
int iVar1;
int4 local_c;
iVar1 = my_coll_parser_scan_term(param_1,4);
if ((iVar1 == 0) || (iVar1 = my_coll_parser_scan_reset_sequence(param_1), iVar1 == 0)) {
local_c = 0;
}
else {
iVar1 = my_coll_parser_scan_shift(param_1);
if (iVar1 == 0) {
local_c = my_coll_parser_expected_error(param_1,1);
}
else {
iVar1 = my_coll_parser_scan_shift_sequence(param_1);
if (iVar1 == 0) {
local_c = 0;
}
else {
do {
iVar1 = my_coll_parser_scan_shift(param_1);
if (iVar1 == 0) {
return 1;
}
iVar1 = my_coll_parser_scan_shift_sequence(param_1);
} while (iVar1 != 0);
local_c = 0;
}
}
}
return local_c;
}
|
|
665 | ma_net_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_write(NET *net, const uchar *packet, size_t len)
{
uchar buff[NET_HEADER_SIZE];
while (len >= MAX_PACKET_LENGTH)
{
const ulong max_len= MAX_PACKET_LENGTH;
int3store(buff,max_len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, max_len))
return 1;
packet+= max_len;
len-= max_len;
}
/* write last remaining packet, size can be zero */
int3store(buff, len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, len))
return 1;
return 0;
} | O0 | c | ma_net_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
cmpq $0xffffff, -0x28(%rbp) # imm = 0xFFFFFF
jb 0x77c00
movq $0xffffff, -0x30(%rbp) # imm = 0xFFFFFF
movb $-0x1, -0xc(%rbp)
movb $-0x1, -0xb(%rbp)
movb $-0x1, -0xa(%rbp)
movq -0x18(%rbp), %rcx
movl 0x60(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x60(%rcx)
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x77ca0
cmpl $0x0, %eax
jne 0x77bd3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffff, %edx # imm = 0xFFFFFF
callq 0x77ca0
cmpl $0x0, %eax
je 0x77bdf
movl $0x1, -0x10(%rbp)
jmp 0x77c6e
movq -0x20(%rbp), %rax
addq $0xffffff, %rax # imm = 0xFFFFFF
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
subq $0xffffff, %rax # imm = 0xFFFFFF
movq %rax, -0x28(%rbp)
jmp 0x77b71
jmp 0x77c02
movq -0x28(%rbp), %rax
movb %al, -0xc(%rbp)
movq -0x28(%rbp), %rax
shrq $0x8, %rax
movb %al, -0xb(%rbp)
movq -0x28(%rbp), %rax
shrq $0x10, %rax
movb %al, -0xa(%rbp)
movq -0x18(%rbp), %rcx
movl 0x60(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x60(%rcx)
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x77ca0
cmpl $0x0, %eax
jne 0x77c5e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x77ca0
cmpl $0x0, %eax
je 0x77c67
movl $0x1, -0x10(%rbp)
jmp 0x77c6e
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x34(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x77c8f
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x382c0
nopw %cs:(%rax,%rax)
| ma_net_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
loc_77B71:
cmp [rbp+var_28], 0FFFFFFh
jb loc_77C00
mov [rbp+var_30], 0FFFFFFh
mov [rbp+var_C], 0FFh
mov [rbp+var_B], 0FFh
mov [rbp+var_A], 0FFh
mov rcx, [rbp+var_18]
mov eax, [rcx+60h]
mov edx, eax
add edx, 1
mov [rcx+60h], edx
mov [rbp+var_9], al
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_C]
mov edx, 4
call ma_net_write_buff
cmp eax, 0
jnz short loc_77BD3
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, 0FFFFFFh
call ma_net_write_buff
cmp eax, 0
jz short loc_77BDF
loc_77BD3:
mov [rbp+var_10], 1
jmp loc_77C6E
loc_77BDF:
mov rax, [rbp+var_20]
add rax, 0FFFFFFh
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
sub rax, 0FFFFFFh
mov [rbp+var_28], rax
jmp loc_77B71
loc_77C00:
jmp short $+2
loc_77C02:
mov rax, [rbp+var_28]
mov [rbp+var_C], al
mov rax, [rbp+var_28]
shr rax, 8
mov [rbp+var_B], al
mov rax, [rbp+var_28]
shr rax, 10h
mov [rbp+var_A], al
mov rcx, [rbp+var_18]
mov eax, [rcx+60h]
mov edx, eax
add edx, 1
mov [rcx+60h], edx
mov [rbp+var_9], al
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_C]
mov edx, 4
call ma_net_write_buff
cmp eax, 0
jnz short loc_77C5E
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call ma_net_write_buff
cmp eax, 0
jz short loc_77C67
loc_77C5E:
mov [rbp+var_10], 1
jmp short loc_77C6E
loc_77C67:
mov [rbp+var_10], 0
loc_77C6E:
mov eax, [rbp+var_10]
mov [rbp+var_34], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_77C8F
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
loc_77C8F:
call ___stack_chk_fail
| _BOOL8 ma_net_write(long long a1, long long a2, unsigned long long a3)
{
int v3; // eax
int v4; // eax
__int16 v9; // [rsp+34h] [rbp-Ch] BYREF
char v10; // [rsp+36h] [rbp-Ah]
char v11; // [rsp+37h] [rbp-9h]
unsigned long long v12; // [rsp+38h] [rbp-8h]
v12 = __readfsqword(0x28u);
while ( a3 >= 0xFFFFFF )
{
v9 = -1;
v10 = -1;
v3 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v3 + 1;
v11 = v3;
if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) )
return 1;
a2 += 0xFFFFFFLL;
a3 -= 0xFFFFFFLL;
}
v9 = a3;
v10 = BYTE2(a3);
v4 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v4 + 1;
v11 = v4;
return (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, a3);
}
| ma_net_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
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
LAB_00177b71:
CMP qword ptr [RBP + -0x28],0xffffff
JC 0x00177c00
MOV qword ptr [RBP + -0x30],0xffffff
MOV byte ptr [RBP + -0xc],0xff
MOV byte ptr [RBP + -0xb],0xff
MOV byte ptr [RBP + -0xa],0xff
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RCX + 0x60]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x60],EDX
MOV byte ptr [RBP + -0x9],AL
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
MOV EDX,0x4
CALL 0x00177ca0
CMP EAX,0x0
JNZ 0x00177bd3
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0xffffff
CALL 0x00177ca0
CMP EAX,0x0
JZ 0x00177bdf
LAB_00177bd3:
MOV dword ptr [RBP + -0x10],0x1
JMP 0x00177c6e
LAB_00177bdf:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xffffff
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,0xffffff
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00177b71
LAB_00177c00:
JMP 0x00177c02
LAB_00177c02:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x8
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x10
MOV byte ptr [RBP + -0xa],AL
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RCX + 0x60]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x60],EDX
MOV byte ptr [RBP + -0x9],AL
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
MOV EDX,0x4
CALL 0x00177ca0
CMP EAX,0x0
JNZ 0x00177c5e
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00177ca0
CMP EAX,0x0
JZ 0x00177c67
LAB_00177c5e:
MOV dword ptr [RBP + -0x10],0x1
JMP 0x00177c6e
LAB_00177c67:
MOV dword ptr [RBP + -0x10],0x0
LAB_00177c6e:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00177c8f
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
LAB_00177c8f:
CALL 0x001382c0
|
int4 ma_net_write(long param_1,long param_2,ulong param_3)
{
int iVar1;
long in_FS_OFFSET;
ulong local_30;
long local_28;
int4 local_18;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = param_2;
for (local_30 = param_3; 0xfffffe < local_30; local_30 = local_30 - 0xffffff) {
local_14 = 0xff;
local_13 = 0xff;
local_12 = 0xff;
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_11 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_14,4);
if (iVar1 != 0) {
LAB_00177bd3:
local_18 = 1;
goto LAB_00177c6e;
}
iVar1 = ma_net_write_buff(param_1,local_28,0xffffff);
if (iVar1 != 0) goto LAB_00177bd3;
local_28 = local_28 + 0xffffff;
}
local_14 = (int1)local_30;
local_13 = (int1)(local_30 >> 8);
local_12 = (int1)(local_30 >> 0x10);
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_11 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_14,4);
if (iVar1 == 0) {
iVar1 = ma_net_write_buff(param_1,local_28,local_30);
if (iVar1 == 0) {
local_18 = 0;
goto LAB_00177c6e;
}
}
local_18 = 1;
LAB_00177c6e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_18;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
666 | ma_pvio_close | eloqsql/libmariadb/libmariadb/ma_pvio.c | void ma_pvio_close(MARIADB_PVIO *pvio)
{
/* free internal structures and close connection */
if (pvio)
{
#ifdef HAVE_TLS
if (pvio->ctls)
{
ma_pvio_tls_close(pvio->ctls);
free(pvio->ctls);
}
#endif
if (pvio && pvio->methods->close)
pvio->methods->close(pvio);
if (pvio->cache)
free(pvio->cache);
free(pvio);
}
} | O0 | c | ma_pvio_close:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7e901
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x7e8b8
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x7f070
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3b220
cmpq $0x0, -0x8(%rbp)
je 0x7e8e0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x7e8e0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7e8f8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3b220
movq -0x8(%rbp), %rdi
callq 0x3b220
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ma_pvio_close:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz short loc_7E901
mov rax, [rbp+var_8]
cmp qword ptr [rax+38h], 0
jz short loc_7E8B8
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call ma_pvio_tls_close
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call _free
loc_7E8B8:
cmp [rbp+var_8], 0
jz short loc_7E8E0
mov rax, [rbp+var_8]
mov rax, [rax+48h]
cmp qword ptr [rax+48h], 0
jz short loc_7E8E0
mov rax, [rbp+var_8]
mov rax, [rax+48h]
mov rax, [rax+48h]
mov rdi, [rbp+var_8]
call rax
loc_7E8E0:
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_7E8F8
mov rax, [rbp+var_8]
mov rdi, [rax+8]
call _free
loc_7E8F8:
mov rdi, [rbp+var_8]
call _free
loc_7E901:
add rsp, 10h
pop rbp
retn
| long long ma_pvio_close(_QWORD *a1)
{
long long result; // rax
if ( a1 )
{
if ( a1[7] )
{
ma_pvio_tls_close(a1[7]);
free(a1[7]);
}
if ( *(_QWORD *)(a1[9] + 72LL) )
(*(void ( **)(_QWORD *))(a1[9] + 72LL))(a1);
if ( a1[1] )
free(a1[1]);
return free(a1);
}
return result;
}
| ma_pvio_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0017e901
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0017e8b8
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0017f070
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0013b220
LAB_0017e8b8:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0017e8e0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x0017e8e0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x8]
CALL RAX
LAB_0017e8e0:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0017e8f8
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0013b220
LAB_0017e8f8:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b220
LAB_0017e901:
ADD RSP,0x10
POP RBP
RET
|
void ma_pvio_close(void *param_1)
{
if (param_1 != (void *)0x0) {
if (*(long *)((long)param_1 + 0x38) != 0) {
ma_pvio_tls_close(*(int8 *)((long)param_1 + 0x38));
free(*(void **)((long)param_1 + 0x38));
}
if ((param_1 != (void *)0x0) && (*(long *)(*(long *)((long)param_1 + 0x48) + 0x48) != 0)) {
(**(code **)(*(long *)((long)param_1 + 0x48) + 0x48))(param_1);
}
if (*(long *)((long)param_1 + 8) != 0) {
free(*(void **)((long)param_1 + 8));
}
free(param_1);
}
return;
}
|
|
667 | json_get_path_start | eloqsql/strings/json_lib.c | int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs,
const uchar *str, const uchar *end,
json_path_t *p)
{
json_scan_start(je, i_cs, str, end);
p->last_step= p->steps - 1;
return 0;
} | O3 | c | json_get_path_start:
pushq %rbp
movq %rsp, %rbp
movq %rsi, 0x20(%rdi)
xorl %eax, %eax
movl %eax, 0x18(%rdi)
movq 0xb8(%rsi), %rsi
movq 0x28(%rsi), %rsi
movq %rsi, 0x28(%rdi)
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
movl $0x6, 0x64(%rdi)
movl %eax, 0xe4(%rdi)
movl %eax, 0x34(%rdi)
leaq 0x3af3d(%rip), %rax # 0x62da0
movq %rax, 0xe8(%rdi)
leaq 0x10(%r8), %rax
movq %rax, 0x430(%r8)
xorl %eax, %eax
popq %rbp
retq
| json_get_path_start:
push rbp
mov rbp, rsp
mov [rdi+20h], rsi
xor eax, eax
mov [rdi+18h], eax
mov rsi, [rsi+0B8h]
mov rsi, [rsi+28h]
mov [rdi+28h], rsi
mov [rdi], rdx
mov [rdi+8], rcx
mov dword ptr [rdi+64h], 6
mov [rdi+0E4h], eax
mov [rdi+34h], eax
lea rax, json_scan_start_no_time_to_die
mov [rdi+0E8h], rax
lea rax, [r8+10h]
mov [r8+430h], rax
xor eax, eax
pop rbp
retn
| long long json_get_path_start(long long a1, long long a2, long long a3, long long a4, long long a5)
{
*(_QWORD *)(a1 + 32) = a2;
*(_DWORD *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = *(_QWORD *)(*(_QWORD *)(a2 + 184) + 40LL);
*(_QWORD *)a1 = a3;
*(_QWORD *)(a1 + 8) = a4;
*(_DWORD *)(a1 + 100) = 6;
*(_DWORD *)(a1 + 228) = 0;
*(_DWORD *)(a1 + 52) = 0;
*(_QWORD *)(a1 + 232) = &json_scan_start_no_time_to_die;
*(_QWORD *)(a5 + 1072) = a5 + 16;
return 0LL;
}
| json_get_path_start:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RDI + 0x20],RSI
XOR EAX,EAX
MOV dword ptr [RDI + 0x18],EAX
MOV RSI,qword ptr [RSI + 0xb8]
MOV RSI,qword ptr [RSI + 0x28]
MOV qword ptr [RDI + 0x28],RSI
MOV qword ptr [RDI],RDX
MOV qword ptr [RDI + 0x8],RCX
MOV dword ptr [RDI + 0x64],0x6
MOV dword ptr [RDI + 0xe4],EAX
MOV dword ptr [RDI + 0x34],EAX
LEA RAX,[0x162da0]
MOV qword ptr [RDI + 0xe8],RAX
LEA RAX,[R8 + 0x10]
MOV qword ptr [R8 + 0x430],RAX
XOR EAX,EAX
POP RBP
RET
|
int8
json_get_path_start(int8 *param_1,long param_2,int8 param_3,int8 param_4,
long param_5)
{
param_1[4] = param_2;
*(int4 *)(param_1 + 3) = 0;
param_1[5] = *(int8 *)(*(long *)(param_2 + 0xb8) + 0x28);
*param_1 = param_3;
param_1[1] = param_4;
*(int4 *)((long)param_1 + 100) = 6;
*(int4 *)((long)param_1 + 0xe4) = 0;
*(int4 *)((long)param_1 + 0x34) = 0;
param_1[0x1d] = &json_scan_start_no_time_to_die;
*(long *)(param_5 + 0x430) = param_5 + 0x10;
return 0;
}
|
|
668 | my_mb_wc_big5 | eloqsql/strings/ctype-big5.c | static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O0 | c | my_mb_wc_big5:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x116f5e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x117037
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x116f86
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117037
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x116fa0
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x117037
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x116ffa
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0xf9, %eax
jg 0x116ffa
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x116fda
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7e, %eax
jle 0x117003
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x116ffa
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jle 0x117003
movl $0x0, -0x4(%rbp)
jmp 0x117037
movl -0x2c(%rbp), %edi
shll $0x8, %edi
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl %eax, %edi
callq 0x117370
cltq
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x117030
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x117037
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| my_mb_wc_big5:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_116F5E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_117037
loc_116F5E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_116F86
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_117037
loc_116F86:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_116FA0
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_117037
loc_116FA0:
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 0A1h
cmp eax, ecx
jg short loc_116FFA
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 0F9h
jg short loc_116FFA
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_116FDA
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jle short loc_117003
loc_116FDA:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 0A1h
cmp eax, ecx
jg short loc_116FFA
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jle short loc_117003
loc_116FFA:
mov [rbp+var_4], 0
jmp short loc_117037
loc_117003:
mov edi, [rbp+var_2C]
shl edi, 8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add edi, eax
call func_big5_uni_onechar
cdqe
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_117030
mov [rbp+var_4], 0FFFFFFFEh
jmp short loc_117037
loc_117030:
mov [rbp+var_4], 2
loc_117037:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_mb_wc_big5(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
int v4; // eax
unsigned int v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v6 = *a3;
if ( v6 >= 0x80 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (unsigned __int8)v6 < 0xA1u
|| (unsigned __int8)v6 > 0xF9u
|| (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0xA1u || a3[1] == 255) )
{
return 0;
}
else
{
v4 = func_big5_uni_onechar(a3[1] + (v6 << 8));
*a2 = v4;
if ( v4 )
return 2;
else
return (unsigned int)-2;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| |||
669 | my_mb_wc_big5 | eloqsql/strings/ctype-big5.c | static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb37da
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xb37a4
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb37da
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0xb37da
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0xb37db
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0xb3802
movl %edx, %eax
leaq 0x39ab0(%rip), %rcx # 0xed2b0
jmp 0xb3819
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0xb3832
movl %eax, %eax
leaq 0x3e817(%rip), %rcx # 0xf2030
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xb383e
jmp 0xb3839
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B37DA
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_B37A4
mov [rsi], rdi
mov eax, 1
retn
loc_B37A4:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_B37DA
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_B37DA
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_B37DB
locret_B37DA:
retn
loc_B37DB:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_B3802
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_B3819
loc_B3802:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_B3832
mov eax, eax
lea rcx, tab_big5_uni1
loc_B3819:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_B383E
jmp short loc_B3839
loc_B3832:
mov qword ptr [rsi], 0
loc_B3839:
mov eax, 0FFFFFFFEh
loc_B383E:
pop rbp
retn
| long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b37da
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001b37a4
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001b37a4:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b37da
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x001b37da
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x001b37db
LAB_001b37da:
RET
LAB_001b37db:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x001b3802
MOV EAX,EDX
LEA RCX,[0x1ed2b0]
JMP 0x001b3819
LAB_001b3802:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x001b3832
MOV EAX,EAX
LEA RCX,[0x1f2030]
LAB_001b3819:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001b383e
JMP 0x001b3839
LAB_001b3832:
MOV qword ptr [RSI],0x0
LAB_001b3839:
MOV EAX,0xfffffffe
LAB_001b383e:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
670 | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&, int) | seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc | void PrettyUnitTestResultPrinter::OnTestIterationStart(
const UnitTest& unit_test, int iteration) {
if (GTEST_FLAG_GET(repeat) != 1)
printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
std::string f = GTEST_FLAG_GET(filter);
const char* const filter = f.c_str();
// Prints the filter if it's not *. This reminds the user that some
// tests may be skipped.
if (!String::CStringEquals(filter, kUniversalFilter)) {
ColoredPrintf(GTestColor::kYellow, "Note: %s filter = %s\n", GTEST_NAME_,
filter);
}
if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
ColoredPrintf(GTestColor::kYellow, "Note: This is test shard %d of %s.\n",
static_cast<int>(shard_index) + 1,
internal::posix::GetEnv(kTestTotalShards));
}
if (GTEST_FLAG_GET(shuffle)) {
ColoredPrintf(GTestColor::kYellow,
"Note: Randomizing tests' orders with a seed of %d .\n",
unit_test.random_seed());
}
ColoredPrintf(GTestColor::kGreen, "[==========] ");
printf("Running %s from %s.\n",
FormatTestCount(unit_test.test_to_run_count()).c_str(),
FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
fflush(stdout);
} | O0 | cpp | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&, int):
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x1, 0x417356b(%rip) # 0x41a8088
je 0x34b33
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq 0x3ffaa(%rip), %rdi # 0x74ad6
movb $0x0, %al
callq 0xb090
leaq -0x38(%rbp), %rdi
leaq 0x41734fa(%rip), %rsi # 0x41a8038
callq 0xb2a0
leaq -0x38(%rbp), %rdi
callq 0xb280
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq 0x3dc11(%rip), %rsi # 0x7276c
callq 0x2da50
testb $0x1, %al
jne 0x34b97
movq -0x40(%rbp), %rcx
leaq 0x3ff93(%rip), %rsi # 0x74b02
leaq 0x3ffa2(%rip), %rdx # 0x74b18
xorl %eax, %eax
movl $0x3, %edi
callq 0x34d70
jmp 0x34b84
jmp 0x34b97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x34d56
leaq 0x3dbd2(%rip), %rdi # 0x72770
leaq 0x3dbeb(%rip), %rsi # 0x72790
xorl %edx, %edx
callq 0x34f20
movb %al, -0x91(%rbp)
jmp 0x34bb4
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x34bc0
jmp 0x34c26
leaq 0x3dbc9(%rip), %rdi # 0x72790
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x35550
movl %eax, -0x98(%rbp)
jmp 0x34bd9
movl -0x98(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
incl %eax
movl %eax, -0xa4(%rbp)
leaq 0x3db7c(%rip), %rdi # 0x72770
callq 0x4c490
movq %rax, -0xa0(%rbp)
jmp 0x34c02
movq -0xa0(%rbp), %rcx
movl -0xa4(%rbp), %edx
leaq 0x3ff0e(%rip), %rsi # 0x74b24
xorl %eax, %eax
movl $0x3, %edi
callq 0x34d70
jmp 0x34c24
jmp 0x34c26
testb $0x1, 0x4173461(%rip) # 0x41a808e
je 0x34c5d
movq -0x10(%rbp), %rdi
callq 0x35620
movl %eax, -0xa8(%rbp)
jmp 0x34c40
movl -0xa8(%rbp), %edx
leaq 0x3fefb(%rip), %rsi # 0x74b48
xorl %eax, %eax
movl $0x3, %edi
callq 0x34d70
jmp 0x34c5b
jmp 0x34c5d
leaq 0x3ff19(%rip), %rsi # 0x74b7d
xorl %eax, %eax
movl $0x2, %edi
callq 0x34d70
jmp 0x34c72
movq -0x10(%rbp), %rdi
callq 0x35680
movl %eax, -0xac(%rbp)
jmp 0x34c83
movl -0xac(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x35640
jmp 0x34c94
leaq -0x70(%rbp), %rdi
callq 0xb280
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x356f0
movl %eax, -0xb0(%rbp)
jmp 0x34cb5
movl -0xb0(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x356b0
jmp 0x34cc9
leaq -0x90(%rbp), %rdi
callq 0xb280
movq -0xb8(%rbp), %rsi
movq %rax, %rdx
leaq 0x3fea5(%rip), %rdi # 0x74b8b
xorl %eax, %eax
callq 0xb090
jmp 0x34cef
leaq -0x90(%rbp), %rdi
callq 0xbe58
leaq -0x70(%rbp), %rdi
callq 0xbe58
movq 0x6f295(%rip), %rax # 0xa3fa0
movq (%rax), %rdi
callq 0xb860
jmp 0x34d15
leaq -0x38(%rbp), %rdi
callq 0xbe58
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x34d4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xbe58
leaq -0x70(%rbp), %rdi
callq 0xbe58
leaq -0x38(%rbp), %rdi
callq 0xbe58
movq -0x48(%rbp), %rdi
callq 0xbcd0
nopl (%rax,%rax)
| _ZN7testing8internal27PrettyUnitTestResultPrinter20OnTestIterationStartERKNS_8UnitTestEi:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
cmp cs:_ZN7testing18FLAGS_gtest_repeatE, 1; testing::FLAGS_gtest_repeat
jz short loc_34B33
mov esi, [rbp+var_14]
add esi, 1
lea rdi, aRepeatingAllTe; "\nRepeating all tests (iteration %d) . "...
mov al, 0
call _printf
loc_34B33:
lea rdi, [rbp+var_38]
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [rbp+var_38]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]; this
lea rsi, _ZN7testingL16kUniversalFilterE; "*"
call _ZN7testing8internal6String13CStringEqualsEPKcS3_; testing::internal::String::CStringEquals(char const*,char const*)
test al, 1
jnz short loc_34B97
mov rcx, [rbp+var_40]
lea rsi, aNoteSFilterS; "Note: %s filter = %s\n"
lea rdx, aGoogleTest; "Google Test"
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_34B84:
jmp short loc_34B97
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp loc_34D56
loc_34B97:
lea rdi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS"
lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX"
xor edx, edx; char *
call _ZN7testing8internal11ShouldShardEPKcS2_b; testing::internal::ShouldShard(char const*,char const*,bool)
mov [rbp+var_91], al
jmp short $+2
loc_34BB4:
mov al, [rbp+var_91]
test al, 1
jnz short loc_34BC0
jmp short loc_34C26
loc_34BC0:
lea rdi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX"
mov esi, 0FFFFFFFFh; char *
call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int)
mov [rbp+var_98], eax
jmp short $+2
loc_34BD9:
mov eax, [rbp+var_98]
mov [rbp+var_50], eax
mov eax, [rbp+var_50]
inc eax
mov [rbp+var_A4], eax
lea rdi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS"
call _ZN7testing8internal5posix6GetEnvEPKc; testing::internal::posix::GetEnv(char const*)
mov [rbp+var_A0], rax
jmp short $+2
loc_34C02:
mov rcx, [rbp+var_A0]
mov edx, [rbp+var_A4]
lea rsi, aNoteThisIsTest; "Note: This is test shard %d of %s.\n"
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_34C24:
jmp short $+2
loc_34C26:
test cs:_ZN7testing19FLAGS_gtest_shuffleE, 1; testing::FLAGS_gtest_shuffle
jz short loc_34C5D
mov rdi, [rbp+var_10]; this
call _ZNK7testing8UnitTest11random_seedEv; testing::UnitTest::random_seed(void)
mov [rbp+var_A8], eax
jmp short $+2
loc_34C40:
mov edx, [rbp+var_A8]
lea rsi, aNoteRandomizin; "Note: Randomizing tests' orders with a "...
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_34C5B:
jmp short $+2
loc_34C5D:
lea rsi, asc_74B7D; "[==========] "
xor eax, eax
mov edi, 2
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_34C72:
mov rdi, [rbp+var_10]; this
call _ZNK7testing8UnitTest17test_to_run_countEv; testing::UnitTest::test_to_run_count(void)
mov [rbp+var_AC], eax
jmp short $+2
loc_34C83:
mov esi, [rbp+var_AC]
lea rdi, [rbp+var_70]
call _ZN7testingL15FormatTestCountB5cxx11Ei; testing::FormatTestCount(int)
jmp short $+2
loc_34C94:
lea rdi, [rbp+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_B8], rax
mov rdi, [rbp+var_10]; this
call _ZNK7testing8UnitTest23test_suite_to_run_countEv; testing::UnitTest::test_suite_to_run_count(void)
mov [rbp+var_B0], eax
jmp short $+2
loc_34CB5:
mov esi, [rbp+var_B0]
lea rdi, [rbp+var_90]
call _ZN7testingL20FormatTestSuiteCountB5cxx11Ei; testing::FormatTestSuiteCount(int)
jmp short $+2
loc_34CC9:
lea rdi, [rbp+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, [rbp+var_B8]
mov rdx, rax
lea rdi, aRunningSFromS; "Running %s from %s.\n"
xor eax, eax
call _printf
jmp short $+2
loc_34CEF:
lea rdi, [rbp+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_34D15:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
add rsp, 0C0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_34D4D
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_34D4D:
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_34D56:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_48]
call __Unwind_Resume
| void testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(
testing::internal::PrettyUnitTestResultPrinter *this,
const testing::UnitTest *a2,
int a3)
{
const char *v3; // rdx
bool v4; // cl
int v5; // r8d
int v6; // r9d
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // r8d
int v12; // r9d
int v13; // ecx
int v14; // r8d
int v15; // r9d
const char *v16; // rax
const char *v17; // [rsp+8h] [rbp-B8h]
unsigned int v18; // [rsp+10h] [rbp-B0h]
unsigned int v19; // [rsp+14h] [rbp-ACh]
int v20; // [rsp+18h] [rbp-A8h]
int Env; // [rsp+20h] [rbp-A0h]
_BYTE v22[32]; // [rsp+30h] [rbp-90h] BYREF
_BYTE v23[32]; // [rsp+50h] [rbp-70h] BYREF
int v24; // [rsp+70h] [rbp-50h]
testing::internal::String *v25; // [rsp+80h] [rbp-40h]
_BYTE v26[36]; // [rsp+88h] [rbp-38h] BYREF
int v27; // [rsp+ACh] [rbp-14h]
testing::UnitTest *v28; // [rsp+B0h] [rbp-10h]
testing::internal::PrettyUnitTestResultPrinter *v29; // [rsp+B8h] [rbp-8h]
v29 = this;
v28 = a2;
v27 = a3;
if ( testing::FLAGS_gtest_repeat != 1 )
printf("\nRepeating all tests (iteration %d) . . .\n\n", v27 + 1);
std::string::basic_string(v26, &testing::FLAGS_gtest_filter[abi:cxx11]);
v25 = (testing::internal::String *)std::string::c_str(v26);
if ( !testing::internal::String::CStringEquals(v25, "*", v3) )
testing::internal::ColoredPrintf(
3,
(unsigned int)"Note: %s filter = %s\n",
(unsigned int)"Google Test",
(_DWORD)v25,
v5,
v6);
if ( (testing::internal::ShouldShard((testing::internal *)"GTEST_TOTAL_SHARDS", "GTEST_SHARD_INDEX", 0LL, v4) & 1) != 0 )
{
v24 = testing::internal::Int32FromEnvOrDie((testing::internal *)"GTEST_SHARD_INDEX", (const char *)0xFFFFFFFFLL, v7);
Env = testing::internal::posix::GetEnv((testing::internal::posix *)"GTEST_TOTAL_SHARDS", (const char *)0xFFFFFFFFLL);
testing::internal::ColoredPrintf(3, (unsigned int)"Note: This is test shard %d of %s.\n", v24 + 1, Env, v11, v12);
}
if ( (testing::FLAGS_gtest_shuffle & 1) != 0 )
{
v20 = testing::UnitTest::random_seed(v28);
testing::internal::ColoredPrintf(
3,
(unsigned int)"Note: Randomizing tests' orders with a seed of %d .\n",
v20,
v13,
v14,
v15);
}
testing::internal::ColoredPrintf(2, (unsigned int)"[==========] ", v7, v8, v9, v10);
v19 = testing::UnitTest::test_to_run_count(v28);
testing::FormatTestCount[abi:cxx11](v23, v19);
v17 = (const char *)std::string::c_str(v23);
v18 = testing::UnitTest::test_suite_to_run_count(v28);
testing::FormatTestSuiteCount[abi:cxx11](v22, v18);
v16 = (const char *)std::string::c_str(v22);
printf("Running %s from %s.\n", v17, v16);
std::string::~string(v22);
std::string::~string(v23);
fflush(stdout);
std::string::~string(v26);
}
| OnTestIterationStart:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
CMP dword ptr [0x042a8088],0x1
JZ 0x00134b33
MOV ESI,dword ptr [RBP + -0x14]
ADD ESI,0x1
LEA RDI,[0x174ad6]
MOV AL,0x0
CALL 0x0010b090
LAB_00134b33:
LEA RDI,[RBP + -0x38]
LEA RSI,[0x42a8038]
CALL 0x0010b2a0
LEA RDI,[RBP + -0x38]
CALL 0x0010b280
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[0x17276c]
CALL 0x0012da50
TEST AL,0x1
JNZ 0x00134b97
MOV RCX,qword ptr [RBP + -0x40]
LAB_00134b68:
LEA RSI,[0x174b02]
LEA RDX,[0x174b18]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x00134d70
JMP 0x00134b84
LAB_00134b84:
JMP 0x00134b97
LAB_00134b97:
LEA RDI,[0x172770]
LEA RSI,[0x172790]
XOR EDX,EDX
CALL 0x00134f20
MOV byte ptr [RBP + -0x91],AL
JMP 0x00134bb4
LAB_00134bb4:
MOV AL,byte ptr [RBP + -0x91]
TEST AL,0x1
JNZ 0x00134bc0
JMP 0x00134c26
LAB_00134bc0:
LEA RDI,[0x172790]
MOV ESI,0xffffffff
CALL 0x00135550
MOV dword ptr [RBP + -0x98],EAX
JMP 0x00134bd9
LAB_00134bd9:
MOV EAX,dword ptr [RBP + -0x98]
MOV dword ptr [RBP + -0x50],EAX
MOV EAX,dword ptr [RBP + -0x50]
INC EAX
MOV dword ptr [RBP + -0xa4],EAX
LEA RDI,[0x172770]
CALL 0x0014c490
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00134c02
LAB_00134c02:
MOV RCX,qword ptr [RBP + -0xa0]
MOV EDX,dword ptr [RBP + -0xa4]
LEA RSI,[0x174b24]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x00134d70
JMP 0x00134c24
LAB_00134c24:
JMP 0x00134c26
LAB_00134c26:
TEST byte ptr [0x042a808e],0x1
JZ 0x00134c5d
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00135620
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x00134c40
LAB_00134c40:
MOV EDX,dword ptr [RBP + -0xa8]
LEA RSI,[0x174b48]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x00134d70
JMP 0x00134c5b
LAB_00134c5b:
JMP 0x00134c5d
LAB_00134c5d:
LEA RSI,[0x174b7d]
XOR EAX,EAX
MOV EDI,0x2
CALL 0x00134d70
JMP 0x00134c72
LAB_00134c72:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00135680
MOV dword ptr [RBP + -0xac],EAX
JMP 0x00134c83
LAB_00134c83:
MOV ESI,dword ptr [RBP + -0xac]
LEA RDI,[RBP + -0x70]
CALL 0x00135640
JMP 0x00134c94
LAB_00134c94:
LEA RDI,[RBP + -0x70]
CALL 0x0010b280
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0x10]
LAB_00134ca8:
CALL 0x001356f0
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x00134cb5
LAB_00134cb5:
MOV ESI,dword ptr [RBP + -0xb0]
LEA RDI,[RBP + -0x90]
CALL 0x001356b0
JMP 0x00134cc9
LAB_00134cc9:
LEA RDI,[RBP + -0x90]
CALL 0x0010b280
MOV RSI,qword ptr [RBP + -0xb8]
MOV RDX,RAX
LAB_00134cdf:
LEA RDI,[0x174b8b]
XOR EAX,EAX
CALL 0x0010b090
JMP 0x00134cef
LAB_00134cef:
LEA RDI,[RBP + -0x90]
CALL 0x0010be58
LEA RDI,[RBP + -0x70]
CALL 0x0010be58
MOV RAX,qword ptr [0x001a3fa0]
MOV RDI,qword ptr [RAX]
LAB_00134d0e:
CALL 0x0010b860
LAB_00134d13:
JMP 0x00134d15
LAB_00134d15:
LEA RDI,[RBP + -0x38]
CALL 0x0010be58
ADD RSP,0xc0
POP RBP
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&,
int) */
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart
(PrettyUnitTestResultPrinter *this,UnitTest *param_1,int param_2)
{
byte bVar1;
int4 uVar2;
int iVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
testing local_98 [32];
testing local_78 [32];
int local_58;
char *local_48;
string local_40 [36];
int local_1c;
UnitTest *local_18;
PrettyUnitTestResultPrinter *local_10;
local_1c = param_2;
local_18 = param_1;
local_10 = this;
if (FLAGS_gtest_repeat != 1) {
printf("\nRepeating all tests (iteration %d) . . .\n\n",(ulong)(param_2 + 1));
}
std::__cxx11::string::string(local_40,(string *)FLAGS_gtest_filter_abi_cxx11_);
local_48 = (char *)std::__cxx11::string::c_str();
uVar4 = String::CStringEquals(local_48,"*");
if ((uVar4 & 1) == 0) {
/* try { // try from 00134b68 to 00134c91 has its CatchHandler @ 00134b86 */
ColoredPrintf(3,"Note: %s filter = %s\n","Google Test",local_48);
}
bVar1 = ShouldShard("GTEST_TOTAL_SHARDS","GTEST_SHARD_INDEX",false);
if ((bVar1 & 1) != 0) {
local_58 = Int32FromEnvOrDie("GTEST_SHARD_INDEX",-1);
iVar3 = local_58 + 1;
uVar5 = posix::GetEnv("GTEST_TOTAL_SHARDS");
ColoredPrintf(3,"Note: This is test shard %d of %s.\n",iVar3,uVar5);
}
if ((FLAGS_gtest_shuffle & 1) != 0) {
uVar2 = UnitTest::random_seed(local_18);
ColoredPrintf(3,"Note: Randomizing tests\' orders with a seed of %d .\n",uVar2);
}
ColoredPrintf(2,"[==========] ");
iVar3 = UnitTest::test_to_run_count(local_18);
FormatTestCount_abi_cxx11_(local_78,iVar3);
uVar5 = std::__cxx11::string::c_str();
/* try { // try from 00134ca8 to 00134cc6 has its CatchHandler @ 00134d27 */
iVar3 = UnitTest::test_suite_to_run_count(local_18);
FormatTestSuiteCount_abi_cxx11_(local_98,iVar3);
uVar6 = std::__cxx11::string::c_str();
/* try { // try from 00134cdf to 00134cec has its CatchHandler @ 00134d35 */
printf("Running %s from %s.\n",uVar5,uVar6);
std::__cxx11::string::~string((string *)local_98);
std::__cxx11::string::~string((string *)local_78);
/* try { // try from 00134d0e to 00134d12 has its CatchHandler @ 00134b86 */
fflush(*(FILE **)PTR_stdout_001a3fa0);
std::__cxx11::string::~string(local_40);
return;
}
|
|
671 | GetApplicationDirectory | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | const char *GetApplicationDirectory(void)
{
static char appDir[MAX_FILEPATH_LENGTH] = { 0 };
memset(appDir, 0, MAX_FILEPATH_LENGTH);
#if defined(_WIN32)
int len = 0;
#if defined(UNICODE)
unsigned short widePath[MAX_PATH];
len = GetModuleFileNameW(NULL, widePath, MAX_PATH);
len = WideCharToMultiByte(0, 0, widePath, len, appDir, MAX_PATH, NULL, NULL);
#else
len = GetModuleFileNameA(NULL, appDir, MAX_PATH);
#endif
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '\\')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '\\';
}
#elif defined(__linux__)
unsigned int size = sizeof(appDir);
ssize_t len = readlink("/proc/self/exe", appDir, size);
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__APPLE__)
uint32_t size = sizeof(appDir);
if (_NSGetExecutablePath(appDir, &size) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__FreeBSD__)
size_t size = sizeof(appDir);
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
if (sysctl(mib, 4, appDir, &size, NULL, 0) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#endif
return appDir;
} | O0 | c | GetApplicationDirectory:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x14d331(%rip), %rdi # 0x21e990
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0xa2d0
movl $0x1000, -0x4(%rbp) # imm = 0x1000
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0xe463c(%rip), %rdi # 0x1b5cba
leaq 0x14d30b(%rip), %rsi # 0x21e990
callq 0xa5b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0xd16db
movq -0x10(%rbp), %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xd16d9
movslq -0x14(%rbp), %rcx
leaq 0x14d2e3(%rip), %rax # 0x21e990
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0xd16cc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x14d2ca(%rip), %rax # 0x21e990
movb $0x0, (%rax,%rcx)
jmp 0xd16d9
jmp 0xd16ce
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xd169c
jmp 0xd16e9
movb $0x2e, 0x14d2ae(%rip) # 0x21e990
movb $0x2f, 0x14d2a8(%rip) # 0x21e991
leaq 0x14d2a0(%rip), %rax # 0x21e990
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| GetApplicationDirectory:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rdi, GetApplicationDirectory_appDir
xor esi, esi
mov edx, 1000h
call _memset
mov [rbp+var_4], 1000h
mov eax, [rbp+var_4]
mov edx, eax
lea rdi, aProcSelfExe; "/proc/self/exe"
lea rsi, GetApplicationDirectory_appDir
call _readlink
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jle short loc_D16DB
mov rax, [rbp+var_10]
mov [rbp+var_14], eax
loc_D169C:
cmp [rbp+var_14], 0
jl short loc_D16D9
movsxd rcx, [rbp+var_14]
lea rax, GetApplicationDirectory_appDir
movsx eax, byte ptr [rax+rcx]
cmp eax, 2Fh ; '/'
jnz short loc_D16CC
mov eax, [rbp+var_14]
add eax, 1
movsxd rcx, eax
lea rax, GetApplicationDirectory_appDir
mov byte ptr [rax+rcx], 0
jmp short loc_D16D9
loc_D16CC:
jmp short $+2
loc_D16CE:
mov eax, [rbp+var_14]
add eax, 0FFFFFFFFh
mov [rbp+var_14], eax
jmp short loc_D169C
loc_D16D9:
jmp short loc_D16E9
loc_D16DB:
mov cs:GetApplicationDirectory_appDir, 2Eh ; '.'
mov cs:byte_21E991, 2Fh ; '/'
loc_D16E9:
lea rax, GetApplicationDirectory_appDir
add rsp, 20h
pop rbp
retn
| char *GetApplicationDirectory()
{
int i; // [rsp+Ch] [rbp-14h]
long long v2; // [rsp+10h] [rbp-10h]
memset(GetApplicationDirectory_appDir, 0LL, 4096LL);
v2 = readlink("/proc/self/exe", GetApplicationDirectory_appDir, 4096LL);
if ( v2 <= 0 )
{
GetApplicationDirectory_appDir[0] = 46;
byte_21E991 = 47;
}
else
{
for ( i = v2; i >= 0; --i )
{
if ( GetApplicationDirectory_appDir[i] == 47 )
{
GetApplicationDirectory_appDir[i + 1] = 0;
return GetApplicationDirectory_appDir;
}
}
}
return GetApplicationDirectory_appDir;
}
| GetApplicationDirectory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RDI,[0x31e990]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x0010a2d0
MOV dword ptr [RBP + -0x4],0x1000
MOV EAX,dword ptr [RBP + -0x4]
MOV EDX,EAX
LEA RDI,[0x2b5cba]
LEA RSI,[0x31e990]
CALL 0x0010a5b0
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JLE 0x001d16db
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x14],EAX
LAB_001d169c:
CMP dword ptr [RBP + -0x14],0x0
JL 0x001d16d9
MOVSXD RCX,dword ptr [RBP + -0x14]
LEA RAX,[0x31e990]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x2f
JNZ 0x001d16cc
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOVSXD RCX,EAX
LEA RAX,[0x31e990]
MOV byte ptr [RAX + RCX*0x1],0x0
JMP 0x001d16d9
LAB_001d16cc:
JMP 0x001d16ce
LAB_001d16ce:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d169c
LAB_001d16d9:
JMP 0x001d16e9
LAB_001d16db:
MOV byte ptr [0x0031e990],0x2e
MOV byte ptr [0x0031e991],0x2f
LAB_001d16e9:
LEA RAX,[0x31e990]
ADD RSP,0x20
POP RBP
RET
|
int1 * GetApplicationDirectory(void)
{
ssize_t sVar1;
int local_1c;
memset(GetApplicationDirectory_appDir,0,0x1000);
sVar1 = readlink("/proc/self/exe",GetApplicationDirectory_appDir,0x1000);
if (sVar1 < 1) {
GetApplicationDirectory_appDir[0] = 0x2e;
GetApplicationDirectory_appDir[1] = 0x2f;
}
else {
for (local_1c = (int)sVar1; -1 < local_1c; local_1c = local_1c + -1) {
if (GetApplicationDirectory_appDir[local_1c] == '/') {
GetApplicationDirectory_appDir[local_1c + 1] = 0;
break;
}
}
}
return GetApplicationDirectory_appDir;
}
|
|
672 | GetApplicationDirectory | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | const char *GetApplicationDirectory(void)
{
static char appDir[MAX_FILEPATH_LENGTH] = { 0 };
memset(appDir, 0, MAX_FILEPATH_LENGTH);
#if defined(_WIN32)
int len = 0;
#if defined(UNICODE)
unsigned short widePath[MAX_PATH];
len = GetModuleFileNameW(NULL, widePath, MAX_PATH);
len = WideCharToMultiByte(0, 0, widePath, len, appDir, MAX_PATH, NULL, NULL);
#else
len = GetModuleFileNameA(NULL, appDir, MAX_PATH);
#endif
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '\\')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '\\';
}
#elif defined(__linux__)
unsigned int size = sizeof(appDir);
ssize_t len = readlink("/proc/self/exe", appDir, size);
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__APPLE__)
uint32_t size = sizeof(appDir);
if (_NSGetExecutablePath(appDir, &size) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__FreeBSD__)
size_t size = sizeof(appDir);
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
if (sysctl(mib, 4, appDir, &size, NULL, 0) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#endif
return appDir;
} | O1 | c | GetApplicationDirectory:
pushq %rbx
leaq 0xcb5f9(%rip), %rbx # 0x1458c0
movl $0x1000, %edx # imm = 0x1000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x92d0
leaq 0x6bed1(%rip), %rdi # 0xe61ae
movl $0x1000, %edx # imm = 0x1000
movq %rbx, %rsi
callq 0x95c0
testq %rax, %rax
jle 0x7a30f
testl %eax, %eax
js 0x7a31d
leal 0x1(%rax), %ecx
addq %rbx, %rcx
movl %eax, %edx
cmpb $0x2f, (%rdx,%rbx)
je 0x7a31a
leal -0x1(%rax), %edx
decq %rcx
testl %eax, %eax
movl %edx, %eax
jg 0x7a2f9
jmp 0x7a31d
movw $0x2f2e, 0xcb5a8(%rip) # imm = 0x2F2E
jmp 0x7a31d
movb $0x0, (%rcx)
leaq 0xcb59c(%rip), %rax # 0x1458c0
popq %rbx
retq
| GetApplicationDirectory:
push rbx
lea rbx, GetApplicationDirectory_appDir
mov edx, 1000h
mov rdi, rbx
xor esi, esi
call _memset
lea rdi, aProcSelfExe; "/proc/self/exe"
mov edx, 1000h
mov rsi, rbx
call _readlink
test rax, rax
jle short loc_7A30F
test eax, eax
js short loc_7A31D
lea ecx, [rax+1]
add rcx, rbx
loc_7A2F9:
mov edx, eax
cmp byte ptr [rdx+rbx], 2Fh ; '/'
jz short loc_7A31A
lea edx, [rax-1]
dec rcx
test eax, eax
mov eax, edx
jg short loc_7A2F9
jmp short loc_7A31D
loc_7A30F:
mov cs:GetApplicationDirectory_appDir, 2F2Eh
jmp short loc_7A31D
loc_7A31A:
mov byte ptr [rcx], 0
loc_7A31D:
lea rax, GetApplicationDirectory_appDir
pop rbx
retn
| __int16 *GetApplicationDirectory()
{
long long v0; // rax
_BYTE *v1; // rcx
bool v2; // cc
memset(&GetApplicationDirectory_appDir, 0LL, 4096LL);
v0 = readlink("/proc/self/exe", &GetApplicationDirectory_appDir, 4096LL);
if ( v0 <= 0 )
{
GetApplicationDirectory_appDir = 12078;
}
else if ( (int)v0 >= 0 )
{
v1 = (char *)&GetApplicationDirectory_appDir + (unsigned int)(v0 + 1);
while ( *((_BYTE *)&GetApplicationDirectory_appDir + (unsigned int)v0) != 47 )
{
--v1;
v2 = (int)v0 <= 0;
LODWORD(v0) = v0 - 1;
if ( v2 )
return &GetApplicationDirectory_appDir;
}
*v1 = 0;
}
return &GetApplicationDirectory_appDir;
}
| GetApplicationDirectory:
PUSH RBX
LEA RBX,[0x2458c0]
MOV EDX,0x1000
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001092d0
LEA RDI,[0x1e61ae]
MOV EDX,0x1000
MOV RSI,RBX
CALL 0x001095c0
TEST RAX,RAX
JLE 0x0017a30f
TEST EAX,EAX
JS 0x0017a31d
LEA ECX,[RAX + 0x1]
ADD RCX,RBX
LAB_0017a2f9:
MOV EDX,EAX
CMP byte ptr [RDX + RBX*0x1],0x2f
JZ 0x0017a31a
LEA EDX,[RAX + -0x1]
DEC RCX
TEST EAX,EAX
MOV EAX,EDX
JG 0x0017a2f9
JMP 0x0017a31d
LAB_0017a30f:
MOV word ptr [0x002458c0],0x2f2e
JMP 0x0017a31d
LAB_0017a31a:
MOV byte ptr [RCX],0x0
LAB_0017a31d:
LEA RAX,[0x2458c0]
POP RBX
RET
|
int1 * GetApplicationDirectory(void)
{
int iVar1;
ulong uVar2;
int1 *puVar3;
memset(GetApplicationDirectory_appDir,0,0x1000);
uVar2 = readlink("/proc/self/exe",GetApplicationDirectory_appDir,0x1000);
if ((long)uVar2 < 1) {
GetApplicationDirectory_appDir._0_2_ = 0x2f2e;
}
else if (-1 < (int)uVar2) {
puVar3 = GetApplicationDirectory_appDir + ((int)uVar2 + 1);
do {
iVar1 = (int)uVar2;
if (GetApplicationDirectory_appDir[uVar2 & 0xffffffff] == '/') {
*puVar3 = 0;
break;
}
puVar3 = puVar3 + -1;
uVar2 = (ulong)(iVar1 - 1);
} while (0 < iVar1);
}
return GetApplicationDirectory_appDir;
}
|
|
673 | GetApplicationDirectory | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | const char *GetApplicationDirectory(void)
{
static char appDir[MAX_FILEPATH_LENGTH] = { 0 };
memset(appDir, 0, MAX_FILEPATH_LENGTH);
#if defined(_WIN32)
int len = 0;
#if defined(UNICODE)
unsigned short widePath[MAX_PATH];
len = GetModuleFileNameW(NULL, widePath, MAX_PATH);
len = WideCharToMultiByte(0, 0, widePath, len, appDir, MAX_PATH, NULL, NULL);
#else
len = GetModuleFileNameA(NULL, appDir, MAX_PATH);
#endif
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '\\')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '\\';
}
#elif defined(__linux__)
unsigned int size = sizeof(appDir);
ssize_t len = readlink("/proc/self/exe", appDir, size);
if (len > 0)
{
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__APPLE__)
uint32_t size = sizeof(appDir);
if (_NSGetExecutablePath(appDir, &size) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#elif defined(__FreeBSD__)
size_t size = sizeof(appDir);
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
if (sysctl(mib, 4, appDir, &size, NULL, 0) == 0)
{
int len = strlen(appDir);
for (int i = len; i >= 0; --i)
{
if (appDir[i] == '/')
{
appDir[i + 1] = '\0';
break;
}
}
}
else
{
appDir[0] = '.';
appDir[1] = '/';
}
#endif
return appDir;
} | O2 | c | GetApplicationDirectory:
pushq %rbx
leaq 0xc7f7a(%rip), %rbx # 0x12b8f0
movl $0x1000, %edx # imm = 0x1000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x92c0
leaq 0x62a22(%rip), %rdi # 0xc63ae
movl $0x1000, %edx # imm = 0x1000
movq %rbx, %rsi
callq 0x95b0
testq %rax, %rax
jle 0x639b7
leal 0x1(%rax), %ecx
addq %rbx, %rcx
testl %eax, %eax
js 0x639c5
movl %eax, %edx
cmpb $0x2f, (%rdx,%rbx)
je 0x639c2
decl %eax
decq %rcx
jmp 0x639a4
movw $0x2f2e, 0xc7f30(%rip) # imm = 0x2F2E
jmp 0x639c5
movb $0x0, (%rcx)
leaq 0xc7f24(%rip), %rax # 0x12b8f0
popq %rbx
retq
| GetApplicationDirectory:
push rbx
lea rbx, GetApplicationDirectory_appDir
mov edx, 1000h
mov rdi, rbx
xor esi, esi
call _memset
lea rdi, aProcSelfExe; "/proc/self/exe"
mov edx, 1000h
mov rsi, rbx
call _readlink
test rax, rax
jle short loc_639B7
lea ecx, [rax+1]
add rcx, rbx
loc_639A4:
test eax, eax
js short loc_639C5
mov edx, eax
cmp byte ptr [rdx+rbx], 2Fh ; '/'
jz short loc_639C2
dec eax
dec rcx
jmp short loc_639A4
loc_639B7:
mov cs:GetApplicationDirectory_appDir, 2F2Eh
jmp short loc_639C5
loc_639C2:
mov byte ptr [rcx], 0
loc_639C5:
lea rax, GetApplicationDirectory_appDir
pop rbx
retn
| __int16 *GetApplicationDirectory()
{
long long v0; // rax
_BYTE *v1; // rcx
memset(&GetApplicationDirectory_appDir, 0LL, 4096LL);
v0 = readlink("/proc/self/exe", &GetApplicationDirectory_appDir, 4096LL);
if ( v0 <= 0 )
{
GetApplicationDirectory_appDir = 12078;
}
else
{
v1 = (char *)&GetApplicationDirectory_appDir + (unsigned int)(v0 + 1);
while ( (int)v0 >= 0 )
{
if ( *((_BYTE *)&GetApplicationDirectory_appDir + (unsigned int)v0) == 47 )
{
*v1 = 0;
return &GetApplicationDirectory_appDir;
}
LODWORD(v0) = v0 - 1;
--v1;
}
}
return &GetApplicationDirectory_appDir;
}
| GetApplicationDirectory:
PUSH RBX
LEA RBX,[0x22b8f0]
MOV EDX,0x1000
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001092c0
LEA RDI,[0x1c63ae]
MOV EDX,0x1000
MOV RSI,RBX
CALL 0x001095b0
TEST RAX,RAX
JLE 0x001639b7
LEA ECX,[RAX + 0x1]
ADD RCX,RBX
LAB_001639a4:
TEST EAX,EAX
JS 0x001639c5
MOV EDX,EAX
CMP byte ptr [RDX + RBX*0x1],0x2f
JZ 0x001639c2
DEC EAX
DEC RCX
JMP 0x001639a4
LAB_001639b7:
MOV word ptr [0x0022b8f0],0x2f2e
JMP 0x001639c5
LAB_001639c2:
MOV byte ptr [RCX],0x0
LAB_001639c5:
LEA RAX,[0x22b8f0]
POP RBX
RET
|
int1 * GetApplicationDirectory(void)
{
ulong uVar1;
int1 *puVar2;
memset(GetApplicationDirectory_appDir,0,0x1000);
uVar1 = readlink("/proc/self/exe",GetApplicationDirectory_appDir,0x1000);
if ((long)uVar1 < 1) {
GetApplicationDirectory_appDir._0_2_ = 0x2f2e;
}
else {
puVar2 = GetApplicationDirectory_appDir + ((int)uVar1 + 1);
for (; -1 < (int)uVar1; uVar1 = (ulong)((int)uVar1 - 1)) {
if (GetApplicationDirectory_appDir[uVar1 & 0xffffffff] == '/') {
*puVar2 = 0;
return GetApplicationDirectory_appDir;
}
puVar2 = puVar2 + -1;
}
}
return GetApplicationDirectory_appDir;
}
|
|
674 | CLI::App::parse(int, char const* const*) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::parse(int argc, const char *const *argv) {
// If the name is not set, read from command line
if(name_.empty() || has_automatic_name_) {
has_automatic_name_ = true;
name_ = argv[0];
}
std::vector<std::string> args;
args.reserve(static_cast<std::size_t>(argc) - 1U);
for(auto i = static_cast<std::size_t>(argc) - 1U; i > 0U; --i)
args.emplace_back(argv[i]);
parse(std::move(args));
} | O1 | cpp | CLI::App::parse(int, char const* const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0xc43b
cmpb $0x1, 0x4b(%rbx)
jne 0xc461
leaq 0x8(%rbx), %r12
movb $0x1, 0x4b(%rbx)
movq (%r14), %r13
movq %r13, %rdi
callq 0x71a0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x7660
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq %ebp, %r12
leaq -0x1(%r12), %r15
movq %r15, %rsi
callq 0x1de08
testq %r15, %r15
je 0xc4a6
leaq (%r14,%r12,8), %r14
addq $-0x8, %r14
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1def0
addq $-0x8, %r14
decq %r15
jne 0xc492
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1df36
movq %rsp, %rdi
callq 0xaf62
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc4ca
movq %rax, %rbx
movq %rsp, %rdi
callq 0xaf62
movq %rbx, %rdi
callq 0x7780
nop
| _ZN3CLI3App5parseEiPKPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov ebp, esi
mov rbx, rdi
mov r15, [rdi+10h]
test r15, r15
jz short loc_C43B
cmp byte ptr [rbx+4Bh], 1
jnz short loc_C461
loc_C43B:
lea r12, [rbx+8]
mov byte ptr [rbx+4Bh], 1
mov r13, [r14]
mov rdi, r13
call _strlen
mov rdi, r12
xor esi, esi
mov rdx, r15
mov rcx, r13
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_C461:
xorps xmm0, xmm0
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
movsxd r12, ebp
lea r15, [r12-1]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
test r15, r15
jz short loc_C4A6
lea r14, [r14+r12*8]
add r14, 0FFFFFFFFFFFFFFF8h
mov r12, rsp
loc_C492:
mov rdi, r12
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRKPKcEEERS5_DpOT_; std::vector<std::string>::emplace_back<char const* const&>(char const* const&)
add r14, 0FFFFFFFFFFFFFFF8h
dec r15
jnz short loc_C492
loc_C4A6:
mov rsi, rsp
mov rdi, rbx; this
call _ZN3CLI3App5parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::parse(std::vector<std::string> &&)
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_C4CA:
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void CLI::App::parse(CLI::App *this, int a2, const char *const *a3)
{
long long v4; // r15
long long v5; // r13
long long v6; // rax
long long v7; // r15
const char *const *v8; // r14
__int128 v9; // [rsp+0h] [rbp-48h] BYREF
long long v10; // [rsp+10h] [rbp-38h]
v4 = *((_QWORD *)this + 2);
if ( !v4 || *((_BYTE *)this + 75) == 1 )
{
*((_BYTE *)this + 75) = 1;
v5 = (long long)*a3;
v6 = strlen(*a3);
std::string::_M_replace((char *)this + 8, 0LL, v4, v5, v6);
}
v9 = 0LL;
v10 = 0LL;
v7 = a2 - 1LL;
((void ( *)(__int128 *, long long))std::vector<std::string>::reserve)(&v9, v7);
if ( a2 != 1LL )
{
v8 = &a3[a2 - 1];
do
{
std::vector<std::string>::emplace_back<char const* const&>(&v9, v8--);
--v7;
}
while ( v7 );
}
CLI::App::parse(this);
std::vector<std::string>::~vector(&v9);
}
| parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x10]
TEST R15,R15
JZ 0x0010c43b
CMP byte ptr [RBX + 0x4b],0x1
JNZ 0x0010c461
LAB_0010c43b:
LEA R12,[RBX + 0x8]
MOV byte ptr [RBX + 0x4b],0x1
MOV R13,qword ptr [R14]
MOV RDI,R13
CALL 0x001071a0
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R13
MOV R8,RAX
CALL 0x00107660
LAB_0010c461:
XORPS XMM0,XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOVSXD R12,EBP
LEA R15,[R12 + -0x1]
LAB_0010c47a:
MOV RSI,R15
CALL 0x0011de08
TEST R15,R15
JZ 0x0010c4a6
LEA R14,[R14 + R12*0x8]
ADD R14,-0x8
MOV R12,RSP
LAB_0010c492:
MOV RDI,R12
MOV RSI,R14
CALL 0x0011def0
ADD R14,-0x8
DEC R15
JNZ 0x0010c492
LAB_0010c4a6:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011df36
LAB_0010c4b1:
MOV RDI,RSP
CALL 0x0010af62
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CLI::App::parse(int, char const* const*) */
void __thiscall CLI::App::parse(App *this,int param_1,char **param_2)
{
char *pcVar1;
char *__s;
char **ppcVar2;
ulong uVar3;
int8 local_48;
int8 uStack_40;
int8 local_38;
pcVar1 = *(char **)(this + 0x10);
if ((pcVar1 == (char *)0x0) || (this[0x4b] == (App)0x1)) {
this[0x4b] = (App)0x1;
__s = *param_2;
strlen(__s);
std::__cxx11::string::_M_replace((ulong)(this + 8),0,pcVar1,(ulong)__s);
}
local_48 = 0;
uStack_40 = 0;
local_38 = 0;
uVar3 = (long)param_1 - 1;
/* try { // try from 0010c47a to 0010c481 has its CatchHandler @ 0010c4c8 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48,uVar3);
if (uVar3 != 0) {
ppcVar2 = param_2 + param_1;
do {
/* try { // try from 0010c492 to 0010c49c has its CatchHandler @ 0010c4ca */
ppcVar2 = ppcVar2 + -1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<char_const*const&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48,
ppcVar2);
uVar3 = uVar3 - 1;
} while (uVar3 != 0);
}
/* try { // try from 0010c4a6 to 0010c4b0 has its CatchHandler @ 0010c4c8 */
parse(this,(vector *)&local_48);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48);
return;
}
|
|
675 | virtual thunk to nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O0 | c | virtual thunk to nglog::NullStream::~NullStream():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xbf90
movq -0x10(%rbp), %rdi
movl $0x168, %esi # imm = 0x168
callq 0x9720
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog10NullStreamD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
mov rdi, [rbp+var_10]; void *
mov esi, 168h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
nglog::NullStream::~NullStream(this);
operator delete(this, 0x168uLL);
}
| ~NullStream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x0010bf90
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x168
CALL 0x00109720
ADD RSP,0x10
POP RBP
RET
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
~NullStream(this);
operator_delete(this,0x168);
return;
}
|
|
676 | virtual thunk to nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O2 | c | virtual thunk to nglog::NullStream::~NullStream():
movq (%rdi), %rax
addq -0x18(%rax), %rdi
jmp 0x8d40
| _ZTv0_n24_N5nglog10NullStreamD0Ev:
mov rax, [rdi]
add rdi, [rax-18h]; this
jmp _ZN5nglog10NullStreamD0Ev; nglog::NullStream::~NullStream()
| void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this)
{
nglog::NullStream::~NullStream((nglog::NullStream *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL)));
}
| ~NullStream:
MOV RAX,qword ptr [RDI]
ADD RDI,qword ptr [RAX + -0x18]
JMP 0x00108d40
|
/* virtual thunk to nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
~NullStream(this + *(long *)(*(long *)this + -0x18));
return;
}
|
|
677 | virtual thunk to nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O3 | c | virtual thunk to nglog::NullStream::~NullStream():
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %rbx
leaq 0x1d5ec(%rip), %rcx # 0x2e590
leaq 0x18(%rcx), %rdx
leaq (%rdi,%rax), %r14
addq $0x60, %r14
movq %rdx, -0x60(%r14)
addq $0x40, %rcx
movq %rcx, (%r14)
movq 0x1df86(%rip), %rcx # 0x2ef48
addq $0x10, %rcx
movq %rcx, -0x58(%r14)
addq %rax, %rdi
addq $0x40, %rdi
callq 0x77b0
movq %r14, %rdi
callq 0x7170
movl $0x168, %esi # imm = 0x168
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7540
| _ZTv0_n24_N5nglog10NullStreamD0Ev:
push r14
push rbx
push rax
mov rax, [rdi]
mov rax, [rax-18h]
lea rbx, [rdi+rax]
lea rcx, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rdx, [rcx+18h]
lea r14, [rdi+rax]
add r14, 60h ; '`'
mov [r14-60h], rdx
add rcx, 40h ; '@'
mov [r14], rcx
mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rcx, 10h
mov [r14-58h], rcx
add rdi, rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov esi, 168h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop r14
jmp __ZdlPvm; operator delete(void *,ulong)
| void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this)
{
_QWORD *v1; // rbx
v1 = (_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL));
*v1 = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
v1[12] = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
v1[1] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)(v1 + 8));
std::ios_base::~ios_base((std::ios_base *)(v1 + 12));
operator delete(v1, 0x168uLL);
}
| ~NullStream:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
LEA RBX,[RDI + RAX*0x1]
LEA RCX,[0x12e590]
LEA RDX,[RCX + 0x18]
LEA R14,[RDI + RAX*0x1]
ADD R14,0x60
MOV qword ptr [R14 + -0x60],RDX
ADD RCX,0x40
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [0x0012ef48]
ADD RCX,0x10
MOV qword ptr [R14 + -0x58],RCX
ADD RDI,RAX
ADD RDI,0x40
CALL 0x001077b0
MOV RDI,R14
CALL 0x00107170
MOV ESI,0x168
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00107540
|
/* virtual thunk to nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
NullStream *pNVar1;
long lVar2;
lVar2 = *(long *)(*(long *)this + -0x18);
pNVar1 = this + lVar2;
*(int8 *)pNVar1 = 0x12e5a8;
*(int8 *)(pNVar1 + 0x60) = 0x12e5d0;
*(int **)(pNVar1 + 8) = PTR_vtable_0012ef48 + 0x10;
std::locale::~locale((locale *)(this + lVar2 + 0x40));
std::ios_base::~ios_base((ios_base *)(pNVar1 + 0x60));
operator_delete(this + lVar2,0x168);
return;
}
|
|
678 | is_backtrace_needed | bluesky950520[P]quickjs/quickjs.c | static BOOL is_backtrace_needed(JSContext *ctx, JSValue obj)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != JS_CLASS_ERROR)
return FALSE;
if (find_own_property1(p, JS_ATOM_stack))
return FALSE;
return TRUE;
} | O0 | c | is_backtrace_needed:
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x1, %eax
je 0x6d55a
movl $0x0, 0x2c(%rsp)
jmp 0x6d65a
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x3, %eax
je 0x6d57f
movl $0x0, 0x2c(%rsp)
jmp 0x6d65a
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x36, 0x54(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x54(%rsp), %eax
movq 0x48(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5d8b0
xorl %ecx, %ecx
subq 0x30(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2c280
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x6d637
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x54(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x6d616
jmp 0x6d622
movq 0x40(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x6d640
movq 0x40(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x6d5df
movq $0x0, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x6d652
movl $0x0, 0x2c(%rsp)
jmp 0x6d65a
movl $0x1, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| is_backtrace_needed:
sub rsp, 68h
mov [rsp+68h+var_50], rsi
mov [rsp+68h+var_48], rdx
mov [rsp+68h+var_58], rdi
mov rax, [rsp+68h+var_48]
cmp eax, 0FFFFFFFFh
jz short loc_6D55A
mov [rsp+68h+var_3C], 0
jmp loc_6D65A
loc_6D55A:
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_60]
movzx eax, word ptr [rax+6]
cmp eax, 3
jz short loc_6D57F
mov [rsp+68h+var_3C], 0
jmp loc_6D65A
loc_6D57F:
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_14], 36h ; '6'
mov rax, [rsp+68h+var_10]
mov rax, [rax+18h]
mov [rsp+68h+var_20], rax
mov eax, [rsp+68h+var_14]
mov rcx, [rsp+68h+var_20]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+68h+var_38]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call get_shape_prop
mov [rsp+68h+var_30], rax
loc_6D5DF:
cmp [rsp+68h+var_38], 0
jz short loc_6D637
mov rax, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_38]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_28]
mov eax, [rax+4]
cmp eax, [rsp+68h+var_14]
setz al
test al, 1
jnz short loc_6D616
jmp short loc_6D622
loc_6D616:
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_8], rax
jmp short loc_6D640
loc_6D622:
mov rax, [rsp+68h+var_28]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+68h+var_38], rax
jmp short loc_6D5DF
loc_6D637:
mov [rsp+68h+var_8], 0
loc_6D640:
cmp [rsp+68h+var_8], 0
jz short loc_6D652
mov [rsp+68h+var_3C], 0
jmp short loc_6D65A
loc_6D652:
mov [rsp+68h+var_3C], 1
loc_6D65A:
mov eax, [rsp+68h+var_3C]
add rsp, 68h
retn
| _BOOL8 is_backtrace_needed(long long a1, long long a2, int a3)
{
long long v5; // [rsp+30h] [rbp-38h]
long long v6; // [rsp+30h] [rbp-38h]
long long shape_prop; // [rsp+38h] [rbp-30h]
_DWORD *v8; // [rsp+40h] [rbp-28h]
long long v9; // [rsp+48h] [rbp-20h]
long long v10; // [rsp+60h] [rbp-8h]
if ( a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 3 )
{
v9 = *(_QWORD *)(a2 + 24);
v5 = *(_DWORD *)(v9 + 32) & 0x36LL;
v6 = *(unsigned int *)(prop_hash_end(v9) + 4 * (-v5 - 1));
shape_prop = get_shape_prop(v9);
while ( v6 )
{
v8 = (_DWORD *)(8 * (v6 - 1) + shape_prop);
if ( v8[1] == 54 )
{
v10 = 8 * (v6 - 1) + shape_prop;
return v10 == 0;
}
v6 = *v8 & 0x3FFFFFF;
}
v10 = 0LL;
return v10 == 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
| is_backtrace_needed:
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x1
JZ 0x0016d55a
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016d65a
LAB_0016d55a:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x3
JZ 0x0016d57f
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016d65a
LAB_0016d57f:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x54],0x36
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0015d8b0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0012c280
MOV qword ptr [RSP + 0x38],RAX
LAB_0016d5df:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x0016d637
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x54]
SETZ AL
TEST AL,0x1
JNZ 0x0016d616
JMP 0x0016d622
LAB_0016d616:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0016d640
LAB_0016d622:
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0016d5df
LAB_0016d637:
MOV qword ptr [RSP + 0x60],0x0
LAB_0016d640:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x0016d652
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016d65a
LAB_0016d652:
MOV dword ptr [RSP + 0x2c],0x1
LAB_0016d65a:
MOV EAX,dword ptr [RSP + 0x2c]
ADD RSP,0x68
RET
|
int4 is_backtrace_needed(int8 param_1,long param_2,int param_3)
{
uint uVar1;
long lVar2;
long lVar3;
int4 local_3c;
ulong local_38;
uint *local_8;
if (param_3 == -1) {
if (*(short *)(param_2 + 6) == 3) {
lVar3 = *(long *)(param_2 + 0x18);
uVar1 = *(uint *)(lVar3 + 0x20);
lVar2 = prop_hash_end(lVar3);
uVar1 = *(uint *)(lVar2 + (-1 - (ulong)(uVar1 & 0x36)) * 4);
lVar3 = get_shape_prop(lVar3);
while (local_38 = (ulong)uVar1, local_38 != 0) {
local_8 = (uint *)(lVar3 + (local_38 - 1) * 8);
if (local_8[1] == 0x36) goto LAB_0016d640;
uVar1 = *local_8 & 0x3ffffff;
}
local_8 = (uint *)0x0;
LAB_0016d640:
if (local_8 == (uint *)0x0) {
local_3c = 1;
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
return local_3c;
}
|
|
679 | init_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
int init_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size,
uint partitions,
my_bool use_op_lock)
{
void *keycache_cb;
int blocks;
if (keycache->key_cache_inited)
{
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
keycache_cb= keycache->keycache_cb;
}
else
{
if (partitions == 0)
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(0))))
return 0;
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= SIMPLE_KEY_CACHE;
keycache->interface_funcs= &simple_key_cache_funcs;
}
else
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(PARTITIONED_KEY_CACHE_CB),
MYF(0))))
return 0;
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= PARTITIONED_KEY_CACHE;
keycache->interface_funcs= &partitioned_key_cache_funcs;
}
/*
Initialize op_lock if it's not initialized before.
The mutex may have been initialized before if we are being called
from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_init(&keycache->op_lock, MY_MUTEX_INIT_FAST);
keycache->keycache_cb= keycache_cb;
keycache->key_cache_inited= 1;
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
}
if (partitions != 0)
{
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions= partitions;
}
keycache->can_be_used= 0;
blocks= keycache->interface_funcs->init(keycache_cb, key_cache_block_size,
use_mem, division_limit,
age_threshold, changed_blocks_hash_size);
keycache->partitions= partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions :
0;
DBUG_ASSERT(partitions <= MAX_KEY_CACHE_PARTITIONS);
keycache->key_cache_mem_size=
keycache->partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size :
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size;
if (blocks > 0)
keycache->can_be_used= 1;
if (use_op_lock)
pthread_mutex_unlock(&keycache->op_lock);
return blocks;
} | O3 | c | init_key_cache_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movl %ecx, %r13d
movq %rdx, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %ecx
cmpb $0x0, 0x48(%rdi)
je 0x9813c
cmpb $0x0, 0x18(%rbp)
je 0x98133
leaq 0x58(%rbx), %rdi
movl %r8d, %r15d
movl %r13d, -0x2c(%rbp)
movl %esi, %r13d
callq 0x29200
movl %r13d, %esi
movl 0x10(%rbp), %ecx
movl -0x2c(%rbp), %r13d
movl %r15d, %r8d
movq 0x8(%rbx), %r15
jmp 0x981e9
movl %esi, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r12d, -0x2c(%rbp)
leaq 0xb700aa(%rip), %rax # 0xc081f8
movl (%rax), %edi
xorl %r12d, %r12d
testl %ecx, %ecx
je 0x9817e
movl $0x20, %esi
xorl %edx, %edx
callq 0x9fdb5
testq %rax, %rax
je 0x98254
movq %rax, %r15
leaq 0x2ed5e2(%rip), %rax # 0x385758
movl $0x1, %r12d
jmp 0x9819d
movl $0x170, %esi # imm = 0x170
xorl %edx, %edx
callq 0x9fdb5
testq %rax, %rax
je 0x98254
movq %rax, %r15
leaq 0x2ed56b(%rip), %rax # 0x385708
movb $0x0, (%r15)
movl %r12d, (%rbx)
movq %rax, 0x10(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x981d3
leaq 0x58(%rbx), %r12
leaq 0xb703b7(%rip), %rsi # 0xc08570
movq %r12, %rdi
callq 0x29320
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movq %r12, %rdi
callq 0x29200
jmp 0x981db
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movl -0x2c(%rbp), %r12d
movl -0x34(%rbp), %r8d
movl 0x10(%rbp), %ecx
movl -0x30(%rbp), %esi
testl %ecx, %ecx
je 0x981f1
movl %ecx, 0x1c(%r15)
movb $0x0, 0x49(%rbx)
movq 0x10(%rbx), %rax
movq %r15, %rdi
movq %r14, %rdx
movl %ecx, %r14d
movl %r13d, %ecx
movl %r12d, %r9d
callq *(%rax)
movl %eax, %r12d
testl %r14d, %r14d
je 0x98227
movl 0x1c(%r15), %eax
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x8(,%rcx,8), %rcx
jmp 0x9822e
xorl %eax, %eax
movl $0x8, %ecx
movl %eax, 0x4c(%rbx)
movq (%r15,%rcx), %rax
movq %rax, 0x50(%rbx)
testl %r12d, %r12d
jle 0x98242
movb $0x1, 0x49(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x98254
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x291c0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_key_cache_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, r9d
mov r13d, ecx
mov r14, rdx
mov rbx, rdi
mov ecx, [rbp+arg_0]
cmp byte ptr [rdi+48h], 0
jz short loc_9813C
cmp [rbp+arg_8], 0
jz short loc_98133
lea rdi, [rbx+58h]
mov r15d, r8d
mov [rbp+var_2C], r13d
mov r13d, esi
call _pthread_mutex_lock
mov esi, r13d
mov ecx, [rbp+arg_0]
mov r13d, [rbp+var_2C]
mov r8d, r15d
loc_98133:
mov r15, [rbx+8]
jmp loc_981E9
loc_9813C:
mov [rbp+var_30], esi
mov [rbp+var_34], r8d
mov [rbp+var_2C], r12d
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
xor r12d, r12d
test ecx, ecx
jz short loc_9817E
mov esi, 20h ; ' '
xor edx, edx
call my_malloc
test rax, rax
jz loc_98254
mov r15, rax
lea rax, partitioned_key_cache_funcs
mov r12d, 1
jmp short loc_9819D
loc_9817E:
mov esi, 170h
xor edx, edx
call my_malloc
test rax, rax
jz loc_98254
mov r15, rax
lea rax, simple_key_cache_funcs
loc_9819D:
mov byte ptr [r15], 0
mov [rbx], r12d
mov [rbx+10h], rax
cmp [rbp+arg_8], 0
jz short loc_981D3
lea r12, [rbx+58h]
lea rsi, my_fast_mutexattr
mov rdi, r12
call _pthread_mutex_init
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
mov rdi, r12
call _pthread_mutex_lock
jmp short loc_981DB
loc_981D3:
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
loc_981DB:
mov r12d, [rbp+var_2C]
mov r8d, [rbp+var_34]
mov ecx, [rbp+arg_0]
mov esi, [rbp+var_30]
loc_981E9:
test ecx, ecx
jz short loc_981F1
mov [r15+1Ch], ecx
loc_981F1:
mov byte ptr [rbx+49h], 0
mov rax, [rbx+10h]
mov rdi, r15
mov rdx, r14
mov r14d, ecx
mov ecx, r13d
mov r9d, r12d
call qword ptr [rax]
mov r12d, eax
test r14d, r14d
jz short loc_98227
mov eax, [r15+1Ch]
xor ecx, ecx
test eax, eax
setnz cl
lea rcx, ds:8[rcx*8]
jmp short loc_9822E
loc_98227:
xor eax, eax
mov ecx, 8
loc_9822E:
mov [rbx+4Ch], eax
mov rax, [r15+rcx]
mov [rbx+50h], rax
test r12d, r12d
jle short loc_98242
mov byte ptr [rbx+49h], 1
loc_98242:
cmp [rbp+arg_8], 0
jz short loc_98254
add rbx, 58h ; 'X'
mov rdi, rbx
call _pthread_mutex_unlock
loc_98254:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long init_key_cache_internal(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
int a7,
char a8)
{
unsigned int v8; // r12d
int v11; // ecx
unsigned int v12; // r15d
long long v13; // r15
unsigned int v14; // r12d
long long v15; // rax
long long ( **v16)(); // rax
long long v17; // rax
long long v18; // rdx
int v19; // r14d
int v20; // eax
long long v21; // rcx
unsigned int v23; // [rsp+Ch] [rbp-34h]
v8 = a6;
v11 = a7;
if ( *(_BYTE *)(a1 + 72) )
{
if ( a8 )
{
v12 = a5;
pthread_mutex_lock(a1 + 88);
a2 = (unsigned int)a2;
v11 = a7;
a5 = v12;
}
v13 = *(_QWORD *)(a1 + 8);
}
else
{
v23 = a5;
v14 = 0;
if ( a7 )
{
v15 = my_malloc(key_memory_KEY_CACHE, 32LL, 0LL);
if ( !v15 )
return v14;
v13 = v15;
v16 = partitioned_key_cache_funcs;
v14 = 1;
}
else
{
v17 = my_malloc(key_memory_KEY_CACHE, 368LL, 0LL);
if ( !v17 )
return v14;
v13 = v17;
v16 = simple_key_cache_funcs;
}
*(_BYTE *)v13 = 0;
*(_DWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v16;
if ( a8 )
{
pthread_mutex_init(a1 + 88, &my_fast_mutexattr);
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
pthread_mutex_lock(a1 + 88);
}
else
{
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
}
v8 = a6;
a5 = v23;
v11 = a7;
a2 = (unsigned int)a2;
}
if ( v11 )
*(_DWORD *)(v13 + 28) = v11;
*(_BYTE *)(a1 + 73) = 0;
v18 = a3;
v19 = v11;
v14 = (**(long long ( ***)(long long, long long, long long, _QWORD, long long, _QWORD))(a1 + 16))(
v13,
a2,
v18,
a4,
a5,
v8);
if ( v19 )
{
v20 = *(_DWORD *)(v13 + 28);
v21 = 8LL * (v20 != 0) + 8;
}
else
{
v20 = 0;
v21 = 8LL;
}
*(_DWORD *)(a1 + 76) = v20;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(v13 + v21);
if ( (int)v14 > 0 )
*(_BYTE *)(a1 + 73) = 1;
if ( a8 )
pthread_mutex_unlock(a1 + 88);
return v14;
}
| init_key_cache_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12D,R9D
MOV R13D,ECX
MOV R14,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RBP + 0x10]
CMP byte ptr [RDI + 0x48],0x0
JZ 0x0019813c
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00198133
LEA RDI,[RBX + 0x58]
MOV R15D,R8D
MOV dword ptr [RBP + -0x2c],R13D
MOV R13D,ESI
CALL 0x00129200
MOV ESI,R13D
MOV ECX,dword ptr [RBP + 0x10]
MOV R13D,dword ptr [RBP + -0x2c]
MOV R8D,R15D
LAB_00198133:
MOV R15,qword ptr [RBX + 0x8]
JMP 0x001981e9
LAB_0019813c:
MOV dword ptr [RBP + -0x30],ESI
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBP + -0x2c],R12D
LEA RAX,[0xd081f8]
MOV EDI,dword ptr [RAX]
XOR R12D,R12D
TEST ECX,ECX
JZ 0x0019817e
MOV ESI,0x20
XOR EDX,EDX
CALL 0x0019fdb5
TEST RAX,RAX
JZ 0x00198254
MOV R15,RAX
LEA RAX,[0x485758]
MOV R12D,0x1
JMP 0x0019819d
LAB_0019817e:
MOV ESI,0x170
XOR EDX,EDX
CALL 0x0019fdb5
TEST RAX,RAX
JZ 0x00198254
MOV R15,RAX
LEA RAX,[0x485708]
LAB_0019819d:
MOV byte ptr [R15],0x0
MOV dword ptr [RBX],R12D
MOV qword ptr [RBX + 0x10],RAX
CMP byte ptr [RBP + 0x18],0x0
JZ 0x001981d3
LEA R12,[RBX + 0x58]
LEA RSI,[0xd08570]
MOV RDI,R12
CALL 0x00129320
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
MOV RDI,R12
CALL 0x00129200
JMP 0x001981db
LAB_001981d3:
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
LAB_001981db:
MOV R12D,dword ptr [RBP + -0x2c]
MOV R8D,dword ptr [RBP + -0x34]
MOV ECX,dword ptr [RBP + 0x10]
MOV ESI,dword ptr [RBP + -0x30]
LAB_001981e9:
TEST ECX,ECX
JZ 0x001981f1
MOV dword ptr [R15 + 0x1c],ECX
LAB_001981f1:
MOV byte ptr [RBX + 0x49],0x0
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,R15
MOV RDX,R14
MOV R14D,ECX
MOV ECX,R13D
MOV R9D,R12D
CALL qword ptr [RAX]
MOV R12D,EAX
TEST R14D,R14D
JZ 0x00198227
MOV EAX,dword ptr [R15 + 0x1c]
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
LEA RCX,[0x8 + RCX*0x8]
JMP 0x0019822e
LAB_00198227:
XOR EAX,EAX
MOV ECX,0x8
LAB_0019822e:
MOV dword ptr [RBX + 0x4c],EAX
MOV RAX,qword ptr [R15 + RCX*0x1]
MOV qword ptr [RBX + 0x50],RAX
TEST R12D,R12D
JLE 0x00198242
MOV byte ptr [RBX + 0x49],0x1
LAB_00198242:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00198254
ADD RBX,0x58
MOV RDI,RBX
CALL 0x001291c0
LAB_00198254:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int init_key_cache_internal
(int4 *param_1,ulong param_2,int8 param_3,int4 param_4,ulong param_5
,int4 param_6,int param_7,char param_8)
{
int iVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
long lVar5;
int4 uVar6;
if (*(char *)(param_1 + 0x12) == '\0') {
uVar6 = 0;
if (param_7 == 0) {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = simple_key_cache_funcs;
}
else {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x20,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = partitioned_key_cache_funcs;
uVar6 = 1;
}
*puVar3 = 0;
*param_1 = uVar6;
*(int1 **)(param_1 + 4) = puVar4;
if (param_8 == '\0') {
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
}
else {
pthread_mutex_init((pthread_mutex_t *)(param_1 + 0x16),
(pthread_mutexattr_t *)&my_fast_mutexattr);
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
}
else {
if (param_8 != '\0') {
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
puVar3 = *(int1 **)(param_1 + 2);
}
if (param_7 != 0) {
*(int *)(puVar3 + 0x1c) = param_7;
}
*(int1 *)((long)param_1 + 0x49) = 0;
iVar1 = (*(code *)**(int8 **)(param_1 + 4))(puVar3,param_2,param_3,param_4,param_5,param_6);
if (param_7 == 0) {
iVar2 = 0;
lVar5 = 8;
}
else {
iVar2 = *(int *)(puVar3 + 0x1c);
lVar5 = (ulong)(iVar2 != 0) * 8 + 8;
}
param_1[0x13] = iVar2;
*(int8 *)(param_1 + 0x14) = *(int8 *)(puVar3 + lVar5);
if (0 < iVar1) {
*(int1 *)((long)param_1 + 0x49) = 1;
}
if (param_8 != '\0') {
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x16));
}
return iVar1;
}
|
|
680 | 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>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | T& at(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it->second;
}
}
JSON_THROW(std::out_of_range("key not found"));
} | 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>>>::at(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&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rbx
cmpq 0x8(%r15), %rbx
je 0x6ed6c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68d34
testb %al, %al
jne 0x6ed5f
addq $0x60, %rbx
jmp 0x6ed44
addq $0x10, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %rbx
leaq 0x475a8(%rip), %rsi # 0xb6326
movq %rax, %rdi
callq 0x24100
movq 0x9222b(%rip), %rsi # 0x100fb8
movq 0x92204(%rip), %rdx # 0x100f98
movq %rbx, %rdi
callq 0x24ef0
movq %rax, %r14
movq %rbx, %rdi
callq 0x24680
movq %r14, %rdi
callq 0x24f80
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
mov rbx, [rdi]
loc_6ED44:
cmp rbx, [r15+8]
jz short loc_6ED6C
mov rdi, rbx
mov rsi, r14
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_6ED5F
add rbx, 60h ; '`'
jmp short loc_6ED44
loc_6ED5F:
add rbx, 10h
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_6ED6C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "key not found"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 * 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>>>::at(
unsigned __int8 **a1,
unsigned __int8 *a2,
__m128d a3)
{
unsigned __int8 *i; // rbx
std::out_of_range *exception; // rbx
for ( i = *a1; ; i += 96 )
{
if ( i == a1[1] )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "key not found");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) )
break;
}
return i + 16;
}
| at:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI]
LAB_0016ed44:
CMP RBX,qword ptr [R15 + 0x8]
JZ 0x0016ed6c
MOV RDI,RBX
MOV RSI,R14
CALL 0x00168d34
TEST AL,AL
JNZ 0x0016ed5f
ADD RBX,0x60
JMP 0x0016ed44
LAB_0016ed5f:
ADD RBX,0x10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0016ed6c:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV RBX,RAX
LAB_0016ed77:
LEA RSI,[0x1b6326]
MOV RDI,RAX
CALL 0x00124100
LAB_0016ed86:
MOV RSI,qword ptr [0x00200fb8]
MOV RDX,qword ptr [0x00200f98]
MOV RDI,RBX
CALL 0x00124ef0
|
/* 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> >
>::at(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&) */
basic_json * __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>>>
::at(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)
{
char cVar1;
out_of_range *this_00;
basic_json *pbVar2;
pbVar2 = *(basic_json **)this;
while( true ) {
if (pbVar2 == *(basic_json **)(this + 8)) {
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ed77 to 0016ed85 has its CatchHandler @ 0016ed9c */
std::out_of_range::out_of_range(this_00,"key not found");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00200fb8,PTR__out_of_range_00200f98);
}
cVar1 = json_abi_v3_11_3::operator==(pbVar2,param_1);
if (cVar1 != '\0') break;
pbVar2 = pbVar2 + 0x60;
}
return pbVar2 + 0x10;
}
|
|
681 | stmt_unbuffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
} | O3 | c | stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x15443
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x1ea4c
leaq 0x3e0d(%rip), %rax # 0x2284b
movq %rax, 0x348(%rbx)
movl $0x1, %eax
jmp 0x1ea81
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rax
cmpb $-0x2, (%rax)
jne 0x1ea75
movq $0x0, (%r14)
leaq 0x3de4(%rip), %rax # 0x2284b
movq %rax, 0x348(%rbx)
movl $0x64, %eax
jmp 0x1ea81
movq %rax, (%r14)
incq 0xc8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+38h]
call ma_net_safe_read
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_1EA4C
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 1
jmp short loc_1EA81
loc_1EA4C:
mov rax, [rbx+38h]
mov rax, [rax+20h]
cmp byte ptr [rax], 0FEh
jnz short loc_1EA75
mov qword ptr [r14], 0
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 64h ; 'd'
jmp short loc_1EA81
loc_1EA75:
mov [r14], rax
inc qword ptr [rbx+0C8h]
xor eax, eax
loc_1EA81:
pop rbx
pop r14
pop rbp
retn
| long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5, int a6)
{
_BYTE *v7; // rax
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFF )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1LL;
}
else
{
v7 = *(_BYTE **)(a1[7] + 32);
if ( *v7 == 0xFE )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100LL;
}
else
{
*a2 = v7;
++a1[25];
return 0LL;
}
}
}
| stmt_unbuffered_fetch:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x00115443
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x0011ea4c
LEA RAX,[0x12284b]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x1
JMP 0x0011ea81
LAB_0011ea4c:
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x0011ea75
MOV qword ptr [R14],0x0
LEA RAX,[0x12284b]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x64
JMP 0x0011ea81
LAB_0011ea75:
MOV qword ptr [R14],RAX
INC qword ptr [RBX + 0xc8]
XOR EAX,EAX
LAB_0011ea81:
POP RBX
POP R14
POP RBP
RET
|
int8 stmt_unbuffered_fetch(long param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
lVar2 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar2 == 0xffffffff) {
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 1;
}
else {
pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar1 == -2) {
*param_2 = 0;
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 100;
}
else {
*param_2 = pcVar1;
*(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1;
uVar3 = 0;
}
}
return uVar3;
}
|
|
682 | transid_store_packed | eloqsql/storage/maria/ma_key.c | uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid)
{
uchar *start;
uint length;
uchar buff[8];
DBUG_ASSERT(trid < (1LL << (MARIA_MAX_PACK_TRANSID_SIZE*8)));
DBUG_ASSERT(trid >= info->s->state.create_trid);
trid= (trid - info->s->state.create_trid) << 1;
/* Mark that key contains transid */
to[-1]|= 1;
if (trid < MARIA_MIN_TRANSID_PACK_OFFSET)
{
to[0]= (uchar) trid;
return 1;
}
start= to;
/* store things in low-byte-first-order in buff */
to= buff;
do
{
*to++= (uchar) trid;
trid= trid>>8;
} while (trid);
length= (uint) (to - buff);
/* Store length prefix */
start[0]= (uchar) (length + MARIA_TRANSID_PACK_OFFSET);
start++;
/* Copy things in high-byte-first order to output buffer */
do
{
*start++= *--to;
} while (to != buff);
return length+1;
} | O0 | c | transid_store_packed:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
jmp 0x48a73
jmp 0x48a75
jmp 0x48a77
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0xe0(%rcx), %rax
shlq %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movzbl -0x1(%rax), %ecx
orl $0x1, %ecx
movb %cl, -0x1(%rax)
cmpq $0xf3, -0x30(%rbp)
jae 0x48ac0
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x14(%rbp)
jmp 0x48b5d
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x48ad0
movq -0x28(%rbp), %rax
leaq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0xf9, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rbp)
movb -0x1(%rax), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
leaq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x48b24
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x48b7e
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| transid_store_packed:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
jmp short $+2
loc_48A73:
jmp short $+2
loc_48A75:
jmp short $+2
loc_48A77:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+0E0h]
shl rax, 1
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
movzx ecx, byte ptr [rax-1]
or ecx, 1
mov [rax-1], cl
cmp [rbp+var_30], 0F3h
jnb short loc_48AC0
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_28]
mov [rax], cl
mov [rbp+var_14], 1
jmp loc_48B5D
loc_48AC0:
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
lea rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_48AD0:
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
shr rax, 8
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_48AD0
mov rax, [rbp+var_28]
lea rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add eax, 0F9h
mov cl, al
mov rax, [rbp+var_38]
mov [rax], cl
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
loc_48B24:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rcx
mov cl, [rax-1]
mov rax, [rbp+var_38]
mov rdx, rax
add rdx, 1
mov [rbp+var_38], rdx
mov [rax], cl
mov rax, [rbp+var_28]
lea rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_48B24
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_14], eax
loc_48B5D:
mov eax, [rbp+var_14]
mov [rbp+var_40], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_48B7E
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_48B7E:
call ___stack_chk_fail
| long long transid_store_packed(long long a1, _BYTE *a2, long long a3)
{
char *v3; // rax
char *v4; // rax
char v5; // cl
_BYTE *v6; // rax
unsigned int v8; // [rsp+4h] [rbp-3Ch]
_BYTE *v9; // [rsp+8h] [rbp-38h]
unsigned long long v10; // [rsp+10h] [rbp-30h]
char *v11; // [rsp+18h] [rbp-28h]
char v13; // [rsp+30h] [rbp-10h] BYREF
unsigned long long v14; // [rsp+38h] [rbp-8h]
v14 = __readfsqword(0x28u);
v10 = 2 * (a3 - *(_QWORD *)(*(_QWORD *)a1 + 224LL));
*(a2 - 1) |= 1u;
if ( v10 >= 0xF3 )
{
v11 = &v13;
do
{
v3 = v11++;
*v3 = v10;
v10 >>= 8;
}
while ( v10 );
v8 = (_DWORD)v11 - (unsigned int)&v13;
*a2 = (_BYTE)v11 - (unsigned __int8)&v13 - 7;
v9 = a2 + 1;
do
{
v4 = v11--;
v5 = *(v4 - 1);
v6 = v9++;
*v6 = v5;
}
while ( v11 != &v13 );
return v8 + 1;
}
else
{
*a2 = v10;
return 1;
}
}
| transid_store_packed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
JMP 0x00148a73
LAB_00148a73:
JMP 0x00148a75
LAB_00148a75:
JMP 0x00148a77
LAB_00148a77:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0xe0]
SHL RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RAX + -0x1]
OR ECX,0x1
MOV byte ptr [RAX + -0x1],CL
CMP qword ptr [RBP + -0x30],0xf3
JNC 0x00148ac0
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x14],0x1
JMP 0x00148b5d
LAB_00148ac0:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_00148ad0:
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00148ad0
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0xf9
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00148b24:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x28],RCX
MOV CL,byte ptr [RAX + -0x1]
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x10]
CMP RAX,RCX
JNZ 0x00148b24
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
LAB_00148b5d:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00148b7e
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_00148b7e:
CALL 0x0012a270
|
int transid_store_packed(long *param_1,char *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
char *local_40;
ulong local_38;
char *local_30;
int local_1c;
char local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (param_3 - *(long *)(*param_1 + 0xe0)) * 2;
param_2[-1] = param_2[-1] | 1;
if (local_38 < 0xf3) {
*param_2 = (char)local_38;
local_1c = 1;
}
else {
local_30 = local_18;
do {
pcVar1 = local_30 + 1;
*local_30 = (char)local_38;
local_38 = local_38 >> 8;
local_30 = pcVar1;
} while (local_38 != 0);
local_1c = (int)pcVar1 - (int)local_18;
*param_2 = (char)local_1c + -7;
local_40 = param_2 + 1;
do {
pcVar1 = local_30 + -1;
*local_40 = local_30[-1];
local_40 = local_40 + 1;
local_30 = pcVar1;
} while (pcVar1 != local_18);
local_1c = local_1c + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_1c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
683 | my_scan_8bit | eloqsql/strings/ctype-simple.c | size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
{
const char *str0= str;
switch (sq)
{
case MY_SEQ_INTTAIL:
if (*str == '.')
{
for(str++ ; str != end && *str == '0' ; str++);
return (size_t) (str - str0);
}
return 0;
case MY_SEQ_SPACES:
for ( ; str < end ; str++)
{
if (!my_isspace(cs,*str))
break;
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
for ( ; str < end ; str++)
{
if (my_isspace(cs, *str))
break;
}
return (size_t) (str - str0);
default:
return 0;
}
} | O3 | c | my_scan_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %rax
cmpl $0x1, %ecx
je 0x3e1f2
cmpl $0x2, %ecx
je 0x3e1c6
cmpl $0x3, %ecx
jne 0x3e217
movq %rsi, %rcx
cmpq %rax, %rsi
jae 0x3e1ea
movq 0x40(%rdi), %rdx
movq %rsi, %rcx
movzbl (%rcx), %edi
testb $0x8, 0x1(%rdx,%rdi)
jne 0x3e1ea
incq %rcx
cmpq %rax, %rcx
jne 0x3e1b2
jmp 0x3e1e7
movq %rsi, %rcx
cmpq %rax, %rsi
jae 0x3e1ea
movq 0x40(%rdi), %rdx
movq %rsi, %rcx
movzbl (%rcx), %edi
testb $0x8, 0x1(%rdx,%rdi)
je 0x3e1ea
incq %rcx
cmpq %rax, %rcx
jne 0x3e1d5
movq %rax, %rcx
subq %rsi, %rcx
movq %rcx, %rax
jmp 0x3e219
cmpb $0x2e, (%rsi)
jne 0x3e217
leaq 0x1(%rsi), %rcx
cmpq %rax, %rcx
je 0x3e212
leaq 0x1(%rcx), %rdx
cmpb $0x30, (%rcx)
movq %rdx, %rcx
je 0x3e1fb
decq %rdx
movq %rdx, %rax
subq %rsi, %rax
jmp 0x3e219
xorl %eax, %eax
popq %rbp
retq
| my_scan_8bit:
push rbp
mov rbp, rsp
mov rax, rdx
cmp ecx, 1
jz short loc_3E1F2
cmp ecx, 2
jz short loc_3E1C6
cmp ecx, 3
jnz short loc_3E217
mov rcx, rsi
cmp rsi, rax
jnb short loc_3E1EA
mov rdx, [rdi+40h]
mov rcx, rsi
loc_3E1B2:
movzx edi, byte ptr [rcx]
test byte ptr [rdx+rdi+1], 8
jnz short loc_3E1EA
inc rcx
cmp rcx, rax
jnz short loc_3E1B2
jmp short loc_3E1E7
loc_3E1C6:
mov rcx, rsi
cmp rsi, rax
jnb short loc_3E1EA
mov rdx, [rdi+40h]
mov rcx, rsi
loc_3E1D5:
movzx edi, byte ptr [rcx]
test byte ptr [rdx+rdi+1], 8
jz short loc_3E1EA
inc rcx
cmp rcx, rax
jnz short loc_3E1D5
loc_3E1E7:
mov rcx, rax
loc_3E1EA:
sub rcx, rsi
mov rax, rcx
jmp short loc_3E219
loc_3E1F2:
cmp byte ptr [rsi], 2Eh ; '.'
jnz short loc_3E217
lea rcx, [rsi+1]
loc_3E1FB:
cmp rcx, rax
jz short loc_3E212
lea rdx, [rcx+1]
cmp byte ptr [rcx], 30h ; '0'
mov rcx, rdx
jz short loc_3E1FB
dec rdx
mov rax, rdx
loc_3E212:
sub rax, rsi
jmp short loc_3E219
loc_3E217:
xor eax, eax
loc_3E219:
pop rbp
retn
| long long my_scan_8bit(long long a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4)
{
unsigned __int8 *v4; // rax
unsigned __int8 *v5; // rcx
unsigned __int8 *v7; // rcx
_BYTE *v8; // rdx
v4 = a3;
if ( a4 != 1 )
{
if ( a4 == 2 )
{
v5 = a2;
if ( a2 < a3 )
{
v5 = a2;
while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) != 0 )
{
if ( ++v5 == a3 )
{
LABEL_13:
v5 = a3;
return v5 - a2;
}
}
}
return v5 - a2;
}
if ( a4 == 3 )
{
v5 = a2;
if ( a2 < a3 )
{
v5 = a2;
while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) == 0 )
{
if ( ++v5 == a3 )
goto LABEL_13;
}
}
return v5 - a2;
}
return 0LL;
}
if ( *a2 != 46 )
return 0LL;
v7 = a2 + 1;
while ( v7 != v4 )
{
v8 = v7 + 1;
if ( *v7++ != 48 )
{
v4 = v8 - 1;
return v4 - a2;
}
}
return v4 - a2;
}
| my_scan_8bit:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDX
CMP ECX,0x1
JZ 0x0013e1f2
CMP ECX,0x2
JZ 0x0013e1c6
CMP ECX,0x3
JNZ 0x0013e217
MOV RCX,RSI
CMP RSI,RAX
JNC 0x0013e1ea
MOV RDX,qword ptr [RDI + 0x40]
MOV RCX,RSI
LAB_0013e1b2:
MOVZX EDI,byte ptr [RCX]
TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8
JNZ 0x0013e1ea
INC RCX
CMP RCX,RAX
JNZ 0x0013e1b2
JMP 0x0013e1e7
LAB_0013e1c6:
MOV RCX,RSI
CMP RSI,RAX
JNC 0x0013e1ea
MOV RDX,qword ptr [RDI + 0x40]
MOV RCX,RSI
LAB_0013e1d5:
MOVZX EDI,byte ptr [RCX]
TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8
JZ 0x0013e1ea
INC RCX
CMP RCX,RAX
JNZ 0x0013e1d5
LAB_0013e1e7:
MOV RCX,RAX
LAB_0013e1ea:
SUB RCX,RSI
MOV RAX,RCX
JMP 0x0013e219
LAB_0013e1f2:
CMP byte ptr [RSI],0x2e
JNZ 0x0013e217
LEA RCX,[RSI + 0x1]
LAB_0013e1fb:
CMP RCX,RAX
JZ 0x0013e212
LEA RDX,[RCX + 0x1]
CMP byte ptr [RCX],0x30
MOV RCX,RDX
JZ 0x0013e1fb
DEC RDX
MOV RAX,RDX
LAB_0013e212:
SUB RAX,RSI
JMP 0x0013e219
LAB_0013e217:
XOR EAX,EAX
LAB_0013e219:
POP RBP
RET
|
long my_scan_8bit(long param_1,byte *param_2,byte *param_3,int param_4)
{
byte bVar1;
byte *pbVar2;
long lVar3;
byte *pbVar4;
if (param_4 == 1) {
if (*param_2 == 0x2e) {
pbVar4 = param_2 + 1;
do {
pbVar2 = param_3;
if (pbVar4 == param_3) break;
bVar1 = *pbVar4;
pbVar2 = pbVar4;
pbVar4 = pbVar4 + 1;
} while (bVar1 == 0x30);
return (long)pbVar2 - (long)param_2;
}
LAB_0013e217:
lVar3 = 0;
}
else {
pbVar4 = param_2;
if (param_4 == 2) {
if (param_2 < param_3) {
pbVar2 = param_2;
do {
pbVar4 = pbVar2;
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) == 0) break;
pbVar2 = pbVar2 + 1;
pbVar4 = param_3;
} while (pbVar2 != param_3);
}
}
else {
if (param_4 != 3) goto LAB_0013e217;
if (param_2 < param_3) {
pbVar2 = param_2;
do {
pbVar4 = pbVar2;
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) != 0) break;
pbVar2 = pbVar2 + 1;
pbVar4 = param_3;
} while (pbVar2 != param_3);
}
}
lVar3 = (long)pbVar4 - (long)param_2;
}
return lVar3;
}
|
|
684 | Vector4Add | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector4 Vector4Add(Vector4 v1, Vector4 v2)
{
Vector4 result = {
v1.x + v2.x,
v1.y + v2.y,
v1.z + v2.z,
v1.w + v2.w
};
return result;
} | O0 | c | Vector4Add:
pushq %rbp
movq %rsp, %rbp
movlpd %xmm0, -0x20(%rbp)
movlpd %xmm1, -0x18(%rbp)
movlpd %xmm2, -0x30(%rbp)
movlpd %xmm3, -0x28(%rbp)
movss -0x20(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movss -0x1c(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x18(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x14(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
popq %rbp
retq
| Vector4Add:
push rbp
mov rbp, rsp
movlpd [rbp+var_20], xmm0
movlpd [rbp+var_18], xmm1
movlpd [rbp+var_30], xmm2
movlpd [rbp+var_28], xmm3
movss xmm0, dword ptr [rbp+var_20]
movss xmm1, dword ptr [rbp+var_30]
addss xmm0, xmm1
movss dword ptr [rbp+var_10], xmm0
movss xmm0, dword ptr [rbp+var_20+4]
movss xmm1, dword ptr [rbp+var_30+4]
addss xmm0, xmm1
movss dword ptr [rbp+var_10+4], xmm0
movss xmm0, dword ptr [rbp+var_18]
movss xmm1, dword ptr [rbp+var_28]
addss xmm0, xmm1
movss dword ptr [rbp+var_8], xmm0
movss xmm0, dword ptr [rbp+var_18+4]
movss xmm1, dword ptr [rbp+var_28+4]
addss xmm0, xmm1
movss dword ptr [rbp+var_8+4], xmm0
movsd xmm0, [rbp+var_10]
movsd xmm1, [rbp+var_8]
pop rbp
retn
| double Vector4Add(double a1, double a2, double a3)
{
double v4; // [rsp+20h] [rbp-10h]
*(float *)&v4 = *(float *)&a1 + *(float *)&a3;
*((float *)&v4 + 1) = *((float *)&a1 + 1) + *((float *)&a3 + 1);
return v4;
}
| Vector4Add:
PUSH RBP
MOV RBP,RSP
MOVLPD qword ptr [RBP + -0x20],XMM0
MOVLPD qword ptr [RBP + -0x18],XMM1
MOVLPD qword ptr [RBP + -0x30],XMM2
MOVLPD qword ptr [RBP + -0x28],XMM3
MOVSS XMM0,dword ptr [RBP + -0x20]
MOVSS XMM1,dword ptr [RBP + -0x30]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x10],XMM0
MOVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS XMM1,dword ptr [RBP + -0x2c]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0xc],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RBP + -0x28]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x8],XMM0
MOVSS XMM0,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RBP + -0x24]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSD XMM0,qword ptr [RBP + -0x10]
MOVSD XMM1,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 [16]
Vector4Add(int8 param_1,int8 param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int4 local_38;
int4 uStack_34;
int4 local_30;
int4 uStack_2c;
int4 local_28;
int4 uStack_24;
int4 local_20;
int4 uStack_1c;
local_28 = (float)param_1;
local_38 = (float)param_3;
uStack_24 = (float)((ulong)param_1 >> 0x20);
uStack_34 = (float)((ulong)param_3 >> 0x20);
local_20 = (float)param_2;
local_30 = (float)param_4;
uStack_1c = (float)((ulong)param_2 >> 0x20);
uStack_2c = (float)((ulong)param_4 >> 0x20);
auVar1._4_4_ = uStack_24 + uStack_34;
auVar1._0_4_ = local_28 + local_38;
auVar1._8_4_ = local_20 + local_30;
auVar1._12_4_ = uStack_1c + uStack_2c;
return auVar1;
}
|
|
685 | Vector4Add | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector4 Vector4Add(Vector4 v1, Vector4 v2)
{
Vector4 result = {
v1.x + v2.x,
v1.y + v2.y,
v1.z + v2.z,
v1.w + v2.w
};
return result;
} | O1 | c | Vector4Add:
addps %xmm2, %xmm0
addps %xmm3, %xmm1
retq
| Vector4Add:
addps xmm0, xmm2
addps xmm1, xmm3
retn
| __m128 Vector4Add(__m128 a1, double a2, __m128 a3)
{
return _mm_add_ps(a1, a3);
}
| Vector4Add:
ADDPS XMM0,XMM2
ADDPS XMM1,XMM3
RET
|
int8 Vector4Add(int8 param_1,int8 param_2,int8 param_3)
{
return CONCAT44((float)((ulong)param_1 >> 0x20) + (float)((ulong)param_3 >> 0x20),
(float)param_1 + (float)param_3);
}
|
|
686 | get_last_value | corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c | static bytes_t get_last_value(ssz_ob_t proof) {
bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes;
if (!last_value.data) return NULL_BYTES;
if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES;
switch ((int) rlp_decode(&last_value, -1, &last_value)) {
case 2: // must be a leaf (otherwise the verification would have failed)
if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
case 17: // branch noch with the value
if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
default:
return NULL_BYTES;
}
return last_value;
} | O0 | c | get_last_value:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0830
movl %eax, %esi
movq -0x40(%rbp), %rax
subl $0x1, %esi
leaq -0x38(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0580
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x336d4
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x33795
leaq -0x20(%rbp), %rdx
xorl %esi, %esi
movq %rdx, %rdi
callq 0x36280
cmpl $0x2, %eax
je 0x336fb
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x33795
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
leaq -0x20(%rbp), %rdx
movq %rdx, %rdi
callq 0x36280
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
subl $0x2, %eax
je 0x33722
jmp 0x33718
movl -0x44(%rbp), %eax
subl $0x11, %eax
je 0x3374b
jmp 0x33774
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x36280
cmpl $0x1, %eax
je 0x33749
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x33795
jmp 0x33785
leaq -0x20(%rbp), %rdx
movl $0x10, %esi
movq %rdx, %rdi
callq 0x36280
cmpl $0x1, %eax
je 0x33772
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x33795
jmp 0x33785
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x33795
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_last_value:
push rbp
mov rbp, rsp
sub rsp, 60h
lea rax, [rbp+arg_0]
mov [rbp+var_40], rax
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call ssz_len
mov esi, eax
mov rax, [rbp+var_40]
sub esi, 1
lea rdi, [rbp+var_38]
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call ssz_at
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_336D4
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_33795
loc_336D4:
lea rdx, [rbp+var_20]
xor esi, esi
mov rdi, rdx
call rlp_decode
cmp eax, 2
jz short loc_336FB
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_33795
loc_336FB:
mov esi, 0FFFFFFFFh
lea rdx, [rbp+var_20]
mov rdi, rdx
call rlp_decode
mov ecx, eax
mov [rbp+var_44], ecx
sub eax, 2
jz short loc_33722
jmp short $+2
loc_33718:
mov eax, [rbp+var_44]
sub eax, 11h
jz short loc_3374B
jmp short loc_33774
loc_33722:
lea rdx, [rbp+var_20]
mov esi, 1
mov rdi, rdx
call rlp_decode
cmp eax, 1
jz short loc_33749
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_33795
loc_33749:
jmp short loc_33785
loc_3374B:
lea rdx, [rbp+var_20]
mov esi, 10h
mov rdi, rdx
call rlp_decode
cmp eax, 1
jz short loc_33772
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_33795
loc_33772:
jmp short loc_33785
loc_33774:
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_33795
loc_33785:
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_33795:
mov eax, dword ptr [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long get_last_value(
int a1,
int a2,
int a3,
_DWORD a4,
int a5,
int a6,
long long a7,
long long a8,
long long a9)
{
int v9; // eax
int v10; // edx
int v11; // r8d
int v12; // r9d
int v14; // [rsp+1Ch] [rbp-44h]
long long v15; // [rsp+28h] [rbp-38h] BYREF
long long v16; // [rsp+30h] [rbp-30h]
long long v17; // [rsp+40h] [rbp-20h] BYREF
long long v18; // [rsp+48h] [rbp-18h]
long long v19; // [rsp+50h] [rbp-10h]
long long v20; // [rsp+58h] [rbp-8h]
v9 = ssz_len(a1, a2, a3, a8, a5, a6, a7, a8, a9);
ssz_at((unsigned int)&v15, v9 - 1, v10, a8, v11, v12, a7, a8, a9);
v17 = v15;
v18 = v16;
if ( v16 )
{
if ( (unsigned int)rlp_decode(&v17, 0LL) == 2 )
{
v14 = rlp_decode(&v17, 0xFFFFFFFFLL);
if ( v14 == 2 )
{
if ( (unsigned int)rlp_decode(&v17, 1LL) != 1 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
}
else
{
if ( v14 != 17 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
if ( (unsigned int)rlp_decode(&v17, 16LL) != 1 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
}
v19 = v17;
v20 = v18;
return (unsigned int)v19;
}
LODWORD(v19) = 0;
v20 = 0LL;
}
else
{
LODWORD(v19) = 0;
v20 = 0LL;
}
return (unsigned int)v19;
}
| get_last_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0830
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x40]
SUB ESI,0x1
LEA RDI,[RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0580
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001336d4
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133795
LAB_001336d4:
LEA RDX,[RBP + -0x20]
XOR ESI,ESI
MOV RDI,RDX
CALL 0x00136280
CMP EAX,0x2
JZ 0x001336fb
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133795
LAB_001336fb:
MOV ESI,0xffffffff
LEA RDX,[RBP + -0x20]
MOV RDI,RDX
CALL 0x00136280
MOV ECX,EAX
MOV dword ptr [RBP + -0x44],ECX
SUB EAX,0x2
JZ 0x00133722
JMP 0x00133718
LAB_00133718:
MOV EAX,dword ptr [RBP + -0x44]
SUB EAX,0x11
JZ 0x0013374b
JMP 0x00133774
LAB_00133722:
LEA RDX,[RBP + -0x20]
MOV ESI,0x1
MOV RDI,RDX
CALL 0x00136280
CMP EAX,0x1
JZ 0x00133749
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133795
LAB_00133749:
JMP 0x00133785
LAB_0013374b:
LEA RDX,[RBP + -0x20]
MOV ESI,0x10
MOV RDI,RDX
CALL 0x00136280
CMP EAX,0x1
JZ 0x00133772
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133795
LAB_00133772:
JMP 0x00133785
LAB_00133774:
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133795
LAB_00133785:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00133795:
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
int1 [16] get_last_value(void)
{
int iVar1;
int1 auVar2 [16];
ulong local_40;
long local_38;
ulong local_28;
long local_20;
ulong local_18;
long local_10;
iVar1 = ssz_len();
ssz_at(&local_40,iVar1 + -1);
local_28 = local_40;
local_20 = local_38;
if (local_38 == 0) {
local_18 = 0;
local_10 = 0;
}
else {
iVar1 = rlp_decode(&local_28,0);
if (iVar1 == 2) {
iVar1 = rlp_decode(&local_28,0xffffffff);
if (iVar1 == 2) {
iVar1 = rlp_decode(&local_28,1);
if (iVar1 != 1) {
local_18 = 0;
local_10 = 0;
goto LAB_00133795;
}
}
else {
if (iVar1 != 0x11) {
local_18 = 0;
local_10 = 0;
goto LAB_00133795;
}
iVar1 = rlp_decode(&local_28,0x10);
if (iVar1 != 1) {
local_18 = 0;
local_10 = 0;
goto LAB_00133795;
}
}
local_18 = local_28;
local_10 = local_20;
}
else {
local_18 = 0;
local_10 = 0;
}
}
LAB_00133795:
auVar2._0_8_ = local_18 & 0xffffffff;
auVar2._8_8_ = local_10;
return auVar2;
}
|
|
687 | get_last_value | corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c | static bytes_t get_last_value(ssz_ob_t proof) {
bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes;
if (!last_value.data) return NULL_BYTES;
if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES;
switch ((int) rlp_decode(&last_value, -1, &last_value)) {
case 2: // must be a leaf (otherwise the verification would have failed)
if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
case 17: // branch noch with the value
if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
default:
return NULL_BYTES;
}
return last_value;
} | O3 | c | get_last_value:
pushq %rbx
subq $0x50, %rsp
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x547b8
leal -0x1(%rax), %esi
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x5463d
movups (%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x2dbdd
xorl %ebx, %ebx
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movq %rdi, %rdx
callq 0x2f56c
cmpl $0x2, %eax
jne 0x2dbb7
leaq 0x20(%rsp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rdi, %rdx
callq 0x2f56c
cmpl $0x11, %eax
je 0x2dbbb
cmpl $0x2, %eax
jne 0x2dbdd
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
jmp 0x2dbc5
xorl %edx, %edx
jmp 0x2dbe1
leaq 0x20(%rsp), %rdi
movl $0x10, %esi
movq %rdi, %rdx
callq 0x2f56c
cmpl $0x1, %eax
jne 0x2dbdd
movl 0x20(%rsp), %ebx
movq 0x28(%rsp), %rdx
jmp 0x2dbe1
xorl %edx, %edx
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
retq
| get_last_value:
push rbx
sub rsp, 50h
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
call ssz_len
lea esi, [rax-1]
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
lea rbx, [rsp+58h+var_20]
mov rdi, rbx
call ssz_at
movups xmm0, xmmword ptr [rbx]
movaps [rsp+58h+var_38], xmm0
cmp qword ptr [rsp+58h+var_38+8], 0
jz short loc_2DBDD
xor ebx, ebx
lea rdi, [rsp+58h+var_38]
xor esi, esi
mov rdx, rdi
call rlp_decode
cmp eax, 2
jnz short loc_2DBB7
lea rdi, [rsp+58h+var_38]
mov esi, 0FFFFFFFFh
mov rdx, rdi
call rlp_decode
cmp eax, 11h
jz short loc_2DBBB
cmp eax, 2
jnz short loc_2DBDD
lea rdi, [rsp+58h+var_38]
mov esi, 1
jmp short loc_2DBC5
loc_2DBB7:
xor edx, edx
jmp short loc_2DBE1
loc_2DBBB:
lea rdi, [rsp+58h+var_38]
mov esi, 10h
loc_2DBC5:
mov rdx, rdi
call rlp_decode
cmp eax, 1
jnz short loc_2DBDD
mov ebx, dword ptr [rsp+58h+var_38]
mov rdx, qword ptr [rsp+58h+var_38+8]
jmp short loc_2DBE1
loc_2DBDD:
xor edx, edx
xor ebx, ebx
loc_2DBE1:
mov eax, ebx
add rsp, 50h
pop rbx
retn
| long long get_last_value(int a1, int a2, int a3, int a4, int a5, int a6, __int128 a7, long long a8)
{
int v8; // eax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
unsigned int v13; // ebx
int v14; // eax
long long v15; // rsi
__int128 v17; // [rsp+20h] [rbp-38h] BYREF
__int128 v18; // [rsp+38h] [rbp-20h] BYREF
v8 = ssz_len(a1, a2, a3, a4, a5, a6, a7, DWORD2(a7), a8);
ssz_at((unsigned int)&v18, v8 - 1, v9, v10, v11, v12, a7, *((long long *)&a7 + 1), a8);
v17 = v18;
if ( !*((_QWORD *)&v18 + 1) )
return 0;
v13 = 0;
if ( (unsigned int)rlp_decode(&v17, 0LL, &v17) != 2 )
return v13;
v14 = rlp_decode(&v17, 0xFFFFFFFFLL, &v17);
if ( v14 == 17 )
{
v15 = 16LL;
}
else
{
if ( v14 != 2 )
return 0;
v15 = 1LL;
}
if ( (unsigned int)rlp_decode(&v17, v15, &v17) != 1 )
return 0;
return (unsigned int)v17;
}
| get_last_value:
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x001547b8
LEA ESI,[RAX + -0x1]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0015463d
MOVUPS XMM0,xmmword ptr [RBX]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0012dbdd
XOR EBX,EBX
LEA RDI,[RSP + 0x20]
XOR ESI,ESI
MOV RDX,RDI
CALL 0x0012f56c
CMP EAX,0x2
JNZ 0x0012dbb7
LEA RDI,[RSP + 0x20]
MOV ESI,0xffffffff
MOV RDX,RDI
CALL 0x0012f56c
CMP EAX,0x11
JZ 0x0012dbbb
CMP EAX,0x2
JNZ 0x0012dbdd
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
JMP 0x0012dbc5
LAB_0012dbb7:
XOR EDX,EDX
JMP 0x0012dbe1
LAB_0012dbbb:
LEA RDI,[RSP + 0x20]
MOV ESI,0x10
LAB_0012dbc5:
MOV RDX,RDI
CALL 0x0012f56c
CMP EAX,0x1
JNZ 0x0012dbdd
MOV EBX,dword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
JMP 0x0012dbe1
LAB_0012dbdd:
XOR EDX,EDX
XOR EBX,EBX
LAB_0012dbe1:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] get_last_value(void)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int1 auVar4 [16];
uint local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
uint local_20;
int4 uStack_1c;
int4 uStack_18;
int4 uStack_14;
iVar1 = ssz_len();
ssz_at(&local_20,iVar1 + -1);
local_38 = local_20;
uStack_34 = uStack_1c;
uStack_30 = uStack_18;
uStack_2c = uStack_14;
if (CONCAT44(uStack_14,uStack_18) != 0) {
uVar2 = 0;
iVar1 = rlp_decode(&local_38,0,&local_38);
if (iVar1 != 2) {
uVar3 = 0;
goto LAB_0012dbe1;
}
iVar1 = rlp_decode(&local_38,0xffffffff,&local_38);
if (iVar1 == 0x11) {
uVar3 = 0x10;
}
else {
if (iVar1 != 2) goto LAB_0012dbdd;
uVar3 = 1;
}
iVar1 = rlp_decode(&local_38,uVar3,&local_38);
if (iVar1 == 1) {
uVar2 = (ulong)local_38;
uVar3 = CONCAT44(uStack_2c,uStack_30);
goto LAB_0012dbe1;
}
}
LAB_0012dbdd:
uVar3 = 0;
uVar2 = 0;
LAB_0012dbe1:
auVar4._8_8_ = uVar3;
auVar4._0_8_ = uVar2;
return auVar4;
}
|
|
688 | my_uni_utf32 | eloqsql/strings/ctype-ucs2.c | static int
my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (wc > 0x10FFFF)
return MY_CS_ILUNI;
s[0]= (uchar) (wc >> 24);
s[1]= (uchar) (wc >> 16) & 0xFF;
s[2]= (uchar) (wc >> 8) & 0xFF;
s[3]= (uchar) wc & 0xFF;
return 4;
} | O3 | c | my_uni_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0xc44d8
xorl %eax, %eax
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0xc44d8
movb $0x0, (%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdx)
movb %bh, 0x2(%rdx)
movb %bl, 0x3(%rdx)
movl $0x4, %eax
popq %rbx
popq %rbp
retq
| my_uni_utf32:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_C44D8
xor eax, eax
cmp rbx, offset unk_10FFFF
ja short loc_C44D8
mov byte ptr [rdx], 0
mov eax, ebx
shr eax, 10h
mov [rdx+1], al
mov [rdx+2], bh
mov [rdx+3], bl
mov eax, 4
loc_C44D8:
pop rbx
pop rbp
retn
| long long my_uni_utf32(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) <= a4 )
{
result = 0LL;
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
*a3 = 0;
a3[1] = BYTE2(a2);
a3[2] = BYTE1(a2);
a3[3] = a2;
return 4LL;
}
}
return result;
}
| my_uni_utf32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x001c44d8
XOR EAX,EAX
CMP RBX,0x10ffff
JA 0x001c44d8
MOV byte ptr [RDX],0x0
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RDX + 0x1],AL
MOV byte ptr [RDX + 0x2],BH
MOV byte ptr [RDX + 0x3],BL
MOV EAX,0x4
LAB_001c44d8:
POP RBX
POP RBP
RET
|
int8 my_uni_utf32(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int8 uVar1;
uVar1 = 0xffffff98;
if ((param_3 + 4 <= param_4) && (uVar1 = 0, param_2 < 0x110000)) {
*param_3 = 0;
param_3[1] = (char)(param_2 >> 0x10);
param_3[2] = (char)(param_2 >> 8);
param_3[3] = (char)param_2;
uVar1 = 4;
}
return uVar1;
}
|
|
689 | flt_reciprocal_fp2 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/recip.c | static void flt_reciprocal_fp2(vec384x out, const vec384x inp)
{
vec384 t0, t1;
/*
* |out| = 1/(a + b*i) = a/(a^2+b^2) - b/(a^2+b^2)*i
*/
sqr_fp(t0, inp[0]);
sqr_fp(t1, inp[1]);
add_fp(t0, t0, t1);
flt_reciprocal_fp(t1, t0);
mul_fp(out[0], inp[0], t1);
mul_fp(out[1], inp[1], t1);
neg_fp(out[1], out[1]);
} | O0 | c | flt_reciprocal_fp2:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb0f10
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
callq 0xb0f10
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xae790
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xb7000
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
leaq -0x70(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movl $0x1, %edx
callq 0xae7d0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _flt_reciprocal_fp2:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
call sqr_fp
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_10]
add rsi, 30h ; '0'
call sqr_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_40]
lea rdx, [rbp+var_70]
call add_fp
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_40]
call _flt_reciprocal_fp
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_70]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_10]
add rsi, 30h ; '0'
lea rdx, [rbp+var_70]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
mov edx, 1
call cneg_fp
add rsp, 70h
pop rbp
retn
| long long flt_reciprocal_fp2(long long a1, long long a2)
{
_BYTE v3[48]; // [rsp+0h] [rbp-70h] BYREF
_BYTE v4[48]; // [rsp+30h] [rbp-40h] BYREF
long long v5; // [rsp+60h] [rbp-10h]
long long v6; // [rsp+68h] [rbp-8h]
v6 = a1;
v5 = a2;
sqr_fp((long long)v4, a2);
sqr_fp((long long)v3, v5 + 48);
add_fp((long long)v4, (long long)v4, (long long)v3);
flt_reciprocal_fp((long long)v3, (long long)v4);
mul_fp(v6, v5, (long long)v3);
mul_fp(v6 + 48, v5 + 48, (long long)v3);
return cneg_fp(v6 + 48, v6 + 48, 1LL);
}
| flt_reciprocal_fp2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001b0f10
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x30
CALL 0x001b0f10
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x40]
LEA RDX,[RBP + -0x70]
CALL 0x001ae790
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0x40]
CALL 0x001b7000
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x70]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x30
LEA RDX,[RBP + -0x70]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
MOV EDX,0x1
CALL 0x001ae7d0
ADD RSP,0x70
POP RBP
RET
|
void flt_reciprocal_fp2(long param_1,long param_2)
{
int1 local_78 [48];
int1 local_48 [48];
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
sqr_fp(local_48,param_2);
sqr_fp(local_78,local_18 + 0x30);
add_fp(local_48,local_48,local_78);
flt_reciprocal_fp(local_78,local_48);
mul_fp(local_10,local_18,local_78);
mul_fp(local_10 + 0x30,local_18 + 0x30,local_78);
cneg_fp(local_10 + 0x30,local_10 + 0x30,1);
return;
}
|
|
690 | xml_string_copy | eloqsql/storage/maria/libmarias3/src/xml.c | void xml_string_copy(struct xml_string* string, uint8_t* buffer, size_t length) {
if (!string) {
return;
}
#define min(X,Y) ((X) < (Y) ? (X) : (Y))
length = min(length, string->length);
#undef min
memcpy(buffer, string->buffer, length);
buffer[length]= '\0';
} | O0 | c | xml_string_copy:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x185dd
jmp 0x18629
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x185f5
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x18601
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0xa4f0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nop
| xml_string_copy:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_8], 0
jnz short loc_185DD
jmp short loc_18629
loc_185DD:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
cmp rax, [rcx+8]
jnb short loc_185F5
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
jmp short loc_18601
loc_185F5:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_20], rax
loc_18601:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_18629:
add rsp, 20h
pop rbp
retn
| long long xml_string_copy(_QWORD *a1, long long a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // [rsp+0h] [rbp-20h]
if ( a1 )
{
if ( a3 >= a1[1] )
v4 = a1[1];
else
v4 = a3;
memcpy(a2, *a1, v4);
result = a2;
*(_BYTE *)(a2 + v4) = 0;
}
return result;
}
| xml_string_copy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x001185dd
JMP 0x00118629
LAB_001185dd:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x001185f5
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00118601
LAB_001185f5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_00118601:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0010a4f0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_00118629:
ADD RSP,0x20
POP RBP
RET
|
void xml_string_copy(int8 *param_1,void *param_2,ulong param_3)
{
size_t local_28;
if (param_1 != (int8 *)0x0) {
local_28 = param_3;
if ((ulong)param_1[1] <= param_3) {
local_28 = param_1[1];
}
memcpy(param_2,(void *)*param_1,local_28);
*(int1 *)((long)param_2 + local_28) = 0;
}
return;
}
|
|
691 | xml_string_copy | eloqsql/storage/maria/libmarias3/src/xml.c | void xml_string_copy(struct xml_string* string, uint8_t* buffer, size_t length) {
if (!string) {
return;
}
#define min(X,Y) ((X) < (Y) ? (X) : (Y))
length = min(length, string->length);
#undef min
memcpy(buffer, string->buffer, length);
buffer[length]= '\0';
} | O3 | c | xml_string_copy:
testq %rdi, %rdi
je 0x135c2
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
cmpq %rdx, %rax
cmovbq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0xa480
movb $0x0, (%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| xml_string_copy:
test rdi, rdi
jz short locret_135C2
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov rsi, [rdi]
mov rax, [rdi+8]
cmp rax, rdx
cmovb rbx, rax
mov rdi, r14
mov rdx, rbx
call _memcpy
mov byte ptr [r14+rbx], 0
pop rbx
pop r14
pop rbp
locret_135C2:
retn
| long long xml_string_copy(_QWORD *a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rbx
long long result; // rax
if ( a1 )
{
v3 = a3;
if ( a1[1] < a3 )
v3 = a1[1];
result = memcpy(a2, *a1, v3);
*(_BYTE *)(a2 + v3) = 0;
}
return result;
}
| xml_string_copy:
TEST RDI,RDI
JZ 0x001135c2
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV RSI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RDX
CMOVC RBX,RAX
MOV RDI,R14
MOV RDX,RBX
CALL 0x0010a480
MOV byte ptr [R14 + RBX*0x1],0x0
POP RBX
POP R14
POP RBP
LAB_001135c2:
RET
|
void xml_string_copy(int8 *param_1,void *param_2,ulong param_3)
{
if (param_1 != (int8 *)0x0) {
if ((ulong)param_1[1] < param_3) {
param_3 = param_1[1];
}
memcpy(param_2,(void *)*param_1,param_3);
*(int1 *)((long)param_2 + param_3) = 0;
}
return;
}
|
|
692 | my_numcells_eucjpms | eloqsql/strings/ctype-eucjpms.c | static
size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_eucjpms:
cmpq %rdx, %rsi
jae 0xb5381
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0xb535a
cmpl $0x8f, %edi
jne 0xb5366
movl $0x3, %edi
movl $0x2, %ecx
jmp 0xb5374
movl $0x2, %edi
movl $0x1, %ecx
jmp 0xb5374
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0xb533b
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_eucjpms:
cmp rsi, rdx
jnb short loc_B5381
push rbp
mov rbp, rsp
xor eax, eax
loc_B533B:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_B535A
cmp edi, 8Fh
jnz short loc_B5366
mov edi, 3
mov ecx, 2
jmp short loc_B5374
loc_B535A:
mov edi, 2
mov ecx, 1
jmp short loc_B5374
loc_B5366:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_B5374:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_B533B
pop rbp
retn
loc_B5381:
xor eax, eax
retn
| long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_eucjpms:
CMP RSI,RDX
JNC 0x001b5381
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001b533b:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x001b535a
CMP EDI,0x8f
JNZ 0x001b5366
MOV EDI,0x3
MOV ECX,0x2
JMP 0x001b5374
LAB_001b535a:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x001b5374
LAB_001b5366:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_001b5374:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x001b533b
POP RBP
RET
LAB_001b5381:
XOR EAX,EAX
RET
|
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
693 | realloc | seiftnesse[P]memoryallocator/src/custom_alloc_core.c | void *_realloc(void *ptr, size_t size) {
HEAP_LOG("Realloc request: %p, new size: %zu bytes\n", ptr, size);
// Handle special cases
if (!ptr) {
HEAP_LOG("Realloc with NULL pointer, equivalent to malloc(%zu)\n", size);
return _malloc(size);
}
if (size == 0) {
HEAP_LOG("Realloc with zero size, equivalent to free(%p)\n", ptr);
_free(ptr);
return NULL;
}
// Safety check to prevent unreasonable allocations
if (size > HEAP_SIZE / 2) {
HEAP_LOG("Realloc failed: requested size %zu exceeds limit\n", size);
return NULL;
}
// Small allocations have different handling
if (is_small_allocation(ptr)) {
HEAP_LOG("Realloc of small allocation: %p, size=%zu\n", ptr, size);
// For small allocations, we can't reuse the memory efficiently
// so we allocate new memory, copy the data, and free the old memory
void *new_ptr = _malloc(size);
if (!new_ptr) {
HEAP_LOG("Realloc failed: could not allocate new memory\n");
return NULL;
}
// Calculate original size based on bitmap
size_t offset = (uint8_t *) ptr - small_pool;
int start_block = offset / SMALL_BLOCK_SIZE;
int blocks = 0;
// Count allocated blocks
while (start_block + blocks < SMALL_POOL_SIZE / SMALL_BLOCK_SIZE) {
int bmap_idx = (start_block + blocks) / 32;
int bit_idx = (start_block + blocks) % 32;
if (!(small_block_bitmap[bmap_idx] & (1 << bit_idx))) {
break;
}
blocks++;
}
// Calculate copy size (minimum of old and new sizes)
size_t old_size = blocks * SMALL_BLOCK_SIZE;
size_t copy_size = (size < old_size) ? size : old_size;
HEAP_LOG("Small realloc: old size=%zu, copy size=%zu\n", old_size, copy_size);
if (copy_size > 0) {
_memcpy(new_ptr, ptr, copy_size);
}
// Free the old allocation
_free(ptr);
HEAP_LOG("Small realloc succeeded: old=%p, new=%p\n", ptr, new_ptr);
return new_ptr;
}
// Ensure heap is initialized
EnsureHeapInitialized();
// Convert user pointer back to segment
segment_t *s = PtrToSegment(ptr);
if (!s) {
HEAP_LOG("Realloc failed: invalid pointer %p\n", ptr);
return NULL; // Invalid pointer
}
// Verify segment integrity
check_memory_corruption(s);
int integrity_errors = verify_segment_integrity(s, 1);
if (integrity_errors > 0) {
HEAP_LOG("Fixed %d integrity errors during free operation\n", integrity_errors);
}
// If segment is already marked as free, something went wrong
if (s->is_free) {
HEAP_LOG("WARNING: Attempting to realloc an already freed pointer: %p\n", ptr);
return NULL;
}
// Calculate data size available in current allocation
void *user_ptr = SegmentToPtr(s);
size_t current_data_size = ((char *) s + s->size * BLOCK_SIZE) - (char *) user_ptr;
// Safety check
if (current_data_size > s->size * BLOCK_SIZE) {
HEAP_LOG("Warning: Data size calculation error, resetting to zero\n");
// Something went wrong with pointer calculations
current_data_size = 0;
}
HEAP_LOG("Current data size available: %zu bytes\n", current_data_size);
// Calculate required blocks for new size
int required_blocks = GetNumBlock(size + sizeof(segment_t) + ALIGNMENT);
HEAP_LOG("Required blocks for new size: %d\n", required_blocks);
// If new size fits in current allocation, we can potentially reuse it
if (s->size == required_blocks) {
HEAP_LOG("Realloc: size unchanged, returning original pointer\n");
return ptr; // No change needed
}
// If new size is smaller, we can shrink the segment
if (s->size > required_blocks) {
HEAP_LOG("Shrinking allocation: current=%d blocks, required=%d blocks\n",
s->size, required_blocks);
if (s->size > required_blocks + GetNumBlock(sizeof(segment_t) + ALIGNMENT)) {
// We have enough extra space to create a new free segment
segment_t *remaining = CutSegment(s, s->size - required_blocks);
remaining->is_free = 1;
last_free_segment = remaining;
// Update statistics
update_stats_free(s->size - required_blocks);
HEAP_LOG("Created new free segment from excess space: %p, size=%d blocks\n",
remaining, remaining->size);
}
HEAP_LOG("Realloc shrink succeeded: same pointer %p, reduced size\n", ptr);
return ptr; // Return original pointer with reduced allocation
}
// Try to expand in place if next segment is free and big enough
if (s->next && s->next->is_free && (s->size + s->next->size) >= required_blocks) {
// Remember original size for stats update
int old_size = s->size;
HEAP_LOG("Expanding in place: current=%d blocks, next free=%d blocks, required=%d\n",
s->size, s->next->size, required_blocks);
// Merge with next segment
s = MergeSegment(s, s->next);
// If we have excess space, split the segment
if (s->size > required_blocks + GetNumBlock(sizeof(segment_t) + ALIGNMENT)) {
segment_t *remaining = CutSegment(s, s->size - required_blocks);
remaining->is_free = 1;
last_free_segment = remaining;
HEAP_LOG("Split excess space after in-place expansion: %p, size=%d blocks\n",
remaining, remaining->size);
}
// Update allocation statistics
update_stats_allocate(s->size - old_size);
HEAP_LOG("Realloc in-place expand succeeded: same pointer %p, increased size\n", ptr);
return ptr; // Return original pointer with expanded allocation
}
// We need to allocate new memory and move the data
HEAP_LOG("Realloc requires new allocation and data copy\n");
// Update integrity metadata after reallocation
initialize_segment_integrity(s);
void *new_ptr = _malloc(size);
if (!new_ptr) {
HEAP_LOG("Realloc failed: could not allocate new memory of size %zu\n", size);
return NULL; // Allocation failed
}
// Copy the data from old to new location
size_t copy_size = (size < current_data_size) ? size : current_data_size;
if (copy_size > 0 && ptr && new_ptr) {
if (copy_size > HEAP_SIZE) {
HEAP_LOG("Critical: copy size exceeds heap size, resetting to zero\n");
copy_size = 0; // Something is very wrong with the size calculation
}
HEAP_LOG("Copying %zu bytes from %p to %p\n", copy_size, ptr, new_ptr);
_memcpy(new_ptr, ptr, copy_size);
}
// Free the old memory
HEAP_LOG("Freeing original pointer %p after realloc\n", ptr);
_free(ptr);
HEAP_LOG("Realloc succeeded: old=%p, new=%p, size=%zu\n", ptr, new_ptr, size);
return new_ptr;
} | O1 | c | realloc:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testq %rdi, %rdi
je 0x11302
movq %rdi, %rbx
testq %r14, %r14
je 0x11318
cmpq $0x2000000, %r14 # imm = 0x2000000
ja 0x11320
movq %rbx, %rdi
callq 0x116ef
testl %eax, %eax
je 0x11335
movq %r14, %rdi
callq 0x1100b
testq %rax, %rax
je 0x11320
movq %rax, %r15
leaq 0x4bae4(%rip), %rax # 0x5cd60
movq %rbx, %rdx
subq %rax, %rdx
shrq $0x5, %rdx
cmpl $0x8001, %edx # imm = 0x8001
movl $0x8000, %eax # imm = 0x8000
cmovgel %edx, %eax
subl %edx, %eax
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
leaq 0x414babe(%rip), %rdi # 0x415cd60
leal (%rdx,%rsi), %ecx
incl %ecx
cmpl $0x7fff, %ecx # imm = 0x7FFF
jg 0x112da
leal 0x1f(%rcx), %r9d
testl %ecx, %ecx
cmovnsl %ecx, %r9d
sarl $0x5, %r9d
movl $0x1, %r8d
shll %cl, %r8d
movslq %r9d, %rcx
incl %esi
andl (%rdi,%rcx,4), %r8d
jne 0x112a2
cmpl $0x1, %r8d
sbbl $-0x1, %esi
movl %esi, %eax
testl %eax, %eax
je 0x112f8
shll $0x5, %eax
cltq
cmpq %r14, %rax
cmovbq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11c7e
movq %rbx, %rdi
callq 0x11115
jmp 0x11323
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1100b
movq %rbx, %rdi
callq 0x11115
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x4ba14(%rip) # 0x5cd50
jne 0x11359
leaq 0x14ba1b(%rip), %rdi # 0x15cd60
movl $0x4000000, %esi # imm = 0x4000000
callq 0x10f80
movl $0x1, 0x4b9f7(%rip) # 0x5cd50
movq %rbx, %rdi
callq 0x118c0
testq %rax, %rax
je 0x11320
movq %rax, %r15
movq %rax, %rdi
callq 0x11f4c
movq %r15, %rdi
movl $0x1, %esi
callq 0x11a05
cmpl $0x0, (%r15)
jne 0x11320
movq %r15, %rdi
callq 0x118b0
movslq 0x4(%r15), %rcx
shlq $0xc, %rcx
movq %r15, %rdx
addq %rcx, %rdx
subq %rax, %rdx
xorl %r13d, %r13d
cmpq %rcx, %rdx
cmovbeq %rdx, %r13
leaq 0x40(%r14), %rdi
callq 0x1176f
movslq 0x4(%r15), %r12
cmpl %eax, %r12d
jne 0x113c1
movq %rbx, %r15
jmp 0x11323
movl %eax, %ebp
cmpl %eax, %r12d
jle 0x11405
movl $0x40, %edi
callq 0x1176f
addl %ebp, %eax
cmpl %eax, %r12d
jle 0x113b9
movl 0x4(%r15), %esi
subl %ebp, %esi
movq %r15, %rdi
callq 0x1178a
movl $0x1, (%rax)
movq %rax, 0x4b954(%rip) # 0x5cd48
movslq 0x4(%r15), %rdi
movslq %ebp, %rax
subq %rax, %rdi
callq 0x11e77
jmp 0x113b9
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x1141d
cmpl $0x0, (%rsi)
je 0x1141d
movl 0x4(%rsi), %eax
addl %r12d, %eax
cmpl %ebp, %eax
jge 0x11461
movq %r15, %rdi
callq 0x117eb
movq %r14, %rdi
callq 0x1100b
testq %rax, %rax
je 0x11320
movq %rax, %r15
testq %r13, %r13
je 0x112f8
cmpq %r14, %r13
cmovbq %r13, %r14
xorl %edx, %edx
cmpq $0x4000001, %r14 # imm = 0x4000001
cmovbq %r14, %rdx
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x112f3
movq %r15, %rdi
callq 0x11834
movq %rax, %r14
movl 0x4(%rax), %r15d
movl $0x40, %edi
callq 0x1176f
addl %ebp, %eax
cmpl %eax, %r15d
jle 0x1149c
movl 0x4(%r14), %esi
subl %ebp, %esi
movq %r14, %rdi
callq 0x1178a
movl $0x1, (%rax)
movq %rax, 0x4b8ac(%rip) # 0x5cd48
movslq 0x4(%r14), %rdi
subq %r12, %rdi
callq 0x11e51
jmp 0x113b9
| _realloc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test rdi, rdi
jz loc_11302
mov rbx, rdi
test r14, r14
jz loc_11318
cmp r14, offset unk_2000000
ja loc_11320
mov rdi, rbx
call is_small_allocation
test eax, eax
jz loc_11335
mov rdi, r14
call _malloc
test rax, rax
jz loc_11320
mov r15, rax
lea rax, small_pool
mov rdx, rbx
sub rdx, rax
shr rdx, 5
cmp edx, 8001h
mov eax, 8000h
cmovge eax, edx
sub eax, edx
mov esi, 0FFFFFFFFh
lea rdi, small_block_bitmap
loc_112A2:
lea ecx, [rdx+rsi]
inc ecx
cmp ecx, 7FFFh
jg short loc_112DA
lea r9d, [rcx+1Fh]
test ecx, ecx
cmovns r9d, ecx
sar r9d, 5
mov r8d, 1
shl r8d, cl
movsxd rcx, r9d
inc esi
and r8d, [rdi+rcx*4]
jnz short loc_112A2
cmp r8d, 1
sbb esi, 0FFFFFFFFh
mov eax, esi
loc_112DA:
test eax, eax
jz short loc_112F8
shl eax, 5
cdqe
cmp rax, r14
cmovb r14, rax
mov rdi, r15
mov rsi, rbx
mov rdx, r14
loc_112F3:
call _memcpy
loc_112F8:
mov rdi, rbx
call _free
jmp short loc_11323
loc_11302:
mov rdi, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _malloc
loc_11318:
mov rdi, rbx
call _free
loc_11320:
xor r15d, r15d
loc_11323:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_11335:
cmp cs:heap_initialized, 0
jnz short loc_11359
lea rdi, memory
mov esi, offset unk_4000000
call HeapInit
mov cs:heap_initialized, 1
loc_11359:
mov rdi, rbx
call PtrToSegment
test rax, rax
jz short loc_11320
mov r15, rax
mov rdi, rax
call check_memory_corruption
mov rdi, r15
mov esi, 1
call verify_segment_integrity
cmp dword ptr [r15], 0
jnz short loc_11320
mov rdi, r15
call SegmentToPtr
movsxd rcx, dword ptr [r15+4]
shl rcx, 0Ch
mov rdx, r15
add rdx, rcx
sub rdx, rax
xor r13d, r13d
cmp rdx, rcx
cmovbe r13, rdx
lea rdi, [r14+40h]
call GetNumBlock
movsxd r12, dword ptr [r15+4]
cmp r12d, eax
jnz short loc_113C1
loc_113B9:
mov r15, rbx
jmp loc_11323
loc_113C1:
mov ebp, eax
cmp r12d, eax
jle short loc_11405
mov edi, 40h ; '@'
call GetNumBlock
add eax, ebp
cmp r12d, eax
jle short loc_113B9
mov esi, [r15+4]
sub esi, ebp
mov rdi, r15
call CutSegment
mov dword ptr [rax], 1
mov cs:last_free_segment, rax
movsxd rdi, dword ptr [r15+4]
movsxd rax, ebp
sub rdi, rax
call update_stats_free
jmp short loc_113B9
loc_11405:
mov rsi, [r15+8]
test rsi, rsi
jz short loc_1141D
cmp dword ptr [rsi], 0
jz short loc_1141D
mov eax, [rsi+4]
add eax, r12d
cmp eax, ebp
jge short loc_11461
loc_1141D:
mov rdi, r15
call initialize_segment_integrity
mov rdi, r14
call _malloc
test rax, rax
jz loc_11320
mov r15, rax
test r13, r13
jz loc_112F8
cmp r13, r14
cmovb r14, r13
xor edx, edx
cmp r14, offset unk_4000001
cmovb rdx, r14
mov rdi, r15
mov rsi, rbx
jmp loc_112F3
loc_11461:
mov rdi, r15
call MergeSegment
mov r14, rax
mov r15d, [rax+4]
mov edi, 40h ; '@'
call GetNumBlock
add eax, ebp
cmp r15d, eax
jle short loc_1149C
mov esi, [r14+4]
sub esi, ebp
mov rdi, r14
call CutSegment
mov dword ptr [rax], 1
mov cs:last_free_segment, rax
loc_1149C:
movsxd rdi, dword ptr [r14+4]
sub rdi, r12
call update_stats_allocate
jmp loc_113B9
| long long realloc(long long a1, unsigned long long a2)
{
unsigned long long v2; // r14
long long v4; // rax
long long v5; // r15
unsigned long long v6; // rdx
int v7; // eax
int v8; // eax
int v9; // esi
int v10; // ecx
unsigned long long v11; // rax
long long v12; // rdi
long long v13; // rsi
unsigned long long v14; // rdx
long long v16; // rax
long long v17; // r15
long long v18; // rax
unsigned long long v19; // rcx
unsigned long long v20; // r13
int NumBlock; // eax
long long v22; // r12
int v23; // ebp
_DWORD *v24; // rax
_DWORD *v25; // rsi
long long v26; // rax
long long v27; // r14
signed int v28; // r15d
_DWORD *v29; // rax
v2 = a2;
if ( !a1 )
return malloc(a2);
if ( !a2 )
{
free(a1);
return 0LL;
}
if ( a2 > (unsigned long long)&unk_2000000 )
return 0LL;
if ( (unsigned int)is_small_allocation(a1) )
{
v4 = malloc(a2);
if ( v4 )
{
v5 = v4;
v6 = (unsigned long long)(a1 - (_QWORD)&small_pool) >> 5;
v7 = 0x8000;
if ( (int)v6 >= 32769 )
v7 = (unsigned long long)(a1 - (_QWORD)&small_pool) >> 5;
v8 = v7 - v6;
v9 = -1;
while ( 1 )
{
v10 = v6 + v9 + 1;
if ( v10 > 0x7FFF )
break;
++v9;
if ( (small_block_bitmap[v10 / 32] & (1 << v10)) == 0 )
{
v8 = v9;
break;
}
}
if ( !v8 )
goto LABEL_17;
v11 = 32 * v8;
if ( v11 < v2 )
v2 = v11;
v12 = v5;
v13 = a1;
v14 = v2;
goto LABEL_16;
}
return 0LL;
}
if ( !heap_initialized )
{
HeapInit((unsigned long long)&memory, (unsigned long long)&unk_4000000);
heap_initialized = 1;
}
v16 = PtrToSegment(a1);
if ( !v16 )
return 0LL;
v17 = v16;
check_memory_corruption(v16);
verify_segment_integrity(v17, 1LL);
if ( *(_DWORD *)v17 )
return 0LL;
v18 = SegmentToPtr(v17);
v19 = (long long)*(int *)(v17 + 4) << 12;
v20 = 0LL;
if ( v19 + v17 - v18 <= v19 )
v20 = v19 + v17 - v18;
NumBlock = GetNumBlock(a2 + 64);
v22 = *(int *)(v17 + 4);
if ( (_DWORD)v22 == NumBlock )
return a1;
v23 = NumBlock;
if ( (int)v22 > NumBlock )
{
if ( (int)v22 > (int)(NumBlock + GetNumBlock(64LL)) )
{
v24 = (_DWORD *)CutSegment(v17, (unsigned int)(*(_DWORD *)(v17 + 4) - v23));
*v24 = 1;
last_free_segment = (long long)v24;
update_stats_free(*(int *)(v17 + 4) - (long long)v23);
}
return a1;
}
v25 = *(_DWORD **)(v17 + 8);
if ( v25 && *v25 && (int)v22 + v25[1] >= NumBlock )
{
v27 = MergeSegment(v17);
v28 = *(_DWORD *)(v27 + 4);
if ( v28 > (int)(v23 + GetNumBlock(64LL)) )
{
v29 = (_DWORD *)CutSegment(v27, (unsigned int)(*(_DWORD *)(v27 + 4) - v23));
*v29 = 1;
last_free_segment = (long long)v29;
}
update_stats_allocate(*(int *)(v27 + 4) - v22);
return a1;
}
initialize_segment_integrity(v17);
v26 = malloc(v2);
if ( !v26 )
return 0LL;
v5 = v26;
if ( !v20 )
goto LABEL_17;
if ( v20 < v2 )
v2 = v20;
v14 = 0LL;
if ( v2 < (unsigned long long)&unk_4000001 )
v14 = v2;
v12 = v26;
v13 = a1;
LABEL_16:
memcpy(v12, v13, v14);
LABEL_17:
free(a1);
return v5;
}
| _realloc:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST RDI,RDI
JZ 0x00111302
MOV RBX,RDI
TEST R14,R14
JZ 0x00111318
CMP R14,0x2000000
JA 0x00111320
MOV RDI,RBX
CALL 0x001116ef
TEST EAX,EAX
JZ 0x00111335
MOV RDI,R14
CALL 0x0011100b
TEST RAX,RAX
JZ 0x00111320
MOV R15,RAX
LEA RAX,[0x15cd60]
MOV RDX,RBX
SUB RDX,RAX
SHR RDX,0x5
CMP EDX,0x8001
MOV EAX,0x8000
CMOVGE EAX,EDX
SUB EAX,EDX
MOV ESI,0xffffffff
LEA RDI,[0x425cd60]
LAB_001112a2:
LEA ECX,[RDX + RSI*0x1]
INC ECX
CMP ECX,0x7fff
JG 0x001112da
LEA R9D,[RCX + 0x1f]
TEST ECX,ECX
CMOVNS R9D,ECX
SAR R9D,0x5
MOV R8D,0x1
SHL R8D,CL
MOVSXD RCX,R9D
INC ESI
AND R8D,dword ptr [RDI + RCX*0x4]
JNZ 0x001112a2
CMP R8D,0x1
SBB ESI,-0x1
MOV EAX,ESI
LAB_001112da:
TEST EAX,EAX
JZ 0x001112f8
SHL EAX,0x5
CDQE
CMP RAX,R14
CMOVC R14,RAX
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
LAB_001112f3:
CALL 0x00111c7e
LAB_001112f8:
MOV RDI,RBX
CALL 0x00111115
JMP 0x00111323
LAB_00111302:
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011100b
LAB_00111318:
MOV RDI,RBX
CALL 0x00111115
LAB_00111320:
XOR R15D,R15D
LAB_00111323:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00111335:
CMP dword ptr [0x0015cd50],0x0
JNZ 0x00111359
LEA RDI,[0x25cd60]
MOV ESI,0x4000000
CALL 0x00110f80
MOV dword ptr [0x0015cd50],0x1
LAB_00111359:
MOV RDI,RBX
CALL 0x001118c0
TEST RAX,RAX
JZ 0x00111320
MOV R15,RAX
MOV RDI,RAX
CALL 0x00111f4c
MOV RDI,R15
MOV ESI,0x1
CALL 0x00111a05
CMP dword ptr [R15],0x0
JNZ 0x00111320
MOV RDI,R15
CALL 0x001118b0
MOVSXD RCX,dword ptr [R15 + 0x4]
SHL RCX,0xc
MOV RDX,R15
ADD RDX,RCX
SUB RDX,RAX
XOR R13D,R13D
CMP RDX,RCX
CMOVBE R13,RDX
LEA RDI,[R14 + 0x40]
CALL 0x0011176f
MOVSXD R12,dword ptr [R15 + 0x4]
CMP R12D,EAX
JNZ 0x001113c1
LAB_001113b9:
MOV R15,RBX
JMP 0x00111323
LAB_001113c1:
MOV EBP,EAX
CMP R12D,EAX
JLE 0x00111405
MOV EDI,0x40
CALL 0x0011176f
ADD EAX,EBP
CMP R12D,EAX
JLE 0x001113b9
MOV ESI,dword ptr [R15 + 0x4]
SUB ESI,EBP
MOV RDI,R15
CALL 0x0011178a
MOV dword ptr [RAX],0x1
MOV qword ptr [0x0015cd48],RAX
MOVSXD RDI,dword ptr [R15 + 0x4]
MOVSXD RAX,EBP
SUB RDI,RAX
CALL 0x00111e77
JMP 0x001113b9
LAB_00111405:
MOV RSI,qword ptr [R15 + 0x8]
TEST RSI,RSI
JZ 0x0011141d
CMP dword ptr [RSI],0x0
JZ 0x0011141d
MOV EAX,dword ptr [RSI + 0x4]
ADD EAX,R12D
CMP EAX,EBP
JGE 0x00111461
LAB_0011141d:
MOV RDI,R15
CALL 0x001117eb
MOV RDI,R14
CALL 0x0011100b
TEST RAX,RAX
JZ 0x00111320
MOV R15,RAX
TEST R13,R13
JZ 0x001112f8
CMP R13,R14
CMOVC R14,R13
XOR EDX,EDX
CMP R14,0x4000001
CMOVC RDX,R14
MOV RDI,R15
MOV RSI,RBX
JMP 0x001112f3
LAB_00111461:
MOV RDI,R15
CALL 0x00111834
MOV R14,RAX
MOV R15D,dword ptr [RAX + 0x4]
MOV EDI,0x40
CALL 0x0011176f
ADD EAX,EBP
CMP R15D,EAX
JLE 0x0011149c
MOV ESI,dword ptr [R14 + 0x4]
SUB ESI,EBP
MOV RDI,R14
CALL 0x0011178a
MOV dword ptr [RAX],0x1
MOV qword ptr [0x0015cd48],RAX
LAB_0011149c:
MOVSXD RDI,dword ptr [R14 + 0x4]
SUB RDI,R12
CALL 0x00111e51
JMP 0x001113b9
|
void * _realloc(void *__ptr,size_t __size)
{
int *piVar1;
int iVar2;
int iVar3;
int iVar4;
void *pvVar5;
int *piVar6;
long lVar7;
int iVar8;
ulong uVar9;
ulong uVar10;
int iVar11;
int iVar12;
if (__ptr == (void *)0x0) {
pvVar5 = (void *)_malloc(__size);
return pvVar5;
}
if (__size == 0) {
_free(__ptr);
return (void *)0x0;
}
if (0x2000000 < __size) {
return (void *)0x0;
}
iVar2 = is_small_allocation(__ptr);
if (iVar2 == 0) {
if (heap_initialized == 0) {
HeapInit(memory,0x4000000);
heap_initialized = 1;
}
piVar6 = (int *)PtrToSegment(__ptr);
if (piVar6 == (int *)0x0) {
return (void *)0x0;
}
check_memory_corruption(piVar6);
verify_segment_integrity(piVar6,1);
if (*piVar6 != 0) {
return (void *)0x0;
}
lVar7 = SegmentToPtr(piVar6);
uVar10 = (long)piVar6 + ((long)piVar6[1] * 0x1000 - lVar7);
uVar9 = 0;
if (uVar10 <= (ulong)((long)piVar6[1] * 0x1000)) {
uVar9 = uVar10;
}
iVar3 = GetNumBlock(__size + 0x40);
iVar2 = piVar6[1];
if (iVar2 == iVar3) {
return __ptr;
}
if (iVar3 < iVar2) {
iVar4 = GetNumBlock(0x40);
if (iVar4 + iVar3 < iVar2) {
last_free_segment = (int4 *)CutSegment(piVar6,piVar6[1] - iVar3);
*last_free_segment = 1;
update_stats_free((long)piVar6[1] - (long)iVar3);
return __ptr;
}
return __ptr;
}
piVar1 = *(int **)(piVar6 + 2);
if (((piVar1 != (int *)0x0) && (*piVar1 != 0)) && (iVar3 <= piVar1[1] + iVar2)) {
lVar7 = MergeSegment(piVar6);
iVar4 = *(int *)(lVar7 + 4);
iVar8 = GetNumBlock(0x40);
if (iVar8 + iVar3 < iVar4) {
last_free_segment = (int4 *)CutSegment(lVar7,*(int *)(lVar7 + 4) - iVar3);
*last_free_segment = 1;
}
update_stats_allocate((long)*(int *)(lVar7 + 4) - (long)iVar2);
return __ptr;
}
initialize_segment_integrity(piVar6);
pvVar5 = (void *)_malloc(__size);
if (pvVar5 == (void *)0x0) {
return (void *)0x0;
}
if (uVar9 == 0) goto LAB_001112f8;
if (uVar9 < __size) {
__size = uVar9;
}
uVar9 = 0;
if (__size < 0x4000001) {
uVar9 = __size;
}
}
else {
pvVar5 = (void *)_malloc(__size);
if (pvVar5 == (void *)0x0) {
return (void *)0x0;
}
iVar3 = (int)((long)__ptr - 0x15cd60U >> 5);
iVar2 = 0x8000;
if (0x8000 < iVar3) {
iVar2 = iVar3;
}
iVar2 = iVar2 - iVar3;
iVar4 = -1;
do {
iVar11 = iVar4;
iVar8 = iVar3 + iVar11 + 1;
if (0x7fff < iVar8) goto LAB_001112da;
iVar12 = iVar3 + iVar11 + 0x20;
if (-1 < iVar8) {
iVar12 = iVar8;
}
iVar4 = iVar11 + 1;
} while ((1 << ((byte)iVar8 & 0x1f) & (&small_block_bitmap)[iVar12 >> 5]) != 0);
iVar2 = iVar11 + 1;
LAB_001112da:
if (iVar2 == 0) goto LAB_001112f8;
uVar9 = __size;
if ((ulong)(long)(iVar2 << 5) < __size) {
uVar9 = (long)(iVar2 << 5);
}
}
_memcpy(pvVar5,__ptr,uVar9);
LAB_001112f8:
_free(__ptr);
return pvVar5;
}
|
|
694 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O2 | cpp | string_process_escapes(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 $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
leaq 0xf(%rsp), %rbp
xorl %ecx, %ecx
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
xorl %r15d, %r15d
cmpq %r13, %rcx
jae 0x55f45
movq (%rbx), %rax
movb (%rax,%rcx), %r8b
cmpb $0x5c, %r8b
jne 0x55e92
leaq 0x1(%rcx), %r14
cmpq %r13, %r14
jae 0x55e92
movzbl (%rax,%r14), %r8d
cmpl $0x22, %r8d
je 0x55f0b
cmpl $0x27, %r8d
je 0x55f19
cmpl $0x5c, %r8d
je 0x55f12
cmpl $0x78, %r8d
je 0x55ea4
cmpl $0x72, %r8d
je 0x55f04
cmpl $0x74, %r8d
je 0x55efd
cmpl $0x6e, %r8d
jne 0x55ee6
movb $0xa, (%rax,%r15)
jmp 0x55f1e
movb %r8b, (%rax,%r15)
incq %r15
movq %rcx, %r14
incq %r14
movq %r14, %rcx
jmp 0x55e2a
leaq 0x3(%rcx), %r12
cmpq %r13, %r12
jae 0x55ee6
movb 0x2(%rax,%rcx), %r8b
movb %r8b, 0xd(%rsp)
movb 0x3(%rax,%rcx), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
andq $0x0, 0x10(%rsp)
callq 0x242d0
cmpq %rbp, 0x10(%rsp)
je 0x55f26
movq (%rbx), %rax
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
movb $0x5c, (%rax,%r15)
movq (%rbx), %rax
movb (%rax,%r14), %cl
movb %cl, 0x1(%rax,%r15)
addq $0x2, %r15
jmp 0x55e9c
movb $0x9, (%rax,%r15)
jmp 0x55f1e
movb $0xd, (%rax,%r15)
jmp 0x55f1e
movb $0x22, (%rax,%r15)
jmp 0x55f1e
movb $0x5c, (%rax,%r15)
jmp 0x55f1e
movb $0x27, (%rax,%r15)
incq %r15
jmp 0x55e9c
movq (%rbx), %rcx
movb %al, (%rcx,%r15)
incq %r15
movq %r12, %r14
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
jmp 0x55e9c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23c70
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
lea rbp, [rsp+48h+var_39]
xor ecx, ecx
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
push 10h
pop rdx
xor r15d, r15d
loc_55E2A:
cmp rcx, r13
jnb loc_55F45
mov rax, [rbx]
mov r8b, [rax+rcx]
cmp r8b, 5Ch ; '\'
jnz short loc_55E92
lea r14, [rcx+1]
cmp r14, r13
jnb short loc_55E92
movzx r8d, byte ptr [rax+r14]
cmp r8d, 22h ; '"'
jz loc_55F0B
cmp r8d, 27h ; '''
jz loc_55F19
cmp r8d, 5Ch ; '\'
jz loc_55F12
cmp r8d, 78h ; 'x'
jz short loc_55EA4
cmp r8d, 72h ; 'r'
jz loc_55F04
cmp r8d, 74h ; 't'
jz short loc_55EFD
cmp r8d, 6Eh ; 'n'
jnz short loc_55EE6
mov byte ptr [rax+r15], 0Ah
jmp loc_55F1E
loc_55E92:
mov [rax+r15], r8b
inc r15
mov r14, rcx
loc_55E9C:
inc r14
mov rcx, r14
jmp short loc_55E2A
loc_55EA4:
lea r12, [rcx+3]
cmp r12, r13
jnb short loc_55EE6
mov r8b, [rax+rcx+2]
mov [rsp+48h+var_3B], r8b
mov al, [rax+rcx+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
and [rsp+48h+var_38], 0
call strtol
cmp [rsp+48h+var_38], rbp
jz short loc_55F26
mov rax, [rbx]
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
push 10h
pop rdx
loc_55EE6:
mov byte ptr [rax+r15], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+r14]
mov [rax+r15+1], cl
add r15, 2
jmp short loc_55E9C
loc_55EFD:
mov byte ptr [rax+r15], 9
jmp short loc_55F1E
loc_55F04:
mov byte ptr [rax+r15], 0Dh
jmp short loc_55F1E
loc_55F0B:
mov byte ptr [rax+r15], 22h ; '"'
jmp short loc_55F1E
loc_55F12:
mov byte ptr [rax+r15], 5Ch ; '\'
jmp short loc_55F1E
loc_55F19:
mov byte ptr [rax+r15], 27h ; '''
loc_55F1E:
inc r15
jmp loc_55E9C
loc_55F26:
mov rcx, [rbx]
mov [rcx+r15], al
inc r15
mov r14, r12
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
push 10h
pop rdx
jmp loc_55E9C
loc_55F45:
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1)
{
unsigned long long v1; // r13
unsigned long long v2; // rcx
long long v3; // r15
long long v4; // rax
char v5; // r8
unsigned long long v6; // r14
int v7; // r8d
unsigned long long v8; // r12
char v9; // al
_BYTE v11[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v12; // [rsp+Fh] [rbp-39h] BYREF
char *v13; // [rsp+10h] [rbp-38h] BYREF
v1 = a1[1];
v2 = 0LL;
v3 = 0LL;
while ( v2 < v1 )
{
v4 = *a1;
v5 = *(_BYTE *)(*a1 + v2);
if ( v5 != 92 || (v6 = v2 + 1, v2 + 1 >= v1) )
{
*(_BYTE *)(v4 + v3++) = v5;
v6 = v2;
goto LABEL_14;
}
v7 = *(unsigned __int8 *)(v4 + v6);
switch ( v7 )
{
case '"':
*(_BYTE *)(v4 + v3) = 34;
LABEL_24:
++v3;
goto LABEL_14;
case '\'':
*(_BYTE *)(v4 + v3) = 39;
goto LABEL_24;
case '\\':
*(_BYTE *)(v4 + v3) = 92;
goto LABEL_24;
}
if ( v7 != 120 )
{
switch ( v7 )
{
case 'r':
*(_BYTE *)(v4 + v3) = 13;
break;
case 't':
*(_BYTE *)(v4 + v3) = 9;
break;
case 'n':
*(_BYTE *)(v4 + v3) = 10;
break;
default:
goto LABEL_18;
}
goto LABEL_24;
}
v8 = v2 + 3;
if ( v2 + 3 >= v1 )
goto LABEL_18;
v11[0] = *(_BYTE *)(v4 + v2 + 2);
v11[1] = *(_BYTE *)(v4 + v2 + 3);
v12 = 0;
v13 = 0LL;
v9 = strtol(v11, &v13, 16LL);
if ( v13 != &v12 )
{
v4 = *a1;
LABEL_18:
*(_BYTE *)(v4 + v3) = 92;
*(_BYTE *)(*a1 + v3 + 1) = *(_BYTE *)(*a1 + v6);
v3 += 2LL;
goto LABEL_14;
}
*(_BYTE *)(*a1 + v3++) = v9;
v6 = v8;
LABEL_14:
v2 = v6 + 1;
}
return std::string::resize(a1, v3, 16LL);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
LEA RBP,[RSP + 0xf]
XOR ECX,ECX
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
PUSH 0x10
POP RDX
XOR R15D,R15D
LAB_00155e2a:
CMP RCX,R13
JNC 0x00155f45
MOV RAX,qword ptr [RBX]
MOV R8B,byte ptr [RAX + RCX*0x1]
CMP R8B,0x5c
JNZ 0x00155e92
LEA R14,[RCX + 0x1]
CMP R14,R13
JNC 0x00155e92
MOVZX R8D,byte ptr [RAX + R14*0x1]
CMP R8D,0x22
JZ 0x00155f0b
CMP R8D,0x27
JZ 0x00155f19
CMP R8D,0x5c
JZ 0x00155f12
CMP R8D,0x78
JZ 0x00155ea4
CMP R8D,0x72
JZ 0x00155f04
CMP R8D,0x74
JZ 0x00155efd
CMP R8D,0x6e
JNZ 0x00155ee6
MOV byte ptr [RAX + R15*0x1],0xa
JMP 0x00155f1e
LAB_00155e92:
MOV byte ptr [RAX + R15*0x1],R8B
INC R15
MOV R14,RCX
LAB_00155e9c:
INC R14
MOV RCX,R14
JMP 0x00155e2a
LAB_00155ea4:
LEA R12,[RCX + 0x3]
CMP R12,R13
JNC 0x00155ee6
MOV R8B,byte ptr [RAX + RCX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],R8B
MOV AL,byte ptr [RAX + RCX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
AND qword ptr [RSP + 0x10],0x0
CALL 0x001242d0
CMP qword ptr [RSP + 0x10],RBP
JZ 0x00155f26
MOV RAX,qword ptr [RBX]
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
PUSH 0x10
POP RDX
LAB_00155ee6:
MOV byte ptr [RAX + R15*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + R14*0x1]
MOV byte ptr [RAX + R15*0x1 + 0x1],CL
ADD R15,0x2
JMP 0x00155e9c
LAB_00155efd:
MOV byte ptr [RAX + R15*0x1],0x9
JMP 0x00155f1e
LAB_00155f04:
MOV byte ptr [RAX + R15*0x1],0xd
JMP 0x00155f1e
LAB_00155f0b:
MOV byte ptr [RAX + R15*0x1],0x22
JMP 0x00155f1e
LAB_00155f12:
MOV byte ptr [RAX + R15*0x1],0x5c
JMP 0x00155f1e
LAB_00155f19:
MOV byte ptr [RAX + R15*0x1],0x27
LAB_00155f1e:
INC R15
JMP 0x00155e9c
LAB_00155f26:
MOV RCX,qword ptr [RBX]
MOV byte ptr [RCX + R15*0x1],AL
INC R15
MOV R14,R12
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
PUSH 0x10
POP RDX
JMP 0x00155e9c
LAB_00155f45:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00123c70
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
ulong uVar1;
char cVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
uVar3 = *(ulong *)(param_1 + 8);
uVar5 = 0;
lVar6 = 0;
do {
if (uVar3 <= uVar5) {
std::__cxx11::string::resize((ulong)param_1);
return;
}
lVar4 = *(long *)param_1;
if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) {
cVar2 = *(char *)(lVar4 + uVar1);
if (cVar2 == '\"') {
*(int1 *)(lVar4 + lVar6) = 0x22;
}
else if (cVar2 == '\'') {
*(int1 *)(lVar4 + lVar6) = 0x27;
}
else if (cVar2 == '\\') {
*(int1 *)(lVar4 + lVar6) = 0x5c;
}
else {
if (cVar2 == 'x') {
if (uVar5 + 3 < uVar3) {
local_3b = *(char *)(lVar4 + 2 + uVar5);
local_3a = *(int1 *)(lVar4 + 3 + uVar5);
local_39 = '\0';
local_38 = (char *)0x0;
lVar4 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar4;
lVar6 = lVar6 + 1;
uVar5 = uVar5 + 3;
goto LAB_00155e9c;
}
lVar4 = *(long *)param_1;
}
LAB_00155ee6:
*(int1 *)(lVar4 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar1);
lVar6 = lVar6 + 2;
uVar5 = uVar1;
goto LAB_00155e9c;
}
if (cVar2 == 'r') {
*(int1 *)(lVar4 + lVar6) = 0xd;
}
else if (cVar2 == 't') {
*(int1 *)(lVar4 + lVar6) = 9;
}
else {
if (cVar2 != 'n') goto LAB_00155ee6;
*(int1 *)(lVar4 + lVar6) = 10;
}
}
lVar6 = lVar6 + 1;
uVar5 = uVar1;
}
else {
*(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5);
lVar6 = lVar6 + 1;
}
LAB_00155e9c:
uVar5 = uVar5 + 1;
} while( true );
}
|
|
695 | promptTextColumnLen(char const*, unsigned long) | ericcurtin[P]linenoise/linenoise.cpp | static size_t promptTextColumnLen(const char * prompt, size_t plen) {
char buf[LINENOISE_MAX_LINE];
size_t buf_len = 0;
size_t off = 0;
while (off < plen) {
size_t len;
if (isAnsiEscape(prompt + off, plen - off, &len)) {
off += len;
continue;
}
buf[buf_len++] = prompt[off++];
}
return columnPos(buf, buf_len, buf_len);
} | O2 | cpp | promptTextColumnLen(char const*, unsigned long):
pushq %r14
pushq %rbx
subq $0x1008, %rsp # imm = 0x1008
xorl %edx, %edx
pushq $0x2
popq %rax
movabsq $0x1020000c06ff, %rcx # imm = 0x1020000C06FF
pushq $0x1
popq %r8
xorl %r9d, %r9d
movq %rsi, %r10
subq %r9, %r10
jbe 0x405c
leaq (%rdi,%r9), %r11
cmpq $0x3, %r10
jb 0x4028
cmpw $0x5b1b, (%r11) # imm = 0x5B1B
je 0x403a
movb (%r11), %r10b
movb %r10b, (%rsp,%rdx)
incq %rdx
movq %r8, %rbx
addq %rbx, %r9
jmp 0x400e
movq %rax, %rbx
cmpq %rbx, %r10
je 0x4028
movzbl (%r11,%rbx), %r14d
incq %rbx
addl $-0x41, %r14d
cmpl $0x2c, %r14d
ja 0x403d
btq %r14, %rcx
jae 0x403d
jmp 0x4035
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x4220
addq $0x1008, %rsp # imm = 0x1008
popq %rbx
popq %r14
retq
| _ZL19promptTextColumnLenPKcm:
push r14
push rbx
sub rsp, 1008h
xor edx, edx; unsigned __int64
push 2
pop rax
mov rcx, 1020000C06FFh
push 1
pop r8
xor r9d, r9d
loc_400E:
mov r10, rsi
sub r10, r9
jbe short loc_405C
lea r11, [rdi+r9]
cmp r10, 3
jb short loc_4028
cmp word ptr [r11], 5B1Bh
jz short loc_403A
loc_4028:
mov r10b, [r11]
mov [rsp+rdx+1018h+var_1018], r10b
inc rdx
mov rbx, r8
loc_4035:
add r9, rbx
jmp short loc_400E
loc_403A:
mov rbx, rax
loc_403D:
cmp r10, rbx
jz short loc_4028
movzx r14d, byte ptr [r11+rbx]
inc rbx
add r14d, 0FFFFFFBFh
cmp r14d, 2Ch ; ','
ja short loc_403D
bt rcx, r14
jnb short loc_403D
jmp short loc_4035
loc_405C:
mov rdi, rsp; char *
mov rsi, rdx; unsigned __int64
call _ZL9columnPosPKcmm; columnPos(char const*,ulong,ulong)
add rsp, 1008h
pop rbx
pop r14
retn
| long long promptTextColumnLen(const char *a1, unsigned long long a2)
{
unsigned long long v2; // rdx
long long v3; // rcx
unsigned long long i; // r9
unsigned long long v5; // r10
const char *v6; // r11
long long v7; // rbx
int v8; // r14d
unsigned long long v9; // r14
char v11[4120]; // [rsp+0h] [rbp-1018h] BYREF
v2 = 0LL;
v3 = 0x1020000C06FFLL;
for ( i = 0LL; ; i += v7 )
{
v5 = a2 - i;
if ( a2 <= i )
break;
v6 = &a1[i];
if ( v5 >= 3 && *(_WORD *)v6 == 23323 )
{
v7 = 2LL;
while ( v5 != v7 )
{
v8 = (unsigned __int8)v6[v7++];
v9 = (unsigned int)(v8 - 65);
if ( (unsigned int)v9 <= 0x2C && _bittest64(&v3, v9) )
goto LABEL_6;
}
}
v11[v2++] = *v6;
v7 = 1LL;
LABEL_6:
;
}
return columnPos(v11, v2, v2);
}
| promptTextColumnLen:
PUSH R14
PUSH RBX
SUB RSP,0x1008
XOR EDX,EDX
PUSH 0x2
POP RAX
MOV RCX,0x1020000c06ff
PUSH 0x1
POP R8
XOR R9D,R9D
LAB_0010400e:
MOV R10,RSI
SUB R10,R9
JBE 0x0010405c
LEA R11,[RDI + R9*0x1]
CMP R10,0x3
JC 0x00104028
CMP word ptr [R11],0x5b1b
JZ 0x0010403a
LAB_00104028:
MOV R10B,byte ptr [R11]
MOV byte ptr [RSP + RDX*0x1],R10B
INC RDX
MOV RBX,R8
LAB_00104035:
ADD R9,RBX
JMP 0x0010400e
LAB_0010403a:
MOV RBX,RAX
LAB_0010403d:
CMP R10,RBX
JZ 0x00104028
MOVZX R14D,byte ptr [R11 + RBX*0x1]
INC RBX
ADD R14D,-0x41
CMP R14D,0x2c
JA 0x0010403d
BT RCX,R14
JNC 0x0010403d
JMP 0x00104035
LAB_0010405c:
MOV RDI,RSP
MOV RSI,RDX
CALL 0x00104220
ADD RSP,0x1008
POP RBX
POP R14
RET
|
/* promptTextColumnLen(char const*, unsigned long) */
void promptTextColumnLen(char *param_1,ulong param_2)
{
short *psVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
char local_1018 [4104];
uVar2 = 0;
uVar5 = 0;
do {
if (param_2 <= uVar5) {
columnPos(local_1018,uVar2,uVar2);
return;
}
psVar1 = (short *)(param_1 + uVar5);
if ((param_2 - uVar5 < 3) || (uVar3 = 2, *psVar1 != 0x5b1b)) {
LAB_00104028:
local_1018[uVar2] = (char)*psVar1;
uVar2 = uVar2 + 1;
uVar4 = 1;
}
else {
do {
if (param_2 - uVar5 == uVar3) goto LAB_00104028;
uVar4 = uVar3 + 1;
uVar6 = *(byte *)((long)psVar1 + uVar3) - 0x41;
uVar3 = uVar4;
} while ((0x2c < uVar6) || ((0x1020000c06ffU >> ((ulong)uVar6 & 0x3f) & 1) == 0));
}
uVar5 = uVar5 + uVar4;
} while( true );
}
|
|
696 | my_thread_destroy_common_mutex | eloqsql/mysys/my_thr_init.c | void my_thread_destroy_common_mutex(void)
{
mysql_mutex_destroy(&THR_LOCK_open);
mysql_mutex_destroy(&THR_LOCK_lock);
mysql_mutex_destroy(&THR_LOCK_myisam);
mysql_mutex_destroy(&THR_LOCK_myisam_mmap);
mysql_mutex_destroy(&THR_LOCK_heap);
mysql_mutex_destroy(&THR_LOCK_net);
mysql_mutex_destroy(&THR_LOCK_charset);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_destroy(&LOCK_localtime_r);
#endif
} | O3 | c | my_thread_destroy_common_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x33f77f(%rip), %rbx # 0x3655d8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25e77
leaq 0x2c89b7(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f75a(%rip), %rdi # 0x3655d8
callq 0x24390
leaq 0x33f796(%rip), %rbx # 0x365620
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25ea8
leaq 0x2c8986(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f771(%rip), %rdi # 0x365620
callq 0x24390
leaq 0x33f7ad(%rip), %rbx # 0x365668
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25ed9
leaq 0x2c8955(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f788(%rip), %rdi # 0x365668
callq 0x24390
leaq 0x33f7c4(%rip), %rbx # 0x3656b0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25f0a
leaq 0x2c8924(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f79f(%rip), %rdi # 0x3656b0
callq 0x24390
leaq 0x33f7db(%rip), %rbx # 0x3656f8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25f3b
leaq 0x2c88f3(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f7b6(%rip), %rdi # 0x3656f8
callq 0x24390
leaq 0x33f7f2(%rip), %rbx # 0x365740
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25f6c
leaq 0x2c88c2(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f7cd(%rip), %rdi # 0x365740
callq 0x24390
leaq 0x33f809(%rip), %rbx # 0x365788
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x25f9d
leaq 0x2c8891(%rip), %rax # 0x2ee820
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x33f7e4(%rip), %rdi # 0x365788
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x24390
| my_thread_destroy_common_mutex:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, THR_LOCK_open
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25E77
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25E77:
lea rdi, THR_LOCK_open
call _pthread_mutex_destroy
lea rbx, THR_LOCK_lock
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25EA8
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25EA8:
lea rdi, THR_LOCK_lock
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25ED9
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25ED9:
lea rdi, THR_LOCK_myisam
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam_mmap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25F0A
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25F0A:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_heap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25F3B
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25F3B:
lea rdi, THR_LOCK_heap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_net
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25F6C
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25F6C:
lea rdi, THR_LOCK_net
call _pthread_mutex_destroy
lea rbx, THR_LOCK_charset
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_25F9D
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_25F9D:
lea rdi, THR_LOCK_charset
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_destroy
| long long my_thread_destroy_common_mutex()
{
long long v0; // rdi
long long v1; // rdi
long long v2; // rdi
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
v0 = THR_LOCK_open[8];
if ( v0 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v0);
THR_LOCK_open[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_open);
v1 = THR_LOCK_lock[8];
if ( v1 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v1);
THR_LOCK_lock[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_lock);
v2 = THR_LOCK_myisam[8];
if ( v2 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v2);
THR_LOCK_myisam[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam);
v3 = THR_LOCK_myisam_mmap[8];
if ( v3 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v3);
THR_LOCK_myisam_mmap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam_mmap);
v4 = THR_LOCK_heap[8];
if ( v4 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v4);
THR_LOCK_heap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_heap);
v5 = THR_LOCK_net[8];
if ( v5 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v5);
THR_LOCK_net[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_net);
v6 = THR_LOCK_charset[8];
if ( v6 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v6);
THR_LOCK_charset[8] = 0LL;
}
return pthread_mutex_destroy(THR_LOCK_charset);
}
| my_thread_destroy_common_mutex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x4655d8]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125e77
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125e77:
LEA RDI,[0x4655d8]
CALL 0x00124390
LEA RBX,[0x465620]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125ea8
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125ea8:
LEA RDI,[0x465620]
CALL 0x00124390
LEA RBX,[0x465668]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125ed9
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125ed9:
LEA RDI,[0x465668]
CALL 0x00124390
LEA RBX,[0x4656b0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125f0a
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125f0a:
LEA RDI,[0x4656b0]
CALL 0x00124390
LEA RBX,[0x4656f8]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125f3b
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125f3b:
LEA RDI,[0x4656f8]
CALL 0x00124390
LEA RBX,[0x465740]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125f6c
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125f6c:
LEA RDI,[0x465740]
CALL 0x00124390
LEA RBX,[0x465788]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00125f9d
LEA RAX,[0x3ee820]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00125f9d:
LEA RDI,[0x465788]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00124390
|
void my_thread_destroy_common_mutex(void)
{
if (THR_LOCK_open._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_open._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_open);
if (THR_LOCK_lock._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_lock._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_lock);
if (THR_LOCK_myisam._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam);
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam_mmap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam_mmap);
if (THR_LOCK_heap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_heap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_heap);
if (THR_LOCK_net._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_net._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_net);
if (THR_LOCK_charset._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_charset._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_charset);
return;
}
|
|
697 | Binary_string::strstr(Binary_string const&, unsigned int) | eloqsql/sql/sql_string.h | inline uint32 length() const { return str_length;} | O3 | c | Binary_string::strstr(Binary_string const&, unsigned int):
movl 0x8(%rsi), %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl %edx, %ecx
ja 0x27519
cmpl %edx, 0x8(%rdi)
jb 0x27519
testq %rcx, %rcx
je 0x27517
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %r10
movl %edx, %r11d
leaq -0x1(%r10,%r11), %rdi
movq (%rsi), %r8
leaq (%r10,%rcx), %r9
addq $-0x2, %r9
movl $0x1, %esi
subl %edx, %esi
leaq (%r10,%r11), %rdx
addq $-0x2, %rdx
movl $0x1, %r10d
subq %rcx, %r10
leaq (%rcx,%r8), %r11
addq $-0x2, %r11
cmpq %r9, %rdi
je 0x27510
movb (%rdi), %bl
cmpb -0x1(%r8,%rcx), %bl
jne 0x27501
xorl %ebx, %ebx
cmpq %rbx, %r10
je 0x2750c
movb (%rdx,%rbx), %r14b
leaq -0x1(%rbx), %r15
cmpb (%r11,%rbx), %r14b
movq %r15, %rbx
je 0x274eb
decq %rdi
incq %rsi
decq %rdx
jmp 0x274db
subl %esi, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %eax
retq
| _ZN13Binary_string7strrstrERKS_j:
mov ecx, [rsi+8]
mov eax, 0FFFFFFFFh
cmp ecx, edx
ja locret_27519
cmp [rdi+8], edx
jb locret_27519
test rcx, rcx
jz short loc_27517
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov r10, [rdi]
mov r11d, edx
lea rdi, [r10+r11-1]
mov r8, [rsi]
lea r9, [r10+rcx]
add r9, 0FFFFFFFFFFFFFFFEh
mov esi, 1
sub esi, edx
lea rdx, [r10+r11]
add rdx, 0FFFFFFFFFFFFFFFEh
mov r10d, 1
sub r10, rcx
lea r11, [rcx+r8]
add r11, 0FFFFFFFFFFFFFFFEh
loc_274DB:
cmp rdi, r9
jz short loc_27510
mov bl, [rdi]
cmp bl, [r8+rcx-1]
jnz short loc_27501
xor ebx, ebx
loc_274EB:
cmp r10, rbx
jz short loc_2750C
mov r14b, [rdx+rbx]
lea r15, [rbx-1]
cmp r14b, [r11+rbx]
mov rbx, r15
jz short loc_274EB
loc_27501:
dec rdi
inc rsi
dec rdx
jmp short loc_274DB
loc_2750C:
sub ebx, esi
mov eax, ebx
loc_27510:
pop rbx
pop r14
pop r15
pop rbp
retn
loc_27517:
mov eax, edx
locret_27519:
retn
| long long Binary_string::strrstr(Binary_string *this, const Binary_string *a2, unsigned int a3)
{
long long v3; // rcx
long long result; // rax
long long v5; // r10
_BYTE *v6; // rdi
long long v7; // r8
unsigned int v8; // esi
long long v9; // rdx
long long v10; // rbx
bool v11; // zf
v3 = *((unsigned int *)a2 + 2);
result = 0xFFFFFFFFLL;
if ( (unsigned int)v3 <= a3 && *((_DWORD *)this + 2) >= a3 )
{
if ( *((_DWORD *)a2 + 2) )
{
v5 = *(_QWORD *)this;
v6 = (_BYTE *)(*(_QWORD *)this + a3 - 1LL);
v7 = *(_QWORD *)a2;
v8 = 1 - a3;
v9 = v5 + a3 - 2;
while ( v6 != (_BYTE *)(v5 + v3 - 2) )
{
if ( *v6 == *(_BYTE *)(v7 + v3 - 1) )
{
v10 = 0LL;
while ( 1 - v3 != v10 )
{
v11 = *(_BYTE *)(v9 + v10) == *(_BYTE *)(v3 + v7 - 2 + v10);
--v10;
if ( !v11 )
goto LABEL_10;
}
return (unsigned int)v10 - v8;
}
LABEL_10:
--v6;
++v8;
--v9;
}
}
else
{
return a3;
}
}
return result;
}
| strrstr:
MOV ECX,dword ptr [RSI + 0x8]
MOV EAX,0xffffffff
CMP ECX,EDX
JA 0x00127519
CMP dword ptr [RDI + 0x8],EDX
JC 0x00127519
TEST RCX,RCX
JZ 0x00127517
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV R10,qword ptr [RDI]
MOV R11D,EDX
LEA RDI,[R10 + R11*0x1 + -0x1]
MOV R8,qword ptr [RSI]
LEA R9,[R10 + RCX*0x1]
ADD R9,-0x2
MOV ESI,0x1
SUB ESI,EDX
LEA RDX,[R10 + R11*0x1]
ADD RDX,-0x2
MOV R10D,0x1
SUB R10,RCX
LEA R11,[RCX + R8*0x1]
ADD R11,-0x2
LAB_001274db:
CMP RDI,R9
JZ 0x00127510
MOV BL,byte ptr [RDI]
CMP BL,byte ptr [R8 + RCX*0x1 + -0x1]
JNZ 0x00127501
XOR EBX,EBX
LAB_001274eb:
CMP R10,RBX
JZ 0x0012750c
MOV R14B,byte ptr [RDX + RBX*0x1]
LEA R15,[RBX + -0x1]
CMP R14B,byte ptr [R11 + RBX*0x1]
MOV RBX,R15
JZ 0x001274eb
LAB_00127501:
DEC RDI
INC RSI
DEC RDX
JMP 0x001274db
LAB_0012750c:
SUB EBX,ESI
MOV EAX,EBX
LAB_00127510:
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00127517:
MOV EAX,EDX
LAB_00127519:
RET
|
/* Binary_string::strrstr(Binary_string const&, unsigned int) */
uint __thiscall Binary_string::strrstr(Binary_string *this,Binary_string *param_1,uint param_2)
{
char *pcVar1;
char *pcVar2;
long lVar3;
uint uVar4;
ulong uVar5;
long lVar6;
long lVar7;
int iVar8;
char *pcVar9;
uVar5 = (ulong)*(uint *)(param_1 + 8);
uVar4 = 0xffffffff;
if (((*(uint *)(param_1 + 8) <= param_2) && (param_2 <= *(uint *)(this + 8))) &&
(uVar4 = param_2, uVar5 != 0)) {
lVar3 = *(long *)this;
pcVar9 = (char *)(lVar3 + -1 + (ulong)param_2);
iVar8 = -param_2;
lVar6 = lVar3 + (ulong)param_2 + -2;
do {
iVar8 = iVar8 + 1;
if (pcVar9 == (char *)(lVar3 + uVar5 + -2)) {
return 0xffffffff;
}
if (*pcVar9 == *(char *)(*(long *)param_1 + -1 + uVar5)) {
lVar7 = 0;
do {
if (1 - uVar5 == lVar7) {
return (int)lVar7 - iVar8;
}
pcVar1 = (char *)(lVar6 + lVar7);
pcVar2 = (char *)(uVar5 + *(long *)param_1 + -2 + lVar7);
lVar7 = lVar7 + -1;
} while (*pcVar1 == *pcVar2);
}
pcVar9 = pcVar9 + -1;
lVar6 = lVar6 + -1;
} while( true );
}
return uVar4;
}
|
|
698 | r3d_framebuffer_unload_gbuffer | r3d/src/r3d_state.c | void r3d_framebuffer_unload_gbuffer(void)
{
struct r3d_fb_gbuffer_t* gBuffer = &R3D.framebuffer.gBuffer;
rlUnloadTexture(gBuffer->albedo);
rlUnloadTexture(gBuffer->emission);
rlUnloadTexture(gBuffer->normal);
rlUnloadTexture(gBuffer->orm);
rlUnloadTexture(gBuffer->depth);
rlUnloadFramebuffer(gBuffer->id);
memset(gBuffer, 0, sizeof(struct r3d_fb_gbuffer_t));
} | O3 | c | r3d_framebuffer_unload_gbuffer:
pushq %rbp
movq %rsp, %rbp
movl 0xef5e4(%rip), %edi # 0x1afbf8
callq 0x1dcd7
movl 0xef5dd(%rip), %edi # 0x1afbfc
callq 0x1dcd7
movl 0xef5d6(%rip), %edi # 0x1afc00
callq 0x1dcd7
movl 0xef5cf(%rip), %edi # 0x1afc04
callq 0x1dcd7
movl 0xef5c8(%rip), %edi # 0x1afc08
callq 0x1dcd7
movl 0xef5a9(%rip), %edi # 0x1afbf4
callq 0x1e13f
xorps %xmm0, %xmm0
movups %xmm0, 0xef59a(%rip) # 0x1afbf4
movq $0x0, 0xef59f(%rip) # 0x1afc04
popq %rbp
retq
| r3d_framebuffer_unload_gbuffer:
push rbp
mov rbp, rsp
mov edi, dword ptr cs:xmmword_1AFBF4+4
call rlUnloadTexture
mov edi, dword ptr cs:xmmword_1AFBF4+8
call rlUnloadTexture
mov edi, dword ptr cs:xmmword_1AFBF4+0Ch
call rlUnloadTexture
mov edi, dword ptr cs:qword_1AFC04
call rlUnloadTexture
mov edi, dword ptr cs:qword_1AFC04+4
call rlUnloadTexture
mov edi, dword ptr cs:xmmword_1AFBF4
call rlUnloadFramebuffer
xorps xmm0, xmm0
movups cs:xmmword_1AFBF4, xmm0
mov cs:qword_1AFC04, 0
pop rbp
retn
| long long r3d_framebuffer_unload_gbuffer()
{
long long result; // rax
rlUnloadTexture(SDWORD1(xmmword_1AFBF4));
rlUnloadTexture(SDWORD2(xmmword_1AFBF4));
rlUnloadTexture(SHIDWORD(xmmword_1AFBF4));
rlUnloadTexture(qword_1AFC04);
rlUnloadTexture(SHIDWORD(qword_1AFC04));
result = rlUnloadFramebuffer(xmmword_1AFBF4);
xmmword_1AFBF4 = 0LL;
qword_1AFC04 = 0LL;
return result;
}
| r3d_framebuffer_unload_gbuffer:
PUSH RBP
MOV RBP,RSP
MOV EDI,dword ptr [0x002afbf8]
CALL 0x0011dcd7
MOV EDI,dword ptr [0x002afbfc]
CALL 0x0011dcd7
MOV EDI,dword ptr [0x002afc00]
CALL 0x0011dcd7
MOV EDI,dword ptr [0x002afc04]
CALL 0x0011dcd7
MOV EDI,dword ptr [0x002afc08]
CALL 0x0011dcd7
MOV EDI,dword ptr [0x002afbf4]
CALL 0x0011e13f
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x002afbf4],XMM0
MOV qword ptr [0x002afc04],0x0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_framebuffer_unload_gbuffer(void)
{
rlUnloadTexture(DAT_002afbf8);
rlUnloadTexture(_DAT_002afbfc & 0xffffffff);
rlUnloadTexture(DAT_002afc00);
rlUnloadTexture(_DAT_002afc04 & 0xffffffff);
rlUnloadTexture(DAT_002afc08);
rlUnloadFramebuffer(_DAT_002afbf4 & 0xffffffff);
_DAT_002afbf4 = 0;
_DAT_002afbfc = 0;
_DAT_002afc04 = 0;
return;
}
|
|
699 | mi_store_var_pack_key | eloqsql/storage/myisam/mi_search.c | void _mi_store_var_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)),
register uchar *key_pos,
register MI_KEY_PARAM *s_temp)
{
uint length;
uchar *start;
start=key_pos;
if (s_temp->ref_length)
{
/* Packed against previous key */
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->ref_length);
/* If not same key after */
if (s_temp->ref_length != s_temp->pack_marker)
store_key_length_inc(key_pos,s_temp->key_length);
}
else
{
/* Not packed against previous key */
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->key_length);
}
bmove((uchar*) key_pos,(uchar*) s_temp->key,
(length=s_temp->totlength-(uint) (key_pos-start)));
if (!s_temp->next_key_pos) /* No following key */
return;
key_pos+=length;
if (s_temp->prev_length)
{
/* Extend next key because new key didn't have same prefix as prev key */
if (s_temp->part_of_prev_key)
{
store_pack_length(s_temp->pack_marker == 128,key_pos,
s_temp->part_of_prev_key);
store_key_length_inc(key_pos,s_temp->n_length);
}
else
{
s_temp->n_length+= s_temp->store_not_null;
store_pack_length(s_temp->pack_marker == 128,key_pos,
s_temp->n_length);
}
memcpy(key_pos, s_temp->prev_key, s_temp->prev_length);
}
else if (s_temp->n_ref_length)
{
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_ref_length);
if (s_temp->n_ref_length == s_temp->pack_marker)
return; /* Identical key */
store_key_length(key_pos,s_temp->n_length);
}
else
{
s_temp->n_length+= s_temp->store_not_null;
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length);
}
} | O3 | c | mi_store_var_pack_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl (%rdx), %eax
movl 0x1c(%rdx), %ecx
testl %eax, %eax
je 0x86ac0
movl $0x1, %r15d
cmpl $0x80, %ecx
jne 0x86ad4
movq %rbx, %rcx
jmp 0x86ae3
movl 0x4(%r14), %eax
cmpl $0x80, %ecx
jne 0x86b04
leaq 0x1(%rbx), %r15
movb %al, (%rbx)
jmp 0x86b29
leaq 0x1(%rbx), %rcx
movb %ah, (%rbx)
movl (%r14), %eax
movl $0x2, %r15d
addq %rbx, %r15
movb %al, (%rcx)
movl (%r14), %eax
cmpl 0x1c(%r14), %eax
je 0x86b29
movl 0x4(%r14), %eax
cmpl $0xfe, %eax
ja 0x86b13
movb %al, (%r15)
incq %r15
jmp 0x86b29
movb %ah, (%rbx)
movb 0x4(%r14), %al
leaq 0x2(%rbx), %r15
movb %al, 0x1(%rbx)
jmp 0x86b29
movb $-0x1, (%r15)
movzwl 0x4(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x1(%r15)
addq $0x3, %r15
movq 0x20(%r14), %rsi
subl %r15d, %ebx
addl 0x10(%r14), %ebx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29120
cmpq $0x0, 0x30(%r14)
je 0x86c78
addq %rbx, %r15
cmpl $0x0, 0x18(%r14)
movq %r15, %rdi
je 0x86b73
movl 0x14(%r14), %eax
testl %eax, %eax
je 0x86b9d
movl $0x1, %ecx
cmpl $0x80, 0x1c(%r14)
jne 0x86bc3
movq %rdi, %rdx
jmp 0x86bd2
movl 0x8(%r14), %ecx
testl %ecx, %ecx
je 0x86c14
movl $0x1, %eax
cmpl $0x80, 0x1c(%r14)
movq %rdi, %rsi
jne 0x86c2f
movq %rdi, %rdx
jmp 0x86c3e
movsbl 0x38(%r14), %eax
addl 0xc(%r14), %eax
movl %eax, 0xc(%r14)
cmpl $0x80, 0x1c(%r14)
je 0x86be2
movb %ah, (%rdi)
movb 0xc(%r14), %al
movb %al, 0x1(%rdi)
addq $0x2, %rdi
jmp 0x86bfd
leaq 0x1(%rdi), %rdx
movb %ah, (%rdi)
movl 0x14(%r14), %eax
movl $0x2, %ecx
addq %rcx, %rdi
movb %al, (%rdx)
movl 0xc(%r14), %eax
cmpl $0xfe, %eax
ja 0x86be9
movb %al, (%rdi)
incq %rdi
jmp 0x86bfd
movb $-0x1, (%rdi)
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x1(%rdi)
addq $0x3, %rdi
movq 0x28(%r14), %rsi
movl 0x18(%r14), %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x29080
movsbl 0x38(%r14), %eax
addl 0xc(%r14), %eax
movl %eax, 0xc(%r14)
cmpl $0x80, 0x1c(%r14)
jne 0x86c5b
movb %al, (%rdi)
jmp 0x86c78
leaq 0x1(%rdi), %rdx
movb %ch, (%rdi)
movl 0x8(%r14), %ecx
movl $0x2, %eax
movb %cl, (%rdx)
movl 0x8(%r14), %ecx
cmpl 0x1c(%r14), %ecx
je 0x86c78
movl 0xc(%r14), %ecx
cmpl $0xfe, %ecx
ja 0x86c66
movb %cl, (%rsi,%rax)
jmp 0x86c78
movb %ah, (%rdi)
movb 0xc(%r14), %al
movb %al, 0x1(%rdi)
jmp 0x86c78
movb $-0x1, (%rsi,%rax)
movzwl 0xc(%r14), %ecx
rolw $0x8, %cx
movw %cx, 0x1(%rsi,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _mi_store_var_pack_key:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov rbx, rsi
mov eax, [rdx]
mov ecx, [rdx+1Ch]
test eax, eax
jz short loc_86AC0
mov r15d, 1
cmp ecx, 80h
jnz short loc_86AD4
mov rcx, rbx
jmp short loc_86AE3
loc_86AC0:
mov eax, [r14+4]
cmp ecx, 80h
jnz short loc_86B04
lea r15, [rbx+1]
mov [rbx], al
jmp short loc_86B29
loc_86AD4:
lea rcx, [rbx+1]
mov [rbx], ah
mov eax, [r14]
mov r15d, 2
loc_86AE3:
add r15, rbx
mov [rcx], al
mov eax, [r14]
cmp eax, [r14+1Ch]
jz short loc_86B29
mov eax, [r14+4]
cmp eax, 0FEh
ja short loc_86B13
mov [r15], al
inc r15
jmp short loc_86B29
loc_86B04:
mov [rbx], ah
mov al, [r14+4]
lea r15, [rbx+2]
mov [rbx+1], al
jmp short loc_86B29
loc_86B13:
mov byte ptr [r15], 0FFh
movzx eax, word ptr [r14+4]
rol ax, 8
mov [r15+1], ax
add r15, 3
loc_86B29:
mov rsi, [r14+20h]
sub ebx, r15d
add ebx, [r14+10h]
mov rdi, r15
mov rdx, rbx
call _memmove
cmp qword ptr [r14+30h], 0
jz loc_86C78
add r15, rbx
cmp dword ptr [r14+18h], 0
mov rdi, r15
jz short loc_86B73
mov eax, [r14+14h]
test eax, eax
jz short loc_86B9D
mov ecx, 1
cmp dword ptr [r14+1Ch], 80h
jnz short loc_86BC3
mov rdx, rdi
jmp short loc_86BD2
loc_86B73:
mov ecx, [r14+8]
test ecx, ecx
jz loc_86C14
mov eax, 1
cmp dword ptr [r14+1Ch], 80h
mov rsi, rdi
jnz loc_86C2F
mov rdx, rdi
jmp loc_86C3E
loc_86B9D:
movsx eax, byte ptr [r14+38h]
add eax, [r14+0Ch]
mov [r14+0Ch], eax
cmp dword ptr [r14+1Ch], 80h
jz short loc_86BE2
mov [rdi], ah
mov al, [r14+0Ch]
mov [rdi+1], al
add rdi, 2
jmp short loc_86BFD
loc_86BC3:
lea rdx, [rdi+1]
mov [rdi], ah
mov eax, [r14+14h]
mov ecx, 2
loc_86BD2:
add rdi, rcx
mov [rdx], al
mov eax, [r14+0Ch]
cmp eax, 0FEh
ja short loc_86BE9
loc_86BE2:
mov [rdi], al
inc rdi
jmp short loc_86BFD
loc_86BE9:
mov byte ptr [rdi], 0FFh
movzx eax, word ptr [r14+0Ch]
rol ax, 8
mov [rdi+1], ax
add rdi, 3
loc_86BFD:
mov rsi, [r14+28h]
mov edx, [r14+18h]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memcpy
loc_86C14:
movsx eax, byte ptr [r14+38h]
add eax, [r14+0Ch]
mov [r14+0Ch], eax
cmp dword ptr [r14+1Ch], 80h
jnz short loc_86C5B
mov [rdi], al
jmp short loc_86C78
loc_86C2F:
lea rdx, [rdi+1]
mov [rdi], ch
mov ecx, [r14+8]
mov eax, 2
loc_86C3E:
mov [rdx], cl
mov ecx, [r14+8]
cmp ecx, [r14+1Ch]
jz short loc_86C78
mov ecx, [r14+0Ch]
cmp ecx, 0FEh
ja short loc_86C66
mov [rsi+rax], cl
jmp short loc_86C78
loc_86C5B:
mov [rdi], ah
mov al, [r14+0Ch]
mov [rdi+1], al
jmp short loc_86C78
loc_86C66:
mov byte ptr [rsi+rax], 0FFh
movzx ecx, word ptr [r14+0Ch]
rol cx, 8
mov [rsi+rax+1], cx
loc_86C78:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char mi_store_var_pack_key(long long a1, _BYTE *a2, int *a3)
{
int v4; // eax
int v5; // ecx
long long v6; // r15
_BYTE *v7; // rcx
int v8; // eax
_BYTE *v9; // r15
unsigned int v10; // eax
long long v11; // rbx
long long v12; // rax
_BYTE *v13; // r15
_BYTE *v14; // rdi
int v15; // eax
long long v16; // rcx
_BYTE *v17; // rdx
int v18; // ecx
_BYTE *v19; // rdx
unsigned int v20; // eax
_BYTE *v21; // rdi
unsigned int v22; // ecx
v4 = *a3;
v5 = a3[7];
if ( *a3 )
{
v6 = 1LL;
if ( v5 == 128 )
{
v7 = a2;
}
else
{
v7 = a2 + 1;
*a2 = BYTE1(v4);
v4 = *a3;
v6 = 2LL;
}
v9 = &a2[v6];
*v7 = v4;
if ( *a3 != a3[7] )
{
v10 = a3[1];
if ( v10 > 0xFE )
{
*v9 = -1;
*(_WORD *)(v9 + 1) = __ROL2__(*((_WORD *)a3 + 2), 8);
v9 += 3;
}
else
{
*v9++ = v10;
}
}
}
else
{
v8 = a3[1];
if ( v5 == 128 )
{
v9 = a2 + 1;
*a2 = v8;
}
else
{
*a2 = BYTE1(v8);
v9 = a2 + 2;
a2[1] = *((_BYTE *)a3 + 4);
}
}
v11 = (unsigned int)(a3[4] + (_DWORD)a2 - (_DWORD)v9);
LOBYTE(v12) = memmove(v9, *((_QWORD *)a3 + 4), v11);
if ( *((_QWORD *)a3 + 6) )
{
v13 = &v9[v11];
v14 = v13;
if ( a3[6] )
{
v15 = a3[5];
if ( v15 )
{
v16 = 1LL;
if ( a3[7] == 128 )
{
v17 = v13;
}
else
{
v17 = v13 + 1;
*v13 = BYTE1(v15);
v15 = a3[5];
v16 = 2LL;
}
v14 = &v13[v16];
*v17 = v15;
v20 = a3[3];
if ( v20 > 0xFE )
{
*v14 = -1;
*(_WORD *)(v14 + 1) = __ROL2__(*((_WORD *)a3 + 6), 8);
v21 = v14 + 3;
goto LABEL_26;
}
}
else
{
v20 = a3[3] + *((char *)a3 + 56);
a3[3] = v20;
if ( a3[7] != 128 )
{
*v13 = BYTE1(v20);
v13[1] = *((_BYTE *)a3 + 12);
v21 = v13 + 2;
LABEL_26:
LOBYTE(v12) = memcpy(v21, *((_QWORD *)a3 + 5), (unsigned int)a3[6]);
return v12;
}
}
*v14 = v20;
v21 = v14 + 1;
goto LABEL_26;
}
v18 = a3[2];
if ( v18 )
{
v12 = 1LL;
if ( a3[7] == 128 )
{
v19 = v13;
}
else
{
v19 = v13 + 1;
*v13 = BYTE1(v18);
v18 = a3[2];
v12 = 2LL;
}
*v19 = v18;
if ( a3[2] != a3[7] )
{
v22 = a3[3];
if ( v22 > 0xFE )
{
v13[v12] = -1;
*(_WORD *)&v13[v12 + 1] = __ROL2__(*((_WORD *)a3 + 6), 8);
}
else
{
v13[v12] = v22;
}
}
}
else
{
LODWORD(v12) = a3[3] + *((char *)a3 + 56);
a3[3] = v12;
if ( a3[7] == 128 )
{
*v13 = v12;
}
else
{
*v13 = BYTE1(v12);
LOBYTE(v12) = *((_BYTE *)a3 + 12);
v13[1] = v12;
}
}
}
return v12;
}
| _mi_store_var_pack_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RSI
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x1c]
TEST EAX,EAX
JZ 0x00186ac0
MOV R15D,0x1
CMP ECX,0x80
JNZ 0x00186ad4
MOV RCX,RBX
JMP 0x00186ae3
LAB_00186ac0:
MOV EAX,dword ptr [R14 + 0x4]
CMP ECX,0x80
JNZ 0x00186b04
LEA R15,[RBX + 0x1]
MOV byte ptr [RBX],AL
JMP 0x00186b29
LAB_00186ad4:
LEA RCX,[RBX + 0x1]
MOV byte ptr [RBX],AH
MOV EAX,dword ptr [R14]
MOV R15D,0x2
LAB_00186ae3:
ADD R15,RBX
MOV byte ptr [RCX],AL
MOV EAX,dword ptr [R14]
CMP EAX,dword ptr [R14 + 0x1c]
JZ 0x00186b29
MOV EAX,dword ptr [R14 + 0x4]
CMP EAX,0xfe
JA 0x00186b13
MOV byte ptr [R15],AL
INC R15
JMP 0x00186b29
LAB_00186b04:
MOV byte ptr [RBX],AH
MOV AL,byte ptr [R14 + 0x4]
LEA R15,[RBX + 0x2]
MOV byte ptr [RBX + 0x1],AL
JMP 0x00186b29
LAB_00186b13:
MOV byte ptr [R15],0xff
MOVZX EAX,word ptr [R14 + 0x4]
ROL AX,0x8
MOV word ptr [R15 + 0x1],AX
ADD R15,0x3
LAB_00186b29:
MOV RSI,qword ptr [R14 + 0x20]
SUB EBX,R15D
ADD EBX,dword ptr [R14 + 0x10]
MOV RDI,R15
MOV RDX,RBX
CALL 0x00129120
CMP qword ptr [R14 + 0x30],0x0
JZ 0x00186c78
ADD R15,RBX
CMP dword ptr [R14 + 0x18],0x0
MOV RDI,R15
JZ 0x00186b73
MOV EAX,dword ptr [R14 + 0x14]
TEST EAX,EAX
JZ 0x00186b9d
MOV ECX,0x1
CMP dword ptr [R14 + 0x1c],0x80
JNZ 0x00186bc3
MOV RDX,RDI
JMP 0x00186bd2
LAB_00186b73:
MOV ECX,dword ptr [R14 + 0x8]
TEST ECX,ECX
JZ 0x00186c14
MOV EAX,0x1
CMP dword ptr [R14 + 0x1c],0x80
MOV RSI,RDI
JNZ 0x00186c2f
MOV RDX,RDI
JMP 0x00186c3e
LAB_00186b9d:
MOVSX EAX,byte ptr [R14 + 0x38]
ADD EAX,dword ptr [R14 + 0xc]
MOV dword ptr [R14 + 0xc],EAX
CMP dword ptr [R14 + 0x1c],0x80
JZ 0x00186be2
MOV byte ptr [RDI],AH
MOV AL,byte ptr [R14 + 0xc]
MOV byte ptr [RDI + 0x1],AL
ADD RDI,0x2
JMP 0x00186bfd
LAB_00186bc3:
LEA RDX,[RDI + 0x1]
MOV byte ptr [RDI],AH
MOV EAX,dword ptr [R14 + 0x14]
MOV ECX,0x2
LAB_00186bd2:
ADD RDI,RCX
MOV byte ptr [RDX],AL
MOV EAX,dword ptr [R14 + 0xc]
CMP EAX,0xfe
JA 0x00186be9
LAB_00186be2:
MOV byte ptr [RDI],AL
INC RDI
JMP 0x00186bfd
LAB_00186be9:
MOV byte ptr [RDI],0xff
MOVZX EAX,word ptr [R14 + 0xc]
ROL AX,0x8
MOV word ptr [RDI + 0x1],AX
ADD RDI,0x3
LAB_00186bfd:
MOV RSI,qword ptr [R14 + 0x28]
MOV EDX,dword ptr [R14 + 0x18]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00129080
LAB_00186c14:
MOVSX EAX,byte ptr [R14 + 0x38]
ADD EAX,dword ptr [R14 + 0xc]
MOV dword ptr [R14 + 0xc],EAX
CMP dword ptr [R14 + 0x1c],0x80
JNZ 0x00186c5b
MOV byte ptr [RDI],AL
JMP 0x00186c78
LAB_00186c2f:
LEA RDX,[RDI + 0x1]
MOV byte ptr [RDI],CH
MOV ECX,dword ptr [R14 + 0x8]
MOV EAX,0x2
LAB_00186c3e:
MOV byte ptr [RDX],CL
MOV ECX,dword ptr [R14 + 0x8]
CMP ECX,dword ptr [R14 + 0x1c]
JZ 0x00186c78
MOV ECX,dword ptr [R14 + 0xc]
CMP ECX,0xfe
JA 0x00186c66
MOV byte ptr [RSI + RAX*0x1],CL
JMP 0x00186c78
LAB_00186c5b:
MOV byte ptr [RDI],AH
MOV AL,byte ptr [R14 + 0xc]
MOV byte ptr [RDI + 0x1],AL
JMP 0x00186c78
LAB_00186c66:
MOV byte ptr [RSI + RAX*0x1],0xff
MOVZX ECX,word ptr [R14 + 0xc]
ROL CX,0x8
MOV word ptr [RSI + RAX*0x1 + 0x1],CX
LAB_00186c78:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void _mi_store_var_pack_key(int8 param_1,int1 *param_2,int *param_3)
{
uint uVar1;
int iVar2;
int1 *puVar3;
ulong __n;
long lVar4;
int1 *puVar5;
iVar2 = *param_3;
if (iVar2 == 0) {
if (param_3[7] == 0x80) {
puVar5 = param_2 + 1;
*param_2 = (char)param_3[1];
}
else {
*param_2 = (char)((uint)param_3[1] >> 8);
puVar5 = param_2 + 2;
param_2[1] = (char)param_3[1];
}
}
else {
lVar4 = 1;
puVar3 = param_2;
if (param_3[7] != 0x80) {
*param_2 = (char)((uint)iVar2 >> 8);
iVar2 = *param_3;
lVar4 = 2;
puVar3 = param_2 + 1;
}
puVar5 = param_2 + lVar4;
*puVar3 = (char)iVar2;
if (*param_3 != param_3[7]) {
if ((uint)param_3[1] < 0xff) {
*puVar5 = (char)param_3[1];
puVar5 = puVar5 + 1;
}
else {
*puVar5 = 0xff;
*(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8;
puVar5 = puVar5 + 3;
}
}
}
__n = (ulong)(uint)(((int)param_2 - (int)puVar5) + param_3[4]);
memmove(puVar5,*(void **)(param_3 + 8),__n);
if (*(long *)(param_3 + 0xc) == 0) {
return;
}
puVar5 = puVar5 + __n;
if (param_3[6] == 0) {
iVar2 = param_3[2];
if (iVar2 == 0) {
iVar2 = (int)(char)param_3[0xe] + param_3[3];
param_3[3] = iVar2;
if (param_3[7] == 0x80) {
*puVar5 = (char)iVar2;
return;
}
*puVar5 = (char)((uint)iVar2 >> 8);
puVar5[1] = (char)param_3[3];
return;
}
lVar4 = 1;
puVar3 = puVar5;
if (param_3[7] != 0x80) {
*puVar5 = (char)((uint)iVar2 >> 8);
iVar2 = param_3[2];
lVar4 = 2;
puVar3 = puVar5 + 1;
}
*puVar3 = (char)iVar2;
if (param_3[2] == param_3[7]) {
return;
}
if ((uint)param_3[3] < 0xff) {
puVar5[lVar4] = (char)param_3[3];
return;
}
puVar5[lVar4] = 0xff;
*(ushort *)(puVar5 + lVar4 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8;
return;
}
iVar2 = param_3[5];
if (iVar2 == 0) {
uVar1 = (int)(char)param_3[0xe] + param_3[3];
param_3[3] = uVar1;
if (param_3[7] != 0x80) {
*puVar5 = (char)(uVar1 >> 8);
puVar5[1] = (char)param_3[3];
puVar5 = puVar5 + 2;
goto LAB_00186bfd;
}
}
else {
lVar4 = 1;
puVar3 = puVar5;
if (param_3[7] != 0x80) {
*puVar5 = (char)((uint)iVar2 >> 8);
iVar2 = param_3[5];
lVar4 = 2;
puVar3 = puVar5 + 1;
}
puVar5 = puVar5 + lVar4;
*puVar3 = (char)iVar2;
uVar1 = param_3[3];
if (0xfe < uVar1) {
*puVar5 = 0xff;
*(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8;
puVar5 = puVar5 + 3;
goto LAB_00186bfd;
}
}
*puVar5 = (char)uVar1;
puVar5 = puVar5 + 1;
LAB_00186bfd:
memcpy(puVar5,*(void **)(param_3 + 10),(ulong)(uint)param_3[6]);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.