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
|
---|---|---|---|---|---|---|---|---|---|---|---|
10,900 |
bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp
|
bool Bisearch(uint32_t ucs, const std::array<C, N>& table, C* out) {
if (ucs < table.front().first || ucs > table.back().last) { // NOLINT
return false;
}
int min = 0;
int max = N - 1;
while (max >= min) {
const int mid = (min + max) / 2;
if (ucs > table[mid].last) { // NOLINT
min = mid + 1;
} else if (ucs < table[mid].first) { // NOLINT
max = mid - 1;
} else {
*out = table[mid]; // NOLINT
return true;
}
}
return false;
}
|
O3
|
cpp
|
bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*):
leal -0xe01f0(%rdi), %eax
cmpl $0xfff1fe1a, %eax # imm = 0xFFF1FE1A
jb 0x3a818
xorl %ecx, %ecx
movl $0x3e0, %edx # imm = 0x3E0
leaq 0x5fe1(%rip), %rax # 0x407c0
leal (%rdx,%rcx), %r9d
movl %r9d, %r8d
shrl $0x1f, %r8d
addl %r9d, %r8d
sarl %r8d
movslq %r8d, %r9
leaq (%r9,%r9,2), %r9
cmpl %edi, 0x4(%rax,%r9,4)
jae 0x3a806
incl %r8d
movl %r8d, %ecx
jmp 0x3a814
leaq (%rax,%r9,4), %rdx
cmpl %edi, (%rdx)
jbe 0x3a819
decl %r8d
movl %r8d, %edx
cmpl %ecx, %edx
jge 0x3a7df
retq
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
retq
|
_ZN12_GLOBAL__N_18BisearchINS_25WordBreakPropertyIntervalELm993EEEbjRKSt5arrayIT_XT0_EEPS3_:
lea eax, [rdi-0E01F0h]
cmp eax, 0FFF1FE1Ah
jb short locret_3A818
xor ecx, ecx
mov edx, 3E0h
lea rax, _ZN12_GLOBAL__N_122g_word_break_intervalsE; `anonymous namespace'::g_word_break_intervals
loc_3A7DF:
lea r9d, [rdx+rcx]
mov r8d, r9d
shr r8d, 1Fh
add r8d, r9d
sar r8d, 1
movsxd r9, r8d
lea r9, [r9+r9*2]
cmp [rax+r9*4+4], edi
jnb short loc_3A806
inc r8d
mov ecx, r8d
jmp short loc_3A814
loc_3A806:
lea rdx, [rax+r9*4]
cmp [rdx], edi
jbe short loc_3A819
dec r8d
mov edx, r8d
loc_3A814:
cmp edx, ecx
jge short loc_3A7DF
locret_3A818:
retn
loc_3A819:
mov eax, [rdx+8]
mov [rsi+8], eax
mov rax, [rdx]
mov [rsi], rax
retn
|
unsigned long long `anonymous namespace'::Bisearch<`anonymous namespace'::WordBreakPropertyInterval,993ul>(
unsigned int a1,
long long a2)
{
unsigned long long result; // rax
int v3; // ecx
int v4; // edx
int v5; // r8d
char *v6; // rdx
result = a1 - 918000;
if ( (unsigned int)result >= 0xFFF1FE1A )
{
v3 = 0;
v4 = 992;
result = (unsigned long long)`anonymous namespace'::g_word_break_intervals;
do
{
v5 = (v4 + v3) / 2;
if ( `anonymous namespace'::g_word_break_intervals[3 * v5 + 1] >= a1 )
{
v6 = (char *)&`anonymous namespace'::g_word_break_intervals[3 * v5];
if ( *(_DWORD *)v6 <= a1 )
{
*(_DWORD *)(a2 + 8) = *((_DWORD *)v6 + 2);
result = *(_QWORD *)v6;
*(_QWORD *)a2 = *(_QWORD *)v6;
return result;
}
v4 = v5 - 1;
}
else
{
v3 = v5 + 1;
}
}
while ( v4 >= v3 );
}
return result;
}
|
Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>:
LEA EAX,[RDI + -0xe01f0]
CMP EAX,0xfff1fe1a
JC 0x0013a818
XOR ECX,ECX
MOV EDX,0x3e0
LEA RAX,[0x1407c0]
LAB_0013a7df:
LEA R9D,[RDX + RCX*0x1]
MOV R8D,R9D
SHR R8D,0x1f
ADD R8D,R9D
SAR R8D,0x1
MOVSXD R9,R8D
LEA R9,[R9 + R9*0x2]
CMP dword ptr [RAX + R9*0x4 + 0x4],EDI
JNC 0x0013a806
INC R8D
MOV ECX,R8D
JMP 0x0013a814
LAB_0013a806:
LEA RDX,[RAX + R9*0x4]
CMP dword ptr [RDX],EDI
JBE 0x0013a819
DEC R8D
MOV EDX,R8D
LAB_0013a814:
CMP EDX,ECX
JGE 0x0013a7df
LAB_0013a818:
RET
LAB_0013a819:
MOV EAX,dword ptr [RDX + 0x8]
MOV dword ptr [RSI + 0x8],EAX
MOV RAX,qword ptr [RDX]
MOV qword ptr [RSI],RAX
RET
|
/* bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval,
993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&,
(anonymous namespace)::WordBreakPropertyInterval*) */
bool (anonymous_namespace)::Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>
(uint param_1,array *param_2,WordBreakPropertyInterval *param_3)
{
long lVar1;
int8 uVar2;
uint uVar3;
int iVar4;
int iVar5;
int iVar6;
uVar3 = param_1 - 0xe01f0;
if (0xfff1fe19 < uVar3) {
iVar5 = 0;
iVar6 = 0x3e0;
uVar3 = 0x1407c0;
do {
iVar4 = (iVar6 + iVar5) / 2;
if (*(uint *)(g_word_break_intervals + (long)iVar4 * 0xc + 4) < param_1) {
iVar5 = iVar4 + 1;
}
else {
lVar1 = (long)iVar4 * 0xc;
if (*(uint *)(g_word_break_intervals + lVar1) <= param_1) {
*(int4 *)(param_2 + 8) = *(int4 *)(g_word_break_intervals + lVar1 + 8);
uVar2 = *(int8 *)(g_word_break_intervals + lVar1);
*(int8 *)param_2 = uVar2;
return SUB81(uVar2,0);
}
iVar6 = iVar4 + -1;
}
} while (iVar5 <= iVar6);
}
return SUB41(uVar3,0);
}
|
|
10,901 |
string_table_contains
|
eshkol/src/core/utils/string_table.c
|
bool string_table_contains(StringTable* table, const char* string) {
assert(table != NULL);
assert(string != NULL);
// Compute hash
size_t length = strlen(string);
uint32_t hash = hash_string(string, length);
// Compute bucket index
size_t bucket = hash & (table->bucket_count - 1);
// Look for existing entry
Entry* entry = table->buckets[bucket];
while (entry) {
if (entry->hash == hash && entry->length == length &&
memcmp(entry->string, string, length) == 0) {
return true;
}
entry = entry->next;
}
return false;
}
|
O3
|
c
|
string_table_contains:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x39c4
movq %rsi, %rbx
testq %rsi, %rsi
je 0x39e3
movq %rdi, %r15
movq %rbx, %rdi
callq 0x1070
movq %rax, %r14
movl $0x811c9dc5, %r12d # imm = 0x811C9DC5
testq %rax, %rax
je 0x397b
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
xorl %r12d, %ecx
imull $0x1000193, %ecx, %r12d # imm = 0x1000193
incq %rax
cmpq %rax, %r14
jne 0x3965
movl 0x10(%r15), %eax
decl %eax
andl %r12d, %eax
movq 0x8(%r15), %rcx
movq (%rcx,%rax,8), %r15
testq %r15, %r15
je 0x39b5
cmpl %r12d, 0x10(%r15)
jne 0x39af
cmpq %r14, 0x8(%r15)
jne 0x39af
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1100
testl %eax, %eax
je 0x39c0
movq 0x18(%r15), %r15
jmp 0x398c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x39b7
leaq 0x7940(%rip), %rdi # 0xb30b
leaq 0x78c1(%rip), %rsi # 0xb293
leaq 0x79d3(%rip), %rcx # 0xb3ac
movl $0xb8, %edx
callq 0x10b0
leaq 0x7976(%rip), %rdi # 0xb360
leaq 0x78a2(%rip), %rsi # 0xb293
leaq 0x79b4(%rip), %rcx # 0xb3ac
movl $0xb9, %edx
callq 0x10b0
|
string_table_contains:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
test rdi, rdi
jz loc_39C4
mov rbx, rsi
test rsi, rsi
jz loc_39E3
mov r15, rdi
mov rdi, rbx
call _strlen
mov r14, rax
mov r12d, 811C9DC5h
test rax, rax
jz short loc_397B
xor eax, eax
loc_3965:
movzx ecx, byte ptr [rbx+rax]
xor ecx, r12d
imul r12d, ecx, 1000193h
inc rax
cmp r14, rax
jnz short loc_3965
loc_397B:
mov eax, [r15+10h]
dec eax
and eax, r12d
mov rcx, [r15+8]
mov r15, [rcx+rax*8]
loc_398C:
test r15, r15
jz short loc_39B5
cmp [r15+10h], r12d
jnz short loc_39AF
cmp [r15+8], r14
jnz short loc_39AF
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_39C0
loc_39AF:
mov r15, [r15+18h]
jmp short loc_398C
loc_39B5:
xor eax, eax
loc_39B7:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_39C0:
mov al, 1
jmp short loc_39B7
loc_39C4:
lea rdi, aTableNull; "table != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aBoolStringTabl; "_Bool string_table_contains(StringTable"...
mov edx, 0B8h
call ___assert_fail
loc_39E3:
lea rdi, aStringNull; "string != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aBoolStringTabl; "_Bool string_table_contains(StringTable"...
mov edx, 0B9h
call ___assert_fail
|
int string_table_contains(long long a1, long long a2)
{
long long v2; // r14
int v3; // r12d
long long i; // rax
long long j; // r15
if ( !a1 )
__assert_fail(
"table != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",
184LL,
"_Bool string_table_contains(StringTable *, const char *)");
if ( !a2 )
__assert_fail(
"string != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",
185LL,
"_Bool string_table_contains(StringTable *, const char *)");
v2 = strlen(a2);
v3 = -2128831035;
if ( v2 )
{
for ( i = 0LL; i != v2; ++i )
v3 = 16777619 * (v3 ^ *(unsigned __int8 *)(a2 + i));
}
for ( j = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (v3 & (unsigned int)(*(_DWORD *)(a1 + 16) - 1)));
;
j = *(_QWORD *)(j + 24) )
{
if ( !j )
return 0;
if ( *(_DWORD *)(j + 16) == v3 && *(_QWORD *)(j + 8) == v2 && !(unsigned int)bcmp(*(_QWORD *)j, a2, v2) )
break;
}
return 1;
}
|
string_table_contains:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RDI,RDI
JZ 0x001039c4
MOV RBX,RSI
TEST RSI,RSI
JZ 0x001039e3
MOV R15,RDI
MOV RDI,RBX
CALL 0x00101070
MOV R14,RAX
MOV R12D,0x811c9dc5
TEST RAX,RAX
JZ 0x0010397b
XOR EAX,EAX
LAB_00103965:
MOVZX ECX,byte ptr [RBX + RAX*0x1]
XOR ECX,R12D
IMUL R12D,ECX,0x1000193
INC RAX
CMP R14,RAX
JNZ 0x00103965
LAB_0010397b:
MOV EAX,dword ptr [R15 + 0x10]
DEC EAX
AND EAX,R12D
MOV RCX,qword ptr [R15 + 0x8]
MOV R15,qword ptr [RCX + RAX*0x8]
LAB_0010398c:
TEST R15,R15
JZ 0x001039b5
CMP dword ptr [R15 + 0x10],R12D
JNZ 0x001039af
CMP qword ptr [R15 + 0x8],R14
JNZ 0x001039af
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x00101100
TEST EAX,EAX
JZ 0x001039c0
LAB_001039af:
MOV R15,qword ptr [R15 + 0x18]
JMP 0x0010398c
LAB_001039b5:
XOR EAX,EAX
LAB_001039b7:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001039c0:
MOV AL,0x1
JMP 0x001039b7
LAB_001039c4:
LEA RDI,[0x10b30b]
LEA RSI,[0x10b293]
LEA RCX,[0x10b3ac]
MOV EDX,0xb8
CALL 0x001010b0
LAB_001039e3:
LEA RDI,[0x10b360]
LEA RSI,[0x10b293]
LEA RCX,[0x10b3ac]
MOV EDX,0xb9
CALL 0x001010b0
|
int8 string_table_contains(long param_1,char *param_2)
{
int iVar1;
size_t __n;
size_t sVar2;
int4 extraout_var;
uint uVar3;
int8 *puVar4;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("table != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",0xb8,
"_Bool string_table_contains(StringTable *, const char *)");
}
if (param_2 != (char *)0x0) {
__n = strlen(param_2);
uVar3 = 0x811c9dc5;
if (__n != 0) {
sVar2 = 0;
do {
uVar3 = ((byte)param_2[sVar2] ^ uVar3) * 0x1000193;
sVar2 = sVar2 + 1;
} while (__n != sVar2);
}
puVar4 = *(int8 **)
(*(long *)(param_1 + 8) + (ulong)(*(int *)(param_1 + 0x10) - 1U & uVar3) * 8);
do {
if (puVar4 == (int8 *)0x0) {
return 0;
}
if ((*(uint *)(puVar4 + 2) == uVar3) && (puVar4[1] == __n)) {
iVar1 = bcmp((void *)*puVar4,param_2,__n);
if (iVar1 == 0) {
return CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),1);
}
}
puVar4 = (int8 *)puVar4[3];
} while( true );
}
/* WARNING: Subroutine does not return */
__assert_fail("string != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",0xb9,
"_Bool string_table_contains(StringTable *, const char *)");
}
|
|
10,902 |
my_register_filename
|
eloqsql/mysys/my_open.c
|
File my_register_filename(File fd, const char *FileName, enum file_type
type_of_file, uint error_message_number, myf MyFlags)
{
DBUG_ENTER("my_register_filename");
if ((int) fd >= MY_FILE_MIN)
{
my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED);
if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER))
DBUG_RETURN(fd);
my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags);
statistic_increment(my_file_total_opened,&THR_LOCK_open);
my_file_info[fd].type = type_of_file;
DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd);
}
my_errno= errno;
DBUG_PRINT("error",("Got error %d on open", my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
{
if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
FileName, my_errno);
}
DBUG_RETURN(-1);
}
|
O0
|
c
|
my_register_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x8ba46
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0x381660(%rip), %rcx # 0x40d004
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
leaq 0x1be72b(%rip), %rcx # 0x24a0e0
cmpl (%rcx), %eax
jae 0x8b9c9
movq -0x20(%rbp), %rax
andq $0x2004, %rax # imm = 0x2004
cmpq $0x0, %rax
je 0x8b9d6
jmp 0x8b9cb
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8babd
leaq 0x381b57(%rip), %rax # 0x40d534
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x8b390
movq %rax, %rcx
leaq 0x1be6f2(%rip), %rax # 0x24a0e8
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
leaq 0x3815e2(%rip), %rax # 0x40cff0
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3815d4(%rip), %rax # 0x40cff0
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
leaq 0x1be6bf(%rip), %rax # 0x24a0e8
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0x8ba3c
jmp 0x8ba3e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8babd
callq 0x389e0
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x8ca30
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x8ba5c
movq -0x20(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
je 0x8bab4
callq 0x8ca30
cmpl $0x18, (%rax)
jne 0x8ba7b
movl $0x17, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x8ca30
movl -0x44(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movb $0x0, %al
callq 0x85630
jmp 0x8bab6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_register_filename:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_20], r8
cmp [rbp+var_8], 0
jl loc_8BA46
mov [rbp+var_24], 1
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_8]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_8B9C9
mov rax, [rbp+var_20]
and rax, 2004h
cmp rax, 0
jz short loc_8B9D6
loc_8B9C9:
jmp short $+2
loc_8B9CB:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp loc_8BABD
loc_8B9D6:
lea rax, key_memory_my_file_info
mov edi, [rax]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
call my_strdup
mov rcx, rax
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax], rcx
lea rax, my_file_total_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_file_total_opened
mov [rax], rcx
mov ecx, [rbp+var_14]
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax+8], ecx
jmp short $+2
loc_8BA3C:
jmp short $+2
loc_8BA3E:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp short loc_8BABD
loc_8BA46:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
jmp short $+2
loc_8BA5C:
mov rax, [rbp+var_20]
and rax, 19h
cmp rax, 0
jz short loc_8BAB4
call _my_thread_var
cmp dword ptr [rax], 18h
jnz short loc_8BA7B
mov [rbp+var_18], 17h
loc_8BA7B:
mov eax, [rbp+var_18]
mov [rbp+var_44], eax
mov rax, [rbp+var_20]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
call _my_thread_var
mov edi, [rbp+var_44]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov al, 0
call my_error
loc_8BAB4:
jmp short $+2
loc_8BAB6:
mov [rbp+var_4], 0FFFFFFFFh
loc_8BABD:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_register_filename(long long a1, long long a2, int a3, unsigned int a4, __int16 a5)
{
unsigned int *v5; // rax
int v7; // [rsp+24h] [rbp-2Ch]
if ( (int)a1 < 0 )
{
v7 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v7;
if ( (a5 & 0x19) != 0 )
{
if ( *(_DWORD *)my_thread_var() == 24 )
a4 = 23;
v5 = (unsigned int *)my_thread_var();
my_error(a4, a5 & 0x440 | 4LL, a2, *v5);
}
return (unsigned int)-1;
}
else
{
_InterlockedExchangeAdd(my_file_opened, 1u);
if ( (unsigned int)a1 >= my_file_limit || (a5 & 0x2004) != 0 )
{
return (unsigned int)a1;
}
else
{
*((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, a2, a5);
++my_file_total_opened;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3;
return (unsigned int)a1;
}
}
}
|
my_register_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV qword ptr [RBP + -0x20],R8
CMP dword ptr [RBP + -0x8],0x0
JL 0x0018ba46
MOV dword ptr [RBP + -0x24],0x1
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0x50d004]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x8]
LEA RCX,[0x34a0e0]
CMP EAX,dword ptr [RCX]
JNC 0x0018b9c9
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x2004
CMP RAX,0x0
JZ 0x0018b9d6
LAB_0018b9c9:
JMP 0x0018b9cb
LAB_0018b9cb:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018babd
LAB_0018b9d6:
LEA RAX,[0x50d534]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0018b390
MOV RCX,RAX
LEA RAX,[0x34a0e8]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LEA RAX,[0x50cff0]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x50cff0]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x14]
LEA RAX,[0x34a0e8]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x8],ECX
JMP 0x0018ba3c
LAB_0018ba3c:
JMP 0x0018ba3e
LAB_0018ba3e:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018babd
LAB_0018ba46:
CALL 0x001389e0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x0018ca30
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
JMP 0x0018ba5c
LAB_0018ba5c:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x19
CMP RAX,0x0
JZ 0x0018bab4
CALL 0x0018ca30
CMP dword ptr [RAX],0x18
JNZ 0x0018ba7b
MOV dword ptr [RBP + -0x18],0x17
LAB_0018ba7b:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x0018ca30
MOV EDI,dword ptr [RBP + -0x44]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV AL,0x0
CALL 0x00185630
LAB_0018bab4:
JMP 0x0018bab6
LAB_0018bab6:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_0018babd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
uint my_register_filename
(uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int4 *puVar4;
int4 local_20;
uint local_c;
if ((int)param_1 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_5 & 0x19) != 0) {
piVar3 = (int *)_my_thread_var();
local_20 = param_4;
if (*piVar3 == 0x18) {
local_20 = 0x17;
}
puVar4 = (int4 *)_my_thread_var();
my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4);
}
local_c = 0xffffffff;
}
else {
LOCK();
my_file_opened = my_file_opened + 1;
UNLOCK();
local_c = param_1;
if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) {
uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2;
my_file_total_opened = my_file_total_opened + 1;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3;
}
}
return local_c;
}
|
|
10,903 |
JS_GetAnyOpaque
|
bluesky950520[P]quickjs/quickjs.c
|
void *JS_GetAnyOpaque(JSValue obj, JSClassID *class_id)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) {
*class_id = 0;
return NULL;
}
p = JS_VALUE_GET_OBJ(obj);
*class_id = p->class_id;
return p->u.opaque;
}
|
O0
|
c
|
JS_GetAnyOpaque:
movq %rdi, -0x18(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
cmpl $-0x1, %eax
je 0x3e7af
movq -0x20(%rsp), %rax
movl $0x0, (%rax)
movq $0x0, -0x8(%rsp)
jmp 0x3e7d7
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
movzwl 0x6(%rax), %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
movq -0x28(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
|
JS_GetAnyOpaque:
mov [rsp+var_18], rdi
mov [rsp+var_10], rsi
mov [rsp+var_20], rdx
mov rax, [rsp+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_3E7AF
mov rax, [rsp+var_20]
mov dword ptr [rax], 0
mov [rsp+var_8], 0
jmp short loc_3E7D7
loc_3E7AF:
mov rax, [rsp+var_18]
mov [rsp+var_28], rax
mov rax, [rsp+var_28]
movzx ecx, word ptr [rax+6]
mov rax, [rsp+var_20]
mov [rax], ecx
mov rax, [rsp+var_28]
mov rax, [rax+30h]
mov [rsp+var_8], rax
loc_3E7D7:
mov rax, [rsp+var_8]
retn
|
long long JS_GetAnyOpaque(long long a1, int a2, _DWORD *a3)
{
if ( a2 == -1 )
{
*a3 = *(unsigned __int16 *)(a1 + 6);
return *(_QWORD *)(a1 + 48);
}
else
{
*a3 = 0;
return 0LL;
}
}
|
JS_GetAnyOpaque:
MOV qword ptr [RSP + -0x18],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x20],RDX
MOV RAX,qword ptr [RSP + -0x10]
CMP EAX,-0x1
JZ 0x0013e7af
MOV RAX,qword ptr [RSP + -0x20]
MOV dword ptr [RAX],0x0
MOV qword ptr [RSP + -0x8],0x0
JMP 0x0013e7d7
LAB_0013e7af:
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOVZX ECX,word ptr [RAX + 0x6]
MOV RAX,qword ptr [RSP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x8],RAX
LAB_0013e7d7:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
int8 JS_GetAnyOpaque(long param_1,int param_2,uint *param_3)
{
int8 local_8;
if (param_2 == -1) {
*param_3 = (uint)*(ushort *)(param_1 + 6);
local_8 = *(int8 *)(param_1 + 0x30);
}
else {
*param_3 = 0;
local_8 = 0;
}
return local_8;
}
|
|
10,904 |
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*)
|
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/vm.cpp
|
evmc_set_option_result set_option(evmc_vm* c_vm, char const* c_name, char const* c_value) noexcept
{
const auto name = (c_name != nullptr) ? std::string_view{c_name} : std::string_view{};
const auto value = (c_value != nullptr) ? std::string_view{c_value} : std::string_view{};
auto& vm = *static_cast<VM*>(c_vm);
if (name == "advanced")
{
c_vm->execute = evmone::advanced::execute;
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "cgoto")
{
#if EVMONE_CGOTO_SUPPORTED
if (value == "no")
{
vm.cgoto = false;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_VALUE;
#else
return EVMC_SET_OPTION_INVALID_NAME;
#endif
}
else if (name == "trace")
{
vm.add_tracer(create_instruction_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "histogram")
{
vm.add_tracer(create_histogram_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "validate_eof")
{
vm.validate_eof = true;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_NAME;
}
|
O3
|
cpp
|
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x30436
movq %r14, %rdi
callq 0x22200
movq %rax, %r12
jmp 0x30439
xorl %r12d, %r12d
testq %r15, %r15
je 0x30450
movq %r15, %rdi
callq 0x22200
cmpq $0x2, %rax
sete %r13b
jmp 0x30453
xorl %r13d, %r13d
movl $0x1, %ebp
leaq -0x5(%r12), %rax
cmpq $0x7, %rax
ja 0x30550
leaq 0x52b32(%rip), %rcx # 0x82fa0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x52c79(%rip), %rsi # 0x830f7
movq %r14, %rdi
movq %r12, %rdx
callq 0x22350
testl %eax, %eax
je 0x30561
movl $0x63617274, %eax # imm = 0x63617274
xorl (%r14), %eax
movzbl 0x4(%r14), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
jne 0x30550
movq 0x90ad8(%rip), %rsi # 0xc0f88
leaq 0x10(%rsp), %rdi
callq 0x4b94b
addq $0x58, %rbx
movq %rbx, %rax
movq (%rbx), %rcx
leaq 0x8(%rcx), %rbx
testq %rcx, %rcx
jne 0x304be
movq 0x10(%rsp), %rcx
jmp 0x30513
leaq 0x52c2b(%rip), %rsi # 0x83106
movq %r14, %rdi
movq %r12, %rdx
callq 0x22350
testl %eax, %eax
jne 0x30550
movq 0x90a97(%rip), %rsi # 0xc0f88
leaq 0x8(%rsp), %rdi
callq 0x4b838
addq $0x58, %rbx
movq %rbx, %rax
movq (%rbx), %rcx
leaq 0x8(%rcx), %rbx
testq %rcx, %rcx
jne 0x304ff
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x3054e
movabsq $0x6465636e61766461, %rax # imm = 0x6465636E61766461
cmpq %rax, (%r14)
jne 0x30550
leaq 0xc98(%rip), %rax # 0x311c6
movq %rax, 0x20(%rbx)
jmp 0x3054e
leaq 0x52bd5(%rip), %rsi # 0x83110
movq %r14, %rdi
movq %r12, %rdx
callq 0x22350
testl %eax, %eax
jne 0x30550
movb $0x1, 0x39(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, %ebp
testb %r13b, %r13b
je 0x30550
cmpw $0x6f6e, (%r15) # imm = 0x6F6E
jne 0x30550
movb $0x0, 0x38(%rbx)
jmp 0x3054e
movq %rax, %rdi
callq 0x30061
nop
|
_ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
test rsi, rsi
jz short loc_30436
mov rdi, r14
call _strlen
mov r12, rax
jmp short loc_30439
loc_30436:
xor r12d, r12d
loc_30439:
test r15, r15
jz short loc_30450
mov rdi, r15
call _strlen
cmp rax, 2
setz r13b
jmp short loc_30453
loc_30450:
xor r13d, r13d
loc_30453:
mov ebp, 1
lea rax, [r12-5]; switch 8 cases
cmp rax, 7
ja def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
lea rcx, jpt_30475
movsxd rax, ds:(jpt_30475 - 82FA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_30477:
lea rsi, aCgoto; jumptable 0000000000030475 case 5
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jz loc_30561
mov eax, 63617274h
xor eax, [r14]
movzx ecx, byte ptr [r14+4]
xor ecx, 65h
or ecx, eax
jnz def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rsp+48h+var_38]
call _ZN6evmone25create_instruction_tracerERSo; evmone::create_instruction_tracer(std::ostream &)
add rbx, 58h ; 'X'
loc_304BE:
mov rax, rbx
mov rcx, [rbx]
lea rbx, [rcx+8]
test rcx, rcx
jnz short loc_304BE
mov rcx, [rsp+48h+var_38]
jmp short loc_30513
loc_304D4:
lea rsi, aHistogram; jumptable 0000000000030475 case 9
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jnz short def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rsp+48h+var_40]
call _ZN6evmone23create_histogram_tracerERSo; evmone::create_histogram_tracer(std::ostream &)
add rbx, 58h ; 'X'
loc_304FF:
mov rax, rbx
mov rcx, [rbx]
lea rbx, [rcx+8]
test rcx, rcx
jnz short loc_304FF
mov rcx, [rsp+48h+var_40]
loc_30513:
mov [rax], rcx
jmp short loc_3054E
loc_30518:
mov rax, 6465636E61766461h; jumptable 0000000000030475 case 8
cmp [r14], rax
jnz short def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
lea rax, _ZN6evmone8advanced7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::advanced::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong)
mov [rbx+20h], rax
jmp short loc_3054E
loc_30534:
lea rsi, aValidateEof; jumptable 0000000000030475 case 12
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jnz short def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
mov byte ptr [rbx+39h], 1
loc_3054E:
xor ebp, ebp
def_30475:
mov eax, ebp; jumptable 0000000000030475 default case, cases 6,7,10,11
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30561:
mov ebp, 2
test r13b, r13b
jz short def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
cmp word ptr [r15], 6F6Eh
jnz short def_30475; jumptable 0000000000030475 default case, cases 6,7,10,11
mov byte ptr [rbx+38h], 0
jmp short loc_3054E
mov rdi, rax
call __clang_call_terminate
|
long long evmone::`anonymous namespace'::set_option(long long a1, long long a2, _WORD *a3)
{
long long v4; // r12
bool v5; // r13
unsigned int v6; // ebp
_QWORD *v7; // rbx
_QWORD *v8; // rax
long long v9; // rcx
long long v10; // rcx
_QWORD *v11; // rbx
long long v12; // rcx
long long v14; // [rsp+8h] [rbp-40h] BYREF
_QWORD v15[7]; // [rsp+10h] [rbp-38h] BYREF
if ( a2 )
v4 = strlen(a2);
else
v4 = 0LL;
if ( a3 )
v5 = strlen(a3) == 2;
else
v5 = 0;
v6 = 1;
switch ( v4 )
{
case 5LL:
if ( (unsigned int)bcmp(a2, "cgoto", v4) )
{
if ( !(*(_DWORD *)a2 ^ 0x63617274 | *(unsigned __int8 *)(a2 + 4) ^ 0x65) )
{
evmone::create_instruction_tracer(v15, &std::clog);
v7 = (_QWORD *)(a1 + 88);
do
{
v8 = v7;
v9 = *v7;
v7 = (_QWORD *)(*v7 + 8LL);
}
while ( v9 );
v10 = v15[0];
goto LABEL_17;
}
}
else
{
v6 = 2;
if ( v5 && *a3 == 28526 )
{
*(_BYTE *)(a1 + 56) = 0;
goto LABEL_22;
}
}
break;
case 8LL:
if ( *(_QWORD *)a2 == 0x6465636E61766461LL )
{
*(_QWORD *)(a1 + 32) = evmone::advanced::execute;
goto LABEL_22;
}
break;
case 9LL:
if ( !(unsigned int)bcmp(a2, "histogram", v4) )
{
evmone::create_histogram_tracer(&v14, &std::clog);
v11 = (_QWORD *)(a1 + 88);
do
{
v8 = v11;
v12 = *v11;
v11 = (_QWORD *)(*v11 + 8LL);
}
while ( v12 );
v10 = v14;
LABEL_17:
*v8 = v10;
goto LABEL_22;
}
break;
case 12LL:
if ( !(unsigned int)bcmp(a2, "validate_eof", v4) )
{
*(_BYTE *)(a1 + 57) = 1;
LABEL_22:
v6 = 0;
}
break;
default:
return v6;
}
return v6;
}
|
set_option:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
TEST RSI,RSI
JZ 0x00130436
MOV RDI,R14
CALL 0x00122200
MOV R12,RAX
JMP 0x00130439
LAB_00130436:
XOR R12D,R12D
LAB_00130439:
TEST R15,R15
JZ 0x00130450
MOV RDI,R15
CALL 0x00122200
CMP RAX,0x2
SETZ R13B
JMP 0x00130453
LAB_00130450:
XOR R13D,R13D
LAB_00130453:
MOV EBP,0x1
LEA RAX,[R12 + -0x5]
CMP RAX,0x7
JA 0x00130550
LEA RCX,[0x182fa0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
LEA RSI,[0x1830f7]
MOV RDI,R14
MOV RDX,R12
CALL 0x00122350
TEST EAX,EAX
JZ 0x00130561
MOV EAX,0x63617274
XOR EAX,dword ptr [R14]
MOVZX ECX,byte ptr [R14 + 0x4]
XOR ECX,0x65
OR ECX,EAX
JNZ 0x00130550
LAB_001304a9:
MOV RSI,qword ptr [0x001c0f88]
LEA RDI,[RSP + 0x10]
CALL 0x0014b94b
ADD RBX,0x58
LAB_001304be:
MOV RAX,RBX
MOV RCX,qword ptr [RBX]
LEA RBX,[RCX + 0x8]
TEST RCX,RCX
JNZ 0x001304be
MOV RCX,qword ptr [RSP + 0x10]
JMP 0x00130513
caseD_9:
LEA RSI,[0x183106]
MOV RDI,R14
MOV RDX,R12
CALL 0x00122350
TEST EAX,EAX
JNZ 0x00130550
MOV RSI,qword ptr [0x001c0f88]
LEA RDI,[RSP + 0x8]
CALL 0x0014b838
ADD RBX,0x58
LAB_001304ff:
MOV RAX,RBX
MOV RCX,qword ptr [RBX]
LEA RBX,[RCX + 0x8]
TEST RCX,RCX
JNZ 0x001304ff
MOV RCX,qword ptr [RSP + 0x8]
LAB_00130513:
MOV qword ptr [RAX],RCX
JMP 0x0013054e
caseD_8:
MOV RAX,0x6465636e61766461
CMP qword ptr [R14],RAX
JNZ 0x00130550
LEA RAX,[0x1311c6]
MOV qword ptr [RBX + 0x20],RAX
JMP 0x0013054e
caseD_c:
LEA RSI,[0x183110]
MOV RDI,R14
MOV RDX,R12
CALL 0x00122350
TEST EAX,EAX
JNZ 0x00130550
MOV byte ptr [RBX + 0x39],0x1
LAB_0013054e:
XOR EBP,EBP
caseD_6:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130561:
MOV EBP,0x2
TEST R13B,R13B
JZ 0x00130550
CMP word ptr [R15],0x6f6e
JNZ 0x00130550
MOV byte ptr [RBX + 0x38],0x0
JMP 0x0013054e
|
/* evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) */
int8 evmone::(anonymous_namespace)::set_option(evmc_vm *param_1,char *param_2,char *param_3)
{
evmc_vm *peVar1;
int iVar2;
size_t __n;
size_t sVar3;
evmc_vm *peVar4;
int8 uVar5;
bool bVar6;
long local_40;
long local_38;
if (param_2 == (char *)0x0) {
__n = 0;
}
else {
__n = strlen(param_2);
}
if (param_3 == (char *)0x0) {
bVar6 = false;
}
else {
sVar3 = strlen(param_3);
bVar6 = sVar3 == 2;
}
uVar5 = 1;
switch(__n) {
case 5:
iVar2 = bcmp(param_2,&DAT_001830f7,__n);
if (iVar2 != 0) {
if (param_2[4] != 'e' || *(int *)param_2 != 0x63617274) {
return 1;
}
/* try { // try from 001304a9 to 001304fa has its CatchHandler @ 00130579 */
create_instruction_tracer((evmone *)&local_38,(ostream *)PTR_clog_001c0f88);
peVar1 = param_1 + 0x58;
do {
peVar4 = peVar1;
local_40 = local_38;
peVar1 = (evmc_vm *)(*(long *)peVar4 + 8);
} while (*(long *)peVar4 != 0);
goto LAB_00130513;
}
if (!bVar6) {
return 2;
}
if (*(short *)param_3 != 0x6f6e) {
return 2;
}
param_1[0x38] = (evmc_vm)0x0;
break;
default:
goto switchD_00130475_caseD_6;
case 8:
if (*(long *)param_2 != 0x6465636e61766461) {
return 1;
}
*(code **)(param_1 + 0x20) = advanced::execute;
break;
case 9:
iVar2 = bcmp(param_2,"histogram",__n);
if (iVar2 != 0) {
return 1;
}
create_histogram_tracer((evmone *)&local_40,(ostream *)PTR_clog_001c0f88);
peVar1 = param_1 + 0x58;
do {
peVar4 = peVar1;
peVar1 = (evmc_vm *)(*(long *)peVar4 + 8);
} while (*(long *)peVar4 != 0);
LAB_00130513:
*(long *)peVar4 = local_40;
break;
case 0xc:
iVar2 = bcmp(param_2,"validate_eof",__n);
if (iVar2 != 0) {
return 1;
}
param_1[0x39] = (evmc_vm)0x1;
}
uVar5 = 0;
switchD_00130475_caseD_6:
return uVar5;
}
|
|
10,905 |
testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter(std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void XmlUnitTestResultPrinter::ListTestsMatchingFilter(
const std::vector<TestSuite*>& test_suites) {
FILE* xmlout = OpenFileForWriting(output_file_);
std::stringstream stream;
PrintXmlTestsList(&stream, test_suites);
fprintf(xmlout, "%s", StringStreamToString(&stream).c_str());
fclose(xmlout);
}
|
O0
|
cpp
|
testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter(std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&):
subq $0x1e8, %rsp # imm = 0x1E8
movq %rdi, 0x1e0(%rsp)
movq %rsi, 0x1d8(%rsp)
movq 0x1e0(%rsp), %rdi
addq $0x8, %rdi
callq 0xcb0d0
movq %rax, 0x1d0(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x14490
xorl %eax, %eax
leaq 0x48(%rsp), %rcx
cmpq $0x0, %rcx
movq %rax, 0x10(%rsp)
je 0xcc00a
leaq 0x48(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x1d8(%rsp), %rsi
callq 0xcc0b0
jmp 0xcc01e
movq 0x1d0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xc0a00
jmp 0xcc03c
leaq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1acc0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x481f2(%rip), %rsi # 0x11424b
xorl %eax, %eax
callq 0x14a60
movq (%rsp), %rdi
callq 0x1aac0
movq 0x1d0(%rsp), %rdi
callq 0x146b0
jmp 0xcc078
leaq 0x48(%rsp), %rdi
callq 0x14500
addq $0x1e8, %rsp # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x14500
movq 0x40(%rsp), %rdi
callq 0x14c80
nopl (%rax)
|
_ZN7testing8internal24XmlUnitTestResultPrinter23ListTestsMatchingFilterERKSt6vectorIPNS_9TestSuiteESaIS4_EE:
sub rsp, 1E8h
mov [rsp+1E8h+var_8], rdi
mov [rsp+1E8h+var_10], rsi
mov rdi, [rsp+1E8h+var_8]
add rdi, 8
call _ZN7testing8internalL18OpenFileForWritingERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::OpenFileForWriting(std::string const&)
mov qword ptr [rsp+1E8h+var_18], rax
lea rdi, [rsp+1E8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
xor eax, eax
lea rcx, [rsp+1E8h+var_1A0]
cmp rcx, 0
mov [rsp+1E8h+var_1D8], rax
jz short loc_CC00A
lea rax, [rsp+1E8h+var_1A0]
add rax, 10h
mov [rsp+1E8h+var_1D8], rax; void *
loc_CC00A:
mov rdi, [rsp+1E8h+var_1D8]
mov rsi, [rsp+1E8h+var_10]
call _ZN7testing8internal24XmlUnitTestResultPrinter17PrintXmlTestsListEPSoRKSt6vectorIPNS_9TestSuiteESaIS5_EE; testing::internal::XmlUnitTestResultPrinter::PrintXmlTestsList(std::ostream *,std::vector<testing::TestSuite *> const&)
jmp short $+2
loc_CC01E:
mov rax, qword ptr [rsp+1E8h+var_18]
mov qword ptr [rsp+1E8h+var_1E0], rax; int
lea rdi, [rsp+1E8h+var_1D0]; int
lea rsi, [rsp+1E8h+var_1A0]; int
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
jmp short $+2
loc_CC03C:
lea rdi, [rsp+1E8h+var_1D0]
mov [rsp+1E8h+var_1E8], rdi
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, qword ptr [rsp+1E8h+var_1E0]
mov rdx, rax
lea rsi, aS_2+2; "%s"
xor eax, eax
call _fprintf
mov rdi, [rsp+1E8h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, qword ptr [rsp+1E8h+var_18]
call _fclose
jmp short $+2
loc_CC078:
lea rdi, [rsp+1E8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 1E8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_40]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
long long testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter(long long a1, long long a2)
{
int v2; // edx
int v3; // r8d
int v4; // r9d
const char *v5; // rax
void *v7; // [rsp+0h] [rbp-1E8h] BYREF
int v8[2]; // [rsp+8h] [rbp-1E0h]
void *v9; // [rsp+10h] [rbp-1D8h]
int v10[12]; // [rsp+18h] [rbp-1D0h] BYREF
int v11[4]; // [rsp+48h] [rbp-1A0h] BYREF
_DWORD v12[4]; // [rsp+58h] [rbp-190h] BYREF
char v13; // [rsp+68h] [rbp-180h]
int v14; // [rsp+70h] [rbp-178h]
int v15; // [rsp+78h] [rbp-170h]
int v16; // [rsp+80h] [rbp-168h]
int v17; // [rsp+88h] [rbp-160h]
char v18; // [rsp+90h] [rbp-158h]
int v19; // [rsp+98h] [rbp-150h]
int v20; // [rsp+A0h] [rbp-148h]
int v21; // [rsp+A8h] [rbp-140h]
char v22; // [rsp+B0h] [rbp-138h]
int v23; // [rsp+B8h] [rbp-130h]
int v24; // [rsp+C0h] [rbp-128h]
int v25; // [rsp+C8h] [rbp-120h]
int v26; // [rsp+D0h] [rbp-118h]
char v27; // [rsp+D8h] [rbp-110h]
int v28; // [rsp+E0h] [rbp-108h]
int v29; // [rsp+E8h] [rbp-100h]
int v30; // [rsp+F0h] [rbp-F8h]
int v31; // [rsp+F8h] [rbp-F0h]
int v32; // [rsp+100h] [rbp-E8h]
int v33; // [rsp+108h] [rbp-E0h]
int v34; // [rsp+110h] [rbp-D8h]
int v35; // [rsp+118h] [rbp-D0h]
long long v36; // [rsp+120h] [rbp-C8h]
int v37; // [rsp+128h] [rbp-C0h]
char v38; // [rsp+130h] [rbp-B8h]
int v39[2]; // [rsp+1D0h] [rbp-18h]
long long v40; // [rsp+1D8h] [rbp-10h]
long long v41; // [rsp+1E0h] [rbp-8h]
v41 = a1;
v40 = a2;
*(_QWORD *)v39 = testing::internal::OpenFileForWriting(a1 + 8);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v11);
v9 = 0LL;
if ( &v7 != (void **)-72LL )
v9 = v12;
testing::internal::XmlUnitTestResultPrinter::PrintXmlTestsList(
(_DWORD)v9,
v40,
v2,
(unsigned int)v11,
v3,
v4,
(_DWORD)v7,
v8[0],
(_DWORD)v9,
v10[0],
v10[2],
v10[4],
v10[6],
v10[8],
v10[10],
v11[0],
v11[2],
v12[0],
v12[2],
v13,
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21,
v22,
v23,
v24,
v25,
v26,
v27,
v28,
v29,
v30,
v31,
v32,
v33,
v34,
v35,
v36,
v37,
v38);
*(_QWORD *)v8 = *(_QWORD *)v39;
testing::internal::StringStreamToString(v10, (long long)v11);
v7 = v10;
v5 = (const char *)std::string::c_str((long long)v10);
fprintf(*(_QWORD *)v8, "%s", v5);
std::string::~string(v7);
fclose(*(_QWORD *)v39);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v11);
}
|
ListTestsMatchingFilter:
SUB RSP,0x1e8
MOV qword ptr [RSP + 0x1e0],RDI
MOV qword ptr [RSP + 0x1d8],RSI
MOV RDI,qword ptr [RSP + 0x1e0]
ADD RDI,0x8
CALL 0x001cb0d0
MOV qword ptr [RSP + 0x1d0],RAX
LEA RDI,[RSP + 0x48]
CALL 0x00114490
XOR EAX,EAX
LEA RCX,[RSP + 0x48]
CMP RCX,0x0
MOV qword ptr [RSP + 0x10],RAX
JZ 0x001cc00a
LEA RAX,[RSP + 0x48]
ADD RAX,0x10
MOV qword ptr [RSP + 0x10],RAX
LAB_001cc00a:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x1d8]
LAB_001cc017:
CALL 0x001cc0b0
JMP 0x001cc01e
LAB_001cc01e:
MOV RAX,qword ptr [RSP + 0x1d0]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x48]
CALL 0x001c0a00
JMP 0x001cc03c
LAB_001cc03c:
LEA RDI,[RSP + 0x18]
MOV qword ptr [RSP],RDI
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,RAX
LEA RSI,[0x21424b]
XOR EAX,EAX
CALL 0x00114a60
MOV RDI,qword ptr [RSP]
CALL 0x0011aac0
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x001146b0
LAB_001cc076:
JMP 0x001cc078
LAB_001cc078:
LEA RDI,[RSP + 0x48]
CALL 0x00114500
ADD RSP,0x1e8
RET
|
/* testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter(std::vector<testing::TestSuite*,
std::allocator<testing::TestSuite*> > const&) */
void __thiscall
testing::internal::XmlUnitTestResultPrinter::ListTestsMatchingFilter
(XmlUnitTestResultPrinter *this,vector *param_1)
{
FILE *__stream;
int8 uVar1;
ostream *local_1d8;
internal local_1d0 [48];
stringstream local_1a0 [16];
ostream aoStack_190 [376];
FILE *local_18;
vector *local_10;
XmlUnitTestResultPrinter *local_8;
local_10 = param_1;
local_8 = this;
local_18 = (FILE *)OpenFileForWriting((string *)(this + 8));
std::__cxx11::stringstream::stringstream(local_1a0);
local_1d8 = (ostream *)0x0;
if (&stack0x00000000 != (int1 *)0x1a0) {
local_1d8 = aoStack_190;
}
/* try { // try from 001cc017 to 001cc075 has its CatchHandler @ 001cc08a */
PrintXmlTestsList(local_1d8,local_10);
__stream = local_18;
StringStreamToString(local_1d0,local_1a0);
uVar1 = std::__cxx11::string::c_str((string *)local_1d0);
fprintf(__stream,"%s",uVar1);
std::__cxx11::string::~string((string *)local_1d0);
fclose(local_18);
std::__cxx11::stringstream::~stringstream(local_1a0);
return;
}
|
|
10,906 |
CharCallback
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
static void CharCallback(GLFWwindow *window, unsigned int codepoint)
{
//TRACELOG(LOG_DEBUG, "Char Callback: Codepoint: %i", codepoint);
// NOTE: Registers any key down considering OS keyboard layout but
// does not detect action events, those should be managed by user...
// Ref: https://github.com/glfw/glfw/issues/668#issuecomment-166794907
// Ref: https://www.glfw.org/docs/latest/input_guide.html#input_char
// Check if there is space available in the queue
if (CORE.Input.Keyboard.charPressedQueueCount < MAX_CHAR_PRESSED_QUEUE)
{
// Add character to the queue
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = codepoint;
CORE.Input.Keyboard.charPressedQueueCount++;
}
}
|
O1
|
c
|
CharCallback:
movslq 0xcd275(%rip), %rax # 0x1422f8
cmpq $0xf, %rax
jg 0x7509d
leaq 0xccb20(%rip), %rcx # 0x141bb0
movl %esi, 0x708(%rcx,%rax,4)
incl 0xcd25b(%rip) # 0x1422f8
retq
|
CharCallback:
movsxd rax, cs:dword_1422F8
cmp rax, 0Fh
jg short locret_7509D
lea rcx, CORE
mov [rcx+rax*4+708h], esi
inc cs:dword_1422F8
locret_7509D:
retn
|
long long CharCallback(long long a1, int a2)
{
long long result; // rax
result = dword_1422F8;
if ( dword_1422F8 <= 15LL )
*((_DWORD *)&CORE[225] + dword_1422F8++) = a2;
return result;
}
|
CharCallback:
MOVSXD RAX,dword ptr [0x002422f8]
CMP RAX,0xf
JG 0x0017509d
LEA RCX,[0x241bb0]
MOV dword ptr [RCX + RAX*0x4 + 0x708],ESI
INC dword ptr [0x002422f8]
LAB_0017509d:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void CharCallback(int8 param_1,int4 param_2)
{
if ((long)_DAT_002422f8 < 0x10) {
*(int4 *)(&DAT_002422b8 + (long)_DAT_002422f8 * 4) = param_2;
_DAT_002422f8 = _DAT_002422f8 + 1;
}
return;
}
|
|
10,907 |
ft_parse_internal
|
eloqsql/storage/myisam/ft_parser.c
|
static int ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
const char *doc_arg, int doc_len)
{
uchar *doc= (uchar*) doc_arg;
uchar *end= doc + doc_len;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
TREE *wtree= ft_param->wtree;
FT_WORD w;
DBUG_ENTER("ft_parse_internal");
while (ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O0
|
c
|
ft_parse_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x230(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq -0x28(%rbp), %rsi
leaq -0x58(%rbp), %rcx
movl $0x1, %r8d
callq 0xa40b0
cmpb $0x0, %al
je 0xa44b3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rcx
movl %ecx, %edx
xorl %ecx, %ecx
callq *%rax
cmpl $0x0, %eax
je 0xa44b1
jmp 0xa44a8
movl $0x1, -0x4(%rbp)
jmp 0xa44bc
jmp 0xa4461
jmp 0xa44b5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ft_parse_internal:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
loc_A4461:
mov rax, [rbp+var_40]
mov rdi, [rax+230h]
mov rdx, [rbp+var_30]
lea rsi, [rbp+var_28]
lea rcx, [rbp+var_58]
mov r8d, 1
call ft_simple_get_word
cmp al, 0
jz short loc_A44B3
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_58]
mov rcx, [rbp+var_48]
mov edx, ecx
xor ecx, ecx
call rax
cmp eax, 0
jz short loc_A44B1
jmp short $+2
loc_A44A8:
mov [rbp+var_4], 1
jmp short loc_A44BC
loc_A44B1:
jmp short loc_A4461
loc_A44B3:
jmp short $+2
loc_A44B5:
mov [rbp+var_4], 0
loc_A44BC:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long ft_parse_internal(long long a1, _BYTE *a2, int a3)
{
long long v4; // [rsp+8h] [rbp-58h] BYREF
long long v5; // [rsp+18h] [rbp-48h]
long long v6; // [rsp+20h] [rbp-40h]
long long *v7; // [rsp+28h] [rbp-38h]
_BYTE *v8; // [rsp+30h] [rbp-30h]
_BYTE *v9; // [rsp+38h] [rbp-28h] BYREF
int v10; // [rsp+44h] [rbp-1Ch]
_BYTE *v11; // [rsp+48h] [rbp-18h]
long long v12; // [rsp+50h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a2;
v8 = &a2[a3];
v7 = *(long long **)(a1 + 24);
v6 = *v7;
while ( ft_simple_get_word(*(_QWORD *)(v6 + 560), &v9, (unsigned long long)v8, &v4, 1) )
{
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(v12 + 8))(v12, v4, (unsigned int)v5, 0LL) )
return 1;
}
return 0;
}
|
ft_parse_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_001a4461:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x230]
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x28]
LEA RCX,[RBP + -0x58]
MOV R8D,0x1
CALL 0x001a40b0
CMP AL,0x0
JZ 0x001a44b3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV EDX,ECX
XOR ECX,ECX
CALL RAX
CMP EAX,0x0
JZ 0x001a44b1
JMP 0x001a44a8
LAB_001a44a8:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a44bc
LAB_001a44b1:
JMP 0x001a4461
LAB_001a44b3:
JMP 0x001a44b5
LAB_001a44b5:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a44bc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 ft_parse_internal(long param_1,long param_2,int param_3)
{
char cVar1;
int iVar2;
int8 local_60 [2];
ulong local_50;
long local_48;
long *local_40;
long local_38;
long local_30;
int local_24;
long local_20;
long local_18;
local_38 = param_2 + param_3;
local_40 = *(long **)(param_1 + 0x18);
local_48 = *local_40;
local_30 = param_2;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
cVar1 = ft_simple_get_word(*(int8 *)(local_48 + 0x230),&local_30,local_38,local_60,1);
if (cVar1 == '\0') {
return 0;
}
iVar2 = (**(code **)(local_18 + 8))(local_18,local_60[0],local_50 & 0xffffffff,0);
} while (iVar2 == 0);
return 1;
}
|
|
10,908 |
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/common.cpp
|
std::string string_join(const std::vector<std::string> & values, const std::string & separator) {
std::ostringstream result;
for (size_t i = 0; i < values.size(); ++i) {
if (i > 0) {
result << separator;
}
result << values[i];
}
return result.str();
}
|
O3
|
cpp
|
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x1dd90
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0xb198f
movl $0x8, %r13d
xorl %ebp, %ebp
movq %rsp, %r12
testq %rbp, %rbp
je 0xb1964
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x1ddc0
movq (%r15), %rax
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %r12, %rdi
callq 0x1ddc0
incq %rbp
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %rcx, %rbp
jb 0xb194d
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d530
movq 0x595b5(%rip), %rsi # 0x10af58
movq %rsp, %rdi
callq 0x1da20
leaq 0x70(%rsp), %rdi
callq 0x1d9f0
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb19cc
movq %rax, %rbx
movq 0x59582(%rip), %rsi # 0x10af58
movq %rsp, %rdi
callq 0x1da20
leaq 0x70(%rsp), %rdi
callq 0x1d9f0
movq %rbx, %rdi
callq 0x1d8e0
|
_Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 178h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r15]
cmp [r15+8], rax
jz short loc_B198F
mov r13d, 8
xor ebp, ebp
mov r12, rsp
loc_B194D:
test rbp, rbp
jz short loc_B1964
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r15]
loc_B1964:
mov rsi, [rax+r13-8]
mov rdx, [rax+r13]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
inc rbp
mov rax, [r15]
mov rcx, [r15+8]
sub rcx, rax
sar rcx, 5
add r13, 20h ; ' '
cmp rbp, rcx
jb short loc_B194D
loc_B198F:
lea rsi, [rsp+1A8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1A8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 178h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_B19CC:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_68]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long string_join(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rax
long long v5; // r13
unsigned long long v6; // rbp
long long v8; // [rsp+0h] [rbp-1A8h] BYREF
_BYTE v9[104]; // [rsp+8h] [rbp-1A0h] BYREF
_BYTE v10[312]; // [rsp+70h] [rbp-138h] BYREF
std::ostringstream::basic_ostringstream(&v8);
v4 = *a2;
if ( a2[1] != *a2 )
{
v5 = 8LL;
v6 = 0LL;
do
{
if ( v6 )
{
std::__ostream_insert<char,std::char_traits<char>>(&v8, *a3, a3[1]);
v4 = *a2;
}
std::__ostream_insert<char,std::char_traits<char>>(&v8, *(_QWORD *)(v4 + v5 - 8), *(_QWORD *)(v4 + v5));
++v6;
v4 = *a2;
v5 += 32LL;
}
while ( v6 < (a2[1] - *a2) >> 5 );
}
std::stringbuf::str(a1, v9);
std::ostringstream::~ostringstream(&v8, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v10);
return a1;
}
|
string_join:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x178
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0011dd90
MOV RAX,qword ptr [R15]
CMP qword ptr [R15 + 0x8],RAX
JZ 0x001b198f
MOV R13D,0x8
XOR EBP,EBP
MOV R12,RSP
LAB_001b194d:
TEST RBP,RBP
JZ 0x001b1964
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_001b1959:
MOV RDI,R12
CALL 0x0011ddc0
MOV RAX,qword ptr [R15]
LAB_001b1964:
MOV RSI,qword ptr [RAX + R13*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R13*0x1]
MOV RDI,R12
CALL 0x0011ddc0
INC RBP
MOV RAX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
SUB RCX,RAX
SAR RCX,0x5
ADD R13,0x20
CMP RBP,RCX
JC 0x001b194d
LAB_001b198f:
LEA RSI,[RSP + 0x8]
LAB_001b1994:
MOV RDI,RBX
CALL 0x0011d530
LAB_001b199c:
MOV RSI,qword ptr [0x0020af58]
MOV RDI,RSP
CALL 0x0011da20
LEA RDI,[RSP + 0x70]
CALL 0x0011d9f0
MOV RAX,RBX
ADD RSP,0x178
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_join(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::__cxx11::string const&) */
vector * string_join(vector *param_1,string *param_2)
{
long lVar1;
int8 *in_RDX;
ulong uVar2;
long lVar3;
ostringstream aoStack_1a8 [112];
ios_base local_138 [264];
std::__cxx11::ostringstream::ostringstream(aoStack_1a8);
lVar1 = *(long *)param_2;
if (*(long *)(param_2 + 8) != lVar1) {
lVar3 = 8;
uVar2 = 0;
do {
if (uVar2 != 0) {
/* try { // try from 001b1959 to 001b1974 has its CatchHandler @ 001b19cc */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)aoStack_1a8,(char *)*in_RDX,in_RDX[1]);
lVar1 = *(long *)param_2;
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)aoStack_1a8,*(char **)(lVar1 + -8 + lVar3),*(long *)(lVar1 + lVar3));
uVar2 = uVar2 + 1;
lVar1 = *(long *)param_2;
lVar3 = lVar3 + 0x20;
} while (uVar2 < (ulong)(*(long *)(param_2 + 8) - lVar1 >> 5));
}
/* try { // try from 001b1994 to 001b199b has its CatchHandler @ 001b19ca */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(aoStack_1a8);
std::ios_base::~ios_base(local_138);
return param_1;
}
|
|
10,909 |
my_numchars_mb
|
eloqsql/strings/ctype-mb.c
|
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
}
|
O0
|
c
|
my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x7533f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74800
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x75317
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x75321
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x75321
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x752ec
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_numchars_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_752EC:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_7533F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_0
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_75317
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
jmp short loc_75321
loc_75317:
mov eax, 1
mov [rbp+var_28], eax
jmp short $+2
loc_75321:
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_752EC
loc_7533F:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
|
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
v6 = 0LL;
while ( a2 < a3 )
{
v5 = my_ismbchar_0(a1, a2, a3);
if ( v5 )
v4 = v5;
else
v4 = 1;
a2 += v4;
++v6;
}
return v6;
}
|
my_numchars_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001752ec:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0017533f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00174800
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x00175317
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00175321
LAB_00175317:
MOV EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00175321
LAB_00175321:
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001752ec
LAB_0017533f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_mb(int8 param_1,ulong param_2,ulong param_3)
{
int4 local_30;
int8 local_28;
int8 local_18;
local_28 = 0;
for (local_18 = param_2; local_18 < param_3; local_18 = local_18 + local_30) {
local_30 = my_ismbchar(param_1,local_18,param_3);
if (local_30 == 0) {
local_30 = 1;
}
local_28 = local_28 + 1;
}
return local_28;
}
|
|
10,910 |
remainingElementsCount_add
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int remainingElementsCount_add(JSContext *ctx,
JSValue resolve_element_env,
int addend)
{
JSValue val;
int remainingElementsCount;
val = JS_GetPropertyUint32(ctx, resolve_element_env, 0);
if (JS_IsException(val))
return -1;
if (JS_ToInt32Free(ctx, &remainingElementsCount, val))
return -1;
remainingElementsCount += addend;
if (JS_SetPropertyUint32(ctx, resolve_element_env, 0,
js_int32(remainingElementsCount)) < 0)
return -1;
return (remainingElementsCount == 0);
}
|
O0
|
c
|
remainingElementsCount_add:
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
xorl %ecx, %ecx
callq 0x31460
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x959fc
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x95a8b
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x2c(%rsp), %rsi
callq 0x38f90
cmpl $0x0, %eax
je 0x95a24
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x95a8b
movl 0x44(%rsp), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movl 0x2c(%rsp), %edi
callq 0x33cc0
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
xorl %ecx, %ecx
callq 0x33350
cmpl $0x0, %eax
jge 0x95a7a
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x95a8b
cmpl $0x0, 0x2c(%rsp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
remainingElementsCount_add:
sub rsp, 68h
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
mov [rsp+68h+var_20], rdi
mov [rsp+68h+var_24], ecx
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
xor ecx, ecx
call JS_GetPropertyUint32
mov [rsp+68h+var_50], rax
mov [rsp+68h+var_48], rdx
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_30], rax
mov rdi, [rsp+68h+var_38]
mov rsi, [rsp+68h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_959FC
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_95A8B
loc_959FC:
mov rdi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_38]
mov rcx, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_3C]
call JS_ToInt32Free
cmp eax, 0
jz short loc_95A24
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_95A8B
loc_95A24:
mov eax, [rsp+68h+var_24]
add eax, [rsp+68h+var_3C]
mov [rsp+68h+var_3C], eax
mov rax, [rsp+68h+var_20]
mov [rsp+68h+var_68], rax
mov edi, [rsp+68h+var_3C]
call js_int32
mov rdi, [rsp+68h+var_68]
mov [rsp+68h+var_60], rax
mov [rsp+68h+var_58], rdx
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
mov r8, [rsp+68h+var_60]
mov r9, [rsp+68h+var_58]
xor ecx, ecx
call JS_SetPropertyUint32
cmp eax, 0
jge short loc_95A7A
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_95A8B
loc_95A7A:
cmp [rsp+68h+var_3C], 0
setz al
and al, 1
movzx eax, al
mov [rsp+68h+var_4], eax
loc_95A8B:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long remainingElementsCount_add(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rdx
long long v5; // rdx
int v7; // [rsp+0h] [rbp-68h]
long long v8; // [rsp+8h] [rbp-60h]
int v9; // [rsp+2Ch] [rbp-3Ch] BYREF
long long PropertyUint32; // [rsp+30h] [rbp-38h]
long long v11; // [rsp+38h] [rbp-30h]
int v12; // [rsp+44h] [rbp-24h]
long long v13; // [rsp+48h] [rbp-20h]
long long v14; // [rsp+50h] [rbp-18h]
long long v15; // [rsp+58h] [rbp-10h]
v14 = a2;
v15 = a3;
v13 = a1;
v12 = a4;
PropertyUint32 = JS_GetPropertyUint32(a1, a2, a3, 0);
v11 = v4;
if ( JS_IsException_1(PropertyUint32, v4) )
{
return (unsigned int)-1;
}
else if ( (unsigned int)JS_ToInt32Free(v13, &v9, PropertyUint32, v11) )
{
return (unsigned int)-1;
}
else
{
v9 += v12;
v7 = v13;
v8 = js_int32(v9);
if ( (int)JS_SetPropertyUint32(v7, v14, v15, 0, v8, v5) >= 0 )
return v9 == 0;
else
return (unsigned int)-1;
}
}
|
remainingElementsCount_add:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x48],RDI
MOV dword ptr [RSP + 0x44],ECX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
XOR ECX,ECX
CALL 0x00131460
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001959fc
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00195a8b
LAB_001959fc:
MOV RDI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x2c]
CALL 0x00138f90
CMP EAX,0x0
JZ 0x00195a24
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00195a8b
LAB_00195a24:
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP],RAX
MOV EDI,dword ptr [RSP + 0x2c]
CALL 0x00133cc0
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x8]
MOV R9,qword ptr [RSP + 0x10]
XOR ECX,ECX
CALL 0x00133350
CMP EAX,0x0
JGE 0x00195a7a
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00195a8b
LAB_00195a7a:
CMP dword ptr [RSP + 0x2c],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x64],EAX
LAB_00195a8b:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
uint remainingElementsCount_add
(int8 param_1,int8 param_2,int8 param_3,int param_4)
{
int8 uVar1;
int iVar2;
int1 auVar3 [16];
int local_3c;
int1 local_38 [16];
int local_24;
int8 local_20;
int8 local_18;
int8 local_10;
uint local_4;
local_24 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
local_38 = JS_GetPropertyUint32(param_1,param_2,param_3,0);
iVar2 = JS_IsException(local_38._0_8_,local_38._8_8_);
if (iVar2 == 0) {
iVar2 = JS_ToInt32Free(local_20,&local_3c,local_38._0_8_,local_38._8_8_);
uVar1 = local_20;
if (iVar2 == 0) {
local_3c = local_24 + local_3c;
auVar3 = js_int32(local_3c);
iVar2 = JS_SetPropertyUint32(uVar1,local_18,local_10,0,auVar3._0_8_,auVar3._8_8_);
if (iVar2 < 0) {
local_4 = 0xffffffff;
}
else {
local_4 = (uint)(local_3c == 0);
}
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
10,911 |
remainingElementsCount_add
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int remainingElementsCount_add(JSContext *ctx,
JSValue resolve_element_env,
int addend)
{
JSValue val;
int remainingElementsCount;
val = JS_GetPropertyUint32(ctx, resolve_element_env, 0);
if (JS_IsException(val))
return -1;
if (JS_ToInt32Free(ctx, &remainingElementsCount, val))
return -1;
remainingElementsCount += addend;
if (JS_SetPropertyUint32(ctx, resolve_element_env, 0,
js_int32(remainingElementsCount)) < 0)
return -1;
return (remainingElementsCount == 0);
}
|
O1
|
c
|
remainingElementsCount_add:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ecx, %ecx
callq 0x241b4
movq %rdx, %rcx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $0x6, %ecx
je 0x54df3
leaq 0x1c(%rsp), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x279c3
testl %eax, %eax
jne 0x54df3
addl 0x1c(%rsp), %ebx
movl %ebx, 0x1c(%rsp)
movq %rbx, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4000, %r9d # imm = 0x4000
callq 0x24d59
testl %eax, %eax
js 0x54df3
xorl %ebp, %ebp
testl %ebx, %ebx
sete %bpl
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
remainingElementsCount_add:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov ebx, ecx
mov r14, rdx
mov r15, rsi
mov r12, rdi
xor ecx, ecx
call JS_GetPropertyInt64
mov rcx, rdx
mov ebp, 0FFFFFFFFh
cmp ecx, 6
jz short loc_54DF3
lea rsi, [rsp+58h+var_3C]
mov rdi, r12
mov rdx, rax
call JS_ToInt32Free
test eax, eax
jnz short loc_54DF3
add ebx, [rsp+58h+var_3C]
mov [rsp+58h+var_3C], ebx
mov qword ptr [rsp+58h+var_38], rbx
mov qword ptr [rsp+58h+var_38+8], 0
movups xmm0, [rsp+58h+var_38]
movups [rsp+58h+var_58], xmm0
mov rdi, r12
mov rsi, r15
mov rdx, r14
xor ecx, ecx
xor r8d, r8d
mov r9d, 4000h
call JS_SetPropertyValue
test eax, eax
js short loc_54DF3
xor ebp, ebp
test ebx, ebx
setz bpl
loc_54DF3:
mov eax, ebp
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long remainingElementsCount_add(
long long a1,
unsigned long long a2,
unsigned long long a3,
int a4,
double a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
unsigned long long PropertyInt64; // rax
long long v15; // rdx
unsigned int v16; // ebp
double v17; // xmm4_8
double v18; // xmm5_8
double v19; // rbx
int v21; // [rsp+1Ch] [rbp-3Ch] BYREF
__int128 v22; // [rsp+20h] [rbp-38h]
PropertyInt64 = JS_GetPropertyInt64(a1, a2, a3, 0LL);
v16 = -1;
if ( (_DWORD)v15 != 6 && !(unsigned int)JS_ToInt32Free(a1, &v21, PropertyInt64, v15) )
{
*(_QWORD *)&v19 = (unsigned int)(v21 + a4);
v21 = LODWORD(v19);
v22 = *(unsigned long long *)&v19;
if ( (int)JS_SetPropertyValue(
a1,
a2,
a3,
0LL,
0LL,
0x4000u,
v19,
a6,
a7,
a8,
v17,
v18,
a11,
a12,
*(unsigned long long *)&v19) >= 0 )
return LODWORD(v19) == 0;
}
return v16;
}
|
remainingElementsCount_add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV EBX,ECX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
XOR ECX,ECX
CALL 0x001241b4
MOV RCX,RDX
MOV EBP,0xffffffff
CMP ECX,0x6
JZ 0x00154df3
LEA RSI,[RSP + 0x1c]
MOV RDI,R12
MOV RDX,RAX
CALL 0x001279c3
TEST EAX,EAX
JNZ 0x00154df3
ADD EBX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x1c],EBX
MOV qword ptr [RSP + 0x20],RBX
MOV qword ptr [RSP + 0x28],0x0
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x4000
CALL 0x00124d59
TEST EAX,EAX
JS 0x00154df3
XOR EBP,EBP
TEST EBX,EBX
SETZ BPL
LAB_00154df3:
MOV EAX,EBP
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong remainingElementsCount_add
(int8 param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
int1 auVar4 [12];
uint local_3c;
ulong local_38;
int8 uStack_30;
auVar4 = JS_GetPropertyInt64();
uVar3 = 0xffffffff;
if (auVar4._8_4_ != 6) {
iVar1 = JS_ToInt32Free(param_1,&local_3c,auVar4._0_8_);
if (iVar1 == 0) {
uVar2 = param_4 + local_3c;
local_38 = (ulong)uVar2;
uStack_30 = 0;
local_3c = uVar2;
iVar1 = JS_SetPropertyValue(param_1,param_2,param_3,0,0,0x4000,uVar2,0);
if (-1 < iVar1) {
uVar3 = (ulong)(uVar2 == 0);
}
}
}
return uVar3;
}
|
|
10,912 |
remainingElementsCount_add
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int remainingElementsCount_add(JSContext *ctx,
JSValue resolve_element_env,
int addend)
{
JSValue val;
int remainingElementsCount;
val = JS_GetPropertyUint32(ctx, resolve_element_env, 0);
if (JS_IsException(val))
return -1;
if (JS_ToInt32Free(ctx, &remainingElementsCount, val))
return -1;
remainingElementsCount += addend;
if (JS_SetPropertyUint32(ctx, resolve_element_env, 0,
js_int32(remainingElementsCount)) < 0)
return -1;
return (remainingElementsCount == 0);
}
|
O2
|
c
|
remainingElementsCount_add:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ecx, %ecx
callq 0x1e178
movq %rdx, %rcx
pushq $-0x1
popq %rbp
cmpl $0x6, %ecx
je 0x48c52
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x215e0
testl %eax, %eax
jne 0x48c52
addl 0xc(%rsp), %ebx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x1ece3
testl %eax, %eax
js 0x48c52
xorl %ebp, %ebp
testl %ebx, %ebx
sete %bpl
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
remainingElementsCount_add:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebx, ecx
mov r14, rdx
mov r15, rsi
mov r12, rdi
xor ecx, ecx
call JS_GetPropertyInt64
mov rcx, rdx
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp ecx, 6
jz short loc_48C52
lea rsi, [rsp+38h+var_2C]
mov rdi, r12
mov rdx, rax
call JS_ToInt32Free
test eax, eax
jnz short loc_48C52
add ebx, [rsp+38h+var_2C]
mov rdi, r12
mov rsi, r15
mov rdx, r14
xor ecx, ecx
mov r8, rbx
xor r9d, r9d
call JS_SetPropertyUint32
test eax, eax
js short loc_48C52
xor ebp, ebp
test ebx, ebx
setz bpl
loc_48C52:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long remainingElementsCount_add(long long a1, long long a2, int a3, int a4)
{
unsigned long long PropertyInt64; // rax
long long v7; // rdx
unsigned int v8; // ebp
long long v9; // rbx
_DWORD v11[11]; // [rsp+Ch] [rbp-2Ch] BYREF
PropertyInt64 = JS_GetPropertyInt64(a1, a2, a3, 0LL);
v8 = -1;
if ( (_DWORD)v7 != 6 && !(unsigned int)JS_ToInt32Free(a1, v11, PropertyInt64, v7) )
{
v9 = (unsigned int)(v11[0] + a4);
if ( (int)JS_SetPropertyUint32(a1, a2, a3, 0, v9, 0LL) >= 0 )
return (_DWORD)v9 == 0;
}
return v8;
}
|
remainingElementsCount_add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,ECX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
XOR ECX,ECX
CALL 0x0011e178
MOV RCX,RDX
PUSH -0x1
POP RBP
CMP ECX,0x6
JZ 0x00148c52
LEA RSI,[RSP + 0xc]
MOV RDI,R12
MOV RDX,RAX
CALL 0x001215e0
TEST EAX,EAX
JNZ 0x00148c52
ADD EBX,dword ptr [RSP + 0xc]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
XOR ECX,ECX
MOV R8,RBX
XOR R9D,R9D
CALL 0x0011ece3
TEST EAX,EAX
JS 0x00148c52
XOR EBP,EBP
TEST EBX,EBX
SETZ BPL
LAB_00148c52:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
uint remainingElementsCount_add
(int8 param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
uint uVar2;
int1 auVar3 [12];
int local_2c;
auVar3 = JS_GetPropertyInt64();
uVar2 = 0xffffffff;
if (auVar3._8_4_ != 6) {
iVar1 = JS_ToInt32Free(param_1,&local_2c,auVar3._0_8_);
if (iVar1 == 0) {
iVar1 = JS_SetPropertyUint32(param_1,param_2,param_3,0,param_4 + local_2c,0);
if (-1 < iVar1) {
uVar2 = (uint)(param_4 + local_2c == 0);
}
}
}
return uVar2;
}
|
|
10,913 |
remainingElementsCount_add
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int remainingElementsCount_add(JSContext *ctx,
JSValue resolve_element_env,
int addend)
{
JSValue val;
int remainingElementsCount;
val = JS_GetPropertyUint32(ctx, resolve_element_env, 0);
if (JS_IsException(val))
return -1;
if (JS_ToInt32Free(ctx, &remainingElementsCount, val))
return -1;
remainingElementsCount += addend;
if (JS_SetPropertyUint32(ctx, resolve_element_env, 0,
js_int32(remainingElementsCount)) < 0)
return -1;
return (remainingElementsCount == 0);
}
|
O3
|
c
|
remainingElementsCount_add:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ecx, %ecx
callq 0x24808
movq %rdx, %rcx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $0x6, %ecx
je 0x57d34
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x28044
testl %eax, %eax
jne 0x57d34
addl 0xc(%rsp), %ebx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
pushq $0x4000 # imm = 0x4000
pushq $0x0
callq 0x253af
addq $0x10, %rsp
testl %eax, %eax
js 0x57d34
xorl %ebp, %ebp
testl %ebx, %ebx
sete %bpl
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
remainingElementsCount_add:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebx, ecx
mov r14, rdx
mov r15, rsi
mov r12, rdi
xor ecx, ecx
call JS_GetPropertyInt64
mov rcx, rdx
mov ebp, 0FFFFFFFFh
cmp ecx, 6
jz short loc_57D34
lea rsi, [rsp+38h+var_2C]
mov rdi, r12
mov rdx, rax
call JS_ToInt32Free
test eax, eax
jnz short loc_57D34
add ebx, [rsp+38h+var_2C]
mov rdi, r12
mov rsi, r15
mov rdx, r14
xor ecx, ecx
xor r8d, r8d
mov r9, rbx
push 4000h
push 0
call JS_SetPropertyValue
add rsp, 10h
test eax, eax
js short loc_57D34
xor ebp, ebp
test ebx, ebx
setz bpl
loc_57D34:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long remainingElementsCount_add(
long long a1,
long long a2,
unsigned long long a3,
int a4,
double a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
unsigned long long PropertyInt64; // rax
long long v15; // rdx
unsigned int v16; // ebp
double v17; // xmm4_8
double v18; // xmm5_8
int *v19; // rbx
int v21[11]; // [rsp+Ch] [rbp-2Ch] BYREF
PropertyInt64 = JS_GetPropertyInt64(a1, a2, a3, 0LL);
v16 = -1;
if ( (_DWORD)v15 != 6 && !(unsigned int)JS_ToInt32Free(a1, v21, PropertyInt64, v15) )
{
v19 = (int *)(unsigned int)(v21[0] + a4);
if ( (int)JS_SetPropertyValue(a1, a2, a3, 0LL, 0LL, v19, a5, a6, a7, a8, v17, v18, a11, a12, 0LL, 0x4000u) >= 0 )
return (_DWORD)v19 == 0;
}
return v16;
}
|
remainingElementsCount_add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,ECX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
XOR ECX,ECX
CALL 0x00124808
MOV RCX,RDX
MOV EBP,0xffffffff
CMP ECX,0x6
JZ 0x00157d34
LEA RSI,[RSP + 0xc]
MOV RDI,R12
MOV RDX,RAX
CALL 0x00128044
TEST EAX,EAX
JNZ 0x00157d34
ADD EBX,dword ptr [RSP + 0xc]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
XOR ECX,ECX
XOR R8D,R8D
MOV R9,RBX
PUSH 0x4000
PUSH 0x0
CALL 0x001253af
ADD RSP,0x10
TEST EAX,EAX
JS 0x00157d34
XOR EBP,EBP
TEST EBX,EBX
SETZ BPL
LAB_00157d34:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong remainingElementsCount_add
(int8 param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
ulong uVar2;
int1 auVar3 [12];
int local_2c;
auVar3 = JS_GetPropertyInt64();
uVar2 = 0xffffffff;
if (auVar3._8_4_ != 6) {
iVar1 = JS_ToInt32Free(param_1,&local_2c,auVar3._0_8_);
if (iVar1 == 0) {
iVar1 = JS_SetPropertyValue(param_1,param_2,param_3,0,0,param_4 + local_2c,0,0x4000);
if (-1 < iVar1) {
uVar2 = (ulong)(param_4 + local_2c == 0);
}
}
}
return uVar2;
}
|
|
10,914 |
LefDefParser::lefwArrayCannotoccupyStr(char const*, double, double, char const*, double, double, double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwArrayCannotoccupyStr(const char *name,
double origX,
double origY,
const char *orient,
double numX,
double numY,
double spaceX,
double spaceY)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_ARRAY_START &&
lefwState != LEFW_ARRAY)
return LEFW_BAD_ORDER;
if (!name || name == 0 || *name == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*)
" CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n",
name, origX, origY, orient, numX, numY, spaceX, spaceY);
else
fprintf(lefwFile,
" CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n",
name, origX, origY, orient, numX, numY, spaceX, spaceY);
lefwLines++;
lefwHasArrayReq = 1;
lefwState = LEFW_ARRAY;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwArrayCannotoccupyStr(char const*, double, double, char const*, double, double, double, double):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movsd %xmm1, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm3, 0x10(%rsp)
movsd %xmm4, 0x8(%rsp)
movsd %xmm5, (%rsp)
leaq 0x15ec8(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x1cf4b
movl $0x1, 0x44(%rsp)
jmp 0x1d066
leaq 0x160fe(%rip), %rax # 0x33050
cmpl $0x2, (%rax)
je 0x1cf70
leaq 0x160f2(%rip), %rax # 0x33050
cmpl $0x13, (%rax)
je 0x1cf70
movl $0x2, 0x44(%rsp)
jmp 0x1d066
cmpq $0x0, 0x38(%rsp)
je 0x1cf8d
cmpq $0x0, 0x38(%rsp)
je 0x1cf8d
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1cf9a
movl $0x3, 0x44(%rsp)
jmp 0x1d066
cmpl $0x0, 0x1614b(%rip) # 0x330ec
je 0x1cfea
leaq 0x15e56(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x38(%rsp), %rdx
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movq 0x20(%rsp), %rcx
movsd 0x18(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movsd 0x8(%rsp), %xmm4
movsd (%rsp), %xmm5
leaq 0xe4a1(%rip), %rsi # 0x2b482
movb $0x6, %al
callq 0x289b0
jmp 0x1d02f
leaq 0x15e0f(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x38(%rsp), %rdx
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movq 0x20(%rsp), %rcx
movsd 0x18(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movsd 0x8(%rsp), %xmm4
movsd (%rsp), %xmm5
leaq 0xe45a(%rip), %rsi # 0x2b482
movb $0x6, %al
callq 0x1100
leaq 0x16016(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1600a(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0x16029(%rip), %rax # 0x33074
movl $0x1, (%rax)
leaq 0x15ff8(%rip), %rax # 0x33050
movl $0x13, (%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
|
_ZN12LefDefParser24lefwArrayCannotoccupyStrEPKcddS1_dddd:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
movsd [rsp+48h+var_18], xmm0
movsd [rsp+48h+var_20], xmm1
mov [rsp+48h+var_28], rsi
movsd [rsp+48h+var_30], xmm2
movsd [rsp+48h+var_38], xmm3
movsd [rsp+48h+var_40], xmm4
movsd [rsp+48h+var_48], xmm5
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_1CF4B
mov [rsp+48h+var_4], 1
jmp loc_1D066
loc_1CF4B:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 2
jz short loc_1CF70
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 13h
jz short loc_1CF70
mov [rsp+48h+var_4], 2
jmp loc_1D066
loc_1CF70:
cmp [rsp+48h+var_10], 0
jz short loc_1CF8D
cmp [rsp+48h+var_10], 0
jz short loc_1CF8D
mov rax, [rsp+48h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_1CF9A
loc_1CF8D:
mov [rsp+48h+var_4], 3
jmp loc_1D066
loc_1CF9A:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_1CFEA
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+48h+var_10]
movsd xmm0, [rsp+48h+var_18]
movsd xmm1, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_28]
movsd xmm2, [rsp+48h+var_30]
movsd xmm3, [rsp+48h+var_38]
movsd xmm4, [rsp+48h+var_40]
movsd xmm5, [rsp+48h+var_48]
lea rsi, aCannotoccupyS1; " CANNOTOCCUPY %s %.11g %.11g %s DO %."...
mov al, 6
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1D02F
loc_1CFEA:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+48h+var_10]
movsd xmm0, [rsp+48h+var_18]
movsd xmm1, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_28]
movsd xmm2, [rsp+48h+var_30]
movsd xmm3, [rsp+48h+var_38]
movsd xmm4, [rsp+48h+var_40]
movsd xmm5, [rsp+48h+var_48]
lea rsi, aCannotoccupyS1; " CANNOTOCCUPY %s %.11g %.11g %s DO %."...
mov al, 6
call _fprintf
loc_1D02F:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser15lefwHasArrayReqE; LefDefParser::lefwHasArrayReq
mov dword ptr [rax], 1
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 13h
mov [rsp+48h+var_4], 0
loc_1D066:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
|
long long LefDefParser::lefwArrayCannotoccupyStr(
LefDefParser *this,
const char *a2,
double a3,
double a4,
const char *a5,
double a6,
double a7,
double a8,
double a9,
long long a10,
int a11,
int a12)
{
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwState == 2 || LefDefParser::lefwState == 19 )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n",
(_DWORD)this,
(_DWORD)a2,
a11,
a12);
else
fprintf(
*(_QWORD *)&LefDefParser::lefwFile,
" CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n",
(const char *)this,
a3,
a4,
a2,
a6,
a7,
a8,
a9);
++LefDefParser::lefwLines;
LefDefParser::lefwHasArrayReq = 1;
LefDefParser::lefwState = 19;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwArrayCannotoccupyStr:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOVSD qword ptr [RSP + 0x30],XMM0
MOVSD qword ptr [RSP + 0x28],XMM1
MOV qword ptr [RSP + 0x20],RSI
MOVSD qword ptr [RSP + 0x18],XMM2
MOVSD qword ptr [RSP + 0x10],XMM3
MOVSD qword ptr [RSP + 0x8],XMM4
MOVSD qword ptr [RSP],XMM5
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x0011cf4b
MOV dword ptr [RSP + 0x44],0x1
JMP 0x0011d066
LAB_0011cf4b:
LEA RAX,[0x133050]
CMP dword ptr [RAX],0x2
JZ 0x0011cf70
LEA RAX,[0x133050]
CMP dword ptr [RAX],0x13
JZ 0x0011cf70
MOV dword ptr [RSP + 0x44],0x2
JMP 0x0011d066
LAB_0011cf70:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0011cf8d
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0011cf8d
MOV RAX,qword ptr [RSP + 0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0011cf9a
LAB_0011cf8d:
MOV dword ptr [RSP + 0x44],0x3
JMP 0x0011d066
LAB_0011cf9a:
CMP dword ptr [0x001330ec],0x0
JZ 0x0011cfea
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x38]
MOVSD XMM0,qword ptr [RSP + 0x30]
MOVSD XMM1,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOVSD XMM2,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVSD XMM5,qword ptr [RSP]
LEA RSI,[0x12b482]
MOV AL,0x6
CALL 0x001289b0
JMP 0x0011d02f
LAB_0011cfea:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x38]
MOVSD XMM0,qword ptr [RSP + 0x30]
MOVSD XMM1,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOVSD XMM2,qword ptr [RSP + 0x18]
MOVSD XMM3,qword ptr [RSP + 0x10]
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVSD XMM5,qword ptr [RSP]
LEA RSI,[0x12b482]
MOV AL,0x6
CALL 0x00101100
LAB_0011d02f:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x133074]
MOV dword ptr [RAX],0x1
LEA RAX,[0x133050]
MOV dword ptr [RAX],0x13
MOV dword ptr [RSP + 0x44],0x0
LAB_0011d066:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
/* LefDefParser::lefwArrayCannotoccupyStr(char const*, double, double, char const*, double, double,
double, double) */
int4
LefDefParser::lefwArrayCannotoccupyStr
(char *param_1,double param_2,double param_3,char *param_4,double param_5,double param_6,
double param_7,double param_8)
{
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if ((lefwState == 2) || (lefwState == 0x13)) {
if ((param_1 == (char *)0x0) || ((param_1 == (char *)0x0 || (*param_1 == '\0')))) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n",
param_2,param_3,param_5,param_6,param_7,param_8,param_1,param_4);
}
else {
encPrint(lefwFile," CANNOTOCCUPY %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n"
,param_2,param_3,param_5,param_6,param_7,param_8,param_1,param_4);
}
lefwLines = lefwLines + 1;
lefwHasArrayReq = 1;
lefwState = 0x13;
local_4 = 0;
}
}
else {
local_4 = 2;
}
return local_4;
}
|
|
10,915 |
my_uca_coll_init_utf8mb4
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb4,
&my_uca_package_no_contractions_utf8mb4);
return FALSE;
}
|
O0
|
c
|
my_uca_coll_init_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x41db0
cmpb $0x0, %al
je 0x44627
movb $0x1, -0x1(%rbp)
jmp 0x4464f
movq -0x10(%rbp), %rdi
callq 0x4dda0
cmpb $0x0, %al
je 0x4464b
movq -0x10(%rbp), %rdi
leaq 0x1b8591(%rip), %rsi # 0x1fcbd0
leaq 0x1b85aa(%rip), %rdx # 0x1fcbf0
callq 0x4de00
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_uca_coll_init_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_coll_init_uca
cmp al, 0
jz short loc_44627
mov [rbp+var_1], 1
jmp short loc_4464F
loc_44627:
mov rdi, [rbp+var_10]
call my_uca_collation_can_optimize_no_contractions
cmp al, 0
jz short loc_4464B
mov rdi, [rbp+var_10]
lea rsi, my_uca_package_utf8mb4
lea rdx, my_uca_package_no_contractions_utf8mb4
call my_uca_handler_map
loc_4464B:
mov [rbp+var_1], 0
loc_4464F:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_uca_coll_init_utf8mb4(long long a1, long long a2)
{
if ( (unsigned __int8)my_coll_init_uca(a1, a2) )
return 1;
if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) )
my_uca_handler_map(a1, my_uca_package_utf8mb4, my_uca_package_no_contractions_utf8mb4);
return 0;
}
|
my_uca_coll_init_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00141db0
CMP AL,0x0
JZ 0x00144627
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014464f
LAB_00144627:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014dda0
CMP AL,0x0
JZ 0x0014464b
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x2fcbd0]
LEA RDX,[0x2fcbf0]
CALL 0x0014de00
LAB_0014464b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014464f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_uca_coll_init_utf8mb4(int8 param_1,int8 param_2)
{
char cVar1;
int1 local_9;
cVar1 = my_coll_init_uca(param_1,param_2);
if (cVar1 == '\0') {
cVar1 = my_uca_collation_can_optimize_no_contractions(param_1);
if (cVar1 != '\0') {
my_uca_handler_map(param_1,my_uca_package_utf8mb4,my_uca_package_no_contractions_utf8mb4);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
10,916 |
composition_source
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
|
static void composition_source(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha)
{
if(const_alpha == 255) {
memcpy(dest, src, length * sizeof(uint32_t));
} else {
uint32_t ialpha = 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = INTERPOLATE_PIXEL(src[i], const_alpha, dest[i], ialpha);
}
}
}
|
O1
|
c
|
composition_source:
cmpl $0xff, %ecx
jne 0x4141e
movslq %esi, %rax
shlq $0x2, %rax
movq %rdx, %rsi
movq %rax, %rdx
jmp 0xa2a0
testl %esi, %esi
jle 0x414b6
pushq %rbp
pushq %r14
pushq %rbx
movl $0xff, %eax
subl %ecx, %eax
movl %esi, %esi
xorl %r8d, %r8d
movl $0xff00ff, %r9d # imm = 0xFF00FF
movl $0x800080, %r10d # imm = 0x800080
movl (%rdx,%r8,4), %ebp
movl (%rdi,%r8,4), %r11d
movl %ebp, %r14d
andl %r9d, %r14d
imull %ecx, %r14d
movl %r11d, %ebx
andl %r9d, %ebx
imull %eax, %ebx
addl %r14d, %ebx
movl %ebx, %r14d
shrl $0x8, %r14d
andl %r9d, %r14d
addl %r10d, %ebx
addl %r14d, %ebx
shrl $0x8, %ebx
andl %r9d, %ebx
shrl $0x8, %ebp
andl %r9d, %ebp
imull %ecx, %ebp
shrl $0x8, %r11d
andl %r9d, %r11d
imull %eax, %r11d
addl %ebp, %r11d
movl %r11d, %ebp
shrl $0x8, %ebp
andl %r9d, %ebp
addl %r10d, %r11d
addl %ebp, %r11d
andl $0xff00ff00, %r11d # imm = 0xFF00FF00
orl %ebx, %r11d
movl %r11d, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rsi
jne 0x41442
popq %rbx
popq %r14
popq %rbp
retq
|
composition_source:
cmp ecx, 0FFh
jnz short loc_4141E
movsxd rax, esi
shl rax, 2
mov rsi, rdx
mov rdx, rax
jmp _memcpy
loc_4141E:
test esi, esi
jle locret_414B6
push rbp
push r14
push rbx
mov eax, 0FFh
sub eax, ecx
mov esi, esi
xor r8d, r8d
mov r9d, 0FF00FFh
mov r10d, 800080h
loc_41442:
mov ebp, [rdx+r8*4]
mov r11d, [rdi+r8*4]
mov r14d, ebp
and r14d, r9d
imul r14d, ecx
mov ebx, r11d
and ebx, r9d
imul ebx, eax
add ebx, r14d
mov r14d, ebx
shr r14d, 8
and r14d, r9d
add ebx, r10d
add ebx, r14d
shr ebx, 8
and ebx, r9d
shr ebp, 8
and ebp, r9d
imul ebp, ecx
shr r11d, 8
and r11d, r9d
imul r11d, eax
add r11d, ebp
mov ebp, r11d
shr ebp, 8
and ebp, r9d
add r11d, r10d
add r11d, ebp
and r11d, 0FF00FF00h
or r11d, ebx
mov [rdi+r8*4], r11d
inc r8
cmp rsi, r8
jnz short loc_41442
pop rbx
pop r14
pop rbp
locret_414B6:
retn
|
void composition_source(long long a1, int a2, long long a3, int a4)
{
int v4; // eax
long long i; // r8
if ( a4 == 255 )
{
memcpy(a1, a3, 4LL * a2);
}
else if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
{
v4 = 255 - a4;
*(_DWORD *)(a1 + 4 * i) = (((((a4 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF)
+ v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ a4 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF)
+ v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF | ((((a4 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF)
+ v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ a4 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF)
+ v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00;
}
}
}
|
composition_source:
CMP ECX,0xff
JNZ 0x0014141e
MOVSXD RAX,ESI
SHL RAX,0x2
MOV RSI,RDX
MOV RDX,RAX
JMP 0x0010a2a0
LAB_0014141e:
TEST ESI,ESI
JLE 0x001414b6
PUSH RBP
PUSH R14
PUSH RBX
MOV EAX,0xff
SUB EAX,ECX
MOV ESI,ESI
XOR R8D,R8D
MOV R9D,0xff00ff
MOV R10D,0x800080
LAB_00141442:
MOV EBP,dword ptr [RDX + R8*0x4]
MOV R11D,dword ptr [RDI + R8*0x4]
MOV R14D,EBP
AND R14D,R9D
IMUL R14D,ECX
MOV EBX,R11D
AND EBX,R9D
IMUL EBX,EAX
ADD EBX,R14D
MOV R14D,EBX
SHR R14D,0x8
AND R14D,R9D
ADD EBX,R10D
ADD EBX,R14D
SHR EBX,0x8
AND EBX,R9D
SHR EBP,0x8
AND EBP,R9D
IMUL EBP,ECX
SHR R11D,0x8
AND R11D,R9D
IMUL R11D,EAX
ADD R11D,EBP
MOV EBP,R11D
SHR EBP,0x8
AND EBP,R9D
ADD R11D,R10D
ADD R11D,EBP
AND R11D,0xff00ff00
OR R11D,EBX
MOV dword ptr [RDI + R8*0x4],R11D
INC R8
CMP RSI,R8
JNZ 0x00141442
POP RBX
POP R14
POP RBP
LAB_001414b6:
RET
|
void composition_source(void *param_1,uint param_2,void *param_3,int param_4)
{
uint uVar1;
uint uVar2;
ulong uVar3;
uint uVar4;
if (param_4 != 0xff) {
if (0 < (int)param_2) {
uVar3 = 0;
do {
uVar4 = *(uint *)((long)param_3 + uVar3 * 4);
uVar1 = *(uint *)((long)param_1 + uVar3 * 4);
uVar2 = (uVar1 & 0xff00ff) * (0xff - param_4) + (uVar4 & 0xff00ff) * param_4;
uVar4 = (uVar1 >> 8 & 0xff00ff) * (0xff - param_4) + (uVar4 >> 8 & 0xff00ff) * param_4;
*(uint *)((long)param_1 + uVar3 * 4) =
uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) & 0xff00ff00 |
uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff;
uVar3 = uVar3 + 1;
} while (param_2 != uVar3);
}
return;
}
memcpy(param_1,param_3,(long)(int)param_2 << 2);
return;
}
|
|
10,917 |
mp_sqrtrem2
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t mp_sqrtrem2(limb_t *tabs, limb_t *taba)
{
limb_t s1, r1, s, q, u, a0, a1;
dlimb_t r, num;
int l;
a0 = taba[0];
a1 = taba[1];
s1 = mp_sqrtrem1(&r1, a1);
l = LIMB_BITS / 2;
num = ((dlimb_t)r1 << l) | (a0 >> l);
q = num / (2 * s1);
u = num % (2 * s1);
s = (s1 << l) + q;
r = ((dlimb_t)u << l) | (a0 & (((limb_t)1 << l) - 1));
if (unlikely((q >> l) != 0))
r -= (dlimb_t)1 << LIMB_BITS; /* special case when q=2^l */
else
r -= q * q;
if ((slimb_t)(r >> LIMB_BITS) < 0) {
s--;
r += 2 * (dlimb_t)s + 1;
}
tabs[0] = s;
taba[0] = r;
return r >> LIMB_BITS;
}
|
O1
|
c
|
mp_sqrtrem2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq (%rsi), %r14
movq 0x8(%rsi), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8712d
movq %rax, %r12
movq (%r15), %r13
movq %r13, %r15
shrq $0x20, %r15
shldq $0x20, %r14, %r13
leaq (%rax,%rax), %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x9a920
movq %rax, %rcx
movq %rdx, %rsi
imulq %rbp, %rsi
mulq %rbp
addq %rsi, %rdx
subq %rax, %r13
sbbq %rdx, %r15
shlq $0x20, %r12
shldq $0x20, %r13, %r15
shlq $0x20, %r13
movl %r14d, %eax
orq %r13, %rax
movq %rcx, %rdx
shrq $0x20, %rdx
jne 0x904ab
movq %rcx, %rdx
imulq %rcx, %rdx
subq %rdx, %rax
sbbq $0x0, %r15
addq %rcx, %r12
testq %r15, %r15
jns 0x9048e
leaq -0x1(%r12), %rcx
leaq -0x1(,%r12,2), %rdx
movq %rcx, %r12
shrq $0x3f, %rcx
addq %rdx, %rax
adcq %rcx, %r15
movq 0x8(%rsp), %rcx
movq %r12, (%rcx)
movq %rax, (%rbx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decq %r15
jmp 0x9046c
|
mp_sqrtrem2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov [rsp+48h+var_40], rdi
mov r14, [rsi]
mov rsi, [rsi+8]
lea r15, [rsp+48h+var_38]
mov rdi, r15
call mp_sqrtrem1
mov r12, rax
mov r13, [r15]
mov r15, r13
shr r15, 20h
shld r13, r14, 20h
lea rbp, [rax+rax]
mov rdi, r13
mov rsi, r15
mov rdx, rbp
xor ecx, ecx
call __udivti3
mov rcx, rax
mov rsi, rdx
imul rsi, rbp
mul rbp
add rdx, rsi
sub r13, rax
sbb r15, rdx
shl r12, 20h
shld r15, r13, 20h
shl r13, 20h
mov eax, r14d
or rax, r13
mov rdx, rcx
shr rdx, 20h
jnz short loc_904AB
mov rdx, rcx
imul rdx, rcx
sub rax, rdx
sbb r15, 0
loc_9046C:
add r12, rcx
test r15, r15
jns short loc_9048E
lea rcx, [r12-1]
lea rdx, ds:0FFFFFFFFFFFFFFFFh[r12*2]
mov r12, rcx
shr rcx, 3Fh
add rax, rdx
adc r15, rcx
loc_9048E:
mov rcx, [rsp+48h+var_40]
mov [rcx], r12
mov [rbx], rax
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_904AB:
dec r15
jmp short loc_9046C
|
long long mp_sqrtrem2(unsigned long long *a1, unsigned long long *a2)
{
unsigned long long v3; // r14
unsigned long long v4; // r12
unsigned long long v5; // r15
__int128 v6; // rt0
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rsi
unsigned __int128 v10; // rax
unsigned long long v11; // r12
unsigned long long v12; // r15
unsigned long long v13; // rax
long long v14; // r15
unsigned long long v15; // r12
long long v16; // rdx
unsigned long long v18[7]; // [rsp+10h] [rbp-38h] BYREF
v3 = *a2;
v4 = mp_sqrtrem1(v18, a2[1]);
v5 = HIDWORD(v18[0]);
*((_QWORD *)&v6 + 1) = v18[0];
*(_QWORD *)&v6 = v3;
v7 = _udivti3(v6 >> 32, HIDWORD(v18[0]), 2 * v4, 0LL);
v9 = 2 * v4 * v8;
v10 = 2 * v4 * (unsigned __int128)v7;
*((_QWORD *)&v10 + 1) += v9;
v11 = v4 << 32;
v12 = (__int128)(__PAIR128__(v5, v6 >> 32) - v10) >> 32;
v13 = (((unsigned long long)(v6 >> 32) - (_QWORD)v10) << 32) | (unsigned int)v3;
if ( HIDWORD(v7) )
{
v14 = v12 - 1;
}
else
{
v14 = (__PAIR128__(v12, v13) - v7 * v7) >> 64;
v13 -= v7 * v7;
}
v15 = v7 + v11;
if ( v14 < 0 )
{
v16 = 2 * v15-- - 1;
v14 = (__PAIR128__(v14, v16) + __PAIR128__(v15 >> 63, v13)) >> 64;
v13 += v16;
}
*a1 = v15;
*a2 = v13;
return v14;
}
|
mp_sqrtrem2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV qword ptr [RSP + 0x8],RDI
MOV R14,qword ptr [RSI]
MOV RSI,qword ptr [RSI + 0x8]
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x0018712d
MOV R12,RAX
MOV R13,qword ptr [R15]
MOV R15,R13
SHR R15,0x20
SHLD R13,R14,0x20
LEA RBP,[RAX + RAX*0x1]
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBP
XOR ECX,ECX
CALL 0x0019a920
MOV RCX,RAX
MOV RSI,RDX
IMUL RSI,RBP
MUL RBP
ADD RDX,RSI
SUB R13,RAX
SBB R15,RDX
SHL R12,0x20
SHLD R15,R13,0x20
SHL R13,0x20
MOV EAX,R14D
OR RAX,R13
MOV RDX,RCX
SHR RDX,0x20
JNZ 0x001904ab
MOV RDX,RCX
IMUL RDX,RCX
SUB RAX,RDX
SBB R15,0x0
LAB_0019046c:
ADD R12,RCX
TEST R15,R15
JNS 0x0019048e
LEA RCX,[R12 + -0x1]
LEA RDX,[-0x1 + R12*0x2]
MOV R12,RCX
SHR RCX,0x3f
ADD RAX,RDX
ADC R15,RCX
LAB_0019048e:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RCX],R12
MOV qword ptr [RBX],RAX
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001904ab:
DEC R15
JMP 0x0019046c
|
long mp_sqrtrem2(long *param_1,ulong *param_2)
{
int1 auVar1 [16];
int1 auVar2 [16];
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
long lVar11;
bool bVar12;
int1 auVar13 [16];
ulong local_38;
uVar6 = *param_2;
lVar3 = mp_sqrtrem1(&local_38,param_2[1]);
uVar8 = local_38 << 0x20 | uVar6 >> 0x20;
uVar10 = lVar3 * 2;
auVar13 = __udivti3(uVar8,local_38 >> 0x20,uVar10,0);
uVar4 = auVar13._0_8_;
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar4;
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar10;
uVar5 = SUB168(auVar1 * auVar2,0);
uVar9 = uVar8 - uVar5;
uVar10 = ((local_38 >> 0x20) - (SUB168(auVar1 * auVar2,8) + auVar13._8_8_ * uVar10)) -
(ulong)(uVar8 < uVar5) << 0x20 | uVar9 >> 0x20;
uVar6 = uVar6 & 0xffffffff | uVar9 << 0x20;
if (uVar4 >> 0x20 == 0) {
bVar12 = uVar6 < uVar4 * uVar4;
uVar6 = uVar6 - uVar4 * uVar4;
lVar11 = uVar10 - bVar12;
}
else {
lVar11 = uVar10 - 1;
}
lVar7 = (lVar3 << 0x20) + uVar4;
lVar3 = lVar7;
if (lVar11 < 0) {
lVar3 = lVar7 + -1;
uVar10 = lVar7 * 2 - 1;
bVar12 = CARRY8(uVar6,uVar10);
uVar6 = uVar6 + uVar10;
lVar11 = (lVar11 - (lVar3 >> 0x3f)) + (ulong)bVar12;
}
*param_1 = lVar3;
*param_2 = uVar6;
return lVar11;
}
|
|
10,918 |
mp_sqrtrem2
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t mp_sqrtrem2(limb_t *tabs, limb_t *taba)
{
limb_t s1, r1, s, q, u, a0, a1;
dlimb_t r, num;
int l;
a0 = taba[0];
a1 = taba[1];
s1 = mp_sqrtrem1(&r1, a1);
l = LIMB_BITS / 2;
num = ((dlimb_t)r1 << l) | (a0 >> l);
q = num / (2 * s1);
u = num % (2 * s1);
s = (s1 << l) + q;
r = ((dlimb_t)u << l) | (a0 & (((limb_t)1 << l) - 1));
if (unlikely((q >> l) != 0))
r -= (dlimb_t)1 << LIMB_BITS; /* special case when q=2^l */
else
r -= q * q;
if ((slimb_t)(r >> LIMB_BITS) < 0) {
s--;
r += 2 * (dlimb_t)s + 1;
}
tabs[0] = s;
taba[0] = r;
return r >> LIMB_BITS;
}
|
O2
|
c
|
mp_sqrtrem2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq (%rsi), %r14
movq 0x8(%rsi), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x71515
movq %rax, %r12
movq (%r15), %r13
movq %r13, %r15
shrq $0x20, %r15
shldq $0x20, %r14, %r13
leaq (%rax,%rax), %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x81150
movq %rax, %rcx
movq %rdx, %rsi
imulq %rbp, %rsi
mulq %rbp
addq %rsi, %rdx
subq %rax, %r13
sbbq %rdx, %r15
shlq $0x20, %r12
shldq $0x20, %r13, %r15
shlq $0x20, %r13
movl %r14d, %eax
orq %r13, %rax
movq %rcx, %rdx
shrq $0x20, %rdx
jne 0x7853c
movq %rcx, %rdx
imulq %rcx, %rdx
subq %rdx, %rax
sbbq $0x0, %r15
addq %rcx, %r12
testq %r15, %r15
jns 0x7851f
leaq -0x1(%r12), %rcx
leaq -0x1(,%r12,2), %rdx
movq %rcx, %r12
shrq $0x3f, %rcx
addq %rdx, %rax
adcq %rcx, %r15
movq 0x8(%rsp), %rcx
movq %r12, (%rcx)
movq %rax, (%rbx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decq %r15
jmp 0x784fd
|
mp_sqrtrem2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov [rsp+48h+var_40], rdi
mov r14, [rsi]
mov rsi, [rsi+8]
lea r15, [rsp+48h+var_38]
mov rdi, r15
call mp_sqrtrem1
mov r12, rax
mov r13, [r15]
mov r15, r13
shr r15, 20h
shld r13, r14, 20h
lea rbp, [rax+rax]
mov rdi, r13
mov rsi, r15
mov rdx, rbp
xor ecx, ecx
call __udivti3
mov rcx, rax
mov rsi, rdx
imul rsi, rbp
mul rbp
add rdx, rsi
sub r13, rax
sbb r15, rdx
shl r12, 20h
shld r15, r13, 20h
shl r13, 20h
mov eax, r14d
or rax, r13
mov rdx, rcx
shr rdx, 20h
jnz short loc_7853C
mov rdx, rcx
imul rdx, rcx
sub rax, rdx
sbb r15, 0
loc_784FD:
add r12, rcx
test r15, r15
jns short loc_7851F
lea rcx, [r12-1]
lea rdx, ds:0FFFFFFFFFFFFFFFFh[r12*2]
mov r12, rcx
shr rcx, 3Fh
add rax, rdx
adc r15, rcx
loc_7851F:
mov rcx, [rsp+48h+var_40]
mov [rcx], r12
mov [rbx], rax
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7853C:
dec r15
jmp short loc_784FD
|
long long mp_sqrtrem2(unsigned long long *a1, unsigned long long *a2)
{
unsigned long long v3; // r14
unsigned long long v4; // r12
unsigned long long v5; // r15
__int128 v6; // rt0
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rsi
unsigned __int128 v10; // rax
unsigned long long v11; // r12
unsigned long long v12; // r15
unsigned long long v13; // rax
long long v14; // r15
unsigned long long v15; // r12
long long v16; // rdx
unsigned long long v18[7]; // [rsp+10h] [rbp-38h] BYREF
v3 = *a2;
v4 = mp_sqrtrem1(v18, a2[1]);
v5 = HIDWORD(v18[0]);
*((_QWORD *)&v6 + 1) = v18[0];
*(_QWORD *)&v6 = v3;
v7 = _udivti3(v6 >> 32, HIDWORD(v18[0]), 2 * v4, 0LL);
v9 = 2 * v4 * v8;
v10 = 2 * v4 * (unsigned __int128)v7;
*((_QWORD *)&v10 + 1) += v9;
v11 = v4 << 32;
v12 = (__int128)(__PAIR128__(v5, v6 >> 32) - v10) >> 32;
v13 = (((unsigned long long)(v6 >> 32) - (_QWORD)v10) << 32) | (unsigned int)v3;
if ( HIDWORD(v7) )
{
v14 = v12 - 1;
}
else
{
v14 = (__PAIR128__(v12, v13) - v7 * v7) >> 64;
v13 -= v7 * v7;
}
v15 = v7 + v11;
if ( v14 < 0 )
{
v16 = 2 * v15-- - 1;
v14 = (__PAIR128__(v14, v16) + __PAIR128__(v15 >> 63, v13)) >> 64;
v13 += v16;
}
*a1 = v15;
*a2 = v13;
return v14;
}
|
mp_sqrtrem2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV qword ptr [RSP + 0x8],RDI
MOV R14,qword ptr [RSI]
MOV RSI,qword ptr [RSI + 0x8]
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00171515
MOV R12,RAX
MOV R13,qword ptr [R15]
MOV R15,R13
SHR R15,0x20
SHLD R13,R14,0x20
LEA RBP,[RAX + RAX*0x1]
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBP
XOR ECX,ECX
CALL 0x00181150
MOV RCX,RAX
MOV RSI,RDX
IMUL RSI,RBP
MUL RBP
ADD RDX,RSI
SUB R13,RAX
SBB R15,RDX
SHL R12,0x20
SHLD R15,R13,0x20
SHL R13,0x20
MOV EAX,R14D
OR RAX,R13
MOV RDX,RCX
SHR RDX,0x20
JNZ 0x0017853c
MOV RDX,RCX
IMUL RDX,RCX
SUB RAX,RDX
SBB R15,0x0
LAB_001784fd:
ADD R12,RCX
TEST R15,R15
JNS 0x0017851f
LEA RCX,[R12 + -0x1]
LEA RDX,[-0x1 + R12*0x2]
MOV R12,RCX
SHR RCX,0x3f
ADD RAX,RDX
ADC R15,RCX
LAB_0017851f:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RCX],R12
MOV qword ptr [RBX],RAX
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017853c:
DEC R15
JMP 0x001784fd
|
long mp_sqrtrem2(long *param_1,ulong *param_2)
{
int1 auVar1 [16];
int1 auVar2 [16];
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
long lVar11;
bool bVar12;
int1 auVar13 [16];
ulong local_38;
uVar6 = *param_2;
lVar3 = mp_sqrtrem1(&local_38,param_2[1]);
uVar8 = local_38 << 0x20 | uVar6 >> 0x20;
uVar10 = lVar3 * 2;
auVar13 = __udivti3(uVar8,local_38 >> 0x20,uVar10,0);
uVar4 = auVar13._0_8_;
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar4;
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar10;
uVar5 = SUB168(auVar1 * auVar2,0);
uVar9 = uVar8 - uVar5;
uVar10 = ((local_38 >> 0x20) - (SUB168(auVar1 * auVar2,8) + auVar13._8_8_ * uVar10)) -
(ulong)(uVar8 < uVar5) << 0x20 | uVar9 >> 0x20;
uVar6 = uVar6 & 0xffffffff | uVar9 << 0x20;
if (uVar4 >> 0x20 == 0) {
bVar12 = uVar6 < uVar4 * uVar4;
uVar6 = uVar6 - uVar4 * uVar4;
lVar11 = uVar10 - bVar12;
}
else {
lVar11 = uVar10 - 1;
}
lVar7 = (lVar3 << 0x20) + uVar4;
lVar3 = lVar7;
if (lVar11 < 0) {
lVar3 = lVar7 + -1;
uVar10 = lVar7 * 2 - 1;
bVar12 = CARRY8(uVar6,uVar10);
uVar6 = uVar6 + uVar10;
lVar11 = (lVar11 - (lVar3 >> 0x3f)) + (ulong)bVar12;
}
*param_1 = lVar3;
*param_2 = uVar6;
return lVar11;
}
|
|
10,919 |
js_init_module_bjson
|
bluesky950520[P]quickjs/quickjs-libc.c
|
JSModuleDef *js_init_module_bjson(JSContext *ctx, const char *module_name)
{
JSModuleDef *m;
m = JS_NewCModule(ctx, module_name, js_bjson_init);
if (!m)
return NULL;
JS_AddModuleExportList(ctx, m, js_bjson_funcs, countof(js_bjson_funcs));
return m;
}
|
O0
|
c
|
js_init_module_bjson:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x51(%rip), %rdx # 0x12690
callq 0x49520
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1265c
movq $0x0, 0x20(%rsp)
jmp 0x12681
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x11dfd3(%rip), %rdx # 0x130640
movl $0xa, %ecx
callq 0x4d300
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
js_init_module_bjson:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
lea rdx, js_bjson_init
call JS_NewCModule
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jnz short loc_1265C
mov [rsp+28h+var_8], 0
jmp short loc_12681
loc_1265C:
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_20]
lea rdx, js_bjson_funcs
mov ecx, 0Ah
call JS_AddModuleExportList
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_8], rax
loc_12681:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long js_init_module_bjson(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-20h]
v3 = JS_NewCModule(a1, a2, js_bjson_init);
if ( !v3 )
return 0LL;
JS_AddModuleExportList(a1, v3, &js_bjson_funcs, 10LL);
return v3;
}
|
js_init_module_bjson:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
LEA RDX,[0x112690]
CALL 0x00149520
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x0011265c
MOV qword ptr [RSP + 0x20],0x0
JMP 0x00112681
LAB_0011265c:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
LEA RDX,[0x230640]
MOV ECX,0xa
CALL 0x0014d300
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_00112681:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
long js_init_module_bjson(int8 param_1,int8 param_2)
{
long local_8;
local_8 = JS_NewCModule(param_1,param_2,js_bjson_init);
if (local_8 == 0) {
local_8 = 0;
}
else {
JS_AddModuleExportList(param_1,local_8,js_bjson_funcs,10);
}
return local_8;
}
|
|
10,920 |
js_init_module_bjson
|
bluesky950520[P]quickjs/quickjs-libc.c
|
JSModuleDef *js_init_module_bjson(JSContext *ctx, const char *module_name)
{
JSModuleDef *m;
m = JS_NewCModule(ctx, module_name, js_bjson_init);
if (!m)
return NULL;
JS_AddModuleExportList(ctx, m, js_bjson_funcs, countof(js_bjson_funcs));
return m;
}
|
O1
|
c
|
js_init_module_bjson:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x33(%rip), %rdx # 0x15d66
callq 0x30853
testq %rax, %rax
je 0x15d59
movq %rax, %rbx
leaq 0xb17a9(%rip), %rdx # 0xc74f0
movq %r14, %rdi
movq %rax, %rsi
movl $0xa, %ecx
callq 0x33050
jmp 0x15d5b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_init_module_bjson:
push r14
push rbx
push rax
mov r14, rdi
lea rdx, js_bjson_init
call JS_NewCModule
test rax, rax
jz short loc_15D59
mov rbx, rax
lea rdx, js_bjson_funcs
mov rdi, r14
mov rsi, rax
mov ecx, 0Ah
call JS_AddModuleExportList
jmp short loc_15D5B
loc_15D59:
xor ebx, ebx
loc_15D5B:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long js_init_module_bjson(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
v2 = JS_NewCModule(a1, a2, js_bjson_init);
if ( !v2 )
return 0LL;
v3 = v2;
JS_AddModuleExportList(a1, v2, &js_bjson_funcs, 10LL);
return v3;
}
| |||
10,921 |
js_init_module_bjson
|
bluesky950520[P]quickjs/quickjs-libc.c
|
JSModuleDef *js_init_module_bjson(JSContext *ctx, const char *module_name)
{
JSModuleDef *m;
m = JS_NewCModule(ctx, module_name, js_bjson_init);
if (!m)
return NULL;
JS_AddModuleExportList(ctx, m, js_bjson_funcs, countof(js_bjson_funcs));
return m;
}
|
O2
|
c
|
js_init_module_bjson:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2d(%rip), %rdx # 0x10c1b
callq 0x28e4b
movq %rax, %r14
testq %rax, %rax
je 0x10c10
leaq 0xa496e(%rip), %rdx # 0xb5570
pushq $0xa
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c74a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_init_module_bjson:
push r14
push rbx
push rax
mov rbx, rdi
lea rdx, js_bjson_init
call JS_NewCModule
mov r14, rax
test rax, rax
jz short loc_10C10
lea rdx, js_bjson_funcs
push 0Ah
pop rcx
mov rdi, rbx
mov rsi, r14
call JS_AddModuleExportList
loc_10C10:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
|
long long js_init_module_bjson(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r14
v2 = JS_NewCModule(a1, a2, js_bjson_init);
v3 = v2;
if ( v2 )
JS_AddModuleExportList(a1, v2, &js_bjson_funcs, 10LL);
return v3;
}
|
js_init_module_bjson:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RDX,[0x110c1b]
CALL 0x00128e4b
MOV R14,RAX
TEST RAX,RAX
JZ 0x00110c10
LEA RDX,[0x1b5570]
PUSH 0xa
POP RCX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012c74a
LAB_00110c10:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
long js_init_module_bjson(int8 param_1,int8 param_2)
{
long lVar1;
lVar1 = JS_NewCModule(param_1,param_2,js_bjson_init);
if (lVar1 != 0) {
JS_AddModuleExportList(param_1,lVar1,js_bjson_funcs,10);
}
return lVar1;
}
|
|
10,922 |
ma_tls_end
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
void ma_tls_end()
{
if (ma_tls_initialized)
{
pthread_mutex_lock(&LOCK_openssl_config);
#ifndef HAVE_OPENSSL_1_1_API
if (LOCK_crypto)
{
int i;
CRYPTO_set_locking_callback(NULL);
CRYPTO_THREADID_set_callback(NULL);
for (i=0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&LOCK_crypto[i]);
ma_free((gptr)LOCK_crypto);
LOCK_crypto= NULL;
}
#endif
if (mariadb_deinitialize_ssl)
{
#ifndef HAVE_OPENSSL_1_1_API
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
CONF_modules_free();
CONF_modules_unload(1);
#endif
}
ma_tls_initialized= FALSE;
pthread_mutex_unlock(&LOCK_openssl_config);
pthread_mutex_destroy(&LOCK_openssl_config);
}
return;
}
|
O3
|
c
|
ma_tls_end:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x23372(%rip), %r14 # 0x4e1c0
cmpb $0x0, (%r14)
je 0x2ae7b
leaq 0x24c45(%rip), %rbx # 0x4faa0
movq %rbx, %rdi
callq 0x136a0
movb $0x0, (%r14)
movq %rbx, %rdi
callq 0x13330
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x13540
popq %rbx
popq %r14
popq %rbp
retq
|
ma_tls_end:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, ma_tls_initialized
cmp byte ptr [r14], 0
jz short loc_2AE7B
lea rbx, LOCK_openssl_config
mov rdi, rbx
call _pthread_mutex_lock
mov byte ptr [r14], 0
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_mutex_destroy
loc_2AE7B:
pop rbx
pop r14
pop rbp
retn
|
long long ma_tls_end()
{
long long result; // rax
if ( ma_tls_initialized )
{
pthread_mutex_lock(&LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock(&LOCK_openssl_config);
return pthread_mutex_destroy(&LOCK_openssl_config);
}
return result;
}
|
ma_tls_end:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x14e1c0]
CMP byte ptr [R14],0x0
JZ 0x0012ae7b
LEA RBX,[0x14faa0]
MOV RDI,RBX
CALL 0x001136a0
MOV byte ptr [R14],0x0
MOV RDI,RBX
CALL 0x00113330
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00113540
LAB_0012ae7b:
POP RBX
POP R14
POP RBP
RET
|
void ma_tls_end(void)
{
if (ma_tls_initialized != '\0') {
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config);
return;
}
return;
}
|
|
10,923 |
escape_quotes_for_mysql
|
eloqsql/mysys/charset.c
|
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
}
|
O3
|
c
|
escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
leaq (%r8,%r8), %rax
subq $0x1, %r12
cmovbq %rax, %r12
movq %rdi, -0x40(%rbp)
movl 0x9c(%rdi), %r13d
movq %r9, -0x38(%rbp)
movb $0x0, (%r9)
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %r8, %r8
jle 0x30cc3
movq %r8, %r15
movq %rcx, %r14
movq -0x30(%rbp), %rbx
addq %rbx, %r12
addq %rcx, %r15
cmpl $0x2, %r13d
jb 0x30c5e
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r14, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x30c83
movb (%r14), %cl
cmpb $0x27, %cl
jne 0x30c76
leaq 0x2(%rbx), %rax
cmpq %r12, %rax
ja 0x30cb9
movw $0x2727, (%rbx) # imm = 0x2727
jmp 0x30cac
leaq 0x1(%rbx), %rax
cmpq %r12, %rax
ja 0x30cb9
movb %cl, (%rbx)
jmp 0x30cac
movl %eax, %ecx
movl %eax, %eax
addq %rbx, %rax
cmpq %r12, %rax
ja 0x30cb9
decq %r14
movq %r14, %rdx
leaq 0x1(%rdx), %r14
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r14, %rdx
movq %rax, %rbx
decl %ecx
jne 0x30c95
incq %r14
movq %rax, %rbx
cmpq %r15, %r14
jb 0x30c3c
jmp 0x30cc3
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq %rbx, %rax
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
escape_quotes_for_mysql:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
lea rax, [r8+r8]
sub r12, 1
cmovb r12, rax
mov [rbp+var_40], rdi
mov r13d, [rdi+9Ch]
mov [rbp+var_38], r9
mov byte ptr [r9], 0
mov [rbp+var_30], rsi
mov rax, rsi
test r8, r8
jle loc_30CC3
mov r15, r8
mov r14, rcx
mov rbx, [rbp+var_30]
add r12, rbx
add r15, rcx
loc_30C3C:
cmp r13d, 2
jb short loc_30C5E
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, r14
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_30C83
loc_30C5E:
mov cl, [r14]
cmp cl, 27h ; '''
jnz short loc_30C76
lea rax, [rbx+2]
cmp rax, r12
ja short loc_30CB9
mov word ptr [rbx], 2727h
jmp short loc_30CAC
loc_30C76:
lea rax, [rbx+1]
cmp rax, r12
ja short loc_30CB9
mov [rbx], cl
jmp short loc_30CAC
loc_30C83:
mov ecx, eax
mov eax, eax
add rax, rbx
cmp rax, r12
ja short loc_30CB9
dec r14
mov rdx, r14
loc_30C95:
lea r14, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r14
mov rbx, rax
dec ecx
jnz short loc_30C95
loc_30CAC:
inc r14
mov rbx, rax
cmp r14, r15
jb short loc_30C3C
jmp short loc_30CC3
loc_30CB9:
mov rax, [rbp+var_38]
mov byte ptr [rax], 1
mov rax, rbx
loc_30CC3:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * escape_quotes_for_mysql(long long a1, _BYTE *a2, long long a3, _BYTE *a4, long long a5, _BYTE *a6)
{
long long v6; // r12
unsigned int v7; // r13d
_BYTE *v8; // rax
_BYTE *v9; // r14
_WORD *v10; // rbx
unsigned long long v11; // r12
unsigned long long v12; // r15
int v13; // eax
int v14; // ecx
_BYTE *v15; // rdx
v6 = a3 - 1;
if ( !a3 )
v6 = 2 * a5;
v7 = *(_DWORD *)(a1 + 156);
*a6 = 0;
v8 = a2;
if ( a5 > 0 )
{
v9 = a4;
v10 = a2;
v11 = (unsigned long long)&a2[v6];
v12 = (unsigned long long)&a4[a5];
do
{
if ( v7 >= 2
&& (v13 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v9,
v12),
v13 >= 2) )
{
v14 = v13;
if ( (unsigned long long)v10 + (unsigned int)v13 > v11 )
{
LABEL_17:
*a6 = 1;
v8 = v10;
break;
}
v15 = v9 - 1;
do
{
v9 = v15 + 1;
v8 = (char *)v10 + 1;
*(_BYTE *)v10 = *++v15;
v10 = (_WORD *)((char *)v10 + 1);
--v14;
}
while ( v14 );
}
else if ( *v9 == 39 )
{
v8 = v10 + 1;
if ( (unsigned long long)(v10 + 1) > v11 )
goto LABEL_17;
*v10 = 10023;
}
else
{
v8 = (char *)v10 + 1;
if ( (unsigned long long)v10 + 1 > v11 )
goto LABEL_17;
*(_BYTE *)v10 = *v9;
}
++v9;
v10 = v8;
}
while ( (unsigned long long)v9 < v12 );
}
*v8 = 0;
return (_BYTE *)(v8 - a2);
}
|
escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
LEA RAX,[R8 + R8*0x1]
SUB R12,0x1
CMOVC R12,RAX
MOV qword ptr [RBP + -0x40],RDI
MOV R13D,dword ptr [RDI + 0x9c]
MOV qword ptr [RBP + -0x38],R9
MOV byte ptr [R9],0x0
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST R8,R8
JLE 0x00130cc3
MOV R15,R8
MOV R14,RCX
MOV RBX,qword ptr [RBP + -0x30]
ADD R12,RBX
ADD R15,RCX
LAB_00130c3c:
CMP R13D,0x2
JC 0x00130c5e
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R14
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x00130c83
LAB_00130c5e:
MOV CL,byte ptr [R14]
CMP CL,0x27
JNZ 0x00130c76
LEA RAX,[RBX + 0x2]
CMP RAX,R12
JA 0x00130cb9
MOV word ptr [RBX],0x2727
JMP 0x00130cac
LAB_00130c76:
LEA RAX,[RBX + 0x1]
CMP RAX,R12
JA 0x00130cb9
MOV byte ptr [RBX],CL
JMP 0x00130cac
LAB_00130c83:
MOV ECX,EAX
MOV EAX,EAX
ADD RAX,RBX
CMP RAX,R12
JA 0x00130cb9
DEC R14
MOV RDX,R14
LAB_00130c95:
LEA R14,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R14
MOV RBX,RAX
DEC ECX
JNZ 0x00130c95
LAB_00130cac:
INC R14
MOV RBX,RAX
CMP R14,R15
JC 0x00130c3c
JMP 0x00130cc3
LAB_00130cb9:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x1
MOV RAX,RBX
LAB_00130cc3:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long escape_quotes_for_mysql
(long param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
uint uVar1;
uint uVar2;
char *pcVar3;
char *pcVar4;
char *pcVar5;
long lVar6;
char *pcVar7;
char *pcVar8;
lVar6 = param_3 + -1;
if (param_3 == 0) {
lVar6 = param_5 * 2;
}
uVar1 = *(uint *)(param_1 + 0x9c);
*param_6 = 0;
pcVar3 = param_2;
if (0 < param_5) {
pcVar7 = param_2 + lVar6;
pcVar8 = param_4 + param_5;
pcVar5 = param_2;
do {
if ((uVar1 < 2) ||
(uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pcVar8),
(int)uVar2 < 2)) {
if (*param_4 == '\'') {
pcVar3 = pcVar5 + 2;
if (pcVar7 < pcVar3) {
LAB_00130cb9:
*param_6 = 1;
pcVar3 = pcVar5;
break;
}
pcVar5[0] = '\'';
pcVar5[1] = '\'';
}
else {
pcVar3 = pcVar5 + 1;
if (pcVar7 < pcVar3) goto LAB_00130cb9;
*pcVar5 = *param_4;
}
}
else {
if (pcVar7 < pcVar5 + uVar2) goto LAB_00130cb9;
pcVar4 = param_4 + -1;
do {
param_4 = pcVar4 + 1;
pcVar3 = pcVar5 + 1;
*pcVar5 = pcVar4[1];
uVar2 = uVar2 - 1;
pcVar4 = param_4;
pcVar5 = pcVar3;
} while (uVar2 != 0);
}
param_4 = param_4 + 1;
pcVar5 = pcVar3;
} while (param_4 < pcVar8);
}
*pcVar3 = '\0';
return (long)pcVar3 - (long)param_2;
}
|
|
10,924 |
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 0x46a13
jmp 0x46a15
jmp 0x46a17
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 0x46a60
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x14(%rbp)
jmp 0x46afd
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 0x46a70
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 0x46ac4
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 0x46b1e
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a250
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_46A13:
jmp short $+2
loc_46A15:
jmp short $+2
loc_46A17:
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_46A60
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_28]
mov [rax], cl
mov [rbp+var_14], 1
jmp loc_46AFD
loc_46A60:
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
lea rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_46A70:
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_46A70
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_46AC4:
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_46AC4
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_14], eax
loc_46AFD:
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_46B1E
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_46B1E:
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 0x00146a13
LAB_00146a13:
JMP 0x00146a15
LAB_00146a15:
JMP 0x00146a17
LAB_00146a17:
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 0x00146a60
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 0x00146afd
LAB_00146a60:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_00146a70:
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 0x00146a70
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_00146ac4:
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 0x00146ac4
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
LAB_00146afd:
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 0x00146b1e
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_00146b1e:
CALL 0x0012a250
|
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();
}
|
|
10,925 |
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;
}
|
O3
|
c
|
transid_store_packed:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq (%rdi), %rax
subq 0xe0(%rax), %rdx
addq %rdx, %rdx
orb $0x1, -0x1(%rsi)
cmpq $0xf3, %rdx
jae 0x41488
movb %dl, (%rsi)
movl $0x1, %eax
jmp 0x414bf
xorl %eax, %eax
movq %rdx, %rcx
movb %dl, -0x10(%rbp,%rax)
shrq $0x8, %rcx
incq %rax
cmpq $0xff, %rdx
movq %rcx, %rdx
ja 0x4148d
leal -0x7(%rax), %ecx
movb %cl, (%rsi)
incq %rsi
movq %rax, %rcx
movb -0x11(%rbp,%rcx), %dl
movb %dl, (%rsi)
incq %rsi
decq %rcx
jne 0x414af
incl %eax
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x414d4
addq $0x10, %rsp
popq %rbp
retq
callq 0x29250
|
transid_store_packed:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
mov rax, [rdi]
sub rdx, [rax+0E0h]
add rdx, rdx
or byte ptr [rsi-1], 1
cmp rdx, 0F3h
jnb short loc_41488
mov [rsi], dl
mov eax, 1
jmp short loc_414BF
loc_41488:
xor eax, eax
mov rcx, rdx
loc_4148D:
mov [rbp+rax+var_10], dl
shr rcx, 8
inc rax
cmp rdx, 0FFh
mov rdx, rcx
ja short loc_4148D
lea ecx, [rax-7]
mov [rsi], cl
inc rsi
mov rcx, rax
loc_414AF:
mov dl, [rbp+rcx+var_11]
mov [rsi], dl
inc rsi
dec rcx
jnz short loc_414AF
inc eax
loc_414BF:
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_414D4
add rsp, 10h
pop rbp
retn
loc_414D4:
call ___stack_chk_fail
|
long long transid_store_packed(long long a1, _BYTE *a2, long long a3)
{
unsigned long long v3; // rdx
long long v5; // rax
unsigned long long v6; // rcx
bool v7; // cc
_BYTE *v8; // rsi
long long v9; // rcx
_BYTE v10[9]; // [rsp+1h] [rbp-11h]
unsigned long long v11; // [rsp+Ah] [rbp-8h]
v11 = __readfsqword(0x28u);
v3 = 2 * (a3 - *(_QWORD *)(*(_QWORD *)a1 + 224LL));
*(a2 - 1) |= 1u;
if ( v3 >= 0xF3 )
{
v5 = 0LL;
v6 = v3;
do
{
v10[v5 + 1] = v3;
v6 >>= 8;
++v5;
v7 = v3 <= 0xFF;
v3 = v6;
}
while ( !v7 );
*a2 = v5 - 7;
v8 = a2 + 1;
v9 = v5;
do
*v8++ = v10[v9--];
while ( v9 );
return (unsigned int)(v5 + 1);
}
else
{
*a2 = v3;
return 1LL;
}
}
|
transid_store_packed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RDI]
SUB RDX,qword ptr [RAX + 0xe0]
ADD RDX,RDX
OR byte ptr [RSI + -0x1],0x1
CMP RDX,0xf3
JNC 0x00141488
MOV byte ptr [RSI],DL
MOV EAX,0x1
JMP 0x001414bf
LAB_00141488:
XOR EAX,EAX
MOV RCX,RDX
LAB_0014148d:
MOV byte ptr [RBP + RAX*0x1 + -0x10],DL
SHR RCX,0x8
INC RAX
CMP RDX,0xff
MOV RDX,RCX
JA 0x0014148d
LEA ECX,[RAX + -0x7]
MOV byte ptr [RSI],CL
INC RSI
MOV RCX,RAX
LAB_001414af:
MOV DL,byte ptr [RBP + RCX*0x1 + -0x11]
MOV byte ptr [RSI],DL
INC RSI
DEC RCX
JNZ 0x001414af
INC EAX
LAB_001414bf:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x001414d4
ADD RSP,0x10
POP RBP
RET
LAB_001414d4:
CALL 0x00129250
|
int transid_store_packed(long *param_1,char *param_2,long param_3)
{
bool bVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int8 uStack_20;
char local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar5 = (param_3 - *(long *)(*param_1 + 0xe0)) * 2;
param_2[-1] = param_2[-1] | 1;
if (uVar5 < 0xf3) {
*param_2 = (char)uVar5;
iVar2 = 1;
}
else {
lVar3 = 0;
do {
lVar4 = lVar3;
local_18[lVar4] = (char)uVar5;
lVar3 = lVar4 + 1;
bVar1 = 0xff < uVar5;
uVar5 = uVar5 >> 8;
} while (bVar1);
*param_2 = (char)lVar4 + -6;
param_2 = param_2 + 1;
lVar4 = lVar3;
do {
*param_2 = local_18[lVar4 + -1];
param_2 = param_2 + 1;
lVar4 = lVar4 + -1;
} while (lVar4 != 0);
iVar2 = (int)lVar3 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return iVar2;
}
/* WARNING: Subroutine does not return */
uStack_20 = transid_get_packed;
__stack_chk_fail();
}
|
|
10,926 |
ast_create_letstar
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_letstar(Arena* arena, AstNode** bindings, AstNode** binding_nodes, size_t binding_count, AstNode* body, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_LETSTAR, line, column);
if (!node) {
return NULL;
}
node->as.let.bindings = bindings;
node->as.let.binding_nodes = binding_nodes;
node->as.let.binding_count = binding_count;
node->as.let.body = body;
return node;
}
|
O1
|
c
|
ast_create_letstar:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x30(%rsp), %rcx
movl $0xf, %esi
movq %r9, %rdx
callq 0x4648
testq %rax, %rax
je 0x49ca
movq %r12, 0x48(%rax)
movq %r15, 0x50(%rax)
movq %r14, 0x58(%rax)
movq %rbx, 0x60(%rax)
jmp 0x49cc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
ast_create_letstar:
push r15
push r14
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rcx, [rsp+28h+arg_0]
mov esi, 0Fh
mov rdx, r9
call ast_create_node
test rax, rax
jz short loc_49CA
mov [rax+48h], r12
mov [rax+50h], r15
mov [rax+58h], r14
mov [rax+60h], rbx
jmp short loc_49CC
loc_49CA:
xor eax, eax
loc_49CC:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
_QWORD * ast_create_letstar(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
_QWORD *result; // rax
result = (_QWORD *)ast_create_node(a1, 15, a6, a7);
if ( !result )
return 0LL;
result[9] = a2;
result[10] = a3;
result[11] = a4;
result[12] = a5;
return result;
}
|
ast_create_letstar:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RCX,qword ptr [RSP + 0x30]
MOV ESI,0xf
MOV RDX,R9
CALL 0x00104648
TEST RAX,RAX
JZ 0x001049ca
MOV qword ptr [RAX + 0x48],R12
MOV qword ptr [RAX + 0x50],R15
MOV qword ptr [RAX + 0x58],R14
MOV qword ptr [RAX + 0x60],RBX
JMP 0x001049cc
LAB_001049ca:
XOR EAX,EAX
LAB_001049cc:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
long ast_create_letstar(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7)
{
long lVar1;
lVar1 = ast_create_node(param_1,0xf,param_6,param_7);
if (lVar1 == 0) {
lVar1 = 0;
}
else {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
*(int8 *)(lVar1 + 0x58) = param_4;
*(int8 *)(lVar1 + 0x60) = param_5;
}
return lVar1;
}
|
|
10,927 |
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::flush()
|
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/sinks/ansicolor_sink-inl.h
|
SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::flush()
{
std::lock_guard<mutex_t> lock(mutex_);
fflush(target_file_);
}
|
O3
|
c
|
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::flush():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x1c8(%rdi), %rbx
movq %rbx, %rdi
callq 0xb0f0
testl %eax, %eax
jne 0x44681
movq 0x1c0(%r14), %rdi
callq 0xb260
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb100
movl %eax, %edi
callq 0xb110
|
_ZN6spdlog5sinks14ansicolor_sinkINS_7details13console_mutexEE5flushEv:
push r14
push rbx
push rax
mov r14, rdi
mov rbx, [rdi+1C8h]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_44681
mov rdi, [r14+1C0h]
call _fflush
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp _pthread_mutex_unlock
loc_44681:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::flush(long long a1)
{
long long v1; // rbx
int v2; // eax
v1 = *(_QWORD *)(a1 + 456);
v2 = pthread_mutex_lock(v1);
if ( v2 )
std::__throw_system_error(v2);
fflush(*(_QWORD *)(a1 + 448));
return pthread_mutex_unlock(v1);
}
|
flush:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x1c8]
MOV RDI,RBX
CALL 0x0010b0f0
TEST EAX,EAX
JNZ 0x00144681
MOV RDI,qword ptr [R14 + 0x1c0]
CALL 0x0010b260
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0010b100
LAB_00144681:
MOV EDI,EAX
CALL 0x0010b110
|
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::flush() */
void __thiscall
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::flush
(ansicolor_sink<spdlog::details::console_mutex> *this)
{
pthread_mutex_t *__mutex;
int iVar1;
__mutex = *(pthread_mutex_t **)(this + 0x1c8);
iVar1 = pthread_mutex_lock(__mutex);
if (iVar1 == 0) {
fflush(*(FILE **)(this + 0x1c0));
pthread_mutex_unlock(__mutex);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
|
|
10,928 |
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>::basic_json<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::__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>>, 0>(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::__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
|
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<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::__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>>, 0>(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::__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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xa6668
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5cc1e
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r14, %rdi
callq 0x62398
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; 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>>::moved_or_copied(void)
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rbx], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
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()
add rsp, 18h
pop rbx
pop r14
retn
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_(
char *a1,
long long a2)
{
_OWORD v3[2]; // [rsp+8h] [rbp-20h] BYREF
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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied(
(unsigned __int8 *)v3,
a2);
*(_OWORD *)a1 = v3[0];
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3);
LOBYTE(v3[0]) = 0;
*((_QWORD *)&v3[0] + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1);
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 *)v3);
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(v3);
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001a6668
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015cc1e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0015cc1e
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,R14
CALL 0x00162398
ADD RSP,0x18
POP RBX
POP R14
RET
|
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_
(int8 *param_1)
{
bool bVar1;
data local_20;
int7 uStack_1f;
int8 uStack_18;
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::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::moved_or_copied();
*param_1 = CONCAT71(uStack_1f,local_20);
param_1[1] = uStack_18;
bVar1 = SUB81(&local_20,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(bVar1);
local_20 = (data)0x0;
uStack_18 = 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(param_1,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(bVar1);
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_20);
return;
}
|
|
10,929 |
inline_mysql_file_sync
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_sync(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File fd, myf flags)
{
int result= 0;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_sync(fd, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_sync(fd, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_sync:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x20f531(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x10, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb0c15
leaq 0x20f4ee(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf5af0
movl %eax, -0x24(%rbp)
leaq 0x20f4bf(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb0c2a
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf5af0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_file_sync_6:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 10h
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_B0C15
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_B0C2A
loc_B0C15:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_B0C2A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_sync_6(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = 0;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL);
if ( v6 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_sync(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
}
else
{
return (unsigned int)my_sync(v9, v8);
}
return v7;
}
|
inline_mysql_file_sync:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x10
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001b0c15
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f5af0
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b0c2a
LAB_001b0c15:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f5af0
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001b0c2a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_2c = 0;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10);
if (local_38 == 0) {
local_c = my_sync(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_2c = my_sync(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_c = local_2c;
}
return local_c;
}
|
|
10,930 |
plutovg_path_add_rect
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
|
void plutovg_path_add_rect(plutovg_path_t* path, float x, float y, float w, float h)
{
plutovg_path_reserve(path, 6 * 2);
plutovg_path_move_to(path, x, y);
plutovg_path_line_to(path, x + w, y);
plutovg_path_line_to(path, x + w, y + h);
plutovg_path_line_to(path, x, y + h);
plutovg_path_line_to(path, x, y);
plutovg_path_close(path);
}
|
O0
|
c
|
plutovg_path_add_rect:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movss %xmm3, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc, %esi
callq 0xfd90
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
callq 0xf100
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
callq 0xf280
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
addss -0x18(%rbp), %xmm1
callq 0xf280
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
addss -0x18(%rbp), %xmm1
callq 0xf280
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
callq 0xf280
movq -0x8(%rbp), %rdi
callq 0xfd40
addq $0x20, %rsp
popq %rbp
retq
|
plutovg_path_add_rect:
push rbp
mov rbp, rsp
sub rsp, 20h
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
mov rdi, [rbp+var_8]
mov esi, 0Ch
call plutovg_path_reserve
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
movss xmm1, [rbp+var_10]
call plutovg_path_move_to
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
addss xmm0, [rbp+var_14]
movss xmm1, [rbp+var_10]
call plutovg_path_line_to
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
addss xmm0, [rbp+var_14]
movss xmm1, [rbp+var_10]
addss xmm1, [rbp+var_18]
call plutovg_path_line_to
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
movss xmm1, [rbp+var_10]
addss xmm1, [rbp+var_18]
call plutovg_path_line_to
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
movss xmm1, [rbp+var_10]
call plutovg_path_line_to
mov rdi, [rbp+var_8]
call plutovg_path_close
add rsp, 20h
pop rbp
retn
|
_DWORD * plutovg_path_add_rect(long long a1, float a2, float a3, float a4, float a5)
{
plutovg_path_reserve(a1, 12);
plutovg_path_move_to(a1, a2, a3);
plutovg_path_line_to(a1, a2 + a4, a3);
plutovg_path_line_to(a1, a2 + a4, a3 + a5);
plutovg_path_line_to(a1, a2, a3 + a5);
plutovg_path_line_to(a1, a2, a3);
return plutovg_path_close(a1);
}
|
plutovg_path_add_rect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
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
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0xc
CALL 0x0010fd90
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x10]
CALL 0x0010f100
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
ADDSS XMM0,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RBP + -0x10]
CALL 0x0010f280
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
ADDSS XMM0,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RBP + -0x10]
ADDSS XMM1,dword ptr [RBP + -0x18]
CALL 0x0010f280
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x10]
ADDSS XMM1,dword ptr [RBP + -0x18]
CALL 0x0010f280
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x10]
CALL 0x0010f280
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010fd40
ADD RSP,0x20
POP RBP
RET
|
void plutovg_path_add_rect
(float param_1,float param_2,float param_3,float param_4,int8 param_5)
{
plutovg_path_reserve(param_5,0xc);
plutovg_path_move_to(param_1,param_2,param_5);
plutovg_path_line_to(param_1 + param_3,param_2,param_5);
plutovg_path_line_to(param_1 + param_3,param_2 + param_4,param_5);
plutovg_path_line_to(param_1,param_2 + param_4,param_5);
plutovg_path_line_to(param_1,param_2,param_5);
plutovg_path_close(param_5);
return;
}
|
|
10,931 |
my_rw_unlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_unlock(my_rw_lock_t *rwp)
{
DBUG_PRINT("rw_unlock",
("state: %d waiters: %d", rwp->state, rwp->waiters));
pthread_mutex_lock(&rwp->lock);
DBUG_ASSERT(rwp->state != 0);
if (rwp->state == -1) /* writer releasing */
{
my_rw_lock_assert_write_owner(rwp);
rwp->state= 0; /* mark as available */
#ifdef SAFE_MUTEX
rwp->write_thread= 0;
#endif
if ( rwp->waiters ) /* writers queued */
pthread_cond_signal( &rwp->writers );
else
pthread_cond_broadcast( &rwp->readers );
}
else
{
if ( --rwp->state == 0 && /* no more readers */
rwp->waiters)
pthread_cond_signal( &rwp->writers );
}
pthread_mutex_unlock( &rwp->lock );
return(0);
}
|
O0
|
c
|
my_rw_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x274ae
movq -0x8(%rbp), %rdi
callq 0x24410
jmp 0x274b9
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x88(%rax)
jne 0x274ff
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x274f0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x274fd
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x240f0
jmp 0x27533
movq -0x8(%rbp), %rcx
movl 0x88(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x88(%rcx)
cmpl $0x0, %eax
jne 0x27531
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x27531
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x27533
movq -0x8(%rbp), %rdi
callq 0x24200
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_unlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_274AE:
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
jmp short $+2
loc_274B9:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0FFFFFFFFh
jnz short loc_274FF
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_274F0
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
jmp short loc_274FD
loc_274F0:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call _pthread_cond_broadcast
loc_274FD:
jmp short loc_27533
loc_274FF:
mov rcx, [rbp+var_8]
mov eax, [rcx+88h]
add eax, 0FFFFFFFFh
mov [rcx+88h], eax
cmp eax, 0
jnz short loc_27531
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_27531
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
loc_27531:
jmp short $+2
loc_27533:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_unlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 136) == -1 )
{
*(_DWORD *)(a1 + 136) = 0;
if ( !*(_DWORD *)(a1 + 140) )
{
pthread_cond_broadcast(a1 + 40);
goto LABEL_7;
}
LABEL_6:
pthread_cond_signal(a1 + 88);
goto LABEL_7;
}
v1 = *(_DWORD *)(a1 + 136) - 1;
*(_DWORD *)(a1 + 136) = v1;
if ( !v1 && *(_DWORD *)(a1 + 140) )
goto LABEL_6;
LABEL_7:
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001274ae
LAB_001274ae:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124410
JMP 0x001274b9
LAB_001274b9:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],-0x1
JNZ 0x001274ff
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x001274f0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
JMP 0x001274fd
LAB_001274f0:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x001240f0
LAB_001274fd:
JMP 0x00127533
LAB_001274ff:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x88]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x88],EAX
CMP EAX,0x0
JNZ 0x00127531
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x00127531
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
LAB_00127531:
JMP 0x00127533
LAB_00127533:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124200
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_unlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x88) == -1) {
*(int4 *)((long)param_1 + 0x88) = 0;
if (*(int *)((long)param_1 + 0x8c) == 0) {
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
}
else {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
else {
iVar1 = *(int *)((long)param_1 + 0x88) + -1;
*(int *)((long)param_1 + 0x88) = iVar1;
if ((iVar1 == 0) && (*(int *)((long)param_1 + 0x8c) != 0)) {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
pthread_mutex_unlock(param_1);
return 0;
}
|
|
10,932 |
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&)
|
monkey531[P]llama/common/minja.hpp
|
Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) {
if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump());
}
|
O3
|
cpp
|
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x8e1c5(%rip), %rax # 0x12b140
addq $0x10, %rax
movq %rax, (%rdi)
movups %xmm0, 0x18(%rdi)
xorl %r13d, %r13d
movq %r13, 0x30(%rdi)
movups 0x10(%rsi), %xmm0
movq %r13, 0x18(%rsi)
movups %xmm0, 0x28(%rdi)
movq %r13, 0x10(%rsi)
movq %r13, 0x40(%rdi)
movups 0x20(%rsi), %xmm0
movq %r13, 0x28(%rsi)
movups %xmm0, 0x38(%rdi)
movq %r13, 0x20(%rsi)
movq %r13, 0x50(%rdi)
movups 0x30(%rsi), %xmm0
movq %r13, 0x38(%rsi)
movups %xmm0, 0x48(%rdi)
movq %r13, 0x30(%rsi)
leaq 0x58(%rdi), %r12
leaq 0x40(%rsi), %rdi
movups 0x40(%rsi), %xmm0
movups %xmm0, 0x58(%rbx)
xorl %esi, %esi
callq 0x58f20
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x58f20
movq (%r14), %rax
movq %rax, 0x68(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x9d01b
movq 0x8ef7b(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x9d017
incl 0x8(%rax)
jmp 0x9d01b
lock
incl 0x8(%rax)
cmpq $0x0, 0x38(%rbx)
je 0x9d031
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r14
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x53cfe(%rip), %rsi # 0xf0d5b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x8ef6b(%rip), %rsi # 0x12bff0
movq 0x8eed4(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af10
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d0b2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d0cd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x9d0f7
jmp 0x9d0ff
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d0f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x9d0f7
movq %rax, %r12
movq %r15, %rdi
callq 0x1a690
movq 0x70(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0x9d111
callq 0x6de32
movq %r14, %rdi
callq 0x868ee
movq %rbx, %rdi
callq 0x9d12a
movq %r12, %rdi
callq 0x1af90
nop
|
_ZN5minja7ContextC2EONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
movups xmmword ptr [rdi+18h], xmm0
xor r13d, r13d
mov [rdi+30h], r13
movups xmm0, xmmword ptr [rsi+10h]
mov [rsi+18h], r13
movups xmmword ptr [rdi+28h], xmm0
mov [rsi+10h], r13
mov [rdi+40h], r13
movups xmm0, xmmword ptr [rsi+20h]
mov [rsi+28h], r13
movups xmmword ptr [rdi+38h], xmm0
mov [rsi+20h], r13
mov [rdi+50h], r13
movups xmm0, xmmword ptr [rsi+30h]
mov [rsi+38h], r13
movups xmmword ptr [rdi+48h], xmm0
mov [rsi+30h], r13
lea r12, [rdi+58h]
lea rdi, [rsi+40h]
movups xmm0, xmmword ptr [rsi+40h]
movups xmmword ptr [rbx+58h], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
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 rax, [r14]
mov [rbx+68h], rax
mov rax, [r14+8]
mov [rbx+70h], rax
test rax, rax
jz short loc_9D01B
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9D017
inc dword ptr [rax+8]
jmp short loc_9D01B
loc_9D017:
lock inc dword ptr [rax+8]
loc_9D01B:
cmp qword ptr [rbx+38h], 0
jz short loc_9D031
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9D031:
lea r14, [rbx+18h]
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContextValuesM; "Context values must be an object: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, r15
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r12, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9D0B2
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9D0B2:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9D0CD
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9D0CD:
test bpl, bpl
jnz short loc_9D0F7
jmp short loc_9D0FF
mov r12, rax
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9D0F7
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9D0F7
mov r12, rax
loc_9D0F7:
mov rdi, r15; void *
call ___cxa_free_exception
loc_9D0FF:
mov rdi, [rbx+70h]
add rbx, 8
test rdi, rdi
jz short loc_9D111
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9D111:
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja7ContextEED2Ev; std::enable_shared_from_this<minja::Context>::~enable_shared_from_this()
mov rdi, r12
call __Unwind_Resume
|
long long minja::Context::Context(long long a1, long long a2, _QWORD *a3)
{
__int128 v4; // xmm0
__int128 v5; // xmm0
__int128 v6; // xmm0
long long result; // rax
void *exception; // r15
_BYTE v9[16]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v10[16]; // [rsp+28h] [rbp-50h] BYREF
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = &`vtable for'minja::Context + 2;
*(_OWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
v4 = *(_OWORD *)(a2 + 16);
*(_QWORD *)(a2 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = v4;
*(_QWORD *)(a2 + 16) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
v5 = *(_OWORD *)(a2 + 32);
*(_QWORD *)(a2 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = v5;
*(_QWORD *)(a2 + 32) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v6 = *(_OWORD *)(a2 + 48);
*(_QWORD *)(a2 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = v6;
*(_QWORD *)(a2 + 48) = 0LL;
*(_OWORD *)(a1 + 88) = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64));
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 88));
*(_QWORD *)(a1 + 104) = *a3;
result = a3[1];
*(_QWORD *)(a1 + 112) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
if ( !*(_QWORD *)(a1 + 56) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, a1 + 24, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Context values must be an object: ", (long long)v9);
std::runtime_error::runtime_error(exception, v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
|
Context:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x22b140]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOVUPS xmmword ptr [RDI + 0x18],XMM0
XOR R13D,R13D
MOV qword ptr [RDI + 0x30],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x10]
MOV qword ptr [RSI + 0x18],R13
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RSI + 0x10],R13
MOV qword ptr [RDI + 0x40],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOV qword ptr [RSI + 0x28],R13
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV qword ptr [RSI + 0x20],R13
MOV qword ptr [RDI + 0x50],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x30]
MOV qword ptr [RSI + 0x38],R13
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOV qword ptr [RSI + 0x30],R13
LEA R12,[RDI + 0x58]
LEA RDI,[RSI + 0x40]
MOVUPS XMM0,xmmword ptr [RSI + 0x40]
MOVUPS xmmword ptr [RBX + 0x58],XMM0
XOR ESI,ESI
CALL 0x00158f20
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x00158f20
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x68],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x0019d01b
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x0019d017
INC dword ptr [RAX + 0x8]
JMP 0x0019d01b
LAB_0019d017:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019d01b:
CMP qword ptr [RBX + 0x38],0x0
JZ 0x0019d031
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019d031:
LEA R14,[RBX + 0x18]
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_0019d042:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_0019d056:
LEA RSI,[0x1f0d5b]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001793a5
MOV BPL,0x1
LAB_0019d06f:
LEA RSI,[RSP + 0x28]
MOV RDI,R15
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af10
|
/* minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) */
void __thiscall minja::Context::Context(Context *this,Value *param_1,shared_ptr *param_2)
{
long lVar1;
int8 uVar2;
runtime_error *this_00;
int1 local_70 [32];
string local_50 [32];
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__Context_0022b150;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(this + 0x28) = *(int8 *)(param_1 + 0x10);
*(int8 *)(this + 0x30) = uVar2;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x20);
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(this + 0x48) = *(int8 *)(param_1 + 0x30);
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)(param_1 + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x48);
*(int8 *)(this + 0x58) = *(int8 *)(param_1 + 0x40);
*(int8 *)(this + 0x60) = uVar2;
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((bool)((char)param_1 + '@'));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 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((bool)((char)this + 'X'));
*(int8 *)(this + 0x68) = *(int8 *)param_2;
lVar1 = *(long *)(param_2 + 8);
*(long *)(this + 0x70) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
if (*(long *)(this + 0x38) != 0) {
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019d042 to 0019d055 has its CatchHandler @ 0019d0f4 */
Value::dump_abi_cxx11_((int)local_70,(bool)((char)this + '\x18'));
/* try { // try from 0019d056 to 0019d06b has its CatchHandler @ 0019d0d4 */
std::operator+((char *)local_50,(string *)"Context values must be an object: ");
/* try { // try from 0019d06f to 0019d093 has its CatchHandler @ 0019d094 */
std::runtime_error::runtime_error(this_00,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
|
|
10,933 |
TerminalSupportsColor()
|
ng-log[P]ng-log/src/logging.cc
|
static bool TerminalSupportsColor() {
bool term_supports_color = false;
#ifdef NGLOG_OS_WINDOWS
// on Windows TERM variable is usually not set, but the console does
// support colors.
term_supports_color = true;
#else
// On non-Windows platforms, we rely on the TERM variable.
const char* const term = getenv("TERM");
if (term != nullptr && term[0] != '\0') {
term_supports_color =
!strcmp(term, "xterm") || !strcmp(term, "xterm-color") ||
!strcmp(term, "xterm-256color") || !strcmp(term, "screen-256color") ||
!strcmp(term, "konsole") || !strcmp(term, "konsole-16color") ||
!strcmp(term, "konsole-256color") || !strcmp(term, "screen") ||
!strcmp(term, "linux") || !strcmp(term, "cygwin");
}
#endif
return term_supports_color;
}
|
O0
|
cpp
|
TerminalSupportsColor():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x1(%rbp)
leaq 0x4138f(%rip), %rdi # 0x71372
callq 0xaa20
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3013a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3013a
movq -0x10(%rbp), %rdi
leaq 0x3feec(%rip), %rsi # 0x6fefe
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fed2(%rip), %rsi # 0x6ff04
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3febe(%rip), %rsi # 0x6ff10
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fead(%rip), %rsi # 0x6ff1f
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe9d(%rip), %rsi # 0x6ff2f
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe85(%rip), %rsi # 0x6ff37
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe79(%rip), %rsi # 0x6ff47
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe6e(%rip), %rsi # 0x6ff58
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe59(%rip), %rsi # 0x6ff5f
callq 0xabe0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x30132
movq -0x10(%rbp), %rdi
leaq 0x3fe43(%rip), %rsi # 0x6ff65
callq 0xabe0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL21TerminalSupportsColorv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_1], 0
lea rdi, aSigterm+3; "TERM"
call _getenv
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz loc_3013A
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_3013A
mov rdi, [rbp+var_10]
lea rsi, aXterm; "xterm"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_30132
mov rdi, [rbp+var_10]
lea rsi, aXtermColor; "xterm-color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_30132
mov rdi, [rbp+var_10]
lea rsi, aXterm256color; "xterm-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_30132
mov rdi, [rbp+var_10]
lea rsi, aScreen256color; "screen-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_30132
mov rdi, [rbp+var_10]
lea rsi, aKonsole; "konsole"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_30132
mov rdi, [rbp+var_10]
lea rsi, aKonsole16color; "konsole-16color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_30132
mov rdi, [rbp+var_10]
lea rsi, aKonsole256colo; "konsole-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_30132
mov rdi, [rbp+var_10]
lea rsi, aScreen; "screen"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_30132
mov rdi, [rbp+var_10]
lea rsi, aLinux; "linux"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_30132
mov rdi, [rbp+var_10]
lea rsi, aCygwin; "cygwin"
call _strcmp
cmp eax, 0
setnz al
xor al, 0FFh
mov [rbp+var_11], al
loc_30132:
mov al, [rbp+var_11]
and al, 1
mov [rbp+var_1], al
loc_3013A:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
|
char TerminalSupportsColor(void)
{
char v1; // [rsp+Fh] [rbp-11h]
_BYTE *v2; // [rsp+10h] [rbp-10h]
char v3; // [rsp+1Fh] [rbp-1h]
v3 = 0;
v2 = (_BYTE *)getenv("TERM");
if ( v2 && *v2 )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm-color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "screen-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole-16color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "screen") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "linux") )
v1 = ~((unsigned int)strcmp(v2, "cygwin") != 0);
}
}
}
}
}
}
}
}
return v1 & 1;
}
return v3;
}
|
TerminalSupportsColor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV byte ptr [RBP + -0x1],0x0
LEA RDI,[0x171372]
CALL 0x0010aa20
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013013a
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013013a
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16fefe]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff04]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff10]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff1f]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff2f]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff37]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff47]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff58]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff5f]
CALL 0x0010abe0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x00130132
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16ff65]
CALL 0x0010abe0
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x11],AL
LAB_00130132:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0013013a:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* TerminalSupportsColor() */
byte TerminalSupportsColor(void)
{
int iVar1;
char *__s1;
byte local_19;
byte local_9;
local_9 = 0;
__s1 = getenv("TERM");
if ((__s1 != (char *)0x0) && (*__s1 != '\0')) {
iVar1 = strcmp(__s1,"xterm");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"xterm-color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"xterm-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"screen-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole-16color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"screen");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"linux");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"cygwin");
local_19 = iVar1 != 0 ^ 0xff;
}
}
}
}
}
}
}
}
}
local_9 = local_19 & 1;
}
return local_9;
}
|
|
10,934 |
mi_setup_functions
|
eloqsql/storage/myisam/mi_open.c
|
void mi_setup_functions(register MYISAM_SHARE *share)
{
if (share->options & HA_OPTION_COMPRESS_RECORD)
{
share->read_record=_mi_read_pack_record;
share->read_rnd=_mi_read_rnd_pack_record;
if ((share->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_NULL_FIELDS)) ||
share->has_varchar_fields)
share->calc_checksum= mi_checksum;
else
share->calc_checksum= mi_static_checksum;
share->calc_check_checksum= share->calc_checksum;
if (!(share->options & HA_OPTION_TEMP_COMPRESS_RECORD))
share->calc_checksum=0; /* No checksum */
}
else if (share->options & HA_OPTION_PACK_RECORD)
{
share->read_record=_mi_read_dynamic_record;
share->read_rnd=_mi_read_rnd_dynamic_record;
share->delete_record=_mi_delete_dynamic_record;
share->compare_record=_mi_cmp_dynamic_record;
share->compare_unique=_mi_cmp_dynamic_unique;
share->calc_checksum= mi_checksum;
share->calc_check_checksum= share->calc_checksum;
/* add bits used to pack data to pack_reclength for faster allocation */
share->base.pack_reclength+= share->base.pack_bits;
if (share->base.blobs)
{
share->update_record=_mi_update_blob_record;
share->write_record=_mi_write_blob_record;
}
else
{
share->write_record=_mi_write_dynamic_record;
share->update_record=_mi_update_dynamic_record;
}
}
else
{
share->read_record=_mi_read_static_record;
share->read_rnd=_mi_read_rnd_static_record;
share->delete_record=_mi_delete_static_record;
share->compare_record=_mi_cmp_static_record;
share->update_record=_mi_update_static_record;
share->write_record=_mi_write_static_record;
share->compare_unique=_mi_cmp_static_unique;
if (share->options & HA_OPTION_NULL_FIELDS)
share->calc_checksum= mi_checksum;
else
share->calc_checksum= mi_static_checksum;
share->calc_check_checksum= share->calc_checksum;
}
share->file_read= mi_nommap_pread;
share->file_write= mi_nommap_pwrite;
if (!(share->options & HA_OPTION_CHECKSUM))
share->calc_checksum=0;
return;
}
|
O0
|
c
|
mi_setup_functions:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0xb76a3
movq -0x8(%rbp), %rax
leaq 0x49d4(%rip), %rcx # 0xbbfd0
movq %rcx, 0x298(%rax)
movq -0x8(%rbp), %rax
leaq 0x4e32(%rip), %rcx # 0xbc440
movq %rcx, 0x2b8(%rax)
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x401, %rax # imm = 0x401
cmpq $0x0, %rax
jne 0xb763c
movq -0x8(%rbp), %rax
movsbl 0x37e(%rax), %eax
cmpl $0x0, %eax
je 0xb7650
movq -0x8(%rbp), %rax
leaq 0x203a9(%rip), %rcx # 0xd79f0
movq %rcx, 0x2c8(%rax)
jmp 0xb7662
movq -0x8(%rbp), %rax
leaq 0x20565(%rip), %rcx # 0xd7bc0
movq %rcx, 0x2c8(%rax)
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2d0(%rax)
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
jne 0xb769e
movq -0x8(%rbp), %rax
movq $0x0, 0x2c8(%rax)
jmp 0xb788b
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb77b8
movq -0x8(%rbp), %rax
leaq -0xb287(%rip), %rcx # 0xac440
movq %rcx, 0x298(%rax)
movq -0x8(%rbp), %rax
leaq -0xa909(%rip), %rcx # 0xacdd0
movq %rcx, 0x2b8(%rax)
movq -0x8(%rbp), %rax
leaq -0xe07b(%rip), %rcx # 0xa9670
movq %rcx, 0x2b0(%rax)
movq -0x8(%rbp), %rax
leaq -0xad7d(%rip), %rcx # 0xac980
movq %rcx, 0x2c0(%rax)
movq -0x8(%rbp), %rax
leaq -0xaecf(%rip), %rcx # 0xac840
movq %rcx, 0x2d8(%rax)
movq -0x8(%rbp), %rax
leaq 0x202cf(%rip), %rcx # 0xd79f0
movq %rcx, 0x2c8(%rax)
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2d0(%rax)
movq -0x8(%rbp), %rax
movl 0x18c(%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x148(%rax), %rcx
movq %rcx, 0x148(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x188(%rax)
je 0xb778f
movq -0x8(%rbp), %rax
leaq -0xe1d4(%rip), %rcx # 0xa95a0
movq %rcx, 0x2a8(%rax)
movq -0x8(%rbp), %rax
leaq -0xe356(%rip), %rcx # 0xa9430
movq %rcx, 0x2a0(%rax)
jmp 0xb77b3
movq -0x8(%rbp), %rax
leaq -0xf27a(%rip), %rcx # 0xa8520
movq %rcx, 0x2a0(%rax)
movq -0x8(%rbp), %rax
leaq -0xeb6c(%rip), %rcx # 0xa8c40
movq %rcx, 0x2a8(%rax)
jmp 0xb7889
movq -0x8(%rbp), %rax
leaq 0xd7cd(%rip), %rcx # 0xc4f90
movq %rcx, 0x298(%rax)
movq -0x8(%rbp), %rax
leaq 0xd90b(%rip), %rcx # 0xc50e0
movq %rcx, 0x2b8(%rax)
movq -0x8(%rbp), %rax
leaq 0xd4f9(%rip), %rcx # 0xc4ce0
movq %rcx, 0x2b0(%rax)
movq -0x8(%rbp), %rax
leaq 0xd5c7(%rip), %rcx # 0xc4dc0
movq %rcx, 0x2c0(%rax)
movq -0x8(%rbp), %rax
leaq 0xd465(%rip), %rcx # 0xc4c70
movq %rcx, 0x2a8(%rax)
movq -0x8(%rbp), %rax
leaq 0xd033(%rip), %rcx # 0xc4850
movq %rcx, 0x2a0(%rax)
movq -0x8(%rbp), %rax
leaq 0xd6c1(%rip), %rcx # 0xc4ef0
movq %rcx, 0x2d8(%rax)
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x400, %rax # imm = 0x400
cmpq $0x0, %rax
je 0xb7861
movq -0x8(%rbp), %rax
leaq 0x20198(%rip), %rcx # 0xd79f0
movq %rcx, 0x2c8(%rax)
jmp 0xb7873
movq -0x8(%rbp), %rax
leaq 0x20354(%rip), %rcx # 0xd7bc0
movq %rcx, 0x2c8(%rax)
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2d0(%rax)
jmp 0xb788b
movq -0x8(%rbp), %rax
leaq -0xf836(%rip), %rcx # 0xa8060
movq %rcx, 0x2e0(%rax)
movq -0x8(%rbp), %rax
leaq -0xf7e8(%rip), %rcx # 0xa80c0
movq %rcx, 0x2e8(%rax)
movq -0x8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
jne 0xb78d3
movq -0x8(%rbp), %rax
movq $0x0, 0x2c8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mi_setup_functions:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 4
cmp rax, 0
jz loc_B76A3
mov rax, [rbp+var_8]
lea rcx, _mi_read_pack_record
mov [rax+298h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_read_rnd_pack_record
mov [rax+2B8h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 401h
cmp rax, 0
jnz short loc_B763C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+37Eh]
cmp eax, 0
jz short loc_B7650
loc_B763C:
mov rax, [rbp+var_8]
lea rcx, mi_checksum
mov [rax+2C8h], rcx
jmp short loc_B7662
loc_B7650:
mov rax, [rbp+var_8]
lea rcx, mi_static_checksum
mov [rax+2C8h], rcx
loc_B7662:
mov rax, [rbp+var_8]
mov rcx, [rax+2C8h]
mov rax, [rbp+var_8]
mov [rax+2D0h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 8000h
cmp rax, 0
jnz short loc_B769E
mov rax, [rbp+var_8]
mov qword ptr [rax+2C8h], 0
loc_B769E:
jmp loc_B788B
loc_B76A3:
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 1
cmp rax, 0
jz loc_B77B8
mov rax, [rbp+var_8]
lea rcx, _mi_read_dynamic_record
mov [rax+298h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_read_rnd_dynamic_record
mov [rax+2B8h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_delete_dynamic_record
mov [rax+2B0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_cmp_dynamic_record
mov [rax+2C0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_cmp_dynamic_unique
mov [rax+2D8h], rcx
mov rax, [rbp+var_8]
lea rcx, mi_checksum
mov [rax+2C8h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+2C8h]
mov rax, [rbp+var_8]
mov [rax+2D0h], rcx
mov rax, [rbp+var_8]
mov eax, [rax+18Ch]
mov ecx, eax
mov rax, [rbp+var_8]
add rcx, [rax+148h]
mov [rax+148h], rcx
mov rax, [rbp+var_8]
cmp dword ptr [rax+188h], 0
jz short loc_B778F
mov rax, [rbp+var_8]
lea rcx, _mi_update_blob_record
mov [rax+2A8h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_write_blob_record
mov [rax+2A0h], rcx
jmp short loc_B77B3
loc_B778F:
mov rax, [rbp+var_8]
lea rcx, _mi_write_dynamic_record
mov [rax+2A0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_update_dynamic_record
mov [rax+2A8h], rcx
loc_B77B3:
jmp loc_B7889
loc_B77B8:
mov rax, [rbp+var_8]
lea rcx, _mi_read_static_record
mov [rax+298h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_read_rnd_static_record
mov [rax+2B8h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_delete_static_record
mov [rax+2B0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_cmp_static_record
mov [rax+2C0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_update_static_record
mov [rax+2A8h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_write_static_record
mov [rax+2A0h], rcx
mov rax, [rbp+var_8]
lea rcx, _mi_cmp_static_unique
mov [rax+2D8h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 400h
cmp rax, 0
jz short loc_B7861
mov rax, [rbp+var_8]
lea rcx, mi_checksum
mov [rax+2C8h], rcx
jmp short loc_B7873
loc_B7861:
mov rax, [rbp+var_8]
lea rcx, mi_static_checksum
mov [rax+2C8h], rcx
loc_B7873:
mov rax, [rbp+var_8]
mov rcx, [rax+2C8h]
mov rax, [rbp+var_8]
mov [rax+2D0h], rcx
loc_B7889:
jmp short $+2
loc_B788B:
mov rax, [rbp+var_8]
lea rcx, mi_nommap_pread
mov [rax+2E0h], rcx
mov rax, [rbp+var_8]
lea rcx, mi_nommap_pwrite
mov [rax+2E8h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+318h]
and rax, 20h
cmp rax, 0
jnz short loc_B78D3
mov rax, [rbp+var_8]
mov qword ptr [rax+2C8h], 0
loc_B78D3:
pop rbp
retn
|
long long mi_setup_functions(long long a1)
{
long long result; // rax
if ( (*(_QWORD *)(a1 + 792) & 4LL) != 0 )
{
*(_QWORD *)(a1 + 664) = mi_read_pack_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_pack_record;
if ( (*(_QWORD *)(a1 + 792) & 0x401LL) != 0 || *(_BYTE *)(a1 + 894) )
*(_QWORD *)(a1 + 712) = mi_checksum;
else
*(_QWORD *)(a1 + 712) = mi_static_checksum;
*(_QWORD *)(a1 + 720) = *(_QWORD *)(a1 + 712);
if ( (*(_QWORD *)(a1 + 792) & 0x8000LL) == 0 )
*(_QWORD *)(a1 + 712) = 0LL;
}
else if ( (*(_QWORD *)(a1 + 792) & 1LL) != 0 )
{
*(_QWORD *)(a1 + 664) = mi_read_dynamic_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_dynamic_record;
*(_QWORD *)(a1 + 688) = mi_delete_dynamic_record;
*(_QWORD *)(a1 + 704) = mi_cmp_dynamic_record;
*(_QWORD *)(a1 + 728) = mi_cmp_dynamic_unique;
*(_QWORD *)(a1 + 712) = mi_checksum;
*(_QWORD *)(a1 + 720) = *(_QWORD *)(a1 + 712);
*(_QWORD *)(a1 + 328) += *(unsigned int *)(a1 + 396);
if ( *(_DWORD *)(a1 + 392) )
{
*(_QWORD *)(a1 + 680) = mi_update_blob_record;
*(_QWORD *)(a1 + 672) = mi_write_blob_record;
}
else
{
*(_QWORD *)(a1 + 672) = mi_write_dynamic_record;
*(_QWORD *)(a1 + 680) = mi_update_dynamic_record;
}
}
else
{
*(_QWORD *)(a1 + 664) = mi_read_static_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_static_record;
*(_QWORD *)(a1 + 688) = mi_delete_static_record;
*(_QWORD *)(a1 + 704) = mi_cmp_static_record;
*(_QWORD *)(a1 + 680) = mi_update_static_record;
*(_QWORD *)(a1 + 672) = mi_write_static_record;
*(_QWORD *)(a1 + 728) = mi_cmp_static_unique;
if ( (*(_QWORD *)(a1 + 792) & 0x400LL) != 0 )
*(_QWORD *)(a1 + 712) = mi_checksum;
else
*(_QWORD *)(a1 + 712) = mi_static_checksum;
*(_QWORD *)(a1 + 720) = *(_QWORD *)(a1 + 712);
}
*(_QWORD *)(a1 + 736) = mi_nommap_pread;
*(_QWORD *)(a1 + 744) = mi_nommap_pwrite;
result = *(_QWORD *)(a1 + 792) & 0x20LL;
if ( !result )
{
result = a1;
*(_QWORD *)(a1 + 712) = 0LL;
}
return result;
}
|
mi_setup_functions:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x4
CMP RAX,0x0
JZ 0x001b76a3
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1bbfd0]
MOV qword ptr [RAX + 0x298],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1bc440]
MOV qword ptr [RAX + 0x2b8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x401
CMP RAX,0x0
JNZ 0x001b763c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x37e]
CMP EAX,0x0
JZ 0x001b7650
LAB_001b763c:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1d79f0]
MOV qword ptr [RAX + 0x2c8],RCX
JMP 0x001b7662
LAB_001b7650:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1d7bc0]
MOV qword ptr [RAX + 0x2c8],RCX
LAB_001b7662:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x2c8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2d0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x8000
CMP RAX,0x0
JNZ 0x001b769e
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c8],0x0
LAB_001b769e:
JMP 0x001b788b
LAB_001b76a3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b77b8
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1ac440]
MOV qword ptr [RAX + 0x298],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1acdd0]
MOV qword ptr [RAX + 0x2b8],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a9670]
MOV qword ptr [RAX + 0x2b0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1ac980]
MOV qword ptr [RAX + 0x2c0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1ac840]
MOV qword ptr [RAX + 0x2d8],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1d79f0]
MOV qword ptr [RAX + 0x2c8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x2c8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2d0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18c]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RCX,qword ptr [RAX + 0x148]
MOV qword ptr [RAX + 0x148],RCX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001b778f
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a95a0]
MOV qword ptr [RAX + 0x2a8],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a9430]
MOV qword ptr [RAX + 0x2a0],RCX
JMP 0x001b77b3
LAB_001b778f:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a8520]
MOV qword ptr [RAX + 0x2a0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a8c40]
MOV qword ptr [RAX + 0x2a8],RCX
LAB_001b77b3:
JMP 0x001b7889
LAB_001b77b8:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4f90]
MOV qword ptr [RAX + 0x298],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c50e0]
MOV qword ptr [RAX + 0x2b8],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4ce0]
MOV qword ptr [RAX + 0x2b0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4dc0]
MOV qword ptr [RAX + 0x2c0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4c70]
MOV qword ptr [RAX + 0x2a8],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4850]
MOV qword ptr [RAX + 0x2a0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c4ef0]
MOV qword ptr [RAX + 0x2d8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x400
CMP RAX,0x0
JZ 0x001b7861
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1d79f0]
MOV qword ptr [RAX + 0x2c8],RCX
JMP 0x001b7873
LAB_001b7861:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1d7bc0]
MOV qword ptr [RAX + 0x2c8],RCX
LAB_001b7873:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x2c8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2d0],RCX
LAB_001b7889:
JMP 0x001b788b
LAB_001b788b:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a8060]
MOV qword ptr [RAX + 0x2e0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1a80c0]
MOV qword ptr [RAX + 0x2e8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x20
CMP RAX,0x0
JNZ 0x001b78d3
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c8],0x0
LAB_001b78d3:
POP RBP
RET
|
void mi_setup_functions(long param_1)
{
if ((*(ulong *)(param_1 + 0x318) & 4) == 0) {
if ((*(ulong *)(param_1 + 0x318) & 1) == 0) {
*(code **)(param_1 + 0x298) = _mi_read_static_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_static_record;
*(code **)(param_1 + 0x2b0) = _mi_delete_static_record;
*(code **)(param_1 + 0x2c0) = _mi_cmp_static_record;
*(code **)(param_1 + 0x2a8) = _mi_update_static_record;
*(code **)(param_1 + 0x2a0) = _mi_write_static_record;
*(code **)(param_1 + 0x2d8) = _mi_cmp_static_unique;
if ((*(ulong *)(param_1 + 0x318) & 0x400) == 0) {
*(code **)(param_1 + 0x2c8) = mi_static_checksum;
}
else {
*(code **)(param_1 + 0x2c8) = mi_checksum;
}
*(int8 *)(param_1 + 0x2d0) = *(int8 *)(param_1 + 0x2c8);
}
else {
*(code **)(param_1 + 0x298) = _mi_read_dynamic_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_dynamic_record;
*(code **)(param_1 + 0x2b0) = _mi_delete_dynamic_record;
*(code **)(param_1 + 0x2c0) = _mi_cmp_dynamic_record;
*(code **)(param_1 + 0x2d8) = _mi_cmp_dynamic_unique;
*(code **)(param_1 + 0x2c8) = mi_checksum;
*(int8 *)(param_1 + 0x2d0) = *(int8 *)(param_1 + 0x2c8);
*(ulong *)(param_1 + 0x148) = (ulong)*(uint *)(param_1 + 0x18c) + *(long *)(param_1 + 0x148);
if (*(int *)(param_1 + 0x188) == 0) {
*(code **)(param_1 + 0x2a0) = _mi_write_dynamic_record;
*(code **)(param_1 + 0x2a8) = _mi_update_dynamic_record;
}
else {
*(code **)(param_1 + 0x2a8) = _mi_update_blob_record;
*(code **)(param_1 + 0x2a0) = _mi_write_blob_record;
}
}
}
else {
*(code **)(param_1 + 0x298) = _mi_read_pack_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_pack_record;
if (((*(ulong *)(param_1 + 0x318) & 0x401) == 0) && (*(char *)(param_1 + 0x37e) == '\0')) {
*(code **)(param_1 + 0x2c8) = mi_static_checksum;
}
else {
*(code **)(param_1 + 0x2c8) = mi_checksum;
}
*(int8 *)(param_1 + 0x2d0) = *(int8 *)(param_1 + 0x2c8);
if ((*(ulong *)(param_1 + 0x318) & 0x8000) == 0) {
*(int8 *)(param_1 + 0x2c8) = 0;
}
}
*(code **)(param_1 + 0x2e0) = mi_nommap_pread;
*(code **)(param_1 + 0x2e8) = mi_nommap_pwrite;
if ((*(ulong *)(param_1 + 0x318) & 0x20) == 0) {
*(int8 *)(param_1 + 0x2c8) = 0;
}
return;
}
|
|
10,935 |
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, char const*, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, char const*, int, int, fmt::v10::detail::digit_grouping<char> const&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
int significand_size, int exponent,
const Grouping& grouping) -> OutputIt {
if (!grouping.has_separator()) {
out = write_significand<Char>(out, significand, significand_size);
return detail::fill_n(out, exponent, static_cast<Char>('0'));
}
auto buffer = memory_buffer();
write_significand<char>(appender(buffer), significand, significand_size);
detail::fill_n(appender(buffer), exponent, '0');
return grouping.apply(out, string_view(buffer.data(), buffer.size()));
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, char const*, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, char const*, int, int, fmt::v10::detail::digit_grouping<char> const&):
subq $0x2f8, %rsp # imm = 0x2F8
movq %rdi, 0x2e8(%rsp)
movq %rsi, 0x2e0(%rsp)
movl %edx, 0x2dc(%rsp)
movl %ecx, 0x2d8(%rsp)
movq %r8, 0x2d0(%rsp)
movq 0x2d0(%rsp), %rdi
callq 0x94a00
testb $0x1, %al
jne 0x9e197
movq 0x2e8(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x2e0(%rsp), %rsi
movl 0x2dc(%rsp), %edx
movq 0x2c0(%rsp), %rdi
callq 0x9e340
movq %rax, 0x2c8(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movl 0x2d8(%rsp), %esi
movb $0x30, 0x2b7(%rsp)
movq 0x2b8(%rsp), %rdi
leaq 0x2b7(%rsp), %rdx
callq 0x939d0
movq %rax, 0x2f0(%rsp)
jmp 0x9e317
leaq 0x97(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x14c90
movq 0x38(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x87c70
jmp 0x9e1bd
leaq 0x97(%rsp), %rdi
callq 0x14750
leaq 0x78(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x23770
jmp 0x9e1de
movq 0x2e0(%rsp), %rsi
movl 0x2dc(%rsp), %edx
movq 0x78(%rsp), %rdi
callq 0x9e340
movq %rax, 0x30(%rsp)
jmp 0x9e1fe
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x23770
jmp 0x9e21c
movl 0x2d8(%rsp), %esi
movb $0x30, 0x67(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x67(%rsp), %rdx
callq 0x939d0
movq %rax, 0x28(%rsp)
jmp 0x9e23e
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x98(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x23b10
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x23b20
movq 0x10(%rsp), %rsi
movq %rax, %rdx
leaq 0x40(%rsp), %rdi
callq 0x23b30
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x94a70
movq %rax, 0x20(%rsp)
jmp 0x9e2b5
movq 0x20(%rsp), %rax
movq %rax, 0x2f0(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87cd0
jmp 0x9e317
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x97(%rsp), %rdi
callq 0x14750
jmp 0x9e327
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87cd0
jmp 0x9e327
movq 0x2f0(%rsp), %rax
addq $0x2f8, %rsp # imm = 0x2F8
retq
movq 0x88(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nop
|
_ZN3fmt3v106detail17write_significandIcNS0_8appenderEPKcNS1_14digit_groupingIcEEEET0_S8_T1_iiRKT2_:
sub rsp, 2F8h
mov [rsp+2F8h+var_10], rdi
mov [rsp+2F8h+var_18], rsi
mov [rsp+2F8h+var_1C], edx
mov [rsp+2F8h+var_20], ecx
mov [rsp+2F8h+var_28], r8
mov rdi, [rsp+2F8h+var_28]
call _ZNK3fmt3v106detail14digit_groupingIcE13has_separatorEv; fmt::v10::detail::digit_grouping<char>::has_separator(void)
test al, 1
jnz loc_9E197
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_38], rax
mov rsi, [rsp+2F8h+var_18]
mov edx, [rsp+2F8h+var_1C]
mov rdi, [rsp+2F8h+var_38]
call _ZN3fmt3v106detail17write_significandIcNS0_8appenderEEET0_S4_PKci; fmt::v10::detail::write_significand<char,fmt::v10::appender>(fmt::v10::appender,char const*,int)
mov [rsp+2F8h+var_30], rax
mov rax, [rsp+2F8h+var_30]
mov [rsp+2F8h+var_10], rax
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_40], rax
mov esi, [rsp+2F8h+var_20]
mov [rsp+2F8h+var_41], 30h ; '0'
mov rdi, [rsp+2F8h+var_40]
lea rdx, [rsp+2F8h+var_41]
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov [rsp+2F8h+var_8], rax
jmp loc_9E317
loc_9E197:
lea rdi, [rsp+2F8h+var_261]
mov [rsp+2F8h+var_2C0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+2F8h+var_2C0]
lea rdi, [rsp+2F8h+var_260]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_9E1BD:
lea rdi, [rsp+2F8h+var_261]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2F8h+var_280]
lea rsi, [rsp+2F8h+var_260]
call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_
jmp short $+2
loc_9E1DE:
mov rsi, [rsp+2F8h+var_18]
mov edx, [rsp+2F8h+var_1C]
mov rdi, [rsp+2F8h+var_280]
call _ZN3fmt3v106detail17write_significandIcNS0_8appenderEEET0_S4_PKci; fmt::v10::detail::write_significand<char,fmt::v10::appender>(fmt::v10::appender,char const*,int)
mov [rsp+2F8h+var_2C8], rax
jmp short $+2
loc_9E1FE:
mov rax, [rsp+2F8h+var_2C8]
mov [rsp+2F8h+var_288], rax
lea rdi, [rsp+2F8h+var_290]
lea rsi, [rsp+2F8h+var_260]
call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_
jmp short $+2
loc_9E21C:
mov esi, [rsp+2F8h+var_20]
mov [rsp+2F8h+var_291], 30h ; '0'
mov rdi, [rsp+2F8h+var_290]
lea rdx, [rsp+2F8h+var_291]
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov [rsp+2F8h+var_2D0], rax
jmp short $+2
loc_9E23E:
mov rax, [rsp+2F8h+var_2D0]
mov [rsp+2F8h+var_2A0], rax
mov rax, [rsp+2F8h+var_28]
mov [rsp+2F8h+var_2E0], rax
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_2A8], rax
lea rdi, [rsp+2F8h+var_260]
mov [rsp+2F8h+var_2F0], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+2F8h+var_2F0]
mov [rsp+2F8h+var_2E8], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rsi, [rsp+2F8h+var_2E8]
mov rdx, rax
lea rdi, [rsp+2F8h+var_2B8]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+2F8h+var_2E0]
mov rsi, [rsp+2F8h+var_2A8]
mov rdx, [rsp+2F8h+var_2B8]
mov rcx, [rsp+2F8h+var_2B0]
call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov [rsp+2F8h+var_2D8], rax
jmp short $+2
loc_9E2B5:
mov rax, [rsp+2F8h+var_2D8]
mov [rsp+2F8h+var_8], rax
lea rdi, [rsp+2F8h+var_260]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_9E317
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_8F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_9E327
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_90]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_9E327
loc_9E317:
mov rax, [rsp+2F8h+var_8]
add rsp, 2F8h
retn
loc_9E327:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
|
long long fmt::v10::detail::write_significand<char,fmt::v10::appender,char const*,fmt::v10::detail::digit_grouping<char>>(
long long a1,
long long a2,
unsigned int a3,
int a4,
long long a5)
{
long long v5; // rax
const char *v6; // rsi
long long v8; // [rsp+10h] [rbp-2E8h]
long long v9; // [rsp+18h] [rbp-2E0h]
long long v10[2]; // [rsp+40h] [rbp-2B8h] BYREF
const char *v11; // [rsp+50h] [rbp-2A8h]
long long v12; // [rsp+58h] [rbp-2A0h]
char v13; // [rsp+67h] [rbp-291h] BYREF
long long v14[2]; // [rsp+68h] [rbp-290h] BYREF
_QWORD v15[3]; // [rsp+78h] [rbp-280h] BYREF
char v16; // [rsp+97h] [rbp-261h] BYREF
_QWORD v17[67]; // [rsp+98h] [rbp-260h] BYREF
char v18; // [rsp+2B7h] [rbp-41h] BYREF
long long v19; // [rsp+2B8h] [rbp-40h]
long long v20; // [rsp+2C0h] [rbp-38h]
long long v21; // [rsp+2C8h] [rbp-30h]
long long v22; // [rsp+2D0h] [rbp-28h]
int v23; // [rsp+2D8h] [rbp-20h]
unsigned int v24; // [rsp+2DCh] [rbp-1Ch]
long long v25; // [rsp+2E0h] [rbp-18h]
long long v26; // [rsp+2E8h] [rbp-10h]
long long v27; // [rsp+2F0h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
if ( fmt::v10::detail::digit_grouping<char>::has_separator(a5) )
{
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v17, (long long)&v16);
std::allocator<char>::~allocator(&v16, &v16);
ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v15, (long long)v17);
v14[1] = fmt::v10::detail::write_significand<char,fmt::v10::appender>(v15[0], v25, v24);
ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v14, (long long)v17);
v13 = 48;
v12 = fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(v14[0], v23, &v13);
v9 = v22;
v11 = (const char *)v26;
v8 = fmt::v10::detail::buffer<char>::data((long long)v17);
v5 = fmt::v10::detail::buffer<char>::size((long long)v17);
fmt::v10::basic_string_view<char>::basic_string_view(v10, v8, v5);
v6 = v11;
v27 = fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(v9, (long long)v11, v10[0], v10[1]);
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v17, v6);
}
else
{
v20 = v26;
v21 = fmt::v10::detail::write_significand<char,fmt::v10::appender>(v26, v25, v24);
v26 = v21;
v19 = v21;
v18 = 48;
return fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(v21, v23, &v18);
}
return v27;
}
|
write_significand<char,fmt::v10::appender,char_const*,fmt::v10::detail::digit_grouping<char>>:
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x2e8],RDI
MOV qword ptr [RSP + 0x2e0],RSI
MOV dword ptr [RSP + 0x2dc],EDX
MOV dword ptr [RSP + 0x2d8],ECX
MOV qword ptr [RSP + 0x2d0],R8
MOV RDI,qword ptr [RSP + 0x2d0]
CALL 0x00194a00
TEST AL,0x1
JNZ 0x0019e197
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x2c0],RAX
MOV RSI,qword ptr [RSP + 0x2e0]
MOV EDX,dword ptr [RSP + 0x2dc]
MOV RDI,qword ptr [RSP + 0x2c0]
CALL 0x0019e340
MOV qword ptr [RSP + 0x2c8],RAX
MOV RAX,qword ptr [RSP + 0x2c8]
MOV qword ptr [RSP + 0x2e8],RAX
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x2b8],RAX
MOV ESI,dword ptr [RSP + 0x2d8]
MOV byte ptr [RSP + 0x2b7],0x30
MOV RDI,qword ptr [RSP + 0x2b8]
LEA RDX,[RSP + 0x2b7]
CALL 0x001939d0
MOV qword ptr [RSP + 0x2f0],RAX
JMP 0x0019e317
LAB_0019e197:
LEA RDI,[RSP + 0x97]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00114c90
MOV RSI,qword ptr [RSP + 0x38]
LAB_0019e1ae:
LEA RDI,[RSP + 0x98]
CALL 0x00187c70
JMP 0x0019e1bd
LAB_0019e1bd:
LEA RDI,[RSP + 0x97]
CALL 0x00114750
LAB_0019e1ca:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x98]
CALL 0x00123770
JMP 0x0019e1de
LAB_0019e1de:
MOV RSI,qword ptr [RSP + 0x2e0]
MOV EDX,dword ptr [RSP + 0x2dc]
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0019e340
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0019e1fe
LAB_0019e1fe:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x98]
CALL 0x00123770
JMP 0x0019e21c
LAB_0019e21c:
MOV ESI,dword ptr [RSP + 0x2d8]
MOV byte ptr [RSP + 0x67],0x30
MOV RDI,qword ptr [RSP + 0x68]
LEA RDX,[RSP + 0x67]
CALL 0x001939d0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0019e23e
LAB_0019e23e:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x2d0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x98]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00123b10
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00123b20
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RAX
LEA RDI,[RSP + 0x40]
CALL 0x00123b30
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CALL 0x00194a70
LAB_0019e2ae:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0019e2b5
LAB_0019e2b5:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x2f0],RAX
LEA RDI,[RSP + 0x98]
CALL 0x00187cd0
JMP 0x0019e317
LAB_0019e317:
MOV RAX,qword ptr [RSP + 0x2f0]
ADD RSP,0x2f8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, char const*,
fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, char const*, int, int,
fmt::v10::detail::digit_grouping<char> const&) */
int8
fmt::v10::detail::
write_significand<char,fmt::v10::appender,char_const*,fmt::v10::detail::digit_grouping<char>>
(int8 param_1,int8 param_2,int4 param_3,int4 param_4,
digit_grouping<char> *param_5)
{
digit_grouping<char> *pdVar1;
ulong uVar2;
char *pcVar3;
int8 local_2b8;
int8 local_2b0;
int8 local_2a8;
int8 local_2a0;
int1 local_291;
int8 local_290;
int8 local_288;
int8 local_280 [3];
allocator<char> local_261;
allocator local_260 [543];
int1 local_41;
int8 local_40;
int8 local_38;
int8 local_30;
digit_grouping<char> *local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
int8 local_8;
local_28 = param_5;
local_20 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
uVar2 = digit_grouping<char>::has_separator(param_5);
if ((uVar2 & 1) == 0) {
local_38 = local_10;
local_40 = write_significand<char,fmt::v10::appender>(local_10,local_18,local_1c);
local_41 = 0x30;
local_30 = local_40;
local_10 = local_40;
local_8 = fill_n<fmt::v10::appender,int,char>(local_40,local_20,&local_41);
}
else {
std::allocator<char>::allocator();
/* try { // try from 0019e1ae to 0019e1ba has its CatchHandler @ 0019e2d1 */
basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_260);
std::allocator<char>::~allocator(&local_261);
/* try { // try from 0019e1ca to 0019e2ad has its CatchHandler @ 0019e2f4 */
appender::back_insert_iterator((appender *)local_280,(buffer *)local_260);
local_288 = write_significand<char,fmt::v10::appender>(local_280[0],local_18,local_1c);
appender::back_insert_iterator((appender *)&local_290,(buffer *)local_260);
local_291 = 0x30;
local_2a0 = fill_n<fmt::v10::appender,int,char>(local_290,local_20,&local_291);
pdVar1 = local_28;
local_2a8 = local_10;
pcVar3 = (char *)buffer<char>::data((buffer<char> *)local_260);
uVar2 = buffer<char>::size((buffer<char> *)local_260);
basic_string_view<char>::basic_string_view((basic_string_view<char> *)&local_2b8,pcVar3,uVar2);
local_8 = digit_grouping<char>::apply<fmt::v10::appender,char>
(pdVar1,local_2a8,local_2b8,local_2b0);
basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_260);
}
return local_8;
}
|
|
10,936 |
u32toa
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa(char buf[minimum_length(11)], uint32_t n)
{
#ifdef USE_SINGLE_CASE_FAST /* 10% */
if (n < 10) {
buf[0] = (char)('0' + n);
buf[1] = '\0';
return 1;
}
#endif
#define TEN_POW_7 10000000
if (n >= TEN_POW_7) {
uint32_t quo = n / TEN_POW_7;
n %= TEN_POW_7;
size_t len = u7toa_shift(buf, quo);
return u07toa_shift(buf, n, len);
}
return u7toa_shift(buf, n);
}
|
O0
|
c
|
u32toa:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0xa, 0x14(%rsp)
jae 0x1f748
movl 0x14(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movb %cl, (%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x1(%rax)
movq $0x1, 0x20(%rsp)
jmp 0x1f7b4
cmpl $0x989680, 0x14(%rsp) # imm = 0x989680
jb 0x1f7a1
movl 0x14(%rsp), %eax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divl %ecx
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divl %ecx
movl %edx, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x1f7c0
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdx
callq 0x1f8c0
movq %rax, 0x20(%rsp)
jmp 0x1f7b4
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1f7c0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nop
|
u32toa:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
cmp [rsp+28h+var_14], 0Ah
jnb short loc_1F748
mov eax, [rsp+28h+var_14]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+28h+var_10]
mov [rax], cl
mov rax, [rsp+28h+var_10]
mov byte ptr [rax+1], 0
mov [rsp+28h+var_8], 1
jmp short loc_1F7B4
loc_1F748:
cmp [rsp+28h+var_14], 989680h
jb short loc_1F7A1
mov eax, [rsp+28h+var_14]
mov ecx, 989680h
xor edx, edx
div ecx
mov [rsp+28h+var_18], eax
mov eax, [rsp+28h+var_14]
mov ecx, 989680h
xor edx, edx
div ecx
mov [rsp+28h+var_14], edx
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_18]
call u7toa_shift
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
mov rdx, [rsp+28h+var_20]
call u07toa_shift
mov [rsp+28h+var_8], rax
jmp short loc_1F7B4
loc_1F7A1:
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call u7toa_shift
mov [rsp+28h+var_8], rax
loc_1F7B4:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long u32toa(_BYTE *a1, unsigned int a2)
{
long long v3; // [rsp+8h] [rbp-20h]
if ( a2 >= 0xA )
{
if ( a2 < 0x989680 )
{
return u7toa_shift(a1, a2);
}
else
{
v3 = u7toa_shift(a1, a2 / 0x989680);
return u07toa_shift(a1, a2 % 0x989680, v3);
}
}
else
{
*a1 = a2 + 48;
a1[1] = 0;
return 1LL;
}
}
|
u32toa:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
CMP dword ptr [RSP + 0x14],0xa
JNC 0x0011f748
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX + 0x1],0x0
MOV qword ptr [RSP + 0x20],0x1
JMP 0x0011f7b4
LAB_0011f748:
CMP dword ptr [RSP + 0x14],0x989680
JC 0x0011f7a1
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0x989680
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0x989680
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x14],EDX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x0011f7c0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011f8c0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0011f7b4
LAB_0011f7a1:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x0011f7c0
MOV qword ptr [RSP + 0x20],RAX
LAB_0011f7b4:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
int8 u32toa(char *param_1,uint param_2)
{
int8 uVar1;
int8 local_8;
if (param_2 < 10) {
*param_1 = (char)param_2 + '0';
param_1[1] = '\0';
local_8 = 1;
}
else if (param_2 < 10000000) {
local_8 = u7toa_shift(param_1,param_2);
}
else {
uVar1 = u7toa_shift(param_1,param_2 / 10000000);
local_8 = u07toa_shift(param_1,param_2 % 10000000,uVar1);
}
return local_8;
}
|
|
10,937 |
u32toa
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa(char buf[minimum_length(11)], uint32_t n)
{
#ifdef USE_SINGLE_CASE_FAST /* 10% */
if (n < 10) {
buf[0] = (char)('0' + n);
buf[1] = '\0';
return 1;
}
#endif
#define TEN_POW_7 10000000
if (n >= TEN_POW_7) {
uint32_t quo = n / TEN_POW_7;
n %= TEN_POW_7;
size_t len = u7toa_shift(buf, quo);
return u07toa_shift(buf, n, len);
}
return u7toa_shift(buf, n);
}
|
O1
|
c
|
u32toa:
cmpl $0x9, %esi
ja 0x1bca2
orb $0x30, %sil
movb %sil, (%rdi)
movb $0x0, 0x1(%rdi)
movl $0x1, %eax
retq
cmpl $0x98967f, %esi # imm = 0x98967F
jbe 0x1bd0e
movl %esi, %eax
imulq $0x6b5fca6b, %rax, %rcx # imm = 0x6B5FCA6B
shrq $0x36, %rcx
imull $0x989680, %ecx, %edx # imm = 0x989680
cmpl $0x5f5e100, %esi # imm = 0x5F5E100
jb 0x1bd5a
pushq %rbx
movl $0x1, %eax
xorl %r8d, %r8d
movl $0xcccccccd, %r9d # imm = 0xCCCCCCCD
movl %ecx, %r10d
movl %ecx, %ecx
imulq %r9, %rcx
shrq $0x23, %rcx
shlq $0x8, %r8
leal (%rcx,%rcx), %r11d
leal (%r11,%r11,4), %r11d
movl %r10d, %ebx
subl %r11d, %ebx
addq %rbx, %r8
addq $0x30, %r8
incq %rax
cmpl $0x63, %r10d
ja 0x1bcd8
shlq $0x8, %r8
popq %rbx
jmp 0x1bd62
movl $0x1, %eax
xorl %ecx, %ecx
movl $0xcccccccd, %edx # imm = 0xCCCCCCCD
movl %esi, %r8d
movl %esi, %esi
imulq %rdx, %rsi
shrq $0x23, %rsi
shlq $0x8, %rcx
leal (%rsi,%rsi), %r9d
leal (%r9,%r9,4), %r9d
movl %r8d, %r10d
subl %r9d, %r10d
addq %r10, %rcx
addq $0x30, %rcx
incq %rax
cmpl $0x63, %r8d
ja 0x1bd1a
shlq $0x8, %rcx
movl %esi, %edx
addq %rdx, %rcx
addq $0x30, %rcx
movq %rcx, (%rdi)
retq
movl $0x1, %eax
xorl %r8d, %r8d
subl %edx, %esi
movl %ecx, %ecx
addq %r8, %rcx
addq $0x30, %rcx
movq %rcx, (%rdi)
movb $0x0, 0x7(%rdi,%rax)
addq %rax, %rdi
movl $0x7, %ecx
movl $0xcccccccd, %edx # imm = 0xCCCCCCCD
movl %esi, %r8d
movl %esi, %esi
imulq %rdx, %rsi
shrq $0x23, %rsi
leal (%rsi,%rsi), %r9d
leal (%r9,%r9,4), %r9d
subl %r9d, %r8d
orb $0x30, %r8b
movb %r8b, -0x1(%rdi,%rcx)
decq %rcx
cmpq $0x1, %rcx
ja 0x1bd82
addb $0x30, %sil
movb %sil, (%rdi)
addq $0x7, %rax
retq
|
u32toa:
cmp esi, 9
ja short loc_1BCA2
or sil, 30h
mov [rdi], sil
mov byte ptr [rdi+1], 0
mov eax, 1
retn
loc_1BCA2:
cmp esi, 98967Fh
jbe short loc_1BD0E
mov eax, esi
imul rcx, rax, 6B5FCA6Bh
shr rcx, 36h
imul edx, ecx, 989680h
cmp esi, 5F5E100h
jb loc_1BD5A
push rbx
mov eax, 1
xor r8d, r8d
mov r9d, 0CCCCCCCDh
loc_1BCD8:
mov r10d, ecx
mov ecx, ecx
imul rcx, r9
shr rcx, 23h
shl r8, 8
lea r11d, [rcx+rcx]
lea r11d, [r11+r11*4]
mov ebx, r10d
sub ebx, r11d
add r8, rbx
add r8, 30h ; '0'
inc rax
cmp r10d, 63h ; 'c'
ja short loc_1BCD8
shl r8, 8
pop rbx
jmp short loc_1BD62
loc_1BD0E:
mov eax, 1
xor ecx, ecx
mov edx, 0CCCCCCCDh
loc_1BD1A:
mov r8d, esi
mov esi, esi
imul rsi, rdx
shr rsi, 23h
shl rcx, 8
lea r9d, [rsi+rsi]
lea r9d, [r9+r9*4]
mov r10d, r8d
sub r10d, r9d
add rcx, r10
add rcx, 30h ; '0'
inc rax
cmp r8d, 63h ; 'c'
ja short loc_1BD1A
shl rcx, 8
mov edx, esi
add rcx, rdx
add rcx, 30h ; '0'
mov [rdi], rcx
retn
loc_1BD5A:
mov eax, 1
xor r8d, r8d
loc_1BD62:
sub esi, edx
mov ecx, ecx
add rcx, r8
add rcx, 30h ; '0'
mov [rdi], rcx
mov byte ptr [rdi+rax+7], 0
add rdi, rax
mov ecx, 7
mov edx, 0CCCCCCCDh
loc_1BD82:
mov r8d, esi
mov esi, esi
imul rsi, rdx
shr rsi, 23h
lea r9d, [rsi+rsi]
lea r9d, [r9+r9*4]
sub r8d, r9d
or r8b, 30h
mov [rdi+rcx-1], r8b
dec rcx
cmp rcx, 1
ja short loc_1BD82
add sil, 30h ; '0'
mov [rdi], sil
add rax, 7
retn
|
long long u32toa(long long a1, unsigned int a2)
{
long long result; // rax
unsigned int v3; // ecx
long long v4; // rax
long long v5; // r8
unsigned int v6; // r10d
long long v7; // r8
long long v8; // rcx
unsigned int v9; // r8d
unsigned int v10; // esi
_BYTE *v11; // rdi
long long v12; // rcx
char v13; // r8
bool v14; // cf
if ( a2 > 9 )
{
if ( a2 <= 0x98967F )
{
result = 1LL;
v8 = 0LL;
do
{
v9 = a2;
a2 /= 0xAu;
v8 = v9 - 10 * a2 + (v8 << 8) + 48;
++result;
}
while ( v9 > 0x63 );
*(_QWORD *)a1 = a2 + (v8 << 8) + 48;
}
else
{
v3 = a2 / 0x989680;
if ( a2 < 0x5F5E100 )
{
v4 = 1LL;
v7 = 0LL;
}
else
{
v4 = 1LL;
v5 = 0LL;
do
{
v6 = v3;
v3 /= 0xAu;
v5 = v6 - 10 * v3 + (v5 << 8) + 48;
++v4;
}
while ( v6 > 0x63 );
v7 = v5 << 8;
}
v10 = a2 % 0x989680;
*(_QWORD *)a1 = v7 + v3 + 48;
*(_BYTE *)(a1 + v4 + 7) = 0;
v11 = (_BYTE *)(v4 + a1);
v12 = 7LL;
do
{
v13 = v10;
v10 /= 0xAu;
v11[v12 - 1] = (v13 - 10 * v10) | 0x30;
v14 = v12-- == 1;
}
while ( !v14 && v12 != 1 );
*v11 = v10 + 48;
return v4 + 7;
}
}
else
{
*(_BYTE *)a1 = a2 | 0x30;
*(_BYTE *)(a1 + 1) = 0;
return 1LL;
}
return result;
}
| |||
10,938 |
u32toa
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa(char buf[minimum_length(11)], uint32_t n)
{
#ifdef USE_SINGLE_CASE_FAST /* 10% */
if (n < 10) {
buf[0] = (char)('0' + n);
buf[1] = '\0';
return 1;
}
#endif
#define TEN_POW_7 10000000
if (n >= TEN_POW_7) {
uint32_t quo = n / TEN_POW_7;
n %= TEN_POW_7;
size_t len = u7toa_shift(buf, quo);
return u07toa_shift(buf, n, len);
}
return u7toa_shift(buf, n);
}
|
O2
|
c
|
u32toa:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x9, %esi
ja 0x164a2
orb $0x30, %sil
movb %sil, (%rbx)
movb $0x0, 0x1(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x989680, %esi # imm = 0x989680
jb 0x164d1
movl $0x989680, %ecx # imm = 0x989680
movl %esi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x164dc
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x16515
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x164dc
|
u32toa:
push rbp
push rbx
push rax
mov rbx, rdi
cmp esi, 9
ja short loc_164A2
or sil, 30h
mov [rbx], sil
mov byte ptr [rbx+1], 0
push 1
pop rax
add rsp, 8
pop rbx
pop rbp
retn
loc_164A2:
cmp esi, 989680h
jb short loc_164D1
mov ecx, 989680h
mov eax, esi
xor edx, edx
div ecx
mov ebp, edx
mov rdi, rbx
mov esi, eax
call u7toa_shift
mov rdi, rbx
mov esi, ebp
mov rdx, rax
add rsp, 8
pop rbx
pop rbp
jmp short u07toa_shift
loc_164D1:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp short $+2
|
long long u32toa(_BYTE *a1, unsigned int a2)
{
long long v3; // rax
if ( a2 > 9 )
{
if ( a2 < 0x989680 )
{
return u7toa_shift(a1);
}
else
{
v3 = u7toa_shift(a1);
return u07toa_shift(a1, a2 % 0x989680, v3);
}
}
else
{
*a1 = a2 | 0x30;
a1[1] = 0;
return 1LL;
}
}
|
u32toa:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP ESI,0x9
JA 0x001164a2
OR SIL,0x30
MOV byte ptr [RBX],SIL
MOV byte ptr [RBX + 0x1],0x0
PUSH 0x1
POP RAX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_001164a2:
CMP ESI,0x989680
JC 0x001164d1
MOV ECX,0x989680
MOV EAX,ESI
XOR EDX,EDX
DIV ECX
MOV EBP,EDX
MOV RDI,RBX
MOV ESI,EAX
CALL 0x001164dc
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00116515
LAB_001164d1:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001164dc
|
int8 u32toa(byte *param_1,uint param_2)
{
int8 uVar1;
if (param_2 < 10) {
*param_1 = (byte)param_2 | 0x30;
param_1[1] = 0;
return 1;
}
if (9999999 < param_2) {
uVar1 = u7toa_shift(param_1,(ulong)param_2 / 10000000);
uVar1 = u07toa_shift(param_1,(ulong)param_2 % 10000000,uVar1);
return uVar1;
}
uVar1 = u7toa_shift(param_1);
return uVar1;
}
|
|
10,939 |
ma_net_init
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
int ma_net_init(NET *net, MARIADB_PVIO* pvio)
{
if (!(net->buff=(uchar*) malloc(net_buffer_length)))
return 1;
if (!net->extension)
return 1;
memset(net->buff, 0, net_buffer_length);
net->max_packet_size= MAX(net_buffer_length, max_allowed_packet);
net->buff_end=net->buff+(net->max_packet=net_buffer_length);
net->pvio = pvio;
net->error=0; net->return_status=0;
net->read_timeout=(uint) net_read_timeout; /* Timeout for read */
net->compress_pkt_nr= net->pkt_nr= 0;
net->write_pos=net->read_pos = net->buff;
net->last_error[0]= net->sqlstate[0] =0;
net->compress=0; net->reading_or_writing=0;
net->where_b = net->remain_in_buf=0;
net->last_errno=0;
if (pvio != 0) /* If real connection */
{
ma_pvio_get_handle(pvio, &net->fd);
ma_pvio_blocking(pvio, 1, 0);
ma_pvio_fast_send(pvio);
}
return 0;
}
|
O3
|
c
|
ma_net_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1a665(%rip), %rax # 0x4dbe0
movq (%rax), %r13
movq %r13, %rdi
callq 0x13600
movq %rax, 0x8(%r14)
movl $0x1, %r15d
testq %rax, %rax
je 0x33661
cmpq $0x0, 0x2a0(%r14)
je 0x33661
movq %rax, %r12
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x13260
leaq 0x1a607(%rip), %rax # 0x4dbc8
movq (%rax), %rax
cmpq %rax, %r13
cmovaq %r13, %rax
movq %rax, 0x58(%r14)
movq %r13, 0x50(%r14)
movq %r12, %rax
addq %r13, %rax
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
movb %r15b, 0x94(%r14)
movq %r15, 0x78(%r14)
leaq 0x1a5de(%rip), %rax # 0x4dbd0
movl (%rax), %eax
movl %eax, 0x6c(%r14)
movq %r15, 0x60(%r14)
movq %r12, 0x20(%r14)
movq %r12, 0x18(%r14)
movb %r15b, 0x297(%r14)
movb %r15b, 0x97(%r14)
movb %r15b, 0x84(%r14)
movb %r15b, 0x80(%r14)
movq %r15, 0x30(%r14)
movq %r15, 0x48(%r14)
movl $0x0, 0x90(%r14)
testq %rbx, %rbx
je 0x33661
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fb9f
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1f8cc
movq %rbx, %rdi
callq 0x1f678
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_net_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, net_buffer_length
mov r13, [rax]
mov rdi, r13
call _malloc
mov [r14+8], rax
mov r15d, 1
test rax, rax
jz loc_33661
cmp qword ptr [r14+2A0h], 0
jz loc_33661
mov r12, rax
xor r15d, r15d
mov rdi, rax
xor esi, esi
mov rdx, r13
call _memset
lea rax, max_allowed_packet
mov rax, [rax]
cmp r13, rax
cmova rax, r13
mov [r14+58h], rax
mov [r14+50h], r13
mov rax, r12
add rax, r13
mov [r14+10h], rax
mov [r14], rbx
mov [r14+94h], r15b
mov [r14+78h], r15
lea rax, net_read_timeout
mov eax, [rax]
mov [r14+6Ch], eax
mov [r14+60h], r15
mov [r14+20h], r12
mov [r14+18h], r12
mov [r14+297h], r15b
mov [r14+97h], r15b
mov [r14+84h], r15b
mov [r14+80h], r15b
mov [r14+30h], r15
mov [r14+48h], r15
mov dword ptr [r14+90h], 0
test rbx, rbx
jz short loc_33661
add r14, 28h ; '('
mov rdi, rbx
mov rsi, r14
call ma_pvio_get_handle
xor r15d, r15d
mov rdi, rbx
mov esi, 1
xor edx, edx
call ma_pvio_blocking
mov rdi, rbx
call ma_pvio_fast_send
loc_33661:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_net_init(long long a1, long long a2)
{
unsigned long long v2; // r13
long long v3; // rax
unsigned int v4; // r15d
long long v5; // r12
unsigned long long v6; // rax
v2 = net_buffer_length;
v3 = malloc(net_buffer_length);
*(_QWORD *)(a1 + 8) = v3;
v4 = 1;
if ( v3 && *(_QWORD *)(a1 + 672) )
{
v5 = v3;
v4 = 0;
memset(v3, 0LL, v2);
v6 = max_allowed_packet;
if ( v2 > max_allowed_packet )
v6 = v2;
*(_QWORD *)(a1 + 88) = v6;
*(_QWORD *)(a1 + 80) = v2;
*(_QWORD *)(a1 + 16) = v2 + v5;
*(_QWORD *)a1 = a2;
*(_BYTE *)(a1 + 148) = 0;
*(_QWORD *)(a1 + 120) = 0LL;
*(_DWORD *)(a1 + 108) = net_read_timeout;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 32) = v5;
*(_QWORD *)(a1 + 24) = v5;
*(_BYTE *)(a1 + 663) = 0;
*(_BYTE *)(a1 + 151) = 0;
*(_BYTE *)(a1 + 132) = 0;
*(_BYTE *)(a1 + 128) = 0;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 144) = 0;
if ( a2 )
{
ma_pvio_get_handle(a2);
v4 = 0;
ma_pvio_blocking(a2, 1);
ma_pvio_fast_send(a2);
}
}
return v4;
}
|
ma_net_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0x14dbe0]
MOV R13,qword ptr [RAX]
MOV RDI,R13
CALL 0x00113600
MOV qword ptr [R14 + 0x8],RAX
MOV R15D,0x1
TEST RAX,RAX
JZ 0x00133661
CMP qword ptr [R14 + 0x2a0],0x0
JZ 0x00133661
MOV R12,RAX
XOR R15D,R15D
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00113260
LEA RAX,[0x14dbc8]
MOV RAX,qword ptr [RAX]
CMP R13,RAX
CMOVA RAX,R13
MOV qword ptr [R14 + 0x58],RAX
MOV qword ptr [R14 + 0x50],R13
MOV RAX,R12
ADD RAX,R13
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14],RBX
MOV byte ptr [R14 + 0x94],R15B
MOV qword ptr [R14 + 0x78],R15
LEA RAX,[0x14dbd0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R14 + 0x6c],EAX
MOV qword ptr [R14 + 0x60],R15
MOV qword ptr [R14 + 0x20],R12
MOV qword ptr [R14 + 0x18],R12
MOV byte ptr [R14 + 0x297],R15B
MOV byte ptr [R14 + 0x97],R15B
MOV byte ptr [R14 + 0x84],R15B
MOV byte ptr [R14 + 0x80],R15B
MOV qword ptr [R14 + 0x30],R15
MOV qword ptr [R14 + 0x48],R15
MOV dword ptr [R14 + 0x90],0x0
TEST RBX,RBX
JZ 0x00133661
ADD R14,0x28
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011fb9f
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
CALL 0x0011f8cc
MOV RDI,RBX
CALL 0x0011f678
LAB_00133661:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_net_init(long *param_1,long param_2)
{
size_t __n;
void *__s;
ulong uVar1;
int8 uVar2;
__n = net_buffer_length;
__s = malloc(net_buffer_length);
param_1[1] = (long)__s;
uVar2 = 1;
if ((__s != (void *)0x0) && (param_1[0x54] != 0)) {
uVar2 = 0;
memset(__s,0,__n);
uVar1 = max_allowed_packet;
if (max_allowed_packet < __n) {
uVar1 = __n;
}
param_1[0xb] = uVar1;
param_1[10] = __n;
param_1[2] = (long)__s + __n;
*param_1 = param_2;
*(int1 *)((long)param_1 + 0x94) = 0;
param_1[0xf] = 0;
*(int4 *)((long)param_1 + 0x6c) = net_read_timeout;
param_1[0xc] = 0;
param_1[4] = (long)__s;
param_1[3] = (long)__s;
*(int1 *)((long)param_1 + 0x297) = 0;
*(int1 *)((long)param_1 + 0x97) = 0;
*(int1 *)((long)param_1 + 0x84) = 0;
*(int1 *)(param_1 + 0x10) = 0;
param_1[6] = 0;
param_1[9] = 0;
*(int4 *)(param_1 + 0x12) = 0;
if (param_2 != 0) {
ma_pvio_get_handle(param_2,param_1 + 5);
uVar2 = 0;
ma_pvio_blocking(param_2,1,0);
ma_pvio_fast_send(param_2);
}
}
return uVar2;
}
|
|
10,940 |
auth_old_password
|
eloqsql/libmariadb/plugins/auth/old_password.c
|
static int auth_old_password(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
{
uchar *pkt;
int pkt_len;
if (((MCPVIO_EXT *)vio)->mysql_change_user)
{
/*
in mysql_change_user() the client sends the first packet.
we use the old scramble.
*/
pkt= (uchar*)mysql->scramble_buff;
}
else
{
/* read the scramble */
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
return CR_ERROR;
if (pkt_len != SCRAMBLE_LENGTH_323 + 1 &&
pkt_len != SCRAMBLE_LENGTH + 1)
return CR_SERVER_HANDSHAKE_ERR;
/* save it in MYSQL */
memmove(mysql->scramble_buff, pkt, pkt_len - 1);
mysql->scramble_buff[pkt_len - 1] = 0;
}
if (mysql && mysql->passwd[0])
{
char scrambled[SCRAMBLE_LENGTH_323 + 1];
ma_scramble_323(scrambled, (char*)pkt, mysql->passwd);
if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1))
return CR_ERROR;
}
else
if (vio->write_packet(vio, 0, 0)) /* no password */
return CR_ERROR;
return CR_OK;
}
|
O3
|
c
|
auth_old_password:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
cmpb $0x0, 0x48(%rdi)
je 0x8bdde
leaq 0x48e(%r14), %rax
movq %rax, -0x40(%rbp)
testq %r14, %r14
jne 0x8be1e
jmp 0x8be51
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq *(%rbx)
testl %eax, %eax
js 0x8be4c
movl %eax, %r12d
cmpl $0x15, %eax
je 0x8bdff
movl $0x7dc, %r15d # imm = 0x7DC
cmpl $0x9, %r12d
jne 0x8be68
leaq 0x48e(%r14), %rdi
movq -0x40(%rbp), %rsi
decl %r12d
movq %r12, %rdx
callq 0x5f190
movb $0x0, 0x48e(%r14,%r12)
movq 0x2c0(%r14), %rdx
cmpb $0x0, (%rdx)
je 0x8be51
movq -0x40(%rbp), %rsi
leaq -0x31(%rbp), %r14
movq %r14, %rdi
callq 0x8fe0a
movq %rbx, %rdi
movq %r14, %rsi
movl $0x9, %edx
callq *0x8(%rbx)
testl %eax, %eax
je 0x8be62
xorl %r15d, %r15d
jmp 0x8be68
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *0x8(%rbx)
testl %eax, %eax
jne 0x8be68
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x8be87
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x5f320
|
auth_old_password:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
cmp byte ptr [rdi+48h], 0
jz short loc_8BDDE
lea rax, [r14+48Eh]
mov [rbp+var_40], rax
test r14, r14
jnz short loc_8BE1E
jmp short loc_8BE51
loc_8BDDE:
lea rsi, [rbp+var_40]
mov rdi, rbx
call qword ptr [rbx]
test eax, eax
js short loc_8BE4C
mov r12d, eax
cmp eax, 15h
jz short loc_8BDFF
mov r15d, 7DCh
cmp r12d, 9
jnz short loc_8BE68
loc_8BDFF:
lea rdi, [r14+48Eh]
mov rsi, [rbp+var_40]
dec r12d
mov rdx, r12
call _memmove
mov byte ptr [r14+r12+48Eh], 0
loc_8BE1E:
mov rdx, [r14+2C0h]
cmp byte ptr [rdx], 0
jz short loc_8BE51
mov rsi, [rbp+var_40]
lea r14, [rbp+var_31]
mov rdi, r14
call ma_scramble_323
mov rdi, rbx
mov rsi, r14
mov edx, 9
call qword ptr [rbx+8]
test eax, eax
jz short loc_8BE62
loc_8BE4C:
xor r15d, r15d
jmp short loc_8BE68
loc_8BE51:
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor edx, edx
call qword ptr [rbx+8]
test eax, eax
jnz short loc_8BE68
loc_8BE62:
mov r15d, 0FFFFFFFFh
loc_8BE68:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_8BE87
mov eax, r15d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8BE87:
call ___stack_chk_fail
|
long long auth_old_password(long long a1, long long a2)
{
int v2; // eax
unsigned int v3; // r15d
unsigned int v4; // r12d
long long v6; // [rsp+0h] [rbp-40h] BYREF
_BYTE v7[9]; // [rsp+Fh] [rbp-31h] BYREF
unsigned long long v8; // [rsp+18h] [rbp-28h]
v8 = __readfsqword(0x28u);
if ( !*(_BYTE *)(a1 + 72) )
{
v2 = (*(long long ( **)(long long, long long *))a1)(a1, &v6);
if ( v2 < 0 )
return 0;
if ( v2 != 21 )
{
v3 = 2012;
if ( v2 != 9 )
return v3;
}
v4 = v2 - 1;
memmove(a2 + 1166, v6, (unsigned int)(v2 - 1));
*(_BYTE *)(a2 + v4 + 1166) = 0;
LABEL_8:
if ( !**(_BYTE **)(a2 + 704) )
goto LABEL_11;
ma_scramble_323(v7, v6);
if ( !(*(unsigned int ( **)(long long, _BYTE *, long long))(a1 + 8))(a1, v7, 9LL) )
return (unsigned int)-1;
return 0;
}
v6 = a2 + 1166;
if ( a2 )
goto LABEL_8;
LABEL_11:
v3 = 0;
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 8))(a1, 0LL, 0LL) )
return (unsigned int)-1;
return v3;
}
|
auth_old_password:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CMP byte ptr [RDI + 0x48],0x0
JZ 0x0018bdde
LEA RAX,[R14 + 0x48e]
MOV qword ptr [RBP + -0x40],RAX
TEST R14,R14
JNZ 0x0018be1e
JMP 0x0018be51
LAB_0018bdde:
LEA RSI,[RBP + -0x40]
MOV RDI,RBX
CALL qword ptr [RBX]
TEST EAX,EAX
JS 0x0018be4c
MOV R12D,EAX
CMP EAX,0x15
JZ 0x0018bdff
MOV R15D,0x7dc
CMP R12D,0x9
JNZ 0x0018be68
LAB_0018bdff:
LEA RDI,[R14 + 0x48e]
MOV RSI,qword ptr [RBP + -0x40]
DEC R12D
MOV RDX,R12
CALL 0x0015f190
MOV byte ptr [R14 + R12*0x1 + 0x48e],0x0
LAB_0018be1e:
MOV RDX,qword ptr [R14 + 0x2c0]
CMP byte ptr [RDX],0x0
JZ 0x0018be51
MOV RSI,qword ptr [RBP + -0x40]
LEA R14,[RBP + -0x31]
MOV RDI,R14
CALL 0x0018fe0a
MOV RDI,RBX
MOV RSI,R14
MOV EDX,0x9
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x0018be62
LAB_0018be4c:
XOR R15D,R15D
JMP 0x0018be68
LAB_0018be51:
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JNZ 0x0018be68
LAB_0018be62:
MOV R15D,0xffffffff
LAB_0018be68:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0018be87
MOV EAX,R15D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018be87:
CALL 0x0015f320
|
int8 auth_old_password(int8 *param_1,long param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
void *local_48;
int1 local_39 [9];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (*(char *)(param_1 + 9) == '\0') {
iVar1 = (*(code *)*param_1)(param_1,&local_48);
if (-1 < iVar1) {
if ((iVar1 != 0x15) && (uVar2 = 0x7dc, iVar1 != 9)) goto LAB_0018be68;
memmove((void *)(param_2 + 0x48e),local_48,(ulong)(iVar1 - 1));
*(int1 *)(param_2 + 0x48e + (ulong)(iVar1 - 1)) = 0;
goto LAB_0018be1e;
}
LAB_0018be4c:
uVar2 = 0;
goto LAB_0018be68;
}
local_48 = (void *)(param_2 + 0x48e);
if (param_2 == 0) {
LAB_0018be51:
uVar2 = 0;
iVar1 = (*(code *)param_1[1])(param_1,0,0);
if (iVar1 != 0) goto LAB_0018be68;
}
else {
LAB_0018be1e:
if (**(char **)(param_2 + 0x2c0) == '\0') goto LAB_0018be51;
ma_scramble_323(local_39,local_48);
iVar1 = (*(code *)param_1[1])(param_1,local_39,9);
if (iVar1 != 0) goto LAB_0018be4c;
}
uVar2 = 0xffffffff;
LAB_0018be68:
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar2;
}
|
|
10,941 |
ma_tls_close
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
my_bool ma_tls_close(MARIADB_TLS *ctls)
{
int i, rc;
SSL *ssl;
SSL_CTX *ctx= NULL;
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
ctx= SSL_get_SSL_CTX(ssl);
if (ctx)
SSL_CTX_free(ctx);
SSL_set_quiet_shutdown(ssl, 1);
/* 2 x pending + 2 * data = 4 */
for (i=0; i < 4; i++)
if ((rc= SSL_shutdown(ssl)))
break;
/* Since we transferred ownership of BIO to ssl, BIO will
automatically freed - no need for an explicit BIO_free_all */
SSL_free(ssl);
ctls->ssl= NULL;
return rc;
}
|
O3
|
c
|
ma_tls_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %r15b
testq %rdi, %rdi
je 0x2b493
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x2b493
movq %r14, %rdi
callq 0x130f0
testq %rax, %rax
je 0x2b455
movq %rax, %rdi
callq 0x13090
movq %r14, %rdi
movl $0x1, %esi
callq 0x134a0
movl $0x3, %r12d
movq %r14, %rdi
callq 0x13510
movl %eax, %r15d
subl $0x1, %r12d
setb %al
testl %r15d, %r15d
jne 0x2b483
testb %al, %al
je 0x2b468
movq %r14, %rdi
callq 0x13280
movq $0x0, 0x10(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ma_tls_close:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15b, 1
test rdi, rdi
jz short loc_2B493
mov rbx, rdi
mov r14, [rdi+10h]
test r14, r14
jz short loc_2B493
mov rdi, r14
call _SSL_get_SSL_CTX
test rax, rax
jz short loc_2B455
mov rdi, rax
call _SSL_CTX_free
loc_2B455:
mov rdi, r14
mov esi, 1
call _SSL_set_quiet_shutdown
mov r12d, 3
loc_2B468:
mov rdi, r14
call _SSL_shutdown
mov r15d, eax
sub r12d, 1
setb al
test r15d, r15d
jnz short loc_2B483
test al, al
jz short loc_2B468
loc_2B483:
mov rdi, r14
call _SSL_free
mov qword ptr [rbx+10h], 0
loc_2B493:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_tls_close(long long a1)
{
unsigned int v1; // r15d
long long v2; // r14
long long SSL_CTX; // rax
int v4; // r12d
bool v5; // cf
LOBYTE(v1) = 1;
if ( a1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 )
{
SSL_CTX = SSL_get_SSL_CTX(*(_QWORD *)(a1 + 16));
if ( SSL_CTX )
SSL_CTX_free(SSL_CTX);
SSL_set_quiet_shutdown(v2, 1LL);
v4 = 3;
do
{
v1 = SSL_shutdown(v2);
v5 = v4-- == 0;
}
while ( !v1 && !v5 );
SSL_free(v2);
*(_QWORD *)(a1 + 16) = 0LL;
}
}
return v1;
}
|
ma_tls_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15B,0x1
TEST RDI,RDI
JZ 0x0012b493
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x10]
TEST R14,R14
JZ 0x0012b493
MOV RDI,R14
CALL 0x001130f0
TEST RAX,RAX
JZ 0x0012b455
MOV RDI,RAX
CALL 0x00113090
LAB_0012b455:
MOV RDI,R14
MOV ESI,0x1
CALL 0x001134a0
MOV R12D,0x3
LAB_0012b468:
MOV RDI,R14
CALL 0x00113510
MOV R15D,EAX
SUB R12D,0x1
SETC AL
TEST R15D,R15D
JNZ 0x0012b483
TEST AL,AL
JZ 0x0012b468
LAB_0012b483:
MOV RDI,R14
CALL 0x00113280
MOV qword ptr [RBX + 0x10],0x0
LAB_0012b493:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong ma_tls_close(long param_1)
{
SSL *ssl;
uint uVar1;
SSL_CTX *pSVar2;
int iVar3;
int8 unaff_R15;
ulong uVar4;
bool bVar5;
uVar4 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1);
if ((param_1 != 0) && (ssl = *(SSL **)(param_1 + 0x10), ssl != (SSL *)0x0)) {
pSVar2 = SSL_get_SSL_CTX(ssl);
if (pSVar2 != (SSL_CTX *)0x0) {
SSL_CTX_free(pSVar2);
}
SSL_set_quiet_shutdown(ssl,1);
iVar3 = 3;
do {
uVar1 = SSL_shutdown(ssl);
uVar4 = (ulong)uVar1;
bVar5 = iVar3 != 0;
iVar3 = iVar3 + -1;
if (uVar1 != 0) break;
} while (bVar5);
SSL_free(ssl);
*(int8 *)(param_1 + 0x10) = 0;
}
return uVar4 & 0xffffffff;
}
|
|
10,942 |
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;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom():
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xa5a40
cmpl $0xef, %eax
jne 0xa451b
movq 0x10(%rsp), %rdi
callq 0xa5a40
movl %eax, %ecx
xorl %eax, %eax
cmpl $0xbb, %ecx
movb %al, 0xf(%rsp)
jne 0xa450f
movq 0x10(%rsp), %rdi
callq 0xa5a40
cmpl $0xbf, %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0xa452a
movq 0x10(%rsp), %rdi
callq 0xa5b20
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
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:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]
mov [rsp+28h+var_18], 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
jnz short loc_A451B
mov rdi, [rsp+28h+var_18]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov ecx, eax
xor eax, eax
cmp ecx, 0BBh
mov [rsp+28h+var_19], al
jnz short loc_A450F
mov rdi, [rsp+28h+var_18]
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
mov [rsp+28h+var_19], al
loc_A450F:
mov al, [rsp+28h+var_19]
and al, 1
mov [rsp+28h+var_1], al
jmp short loc_A452A
loc_A451B:
mov rdi, [rsp+28h+var_18]
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 [rsp+28h+var_1], 1
loc_A452A:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
|
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(
long long a1)
{
bool v2; // [rsp+Fh] [rbp-19h]
if ( (unsigned int)((long long (*)(void))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)() == 239 )
{
v2 = 0;
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) == 187 )
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) == 191;
return v2;
}
else
{
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:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001a5a40
CMP EAX,0xef
JNZ 0x001a451b
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a5a40
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0xbb
MOV byte ptr [RSP + 0xf],AL
JNZ 0x001a450f
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a5a40
CMP EAX,0xbf
SETZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_001a450f:
MOV AL,byte ptr [RSP + 0xf]
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
JMP 0x001a452a
LAB_001a451b:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001a5b20
MOV byte ptr [RSP + 0x27],0x1
LAB_001a452a:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::skip_bom() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::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;
int8 uVar2;
int7 uVar3;
int7 extraout_var;
int1 local_19;
int1 local_1;
iVar1 = get(this);
if (iVar1 == 0xef) {
iVar1 = get(this);
uVar3 = 0;
local_19 = false;
if (iVar1 == 0xbb) {
uVar2 = get(this);
local_19 = (int)uVar2 == 0xbf;
uVar3 = (int7)((ulong)uVar2 >> 8);
}
local_1 = local_19;
}
else {
unget(this);
local_1 = true;
uVar3 = extraout_var;
}
return CONCAT71(uVar3,local_1);
}
|
|
10,943 |
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 0x1b2d8
cmpl $0xef, %eax
je 0x58e3e
movq %rbx, %rdi
callq 0x59734
movb $0x1, %al
popq %rbx
retq
movq %rbx, %rdi
callq 0x1b2d8
cmpl $0xbb, %eax
je 0x58e51
xorl %eax, %eax
jmp 0x58e3c
movq %rbx, %rdi
callq 0x1b2d8
cmpl $0xbf, %eax
sete %al
jmp 0x58e3c
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_58E3E
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_58E3C:
pop rbx
retn
loc_58E3E:
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_58E51
xor eax, eax
jmp short loc_58E3C
loc_58E51:
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_58E3C
|
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 0x0011b2d8
CMP EAX,0xef
JZ 0x00158e3e
MOV RDI,RBX
CALL 0x00159734
MOV AL,0x1
LAB_00158e3c:
POP RBX
RET
LAB_00158e3e:
MOV RDI,RBX
CALL 0x0011b2d8
CMP EAX,0xbb
JZ 0x00158e51
XOR EAX,EAX
JMP 0x00158e3c
LAB_00158e51:
MOV RDI,RBX
CALL 0x0011b2d8
CMP EAX,0xbf
SETZ AL
JMP 0x00158e3c
|
/* 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;
}
|
|
10,944 |
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _resolve_ref(const std::string & ref) {
std::string ref_name = ref.substr(ref.find_last_of('/') + 1);
if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) {
_refs_being_resolved.insert(ref);
json resolved = _refs[ref];
ref_name = visit(resolved, ref_name);
_refs_being_resolved.erase(ref);
}
return ref_name;
}
|
O2
|
cpp
|
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2f
popq %rsi
pushq $-0x1
popq %r12
movq %rdx, %rdi
movq %r12, %rdx
callq 0x20d20
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0x20710
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0x879fe
leaq 0x30(%r15), %rcx
cmpq %rcx, %rax
jne 0x89994
leaq 0x90(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x8ac14
testq %rax, %rax
jne 0x89994
movq %r12, %rdi
movq %r14, %rsi
callq 0x71834
leaq 0x58(%r15), %rdi
movq %r14, %rsi
callq 0x8ac42
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x2b5c6
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x87b84
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20830
movq %r15, %rdi
callq 0x20d78
movq %r12, %rdi
movq %r14, %rsi
callq 0x8b040
leaq 0x8(%rsp), %rdi
callq 0x2b1f0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x899a5
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2b1f0
jmp 0x899bd
jmp 0x899ba
jmp 0x899ba
jmp 0x899ba
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d78
movq %r14, %rdi
callq 0x20b90
nop
|
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
push 2Fh ; '/'
pop rsi
push 0FFFFFFFFFFFFFFFFh
pop r12
mov rdi, rdx
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
lea rdx, [rax+1]
mov rdi, rbx
mov rsi, r14
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [r15+28h]
mov rsi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
lea rcx, [r15+30h]
cmp rax, rcx
jnz short loc_89994
lea r12, [r15+90h]
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&)
test rax, rax
jnz short loc_89994
mov rdi, r12
mov rsi, r14
call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&)
lea rdi, [r15+58h]
mov rsi, r14
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,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>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&)
lea rdi, [rsp+58h+var_50]
mov rsi, rax
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&)
lea rdi, [rsp+58h+var_40]
lea rdx, [rsp+58h+var_50]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&)
lea r15, [rsp+58h+var_40]
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(std::integral_constant<bool,true>,std::string const&)
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_89994:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_899A5:
mov r14, rax
lea rdi, [rsp+arg_0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_899BD
jmp short loc_899BA
jmp short loc_899BA
jmp short $+2
loc_899BA:
mov r14, rax
loc_899BD:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4)
{
long long v5; // rax
long long v6; // rdx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rax
_BYTE v16[16]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v17[8]; // [rsp+18h] [rbp-40h] BYREF
v5 = std::string::rfind(a3, 47LL, -1LL);
std::string::substr(a1, a3, v5 + 1, -1LL);
if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
a2 + 40,
a1) == a2 + 48
&& !std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(
a2 + 144,
a3) )
{
std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(
a2 + 144,
a3,
v6,
v7,
v8,
v9);
v14 = std::__detail::_Map_base<std::string,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>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](
(int)a2 + 88,
a3,
v10,
v11,
v12,
v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v16,
v14);
SchemaConverter::visit(v17, a2, (long long)v16, a1, a4);
std::string::operator=(a1, v17);
std::string::~string(v17);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(
a2 + 144,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16);
}
return a1;
}
|
_resolve_ref:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
PUSH 0x2f
POP RSI
PUSH -0x1
POP R12
MOV RDI,RDX
MOV RDX,R12
CALL 0x00120d20
LEA RDX,[RAX + 0x1]
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R12
CALL 0x00120710
LEA RDI,[R15 + 0x28]
LAB_00189906:
MOV RSI,RBX
CALL 0x001879fe
LEA RCX,[R15 + 0x30]
CMP RAX,RCX
JNZ 0x00189994
LEA R12,[R15 + 0x90]
LAB_0018991e:
MOV RDI,R12
MOV RSI,R14
CALL 0x0018ac14
TEST RAX,RAX
JNZ 0x00189994
LAB_0018992e:
MOV RDI,R12
MOV RSI,R14
CALL 0x00171834
LEA RDI,[R15 + 0x58]
LAB_0018993d:
MOV RSI,R14
CALL 0x0018ac42
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x0012b5c6
LAB_00189952:
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x00187b84
LEA R15,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00120830
MOV RDI,R15
CALL 0x00120d78
LAB_0018997f:
MOV RDI,R12
MOV RSI,R14
CALL 0x0018b040
LAB_0018998a:
LEA RDI,[RSP + 0x8]
CALL 0x0012b1f0
LAB_00189994:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */
string * SchemaConverter::_resolve_ref(string *param_1)
{
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*this;
string *psVar1;
long lVar2;
basic_json *pbVar3;
string *in_RDX;
string *in_RSI;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_50 [16];
basic_json local_40 [32];
std::__cxx11::string::rfind((char)in_RDX,0x2f);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX);
/* try { // try from 00189906 to 0018990d has its CatchHandler @ 001899ba */
psVar1 = (string *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(in_RSI + 0x28),param_1);
if (psVar1 == in_RSI + 0x30) {
this = (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(in_RSI + 0x90);
/* try { // try from 0018991e to 00189928 has its CatchHandler @ 001899b8 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::find(this,in_RDX);
if (lVar2 == 0) {
/* try { // try from 0018992e to 00189938 has its CatchHandler @ 001899b4 */
std::__detail::
_Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::insert((string *)this);
/* try { // try from 0018993d to 00189951 has its CatchHandler @ 001899b6 */
pbVar3 = (basic_json *)
std::__detail::
_Map_base<std::__cxx11::string,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
::operator[]((_Map_base<std::__cxx11::string,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
*)(in_RSI + 0x58),in_RDX);
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_50,pbVar3);
/* try { // try from 00189952 to 00189966 has its CatchHandler @ 001899a5 */
visit(local_40,in_RSI);
std::__cxx11::string::operator=(param_1,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
/* try { // try from 0018997f to 00189989 has its CatchHandler @ 001899a3 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_erase(this);
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_50);
}
}
return param_1;
}
|
|
10,945 |
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
|
llama.cpp/common/minja/minja.hpp
|
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const {
if (!callable_) throw std::runtime_error("Value is not callable: " + dump());
return (*callable_)(context, args);
}
|
O3
|
cpp
|
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq 0x30(%rsi), %rsi
testq %rsi, %rsi
je 0xef2e5
cmpq $0x0, 0x10(%rsi)
je 0xef340
movq %rdi, %rbx
callq *0x18(%rsi)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x23850
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xdb44c
leaq 0x57f00(%rip), %rsi # 0x14720b
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xd4cec
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x23590
xorl %ebp, %ebp
movq 0x9fc8f(%rip), %rsi # 0x18efc0
movq 0x9fc48(%rip), %rdx # 0x18ef80
movq %rbx, %rdi
callq 0x23e00
callq 0x24970
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xef363
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x231f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xef37e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x231f0
testb %bpl, %bpl
jne 0xef3a8
jmp 0xef3b0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xef3a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x231f0
jmp 0xef3a8
movq %rax, %r14
movq %rbx, %rdi
callq 0x24440
movq %r14, %rdi
callq 0x23ee0
|
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rsi, [rsi+30h]
test rsi, rsi
jz short loc_EF2E5
cmp qword ptr [rsi+10h], 0
jz short loc_EF340
mov rbx, rdi
call qword ptr [rsi+18h]
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_EF2E5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotCall; "Value is not callable: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_EF340:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_EF363
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EF363:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_EF37E
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EF37E:
test bpl, bpl
jnz short loc_EF3A8
jmp short loc_EF3B0
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_EF3A8
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_EF3A8
mov r14, rax
loc_EF3A8:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_EF3B0:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::call(long long a1, long long a2)
{
long long v3; // rsi
void *exception; // rbx
_BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v7[2]; // [rsp+20h] [rbp-38h] BYREF
v3 = *(_QWORD *)(a2 + 48);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0);
std::operator+<char>(v7, (long long)"Value is not callable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !*(_QWORD *)(v3 + 16) )
std::__throw_bad_function_call();
(*(void (**)(void))(v3 + 24))();
return a1;
}
|
call:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x30]
TEST RSI,RSI
JZ 0x001ef2e5
CMP qword ptr [RSI + 0x10],0x0
JZ 0x001ef340
MOV RBX,RDI
CALL qword ptr [RSI + 0x18]
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001ef2e5:
MOV EDI,0x10
CALL 0x00123850
MOV RBX,RAX
LAB_001ef2f2:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001db44c
LAB_001ef304:
LEA RSI,[0x24720b]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001d4cec
MOV BPL,0x1
LAB_001ef31b:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00123590
XOR EBP,EBP
MOV RSI,qword ptr [0x0028efc0]
MOV RDX,qword ptr [0x0028ef80]
MOV RDI,RBX
CALL 0x00123e00
LAB_001ef340:
CALL 0x00124970
|
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */
shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2)
{
long lVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
lVar1 = *(long *)(param_2 + 0x30);
if (lVar1 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ef2f2 to 001ef303 has its CatchHandler @ 001ef3a5 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0));
/* try { // try from 001ef304 to 001ef317 has its CatchHandler @ 001ef385 */
std::operator+((char *)local_38,(string *)"Value is not callable: ");
/* try { // try from 001ef31b to 001ef33f has its CatchHandler @ 001ef345 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0028efc0,PTR__runtime_error_0028ef80);
}
if (*(long *)(lVar1 + 0x10) != 0) {
(**(code **)(lVar1 + 0x18))();
return param_1;
}
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
|
|
10,946 |
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
|
monkey531[P]llama/common/minja.hpp
|
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) {
if (var_names.size() == 1) {
Value name(var_names[0]);
context->set(name, item);
} else {
if (!item.is_array() || item.size() != var_names.size()) {
throw std::runtime_error("Mismatched number of variables and items in destructuring assignment");
}
for (size_t i = 0; i < var_names.size(); ++i) {
context->set(var_names[i], item.at(i));
}
}
}
|
O0
|
cpp
|
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&):
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq %rdx, 0xf0(%rsp)
movq 0x100(%rsp), %rdi
callq 0x93b90
cmpq $0x1, %rax
jne 0xfc99c
movq 0x100(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xfe870
movq %rax, %rsi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1210f0
movq 0xf8(%rsp), %rdi
callq 0x132a80
movq 0x30(%rsp), %rsi
movq %rax, %rdi
movq 0xf0(%rsp), %rdx
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0xfc964
leaq 0xa0(%rsp), %rdi
callq 0x119980
jmp 0xfcb1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x119980
jmp 0xfcb27
movq 0xf0(%rsp), %rdi
callq 0x11b9f0
testb $0x1, %al
jne 0xfc9af
jmp 0xfc9db
movq 0xf0(%rsp), %rdi
callq 0x132700
movq %rax, 0x28(%rsp)
movq 0x100(%rsp), %rdi
callq 0x93b90
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
je 0xfca39
movl $0x10, %edi
callq 0x5b740
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
leaq 0x11bdf8(%rip), %rsi # 0x2187ef
callq 0x5b4a0
jmp 0xfc9fe
movq 0x20(%rsp), %rdi
movq 0x1ae5a6(%rip), %rsi # 0x2aafb0
movq 0x1ae567(%rip), %rdx # 0x2aaf78
callq 0x5bc30
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x5c130
jmp 0xfcb27
movq $0x0, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x100(%rsp), %rdi
callq 0x93b90
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0xfcb1d
movq 0xf8(%rsp), %rdi
callq 0x132a80
movq %rax, 0x8(%rsp)
movq 0x100(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0xfe870
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x1210f0
movq 0xf0(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x1328b0
movq %rax, 0x10(%rsp)
jmp 0xfcac0
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
leaq 0x38(%rsp), %rsi
callq *%rax
jmp 0xfcada
leaq 0x38(%rsp), %rdi
callq 0x119980
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0xfca45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x119980
jmp 0xfcb27
jmp 0xfcb1f
addq $0x108, %rsp # imm = 0x108
retq
movq 0x98(%rsp), %rdi
callq 0x5bd10
nopw %cs:(%rax,%rax)
|
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE:
sub rsp, 108h
mov [rsp+108h+var_8], rdi
mov [rsp+108h+var_10], rsi
mov [rsp+108h+var_18], rdx
mov rdi, [rsp+108h+var_8]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
cmp rax, 1
jnz loc_FC99C
mov rdi, [rsp+108h+var_8]
xor eax, eax
mov esi, eax
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+108h+var_68]
mov [rsp+108h+var_D8], rdi
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+108h+var_10]
call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, [rsp+108h+var_D8]
mov rdi, rax
mov rdx, [rsp+108h+var_18]
mov rax, [rdi]
mov rax, [rax+28h]
call rax
jmp short $+2
loc_FC964:
lea rdi, [rsp+108h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_FCB1F
mov rcx, rax
mov eax, edx
mov [rsp+108h+var_70], rcx
mov [rsp+108h+var_74], eax
lea rdi, [rsp+108h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_FCB27
loc_FC99C:
mov rdi, [rsp+108h+var_18]; this
call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void)
test al, 1
jnz short loc_FC9AF
jmp short loc_FC9DB
loc_FC9AF:
mov rdi, [rsp+108h+var_18]; this
call _ZNK5minja5Value4sizeEv; minja::Value::size(void)
mov [rsp+108h+var_E0], rax
mov rdi, [rsp+108h+var_8]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rsp+108h+var_E0]
cmp rax, rcx
jz short loc_FCA39
loc_FC9DB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+108h+var_E8], rax
lea rsi, aMismatchedNumb; "Mismatched number of variables and item"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_FC9FE:
mov rdi, [rsp+108h+var_E8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+108h+var_E8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+108h+var_70], rcx
mov [rsp+108h+var_74], eax
call ___cxa_free_exception
jmp loc_FCB27
loc_FCA39:
mov [rsp+108h+var_80], 0
loc_FCA45:
mov rax, [rsp+108h+var_80]
mov [rsp+108h+var_F0], rax
mov rdi, [rsp+108h+var_8]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rsp+108h+var_F0]
cmp rax, rcx
jnb loc_FCB1D
mov rdi, [rsp+108h+var_10]
call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov [rsp+108h+var_100], rax
mov rdi, [rsp+108h+var_8]
mov rsi, [rsp+108h+var_80]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+108h+var_D0]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+108h+var_18]; this
mov rsi, [rsp+108h+var_80]; unsigned __int64
call _ZN5minja5Value2atEm; minja::Value::at(ulong)
mov [rsp+108h+var_F8], rax
jmp short $+2
loc_FCAC0:
mov rdx, [rsp+108h+var_F8]
mov rdi, [rsp+108h+var_100]
mov rax, [rdi]
mov rax, [rax+28h]
lea rsi, [rsp+108h+var_D0]
call rax
jmp short $+2
loc_FCADA:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, [rsp+108h+var_80]
add rax, 1
mov [rsp+108h+var_80], rax
jmp loc_FCA45
mov rcx, rax
mov eax, edx
mov [rsp+108h+var_70], rcx
mov [rsp+108h+var_74], eax
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_FCB27
loc_FCB1D:
jmp short $+2
loc_FCB1F:
add rsp, 108h
retn
loc_FCB27:
mov rdi, [rsp+108h+var_70]
call __Unwind_Resume
|
void minja::destructuring_assign(_QWORD *a1, long long a2, minja::Value *a3)
{
int v3; // eax
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // rax
int v9; // eax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // [rsp+8h] [rbp-100h]
long long v15; // [rsp+10h] [rbp-F8h]
unsigned long long v16; // [rsp+18h] [rbp-F0h]
std::runtime_error *exception; // [rsp+20h] [rbp-E8h]
long long v18; // [rsp+28h] [rbp-E0h]
_BYTE v19[80]; // [rsp+38h] [rbp-D0h] BYREF
unsigned long long i; // [rsp+88h] [rbp-80h]
_BYTE v21[80]; // [rsp+A0h] [rbp-68h] BYREF
minja::Value *v22; // [rsp+F0h] [rbp-18h]
long long v23; // [rsp+F8h] [rbp-10h]
_QWORD *v24; // [rsp+100h] [rbp-8h]
v24 = a1;
v23 = a2;
v22 = a3;
if ( std::vector<std::string>::size(a1) == 1 )
{
v3 = std::vector<std::string>::operator[](v24, 0LL);
minja::Value::Value((unsigned int)v21, v3, v4, v5, v6, v7);
v8 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23);
(*(void ( **)(long long, _BYTE *, minja::Value *))(*(_QWORD *)v8 + 40LL))(v8, v21, v22);
minja::Value::~Value((minja::Value *)v21);
}
else
{
if ( (minja::Value::is_array(v22) & 1) == 0
|| (v18 = minja::Value::size(v22), v18 != std::vector<std::string>::size(v24)) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(
exception,
"Mismatched number of variables and items in destructuring assignment");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
for ( i = 0LL; ; ++i )
{
v16 = i;
if ( v16 >= std::vector<std::string>::size(v24) )
break;
v14 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23);
v9 = std::vector<std::string>::operator[](v24, i);
minja::Value::Value((unsigned int)v19, v9, v10, v11, v12, v13);
v15 = minja::Value::at(v22, i);
(*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v14 + 40LL))(v14, v19, v15);
minja::Value::~Value((minja::Value *)v19);
}
}
}
|
destructuring_assign:
SUB RSP,0x108
MOV qword ptr [RSP + 0x100],RDI
MOV qword ptr [RSP + 0xf8],RSI
MOV qword ptr [RSP + 0xf0],RDX
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x00193b90
CMP RAX,0x1
JNZ 0x001fc99c
MOV RDI,qword ptr [RSP + 0x100]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001fe870
MOV RSI,RAX
LEA RDI,[RSP + 0xa0]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x002210f0
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x00232a80
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,RAX
MOV RDX,qword ptr [RSP + 0xf0]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x28]
LAB_001fc960:
CALL RAX
LAB_001fc962:
JMP 0x001fc964
LAB_001fc964:
LEA RDI,[RSP + 0xa0]
CALL 0x00219980
JMP 0x001fcb1f
LAB_001fc99c:
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x0021b9f0
TEST AL,0x1
JNZ 0x001fc9af
JMP 0x001fc9db
LAB_001fc9af:
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x00232700
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x00193b90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,RCX
JZ 0x001fca39
LAB_001fc9db:
MOV EDI,0x10
CALL 0x0015b740
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
LAB_001fc9f0:
LEA RSI,[0x3187ef]
CALL 0x0015b4a0
LAB_001fc9fc:
JMP 0x001fc9fe
LAB_001fc9fe:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [0x003aafb0]
MOV RDX,qword ptr [0x003aaf78]
CALL 0x0015bc30
LAB_001fca39:
MOV qword ptr [RSP + 0x88],0x0
LAB_001fca45:
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x00193b90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP RAX,RCX
JNC 0x001fcb1d
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x00232a80
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x001fe870
MOV RSI,RAX
LEA RDI,[RSP + 0x38]
CALL 0x002210f0
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0x88]
LAB_001fcab4:
CALL 0x002328b0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001fcac0
LAB_001fcac0:
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x38]
CALL RAX
LAB_001fcad8:
JMP 0x001fcada
LAB_001fcada:
LEA RDI,[RSP + 0x38]
CALL 0x00219980
MOV RAX,qword ptr [RSP + 0x88]
ADD RAX,0x1
MOV qword ptr [RSP + 0x88],RAX
JMP 0x001fca45
LAB_001fcb1d:
JMP 0x001fcb1f
LAB_001fcb1f:
ADD RSP,0x108
RET
|
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */
void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3)
{
long lVar1;
string *psVar2;
long *plVar3;
ulong uVar4;
long lVar5;
runtime_error *this;
ulong uVar6;
int8 uVar7;
Value local_d0 [80];
ulong local_80;
Value local_68 [80];
Value *local_18;
shared_ptr *local_10;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1;
lVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
if (lVar1 == 1) {
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
(local_8,0);
Value::Value(local_68,psVar2);
plVar3 = (long *)std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_10);
/* try { // try from 001fc960 to 001fc961 has its CatchHandler @ 001fc976 */
(**(code **)(*plVar3 + 0x28))(plVar3,local_68,local_18);
Value::~Value(local_68);
return;
}
uVar4 = Value::is_array(local_18);
if ((uVar4 & 1) != 0) {
lVar1 = Value::size(local_18);
lVar5 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_8);
if (lVar1 == lVar5) {
for (local_80 = 0; uVar4 = local_80,
uVar6 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
(local_8), uVar4 < uVar6; local_80 = local_80 + 1) {
plVar3 = (long *)std::
__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_10);
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
(local_8,local_80);
Value::Value(local_d0,psVar2);
/* try { // try from 001fcab4 to 001fcad7 has its CatchHandler @ 001fcafd */
uVar7 = Value::at(local_18,local_80);
(**(code **)(*plVar3 + 0x28))(plVar3,local_d0,uVar7);
Value::~Value(local_d0);
}
return;
}
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001fc9f0 to 001fc9fb has its CatchHandler @ 001fca16 */
std::runtime_error::runtime_error
(this,"Mismatched number of variables and items in destructuring assignment");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_003aafb0,PTR__runtime_error_003aaf78);
}
|
|
10,947 |
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
|
monkey531[P]llama/common/minja.hpp
|
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) {
if (var_names.size() == 1) {
Value name(var_names[0]);
context->set(name, item);
} else {
if (!item.is_array() || item.size() != var_names.size()) {
throw std::runtime_error("Mismatched number of variables and items in destructuring assignment");
}
for (size_t i = 0; i < var_names.size(); ++i) {
context->set(var_names[i], item.at(i));
}
}
}
|
O2
|
cpp
|
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %rbp
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
cmpq $0x20, %rax
jne 0x5aa6a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x6896e
movq (%rbp), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %rbx, %rdx
callq *0x28(%rax)
leaq 0x8(%rsp), %rdi
callq 0x65990
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x10(%rbx)
je 0x5aafa
movq %rdi, %r15
movq %rbx, %rdi
callq 0x6d91c
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %rcx, %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jne 0x5aafa
movq %rbx, (%rsp)
xorl %r14d, %r14d
leaq 0x8(%rsp), %r12
xorl %r13d, %r13d
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %r13
jae 0x5aa5b
movq %rbp, %rbx
movq (%rbp), %rbp
addq %r14, %rsi
movq %r12, %rdi
callq 0x6896e
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x6da24
movq (%rbp), %rcx
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq *0x28(%rcx)
movq %r12, %rdi
callq 0x65990
incq %r13
movq (%r15), %rsi
movq 0x8(%r15), %rcx
addq $0x20, %r14
movq %rbx, %rbp
jmp 0x5aaa5
pushq $0x10
popq %rdi
callq 0x24520
movq %rax, %r14
leaq 0x5c2f8(%rip), %rsi # 0xb6e04
movq %rax, %rdi
callq 0x24390
movq 0xa64d5(%rip), %rsi # 0x100ff0
movq 0xa6436(%rip), %rdx # 0x100f58
movq %r14, %rdi
callq 0x25150
movq %rax, %rbx
movq %r14, %rdi
callq 0x247a0
jmp 0x5ab46
jmp 0x5ab39
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x65990
movq %rbx, %rdi
callq 0x251e0
|
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdx
mov rbp, rsi
mov rsi, [rdi]
mov rax, [rdi+8]
sub rax, rsi
cmp rax, 20h ; ' '
jnz short loc_5AA6A
lea r15, [rsp+88h+var_80]
mov rdi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rbp+0]
mov rax, [rdi]
mov rsi, r15
mov rdx, rbx
call qword ptr [rax+28h]
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5AA5B:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5AA6A:
cmp qword ptr [rbx+10h], 0
jz loc_5AAFA
mov r15, rdi
mov rdi, rbx; this
call _ZNK5minja5Value4sizeEv; minja::Value::size(void)
mov rsi, [r15]
mov rcx, [r15+8]
mov rdx, rcx
sub rdx, rsi
sar rdx, 5
cmp rax, rdx
jnz short loc_5AAFA
mov [rsp+88h+var_88], rbx
xor r14d, r14d
lea r12, [rsp+88h+var_80]
xor r13d, r13d
loc_5AAA5:
sub rcx, rsi
sar rcx, 5
cmp r13, rcx
jnb short loc_5AA5B
mov rbx, rbp
mov rbp, [rbp+0]
add rsi, r14
mov rdi, r12
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+88h+var_88]; this
mov rsi, r13; unsigned __int64
call _ZN5minja5Value2atEm; minja::Value::at(ulong)
mov rcx, [rbp+0]
mov rdi, rbp
mov rsi, r12
mov rdx, rax
call qword ptr [rcx+28h]
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
inc r13
mov rsi, [r15]
mov rcx, [r15+8]
add r14, 20h ; ' '
mov rbp, rbx
jmp short loc_5AAA5
loc_5AAFA:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aMismatchedNumb; "Mismatched number of variables and item"...
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, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5AB46
jmp short $+2
loc_5AB39:
mov rbx, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5AB46:
mov rdi, rbx
call __Unwind_Resume
|
void minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3)
{
_QWORD *v4; // rbp
long long v5; // rax
long long v6; // rsi
long long v7; // rcx
long long v8; // r14
unsigned long long v9; // r13
_QWORD *v10; // rbx
long long v11; // rbp
long long v12; // rax
std::runtime_error *exception; // r14
minja::Value *v14; // [rsp+0h] [rbp-88h]
_BYTE v15[128]; // [rsp+8h] [rbp-80h] BYREF
v4 = a2;
if ( a1[1] - *a1 == 32LL )
{
minja::Value::Value(v15, *a1);
(*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v15, a3);
minja::Value::~Value((minja::Value *)v15);
}
else
{
if ( !*((_QWORD *)a3 + 2) || (v5 = minja::Value::size(a3), v6 = *a1, v7 = a1[1], v5 != (v7 - *a1) >> 5) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(
exception,
"Mismatched number of variables and items in destructuring assignment");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v14 = a3;
v8 = 0LL;
v9 = 0LL;
while ( v9 < (v7 - v6) >> 5 )
{
v10 = v4;
v11 = *v4;
minja::Value::Value(v15, v8 + v6);
v12 = minja::Value::at(v14, v9);
(*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v11 + 40LL))(v11, v15, v12);
minja::Value::~Value((minja::Value *)v15);
++v9;
v6 = *a1;
v7 = a1[1];
v8 += 32LL;
v4 = v10;
}
}
}
|
destructuring_assign:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDX
MOV RBP,RSI
MOV RSI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,RSI
CMP RAX,0x20
JNZ 0x0015aa6a
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0016896e
MOV RDI,qword ptr [RBP]
MOV RAX,qword ptr [RDI]
LAB_0015aa48:
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX + 0x28]
LAB_0015aa51:
LEA RDI,[RSP + 0x8]
CALL 0x00165990
LAB_0015aa5b:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015aa6a:
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0015aafa
MOV R15,RDI
MOV RDI,RBX
CALL 0x0016d91c
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RCX
SUB RDX,RSI
SAR RDX,0x5
CMP RAX,RDX
JNZ 0x0015aafa
MOV qword ptr [RSP],RBX
XOR R14D,R14D
LEA R12,[RSP + 0x8]
XOR R13D,R13D
LAB_0015aaa5:
SUB RCX,RSI
SAR RCX,0x5
CMP R13,RCX
JNC 0x0015aa5b
MOV RBX,RBP
MOV RBP,qword ptr [RBP]
ADD RSI,R14
MOV RDI,R12
CALL 0x0016896e
LAB_0015aac3:
MOV RDI,qword ptr [RSP]
MOV RSI,R13
CALL 0x0016da24
MOV RCX,qword ptr [RBP]
MOV RDI,RBP
MOV RSI,R12
MOV RDX,RAX
CALL qword ptr [RCX + 0x28]
LAB_0015aadf:
MOV RDI,R12
CALL 0x00165990
INC R13
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
ADD R14,0x20
MOV RBP,RBX
JMP 0x0015aaa5
LAB_0015aafa:
PUSH 0x10
POP RDI
CALL 0x00124520
MOV R14,RAX
LAB_0015ab05:
LEA RSI,[0x1b6e04]
MOV RDI,RAX
CALL 0x00124390
LAB_0015ab14:
MOV RSI,qword ptr [0x00200ff0]
MOV RDX,qword ptr [0x00200f58]
MOV RDI,R14
CALL 0x00125150
|
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */
void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3)
{
long *plVar1;
long lVar2;
int8 uVar3;
runtime_error *this;
long lVar4;
long lVar5;
ulong uVar6;
Value local_80 [80];
if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) {
Value::Value(local_80,*(string **)param_1);
/* try { // try from 0015aa48 to 0015aa50 has its CatchHandler @ 0015ab37 */
(**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3);
Value::~Value(local_80);
return;
}
if (*(long *)(param_3 + 0x10) != 0) {
lVar2 = Value::size(param_3);
lVar5 = *(long *)param_1;
lVar4 = *(long *)(param_1 + 8);
if (lVar2 == lVar4 - lVar5 >> 5) {
lVar2 = 0;
for (uVar6 = 0; uVar6 < (ulong)(lVar4 - lVar5 >> 5); uVar6 = uVar6 + 1) {
plVar1 = *(long **)param_2;
Value::Value(local_80,(string *)(lVar5 + lVar2));
/* try { // try from 0015aac3 to 0015aade has its CatchHandler @ 0015ab39 */
uVar3 = Value::at(param_3,uVar6);
(**(code **)(*plVar1 + 0x28))(plVar1,local_80,uVar3);
Value::~Value(local_80);
lVar5 = *(long *)param_1;
lVar4 = *(long *)(param_1 + 8);
lVar2 = lVar2 + 0x20;
}
return;
}
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015ab05 to 0015ab13 has its CatchHandler @ 0015ab2a */
std::runtime_error::runtime_error
(this,"Mismatched number of variables and items in destructuring assignment");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f58);
}
|
|
10,948 |
my_mb_wc_filename
|
eloqsql/strings/ctype-utf8.c
|
static int
my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int byte1, byte2;
if (s >= e)
return MY_CS_TOOSMALL;
if (*s < 128 && filename_safe_char[*s])
{
*pwc= *s;
return 1;
}
if (*s != MY_FILENAME_ESCAPE)
return MY_CS_ILSEQ;
if (s + 3 > e)
return MY_CS_TOOSMALL3;
byte1= s[1];
if (byte1 == 0)
return MY_CS_ILSEQ; /* avoid possible out-of-bounds read */
byte2= s[2];
if (byte1 >= 0x30 && byte1 <= 0x7F &&
byte2 >= 0x30 && byte2 <= 0x7F)
{
int code= (byte1 - 0x30) * 80 + byte2 - 0x30;
if (code < 5994 && touni[code])
{
*pwc= touni[code];
return 3;
}
if (byte1 == '@' && byte2 == '@')
{
*pwc= 0;
return 3;
}
}
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if ((byte1= hexlo(byte1)) >= 0 &&
(byte2= hexlo(byte2)) >= 0)
{
int byte3= hexlo(s[3]);
int byte4= hexlo(s[3] ? s[4] : 0);
if (byte3 >=0 && byte4 >=0)
{
*pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4;
return 5;
}
}
return MY_CS_ILSEQ;
}
|
O3
|
c
|
my_mb_wc_filename:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x521d6
movsbq (%rdx), %r8
testq %r8, %r8
js 0x521d4
leaq 0x281f92(%rip), %rdi # 0x2d4070
movl $0x1, %eax
cmpb $0x0, (%r8,%rdi)
je 0x520f2
movq %r8, (%rsi)
jmp 0x521d6
cmpb $0x40, %r8b
jne 0x521d4
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x521d6
movzbl 0x1(%rdx), %r10d
testl %r10d, %r10d
je 0x521d4
movb 0x2(%rdx), %al
movzbl %al, %r9d
cmpb $0x30, %r10b
setge %al
cmpb $0x30, %r9b
setge %r8b
andb %al, %r8b
cmpb $0x1, %r8b
jne 0x5218d
leal (%r10,%r10,4), %eax
shll $0x4, %eax
addl %r9d, %eax
addl $0xfffff100, %eax # imm = 0xFFFFF100
cmpl $0x1799, %eax # imm = 0x1799
jg 0x5216f
addl $-0x30, %eax
leaq 0x281f95(%rip), %r8 # 0x2d40f0
movzwl (%r8,%rax,2), %r8d
testq %r8, %r8
je 0x5216f
movl $0x3, %eax
jmp 0x520ea
movl %r10d, %eax
xorb $0x40, %al
movl %r9d, %r8d
xorb $0x40, %r8b
orb %al, %r8b
jne 0x5218d
movl $0x3, %eax
xorl %r8d, %r8d
jmp 0x520ea
addq $0x4, %rdx
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rdx
ja 0x521d6
movl %r10d, %eax
leaq 0x284e2b(%rip), %r10 # 0x2d6fd0
movzbl (%rax,%r10), %ecx
testb %cl, %cl
js 0x521d4
movl %r9d, %eax
movzbl (%rax,%r10), %r9d
movl $0x0, %eax
testb %r9b, %r9b
js 0x521d6
movzbl (%rdi), %edi
xorl %eax, %eax
movzbl (%rdi,%r10), %r8d
testq %rdi, %rdi
je 0x521d8
movzbl (%rdx), %edx
jmp 0x521da
xorl %eax, %eax
popq %rbp
retq
xorl %edx, %edx
testb %r8b, %r8b
js 0x521d6
movb (%rdx,%r10), %dl
testb %dl, %dl
js 0x521d6
movzbl %dl, %eax
shll $0xc, %ecx
shll $0x8, %r9d
shll $0x4, %r8d
addq %rcx, %r8
addq %r9, %r8
addq %rax, %r8
movl $0x5, %eax
jmp 0x520ea
|
my_mb_wc_filename:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_521D6
movsx r8, byte ptr [rdx]
test r8, r8
js loc_521D4
lea rdi, filename_safe_char
mov eax, 1
cmp byte ptr [r8+rdi], 0
jz short loc_520F2
loc_520EA:
mov [rsi], r8
jmp loc_521D6
loc_520F2:
cmp r8b, 40h ; '@'
jnz loc_521D4
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_521D6
movzx r10d, byte ptr [rdx+1]
test r10d, r10d
jz loc_521D4
mov al, [rdx+2]
movzx r9d, al
cmp r10b, 30h ; '0'
setnl al
cmp r9b, 30h ; '0'
setnl r8b
and r8b, al
cmp r8b, 1
jnz short loc_5218D
lea eax, [r10+r10*4]
shl eax, 4
add eax, r9d
add eax, 0FFFFF100h
cmp eax, 1799h
jg short loc_5216F
add eax, 0FFFFFFD0h
lea r8, touni
movzx r8d, word ptr [r8+rax*2]
test r8, r8
jz short loc_5216F
mov eax, 3
jmp loc_520EA
loc_5216F:
mov eax, r10d
xor al, 40h
mov r8d, r9d
xor r8b, 40h
or r8b, al
jnz short loc_5218D
mov eax, 3
xor r8d, r8d
jmp loc_520EA
loc_5218D:
add rdx, 4
mov eax, 0FFFFFF98h
cmp rdx, rcx
ja short loc_521D6
mov eax, r10d
lea r10, hexlo_hex_lo_digit
movzx ecx, byte ptr [rax+r10]
test cl, cl
js short loc_521D4
mov eax, r9d
movzx r9d, byte ptr [rax+r10]
mov eax, 0
test r9b, r9b
js short loc_521D6
movzx edi, byte ptr [rdi]
xor eax, eax
movzx r8d, byte ptr [rdi+r10]
test rdi, rdi
jz short loc_521D8
movzx edx, byte ptr [rdx]
jmp short loc_521DA
loc_521D4:
xor eax, eax
loc_521D6:
pop rbp
retn
loc_521D8:
xor edx, edx
loc_521DA:
test r8b, r8b
js short loc_521D6
mov dl, [rdx+r10]
test dl, dl
js short loc_521D6
movzx eax, dl
shl ecx, 0Ch
shl r9d, 8
shl r8d, 4
add r8, rcx
add r8, r9
add r8, rax
mov eax, 5
jmp loc_520EA
|
long long my_mb_wc_filename(long long a1, signed long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
signed long long v5; // r8
unsigned __int8 *v6; // rdi
int v7; // r10d
int v8; // r9d
long long v9; // rax
unsigned __int8 *v10; // rdx
int v11; // ecx
int v12; // r9d
long long v13; // rdi
int v14; // r8d
long long v15; // rdx
char v16; // dl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( v5 < 0 )
return 0LL;
result = 1LL;
if ( filename_safe_char[v5] )
{
LABEL_4:
*a2 = v5;
return result;
}
if ( (_BYTE)v5 != 64 )
return 0LL;
v6 = (unsigned __int8 *)(a3 + 3);
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v7 = (unsigned __int8)a3[1];
if ( !a3[1] )
return 0LL;
v8 = (unsigned __int8)a3[2];
if ( (char)v7 >= 48 && (char)v8 >= 48 )
{
if ( v8 + 80 * v7 - 3840 <= 6041 )
{
v9 = (unsigned int)(v8 + 80 * v7 - 3888);
v5 = touni[v9];
if ( touni[v9] )
{
result = 3LL;
goto LABEL_4;
}
}
if ( !((unsigned __int8)v7 ^ 0x40 | (unsigned __int8)v8 ^ 0x40) )
{
result = 3LL;
v5 = 0LL;
goto LABEL_4;
}
}
v10 = (unsigned __int8 *)(a3 + 4);
result = 4294967192LL;
if ( (unsigned long long)v10 <= a4 )
{
v11 = hexlo_hex_lo_digit[v7];
if ( (v11 & 0x80u) == 0 )
{
v12 = hexlo_hex_lo_digit[v8];
result = 0LL;
if ( (v12 & 0x80u) == 0 )
{
v13 = *v6;
result = 0LL;
v14 = hexlo_hex_lo_digit[v13];
v15 = v13 ? *v10 : 0LL;
if ( (v14 & 0x80u) == 0 )
{
v16 = hexlo_hex_lo_digit[v15];
if ( v16 >= 0 )
{
v5 = (unsigned __int8)v16
+ (unsigned int)(v12 << 8)
+ (unsigned int)(v11 << 12)
+ (unsigned long long)(unsigned int)(16 * v14);
result = 5LL;
goto LABEL_4;
}
}
}
return result;
}
return 0LL;
}
return result;
}
|
my_mb_wc_filename:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001521d6
MOVSX R8,byte ptr [RDX]
TEST R8,R8
JS 0x001521d4
LEA RDI,[0x3d4070]
MOV EAX,0x1
CMP byte ptr [R8 + RDI*0x1],0x0
JZ 0x001520f2
LAB_001520ea:
MOV qword ptr [RSI],R8
JMP 0x001521d6
LAB_001520f2:
CMP R8B,0x40
JNZ 0x001521d4
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001521d6
MOVZX R10D,byte ptr [RDX + 0x1]
TEST R10D,R10D
JZ 0x001521d4
MOV AL,byte ptr [RDX + 0x2]
MOVZX R9D,AL
CMP R10B,0x30
SETGE AL
CMP R9B,0x30
SETGE R8B
AND R8B,AL
CMP R8B,0x1
JNZ 0x0015218d
LEA EAX,[R10 + R10*0x4]
SHL EAX,0x4
ADD EAX,R9D
ADD EAX,0xfffff100
CMP EAX,0x1799
JG 0x0015216f
ADD EAX,-0x30
LEA R8,[0x3d40f0]
MOVZX R8D,word ptr [R8 + RAX*0x2]
TEST R8,R8
JZ 0x0015216f
MOV EAX,0x3
JMP 0x001520ea
LAB_0015216f:
MOV EAX,R10D
XOR AL,0x40
MOV R8D,R9D
XOR R8B,0x40
OR R8B,AL
JNZ 0x0015218d
MOV EAX,0x3
XOR R8D,R8D
JMP 0x001520ea
LAB_0015218d:
ADD RDX,0x4
MOV EAX,0xffffff98
CMP RDX,RCX
JA 0x001521d6
MOV EAX,R10D
LEA R10,[0x3d6fd0]
MOVZX ECX,byte ptr [RAX + R10*0x1]
TEST CL,CL
JS 0x001521d4
MOV EAX,R9D
MOVZX R9D,byte ptr [RAX + R10*0x1]
MOV EAX,0x0
TEST R9B,R9B
JS 0x001521d6
MOVZX EDI,byte ptr [RDI]
XOR EAX,EAX
MOVZX R8D,byte ptr [RDI + R10*0x1]
TEST RDI,RDI
JZ 0x001521d8
MOVZX EDX,byte ptr [RDX]
JMP 0x001521da
LAB_001521d4:
XOR EAX,EAX
LAB_001521d6:
POP RBP
RET
LAB_001521d8:
XOR EDX,EDX
LAB_001521da:
TEST R8B,R8B
JS 0x001521d6
MOV DL,byte ptr [RDX + R10*0x1]
TEST DL,DL
JS 0x001521d6
MOVZX EAX,DL
SHL ECX,0xc
SHL R9D,0x8
SHL R8D,0x4
ADD R8,RCX
ADD R8,R9
ADD R8,RAX
MOV EAX,0x5
JMP 0x001520ea
|
int8 my_mb_wc_filename(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
ulong uVar6;
if (param_4 <= param_3) {
return 0xffffff9b;
}
uVar6 = (ulong)(char)*param_3;
if ((long)uVar6 < 0) {
return 0;
}
uVar4 = 1;
if (filename_safe_char[uVar6] != '\0') goto LAB_001520ea;
if (*param_3 == 0x40) {
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
bVar2 = param_3[1];
if (bVar2 == 0) {
return 0;
}
bVar1 = param_3[2];
if ('/' < (char)bVar1 && '/' < (char)bVar2) {
iVar3 = ((uint)bVar2 + (uint)bVar2 * 4) * 0x10 + (uint)bVar1;
if ((iVar3 + -0xf00 < 0x179a) &&
(uVar6 = (ulong)*(ushort *)(touni + (ulong)(iVar3 - 0xf30) * 2), uVar6 != 0)) {
uVar4 = 3;
goto LAB_001520ea;
}
if (bVar1 == 0x40 && bVar2 == 0x40) {
uVar4 = 3;
uVar6 = 0;
goto LAB_001520ea;
}
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
if (-1 < (char)hexlo_hex_lo_digit[bVar2]) {
if ((char)hexlo_hex_lo_digit[bVar1] < '\0') {
return 0;
}
uVar6 = (ulong)param_3[3];
if (uVar6 == 0) {
uVar5 = 0;
}
else {
uVar5 = (ulong)param_3[4];
}
if ((char)hexlo_hex_lo_digit[uVar6] < '\0') {
return 0;
}
if ((char)hexlo_hex_lo_digit[uVar5] < '\0') {
return 0;
}
uVar6 = (ulong)(byte)hexlo_hex_lo_digit[uVar6] * 0x10 +
(ulong)(byte)hexlo_hex_lo_digit[bVar2] * 0x1000 +
(ulong)(byte)hexlo_hex_lo_digit[bVar1] * 0x100 +
(ulong)(byte)hexlo_hex_lo_digit[uVar5];
uVar4 = 5;
LAB_001520ea:
*param_2 = uVar6;
return uVar4;
}
}
return 0;
}
|
|
10,949 |
my_once_alloc
|
eloqsql/mysys/my_once.c
|
void* my_once_alloc(size_t Size, myf MyFlags)
{
size_t get_size, max_left;
uchar* point;
reg1 USED_MEM *next;
reg2 USED_MEM **prev;
Size= ALIGN_SIZE(Size);
prev= &my_once_root_block;
max_left=0;
for (next=my_once_root_block ; next && next->left < Size ; next= next->next)
{
if (next->left > max_left)
max_left=next->left;
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= Size+ALIGN_SIZE(sizeof(USED_MEM));
if (max_left*4 < my_once_extra && get_size < my_once_extra)
get_size=my_once_extra; /* Normal alloc */
if ((next = (USED_MEM*) malloc(get_size)) == 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
next->next= 0;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
}
point= (uchar*) ((char*) next+ (next->size-next->left));
next->left-= Size;
if (MyFlags & MY_ZEROFILL)
bzero(point, Size);
return((void*) point);
}
|
O0
|
c
|
my_once_alloc:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x10(%rbp)
leaq 0xb8f2e5(%rip), %rax # 0xc83290
movq %rax, -0x40(%rbp)
movq $0x0, -0x28(%rbp)
leaq 0xb8f2d2(%rip), %rax # 0xc83290
movq (%rax), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x41(%rbp)
je 0xf3fe3
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xf3fec
jmp 0xf401b
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
jbe 0xf4006
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xf3fc5
cmpq $0x0, -0x38(%rbp)
jne 0xf40f4
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
shlq $0x2, %rax
leaq 0x1cbb8f(%rip), %rcx # 0x2bfbd0
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0xf4067
movq -0x20(%rbp), %rax
leaq 0x1cbb7d(%rip), %rcx # 0x2bfbd0
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0xf4067
leaq 0x1cbb6f(%rip), %rax # 0x2bfbd0
movl (%rax), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2a6d0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xf40be
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x48(%rbp)
callq 0xf60c0
movl -0x48(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xf40b1
movq -0x20(%rbp), %rdx
movl $0x5, %edi
movl $0x1004, %esi # imm = 0x1004
movb $0x0, %al
callq 0xefb70
movq $0x0, -0x8(%rbp)
jmp 0xf4147
jmp 0xf40c0
jmp 0xf40c2
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
subq $0x18, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x38(%rbp), %rdx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0xf413f
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x2a2c0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_once_alloc:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_10], rax
lea rax, my_once_root_block
mov [rbp+var_40], rax
mov [rbp+var_28], 0
lea rax, my_once_root_block
mov rax, [rax]
mov [rbp+var_38], rax
loc_F3FC5:
xor eax, eax
cmp [rbp+var_38], 0
mov [rbp+var_41], al
jz short loc_F3FE3
mov rax, [rbp+var_38]
mov rax, [rax+8]
cmp rax, [rbp+var_10]
setb al
mov [rbp+var_41], al
loc_F3FE3:
mov al, [rbp+var_41]
test al, 1
jnz short loc_F3FEC
jmp short loc_F401B
loc_F3FEC:
mov rax, [rbp+var_38]
mov rax, [rax+8]
cmp rax, [rbp+var_28]
jbe short loc_F4006
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_F4006:
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_38], rax
jmp short loc_F3FC5
loc_F401B:
cmp [rbp+var_38], 0
jnz loc_F40F4
mov rax, [rbp+var_10]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
shl rax, 2
lea rcx, my_once_extra
mov ecx, [rcx]
cmp rax, rcx
jnb short loc_F4067
mov rax, [rbp+var_20]
lea rcx, my_once_extra
mov ecx, [rcx]
cmp rax, rcx
jnb short loc_F4067
lea rax, my_once_extra
mov eax, [rax]
mov [rbp+var_20], rax
loc_F4067:
mov rdi, [rbp+var_20]
call _malloc
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_F40BE
call ___errno_location
mov eax, [rax]
mov [rbp+var_48], eax
call _my_thread_var
mov ecx, [rbp+var_48]
mov [rax], ecx
mov rax, [rbp+var_18]
and rax, 18h
cmp rax, 0
jz short loc_F40B1
mov rdx, [rbp+var_20]
mov edi, 5
mov esi, 1004h
mov al, 0
call my_error
loc_F40B1:
mov [rbp+var_8], 0
jmp loc_F4147
loc_F40BE:
jmp short $+2
loc_F40C0:
jmp short $+2
loc_F40C2:
mov rax, [rbp+var_38]
mov qword ptr [rax], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax+10h], rcx
mov rcx, [rbp+var_20]
sub rcx, 18h
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov [rax], rcx
loc_F40F4:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_38]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_38]
sub rcx, [rdx+8]
add rax, rcx
mov [rbp+var_30], rax
mov rdx, [rbp+var_10]
mov rax, [rbp+var_38]
mov rcx, [rax+8]
sub rcx, rdx
mov [rax+8], rcx
mov rax, [rbp+var_18]
and rax, 20h
cmp rax, 0
jz short loc_F413F
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
xor esi, esi
call _memset
loc_F413F:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_F4147:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
char * my_once_alloc(long long a1, const char *a2)
{
int v3; // [rsp+8h] [rbp-48h]
bool v4; // [rsp+Fh] [rbp-41h]
_QWORD *v5; // [rsp+10h] [rbp-40h]
_QWORD *i; // [rsp+18h] [rbp-38h]
char *v7; // [rsp+20h] [rbp-30h]
unsigned long long v8; // [rsp+28h] [rbp-28h]
unsigned long long v9; // [rsp+30h] [rbp-20h]
unsigned long long v10; // [rsp+40h] [rbp-10h]
v10 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v5 = &my_once_root_block;
v8 = 0LL;
for ( i = (_QWORD *)my_once_root_block; ; i = (_QWORD *)*i )
{
v4 = 0;
if ( i )
v4 = i[1] < v10;
if ( !v4 )
break;
if ( i[1] > v8 )
v8 = i[1];
v5 = i;
}
if ( !i )
{
v9 = v10 + 24;
if ( 4 * v8 < my_once_extra && v9 < my_once_extra )
v9 = my_once_extra;
i = (_QWORD *)malloc(v9);
if ( !i )
{
v3 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(v9, a2) = v3;
if ( ((unsigned __int8)a2 & 0x18) != 0 )
my_error(5u, 4100LL, v9);
return 0LL;
}
*i = 0LL;
i[2] = v9;
i[1] = v9 - 24;
*v5 = i;
}
v7 = (char *)i + i[2] - i[1];
i[1] -= v10;
if ( ((unsigned __int8)a2 & 0x20) != 0 )
memset(v7, 0LL, v10);
return v7;
}
|
my_once_alloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0xd83290]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x28],0x0
LEA RAX,[0xd83290]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_001f3fc5:
XOR EAX,EAX
CMP qword ptr [RBP + -0x38],0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x001f3fe3
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x10]
SETC AL
MOV byte ptr [RBP + -0x41],AL
LAB_001f3fe3:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001f3fec
JMP 0x001f401b
LAB_001f3fec:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001f4006
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f4006:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001f3fc5
LAB_001f401b:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001f40f4
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x2
LEA RCX,[0x3bfbd0]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x001f4067
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x3bfbd0]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x001f4067
LEA RAX,[0x3bfbd0]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_001f4067:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012a6d0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x001f40be
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x48],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001f40b1
MOV RDX,qword ptr [RBP + -0x20]
MOV EDI,0x5
MOV ESI,0x1004
MOV AL,0x0
CALL 0x001efb70
LAB_001f40b1:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001f4147
LAB_001f40be:
JMP 0x001f40c0
LAB_001f40c0:
JMP 0x001f40c2
LAB_001f40c2:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
LAB_001f40f4:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x38]
SUB RCX,qword ptr [RDX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x20
CMP RAX,0x0
JZ 0x001f413f
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x0012a2c0
LAB_001f413f:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f4147:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
void * my_once_alloc(long param_1,ulong param_2)
{
int iVar1;
ulong __n;
int *piVar2;
void *__s;
bool bVar3;
int8 *local_48;
int8 *local_40;
ulong local_30;
size_t local_28;
__n = param_1 + 7U & 0xfffffffffffffff8;
local_48 = &my_once_root_block;
local_30 = 0;
local_40 = my_once_root_block;
while( true ) {
bVar3 = false;
if (local_40 != (int8 *)0x0) {
bVar3 = (ulong)local_40[1] < __n;
}
if (!bVar3) break;
if (local_30 < (ulong)local_40[1]) {
local_30 = local_40[1];
}
local_48 = local_40;
local_40 = (int8 *)*local_40;
}
if (local_40 == (int8 *)0x0) {
local_28 = __n + 0x18;
if ((local_30 << 2 < (ulong)my_once_extra) && (local_28 < my_once_extra)) {
local_28 = (size_t)my_once_extra;
}
local_40 = (int8 *)malloc(local_28);
if (local_40 == (int8 *)0x0) {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((param_2 & 0x18) != 0) {
my_error(5,0x1004,local_28);
}
return (void *)0x0;
}
*local_40 = 0;
local_40[2] = local_28;
local_40[1] = local_28 - 0x18;
*local_48 = local_40;
}
__s = (void *)((long)local_40 + (local_40[2] - local_40[1]));
local_40[1] = local_40[1] - __n;
if ((param_2 & 0x20) != 0) {
memset(__s,0,__n);
}
return __s;
}
|
|
10,950 |
common_chat_format_name[abi:cxx11](common_chat_format)
|
llama.cpp/common/chat.cpp
|
std::string common_chat_format_name(common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only";
case COMMON_CHAT_FORMAT_GENERIC: return "Generic";
case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo";
case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x";
case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools";
case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1";
case COMMON_CHAT_FORMAT_DEEPSEEK_R1_EXTRACT_REASONING: return "DeepSeek R1 (extract reasoning)";
case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1";
case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro";
case COMMON_CHAT_FORMAT_HERMES_2_PRO_EXTRACT_REASONING: return "Hermes 2 Pro (extract reasoning)";
case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B";
case COMMON_CHAT_FORMAT_COMMAND_R7B_EXTRACT_REASONING: return "Command R7B (extract reasoning)";
default:
throw std::runtime_error("Unknown chat format");
}
}
|
O3
|
cpp
|
common_chat_format_name[abi:cxx11](common_chat_format):
pushq %r14
pushq %rbx
pushq %rax
cmpl $0xd, %esi
ja 0x9735f
movq %rdi, %rbx
movl %esi, %eax
leaq 0x86855(%rip), %rcx # 0x11da40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88127(%rip), %rsi # 0x11f329
leaq 0x8812c(%rip), %rdx # 0x11f335
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x881cb(%rip), %rsi # 0x11f3e7
leaq 0x881e4(%rip), %rdx # 0x11f407
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8811f(%rip), %rsi # 0x11f355
leaq 0x88134(%rip), %rdx # 0x11f371
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x881b8(%rip), %rsi # 0x11f408
leaq 0x881bc(%rip), %rdx # 0x11f413
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88155(%rip), %rsi # 0x11f3bf
leaq 0x88168(%rip), %rdx # 0x11f3d9
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x880ba(%rip), %rsi # 0x11f33e
leaq 0x880bf(%rip), %rdx # 0x11f34a
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x880ad(%rip), %rsi # 0x11f34b
leaq 0x880af(%rip), %rdx # 0x11f354
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x880e6(%rip), %rsi # 0x11f39e
leaq 0x880ee(%rip), %rdx # 0x11f3ad
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88064(%rip), %rsi # 0x11f336
leaq 0x88064(%rip), %rdx # 0x11f33d
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88089(%rip), %rsi # 0x11f372
leaq 0x8808d(%rip), %rdx # 0x11f37d
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88114(%rip), %rsi # 0x11f414
leaq 0x8812c(%rip), %rdx # 0x11f433
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88067(%rip), %rsi # 0x11f37e
leaq 0x8807f(%rip), %rdx # 0x11f39d
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x880ac(%rip), %rsi # 0x11f3da
leaq 0x880b1(%rip), %rdx # 0x11f3e6
jmp 0x9734c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x88069(%rip), %rsi # 0x11f3ae
leaq 0x88072(%rip), %rdx # 0x11f3be
movq %rbx, %rdi
callq 0x28e86
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20620
movq %rax, %rbx
leaq 0x880c1(%rip), %rsi # 0x11f434
movq %rax, %rdi
callq 0x20400
movq 0xcac3e(%rip), %rsi # 0x161fc0
movq 0xcabf7(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a30
movq %rax, %r14
movq %rbx, %rdi
callq 0x20eb0
movq %r14, %rdi
callq 0x20ad0
|
_Z23common_chat_format_nameB5cxx1118common_chat_format:
push r14
push rbx
push rax
cmp esi, 0Dh; switch 14 cases
ja def_971F2; jumptable 00000000000971F2 default case
mov rbx, rdi
mov eax, esi
lea rcx, jpt_971F2
movsxd rax, ds:(jpt_971F2 - 11DA40h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_971F4:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 0
mov [rbx], rax
lea rsi, aContentOnly; "Content-only"
lea rdx, aContentOnly+0Ch; ""
jmp loc_9734C
loc_9720E:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 11
mov [rbx], rax
lea rsi, aHermes2ProExtr; "Hermes 2 Pro (extract reasoning)"
lea rdx, aHermes2ProExtr+20h; ""
jmp loc_9734C
loc_97228:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 4
mov [rbx], rax
lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools"
lea rdx, aLlama3XWithBui+1Ch; ""
jmp loc_9734C
loc_97242:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 12
mov [rbx], rax
lea rsi, aCommandR7b; "Command R7B"
lea rdx, aCommandR7b+0Bh; ""
jmp loc_9734C
loc_9725C:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 9
mov [rbx], rax
lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1"
lea rdx, aFunctionaryV31+1Ah; ""
jmp loc_9734C
loc_97276:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 2
mov [rbx], rax
lea rsi, aMistralNemo; "Mistral Nemo"
lea rdx, aMistralNemo+0Ch; ""
jmp loc_9734C
loc_97290:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 3
mov [rbx], rax
lea rsi, aLlama3X; "Llama 3.x"
lea rdx, aLlama3X+9; ""
jmp loc_9734C
loc_972AA:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 7
mov [rbx], rax
lea rsi, aFirefunctionV2; "FireFunction v2"
lea rdx, aFirefunctionV2+0Fh; ""
jmp loc_9734C
loc_972C4:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 1
mov [rbx], rax
lea rsi, aGeneric; "Generic"
lea rdx, aGeneric+7; ""
jmp short loc_9734C
loc_972DB:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 5
mov [rbx], rax
lea rsi, aDeepseekR1; "DeepSeek R1"
lea rdx, aDeepseekR1+0Bh; ""
jmp short loc_9734C
loc_972F2:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 13
mov [rbx], rax
lea rsi, aCommandR7bExtr; "Command R7B (extract reasoning)"
lea rdx, aCommandR7bExtr+1Fh; ""
jmp short loc_9734C
loc_97309:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 6
mov [rbx], rax
lea rsi, aDeepseekR1Extr; "DeepSeek R1 (extract reasoning)"
lea rdx, aDeepseekR1Extr+1Fh; ""
jmp short loc_9734C
loc_97320:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 10
mov [rbx], rax
lea rsi, aHermes2Pro; "Hermes 2 Pro"
lea rdx, aHermes2Pro+0Ch; ""
jmp short loc_9734C
loc_97337:
lea rax, [rbx+10h]; jumptable 00000000000971F2 case 8
mov [rbx], rax
lea rsi, aFunctionaryV32; "Functionary v3.2"
lea rdx, aFunctionaryV32+10h; ""
loc_9734C:
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)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
def_971F2:
mov edi, 10h; jumptable 00000000000971F2 default case
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnknownChatFor; "Unknown chat format"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
std::runtime_error *exception; // rbx
switch ( a2 )
{
case 0:
*a1 = a1 + 2;
v2 = "Content-only";
v3 = "";
break;
case 1:
*a1 = a1 + 2;
v2 = "Generic";
v3 = "";
break;
case 2:
*a1 = a1 + 2;
v2 = "Mistral Nemo";
v3 = "";
break;
case 3:
*a1 = a1 + 2;
v2 = "Llama 3.x";
v3 = "";
break;
case 4:
*a1 = a1 + 2;
v2 = "Llama 3.x with builtin tools";
v3 = "";
break;
case 5:
*a1 = a1 + 2;
v2 = "DeepSeek R1";
v3 = "";
break;
case 6:
*a1 = a1 + 2;
v2 = "DeepSeek R1 (extract reasoning)";
v3 = "";
break;
case 7:
*a1 = a1 + 2;
v2 = "FireFunction v2";
v3 = "";
break;
case 8:
*a1 = a1 + 2;
v2 = "Functionary v3.2";
v3 = "";
break;
case 9:
*a1 = a1 + 2;
v2 = "Functionary v3.1 Llama 3.1";
v3 = "";
break;
case 10:
*a1 = a1 + 2;
v2 = "Hermes 2 Pro";
v3 = "";
break;
case 11:
*a1 = a1 + 2;
v2 = "Hermes 2 Pro (extract reasoning)";
v3 = "";
break;
case 12:
*a1 = a1 + 2;
v2 = "Command R7B";
v3 = "";
break;
case 13:
*a1 = a1 + 2;
v2 = "Command R7B (extract reasoning)";
v3 = "";
break;
default:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Unknown chat format");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3);
return a1;
}
|
common_chat_format_name[abi:cxx11]:
PUSH R14
PUSH RBX
PUSH RAX
CMP ESI,0xd
JA 0x0019735f
MOV RBX,RDI
MOV EAX,ESI
LEA RCX,[0x21da40]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f329]
LEA RDX,[0x21f335]
JMP 0x0019734c
caseD_b:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f3e7]
LEA RDX,[0x21f407]
JMP 0x0019734c
caseD_4:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f355]
LEA RDX,[0x21f371]
JMP 0x0019734c
caseD_c:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f408]
LEA RDX,[0x21f413]
JMP 0x0019734c
caseD_9:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f3bf]
LEA RDX,[0x21f3d9]
JMP 0x0019734c
caseD_2:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f33e]
LEA RDX,[0x21f34a]
JMP 0x0019734c
caseD_3:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f34b]
LEA RDX,[0x21f354]
JMP 0x0019734c
caseD_7:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f39e]
LEA RDX,[0x21f3ad]
JMP 0x0019734c
caseD_1:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f336]
LEA RDX,[0x21f33d]
JMP 0x0019734c
caseD_5:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f372]
LEA RDX,[0x21f37d]
JMP 0x0019734c
caseD_d:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f414]
LEA RDX,[0x21f433]
JMP 0x0019734c
caseD_6:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f37e]
LEA RDX,[0x21f39d]
JMP 0x0019734c
caseD_a:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f3da]
LEA RDX,[0x21f3e6]
JMP 0x0019734c
caseD_8:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x21f3ae]
LEA RDX,[0x21f3be]
LAB_0019734c:
MOV RDI,RBX
CALL 0x00128e86
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
default:
MOV EDI,0x10
CALL 0x00120620
MOV RBX,RAX
LAB_0019736c:
LEA RSI,[0x21f434]
MOV RDI,RAX
CALL 0x00120400
LAB_0019737b:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a30
|
/* common_chat_format_name[abi:cxx11](common_chat_format) */
long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2)
{
runtime_error *this;
char *pcVar1;
char *pcVar2;
switch(param_2) {
case 0:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Content-only";
pcVar1 = "";
break;
case 1:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Generic";
pcVar1 = "";
break;
case 2:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Mistral Nemo";
pcVar1 = "";
break;
case 3:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Llama 3.x";
pcVar1 = "";
break;
case 4:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Llama 3.x with builtin tools";
pcVar1 = "";
break;
case 5:
*param_1 = (long)(param_1 + 2);
pcVar2 = "DeepSeek R1";
pcVar1 = "";
break;
case 6:
*param_1 = (long)(param_1 + 2);
pcVar2 = "DeepSeek R1 (extract reasoning)";
pcVar1 = "";
break;
case 7:
*param_1 = (long)(param_1 + 2);
pcVar2 = "FireFunction v2";
pcVar1 = "";
break;
case 8:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Functionary v3.2";
pcVar1 = "";
break;
case 9:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Functionary v3.1 Llama 3.1";
pcVar1 = "";
break;
case 10:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Hermes 2 Pro";
pcVar1 = "";
break;
case 0xb:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Hermes 2 Pro (extract reasoning)";
pcVar1 = "";
break;
case 0xc:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Command R7B";
pcVar1 = "";
break;
case 0xd:
*param_1 = (long)(param_1 + 2);
pcVar2 = "Command R7B (extract reasoning)";
pcVar1 = "";
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019736c to 0019737a has its CatchHandler @ 00197391 */
std::runtime_error::runtime_error(this,"Unknown chat format");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1);
return param_1;
}
|
|
10,951 |
my_uca_coll_init_utf8mb4
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb4,
&my_uca_package_no_contractions_utf8mb4);
return FALSE;
}
|
O3
|
c
|
my_uca_coll_init_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3b3e0
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3e0f1
movzbl 0xb2(%rbx), %ecx
testq %rcx, %rcx
je 0x3e0a0
movq 0x60(%rbx), %rax
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
cmpq $0x0, 0x18(%rax,%rdx)
jne 0x3e0ef
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x3e08f
movq 0xc0(%rbx), %rcx
leaq 0x2e2d12(%rip), %rdx # 0x320dc0
cmpq (%rdx), %rcx
je 0x3e0d2
leaq 0x2e2d26(%rip), %rax # 0x320de0
cmpq 0x8(%rdx), %rcx
je 0x3e0db
cmpq 0x10(%rdx), %rcx
je 0x3e0e1
cmpq 0x18(%rdx), %rcx
jne 0x3e0ef
addq $0x18, %rax
jmp 0x3e0e5
leaq 0x2e2d07(%rip), %rax # 0x320de0
jmp 0x3e0e5
addq $0x8, %rax
jmp 0x3e0e5
addq $0x10, %rax
movq (%rax), %rax
movq %rax, 0xc0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
my_uca_coll_init_utf8mb4:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call my_coll_init_uca
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_3E0F1
movzx ecx, byte ptr [rbx+0B2h]
test rcx, rcx
jz short loc_3E0A0
mov rax, [rbx+60h]
imul rcx, 38h ; '8'
xor edx, edx
loc_3E08F:
cmp qword ptr [rax+rdx+18h], 0
jnz short loc_3E0EF
add rdx, 38h ; '8'
cmp rcx, rdx
jnz short loc_3E08F
loc_3E0A0:
mov rcx, [rbx+0C0h]
lea rdx, my_uca_package_utf8mb4
cmp rcx, [rdx]
jz short loc_3E0D2
lea rax, my_uca_package_no_contractions_utf8mb4
cmp rcx, [rdx+8]
jz short loc_3E0DB
cmp rcx, [rdx+10h]
jz short loc_3E0E1
cmp rcx, [rdx+18h]
jnz short loc_3E0EF
add rax, 18h
jmp short loc_3E0E5
loc_3E0D2:
lea rax, my_uca_package_no_contractions_utf8mb4
jmp short loc_3E0E5
loc_3E0DB:
add rax, 8
jmp short loc_3E0E5
loc_3E0E1:
add rax, 10h
loc_3E0E5:
mov rax, [rax]
mov [rbx+0C0h], rax
loc_3E0EF:
xor eax, eax
loc_3E0F1:
add rsp, 8
pop rbx
pop rbp
retn
|
char my_uca_coll_init_utf8mb4(
long long a1,
long long ( **a2)(unsigned long long, unsigned long long, const char *))
{
char inited; // cl
char result; // al
long long v4; // rdx
long long ( **v5)(); // rcx
long long ( ***v6)(); // rax
inited = my_coll_init_uca(a1, a2);
result = 1;
if ( !inited )
{
if ( *(_BYTE *)(a1 + 178) )
{
v4 = 0LL;
while ( !*(_QWORD *)(*(_QWORD *)(a1 + 96) + v4 + 24) )
{
v4 += 56LL;
if ( 56LL * *(unsigned __int8 *)(a1 + 178) == v4 )
goto LABEL_6;
}
return 0;
}
LABEL_6:
v5 = *(long long ( ***)())(a1 + 192);
if ( v5 == my_uca_package_utf8mb4[0] )
{
v6 = my_uca_package_no_contractions_utf8mb4;
}
else if ( v5 == my_uca_package_utf8mb4[1] )
{
v6 = &my_uca_package_no_contractions_utf8mb4[1];
}
else if ( v5 == my_uca_package_utf8mb4[2] )
{
v6 = &my_uca_package_no_contractions_utf8mb4[2];
}
else
{
if ( v5 != my_uca_package_utf8mb4[3] )
return 0;
v6 = &my_uca_package_no_contractions_utf8mb4[3];
}
*(_QWORD *)(a1 + 192) = *v6;
return 0;
}
return result;
}
|
my_uca_coll_init_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0013b3e0
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0013e0f1
MOVZX ECX,byte ptr [RBX + 0xb2]
TEST RCX,RCX
JZ 0x0013e0a0
MOV RAX,qword ptr [RBX + 0x60]
IMUL RCX,RCX,0x38
XOR EDX,EDX
LAB_0013e08f:
CMP qword ptr [RAX + RDX*0x1 + 0x18],0x0
JNZ 0x0013e0ef
ADD RDX,0x38
CMP RCX,RDX
JNZ 0x0013e08f
LAB_0013e0a0:
MOV RCX,qword ptr [RBX + 0xc0]
LEA RDX,[0x420dc0]
CMP RCX,qword ptr [RDX]
JZ 0x0013e0d2
LEA RAX,[0x420de0]
CMP RCX,qword ptr [RDX + 0x8]
JZ 0x0013e0db
CMP RCX,qword ptr [RDX + 0x10]
JZ 0x0013e0e1
CMP RCX,qword ptr [RDX + 0x18]
JNZ 0x0013e0ef
ADD RAX,0x18
JMP 0x0013e0e5
LAB_0013e0d2:
LEA RAX,[0x420de0]
JMP 0x0013e0e5
LAB_0013e0db:
ADD RAX,0x8
JMP 0x0013e0e5
LAB_0013e0e1:
ADD RAX,0x10
LAB_0013e0e5:
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0xc0],RAX
LAB_0013e0ef:
XOR EAX,EAX
LAB_0013e0f1:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 my_uca_coll_init_utf8mb4(long param_1)
{
int *puVar1;
char cVar2;
int **ppuVar3;
long lVar4;
cVar2 = my_coll_init_uca();
if (cVar2 != '\0') {
return 1;
}
if ((ulong)*(byte *)(param_1 + 0xb2) != 0) {
lVar4 = 0;
do {
if (*(long *)(*(long *)(param_1 + 0x60) + 0x18 + lVar4) != 0) {
return 0;
}
lVar4 = lVar4 + 0x38;
} while ((ulong)*(byte *)(param_1 + 0xb2) * 0x38 - lVar4 != 0);
}
puVar1 = *(int **)(param_1 + 0xc0);
if (puVar1 == my_uca_package_utf8mb4) {
ppuVar3 = &my_uca_package_no_contractions_utf8mb4;
}
else if (puVar1 == PTR_my_uca_collation_handler_nopad_utf8mb4_00420dc8) {
ppuVar3 = &PTR_my_uca_collation_handler_nopad_no_contractions_utf8mb4_00420de8;
}
else if (puVar1 == PTR_my_uca_collation_handler_multilevel_utf8mb4_00420dd0) {
ppuVar3 = &PTR_my_uca_collation_handler_multilevel_no_contractions_utf8mb4_00420df0;
}
else {
if (puVar1 != PTR_my_uca_collation_handler_nopad_multilevel_utf8mb4_00420dd8) {
return 0;
}
ppuVar3 = &PTR_my_uca_collation_handler_nopad_multilevel_no_contractions_utf8mb4_00420df8;
}
*(int **)(param_1 + 0xc0) = *ppuVar3;
return 0;
}
|
|
10,952 |
init_available_charsets
|
eloqsql/mysys/charset.c
|
static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
}
|
O0
|
c
|
init_available_charsets:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq 0x35d461(%rip), %rdi # 0x388d00
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x24180
leaq 0x3614be(%rip), %rdi # 0x38cd70
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x24180
leaq 0x35d137(%rip), %rax # 0x3889fc
movl (%rax), %edi
leaq 0x361432(%rip), %rsi # 0x38cd00
movl $0x10, %edx
leaq 0x24b0c6(%rip), %rcx # 0x2769a0
movl $0x40, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x1ab4(%rip), %rax # 0x2d3a0
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
callq 0x2ddc0
xorl %eax, %eax
movl %eax, %edi
callq 0x328d0
leaq 0x35d3d8(%rip), %rax # 0x388d00
movq %rax, -0x2d8(%rbp)
leaq 0x35d3ca(%rip), %rax # 0x388d00
addq $0x4000, %rax # imm = 0x4000
addq $-0x8, %rax
cmpq %rax, -0x2d8(%rbp)
jae 0x2b9a6
movq -0x2d8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2b990
jmp 0x2b958
jmp 0x2b95a
movq -0x2d8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0x2b98e
movq -0x2d8(%rbp), %rax
movq (%rax), %rdi
callq 0x2cf00
cmpb $0x0, %al
je 0x2b98c
movq -0x2d8(%rbp), %rax
movq $0x0, (%rax)
jmp 0x2b98e
jmp 0x2b990
jmp 0x2b992
movq -0x2d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x2d8(%rbp)
jmp 0x2b92f
leaq -0x2d0(%rbp), %rdi
callq 0x2aea0
leaq -0x220(%rbp), %rdi
callq 0x2b540
movq %rax, %rdi
leaq 0x4fde5(%rip), %rsi # 0x7b7ad
callq 0x24280
leaq -0x220(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x2d3e0
jmp 0x2b9e6
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ba01
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x242b0
nopw %cs:(%rax,%rax)
|
init_available_charsets:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, all_charsets
xor esi, esi
mov edx, 4000h
call _memset
lea rdi, my_collation_statistics
xor esi, esi
mov edx, 4000h
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
lea rsi, charset_name_hash
mov edx, 10h
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
xor eax, eax
mov r9d, eax
lea rax, get_charset_key
mov [rsp+300h+var_300], 0
mov [rsp+300h+var_2F8], rax
mov [rsp+300h+var_2F0], 0
mov [rsp+300h+var_2E8], 0
mov [rsp+300h+var_2E0], 1
call my_hash_init2
xor eax, eax
mov edi, eax
call init_compiled_charsets
lea rax, all_charsets
mov [rbp+var_2D8], rax
loc_2B92F:
lea rax, all_charsets
add rax, 4000h
add rax, 0FFFFFFFFFFFFFFF8h
cmp [rbp+var_2D8], rax
jnb short loc_2B9A6
mov rax, [rbp+var_2D8]
cmp qword ptr [rax], 0
jz short loc_2B990
jmp short $+2
loc_2B958:
jmp short $+2
loc_2B95A:
mov rax, [rbp+var_2D8]
mov rax, [rax]
cmp qword ptr [rax+40h], 0
jz short loc_2B98E
mov rax, [rbp+var_2D8]
mov rdi, [rax]
call init_state_maps
cmp al, 0
jz short loc_2B98C
mov rax, [rbp+var_2D8]
mov qword ptr [rax], 0
loc_2B98C:
jmp short $+2
loc_2B98E:
jmp short $+2
loc_2B990:
jmp short $+2
loc_2B992:
mov rax, [rbp+var_2D8]
add rax, 8
mov [rbp+var_2D8], rax
jmp short loc_2B92F
loc_2B9A6:
lea rdi, [rbp+var_2D0]
call my_charset_loader_init_mysys
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
lea rsi, [rbp+var_220]
lea rdi, [rbp+var_2D0]
xor eax, eax
mov edx, eax
call my_read_charset_file
jmp short $+2
loc_2B9E6:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2BA01
add rsp, 300h
pop rbp
retn
loc_2BA01:
call ___stack_chk_fail
|
unsigned long long init_available_charsets()
{
long long charsets_dir; // rax
_QWORD *i; // [rsp+28h] [rbp-2D8h]
_BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF
_BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF
unsigned long long v5; // [rsp+2F8h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
for ( i = all_charsets; i < &all_charsets[2047]; ++i )
{
if ( *i && *(_QWORD *)(*i + 64LL) )
{
if ( (unsigned __int8)init_state_maps(*i) )
*i = 0LL;
}
}
my_charset_loader_init_mysys((long long)v3);
charsets_dir = get_charsets_dir((long long)v4);
stpcpy(charsets_dir, "Index.xml");
my_read_charset_file(v3, v4, 0LL);
return __readfsqword(0x28u);
}
|
init_available_charsets:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x488d00]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00124180
LEA RDI,[0x48cd70]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00124180
LEA RAX,[0x4889fc]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x48cd00]
MOV EDX,0x10
LEA RCX,[0x3769a0]
MOV R8D,0x40
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x12d3a0]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x1
CALL 0x0012ddc0
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001328d0
LEA RAX,[0x488d00]
MOV qword ptr [RBP + -0x2d8],RAX
LAB_0012b92f:
LEA RAX,[0x488d00]
ADD RAX,0x4000
ADD RAX,-0x8
CMP qword ptr [RBP + -0x2d8],RAX
JNC 0x0012b9a6
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX],0x0
JZ 0x0012b990
JMP 0x0012b958
LAB_0012b958:
JMP 0x0012b95a
LAB_0012b95a:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x0012b98e
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX]
CALL 0x0012cf00
CMP AL,0x0
JZ 0x0012b98c
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX],0x0
LAB_0012b98c:
JMP 0x0012b98e
LAB_0012b98e:
JMP 0x0012b990
LAB_0012b990:
JMP 0x0012b992
LAB_0012b992:
MOV RAX,qword ptr [RBP + -0x2d8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x2d8],RAX
JMP 0x0012b92f
LAB_0012b9a6:
LEA RDI,[RBP + -0x2d0]
CALL 0x0012aea0
LEA RDI,[RBP + -0x220]
CALL 0x0012b540
MOV RDI,RAX
LEA RSI,[0x17b7ad]
CALL 0x00124280
LEA RSI,[RBP + -0x220]
LEA RDI,[RBP + -0x2d0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012d3e0
JMP 0x0012b9e6
LAB_0012b9e6:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012ba01
ADD RSP,0x300
POP RBP
RET
LAB_0012ba01:
CALL 0x001242b0
|
void init_available_charsets(void)
{
char cVar1;
char *__dest;
long in_FS_OFFSET;
long *local_2e0;
int1 local_2d8 [176];
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
for (local_2e0 = &all_charsets; local_2e0 < (long *)0x48ccf8; local_2e0 = local_2e0 + 1) {
if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) &&
(cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) {
*local_2e0 = 0;
}
}
my_charset_loader_init_mysys(local_2d8);
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_read_charset_file(local_2d8,local_228,0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
10,953 |
mj_EulerSkip
|
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_forward.c
|
void mj_EulerSkip(const mjModel* m, mjData* d, int skipfactor) {
TM_START;
int nv = m->nv, nM = m->nM;
mj_markStack(d);
mjtNum* qfrc = mj_stackAllocNum(d, nv);
mjtNum* qacc = mj_stackAllocNum(d, nv);
// check for dof damping if disable flag is not set
int dof_damping = 0;
if (!mjDISABLED(mjDSBL_EULERDAMP)) {
for (int i=0; i < nv; i++) {
if (m->dof_damping[i] > 0) {
dof_damping = 1;
break;
}
}
}
// no damping or disabled: explicit velocity integration
if (!dof_damping) {
mju_copy(qacc, d->qacc, nv);
}
// damping: integrate implicitly
else {
if (!skipfactor) {
mjtNum* MhB = mj_stackAllocNum(d, nM);
// MhB = M + h*diag(B)
mju_copy(MhB, d->qM, m->nM);
for (int i=0; i < nv; i++) {
MhB[m->dof_Madr[i]] += m->opt.timestep * m->dof_damping[i];
}
// factor
mj_factorI(m, d, MhB, d->qH, d->qHDiagInv, 0);
}
// solve
mju_add(qfrc, d->qfrc_smooth, d->qfrc_constraint, nv);
mju_copy(qacc, qfrc, m->nv);
mj_solveLD(m, qacc, 1, d->qH, d->qHDiagInv);
}
// advance state and time
mj_advance(m, d, d->act_dot, qacc, NULL);
mj_freeStack(d);
TM_END(mjTIMER_ADVANCE);
}
|
O3
|
c
|
mj_EulerSkip:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq 0x21ca35(%rip), %rax # 0x271e90
movq (%rax), %rax
testq %rax, %rax
je 0x55467
callq *%rax
jmp 0x5546b
vxorpd %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
movl 0x4(%r14), %ebp
movl %ebp, %r12d
movslq 0x104(%r14), %r13
movq %rbx, %rdi
callq 0x2d310
movslq %ebp, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2d370
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2d370
movq %rax, %r15
testb $0x40, 0x259(%r14)
sete %al
testl %ebp, %ebp
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x554df
movq 0x710(%r14), %rax
xorl %ecx, %ecx
vxorpd %xmm0, %xmm0, %xmm0
vmovsd (%rax,%rcx,8), %xmm1
vucomisd %xmm0, %xmm1
ja 0x554f6
incq %rcx
cmpq %rcx, %r12
jne 0x554cc
movq 0x277d0(%rbx), %rsi
movq %r15, %rdi
movl %r12d, %edx
callq 0x2d120
jmp 0x555c3
cmpl $0x0, 0x4(%rsp)
jne 0x55578
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2d370
movq %rax, %r13
movq 0x27928(%rbx), %rsi
movl 0x104(%r14), %edx
movq %rax, %rdi
callq 0x2d120
movq 0x6e0(%r14), %rax
movq 0x710(%r14), %rcx
xorl %edx, %edx
vmovsd 0x140(%r14), %xmm0
movslq (%rax,%rdx,4), %rsi
vmulsd (%rcx,%rdx,8), %xmm0, %xmm0
vaddsd (%r13,%rsi,8), %xmm0, %xmm0
vmovsd %xmm0, (%r13,%rsi,8)
incq %rdx
cmpq %rdx, %r12
jne 0x55531
movq 0x279c0(%rbx), %rcx
movq 0x279c8(%rbx), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %r9d, %r9d
callq 0x2d840
movq 0x27a20(%rbx), %rsi
movq 0x27a30(%rbx), %rdx
movq 0x10(%rsp), %r13
movq %r13, %rdi
movl %r12d, %ecx
callq 0x2d870
movl 0x4(%r14), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x2d120
movq 0x279c0(%rbx), %rcx
movq 0x279c8(%rbx), %r8
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x2d850
movq 0x277d8(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x55625
movq %rbx, %rdi
callq 0x2d340
movq 0x21c8a6(%rip), %rax # 0x271e90
movq (%rax), %rax
testq %rax, %rax
je 0x555f6
callq *%rax
jmp 0x555fa
vxorpd %xmm0, %xmm0, %xmm0
vsubsd 0x8(%rsp), %xmm0, %xmm0
vaddsd 0x4f8(%rbx), %xmm0, %xmm0
vmovsd %xmm0, 0x4f8(%rbx)
incl 0x500(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mj_EulerSkip:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_44], edx
mov rbx, rsi
mov r14, rdi
mov rax, cs:mjcb_time_ptr
mov rax, [rax]
test rax, rax
jz short loc_55467
call rax
jmp short loc_5546B
loc_55467:
vxorpd xmm0, xmm0, xmm0
loc_5546B:
vmovsd [rsp+48h+var_40], xmm0
mov ebp, [r14+4]
mov r12d, ebp
movsxd r13, dword ptr [r14+104h]
mov rdi, rbx
call _mj_markStack
movsxd rbp, ebp
mov rdi, rbx
mov rsi, rbp
call _mj_stackAllocNum
mov [rsp+48h+var_38], rax
mov rdi, rbx
mov rsi, rbp
call _mj_stackAllocNum
mov r15, rax
test byte ptr [r14+259h], 40h
setz al
test ebp, ebp
setnle cl
and cl, al
cmp cl, 1
jnz short loc_554DF
mov rax, [r14+710h]
xor ecx, ecx
vxorpd xmm0, xmm0, xmm0
loc_554CC:
vmovsd xmm1, qword ptr [rax+rcx*8]
vucomisd xmm1, xmm0
ja short loc_554F6
inc rcx
cmp r12, rcx
jnz short loc_554CC
loc_554DF:
mov rsi, [rbx+277D0h]
mov rdi, r15
mov edx, r12d
call _mju_copy
jmp loc_555C3
loc_554F6:
cmp [rsp+48h+var_44], 0
jnz short loc_55578
mov rdi, rbx
mov rsi, r13
call _mj_stackAllocNum
mov r13, rax
mov rsi, [rbx+27928h]
mov edx, [r14+104h]
mov rdi, rax
call _mju_copy
mov rax, [r14+6E0h]
mov rcx, [r14+710h]
xor edx, edx
loc_55531:
vmovsd xmm0, qword ptr [r14+140h]
movsxd rsi, dword ptr [rax+rdx*4]
vmulsd xmm0, xmm0, qword ptr [rcx+rdx*8]
vaddsd xmm0, xmm0, qword ptr [r13+rsi*8+0]
vmovsd qword ptr [r13+rsi*8+0], xmm0
inc rdx
cmp r12, rdx
jnz short loc_55531
mov rcx, qword ptr ds:stru_279C0.r_offset[rbx]
mov r8, [rbx+279C8h]
mov rdi, r14
mov rsi, rbx
mov rdx, r13
xor r9d, r9d
call _mj_factorI
loc_55578:
mov rsi, qword ptr ds:stru_27A20.r_offset[rbx]
mov rdx, [rbx+27A30h]
mov r13, [rsp+48h+var_38]
mov rdi, r13
mov ecx, r12d
call _mju_add
mov edx, [r14+4]
mov rdi, r15
mov rsi, r13
call _mju_copy
mov rcx, qword ptr ds:stru_279C0.r_offset[rbx]
mov r8, [rbx+279C8h]
mov rdi, r14
mov rsi, r15
mov edx, 1
call _mj_solveLD
loc_555C3:
mov rdx, [rbx+277D8h]
mov rdi, r14
mov rsi, rbx
mov rcx, r15
xor r8d, r8d
call mj_advance
mov rdi, rbx
call _mj_freeStack
mov rax, cs:mjcb_time_ptr
mov rax, [rax]
test rax, rax
jz short loc_555F6
call rax
jmp short loc_555FA
loc_555F6:
vxorpd xmm0, xmm0, xmm0
loc_555FA:
vsubsd xmm0, xmm0, [rsp+48h+var_40]
vaddsd xmm0, xmm0, qword ptr [rbx+4F8h]
vmovsd qword ptr [rbx+4F8h], xmm0
inc dword ptr [rbx+500h]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void mj_EulerSkip(long long a1, long long a2, long long a3, __m128 _XMM0, double a5, double a6, __m128 a7)
{
unsigned int v9; // ebp
unsigned long long v10; // r13
long long v11; // r15
bool v13; // cc
long long v17; // rax
long long v18; // rdx
__m128 v22; // xmm4
long long v23; // rdx
int v26; // [rsp+4h] [rbp-44h]
long long v28; // [rsp+10h] [rbp-38h]
v26 = a3;
_RBX = a2;
_R14 = a1;
if ( mjcb_time )
*(double *)_XMM0.m128_u64 = mjcb_time(a1, a2, a3, *(double *)_XMM0.m128_u64);
else
__asm { vxorpd xmm0, xmm0, xmm0 }
__asm { vmovsd [rsp+48h+var_40], xmm0 }
v9 = *(_DWORD *)(a1 + 4);
v10 = *(int *)(a1 + 260);
*(double *)_XMM0.m128_u64 = mj_markStack(a2, *(double *)_XMM0.m128_u64);
v28 = mj_stackAllocNum(a2, (int)v9);
v11 = mj_stackAllocNum(a2, (int)v9);
if ( (*(_BYTE *)(a1 + 601) & 0x40) == 0 && (int)v9 > 0 )
{
_RAX = *(_QWORD *)(a1 + 1808);
v13 = 1;
_RCX = 0LL;
__asm { vxorpd xmm0, xmm0, xmm0 }
while ( 1 )
{
__asm
{
vmovsd xmm1, qword ptr [rax+rcx*8]
vucomisd xmm1, xmm0
}
if ( !v13 )
break;
v13 = v9 <= (unsigned long long)++_RCX;
if ( v9 == _RCX )
goto LABEL_8;
}
if ( !v26 )
{
_R13 = mj_stackAllocNum(a2, v10);
mju_copy(_R13, *(_QWORD *)(a2 + 162088), *(unsigned int *)(a1 + 260));
v17 = *(_QWORD *)(a1 + 1760);
v18 = 0LL;
do
{
__asm { vmovsd xmm0, qword ptr [r14+140h] }
_RSI = *(int *)(v17 + 4 * v18);
__asm
{
vmulsd xmm0, xmm0, qword ptr [rcx+rdx*8]
vaddsd xmm0, xmm0, qword ptr [r13+rsi*8+0]
vmovsd qword ptr [r13+rsi*8+0], xmm0
}
++v18;
}
while ( v9 != v18 );
mj_factorI(
a1,
_RBX,
_R13,
*(unsigned long long *)((char *)&stru_279C0.r_offset + _RBX),
*(_QWORD *)(_RBX + 162248),
0LL,
*(double *)_XMM0.m128_u64,
*(double *)&_XMM1,
a6,
a7);
}
mju_add(
v28,
*(unsigned long long *)((char *)&stru_27A20.r_offset + _RBX),
*(_QWORD *)(_RBX + 162352),
v9,
*(double *)_XMM0.m128_u64);
*(double *)_XMM0.m128_u64 = mju_copy(v11, v28, *(unsigned int *)(a1 + 4));
mj_solveLD(
a1,
v11,
1,
*(unsigned long long *)((char *)&stru_279C0.r_offset + _RBX),
*(_QWORD *)(_RBX + 162248),
_XMM0,
*(double *)&_XMM1,
a6,
a7,
v22);
}
else
{
LABEL_8:
*(double *)_XMM0.m128_u64 = mju_copy(v11, *(_QWORD *)(a2 + 161744), v9);
}
mj_advance(a1, _RBX, *(_QWORD *)(_RBX + 161752), v11, 0LL, *(double *)_XMM0.m128_u64);
mj_freeStack((_QWORD *)_RBX);
if ( mjcb_time )
*(double *)_XMM0.m128_u64 = mjcb_time(_RBX, _RBX, v23, *(double *)_XMM0.m128_u64);
else
__asm { vxorpd xmm0, xmm0, xmm0 }
__asm
{
vsubsd xmm0, xmm0, [rsp+48h+var_40]
vaddsd xmm0, xmm0, qword ptr [rbx+4F8h]
vmovsd qword ptr [rbx+4F8h], xmm0
}
++*(_DWORD *)(_RBX + 1280);
}
|
mj_EulerSkip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RSP + 0x4],EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [0x00371e90]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00155467
CALL RAX
JMP 0x0015546b
LAB_00155467:
VXORPD XMM0,XMM0,XMM0
LAB_0015546b:
VMOVSD qword ptr [RSP + 0x8],XMM0
MOV EBP,dword ptr [R14 + 0x4]
MOV R12D,EBP
MOVSXD R13,dword ptr [R14 + 0x104]
MOV RDI,RBX
CALL 0x0012d310
MOVSXD RBP,EBP
MOV RDI,RBX
MOV RSI,RBP
CALL 0x0012d370
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RBX
MOV RSI,RBP
CALL 0x0012d370
MOV R15,RAX
TEST byte ptr [R14 + 0x259],0x40
SETZ AL
TEST EBP,EBP
SETG CL
AND CL,AL
CMP CL,0x1
JNZ 0x001554df
MOV RAX,qword ptr [R14 + 0x710]
XOR ECX,ECX
VXORPD XMM0,XMM0,XMM0
LAB_001554cc:
VMOVSD XMM1,qword ptr [RAX + RCX*0x8]
VUCOMISD XMM1,XMM0
JA 0x001554f6
INC RCX
CMP R12,RCX
JNZ 0x001554cc
LAB_001554df:
MOV RSI,qword ptr [RBX + 0x277d0]
MOV RDI,R15
MOV EDX,R12D
CALL 0x0012d120
JMP 0x001555c3
LAB_001554f6:
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00155578
MOV RDI,RBX
MOV RSI,R13
CALL 0x0012d370
MOV R13,RAX
MOV RSI,qword ptr [RBX + 0x27928]
MOV EDX,dword ptr [R14 + 0x104]
MOV RDI,RAX
CALL 0x0012d120
MOV RAX,qword ptr [R14 + 0x6e0]
MOV RCX,qword ptr [R14 + 0x710]
XOR EDX,EDX
LAB_00155531:
VMOVSD XMM0,qword ptr [R14 + 0x140]
MOVSXD RSI,dword ptr [RAX + RDX*0x4]
VMULSD XMM0,XMM0,qword ptr [RCX + RDX*0x8]
VADDSD XMM0,XMM0,qword ptr [R13 + RSI*0x8]
VMOVSD qword ptr [R13 + RSI*0x8],XMM0
INC RDX
CMP R12,RDX
JNZ 0x00155531
MOV RCX,qword ptr [RBX + 0x279c0]
MOV R8,qword ptr [RBX + 0x279c8]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
XOR R9D,R9D
CALL 0x0012d840
LAB_00155578:
MOV RSI,qword ptr [RBX + 0x27a20]
MOV RDX,qword ptr [RBX + 0x27a30]
MOV R13,qword ptr [RSP + 0x10]
MOV RDI,R13
MOV ECX,R12D
CALL 0x0012d870
MOV EDX,dword ptr [R14 + 0x4]
MOV RDI,R15
MOV RSI,R13
CALL 0x0012d120
MOV RCX,qword ptr [RBX + 0x279c0]
MOV R8,qword ptr [RBX + 0x279c8]
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x1
CALL 0x0012d850
LAB_001555c3:
MOV RDX,qword ptr [RBX + 0x277d8]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,R15
XOR R8D,R8D
CALL 0x00155625
MOV RDI,RBX
CALL 0x0012d340
MOV RAX,qword ptr [0x00371e90]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001555f6
CALL RAX
JMP 0x001555fa
LAB_001555f6:
VXORPD XMM0,XMM0,XMM0
LAB_001555fa:
VSUBSD XMM0,XMM0,qword ptr [RSP + 0x8]
VADDSD XMM0,XMM0,qword ptr [RBX + 0x4f8]
VMOVSD qword ptr [RBX + 0x4f8],XMM0
INC dword ptr [RBX + 0x500]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mj_EulerSkip(long param_1,long param_2,int param_3)
{
uint uVar1;
int iVar2;
long lVar3;
long lVar4;
int8 uVar5;
int8 uVar6;
long lVar7;
ulong uVar8;
long lVar9;
ulong uVar10;
double dVar11;
double dVar12;
if (*(code **)PTR_mjcb_time_00371e90 == (code *)0x0) {
dVar11 = 0.0;
}
else {
dVar11 = (double)(**(code **)PTR_mjcb_time_00371e90)();
}
uVar1 = *(uint *)(param_1 + 4);
uVar10 = (ulong)uVar1;
iVar2 = *(int *)(param_1 + 0x104);
mj_markStack(param_2);
uVar5 = mj_stackAllocNum(param_2,(long)(int)uVar1);
uVar6 = mj_stackAllocNum(param_2,(long)(int)uVar1);
if (0 < (int)uVar1 && (*(byte *)(param_1 + 0x259) & 0x40) == 0) {
uVar8 = 0;
do {
if (0.0 < *(double *)(*(long *)(param_1 + 0x710) + uVar8 * 8)) {
if (param_3 == 0) {
lVar7 = mj_stackAllocNum(param_2,(long)iVar2);
mju_copy(lVar7,*(int8 *)(param_2 + 0x27928),*(int4 *)(param_1 + 0x104));
lVar3 = *(long *)(param_1 + 0x6e0);
lVar4 = *(long *)(param_1 + 0x710);
uVar8 = 0;
do {
lVar9 = (long)*(int *)(lVar3 + uVar8 * 4);
*(double *)(lVar7 + lVar9 * 8) =
*(double *)(param_1 + 0x140) * *(double *)(lVar4 + uVar8 * 8) +
*(double *)(lVar7 + lVar9 * 8);
uVar8 = uVar8 + 1;
} while (uVar10 != uVar8);
mj_factorI(param_1,param_2,lVar7,*(int8 *)(param_2 + 0x279c0),
*(int8 *)(param_2 + 0x279c8),0);
}
mju_add(uVar5,*(int8 *)(param_2 + 0x27a20),*(int8 *)(param_2 + 0x27a30),uVar10);
mju_copy(uVar6,uVar5,*(int4 *)(param_1 + 4));
mj_solveLD(param_1,uVar6,1,*(int8 *)(param_2 + 0x279c0),
*(int8 *)(param_2 + 0x279c8));
goto LAB_001555c3;
}
uVar8 = uVar8 + 1;
} while (uVar10 != uVar8);
}
mju_copy(uVar6,*(int8 *)(param_2 + 0x277d0),uVar10);
LAB_001555c3:
mj_advance(param_1,param_2,*(int8 *)(param_2 + 0x277d8),uVar6,0);
mj_freeStack(param_2);
if (*(code **)PTR_mjcb_time_00371e90 == (code *)0x0) {
dVar12 = 0.0;
}
else {
dVar12 = (double)(**(code **)PTR_mjcb_time_00371e90)();
}
*(double *)(param_2 + 0x4f8) = (dVar12 - dVar11) + *(double *)(param_2 + 0x4f8);
*(int *)(param_2 + 0x500) = *(int *)(param_2 + 0x500) + 1;
return;
}
|
|
10,954 |
ma_get_dynamic
|
eloqsql/libmariadb/libmariadb/ma_array.c
|
void ma_get_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
memset(element, 0, array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
}
|
O0
|
c
|
ma_get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0xa77d5
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x60350
jmp 0xa77fe
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x600e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_A77D5
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_A77FE
loc_A77D5:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_A77FE:
add rsp, 20h
pop rbp
retn
|
long long ma_get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
|
ma_get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x001a77d5
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00160350
JMP 0x001a77fe
LAB_001a77d5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001600e0
LAB_001a77fe:
ADD RSP,0x20
POP RBP
RET
|
void ma_get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
|
|
10,955 |
my_fill_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static void
my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
if (fill < 0x80)
my_fill_8bit(cs, str, length, fill);
else
my_fill_utf8mb3_mb(cs, str, length, fill);
}
|
O3
|
c
|
my_fill_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpl $0x7f, %ecx
jg 0xcb92d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xcb9b1
movq %rbx, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb59f3
leaq (%rbx,%r15), %r14
movq 0xb8(%rdi), %rax
movl %ecx, %esi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0xd8(%rax)
movsbq %al, %r12
cmpq %r15, %r12
jle 0xcb956
movq %rbx, %r13
jmp 0xcb97b
movsbq %al, %r15
movq %rbx, %r13
movq %rbx, %rdi
leaq -0x3a(%rbp), %rsi
movq %r15, %rdx
callq 0x29080
addq %r12, %rbx
addq %r12, %r13
leaq (%rbx,%r12), %rax
cmpq %r14, %rax
jbe 0xcb95d
cmpq %r14, %rbx
jae 0xcb993
subq %r13, %r14
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x292c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xcb9b1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
my_fill_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp ecx, 7Fh
jg short loc_CB92D
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_CB9B1
mov rsi, rbx
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_fill_8bit
loc_CB92D:
lea r14, [rbx+r15]
mov rax, [rdi+0B8h]
mov esi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+0D8h]
movsx r12, al
cmp r12, r15
jle short loc_CB956
mov r13, rbx
jmp short loc_CB97B
loc_CB956:
movsx r15, al
mov r13, rbx
loc_CB95D:
mov rdi, rbx
lea rsi, [rbp+var_3A]
mov rdx, r15
call _memcpy
add rbx, r12
add r13, r12
lea rax, [rbx+r12]
cmp rax, r14
jbe short loc_CB95D
loc_CB97B:
cmp rbx, r14
jnb short loc_CB993
sub r14, r13
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r14
call _memset
loc_CB993:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_CB9B1
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CB9B1:
call ___stack_chk_fail
|
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4)
{
unsigned long long v5; // rbx
unsigned long long v7; // r14
char v8; // al
long long v9; // r12
long long v10; // r13
long long v11; // r15
_BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v13[0] = __readfsqword(0x28u);
if ( a4 <= 127 )
return my_fill_8bit(a1, a2, a3, a4);
v7 = a2 + a3;
v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
(unsigned int)a4,
v12,
v13);
v9 = v8;
if ( v8 <= a3 )
{
v11 = v8;
v10 = a2;
do
{
memcpy(v5, v12, v11);
v5 += v9;
v10 += v9;
}
while ( v5 + v9 <= v7 );
}
else
{
v10 = a2;
}
if ( v5 < v7 )
memset(v5, 32LL, v7 - v10);
return __readfsqword(0x28u);
}
|
my_fill_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP ECX,0x7f
JG 0x001cb92d
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001cb9b1
MOV RSI,RBX
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001b59f3
LAB_001cb92d:
LEA R14,[RBX + R15*0x1]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0xd8]
MOVSX R12,AL
CMP R12,R15
JLE 0x001cb956
MOV R13,RBX
JMP 0x001cb97b
LAB_001cb956:
MOVSX R15,AL
MOV R13,RBX
LAB_001cb95d:
MOV RDI,RBX
LEA RSI,[RBP + -0x3a]
MOV RDX,R15
CALL 0x00129080
ADD RBX,R12
ADD R13,R12
LEA RAX,[RBX + R12*0x1]
CMP RAX,R14
JBE 0x001cb95d
LAB_001cb97b:
CMP RBX,R14
JNC 0x001cb993
SUB R14,R13
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R14
CALL 0x001292c0
LAB_001cb993:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001cb9b1
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cb9b1:
CALL 0x00129270
|
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4)
{
void *pvVar1;
char cVar2;
long lVar3;
void *pvVar4;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 < 0x80) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
my_fill_8bit(param_1,param_2,param_3);
return;
}
}
else {
pvVar1 = (void *)((long)param_2 + param_3);
cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38);
lVar3 = (long)cVar2;
pvVar4 = param_2;
if (lVar3 <= param_3) {
do {
memcpy(param_2,local_42,(long)cVar2);
param_2 = (void *)((long)param_2 + lVar3);
pvVar4 = (void *)((long)pvVar4 + lVar3);
} while ((void *)((long)param_2 + lVar3) <= pvVar1);
}
if (param_2 < pvVar1) {
memset(param_2,0x20,(long)pvVar1 - (long)pvVar4);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,956 |
buffer_add_bytes
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) {
buffer_grow(buf, buf->data.len + len);
va_list args;
va_start(args, len);
for (uint32_t i = 0; i < len; i++) {
buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int);
buf->data.len++;
}
va_end(args);
}
|
O0
|
c
|
buffer_add_bytes:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
testb %al, %al
je 0x9d3fb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x9c950
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x9d4f8
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x9d4a6
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x9d4c3
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x9d45f
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
buffer_add_bytes:
push rbp
mov rbp, rsp
sub rsp, 110h
test al, al
jz short loc_9D3FB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_9D3FB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_D8], rcx
mov [rbp+var_E0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov eax, [rax]
add eax, [rbp+var_C]
mov eax, eax
mov esi, eax
call buffer_grow
lea rax, [rbp+var_30]
lea rcx, [rbp+var_F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov [rbp+var_34], 0
loc_9D45F:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_C]
jnb loc_9D4F8
lea rax, [rbp+var_30]
mov [rbp+var_100], rax
mov eax, [rbp+var_30]
mov [rbp+var_F4], eax
cmp eax, 28h ; '('
ja short loc_9D4A6
mov rcx, [rbp+var_100]
mov edx, [rbp+var_F4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_108], rax
jmp short loc_9D4C3
loc_9D4A6:
mov rcx, [rbp+var_100]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_108], rax
loc_9D4C3:
mov rax, [rbp+var_108]
mov eax, [rax]
mov dl, al
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov ecx, [rcx]
mov [rax+rcx], dl
mov rax, [rbp+var_8]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_9D45F
loc_9D4F8:
add rsp, 110h
pop rbp
retn
|
long long buffer_add_bytes(_DWORD *a1, int a2, ...)
{
long long result; // rax
_DWORD *overflow_arg_area; // rax
unsigned int i; // [rsp+DCh] [rbp-34h]
va_list va; // [rsp+E0h] [rbp-30h] BYREF
unsigned int v6; // [rsp+104h] [rbp-Ch]
_DWORD *v7; // [rsp+108h] [rbp-8h]
va_start(va, a2);
v7 = a1;
v6 = a2;
buffer_grow((unsigned long long)a1, (unsigned int)(a2 + *a1));
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v6 )
break;
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
*(_BYTE *)(*((_QWORD *)v7 + 1) + (unsigned int)(*v7)++) = *overflow_arg_area;
}
return result;
}
|
buffer_add_bytes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
TEST AL,AL
JZ 0x0019d3fb
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0019d3fb:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0xd8],RCX
MOV qword ptr [RBP + -0xe0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
ADD EAX,dword ptr [RBP + -0xc]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0019c950
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xf0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV dword ptr [RBP + -0x34],0x0
LAB_0019d45f:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0xc]
JNC 0x0019d4f8
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x100],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xf4],EAX
CMP EAX,0x28
JA 0x0019d4a6
MOV RCX,qword ptr [RBP + -0x100]
MOV EDX,dword ptr [RBP + -0xf4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0019d4c3
LAB_0019d4a6:
MOV RCX,qword ptr [RBP + -0x100]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x108],RAX
LAB_0019d4c3:
MOV RAX,qword ptr [RBP + -0x108]
MOV EAX,dword ptr [RAX]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0019d45f
LAB_0019d4f8:
ADD RSP,0x110
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
uint *param_9,uint param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 *local_110;
int4 local_f8 [4];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
uint local_3c;
uint local_38;
int4 *local_30;
uint local_14;
uint *local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_e8 = param_11;
local_e0 = param_12;
local_d8 = param_13;
local_d0 = param_14;
local_14 = param_10;
local_10 = param_9;
buffer_grow(param_9,*param_9 + param_10);
local_30 = (int4 *)&stack0x00000008;
local_38 = 0x10;
for (local_3c = 0; local_3c < local_14; local_3c = local_3c + 1) {
if (local_38 < 0x29) {
local_110 = (int4 *)((long)local_f8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_110 = local_30;
local_30 = local_30 + 2;
}
*(char *)(*(long *)(local_10 + 2) + (ulong)*local_10) = (char)*local_110;
*local_10 = *local_10 + 1;
}
return;
}
|
|
10,957 |
buffer_add_bytes
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) {
buffer_grow(buf, buf->data.len + len);
va_list args;
va_start(args, len);
for (uint32_t i = 0; i < len; i++) {
buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int);
buf->data.len++;
}
va_end(args);
}
|
O3
|
c
|
buffer_add_bytes:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x5166c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl (%rdi), %esi
addl %ebx, %esi
callq 0x50f71
movq %r15, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rsp)
testl %ebx, %ebx
je 0x516d3
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x516b2
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x516c0
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb (%rax), %al
movq 0x8(%r14), %rcx
movl (%r14), %edx
movb %al, (%rcx,%rdx)
incl (%r14)
decl %ebx
jne 0x51699
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
buffer_add_bytes:
push r15
push r14
push rbx
sub rsp, 0D0h
mov ebx, esi
mov r14, rdi
lea r15, [rsp+0E8h+var_C8]
mov [r15+10h], rdx
mov [r15+18h], rcx
mov [r15+20h], r8
mov [r15+28h], r9
test al, al
jz short loc_5166C
movaps [rsp+0E8h+var_98], xmm0
movaps [rsp+0E8h+var_88], xmm1
movaps [rsp+0E8h+var_78], xmm2
movaps [rsp+0E8h+var_68], xmm3
movaps [rsp+0E8h+var_58], xmm4
movaps [rsp+0E8h+var_48], xmm5
movaps [rsp+0E8h+var_38], xmm6
movaps [rsp+0E8h+var_28], xmm7
loc_5166C:
mov esi, [rdi]
add esi, ebx
call buffer_grow
mov [rsp+0E8h+var_D8], r15
lea rax, [rsp+0E8h+arg_0]
mov [rsp+0E8h+var_E0], rax
mov rax, 3000000010h
mov [rsp+0E8h+var_E8], rax
test ebx, ebx
jz short loc_516D3
loc_51699:
mov ecx, dword ptr [rsp+0E8h+var_E8]
cmp rcx, 28h ; '('
ja short loc_516B2
mov rax, rcx
add rax, [rsp+0E8h+var_D8]
add ecx, 8
mov dword ptr [rsp+0E8h+var_E8], ecx
jmp short loc_516C0
loc_516B2:
mov rax, [rsp+0E8h+var_E0]
lea rcx, [rax+8]
mov [rsp+0E8h+var_E0], rcx
loc_516C0:
mov al, [rax]
mov rcx, [r14+8]
mov edx, [r14]
mov [rcx+rdx], al
inc dword ptr [r14]
dec ebx
jnz short loc_51699
loc_516D3:
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
|
char buffer_add_bytes(long long a1, int a2, long long a3, long long a4, long long a5, long long a6, ...)
{
int v6; // ebx
char result; // al
char *v8; // rax
long long v9; // kr00_8
va_list va; // [rsp+0h] [rbp-E8h] BYREF
long long v11; // [rsp+30h] [rbp-B8h]
long long v12; // [rsp+38h] [rbp-B0h]
long long v13; // [rsp+40h] [rbp-A8h]
long long v14; // [rsp+48h] [rbp-A0h]
va_start(va, a6);
v6 = a2;
v11 = a3;
v12 = a4;
v13 = a5;
v14 = a6;
buffer_grow(a1, (unsigned int)(a2 + *(_DWORD *)a1));
result = 16;
va[0].gp_offset = 16;
if ( a2 )
{
do
{
if ( va[0].gp_offset > 0x28uLL )
{
v9 = va_arg(va, _QWORD);
v8 = (char *)&v9;
}
else
{
v8 = (char *)va[0].reg_save_area + va[0].gp_offset;
va[0].gp_offset += 8;
}
result = *v8;
*(_BYTE *)(*(_QWORD *)(a1 + 8) + (unsigned int)(*(_DWORD *)a1)++) = result;
--v6;
}
while ( v6 );
}
return result;
}
|
buffer_add_bytes:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV EBX,ESI
MOV R14,RDI
LEA R15,[RSP + 0x20]
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [R15 + 0x18],RCX
MOV qword ptr [R15 + 0x20],R8
MOV qword ptr [R15 + 0x28],R9
TEST AL,AL
JZ 0x0015166c
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0015166c:
MOV ESI,dword ptr [RDI]
ADD ESI,EBX
CALL 0x00150f71
MOV qword ptr [RSP + 0x10],R15
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RSP],RAX
TEST EBX,EBX
JZ 0x001516d3
LAB_00151699:
MOV ECX,dword ptr [RSP]
CMP RCX,0x28
JA 0x001516b2
MOV RAX,RCX
ADD RAX,qword ptr [RSP + 0x10]
ADD ECX,0x8
MOV dword ptr [RSP],ECX
JMP 0x001516c0
LAB_001516b2:
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
LAB_001516c0:
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [R14 + 0x8]
MOV EDX,dword ptr [R14]
MOV byte ptr [RCX + RDX*0x1],AL
INC dword ptr [R14]
DEC EBX
JNZ 0x00151699
LAB_001516d3:
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
|
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
uint *param_9,int param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 *puVar1;
uint uVar2;
ulong uVar3;
int1 *local_e0;
int1 local_c8 [16];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
if (in_AL != '\0') {
local_98 = param_1;
local_88 = param_2;
local_78 = param_3;
local_68 = param_4;
local_58 = param_5;
local_48 = param_6;
local_38 = param_7;
local_28 = param_8;
}
local_b8 = param_11;
local_b0 = param_12;
local_a8 = param_13;
local_a0 = param_14;
buffer_grow(param_9,*param_9 + param_10);
local_e0 = &stack0x00000008;
uVar2 = 0x10;
if (param_10 != 0) {
do {
uVar3 = (ulong)uVar2;
if (uVar3 < 0x29) {
uVar2 = uVar2 + 8;
puVar1 = local_c8 + uVar3;
}
else {
puVar1 = local_e0;
local_e0 = local_e0 + 8;
}
*(int1 *)(*(long *)(param_9 + 2) + (ulong)*param_9) = *puVar1;
*param_9 = *param_9 + 1;
param_10 = param_10 + -1;
} while (param_10 != 0);
}
return;
}
|
|
10,958 |
create_logfile_by_number_no_cache
|
eloqsql/storage/maria/ma_loghandler.c
|
static File create_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("create_logfile_by_number_no_cache");
if (translog_status != TRANSLOG_OK)
DBUG_RETURN(-1);
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
if ((file= mysql_file_create(key_file_translog,
translog_filename_by_fileno(file_no, path),
0, O_BINARY | O_RDWR | O_CLOEXEC, MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during creating file '%s'", errno, path));
translog_stop_writing();
DBUG_RETURN(-1);
}
if (sync_log_dir >= TRANSLOG_SYNC_DIR_NEWFILE &&
sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)))
{
DBUG_PRINT("error", ("Error %d during syncing directory '%s'",
errno, log_descriptor.directory));
mysql_file_close(file, MYF(0));
translog_stop_writing();
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
}
|
O0
|
c
|
create_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x218(%rbp)
cmpl $0x1, 0x42578b(%rip) # 0x4781b0
je 0x52a38
jmp 0x52a29
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x52b11
leaq 0x4252d5(%rip), %rax # 0x477d14
movl (%rax), %eax
movl %eax, -0x220(%rbp)
movl -0x218(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x4f820
movl -0x220(%rbp), %edi
movq %rax, %rcx
leaq 0xff26e(%rip), %rsi # 0x151cd7
movl $0x3df, %edx # imm = 0x3DF
xorl %r8d, %r8d
movl $0x80002, %r9d # imm = 0x80002
movq $0x10, (%rsp)
callq 0x590a0
movl %eax, -0x21c(%rbp)
cmpl $0x0, %eax
jge 0x52aa4
jmp 0x52a91
jmp 0x52a93
callq 0x4f7e0
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x52b11
cmpq $0x1, 0x26a92c(%rip) # 0x2bd3d8
jb 0x52aff
movl 0x426bfc(%rip), %edx # 0x4796b0
leaq 0xff21c(%rip), %rdi # 0x151cd7
movl $0x3e6, %esi # imm = 0x3E6
movl $0x30, %ecx
callq 0x59190
cmpl $0x0, %eax
je 0x52aff
jmp 0x52ad1
jmp 0x52ad3
movl -0x21c(%rbp), %edx
leaq 0xff1f7(%rip), %rdi # 0x151cd7
movl $0x3ea, %esi # imm = 0x3EA
xorl %eax, %eax
movl %eax, %ecx
callq 0x4fec0
callq 0x4f7e0
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x52b11
jmp 0x52b01
jmp 0x52b03
jmp 0x52b05
movl -0x21c(%rbp), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x224(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x52b3e
movl -0x224(%rbp), %eax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
create_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], edi
cmp cs:translog_status, 1
jz short loc_52A38
jmp short $+2
loc_52A29:
mov [rbp+var_214], 0FFFFFFFFh
jmp loc_52B11
loc_52A38:
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_220], eax
mov edi, [rbp+var_218]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_220]
mov rcx, rax
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DFh
xor r8d, r8d
mov r9d, 80002h
mov [rsp+230h+var_230], 10h
call inline_mysql_file_create_0
mov [rbp+var_21C], eax
cmp eax, 0
jge short loc_52AA4
jmp short $+2
loc_52A91:
jmp short $+2
loc_52A93:
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_52B11
loc_52AA4:
cmp cs:sync_log_dir, 1
jb short loc_52AFF
mov edx, cs:dword_4796B0
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E6h
mov ecx, 30h ; '0'
call inline_mysql_file_sync_3
cmp eax, 0
jz short loc_52AFF
jmp short $+2
loc_52AD1:
jmp short $+2
loc_52AD3:
mov edx, [rbp+var_21C]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3EAh
xor eax, eax
mov ecx, eax
call inline_mysql_file_close_2
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_52B11
loc_52AFF:
jmp short $+2
loc_52B01:
jmp short $+2
loc_52B03:
jmp short $+2
loc_52B05:
mov eax, [rbp+var_21C]
mov [rbp+var_214], eax
loc_52B11:
mov eax, [rbp+var_214]
mov [rbp+var_224], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_52B3E
mov eax, [rbp+var_224]
add rsp, 230h
pop rbp
retn
loc_52B3E:
call ___stack_chk_fail
|
long long create_logfile_by_number_no_cache(
unsigned int a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
int v6; // eax
int v8; // [rsp+10h] [rbp-220h]
signed int v9; // [rsp+14h] [rbp-21Ch]
_BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v12; // [rsp+228h] [rbp-8h]
v12 = __readfsqword(0x28u);
if ( translog_status == 1 )
{
v8 = key_file_translog;
v6 = translog_filename_by_fileno(a1, (long long)v11, a3, a4, a5, a6);
v9 = inline_mysql_file_create_0(
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
991,
v6,
0,
524290,
16LL);
if ( v9 >= 0 )
{
if ( sync_log_dir
&& (unsigned int)inline_mysql_file_sync_3(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
998LL,
(unsigned int)dword_4796B0,
48LL) )
{
inline_mysql_file_close_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3EAu,
v9,
0LL);
translog_stop_writing();
return (unsigned int)-1;
}
else
{
return (unsigned int)v9;
}
}
else
{
translog_stop_writing();
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
|
create_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x218],EDI
CMP dword ptr [0x005781b0],0x1
JZ 0x00152a38
JMP 0x00152a29
LAB_00152a29:
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x00152b11
LAB_00152a38:
LEA RAX,[0x577d14]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x220],EAX
MOV EDI,dword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0014f820
MOV EDI,dword ptr [RBP + -0x220]
MOV RCX,RAX
LEA RSI,[0x251cd7]
MOV EDX,0x3df
XOR R8D,R8D
MOV R9D,0x80002
MOV qword ptr [RSP],0x10
CALL 0x001590a0
MOV dword ptr [RBP + -0x21c],EAX
CMP EAX,0x0
JGE 0x00152aa4
JMP 0x00152a91
LAB_00152a91:
JMP 0x00152a93
LAB_00152a93:
CALL 0x0014f7e0
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x00152b11
LAB_00152aa4:
CMP qword ptr [0x003bd3d8],0x1
JC 0x00152aff
MOV EDX,dword ptr [0x005796b0]
LEA RDI,[0x251cd7]
MOV ESI,0x3e6
MOV ECX,0x30
CALL 0x00159190
CMP EAX,0x0
JZ 0x00152aff
JMP 0x00152ad1
LAB_00152ad1:
JMP 0x00152ad3
LAB_00152ad3:
MOV EDX,dword ptr [RBP + -0x21c]
LEA RDI,[0x251cd7]
MOV ESI,0x3ea
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0014fec0
CALL 0x0014f7e0
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x00152b11
LAB_00152aff:
JMP 0x00152b01
LAB_00152b01:
JMP 0x00152b03
LAB_00152b03:
JMP 0x00152b05
LAB_00152b05:
MOV EAX,dword ptr [RBP + -0x21c]
MOV dword ptr [RBP + -0x214],EAX
LAB_00152b11:
MOV EAX,dword ptr [RBP + -0x214]
MOV dword ptr [RBP + -0x224],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00152b3e
MOV EAX,dword ptr [RBP + -0x224]
ADD RSP,0x230
POP RBP
RET
LAB_00152b3e:
CALL 0x0012a270
|
int create_logfile_by_number_no_cache(int4 param_1)
{
int4 uVar1;
int iVar2;
int8 uVar3;
long in_FS_OFFSET;
int local_21c;
int1 local_218 [520];
long local_10;
uVar1 = key_file_translog;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (translog_status == 1) {
uVar3 = translog_filename_by_fileno(param_1,local_218);
local_21c = inline_mysql_file_create
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3df,uVar3,0,0x80002,0x10);
if (local_21c < 0) {
translog_stop_writing();
local_21c = -1;
}
else if ((sync_log_dir != 0) &&
(iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c"
,0x3e6,DAT_005796b0,0x30), iVar2 != 0)) {
inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x3ea,
local_21c,0);
translog_stop_writing();
local_21c = -1;
}
}
else {
local_21c = -1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_21c;
}
|
|
10,959 |
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>>>::emplace(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&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(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&&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x113650
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1136c0
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x113680
testb $0x1, %al
jne 0x1271eb
jmp 0x127242
movq 0x8(%rsp), %rax
addq $0x18, %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1136f0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0x1272a0
testb $0x1, %al
jne 0x127219
jmp 0x127234
movb $0x0, 0x2f(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x2f(%rsp), %rdx
callq 0x120000
jmp 0x127292
jmp 0x127236
leaq 0x38(%rsp), %rdi
callq 0x113a40
jmp 0x1271c7
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x1272d0
movq 0x8(%rsp), %rdi
callq 0x1136c0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1200c0
movq %rax, 0x20(%rsp)
movb $0x1, 0x17(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x17(%rsp), %rdx
callq 0x120100
movq 0x58(%rsp), %rax
movb 0x60(%rsp), %dl
addq $0x68, %rsp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov rdi, [rsp+68h+var_18]
mov [rsp+68h+var_60], rdi
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void)
mov [rsp+68h+var_30], rax
loc_1271C7:
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_38]
call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&)
test al, 1
jnz short loc_1271EB
jmp short loc_127242
loc_1271EB:
mov rax, [rsp+68h+var_60]
add rax, 18h
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
mov rdi, [rsp+68h+var_68]
mov rsi, rax
mov rdx, [rsp+68h+var_20]
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEESI_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSJ_OSK_
test al, 1
jnz short loc_127219
jmp short loc_127234
loc_127219:
mov [rsp+68h+var_39], 0
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_30]
lea rdx, [rsp+68h+var_39]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2IRSO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIST_SU_EEEbE4typeELb1EEEOST_OSU_
jmp short loc_127292
loc_127234:
jmp short $+2
loc_127236:
lea rdi, [rsp+68h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void)
jmp short loc_1271C7
loc_127242:
mov rdi, [rsp+68h+var_60]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_28]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_50]
mov esi, 1
call _ZSt4prevIN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEEN5minja5ValueEES7_ISL_SaISL_EEEEET_SQ_NSt15iterator_traitsISQ_E15difference_typeE; std::prev<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>::difference_type)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_51], 1
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_48]
lea rdx, [rsp+68h+var_51]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2ISO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISS_ST_EEEbE4typeELb1EEEOSS_OST_
loc_127292:
mov rax, [rsp+68h+var_10]
mov dl, [rsp+68h+var_8]
add rsp, 68h
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
char v5; // [rsp+17h] [rbp-51h] BYREF
long long v6; // [rsp+18h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-48h] BYREF
char v8; // [rsp+2Fh] [rbp-39h] BYREF
long long v9; // [rsp+30h] [rbp-38h] BYREF
long long i; // [rsp+38h] [rbp-30h] BYREF
long long v11; // [rsp+40h] [rbp-28h]
long long v12; // [rsp+48h] [rbp-20h]
long long v13; // [rsp+50h] [rbp-18h]
long long v14; // [rsp+58h] [rbp-10h] BYREF
v13 = a1;
v12 = a2;
v11 = a3;
for ( i = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) )
{
v9 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>(
(long long)&i,
(long long)&v9) )
break;
v3 = __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
a1 + 24,
v3,
v12) & 1) != 0 )
{
v8 = 0;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2IRSO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIST_SU_EEEbE4typeELb1EEEOST_OSU_(
(long long)&v14,
&i,
&v8);
return v14;
}
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
v12,
v11);
v6 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
v7 = std::prev<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>(
v6,
1LL);
v5 = 1;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbEC2ISO_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISS_ST_EEEbE4typeELb1EEEOSS_OST_(
(long long)&v14,
&v7,
&v5);
return v14;
}
| |||
10,960 |
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>>>::emplace(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&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O3
|
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>>>::emplace(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&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
cmpq %r15, %rbx
je 0x5ef6e
movq (%r12), %r13
movq 0x8(%r12), %rbp
cmpq %rbp, 0x8(%rbx)
jne 0x5ef65
testq %rbp, %rbp
je 0x5ef89
movq (%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a900
testl %eax, %eax
je 0x5ef89
addq $0x30, %rbx
cmpq %r15, %rbx
jne 0x5ef48
movq %r14, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x5ef9e
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x5ef8b
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
mov r15, [rdi+8]
cmp rbx, r15
jz short loc_5EF6E
mov r13, [r12]
mov rbp, [r12+8]
loc_5EF48:
cmp [rbx+8], rbp
jnz short loc_5EF65
test rbp, rbp
jz short loc_5EF89
mov rdi, [rbx]
mov rsi, r13
mov rdx, rbp
call _bcmp
test eax, eax
jz short loc_5EF89
loc_5EF65:
add rbx, 30h ; '0'
cmp rbx, r15
jnz short loc_5EF48
loc_5EF6E:
mov rdi, r14
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; 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>>>::emplace_back<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>>(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> &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_5EF8B
loc_5EF89:
xor edx, edx
loc_5EF8B:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
_QWORD *a1,
long long *a2,
long long a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // r15
long long v5; // r13
long long v6; // rbp
v3 = (_QWORD *)*a1;
v4 = (_QWORD *)a1[1];
if ( (_QWORD *)*a1 == v4 )
{
LABEL_7:
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>>>::emplace_back<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>>(
a1,
a2,
a3);
return a1[1] - 48LL;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) )
{
v3 += 6;
if ( v3 == v4 )
goto LABEL_7;
}
}
return (long long)v3;
}
|
emplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
CMP RBX,R15
JZ 0x0015ef6e
MOV R13,qword ptr [R12]
MOV RBP,qword ptr [R12 + 0x8]
LAB_0015ef48:
CMP qword ptr [RBX + 0x8],RBP
JNZ 0x0015ef65
TEST RBP,RBP
JZ 0x0015ef89
MOV RDI,qword ptr [RBX]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a900
TEST EAX,EAX
JZ 0x0015ef89
LAB_0015ef65:
ADD RBX,0x30
CMP RBX,R15
JNZ 0x0015ef48
LAB_0015ef6e:
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0015ef9e
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x0015ef8b
LAB_0015ef89:
XOR EDX,EDX
LAB_0015ef8b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::emplace(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>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1,basic_json *param_2)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
int8 extraout_RDX;
int8 uVar3;
int8 *puVar4;
int1 auVar5 [16];
puVar4 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar4 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar4[1] == __n) {
if (__n != 0) {
iVar2 = bcmp((void *)*puVar4,__s2,__n);
if (iVar2 != 0) goto LAB_0015ef65;
}
uVar3 = 0;
goto LAB_0015ef8b;
}
LAB_0015ef65:
puVar4 = puVar4 + 6;
} while (puVar4 != puVar1);
}
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>>>>
::
emplace_back<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>>
((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,param_1,param_2);
puVar4 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0015ef8b:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = puVar4;
return auVar5;
}
|
|
10,961 |
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("ExpressionNode.expr is null");
auto result = expr->evaluate(context);
if (result.is_string()) {
out << result.get<std::string>();
} else if (result.is_boolean()) {
out << (result.get<bool>() ? "True" : "False");
} else if (!result.is_null()) {
out << result.dump();
}
}
|
O1
|
cpp
|
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x61f37
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x3d6d0
movzbl 0x40(%r14), %eax
cmpl $0x4, %eax
je 0x61e28
cmpl $0x3, %eax
jne 0x61e57
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3f694
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x18770
jmp 0x61e9b
leaq 0x28(%rsp), %rdi
callq 0x3f59a
leaq 0x49a1b(%rip), %rcx # 0xab854
leaq 0x49a19(%rip), %rsi # 0xab859
testb %al, %al
cmovneq %rcx, %rsi
movzbl %al, %edx
xorq $0x5, %rdx
movq %rbx, %rdi
callq 0x18770
jmp 0x61eb6
testb %al, %al
jne 0x61e73
cmpq $0x0, 0x48(%rsp)
jne 0x61e73
cmpq $0x0, 0x38(%rsp)
jne 0x61e73
cmpq $0x0, 0x58(%rsp)
je 0x61eb6
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3dd5a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x18770
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x61eb6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3da52
movq %rbx, %rdi
callq 0x4a9be
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x61edb
callq 0x2fb64
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x61eea
callq 0x2fb64
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x61ef9
callq 0x2fb64
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x61f2f
movq 0x7c08e(%rip), %rax # 0xddf98
cmpb $0x0, (%rax)
je 0x61f1a
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x61f24
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x61f2f
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x18350
movq %rax, %r14
leaq 0x4ba42(%rip), %rsi # 0xad98d
movq %rax, %rdi
callq 0x18260
movq 0x7c096(%rip), %rsi # 0xddff0
movq 0x7c00f(%rip), %rdx # 0xddf70
movq %r14, %rdi
callq 0x18b30
jmp 0x61f6d
jmp 0x61f9c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x61f9f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x61f9f
jmp 0x61f9c
movq %rax, %rbx
movq %r14, %rdi
callq 0x184f0
jmp 0x61fa9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3d9c6
movq %rbx, %rdi
callq 0x18ba0
nop
|
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 78h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_61F37
lea r14, [rsp+88h+var_60]
mov rdi, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movzx eax, byte ptr [r14+40h]
cmp eax, 4
jz short loc_61E28
cmp eax, 3
jnz short loc_61E57
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_61E9B
loc_61E28:
lea rdi, [rsp+88h+var_60]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse_0; "False"
test al, al
cmovnz rsi, rcx
movzx edx, al
xor rdx, 5
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_61EB6
loc_61E57:
test al, al
jnz short loc_61E73
cmp [rsp+88h+var_40], 0
jnz short loc_61E73
cmp [rsp+88h+var_50], 0
jnz short loc_61E73
cmp [rsp+88h+var_30], 0
jz short loc_61EB6
loc_61E73:
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_61E9B:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_61EB6
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61EB6:
lea rbx, [rsp+88h+var_20]
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()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_61EDB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_61EDB:
mov rdi, [rsp+88h+var_38]
test rdi, rdi
jz short loc_61EEA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_61EEA:
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_61EF9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_61EF9:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_61F2F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_61F1A
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_61F24
loc_61F1A:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_61F24:
cmp eax, 1
jnz short loc_61F2F
mov rax, [rdi]
call qword ptr [rax+18h]
loc_61F2F:
add rsp, 78h
pop rbx
pop r14
retn
loc_61F37:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpressionnode; "ExpressionNode.expr 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, r14; void *
call ___cxa_throw
jmp short loc_61F6D
jmp short loc_61F9C
loc_61F6D:
mov rbx, rax
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_61F9F
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_61F9F
jmp short loc_61F9C
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_61FA9
loc_61F9C:
mov rbx, rax
loc_61F9F:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_61FA9:
mov rdi, rbx
call __Unwind_Resume
|
void minja::ExpressionNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
unsigned __int8 v4; // al
const char *v5; // rsi
long long v6; // rdi
signed __int32 v7; // eax
std::runtime_error *exception; // r14
long long *v9; // [rsp+8h] [rbp-80h] BYREF
long long v10; // [rsp+10h] [rbp-78h]
long long v11; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+28h] [rbp-60h] BYREF
long long v13; // [rsp+30h] [rbp-58h]
long long v14; // [rsp+38h] [rbp-50h]
volatile signed __int32 *v15; // [rsp+40h] [rbp-48h]
long long v16; // [rsp+48h] [rbp-40h]
volatile signed __int32 *v17; // [rsp+50h] [rbp-38h]
long long v18; // [rsp+58h] [rbp-30h]
volatile signed __int32 *v19; // [rsp+60h] [rbp-28h]
void *v20[4]; // [rsp+68h] [rbp-20h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)&v12, v3);
if ( LOBYTE(v20[0]) == 4 )
{
v4 = minja::Value::get<bool>(&v12);
v5 = "False";
if ( v4 )
v5 = "True";
std::__ostream_insert<char,std::char_traits<char>>(a2, v5, v4 ^ 5LL);
}
else
{
if ( LOBYTE(v20[0]) == 3 )
{
minja::Value::get<std::string>((long long)&v9, &v12);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
else
{
if ( !LOBYTE(v20[0]) && !v16 && !v14 && !v18 )
goto LABEL_15;
minja::Value::dump[abi:cxx11]((long long)&v9, (long long)&v12, 0xFFFFFFFF, 0);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
}
LABEL_15:
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 *)v20);
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(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v6 = v13;
if ( v13 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v13 + 12);
*(_DWORD *)(v13 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
}
|
do_render:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x00161f37
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0013d6d0
MOVZX EAX,byte ptr [R14 + 0x40]
CMP EAX,0x4
JZ 0x00161e28
CMP EAX,0x3
JNZ 0x00161e57
LAB_00161e05:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x0013f694
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00161e1e:
MOV RDI,RBX
CALL 0x00118770
JMP 0x00161e9b
LAB_00161e28:
LEA RDI,[RSP + 0x28]
CALL 0x0013f59a
LEA RCX,[0x1ab854]
LEA RSI,[0x1ab859]
TEST AL,AL
CMOVNZ RSI,RCX
MOVZX EDX,AL
XOR RDX,0x5
MOV RDI,RBX
CALL 0x00118770
JMP 0x00161eb6
LAB_00161e57:
TEST AL,AL
JNZ 0x00161e73
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x00161e73
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00161e73
CMP qword ptr [RSP + 0x58],0x0
JZ 0x00161eb6
LAB_00161e73:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013dd5a
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00161e93:
MOV RDI,RBX
CALL 0x00118770
LAB_00161e9b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00161eb6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00161eb6:
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0013da52
MOV RDI,RBX
CALL 0x0014a9be
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x00161edb
CALL 0x0012fb64
LAB_00161edb:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x00161eea
CALL 0x0012fb64
LAB_00161eea:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00161ef9
CALL 0x0012fb64
LAB_00161ef9:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00161f2f
MOV RAX,qword ptr [0x001ddf98]
CMP byte ptr [RAX],0x0
JZ 0x00161f1a
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00161f24
LAB_00161f1a:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00161f24:
CMP EAX,0x1
JNZ 0x00161f2f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00161f2f:
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_00161f37:
MOV EDI,0x10
CALL 0x00118350
MOV R14,RAX
LAB_00161f44:
LEA RSI,[0x1ad98d]
MOV RDI,RAX
CALL 0x00118260
LAB_00161f53:
MOV RSI,qword ptr [0x001ddff0]
MOV RDX,qword ptr [0x001ddf70]
MOV RDI,R14
CALL 0x00118b30
|
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
bool bVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
long *local_80;
long local_78;
long local_70 [2];
Expression local_60 [8];
long *local_58;
long local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
long local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
long local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
data local_20 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00161f44 to 00161f52 has its CatchHandler @ 00161f8f */
std::runtime_error::runtime_error(this,"ExpressionNode.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
if (local_20[0] == (data)0x4) {
/* try { // try from 00161e28 to 00161e54 has its CatchHandler @ 00161f9c */
bVar2 = Value::get<bool>((Value *)local_60);
pcVar4 = "False";
if (bVar2) {
pcVar4 = "True";
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,pcVar4,(ulong)bVar2 ^ 5);
}
else {
if (local_20[0] == (data)0x3) {
/* try { // try from 00161e05 to 00161e13 has its CatchHandler @ 00161f8d */
Value::get<std::__cxx11::string>();
/* try { // try from 00161e1e to 00161e25 has its CatchHandler @ 00161f6d */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
else {
if ((((local_20[0] == (data)0x0) && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0))
goto LAB_00161eb6;
/* try { // try from 00161e73 to 00161e88 has its CatchHandler @ 00161f6b */
Value::dump_abi_cxx11_((int)&local_80,SUB81(local_60,0));
/* try { // try from 00161e93 to 00161e9a has its CatchHandler @ 00161f69 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
}
LAB_00161eb6:
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_20,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_20);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (long *)0x0) {
if (*PTR___libc_single_threaded_001ddf98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_58 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_58 + 0xc);
*(int *)((long)local_58 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_58 + 0x18))();
}
}
return;
}
|
|
10,962 |
pfs_register_rwlock_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_register_rwlock_v1(const char *category,
PSI_rwlock_info_v1 *info,
int count)
{
PSI_rwlock_key key;
char rw_formatted_name[PFS_MAX_INFO_NAME_LENGTH];
char sx_formatted_name[PFS_MAX_INFO_NAME_LENGTH];
size_t rw_prefix_length;
size_t sx_prefix_length;
size_t len;
size_t full_length;
assert(category != NULL);
assert(info != NULL);
if (build_prefix(&rwlock_instrument_prefix, category,
rw_formatted_name, &rw_prefix_length) ||
build_prefix(&sxlock_instrument_prefix, category,
sx_formatted_name, &sx_prefix_length) ||
! pfs_initialized)
{
for (; count>0; count--, info++)
*(info->m_key)= 0;
return ;
}
for (; count>0; count--, info++)
{
assert(info->m_key != NULL);
assert(info->m_name != NULL);
len= strlen(info->m_name);
if (info->m_flags & PSI_RWLOCK_FLAG_SX)
{
full_length= sx_prefix_length + len;
if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH))
{
memcpy(sx_formatted_name + sx_prefix_length, info->m_name, len);
key= register_rwlock_class(sx_formatted_name, (uint)full_length, info->m_flags);
}
else
{
pfs_print_error("REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n",
category, info->m_name);
key= 0;
}
}
else
{
full_length= rw_prefix_length + len;
if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH))
{
memcpy(rw_formatted_name + rw_prefix_length, info->m_name, len);
key= register_rwlock_class(rw_formatted_name, (uint)full_length, info->m_flags);
}
else
{
pfs_print_error("REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n",
category, info->m_name);
key= 0;
}
}
*(info->m_key)= key;
}
return;
}
|
O3
|
cpp
|
pfs_register_rwlock_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x2dc952(%rip), %rax # 0x31a618
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq -0xb0(%rbp), %rcx
leaq -0x168(%rbp), %r8
movq %r15, %rdx
callq 0x3dbd3
testl %eax, %eax
jne 0x3de33
leaq 0x2dc936(%rip), %rax # 0x31a628
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq -0x130(%rbp), %rcx
leaq -0x160(%rbp), %r8
movq %r15, %rdx
callq 0x3dbd3
testl %eax, %eax
jne 0x3de33
leaq 0x392ceb(%rip), %rax # 0x3d0a09
cmpb $0x1, (%rax)
jne 0x3de33
movq %r15, -0x138(%rbp)
testl %ebx, %ebx
jle 0x3de4d
movq -0x160(%rbp), %rax
movq %rax, -0x158(%rbp)
addq %rbp, %rax
addq $-0x130, %rax # imm = 0xFED0
movq %rax, -0x148(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x150(%rbp)
addq %rbp, %rax
addq $-0xb0, %rax
movq %rax, -0x140(%rbp)
addq $0x10, %r14
incl %ebx
movq -0x8(%r14), %r12
movq %r12, %rdi
callq 0x26150
movl (%r14), %r13d
movq %rax, %r15
testb $0x10, %r13b
jne 0x3ddbb
addq -0x150(%rbp), %r15
cmpq $0x80, %r15
ja 0x3de0a
movq -0x140(%rbp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x26290
leaq -0xb0(%rbp), %rdi
jmp 0x3dde4
addq -0x158(%rbp), %r15
cmpq $0x80, %r15
ja 0x3de16
movq -0x148(%rbp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x26290
leaq -0x130(%rbp), %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x30400
movl %eax, %r13d
movq -0x10(%r14), %rax
movl %r13d, (%rax)
addq $0x18, %r14
decl %ebx
cmpl $0x1, %ebx
jg 0x3dd78
jmp 0x3de4d
xorl %r13d, %r13d
leaq 0x40d24(%rip), %rdi # 0x7eb38
jmp 0x3de20
xorl %r13d, %r13d
leaq 0x40ce8(%rip), %rdi # 0x7eb08
movq -0x138(%rbp), %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x362c0
jmp 0x3ddf2
testl %ebx, %ebx
jle 0x3de4d
incl %ebx
movq (%r14), %rax
movl $0x0, (%rax)
addq $0x18, %r14
decl %ebx
cmpl $0x1, %ebx
ja 0x3de39
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3de6e
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x263b0
|
pfs_register_rwlock_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov ebx, edx
mov r14, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, rwlock_instrument_prefix
mov rdi, [rax]
mov rsi, [rax+8]
lea rcx, [rbp+var_B0]
lea r8, [rbp+var_168]
mov rdx, r15
call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *)
test eax, eax
jnz loc_3DE33
lea rax, sxlock_instrument_prefix
mov rdi, [rax]
mov rsi, [rax+8]
lea rcx, [rbp+var_130]
lea r8, [rbp+var_160]
mov rdx, r15
call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *)
test eax, eax
jnz loc_3DE33
lea rax, pfs_initialized
cmp byte ptr [rax], 1
jnz loc_3DE33
mov [rbp+var_138], r15
test ebx, ebx
jle loc_3DE4D
mov rax, [rbp+var_160]
mov [rbp+var_158], rax
add rax, rbp
add rax, 0FFFFFFFFFFFFFED0h
mov [rbp+var_148], rax
mov rax, [rbp+var_168]
mov [rbp+var_150], rax
add rax, rbp
add rax, 0FFFFFFFFFFFFFF50h
mov [rbp+var_140], rax
add r14, 10h
inc ebx
loc_3DD78:
mov r12, [r14-8]
mov rdi, r12
call _strlen
mov r13d, [r14]
mov r15, rax
test r13b, 10h
jnz short loc_3DDBB
add r15, [rbp+var_150]
cmp r15, 80h
ja short loc_3DE0A
mov rdi, [rbp+var_140]
mov rsi, r12
mov rdx, rax
call _memcpy
lea rdi, [rbp+var_B0]
jmp short loc_3DDE4
loc_3DDBB:
add r15, [rbp+var_158]
cmp r15, 80h
ja short loc_3DE16
mov rdi, [rbp+var_148]
mov rsi, r12
mov rdx, rax
call _memcpy
lea rdi, [rbp+var_130]; char *
loc_3DDE4:
mov esi, r15d; unsigned int
mov edx, r13d; int
call _Z21register_rwlock_classPKcji; register_rwlock_class(char const*,uint,int)
mov r13d, eax
loc_3DDF2:
mov rax, [r14-10h]
mov [rax], r13d
add r14, 18h
dec ebx
cmp ebx, 1
jg loc_3DD78
jmp short loc_3DE4D
loc_3DE0A:
xor r13d, r13d
lea rdi, aRegisterBodyV1_0; "REGISTER_BODY_V1: (rw) name too long <%"...
jmp short loc_3DE20
loc_3DE16:
xor r13d, r13d
lea rdi, aRegisterBodyV1_1; "REGISTER_BODY_V1: (sx) name too long <%"...
loc_3DE20:
mov rsi, [rbp+var_138]
mov rdx, r12
xor eax, eax
call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...)
jmp short loc_3DDF2
loc_3DE33:
test ebx, ebx
jle short loc_3DE4D
inc ebx
loc_3DE39:
mov rax, [r14]
mov dword ptr [rax], 0
add r14, 18h
dec ebx
cmp ebx, 1
ja short loc_3DE39
loc_3DE4D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3DE6E
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3DE6E:
call ___stack_chk_fail
|
unsigned long long pfs_register_rwlock_v1(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
_DWORD **v12; // r14
double v13; // xmm4_8
double v14; // xmm5_8
int *v15; // r14
int i; // ebx
long long v17; // r12
long long v18; // rax
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
int v24; // r13d
unsigned int v25; // r15d
char *v26; // rdi
int v27; // r13d
const char *v28; // rdi
unsigned int v29; // ebx
char v31; // [rsp+0h] [rbp-170h]
long long v32; // [rsp+8h] [rbp-168h] BYREF
long long v33; // [rsp+10h] [rbp-160h] BYREF
long long v34; // [rsp+18h] [rbp-158h]
long long v35; // [rsp+20h] [rbp-150h]
char *v36; // [rsp+28h] [rbp-148h]
_BYTE *v37; // [rsp+30h] [rbp-140h]
long long v38; // [rsp+38h] [rbp-138h]
char v39[128]; // [rsp+40h] [rbp-130h] BYREF
_BYTE v40[128]; // [rsp+C0h] [rbp-B0h] BYREF
unsigned long long v41; // [rsp+140h] [rbp-30h]
v12 = (_DWORD **)a2;
v41 = __readfsqword(0x28u);
if ( (unsigned int)build_prefix(
(long long)rwlock_instrument_prefix,
(long long)*(&rwlock_instrument_prefix + 1),
a1,
(long long)v40,
&v32,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11)
|| (unsigned int)build_prefix(
(long long)sxlock_instrument_prefix,
(long long)*(&sxlock_instrument_prefix + 1),
a1,
(long long)v39,
&v33,
a4,
a5,
a6,
a7,
v13,
v14,
a10,
a11)
|| pfs_initialized[0] != 1 )
{
if ( a3 > 0 )
{
v29 = a3 + 1;
do
{
**v12 = 0;
v12 += 3;
--v29;
}
while ( v29 > 1 );
}
}
else
{
v38 = a1;
if ( a3 > 0 )
{
v34 = v33;
v36 = &v39[v33];
v35 = v32;
v37 = &v40[v32];
v15 = (int *)(a2 + 16);
for ( i = a3 + 1; i > 1; --i )
{
v17 = *((_QWORD *)v15 - 1);
v18 = strlen(v17);
v24 = *v15;
if ( (*v15 & 0x10) != 0 )
{
v25 = v34 + v18;
if ( (unsigned long long)(v34 + v18) > 0x80 )
{
v27 = 0;
v28 = "REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n";
goto LABEL_16;
}
memcpy(v36, v17, v18);
v26 = v39;
}
else
{
v25 = v35 + v18;
if ( (unsigned long long)(v35 + v18) > 0x80 )
{
v27 = 0;
v28 = "REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n";
LABEL_16:
pfs_print_error(v28, v38, v17, v19, v20, v21, a4, a5, a6, a7, v22, v23, a10, a11, v31);
goto LABEL_12;
}
memcpy(v37, v17, v18);
v26 = v40;
}
v27 = register_rwlock_class(v26, v25, v24);
LABEL_12:
**((_DWORD **)v15 - 2) = v27;
v15 += 6;
}
}
}
return __readfsqword(0x28u);
}
|
pfs_register_rwlock_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x148
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x41a618]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
LEA RCX,[RBP + -0xb0]
LEA R8,[RBP + -0x168]
MOV RDX,R15
CALL 0x0013dbd3
TEST EAX,EAX
JNZ 0x0013de33
LEA RAX,[0x41a628]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
LEA RCX,[RBP + -0x130]
LEA R8,[RBP + -0x160]
MOV RDX,R15
CALL 0x0013dbd3
TEST EAX,EAX
JNZ 0x0013de33
LEA RAX,[0x4d0a09]
CMP byte ptr [RAX],0x1
JNZ 0x0013de33
MOV qword ptr [RBP + -0x138],R15
TEST EBX,EBX
JLE 0x0013de4d
MOV RAX,qword ptr [RBP + -0x160]
MOV qword ptr [RBP + -0x158],RAX
ADD RAX,RBP
ADD RAX,-0x130
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x168]
MOV qword ptr [RBP + -0x150],RAX
ADD RAX,RBP
ADD RAX,-0xb0
MOV qword ptr [RBP + -0x140],RAX
ADD R14,0x10
INC EBX
LAB_0013dd78:
MOV R12,qword ptr [R14 + -0x8]
MOV RDI,R12
CALL 0x00126150
MOV R13D,dword ptr [R14]
MOV R15,RAX
TEST R13B,0x10
JNZ 0x0013ddbb
ADD R15,qword ptr [RBP + -0x150]
CMP R15,0x80
JA 0x0013de0a
MOV RDI,qword ptr [RBP + -0x140]
MOV RSI,R12
MOV RDX,RAX
CALL 0x00126290
LEA RDI,[RBP + -0xb0]
JMP 0x0013dde4
LAB_0013ddbb:
ADD R15,qword ptr [RBP + -0x158]
CMP R15,0x80
JA 0x0013de16
MOV RDI,qword ptr [RBP + -0x148]
MOV RSI,R12
MOV RDX,RAX
CALL 0x00126290
LEA RDI,[RBP + -0x130]
LAB_0013dde4:
MOV ESI,R15D
MOV EDX,R13D
CALL 0x00130400
MOV R13D,EAX
LAB_0013ddf2:
MOV RAX,qword ptr [R14 + -0x10]
MOV dword ptr [RAX],R13D
ADD R14,0x18
DEC EBX
CMP EBX,0x1
JG 0x0013dd78
JMP 0x0013de4d
LAB_0013de0a:
XOR R13D,R13D
LEA RDI,[0x17eb38]
JMP 0x0013de20
LAB_0013de16:
XOR R13D,R13D
LEA RDI,[0x17eb08]
LAB_0013de20:
MOV RSI,qword ptr [RBP + -0x138]
MOV RDX,R12
XOR EAX,EAX
CALL 0x001362c0
JMP 0x0013ddf2
LAB_0013de33:
TEST EBX,EBX
JLE 0x0013de4d
INC EBX
LAB_0013de39:
MOV RAX,qword ptr [R14]
MOV dword ptr [RAX],0x0
ADD R14,0x18
DEC EBX
CMP EBX,0x1
JA 0x0013de39
LAB_0013de4d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013de6e
ADD RSP,0x148
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013de6e:
CALL 0x001263b0
|
void pfs_register_rwlock_v1(char *param_1,int8 *param_2,int param_3)
{
char *__s;
int iVar1;
int4 uVar2;
size_t __n;
uint uVar3;
ulong *puVar4;
char *pcVar5;
uint *puVar6;
ulong uVar7;
long in_FS_OFFSET;
long local_170;
long local_168;
ulong local_138 [16];
ulong local_b8 [16];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = build_prefix((st_mysql_const_lex_string *)rwlock_instrument_prefix,DAT_0041a620,param_1,
local_b8);
if (((iVar1 == 0) &&
(iVar1 = build_prefix((st_mysql_const_lex_string *)sxlock_instrument_prefix,DAT_0041a630,
param_1,local_138), iVar1 == 0)) && (pfs_initialized == '\x01')) {
if (0 < param_3) {
puVar6 = (uint *)(param_2 + 2);
param_3 = param_3 + 1;
do {
__s = *(char **)(puVar6 + -2);
__n = strlen(__s);
uVar3 = *puVar6;
if ((uVar3 & 0x10) == 0) {
uVar7 = __n + local_170;
if (0x80 < uVar7) {
pcVar5 = "REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n";
goto LAB_0013de20;
}
memcpy((void *)((long)local_b8 + local_170),__s,__n);
puVar4 = local_b8;
LAB_0013dde4:
uVar2 = register_rwlock_class((char *)puVar4,(uint)uVar7,uVar3);
}
else {
uVar7 = __n + local_168;
if (uVar7 < 0x81) {
memcpy((void *)((long)local_138 + local_168),__s,__n);
puVar4 = local_138;
goto LAB_0013dde4;
}
pcVar5 = "REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n";
LAB_0013de20:
uVar2 = 0;
pfs_print_error(pcVar5,param_1,__s);
}
**(int4 **)(puVar6 + -4) = uVar2;
puVar6 = puVar6 + 6;
param_3 = param_3 + -1;
} while (1 < param_3);
}
}
else if (0 < param_3) {
uVar3 = param_3 + 1;
do {
*(int4 *)*param_2 = 0;
param_2 = param_2 + 3;
uVar3 = uVar3 - 1;
} while (1 < uVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
10,963 |
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O0
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1e2a00(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x2, %edx
leaq -0x40(%rbp), %r8
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xdd752
leaq 0x1e29b2(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xf4270
movl %eax, -0x34(%rbp)
leaq 0x1e2981(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
callq *%rax
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdd76b
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xf4270
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
inline_mysql_file_open_3:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_88]
mov edx, 2
lea r8, [rbp+var_40]
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_DD752
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_40]
mov esi, [rbp+var_34]
call rax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_DD76B
loc_DD752:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
loc_DD76B:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long inline_mysql_file_open_3(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h] BYREF
unsigned int v9; // [rsp+5Ch] [rbp-34h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+7Ch] [rbp-14h]
long long v14; // [rsp+80h] [rbp-10h]
unsigned int v15; // [rsp+88h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8);
if ( v8 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13);
v9 = my_open(v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9);
}
else
{
return (unsigned int)my_open(v12, v11, v10);
}
return v9;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x88]
MOV EDX,0x2
LEA R8,[RBP + -0x40]
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001dd752
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001f4270
MOV dword ptr [RBP + -0x34],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x34]
CALL RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001dd76b
LAB_001dd752:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001f4270
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
LAB_001dd76b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4
inline_mysql_file_open
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int4 local_3c;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48);
if (local_48 == 0) {
local_c = my_open(local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c);
local_3c = my_open(local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x200))(local_48,local_3c);
local_c = local_3c;
}
return local_c;
}
|
|
10,964 |
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), httplib::Error&)
|
monkey531[P]llama/examples/server/httplib.h
|
inline bool write_content(Stream &strm, const ContentProvider &content_provider,
size_t offset, size_t length, T is_shutting_down,
Error &error) {
size_t end_offset = offset + length;
auto ok = true;
DataSink data_sink;
data_sink.write = [&](const char *d, size_t l) -> bool {
if (ok) {
if (strm.is_writable() && write_data(strm, d, l)) {
offset += l;
} else {
ok = false;
}
}
return ok;
};
data_sink.is_writable = [&]() -> bool { return strm.is_writable(); };
while (offset < end_offset && !is_shutting_down()) {
if (!strm.is_writable()) {
error = Error::Write;
return false;
} else if (!content_provider(offset, end_offset - offset, data_sink)) {
error = Error::Canceled;
return false;
} else if (!ok) {
error = Error::Write;
return false;
}
}
error = Error::Success;
return true;
}
|
O1
|
c
|
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), httplib::Error&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %r9, 0x18(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %rax
movq %rdx, (%rax)
leaq 0xf(%rsp), %rbp
movb $0x1, (%rbp)
leaq 0x40(%rsp), %rdi
callq 0x68afe
leaq 0x28(%rsp), %rsi
movq %rbp, (%rsi)
movq %r13, 0x8(%rsi)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
leaq 0x40(%rsp), %rdi
callq 0x68c12
addq %rbx, %r15
leaq 0x28(%rsp), %rsi
movq %r13, (%rsi)
leaq 0x60(%rsp), %rdi
callq 0x68cb2
movb $0x1, %bl
xorl %ebp, %ebp
cmpq %r15, 0x10(%rsp)
jae 0x68abb
movl 0x28(%r14), %eax
cmpl $-0x1, %eax
je 0x68abb
movq (%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
movl $0x5, %ebp
testb %al, %al
je 0x68ab9
movq 0x10(%rsp), %rax
movq %r15, %rcx
subq %rax, %rcx
movq %rax, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
cmpq $0x0, 0x10(%r12)
je 0x68ae0
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq *0x18(%r12)
testb %al, %al
je 0x68ab4
cmpb $0x0, 0xf(%rsp)
jne 0x68a4c
jmp 0x68ab9
movl $0x7, %ebp
xorl %ebx, %ebx
movq 0x18(%rsp), %rax
movl %ebp, (%rax)
leaq 0x40(%rsp), %rdi
callq 0x68d36
movl %ebx, %eax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1f3e0
jmp 0x68ae9
jmp 0x68ae9
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x68d36
movq %rbx, %rdi
callq 0x20380
|
_ZN7httplib6detail13write_contentIZNS_6Server27write_content_with_providerERNS_6StreamERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_EUlvE_EEbS4_RKSt8functionIFbmmRNS_8DataSinkEEEmmT_RNS_5ErrorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov [rsp+248h+var_230], r9
mov r14, r8
mov r15, rcx
mov rbx, rdx
mov r12, rsi
mov r13, rdi
lea rax, [rsp+248h+var_238]
mov [rax], rdx
lea rbp, [rsp+248h+var_239]
mov byte ptr [rbp+0], 1
lea rdi, [rsp+248h+var_208]; this
call _ZN7httplib8DataSinkC2Ev; httplib::DataSink::DataSink(void)
lea rsi, [rsp+248h+var_220]
mov [rsi], rbp
mov [rsi+8], r13
lea rax, [rsp+248h+var_238]
mov [rsi+10h], rax
lea rdi, [rsp+248h+var_208]
call _ZNSt8functionIFbPKcmEEaSIZN7httplib6detail13write_contentIZNS5_6Server27write_content_with_providerERNS5_6StreamERKNS5_7RequestERNS5_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESN_EUlvE_EEbSA_RKS_IFbmmRNS5_8DataSinkEEEmmT_RNS5_5ErrorEEUlS1_mE_EENSt9enable_ifIXsrNS3_9_CallableISV_NSZ_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISV_E4typeEE4typeES3_EE5valueESt5decayISV_EE4type4typeESt15__invoke_resultIRS1B_JS1_mEEEE5valueERS3_E4typeEOSV_
add r15, rbx
lea rsi, [rsp+248h+var_220]
mov [rsi], r13
lea rdi, [rsp+248h+var_1E8]
call _ZNSt8functionIFbvEEaSIZN7httplib6detail13write_contentIZNS3_6Server27write_content_with_providerERNS3_6StreamERKNS3_7RequestERNS3_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_EUlvE_EEbS8_RKS_IFbmmRNS3_8DataSinkEEEmmT_RNS3_5ErrorEEUlvE_EENSt9enable_ifIXsrNS1_9_CallableIST_NSX_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIST_E4typeEE4typeES1_EE5valueESt5decayIST_EE4type4typeESt15__invoke_resultIRS19_JEEEE5valueERS1_E4typeEOST_
loc_68A4C:
mov bl, 1
xor ebp, ebp
cmp [rsp+248h+var_238], r15
jnb short loc_68ABB
mov eax, [r14+28h]
cmp eax, 0FFFFFFFFh
jz short loc_68ABB
mov rax, [r13+0]
mov rdi, r13
call qword ptr [rax+18h]
mov ebp, 5
test al, al
jz short loc_68AB9
mov rax, [rsp+248h+var_238]
mov rcx, r15
sub rcx, rax
mov [rsp+248h+var_220], rax
mov [rsp+248h+var_228], rcx
cmp qword ptr [r12+10h], 0
jz short loc_68AE0
mov rdi, r12
lea rsi, [rsp+248h+var_220]
lea rdx, [rsp+248h+var_228]
lea rcx, [rsp+248h+var_208]
call qword ptr [r12+18h]
test al, al
jz short loc_68AB4
cmp [rsp+248h+var_239], 0
jnz short loc_68A4C
jmp short loc_68AB9
loc_68AB4:
mov ebp, 7
loc_68AB9:
xor ebx, ebx
loc_68ABB:
mov rax, [rsp+248h+var_230]
mov [rax], ebp
lea rdi, [rsp+248h+var_208]; this
call _ZN7httplib8DataSinkD2Ev; httplib::DataSink::~DataSink()
mov eax, ebx
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_68AE0:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_68AE9
jmp short $+2
loc_68AE9:
mov rbx, rax
lea rdi, [rsp+248h+var_208]; this
call _ZN7httplib8DataSinkD2Ev; httplib::DataSink::~DataSink()
mov rdi, rbx
call __Unwind_Resume
|
long long httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
long long a5,
int *a6)
{
unsigned long long v8; // rbx
unsigned long long v9; // r15
int v10; // ebp
char v12; // [rsp+Fh] [rbp-239h] BYREF
unsigned long long v13; // [rsp+10h] [rbp-238h] BYREF
int *v14; // [rsp+18h] [rbp-230h]
unsigned long long v15; // [rsp+20h] [rbp-228h] BYREF
_QWORD v16[3]; // [rsp+28h] [rbp-220h] BYREF
_BYTE v17[32]; // [rsp+40h] [rbp-208h] BYREF
char v18[488]; // [rsp+60h] [rbp-1E8h] BYREF
v14 = a6;
v8 = a3;
v13 = a3;
v12 = 1;
httplib::DataSink::DataSink((httplib::DataSink *)v17);
v16[0] = &v12;
v16[1] = a1;
v16[2] = &v13;
std::function<bool ()(char const*,unsigned long)>::operator=<bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function const&<bool ()(unsigned long,unsigned long,httplib::DataSink &)>,unsigned long,unsigned long,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &)::{lambda(char const*,unsigned long)#1}>(v17);
v9 = v8 + a4;
v16[0] = a1;
std::function<bool ()(void)>::operator=<bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function const&<bool ()(unsigned long,unsigned long,httplib::DataSink &)>,unsigned long,unsigned long,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &)::{lambda(void)#1}>(v18);
while ( 1 )
{
LOBYTE(v8) = 1;
v10 = 0;
if ( v13 >= v9 || *(_DWORD *)(a5 + 40) == -1 )
break;
v10 = 5;
if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)a1 + 24LL))(a1) )
goto LABEL_10;
v16[0] = v13;
v15 = v9 - v13;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
if ( !(*(unsigned __int8 ( **)(long long, _QWORD *, unsigned long long *, _BYTE *))(a2 + 24))(
a2,
v16,
&v15,
v17) )
{
v10 = 7;
LABEL_10:
LODWORD(v8) = 0;
break;
}
if ( !v12 )
goto LABEL_10;
}
*v14 = v10;
httplib::DataSink::~DataSink((httplib::DataSink *)v17);
return (unsigned int)v8;
}
|
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV qword ptr [RSP + 0x18],R9
MOV R14,R8
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R13,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX],RDX
LEA RBP,[RSP + 0xf]
MOV byte ptr [RBP],0x1
LEA RDI,[RSP + 0x40]
CALL 0x00168afe
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RBP
MOV qword ptr [RSI + 0x8],R13
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSI + 0x10],RAX
LAB_00168a2d:
LEA RDI,[RSP + 0x40]
CALL 0x00168c12
ADD R15,RBX
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],R13
LEA RDI,[RSP + 0x60]
CALL 0x00168cb2
LAB_00168a4c:
MOV BL,0x1
XOR EBP,EBP
CMP qword ptr [RSP + 0x10],R15
JNC 0x00168abb
MOV EAX,dword ptr [R14 + 0x28]
CMP EAX,-0x1
JZ 0x00168abb
MOV RAX,qword ptr [R13]
LAB_00168a64:
MOV RDI,R13
CALL qword ptr [RAX + 0x18]
MOV EBP,0x5
TEST AL,AL
JZ 0x00168ab9
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,R15
SUB RCX,RAX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RCX
CMP qword ptr [R12 + 0x10],0x0
JZ 0x00168ae0
MOV RDI,R12
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
LEA RCX,[RSP + 0x40]
CALL qword ptr [R12 + 0x18]
TEST AL,AL
JZ 0x00168ab4
CMP byte ptr [RSP + 0xf],0x0
JNZ 0x00168a4c
JMP 0x00168ab9
LAB_00168ab4:
MOV EBP,0x7
LAB_00168ab9:
XOR EBX,EBX
LAB_00168abb:
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],EBP
LEA RDI,[RSP + 0x40]
CALL 0x00168d36
MOV EAX,EBX
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00168ae0:
CALL 0x0011f3e0
|
/* bool
httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&,
httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string
const&)::{lambda()#1}>(httplib::Stream&, std::function<bool (unsigned long, unsigned long,
httplib::DataSink&)> const&, unsigned long, unsigned long,
httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&,
httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1},
httplib::Error&) */
bool httplib::detail::
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>
(long *param_1,long param_2,long *param_3,long param_4,long param_5,
int4 *param_6)
{
char cVar1;
bool bVar2;
int4 uVar3;
char local_239;
long *local_238;
int4 *local_230;
long local_228;
long *local_220;
long *local_218;
long **local_210;
DataSink local_208 [32];
function<bool()> local_1e8 [440];
local_239 = '\x01';
local_238 = param_3;
local_230 = param_6;
DataSink::DataSink(local_208);
local_210 = &local_238;
/* try { // try from 00168a2d to 00168a36 has its CatchHandler @ 00168ae5 */
local_220 = (long *)&local_239;
local_218 = param_1;
std::function<bool(char_const*,unsigned_long)>::operator=
((function<bool(char_const*,unsigned_long)> *)local_208,
(_lambda_char_const__unsigned_long__1_ *)&local_220);
local_220 = param_1;
std::function<bool()>::operator=(local_1e8,(_lambda___1_ *)&local_220);
while( true ) {
bVar2 = true;
uVar3 = 0;
if (((long *)(param_4 + (long)param_3) <= local_238) ||
(uVar3 = 0, *(int *)(param_5 + 0x28) == -1)) goto LAB_00168abb;
/* try { // try from 00168a64 to 00168aa6 has its CatchHandler @ 00168ae9 */
cVar1 = (**(code **)(*param_1 + 0x18))(param_1);
uVar3 = 5;
if (cVar1 == '\0') goto LAB_00168ab9;
local_228 = (param_4 + (long)param_3) - (long)local_238;
local_220 = local_238;
if (*(long *)(param_2 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 00168ae0 to 00168ae4 has its CatchHandler @ 00168ae7 */
std::__throw_bad_function_call();
}
cVar1 = (**(code **)(param_2 + 0x18))(param_2,&local_220,&local_228,local_208);
if (cVar1 == '\0') break;
if (local_239 == '\0') {
LAB_00168ab9:
bVar2 = false;
LAB_00168abb:
*local_230 = uVar3;
DataSink::~DataSink(local_208);
return bVar2;
}
}
uVar3 = 7;
goto LAB_00168ab9;
}
|
|
10,965 |
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), httplib::Error&)
|
monkey531[P]llama/examples/server/httplib.h
|
inline bool write_content(Stream &strm, const ContentProvider &content_provider,
size_t offset, size_t length, T is_shutting_down,
Error &error) {
size_t end_offset = offset + length;
auto ok = true;
DataSink data_sink;
data_sink.write = [&](const char *d, size_t l) -> bool {
if (ok) {
if (strm.is_writable() && write_data(strm, d, l)) {
offset += l;
} else {
ok = false;
}
}
return ok;
};
data_sink.is_writable = [&]() -> bool { return strm.is_writable(); };
while (offset < end_offset && !is_shutting_down()) {
if (!strm.is_writable()) {
error = Error::Write;
return false;
} else if (!content_provider(offset, end_offset - offset, data_sink)) {
error = Error::Canceled;
return false;
} else if (!ok) {
error = Error::Write;
return false;
}
}
error = Error::Success;
return true;
}
|
O2
|
c
|
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), httplib::Error&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %r9, 0x10(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
leaq 0x7(%rsp), %rbp
movb $0x1, (%rbp)
leaq 0x30(%rsp), %rdi
callq 0x5c872
leaq 0x18(%rsp), %rsi
movq %rbp, (%rsi)
movq %r13, 0x8(%rsi)
leaq 0x8(%rsp), %rax
movq %rax, 0x10(%rsi)
leaq 0x30(%rsp), %rdi
callq 0x5c900
addq %rbx, %r15
leaq 0x18(%rsp), %rsi
movq %r13, (%rsi)
leaq 0x50(%rsp), %rdi
callq 0x5c94e
leaq 0x30(%rsp), %rbp
movb $0x1, %bl
xorl %eax, %eax
cmpq %r15, 0x8(%rsp)
jae 0x5c836
movl 0x28(%r14), %ecx
cmpl $-0x1, %ecx
je 0x5c836
movq (%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
testb %al, %al
je 0x5c82b
movq 0x8(%rsp), %rsi
movq %r15, %rdx
subq %rsi, %rdx
movq %r12, %rdi
movq %rbp, %rcx
callq 0x5c9a2
testb %al, %al
je 0x5c831
cmpb $0x0, 0x7(%rsp)
jne 0x5c7e8
xorl %ebx, %ebx
pushq $0x5
jmp 0x5c835
xorl %ebx, %ebx
pushq $0x7
popq %rax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x30(%rsp), %rdi
callq 0x5c9ce
movl %ebx, %eax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c85d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5c9ce
movq %rbx, %rdi
callq 0x293c0
|
_ZN7httplib6detail13write_contentIZNS_6Server27write_content_with_providerERNS_6StreamERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_EUlvE_EEbS4_RKSt8functionIFbmmRNS_8DataSinkEEEmmT_RNS_5ErrorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov [rsp+238h+var_228], r9
mov r14, r8
mov r15, rcx
mov rbx, rdx
mov r12, rsi
mov r13, rdi
lea rax, [rsp+238h+var_230]
mov [rax], rdx
lea rbp, [rsp+238h+var_231]
mov byte ptr [rbp+0], 1
lea rdi, [rsp+238h+var_208]; this
call _ZN7httplib8DataSinkC2Ev; httplib::DataSink::DataSink(void)
lea rsi, [rsp+238h+var_220]
mov [rsi], rbp
mov [rsi+8], r13
lea rax, [rsp+238h+var_230]
mov [rsi+10h], rax
lea rdi, [rsp+238h+var_208]
call _ZNSt8functionIFbPKcmEEaSIZN7httplib6detail13write_contentIZNS5_6Server27write_content_with_providerERNS5_6StreamERKNS5_7RequestERNS5_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESN_EUlvE_EEbSA_RKS_IFbmmRNS5_8DataSinkEEEmmT_RNS5_5ErrorEEUlS1_mE_EENSt9enable_ifIXsrNS3_9_CallableISV_NSZ_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISV_E4typeEE4typeES3_EE5valueESt5decayISV_EE4type4typeESt15__invoke_resultIRS1B_JS1_mEEEE5valueERS3_E4typeEOSV_
add r15, rbx
lea rsi, [rsp+238h+var_220]
mov [rsi], r13
lea rdi, [rsp+238h+var_1E8]
call _ZNSt8functionIFbvEEaSIZN7httplib6detail13write_contentIZNS3_6Server27write_content_with_providerERNS3_6StreamERKNS3_7RequestERNS3_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_EUlvE_EEbS8_RKS_IFbmmRNS3_8DataSinkEEEmmT_RNS3_5ErrorEEUlvE_EENSt9enable_ifIXsrNS1_9_CallableIST_NSX_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIST_E4typeEE4typeES1_EE5valueESt5decayIST_EE4type4typeESt15__invoke_resultIRS19_JEEEE5valueERS1_E4typeEOST_
lea rbp, [rsp+238h+var_208]
loc_5C7E8:
mov bl, 1
xor eax, eax
cmp [rsp+238h+var_230], r15
jnb short loc_5C836
mov ecx, [r14+28h]
cmp ecx, 0FFFFFFFFh
jz short loc_5C836
mov rax, [r13+0]
mov rdi, r13
call qword ptr [rax+18h]
test al, al
jz short loc_5C82B
mov rsi, [rsp+238h+var_230]
mov rdx, r15
sub rdx, rsi
mov rdi, r12
mov rcx, rbp
call _ZNKSt8functionIFbmmRN7httplib8DataSinkEEEclEmmS2_; std::function<bool ()(ulong,ulong,httplib::DataSink &)>::operator()(ulong,ulong,httplib::DataSink &)
test al, al
jz short loc_5C831
cmp [rsp+238h+var_231], 0
jnz short loc_5C7E8
loc_5C82B:
xor ebx, ebx
push 5
jmp short loc_5C835
loc_5C831:
xor ebx, ebx
push 7
loc_5C835:
pop rax
loc_5C836:
mov rcx, [rsp+238h+var_228]
mov [rcx], eax
lea rdi, [rsp+238h+var_208]; this
call _ZN7httplib8DataSinkD2Ev; httplib::DataSink::~DataSink()
mov eax, ebx
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_5C85D:
mov rbx, rax
lea rdi, [rsp+arg_28]; this
call _ZN7httplib8DataSinkD2Ev; httplib::DataSink::~DataSink()
mov rdi, rbx
call __Unwind_Resume
|
long long httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(
char *a1,
long long a2,
unsigned long long a3,
long long a4,
long long a5,
int *a6)
{
unsigned long long v8; // rbx
unsigned long long v9; // r15
int v10; // eax
int v12; // [rsp-8h] [rbp-240h]
char v13; // [rsp+7h] [rbp-231h] BYREF
unsigned long long v14; // [rsp+8h] [rbp-230h] BYREF
int *v15; // [rsp+10h] [rbp-228h]
char *v16; // [rsp+18h] [rbp-220h]
char *v17; // [rsp+20h] [rbp-218h]
unsigned long long *v18; // [rsp+28h] [rbp-210h]
_BYTE v19[32]; // [rsp+30h] [rbp-208h] BYREF
char v20[488]; // [rsp+50h] [rbp-1E8h] BYREF
v15 = a6;
v8 = a3;
v14 = a3;
v13 = 1;
httplib::DataSink::DataSink((httplib::DataSink *)v19);
v16 = &v13;
v17 = a1;
v18 = &v14;
std::function<bool ()(char const*,unsigned long)>::operator=<bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function const&<bool ()(unsigned long,unsigned long,httplib::DataSink &)>,unsigned long,unsigned long,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &)::{lambda(char const*,unsigned long)#1}>(v19);
v9 = v8 + a4;
v16 = a1;
std::function<bool ()(void)>::operator=<bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function const&<bool ()(unsigned long,unsigned long,httplib::DataSink &)>,unsigned long,unsigned long,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &)::{lambda(void)#1}>(v20);
while ( 1 )
{
LOBYTE(v8) = 1;
v10 = 0;
if ( v14 >= v9 || *(_DWORD *)(a5 + 40) == -1 )
break;
if ( !(*(unsigned __int8 ( **)(char *))(*(_QWORD *)a1 + 24LL))(a1) )
goto LABEL_7;
if ( !(unsigned __int8)std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::operator()(
a2,
v14,
v9 - v14,
v19) )
{
LODWORD(v8) = 0;
v12 = 7;
goto LABEL_9;
}
if ( !v13 )
{
LABEL_7:
LODWORD(v8) = 0;
v12 = 5;
LABEL_9:
v10 = v12;
break;
}
}
*v15 = v10;
httplib::DataSink::~DataSink((httplib::DataSink *)v19);
return (unsigned int)v8;
}
|
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV qword ptr [RSP + 0x10],R9
MOV R14,R8
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R13,RDI
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RDX
LEA RBP,[RSP + 0x7]
MOV byte ptr [RBP],0x1
LEA RDI,[RSP + 0x30]
CALL 0x0015c872
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RBP
MOV qword ptr [RSI + 0x8],R13
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSI + 0x10],RAX
LAB_0015c7c4:
LEA RDI,[RSP + 0x30]
CALL 0x0015c900
ADD R15,RBX
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],R13
LEA RDI,[RSP + 0x50]
CALL 0x0015c94e
LEA RBP,[RSP + 0x30]
LAB_0015c7e8:
MOV BL,0x1
XOR EAX,EAX
CMP qword ptr [RSP + 0x8],R15
JNC 0x0015c836
MOV ECX,dword ptr [R14 + 0x28]
CMP ECX,-0x1
JZ 0x0015c836
MOV RAX,qword ptr [R13]
LAB_0015c800:
MOV RDI,R13
CALL qword ptr [RAX + 0x18]
TEST AL,AL
JZ 0x0015c82b
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
SUB RDX,RSI
MOV RDI,R12
MOV RCX,RBP
CALL 0x0015c9a2
LAB_0015c820:
TEST AL,AL
JZ 0x0015c831
CMP byte ptr [RSP + 0x7],0x0
JNZ 0x0015c7e8
LAB_0015c82b:
XOR EBX,EBX
PUSH 0x5
JMP 0x0015c835
LAB_0015c831:
XOR EBX,EBX
PUSH 0x7
LAB_0015c835:
POP RAX
LAB_0015c836:
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],EAX
LEA RDI,[RSP + 0x30]
CALL 0x0015c9ce
MOV EAX,EBX
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bool
httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&,
httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string
const&)::{lambda()#1}>(httplib::Stream&, std::function<bool (unsigned long, unsigned long,
httplib::DataSink&)> const&, unsigned long, unsigned long,
httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&,
httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1},
httplib::Error&) */
bool httplib::detail::
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>
(long *param_1,ulong param_2,ulong param_3,long param_4,long param_5,
int4 *param_6)
{
char cVar1;
int4 uVar2;
bool bVar3;
char local_231;
ulong local_230;
int4 *local_228;
long *local_220;
long *local_218;
ulong *local_210;
DataSink local_208 [32];
function<bool()> local_1e8 [440];
local_231 = '\x01';
local_230 = param_3;
local_228 = param_6;
DataSink::DataSink(local_208);
local_210 = &local_230;
/* try { // try from 0015c7c4 to 0015c7cd has its CatchHandler @ 0015c85b */
local_220 = (long *)&local_231;
local_218 = param_1;
std::function<bool(char_const*,unsigned_long)>::operator=
((function<bool(char_const*,unsigned_long)> *)local_208,
(_lambda_char_const__unsigned_long__1_ *)&local_220);
local_220 = param_1;
std::function<bool()>::operator=(local_1e8,(_lambda___1_ *)&local_220);
do {
bVar3 = true;
uVar2 = 0;
if ((param_4 + param_3 <= local_230) || (*(int *)(param_5 + 0x28) == -1)) goto LAB_0015c836;
/* try { // try from 0015c800 to 0015c81f has its CatchHandler @ 0015c85d */
cVar1 = (**(code **)(*param_1 + 0x18))(param_1);
if (cVar1 == '\0') break;
cVar1 = std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>::operator()
(param_2,local_230,(DataSink *)((param_4 + param_3) - local_230));
if (cVar1 == '\0') {
uVar2 = 7;
goto LAB_0015c835;
}
} while (local_231 != '\0');
uVar2 = 5;
LAB_0015c835:
bVar3 = false;
LAB_0015c836:
*local_228 = uVar2;
DataSink::~DataSink(local_208);
return bVar3;
}
|
|
10,966 |
find_type_eol
|
eloqsql/mysys/typelib.c
|
static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags,
const char *eol)
{
int find,pos;
int UNINIT_VAR(findpos); /* guarded by find */
const char *UNINIT_VAR(termptr);
const char *i;
const char *j;
CHARSET_INFO *cs= &my_charset_latin1;
DBUG_ENTER("find_type_eol");
DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib));
DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM)));
if (!typelib->count)
{
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
find=0;
for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
{
for (i=*x ;
i < eol && !is_field_separator(flags, *i) &&
my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ;
if (! *j)
{
while (i < eol && *i == ' ')
i++; /* skip_end_space */
if (i >= eol || is_field_separator(flags, *i))
{
*x= i;
DBUG_RETURN(pos+1);
}
}
if ((i >= eol && !is_field_separator(flags, *i)) &&
(!*j || !(flags & FIND_TYPE_NO_PREFIX)))
{
find++;
findpos=pos;
termptr=i;
}
}
if (find == 0 || *x == eol)
{
DBUG_PRINT("exit",("Couldn't find type"));
DBUG_RETURN(0);
}
else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX))
{
DBUG_PRINT("exit",("Too many possibilities"));
DBUG_RETURN(-1);
}
*x= termptr;
DBUG_RETURN(findpos+1);
}
|
O0
|
c
|
find_type_eol:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x2b2288(%rip), %rax # 0x2ecdb0
movq %rax, -0x58(%rbp)
jmp 0x3ab2e
jmp 0x3ab30
jmp 0x3ab32
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3ab4d
jmp 0x3ab3d
jmp 0x3ab3f
jmp 0x3ab41
movl $0x0, -0x4(%rbp)
jmp 0x3ad63
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x3ad0b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x3abee
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3abc0
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2c, %ecx
movb %al, -0x59(%rbp)
je 0x3abee
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3d, %ecx
movb %al, -0x59(%rbp)
je 0x3abee
movq -0x58(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x48(%rbp), %rcx
movzbl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
movq -0x58(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x50(%rbp), %rdx
movzbl (%rdx), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x3abf7
jmp 0x3ac16
jmp 0x3abf9
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x3ab84
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x3aca3
jmp 0x3ac25
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5a(%rbp)
jae 0x3ac44
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x3ac4d
jmp 0x3ac5b
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3ac25
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3ac88
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3aca1
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x3ac88
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x3aca1
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3ad63
jmp 0x3aca3
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3acfb
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3acd0
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x3acfb
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
je 0x3acfb
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3ace4
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x3acfb
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x3acfd
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3ab5b
cmpl $0x0, -0x2c(%rbp)
je 0x3ad1e
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x3ad2d
jmp 0x3ad20
jmp 0x3ad22
jmp 0x3ad24
movl $0x0, -0x4(%rbp)
jmp 0x3ad63
cmpl $0x1, -0x2c(%rbp)
jne 0x3ad3e
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3ad4d
jmp 0x3ad40
jmp 0x3ad42
jmp 0x3ad44
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ad63
jmp 0x3ad4f
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
find_type_eol:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov eax, [rbp+var_34]
mov [rbp+var_34], eax
mov rax, [rbp+var_40]
mov [rbp+var_40], rax
lea rax, my_charset_latin1
mov [rbp+var_58], rax
jmp short $+2
loc_3AB2E:
jmp short $+2
loc_3AB30:
jmp short $+2
loc_3AB32:
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_3AB4D
jmp short $+2
loc_3AB3D:
jmp short $+2
loc_3AB3F:
jmp short $+2
loc_3AB41:
mov [rbp+var_4], 0
jmp loc_3AD63
loc_3AB4D:
mov [rbp+var_2C], 0
mov [rbp+var_30], 0
loc_3AB5B:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
movsxd rcx, [rbp+var_30]
mov rax, [rax+rcx*8]
mov [rbp+var_50], rax
cmp rax, 0
jz loc_3AD0B
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_48], rax
loc_3AB84:
mov rcx, [rbp+var_48]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_59], al
jnb short loc_3ABEE
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_3ABC0
mov rax, [rbp+var_48]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 2Ch ; ','
mov [rbp+var_59], al
jz short loc_3ABEE
mov rax, [rbp+var_48]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 3Dh ; '='
mov [rbp+var_59], al
jz short loc_3ABEE
loc_3ABC0:
mov rax, [rbp+var_58]
mov rax, [rax+50h]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx]
movsx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_58]
mov rcx, [rcx+50h]
mov rdx, [rbp+var_50]
movzx edx, byte ptr [rdx]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
setz al
mov [rbp+var_59], al
loc_3ABEE:
mov al, [rbp+var_59]
test al, 1
jnz short loc_3ABF7
jmp short loc_3AC16
loc_3ABF7:
jmp short $+2
loc_3ABF9:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_3AB84
loc_3AC16:
mov rax, [rbp+var_50]
cmp byte ptr [rax], 0
jnz loc_3ACA3
jmp short $+2
loc_3AC25:
mov rcx, [rbp+var_48]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_5A], al
jnb short loc_3AC44
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_5A], al
loc_3AC44:
mov al, [rbp+var_5A]
test al, 1
jnz short loc_3AC4D
jmp short loc_3AC5B
loc_3AC4D:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_3AC25
loc_3AC5B:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_28]
jnb short loc_3AC88
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_3ACA1
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_3AC88
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jnz short loc_3ACA1
loc_3AC88:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax], rcx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_4], eax
jmp loc_3AD63
loc_3ACA1:
jmp short $+2
loc_3ACA3:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_28]
jb short loc_3ACFB
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_3ACD0
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_3ACFB
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jz short loc_3ACFB
loc_3ACD0:
mov rax, [rbp+var_50]
cmp byte ptr [rax], 0
jz short loc_3ACE4
mov eax, [rbp+var_1C]
and eax, 1
cmp eax, 0
jnz short loc_3ACFB
loc_3ACE4:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
mov eax, [rbp+var_30]
mov [rbp+var_34], eax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_3ACFB:
jmp short $+2
loc_3ACFD:
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp loc_3AB5B
loc_3AD0B:
cmp [rbp+var_2C], 0
jz short loc_3AD1E
mov rax, [rbp+var_10]
mov rax, [rax]
cmp rax, [rbp+var_28]
jnz short loc_3AD2D
loc_3AD1E:
jmp short $+2
loc_3AD20:
jmp short $+2
loc_3AD22:
jmp short $+2
loc_3AD24:
mov [rbp+var_4], 0
jmp short loc_3AD63
loc_3AD2D:
cmp [rbp+var_2C], 1
jnz short loc_3AD3E
mov eax, [rbp+var_1C]
and eax, 1
cmp eax, 0
jz short loc_3AD4D
loc_3AD3E:
jmp short $+2
loc_3AD40:
jmp short $+2
loc_3AD42:
jmp short $+2
loc_3AD44:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3AD63
loc_3AD4D:
jmp short $+2
loc_3AD4F:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax], rcx
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_4], eax
loc_3AD63:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long find_type_eol(_BYTE **a1, long long a2, char a3, _BYTE *a4)
{
bool v5; // [rsp+0h] [rbp-5Ah]
bool v6; // [rsp+1h] [rbp-59h]
_BYTE *v7; // [rsp+Ah] [rbp-50h]
_BYTE *j; // [rsp+12h] [rbp-48h]
_BYTE *v9; // [rsp+1Ah] [rbp-40h]
int v10; // [rsp+26h] [rbp-34h]
int i; // [rsp+2Ah] [rbp-30h]
int v12; // [rsp+2Eh] [rbp-2Ch]
if ( *(_DWORD *)a2 )
{
v12 = 0;
for ( i = 0; ; ++i )
{
v7 = *(_BYTE **)(*(_QWORD *)(a2 + 16) + 8LL * i);
if ( !v7 )
break;
for ( j = *a1; ; ++j )
{
v6 = 0;
if ( j < a4 )
{
if ( (a3 & 8) == 0 || (v6 = 0, *j != 44) && (v6 = 0, *j != 61) )
v6 = *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*j) == *(char *)(*((_QWORD *)&my_charset_latin1 + 10)
+ (unsigned __int8)*v7);
}
if ( !v6 )
break;
++v7;
}
if ( !*v7 )
{
while ( 1 )
{
v5 = 0;
if ( j < a4 )
v5 = *j == 32;
if ( !v5 )
break;
++j;
}
if ( j >= a4 || (a3 & 8) != 0 && (*j == 44 || *j == 61) )
{
*a1 = j;
return (unsigned int)(i + 1);
}
}
if ( j >= a4 && ((a3 & 8) == 0 || *j != 44 && *j != 61) && (!*v7 || (a3 & 1) == 0) )
{
++v12;
v10 = i;
v9 = j;
}
}
if ( v12 && *a1 != a4 )
{
if ( v12 == 1 && (a3 & 1) == 0 )
{
*a1 = v9;
return (unsigned int)(v10 + 1);
}
else
{
return (unsigned int)-1;
}
}
else
{
return 0;
}
}
else
{
return 0;
}
}
|
find_type_eol:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0x3ecdb0]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013ab2e
LAB_0013ab2e:
JMP 0x0013ab30
LAB_0013ab30:
JMP 0x0013ab32
LAB_0013ab32:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x0013ab4d
JMP 0x0013ab3d
LAB_0013ab3d:
JMP 0x0013ab3f
LAB_0013ab3f:
JMP 0x0013ab41
LAB_0013ab41:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013ad63
LAB_0013ab4d:
MOV dword ptr [RBP + -0x2c],0x0
MOV dword ptr [RBP + -0x30],0x0
LAB_0013ab5b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x0013ad0b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0013ab84:
MOV RCX,qword ptr [RBP + -0x48]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0013abee
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0013abc0
MOV RAX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x2c
MOV byte ptr [RBP + -0x59],AL
JZ 0x0013abee
MOV RAX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x3d
MOV byte ptr [RBP + -0x59],AL
JZ 0x0013abee
LAB_0013abc0:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RCX + 0x50]
MOV RDX,qword ptr [RBP + -0x50]
MOVZX EDX,byte ptr [RDX]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x59],AL
LAB_0013abee:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0013abf7
JMP 0x0013ac16
LAB_0013abf7:
JMP 0x0013abf9
LAB_0013abf9:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013ab84
LAB_0013ac16:
MOV RAX,qword ptr [RBP + -0x50]
CMP byte ptr [RAX],0x0
JNZ 0x0013aca3
JMP 0x0013ac25
LAB_0013ac25:
MOV RCX,qword ptr [RBP + -0x48]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x5a],AL
JNC 0x0013ac44
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x5a],AL
LAB_0013ac44:
MOV AL,byte ptr [RBP + -0x5a]
TEST AL,0x1
JNZ 0x0013ac4d
JMP 0x0013ac5b
LAB_0013ac4d:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013ac25
LAB_0013ac5b:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0013ac88
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0013aca1
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JZ 0x0013ac88
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3d
JNZ 0x0013aca1
LAB_0013ac88:
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ad63
LAB_0013aca1:
JMP 0x0013aca3
LAB_0013aca3:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013acfb
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0013acd0
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JZ 0x0013acfb
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3d
JZ 0x0013acfb
LAB_0013acd0:
MOV RAX,qword ptr [RBP + -0x50]
CMP byte ptr [RAX],0x0
JZ 0x0013ace4
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0013acfb
LAB_0013ace4:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013acfb:
JMP 0x0013acfd
LAB_0013acfd:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0013ab5b
LAB_0013ad0b:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0013ad1e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0013ad2d
LAB_0013ad1e:
JMP 0x0013ad20
LAB_0013ad20:
JMP 0x0013ad22
LAB_0013ad22:
JMP 0x0013ad24
LAB_0013ad24:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013ad63
LAB_0013ad2d:
CMP dword ptr [RBP + -0x2c],0x1
JNZ 0x0013ad3e
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0013ad4d
LAB_0013ad3e:
JMP 0x0013ad40
LAB_0013ad40:
JMP 0x0013ad42
LAB_0013ad42:
JMP 0x0013ad44
LAB_0013ad44:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013ad63
LAB_0013ad4d:
JMP 0x0013ad4f
LAB_0013ad4f:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
LAB_0013ad63:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int find_type_eol(int8 *param_1,int *param_2,uint param_3,byte *param_4)
{
bool bVar1;
byte *local_58;
byte *local_50;
byte *local_48;
int local_3c;
int local_38;
int local_34;
int local_c;
if (*param_2 == 0) {
local_c = 0;
}
else {
local_34 = 0;
local_38 = 0;
while (local_58 = *(byte **)(*(long *)(param_2 + 4) + (long)local_38 * 8),
local_58 != (byte *)0x0) {
local_50 = (byte *)*param_1;
while( true ) {
bVar1 = false;
if ((local_50 < param_4) &&
(((param_3 & 8) == 0 ||
((bVar1 = false, *local_50 != 0x2c && (bVar1 = false, *local_50 != 0x3d)))))) {
bVar1 = PTR_to_upper_latin1_003ece00[*local_50] == PTR_to_upper_latin1_003ece00[*local_58]
;
}
if (!bVar1) break;
local_50 = local_50 + 1;
local_58 = local_58 + 1;
}
if (*local_58 == 0) {
while( true ) {
bVar1 = false;
if (local_50 < param_4) {
bVar1 = *local_50 == 0x20;
}
if (!bVar1) break;
local_50 = local_50 + 1;
}
if ((param_4 <= local_50) ||
(((param_3 & 8) != 0 && ((*local_50 == 0x2c || (*local_50 == 0x3d)))))) {
*param_1 = local_50;
return local_38 + 1;
}
}
if (((param_4 <= local_50) &&
(((param_3 & 8) == 0 || ((*local_50 != 0x2c && (*local_50 != 0x3d)))))) &&
((*local_58 == 0 || ((param_3 & 1) == 0)))) {
local_34 = local_34 + 1;
local_3c = local_38;
local_48 = local_50;
}
local_38 = local_38 + 1;
}
if ((local_34 == 0) || ((byte *)*param_1 == param_4)) {
local_c = 0;
}
else if ((local_34 == 1) && ((param_3 & 1) == 0)) {
*param_1 = local_48;
local_c = local_3c + 1;
}
else {
local_c = -1;
}
}
return local_c;
}
|
|
10,967 |
mi_state_info_write
|
eloqsql/storage/myisam/mi_open.c
|
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
{
uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
uchar *ptr=buff;
uint i, keys= (uint) state->header.keys,
key_blocks=state->header.max_block_size_index;
DBUG_ENTER("mi_state_info_write");
memcpy(ptr, &state->header, sizeof(state->header));
ptr+=sizeof(state->header);
/* open_count must be first because of _mi_mark_file_changed ! */
mi_int2store(ptr,state->open_count); ptr +=2;
*ptr++= (uchar)state->changed; *ptr++= state->sortkey;
mi_rowstore(ptr,state->state.records); ptr +=8;
mi_rowstore(ptr,state->state.del); ptr +=8;
mi_rowstore(ptr,state->split); ptr +=8;
mi_sizestore(ptr,state->dellink); ptr +=8;
mi_sizestore(ptr,state->state.key_file_length); ptr +=8;
mi_sizestore(ptr,state->state.data_file_length); ptr +=8;
mi_sizestore(ptr,state->state.empty); ptr +=8;
mi_sizestore(ptr,state->state.key_empty); ptr +=8;
mi_int8store(ptr,state->auto_increment); ptr +=8;
mi_int8store(ptr,(ulonglong) state->state.checksum);ptr +=8;
mi_int4store(ptr,state->process); ptr +=4;
mi_int4store(ptr,state->unique); ptr +=4;
mi_int4store(ptr,state->status); ptr +=4;
mi_int4store(ptr,state->update_count); ptr +=4;
ptr+=state->state_diff_length;
for (i=0; i < keys; i++)
{
mi_sizestore(ptr,state->key_root[i]); ptr +=8;
}
for (i=0; i < key_blocks; i++)
{
mi_sizestore(ptr,state->key_del[i]); ptr +=8;
}
if (pWrite & 2) /* From isamchk */
{
uint key_parts= mi_uint2korr(state->header.key_parts);
mi_int4store(ptr,state->sec_index_changed); ptr +=4;
mi_int4store(ptr,state->sec_index_used); ptr +=4;
mi_int4store(ptr,state->version); ptr +=4;
mi_int8store(ptr,state->key_map); ptr +=8;
mi_int8store(ptr,(ulonglong) state->create_time); ptr +=8;
mi_int8store(ptr,(ulonglong) state->recover_time); ptr +=8;
mi_int8store(ptr,(ulonglong) state->check_time); ptr +=8;
mi_sizestore(ptr,state->rec_per_key_rows); ptr+=8;
for (i=0 ; i < key_parts ; i++)
{
mi_int4store(ptr,state->rec_per_key_part[i]); ptr+=4;
}
}
if (pWrite & 1)
DBUG_RETURN(mysql_file_pwrite(file, buff, (size_t) (ptr-buff), 0L,
MYF(MY_NABP | MY_THREADSAFE)) != 0);
DBUG_RETURN(mysql_file_write(file, buff, (size_t) (ptr-buff),
MYF(MY_NABP)) != 0);
}
|
O3
|
c
|
mi_state_info_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2388, %rsp # imm = 0x2388
movl %edi, %r13d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzbl 0x12(%rsi), %ecx
movzbl 0x15(%rsi), %eax
movq 0x10(%rsi), %rdi
movq %rdi, -0x2350(%rbp)
movups (%rsi), %xmm0
movaps %xmm0, -0x2360(%rbp)
movzwl 0xec(%rsi), %edi
rolw $0x8, %di
movw %di, -0x2348(%rbp)
movb 0xf0(%rsi), %dil
movb %dil, -0x2346(%rbp)
movb 0xe8(%rsi), %dil
movb %dil, -0x2345(%rbp)
movq 0x18(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x2344(%rbp)
movq 0x20(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x233c(%rbp)
movq 0x50(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x2334(%rbp)
movq 0x58(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x232c(%rbp)
movq 0x38(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x2324(%rbp)
movq 0x40(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x231c(%rbp)
movq 0x28(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x2314(%rbp)
movq 0x30(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x230c(%rbp)
movq 0x60(%rsi), %rdi
bswapq %rdi
movq %rdi, -0x2304(%rbp)
movl 0x48(%rsi), %ebx
movl %ebx, %edi
movl $0x0, -0x22fc(%rbp)
movb %bl, -0x22f5(%rbp)
movb %bh, -0x22f6(%rbp)
shrl $0x10, %ebx
shrl $0x18, %edi
movb %bl, -0x22f7(%rbp)
movb %dil, -0x22f8(%rbp)
movl 0x68(%rsi), %edi
bswapl %edi
movl %edi, -0x22f4(%rbp)
movl 0x70(%rsi), %edi
bswapl %edi
movl %edi, -0x22f0(%rbp)
movl 0x80(%rsi), %edi
bswapl %edi
movl %edi, -0x22ec(%rbp)
movl 0x78(%rsi), %edi
bswapl %edi
movl %edi, -0x22e8(%rbp)
movl 0xf4(%rsi), %edi
leaq (%rdi,%rbp), %r14
addq $-0x22e4, %r14 # imm = 0xDD1C
testq %rcx, %rcx
je 0x9f488
movq 0x98(%rsi), %rdi
shll $0x3, %ecx
xorl %r8d, %r8d
movq (%rdi,%r8), %r9
bswapq %r9
movq %r9, (%r14,%r8)
addq $0x8, %r8
cmpq %r8, %rcx
jne 0x9f471
addq %r8, %r14
testq %rax, %rax
je 0x9f4b0
shll $0x3, %eax
xorl %ecx, %ecx
movq 0xa0(%rsi), %rdi
movq (%rdi,%rcx), %rdi
bswapq %rdi
movq %rdi, (%r14,%rcx)
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x9f492
addq %rcx, %r14
testb $0x2, %dl
je 0x9f556
movzbl 0xf(%rsi), %ecx
movzbl 0xe(%rsi), %eax
movl 0xb0(%rsi), %edi
bswapl %edi
movl %edi, (%r14)
movl 0xb8(%rsi), %edi
bswapl %edi
movl %edi, 0x4(%r14)
movl 0xc8(%rsi), %edi
bswapl %edi
movl %edi, 0x8(%r14)
movq 0xc0(%rsi), %rdi
bswapq %rdi
movq %rdi, 0xc(%r14)
movq 0xd0(%rsi), %rdi
bswapq %rdi
movq %rdi, 0x14(%r14)
movq 0xd8(%rsi), %rdi
bswapq %rdi
movq %rdi, 0x1c(%r14)
movq 0xe0(%rsi), %rdi
bswapq %rdi
movq %rdi, 0x24(%r14)
movq 0xa8(%rsi), %rdi
bswapq %rdi
shll $0x8, %eax
movq %rdi, 0x2c(%r14)
addq $0x34, %r14
orl %ecx, %eax
je 0x9f556
shll $0x2, %eax
xorl %ecx, %ecx
movq 0x88(%rsi), %rdi
movl (%rdi,%rcx,2), %edi
bswapl %edi
movl %edi, (%r14,%rcx)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x9f53a
addq %rcx, %r14
leaq -0x2360(%rbp), %rax
subq %rax, %r14
leaq 0x3196a1(%rip), %r12 # 0x3b8c08
testb $0x1, %dl
jne 0x9f5a7
movq (%r12), %rax
leaq -0x23a8(%rbp), %rdi
movl %r13d, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x9f615
leaq -0x2360(%rbp), %rsi
movl $0x4, %ecx
movl %r13d, %edi
movq %r14, %rdx
callq 0x32935
jmp 0x9f5e3
movq (%r12), %rax
leaq -0x23a8(%rbp), %rdi
movl %r13d, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x9f655
leaq -0x2360(%rbp), %rsi
movl $0x804, %r8d # imm = 0x804
movl %r13d, %edi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xc450a
movq %rax, %rbx
xorl %eax, %eax
testq %rbx, %rbx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x30(%rbp), %rdx
jne 0x9f6af
movb %cl, %al
addq $0x2388, %rsp # imm = 0x2388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r12), %rax
leaq 0x68fed(%rip), %rdx # 0x108610
movq %r15, %rdi
movq %r14, %rsi
movl $0x3cd, %ecx # imm = 0x3CD
callq *0x210(%rax)
leaq -0x2360(%rbp), %rsi
movl $0x4, %ecx
movl %r13d, %edi
movq %r14, %rdx
callq 0x32935
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
jmp 0x9f699
movq %rax, %r15
movq (%r12), %rax
leaq 0x68fad(%rip), %rdx # 0x108610
movq %r15, %rdi
movq %r14, %rsi
movl $0x3cb, %ecx # imm = 0x3CB
callq *0x210(%rax)
leaq -0x2360(%rbp), %rsi
movl $0x804, %r8d # imm = 0x804
movl %r13d, %edi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xc450a
movq %rax, %rbx
testq %rax, %rax
movl $0x0, %esi
cmoveq %r14, %rsi
movq (%r12), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x9f5e6
callq 0x2b280
|
mi_state_info_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2388h
mov r13d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
movzx ecx, byte ptr [rsi+12h]
movzx eax, byte ptr [rsi+15h]
mov rdi, [rsi+10h]
mov [rbp+var_2350], rdi
movups xmm0, xmmword ptr [rsi]
movaps [rbp+var_2360], xmm0
movzx edi, word ptr [rsi+0ECh]
rol di, 8
mov [rbp+var_2348], di
mov dil, [rsi+0F0h]
mov [rbp+var_2346], dil
mov dil, [rsi+0E8h]
mov [rbp+var_2345], dil
mov rdi, [rsi+18h]
bswap rdi
mov [rbp+var_2344], rdi
mov rdi, [rsi+20h]
bswap rdi
mov [rbp+var_233C], rdi
mov rdi, [rsi+50h]
bswap rdi
mov [rbp+var_2334], rdi
mov rdi, [rsi+58h]
bswap rdi
mov [rbp+var_232C], rdi
mov rdi, [rsi+38h]
bswap rdi
mov [rbp+var_2324], rdi
mov rdi, [rsi+40h]
bswap rdi
mov [rbp+var_231C], rdi
mov rdi, [rsi+28h]
bswap rdi
mov [rbp+var_2314], rdi
mov rdi, [rsi+30h]
bswap rdi
mov [rbp+var_230C], rdi
mov rdi, [rsi+60h]
bswap rdi
mov [rbp+var_2304], rdi
mov ebx, [rsi+48h]
mov edi, ebx
mov [rbp+var_22FC], 0
mov [rbp+var_22F5], bl
mov [rbp+var_22F6], bh
shr ebx, 10h
shr edi, 18h
mov [rbp+var_22F7], bl
mov [rbp+var_22F8], dil
mov edi, [rsi+68h]
bswap edi
mov [rbp+var_22F4], edi
mov edi, [rsi+70h]
bswap edi
mov [rbp+var_22F0], edi
mov edi, [rsi+80h]
bswap edi
mov [rbp+var_22EC], edi
mov edi, [rsi+78h]
bswap edi
mov [rbp+var_22E8], edi
mov edi, [rsi+0F4h]
lea r14, [rdi+rbp]
add r14, 0FFFFFFFFFFFFDD1Ch
test rcx, rcx
jz short loc_9F488
mov rdi, [rsi+98h]
shl ecx, 3
xor r8d, r8d
loc_9F471:
mov r9, [rdi+r8]
bswap r9
mov [r14+r8], r9
add r8, 8
cmp rcx, r8
jnz short loc_9F471
add r14, r8
loc_9F488:
test rax, rax
jz short loc_9F4B0
shl eax, 3
xor ecx, ecx
loc_9F492:
mov rdi, [rsi+0A0h]
mov rdi, [rdi+rcx]
bswap rdi
mov [r14+rcx], rdi
add rcx, 8
cmp rax, rcx
jnz short loc_9F492
add r14, rcx
loc_9F4B0:
test dl, 2
jz loc_9F556
movzx ecx, byte ptr [rsi+0Fh]
movzx eax, byte ptr [rsi+0Eh]
mov edi, [rsi+0B0h]
bswap edi
mov [r14], edi
mov edi, [rsi+0B8h]
bswap edi
mov [r14+4], edi
mov edi, [rsi+0C8h]
bswap edi
mov [r14+8], edi
mov rdi, [rsi+0C0h]
bswap rdi
mov [r14+0Ch], rdi
mov rdi, [rsi+0D0h]
bswap rdi
mov [r14+14h], rdi
mov rdi, [rsi+0D8h]
bswap rdi
mov [r14+1Ch], rdi
mov rdi, [rsi+0E0h]
bswap rdi
mov [r14+24h], rdi
mov rdi, [rsi+0A8h]
bswap rdi
shl eax, 8
mov [r14+2Ch], rdi
add r14, 34h ; '4'
or eax, ecx
jz short loc_9F556
shl eax, 2
xor ecx, ecx
loc_9F53A:
mov rdi, [rsi+88h]
mov edi, [rdi+rcx*2]
bswap edi
mov [r14+rcx], edi
add rcx, 4
cmp rax, rcx
jnz short loc_9F53A
add r14, rcx
loc_9F556:
lea rax, [rbp+var_2360]
sub r14, rax
lea r12, PSI_server
test dl, 1
jnz short loc_9F5A7
mov rax, [r12]
lea rdi, [rbp+var_23A8]
mov esi, r13d
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz loc_9F615
lea rsi, [rbp+var_2360]
mov ecx, 4
mov edi, r13d
mov rdx, r14
call my_write
jmp short loc_9F5E3
loc_9F5A7:
mov rax, [r12]
lea rdi, [rbp+var_23A8]
mov esi, r13d
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz loc_9F655
lea rsi, [rbp+var_2360]
mov r8d, 804h
mov edi, r13d
mov rdx, r14
xor ecx, ecx
call my_pwrite
loc_9F5E3:
mov rbx, rax
loc_9F5E6:
xor eax, eax
test rbx, rbx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_30]
jnz loc_9F6AF
mov al, cl
add rsp, 2388h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9F615:
mov r15, rax
mov rax, [r12]
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 3CDh
call qword ptr [rax+210h]
lea rsi, [rbp+var_2360]
mov ecx, 4
mov edi, r13d
mov rdx, r14
call my_write
mov rbx, rax
xor esi, esi
test rax, rax
jmp short loc_9F699
loc_9F655:
mov r15, rax
mov rax, [r12]
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 3CBh
call qword ptr [rax+210h]
lea rsi, [rbp+var_2360]
mov r8d, 804h
mov edi, r13d
mov rdx, r14
xor ecx, ecx
call my_pwrite
mov rbx, rax
test rax, rax
mov esi, 0
loc_9F699:
cmovz rsi, r14
mov rax, [r12]
mov rdi, r15
call qword ptr [rax+218h]
jmp loc_9F5E6
loc_9F6AF:
call ___stack_chk_fail
|
bool mi_state_info_write(unsigned int a1, __int128 *a2, char a3)
{
long long v4; // rcx
long long v5; // rax
int v6; // edi
_BYTE *v7; // r14
long long v8; // rdi
long long v9; // rcx
long long v10; // r8
long long v11; // rax
long long v12; // rcx
int v13; // ecx
int v14; // eax
int v15; // eax
long long v16; // rax
long long v17; // rcx
long long v18; // r14
long long v19; // rax
long long v20; // rax
long long v21; // rax
long long v22; // rbx
long long v24; // r15
long long v25; // rsi
bool v26; // zf
_BYTE v28[72]; // [rsp+8h] [rbp-23A8h] BYREF
__int128 v29; // [rsp+50h] [rbp-2360h] BYREF
long long v30; // [rsp+60h] [rbp-2350h]
__int16 v31; // [rsp+68h] [rbp-2348h]
char v32; // [rsp+6Ah] [rbp-2346h]
char v33; // [rsp+6Bh] [rbp-2345h]
unsigned long long v34; // [rsp+6Ch] [rbp-2344h]
unsigned long long v35; // [rsp+74h] [rbp-233Ch]
unsigned long long v36; // [rsp+7Ch] [rbp-2334h]
unsigned long long v37; // [rsp+84h] [rbp-232Ch]
unsigned long long v38; // [rsp+8Ch] [rbp-2324h]
unsigned long long v39; // [rsp+94h] [rbp-231Ch]
unsigned long long v40; // [rsp+9Ch] [rbp-2314h]
unsigned long long v41; // [rsp+A4h] [rbp-230Ch]
unsigned long long v42; // [rsp+ACh] [rbp-2304h]
int v43; // [rsp+B4h] [rbp-22FCh]
char v44; // [rsp+B8h] [rbp-22F8h]
char v45; // [rsp+B9h] [rbp-22F7h]
char v46; // [rsp+BAh] [rbp-22F6h]
char v47; // [rsp+BBh] [rbp-22F5h]
unsigned __int32 v48; // [rsp+BCh] [rbp-22F4h]
unsigned __int32 v49; // [rsp+C0h] [rbp-22F0h]
unsigned __int32 v50; // [rsp+C4h] [rbp-22ECh]
unsigned __int32 v51; // [rsp+C8h] [rbp-22E8h]
_BYTE v52[8884]; // [rsp+CCh] [rbp-22E4h] BYREF
unsigned long long v53; // [rsp+2380h] [rbp-30h]
v53 = __readfsqword(0x28u);
v4 = *((unsigned __int8 *)a2 + 18);
v5 = *((unsigned __int8 *)a2 + 21);
v30 = *((_QWORD *)a2 + 2);
v29 = *a2;
v31 = __ROL2__(*((_WORD *)a2 + 118), 8);
v32 = *((_BYTE *)a2 + 240);
v33 = *((_BYTE *)a2 + 232);
v34 = _byteswap_uint64(*((_QWORD *)a2 + 3));
v35 = _byteswap_uint64(*((_QWORD *)a2 + 4));
v36 = _byteswap_uint64(*((_QWORD *)a2 + 10));
v37 = _byteswap_uint64(*((_QWORD *)a2 + 11));
v38 = _byteswap_uint64(*((_QWORD *)a2 + 7));
v39 = _byteswap_uint64(*((_QWORD *)a2 + 8));
v40 = _byteswap_uint64(*((_QWORD *)a2 + 5));
v41 = _byteswap_uint64(*((_QWORD *)a2 + 6));
v42 = _byteswap_uint64(*((_QWORD *)a2 + 12));
v6 = *((_DWORD *)a2 + 18);
v43 = 0;
v46 = BYTE1(v6);
v47 = v6;
v45 = BYTE2(v6);
v44 = HIBYTE(v6);
v48 = _byteswap_ulong(*((_DWORD *)a2 + 26));
v49 = _byteswap_ulong(*((_DWORD *)a2 + 28));
v50 = _byteswap_ulong(*((_DWORD *)a2 + 32));
v51 = _byteswap_ulong(*((_DWORD *)a2 + 30));
v7 = &v52[*((unsigned int *)a2 + 61)];
if ( v4 )
{
v8 = *((_QWORD *)a2 + 19);
v9 = (unsigned int)(8 * v4);
v10 = 0LL;
do
{
*(_QWORD *)&v7[v10] = _byteswap_uint64(*(_QWORD *)(v8 + v10));
v10 += 8LL;
}
while ( v9 != v10 );
v7 += v10;
}
if ( v5 )
{
v11 = (unsigned int)(8 * v5);
v12 = 0LL;
do
{
*(_QWORD *)&v7[v12] = _byteswap_uint64(*(_QWORD *)(*((_QWORD *)a2 + 20) + v12));
v12 += 8LL;
}
while ( v11 != v12 );
v7 += v12;
}
if ( (a3 & 2) != 0 )
{
v13 = *((unsigned __int8 *)a2 + 15);
v14 = *((unsigned __int8 *)a2 + 14);
*(_DWORD *)v7 = _byteswap_ulong(*((_DWORD *)a2 + 44));
*((_DWORD *)v7 + 1) = _byteswap_ulong(*((_DWORD *)a2 + 46));
*((_DWORD *)v7 + 2) = _byteswap_ulong(*((_DWORD *)a2 + 50));
*(_QWORD *)(v7 + 12) = _byteswap_uint64(*((_QWORD *)a2 + 24));
*(_QWORD *)(v7 + 20) = _byteswap_uint64(*((_QWORD *)a2 + 26));
*(_QWORD *)(v7 + 28) = _byteswap_uint64(*((_QWORD *)a2 + 27));
*(_QWORD *)(v7 + 36) = _byteswap_uint64(*((_QWORD *)a2 + 28));
*(_QWORD *)(v7 + 44) = _byteswap_uint64(*((_QWORD *)a2 + 21));
v7 += 52;
v15 = v13 | (v14 << 8);
if ( v15 )
{
v16 = (unsigned int)(4 * v15);
v17 = 0LL;
do
{
*(_DWORD *)&v7[v17] = _byteswap_ulong(*(_DWORD *)(*((_QWORD *)a2 + 17) + 2 * v17));
v17 += 4LL;
}
while ( v16 != v17 );
v7 += v17;
}
}
v18 = v7 - (_BYTE *)&v29;
if ( (a3 & 1) != 0 )
{
v21 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v28, a1, 7LL);
if ( !v21 )
{
v20 = my_pwrite(a1, &v29, v18, 0LL, 2052LL);
goto LABEL_19;
}
v24 = v21;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v21,
v18,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
971LL);
v22 = my_pwrite(a1, &v29, v18, 0LL, 2052LL);
v26 = v22 == 0;
v25 = 0LL;
}
else
{
v19 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v28, a1, 7LL);
if ( !v19 )
{
v20 = my_write(a1, (long long)&v29, v18, 4LL);
LABEL_19:
v22 = v20;
return v22 != 0;
}
v24 = v19;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v19,
v18,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
973LL);
v22 = my_write(a1, (long long)&v29, v18, 4LL);
v25 = 0LL;
v26 = v22 == 0;
}
if ( v26 )
v25 = v18;
((void ( *)(long long, long long))PSI_server[67])(v24, v25);
return v22 != 0;
}
|
mi_state_info_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2388
MOV R13D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX ECX,byte ptr [RSI + 0x12]
MOVZX EAX,byte ptr [RSI + 0x15]
MOV RDI,qword ptr [RSI + 0x10]
MOV qword ptr [RBP + -0x2350],RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVAPS xmmword ptr [RBP + -0x2360],XMM0
MOVZX EDI,word ptr [RSI + 0xec]
ROL DI,0x8
MOV word ptr [RBP + -0x2348],DI
MOV DIL,byte ptr [RSI + 0xf0]
MOV byte ptr [RBP + -0x2346],DIL
MOV DIL,byte ptr [RSI + 0xe8]
MOV byte ptr [RBP + -0x2345],DIL
MOV RDI,qword ptr [RSI + 0x18]
BSWAP RDI
MOV qword ptr [RBP + -0x2344],RDI
MOV RDI,qword ptr [RSI + 0x20]
BSWAP RDI
MOV qword ptr [RBP + -0x233c],RDI
MOV RDI,qword ptr [RSI + 0x50]
BSWAP RDI
MOV qword ptr [RBP + -0x2334],RDI
MOV RDI,qword ptr [RSI + 0x58]
BSWAP RDI
MOV qword ptr [RBP + -0x232c],RDI
MOV RDI,qword ptr [RSI + 0x38]
BSWAP RDI
MOV qword ptr [RBP + -0x2324],RDI
MOV RDI,qword ptr [RSI + 0x40]
BSWAP RDI
MOV qword ptr [RBP + -0x231c],RDI
MOV RDI,qword ptr [RSI + 0x28]
BSWAP RDI
MOV qword ptr [RBP + -0x2314],RDI
MOV RDI,qword ptr [RSI + 0x30]
BSWAP RDI
MOV qword ptr [RBP + -0x230c],RDI
MOV RDI,qword ptr [RSI + 0x60]
BSWAP RDI
MOV qword ptr [RBP + -0x2304],RDI
MOV EBX,dword ptr [RSI + 0x48]
MOV EDI,EBX
MOV dword ptr [RBP + -0x22fc],0x0
MOV byte ptr [RBP + -0x22f5],BL
MOV byte ptr [RBP + -0x22f6],BH
SHR EBX,0x10
SHR EDI,0x18
MOV byte ptr [RBP + -0x22f7],BL
MOV byte ptr [RBP + -0x22f8],DIL
MOV EDI,dword ptr [RSI + 0x68]
BSWAP EDI
MOV dword ptr [RBP + -0x22f4],EDI
MOV EDI,dword ptr [RSI + 0x70]
BSWAP EDI
MOV dword ptr [RBP + -0x22f0],EDI
MOV EDI,dword ptr [RSI + 0x80]
BSWAP EDI
MOV dword ptr [RBP + -0x22ec],EDI
MOV EDI,dword ptr [RSI + 0x78]
BSWAP EDI
MOV dword ptr [RBP + -0x22e8],EDI
MOV EDI,dword ptr [RSI + 0xf4]
LEA R14,[RDI + RBP*0x1]
ADD R14,-0x22e4
TEST RCX,RCX
JZ 0x0019f488
MOV RDI,qword ptr [RSI + 0x98]
SHL ECX,0x3
XOR R8D,R8D
LAB_0019f471:
MOV R9,qword ptr [RDI + R8*0x1]
BSWAP R9
MOV qword ptr [R14 + R8*0x1],R9
ADD R8,0x8
CMP RCX,R8
JNZ 0x0019f471
ADD R14,R8
LAB_0019f488:
TEST RAX,RAX
JZ 0x0019f4b0
SHL EAX,0x3
XOR ECX,ECX
LAB_0019f492:
MOV RDI,qword ptr [RSI + 0xa0]
MOV RDI,qword ptr [RDI + RCX*0x1]
BSWAP RDI
MOV qword ptr [R14 + RCX*0x1],RDI
ADD RCX,0x8
CMP RAX,RCX
JNZ 0x0019f492
ADD R14,RCX
LAB_0019f4b0:
TEST DL,0x2
JZ 0x0019f556
MOVZX ECX,byte ptr [RSI + 0xf]
MOVZX EAX,byte ptr [RSI + 0xe]
MOV EDI,dword ptr [RSI + 0xb0]
BSWAP EDI
MOV dword ptr [R14],EDI
MOV EDI,dword ptr [RSI + 0xb8]
BSWAP EDI
MOV dword ptr [R14 + 0x4],EDI
MOV EDI,dword ptr [RSI + 0xc8]
BSWAP EDI
MOV dword ptr [R14 + 0x8],EDI
MOV RDI,qword ptr [RSI + 0xc0]
BSWAP RDI
MOV qword ptr [R14 + 0xc],RDI
MOV RDI,qword ptr [RSI + 0xd0]
BSWAP RDI
MOV qword ptr [R14 + 0x14],RDI
MOV RDI,qword ptr [RSI + 0xd8]
BSWAP RDI
MOV qword ptr [R14 + 0x1c],RDI
MOV RDI,qword ptr [RSI + 0xe0]
BSWAP RDI
MOV qword ptr [R14 + 0x24],RDI
MOV RDI,qword ptr [RSI + 0xa8]
BSWAP RDI
SHL EAX,0x8
MOV qword ptr [R14 + 0x2c],RDI
ADD R14,0x34
OR EAX,ECX
JZ 0x0019f556
SHL EAX,0x2
XOR ECX,ECX
LAB_0019f53a:
MOV RDI,qword ptr [RSI + 0x88]
MOV EDI,dword ptr [RDI + RCX*0x2]
BSWAP EDI
MOV dword ptr [R14 + RCX*0x1],EDI
ADD RCX,0x4
CMP RAX,RCX
JNZ 0x0019f53a
ADD R14,RCX
LAB_0019f556:
LEA RAX,[RBP + -0x2360]
SUB R14,RAX
LEA R12,[0x4b8c08]
TEST DL,0x1
JNZ 0x0019f5a7
MOV RAX,qword ptr [R12]
LEA RDI,[RBP + -0x23a8]
MOV ESI,R13D
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0019f615
LEA RSI,[RBP + -0x2360]
MOV ECX,0x4
MOV EDI,R13D
MOV RDX,R14
CALL 0x00132935
JMP 0x0019f5e3
LAB_0019f5a7:
MOV RAX,qword ptr [R12]
LEA RDI,[RBP + -0x23a8]
MOV ESI,R13D
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0019f655
LEA RSI,[RBP + -0x2360]
MOV R8D,0x804
MOV EDI,R13D
MOV RDX,R14
XOR ECX,ECX
CALL 0x001c450a
LAB_0019f5e3:
MOV RBX,RAX
LAB_0019f5e6:
XOR EAX,EAX
TEST RBX,RBX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x30]
JNZ 0x0019f6af
MOV AL,CL
ADD RSP,0x2388
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019f615:
MOV R15,RAX
MOV RAX,qword ptr [R12]
LEA RDX,[0x208610]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0x3cd
CALL qword ptr [RAX + 0x210]
LEA RSI,[RBP + -0x2360]
MOV ECX,0x4
MOV EDI,R13D
MOV RDX,R14
CALL 0x00132935
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
JMP 0x0019f699
LAB_0019f655:
MOV R15,RAX
MOV RAX,qword ptr [R12]
LEA RDX,[0x208610]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0x3cb
CALL qword ptr [RAX + 0x210]
LEA RSI,[RBP + -0x2360]
MOV R8D,0x804
MOV EDI,R13D
MOV RDX,R14
XOR ECX,ECX
CALL 0x001c450a
MOV RBX,RAX
TEST RAX,RAX
MOV ESI,0x0
LAB_0019f699:
CMOVZ RSI,R14
MOV RAX,qword ptr [R12]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x0019f5e6
LAB_0019f6af:
CALL 0x0012b280
|
bool mi_state_info_write(int4 param_1,int4 *param_2,ulong param_3)
{
byte bVar1;
byte bVar2;
int1 uVar3;
int1 uVar4;
int4 uVar5;
uint uVar6;
ulong uVar7;
ushort uVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
uint *puVar13;
long in_FS_OFFSET;
int1 local_23b0 [72];
int4 local_2368;
int4 uStack_2364;
int4 uStack_2360;
int4 uStack_235c;
int8 local_2358;
ushort local_2350;
int1 local_234e;
int1 local_234d;
ulong local_234c;
ulong local_2344;
ulong local_233c;
ulong local_2334;
ulong local_232c;
ulong local_2324;
ulong local_231c;
ulong local_2314;
ulong local_230c;
int4 local_2304;
int1 local_2300;
int1 local_22ff;
int1 local_22fe;
int1 local_22fd;
uint local_22fc;
uint local_22f8;
uint local_22f4;
uint local_22f0;
ulong uStack_22ec;
uint auStack_22e4 [2219];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = *(byte *)((long)param_2 + 0x12);
bVar2 = *(byte *)((long)param_2 + 0x15);
local_2358 = *(int8 *)(param_2 + 4);
local_2368 = *param_2;
uStack_2364 = param_2[1];
uStack_2360 = param_2[2];
uStack_235c = param_2[3];
local_2350 = *(ushort *)(param_2 + 0x3b) << 8 | *(ushort *)(param_2 + 0x3b) >> 8;
local_234e = *(int1 *)(param_2 + 0x3c);
local_234d = *(int1 *)(param_2 + 0x3a);
uVar7 = *(ulong *)(param_2 + 6);
local_234c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 8);
local_2344 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x14);
local_233c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x16);
local_2334 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0xe);
local_232c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x10);
local_2324 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 10);
local_231c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0xc);
local_2314 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x18);
local_230c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18
| (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 |
(uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar5 = param_2[0x12];
local_2304 = 0;
local_22fd = (int1)uVar5;
local_22fe = (int1)((uint)uVar5 >> 8);
local_22ff = (int1)((uint)uVar5 >> 0x10);
local_2300 = (int1)((uint)uVar5 >> 0x18);
uVar6 = param_2[0x1a];
local_22fc = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar6 = param_2[0x1c];
local_22f8 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar6 = param_2[0x20];
local_22f4 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar6 = param_2[0x1e];
local_22f0 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
puVar13 = (uint *)((long)&uStack_22ec + (ulong)(uint)param_2[0x3d]);
if (bVar1 != 0) {
lVar10 = *(long *)(param_2 + 0x26);
lVar12 = 0;
do {
uVar7 = *(ulong *)(lVar10 + lVar12);
*(ulong *)((long)puVar13 + lVar12) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
lVar12 = lVar12 + 8;
} while ((ulong)bVar1 * 8 != lVar12);
puVar13 = (uint *)((long)puVar13 + lVar12);
}
if (bVar2 != 0) {
lVar10 = 0;
do {
uVar7 = *(ulong *)(*(long *)(param_2 + 0x28) + lVar10);
*(ulong *)((long)puVar13 + lVar10) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
lVar10 = lVar10 + 8;
} while ((ulong)bVar2 * 8 != lVar10);
puVar13 = (uint *)((long)puVar13 + lVar10);
}
if ((param_3 & 2) != 0) {
uVar3 = *(int1 *)((long)param_2 + 0xf);
uVar4 = *(int1 *)((long)param_2 + 0xe);
uVar6 = param_2[0x2c];
*puVar13 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar6 = param_2[0x2e];
puVar13[1] = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar6 = param_2[0x32];
puVar13[2] = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
uVar7 = *(ulong *)(param_2 + 0x30);
*(ulong *)(puVar13 + 3) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x34);
*(ulong *)(puVar13 + 5) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x36);
*(ulong *)(puVar13 + 7) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x38);
*(ulong *)(puVar13 + 9) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
uVar7 = *(ulong *)(param_2 + 0x2a);
*(ulong *)(puVar13 + 0xb) =
uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 |
(uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 |
(uVar7 & 0xff00) << 0x28 | uVar7 << 0x38;
puVar13 = puVar13 + 0xd;
uVar8 = CONCAT11(uVar4,uVar3);
if (uVar8 != 0) {
lVar10 = 0;
do {
uVar6 = *(uint *)(*(long *)(param_2 + 0x22) + lVar10 * 2);
*(uint *)((long)puVar13 + lVar10) =
uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18;
lVar10 = lVar10 + 4;
} while ((ulong)uVar8 << 2 != lVar10);
puVar13 = (uint *)((long)puVar13 + lVar10);
}
}
lVar10 = (long)puVar13 - (long)&local_2368;
if ((param_3 & 1) == 0) {
lVar12 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,7);
if (lVar12 == 0) {
lVar9 = my_write(param_1,&local_2368,lVar10,4);
goto LAB_0019f5e6;
}
(**(code **)(PSI_server + 0x210))
(lVar12,lVar10,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x3cd);
lVar9 = my_write(param_1,&local_2368,lVar10,4);
}
else {
lVar12 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,7);
if (lVar12 == 0) {
lVar9 = my_pwrite(param_1,&local_2368,lVar10,0,0x804);
goto LAB_0019f5e6;
}
(**(code **)(PSI_server + 0x210))
(lVar12,lVar10,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x3cb);
lVar9 = my_pwrite(param_1,&local_2368,lVar10,0,0x804);
}
lVar11 = 0;
if (lVar9 == 0) {
lVar11 = lVar10;
}
(**(code **)(PSI_server + 0x218))(lVar12,lVar11);
LAB_0019f5e6:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar9 != 0;
}
|
|
10,968 |
ma_SHA1Encode
|
eloqsql/libmariadb/libmariadb/ma_sha1.c
|
static void ma_SHA1Encode(unsigned char *output, uint32 *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char) ((input[i] >> 24) & 0xff);
output[j + 1] = (unsigned char) ((input[i] >> 16) & 0xff);
output[j + 2] = (unsigned char) ((input[i] >> 8) & 0xff);
output[j + 3] = (unsigned char) (input[i] & 0xff);
}
}
|
O0
|
c
|
ma_SHA1Encode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x64d74
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x64ccd
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_SHA1Encode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_64CCD:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jnb loc_64D74
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 18h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 10h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 8
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 3
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_1C]
add eax, 4
mov [rbp+var_1C], eax
jmp loc_64CCD
loc_64D74:
pop rbp
retn
|
long long ma_SHA1Encode(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-1Ch]
unsigned int v5; // [rsp+4h] [rbp-18h]
v5 = 0;
for ( i = 0; ; i += 4 )
{
result = i;
if ( i >= a3 )
break;
*(_BYTE *)(a1 + i) = HIBYTE(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 1) = BYTE2(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 2) = BYTE1(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 3) = *(_DWORD *)(a2 + 4LL * v5++);
}
return result;
}
|
ma_SHA1Encode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_00164ccd:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x00164d74
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x18
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x10
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x8
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x3
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00164ccd
LAB_00164d74:
POP RBP
RET
|
void ma_SHA1Encode(long param_1,long param_2,uint param_3)
{
int4 local_24;
int4 local_20;
local_20 = 0;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) {
*(char *)(param_1 + (ulong)local_24) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x18);
*(char *)(param_1 + (ulong)(local_24 + 1)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x10);
*(char *)(param_1 + (ulong)(local_24 + 2)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 8);
*(char *)(param_1 + (ulong)(local_24 + 3)) =
(char)*(int4 *)(param_2 + (ulong)local_20 * 4);
local_20 = local_20 + 1;
}
return;
}
|
|
10,969 |
ma_new
|
eloqsql/storage/maria/ma_page.c
|
my_off_t _ma_new(register MARIA_HA *info, int level,
MARIA_PINNED_PAGE **page_link)
{
my_off_t pos;
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("_ma_new");
if (_ma_lock_key_del(info, 1))
{
mysql_mutex_lock(&share->intern_lock);
pos= share->state.state.key_file_length;
if (pos >= share->base.max_key_file_length - block_size)
{
my_errno=HA_ERR_INDEX_FILE_FULL;
mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(HA_OFFSET_ERROR);
}
share->state.state.key_file_length+= block_size;
/* Following is for not transactional tables */
info->state->key_file_length= share->state.state.key_file_length;
mysql_mutex_unlock(&share->intern_lock);
(*page_link)->changed= 0;
(*page_link)->write_lock= PAGECACHE_LOCK_WRITE;
}
else
{
uchar *buff;
pos= share->key_del_current; /* Protected */
DBUG_ASSERT(share->pagecache->block_size == block_size);
if (!(buff= pagecache_read(share->pagecache,
&share->kfile,
(pgcache_page_no_t) (pos / block_size), level,
0, share->page_type,
PAGECACHE_LOCK_WRITE, &(*page_link)->link)))
{
pos= HA_OFFSET_ERROR;
_ma_set_fatal_error(info, my_errno);
}
else
{
/*
Next deleted page's number is in the header of the present page
(single linked list):
*/
#ifdef DBUG_ASSERT_EXISTS
my_off_t key_del_current;
#endif
share->key_del_current= mi_sizekorr(buff+share->keypage_header);
#ifdef DBUG_ASSERT_EXISTS
key_del_current= share->key_del_current;
DBUG_ASSERT((key_del_current != 0) &&
((key_del_current == HA_OFFSET_ERROR) ||
(key_del_current <=
(share->state.state.key_file_length - block_size))));
#endif
}
(*page_link)->unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
(*page_link)->write_lock= PAGECACHE_LOCK_WRITE;
/*
We have to mark it changed as _ma_flush_pending_blocks() uses
'changed' to know if we used the page cache or not
*/
(*page_link)->changed= 1;
push_dynamic(&info->pinned_pages, (void*) *page_link);
*page_link= dynamic_element(&info->pinned_pages,
info->pinned_pages.elements-1,
MARIA_PINNED_PAGE *);
}
share->state.changed|= STATE_NOT_SORTED_PAGES;
DBUG_PRINT("exit",("Pos: %ld",(long) pos));
DBUG_RETURN(pos);
}
|
O3
|
c
|
ma_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %r13
movl 0x7bc(%r13), %ebx
movl $0x1, %esi
callq 0x5a92d
testb %al, %al
je 0x58f9b
movq %r12, -0x30(%rbp)
leaq 0x8f0(%r13), %r12
cmpq $0x0, 0x930(%r13)
jne 0x59099
movq %r12, %rdi
callq 0x29220
movq 0x38(%r13), %r15
movq 0x370(%r13), %rax
subq %rbx, %rax
cmpq %rax, %r15
jae 0x58ff3
addq %r15, %rbx
movq %rbx, 0x38(%r13)
movq 0x20(%r14), %rax
movq %rbx, 0x20(%rax)
movq 0x930(%r13), %rdi
testq %rdi, %rdi
jne 0x590b2
movq %r12, %rdi
callq 0x291e0
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movb $0x0, 0x10(%rax)
movq (%rcx), %rax
movl $0x4, 0xc(%rax)
jmp 0x5907f
movq 0x600(%r13), %rdi
movl %r15d, %ecx
movq 0x700(%r13), %r15
leaq 0x750(%r13), %rsi
movq %r15, %rax
xorl %edx, %edx
divq %rbx
movl 0x7d4(%r13), %r9d
movq %rax, %rdx
xorl %r8d, %r8d
pushq (%r12)
pushq $0x4
callq 0x32206
addq $0x10, %rsp
testq %rax, %rax
je 0x5901f
movl 0x744(%r13), %ecx
movq (%rax,%rcx), %rax
bswapq %rax
movq %rax, 0x700(%r13)
jmp 0x59035
callq 0xa16ee
movl $0x88, (%rax)
movq 0x930(%r13), %rdi
testq %rdi, %rdi
jne 0x590c7
movq %r12, %rdi
callq 0x291e0
movq $-0x1, %r15
jmp 0x59087
callq 0xa16ee
movl (%rax), %esi
movq %r14, %rdi
callq 0x36618
movq $-0x1, %r15
movq (%r12), %rax
movl $0x6, 0x8(%rax)
movq (%r12), %rax
movl $0x4, 0xc(%rax)
movq (%r12), %rax
movb $0x1, 0x10(%rax)
leaq 0x2e8(%r14), %rdi
movq (%r12), %rsi
callq 0x91792
movl 0x2f0(%r14), %eax
decl %eax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x2e8(%r14), %rax
movq %rax, (%r12)
orb $0x20, 0x170(%r13)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x81762(%rip), %rsi # 0xda802
movq %r12, %rdi
movl $0x19b, %edx # imm = 0x19B
callq 0x2eb8f
jmp 0x58f43
leaq 0x32cf57(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x58f79
leaq 0x32cf42(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5900e
|
_ma_new:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
mov r15d, esi
mov r14, rdi
mov r13, [rdi]
mov ebx, [r13+7BCh]
mov esi, 1
call _ma_lock_key_del
test al, al
jz short loc_58F9B
mov [rbp+var_30], r12
lea r12, [r13+8F0h]
cmp qword ptr [r13+930h], 0
jnz loc_59099
mov rdi, r12
call _pthread_mutex_lock
loc_58F43:
mov r15, [r13+38h]
mov rax, [r13+370h]
sub rax, rbx
cmp r15, rax
jnb loc_58FF3
add rbx, r15
mov [r13+38h], rbx
mov rax, [r14+20h]
mov [rax+20h], rbx
mov rdi, [r13+930h]
test rdi, rdi
jnz loc_590B2
loc_58F79:
mov rdi, r12
call _pthread_mutex_unlock
mov rcx, [rbp+var_30]
mov rax, [rcx]
mov byte ptr [rax+10h], 0
mov rax, [rcx]
mov dword ptr [rax+0Ch], 4
jmp loc_5907F
loc_58F9B:
mov rdi, [r13+600h]
mov ecx, r15d
mov r15, [r13+700h]
lea rsi, [r13+750h]
mov rax, r15
xor edx, edx
div rbx
mov r9d, [r13+7D4h]
mov rdx, rax
xor r8d, r8d
push qword ptr [r12]
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz short loc_5901F
mov ecx, [r13+744h]
mov rax, [rax+rcx]
bswap rax
mov [r13+700h], rax
jmp short loc_59035
loc_58FF3:
call _my_thread_var
mov dword ptr [rax], 88h
mov rdi, [r13+930h]
test rdi, rdi
jnz loc_590C7
loc_5900E:
mov rdi, r12
call _pthread_mutex_unlock
mov r15, 0FFFFFFFFFFFFFFFFh
jmp short loc_59087
loc_5901F:
call _my_thread_var
mov esi, [rax]
mov rdi, r14
call _ma_set_fatal_error
mov r15, 0FFFFFFFFFFFFFFFFh
loc_59035:
mov rax, [r12]
mov dword ptr [rax+8], 6
mov rax, [r12]
mov dword ptr [rax+0Ch], 4
mov rax, [r12]
mov byte ptr [rax+10h], 1
lea rdi, [r14+2E8h]
mov rsi, [r12]
call insert_dynamic
mov eax, [r14+2F0h]
dec eax
lea rax, [rax+rax*2]
shl rax, 3
add rax, [r14+2E8h]
mov [r12], rax
loc_5907F:
or byte ptr [r13+170h], 20h
loc_59087:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_59099:
lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov edx, 19Bh
call psi_mutex_lock
jmp loc_58F43
loc_590B2:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_58F79
loc_590C7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5900E
|
long long ma_new(long long *a1, int a2, _QWORD *a3)
{
long long v6; // r13
unsigned long long v7; // rbx
const char *v8; // rsi
long long v9; // rdi
unsigned long long v10; // r15
long long v11; // rbx
long long v12; // rdi
int v13; // ecx
long long v14; // rax
unsigned int *v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
int v19; // r9d
v6 = *a1;
v7 = *(unsigned int *)(*a1 + 1980);
v8 = (_BYTE *)(&dword_0 + 1);
if ( !(unsigned __int8)ma_lock_key_del(a1, 1LL) )
{
v12 = *(_QWORD *)(v6 + 1536);
v13 = a2;
v10 = *(_QWORD *)(v6 + 1792);
v14 = pagecache_read(v12, v6 + 1872, v10 / v7, v13, 0LL, *(_DWORD *)(v6 + 2004), 4u, (_QWORD *)*a3);
if ( v14 )
{
*(_QWORD *)(v6 + 1792) = _byteswap_uint64(*(_QWORD *)(v14 + *(unsigned int *)(v6 + 1860)));
}
else
{
v15 = (unsigned int *)my_thread_var(v12, (const char *)(v6 + 1872));
ma_set_fatal_error(a1, *v15, v16, v17, v18, v19);
v10 = -1LL;
}
*(_DWORD *)(*a3 + 8LL) = 6;
*(_DWORD *)(*a3 + 12LL) = 4;
*(_BYTE *)(*a3 + 16LL) = 1;
insert_dynamic(a1 + 93, *a3);
*a3 = a1[93] + 24LL * (unsigned int)(*((_DWORD *)a1 + 188) - 1);
LABEL_15:
*(_BYTE *)(v6 + 368) |= 0x20u;
return v10;
}
if ( *(_QWORD *)(v6 + 2352) )
{
v8 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c";
v9 = v6 + 2288;
psi_mutex_lock(v6 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c", 0x19Bu);
}
else
{
v9 = v6 + 2288;
pthread_mutex_lock(v6 + 2288);
}
v10 = *(_QWORD *)(v6 + 56);
if ( v10 < *(_QWORD *)(v6 + 880) - v7 )
{
v11 = v10 + v7;
*(_QWORD *)(v6 + 56) = v11;
*(_QWORD *)(a1[4] + 32) = v11;
if ( *(_QWORD *)(v6 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v6 + 2288);
*(_BYTE *)(*a3 + 16LL) = 0;
*(_DWORD *)(*a3 + 12LL) = 4;
goto LABEL_15;
}
*(_DWORD *)my_thread_var(v9, v8) = 136;
if ( *(_QWORD *)(v6 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v6 + 2288);
return -1LL;
}
|
_ma_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
MOV R15D,ESI
MOV R14,RDI
MOV R13,qword ptr [RDI]
MOV EBX,dword ptr [R13 + 0x7bc]
MOV ESI,0x1
CALL 0x0015a92d
TEST AL,AL
JZ 0x00158f9b
MOV qword ptr [RBP + -0x30],R12
LEA R12,[R13 + 0x8f0]
CMP qword ptr [R13 + 0x930],0x0
JNZ 0x00159099
MOV RDI,R12
CALL 0x00129220
LAB_00158f43:
MOV R15,qword ptr [R13 + 0x38]
MOV RAX,qword ptr [R13 + 0x370]
SUB RAX,RBX
CMP R15,RAX
JNC 0x00158ff3
ADD RBX,R15
MOV qword ptr [R13 + 0x38],RBX
MOV RAX,qword ptr [R14 + 0x20]
MOV qword ptr [RAX + 0x20],RBX
MOV RDI,qword ptr [R13 + 0x930]
TEST RDI,RDI
JNZ 0x001590b2
LAB_00158f79:
MOV RDI,R12
CALL 0x001291e0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RCX]
MOV byte ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RCX]
MOV dword ptr [RAX + 0xc],0x4
JMP 0x0015907f
LAB_00158f9b:
MOV RDI,qword ptr [R13 + 0x600]
MOV ECX,R15D
MOV R15,qword ptr [R13 + 0x700]
LEA RSI,[R13 + 0x750]
MOV RAX,R15
XOR EDX,EDX
DIV RBX
MOV R9D,dword ptr [R13 + 0x7d4]
MOV RDX,RAX
XOR R8D,R8D
PUSH qword ptr [R12]
PUSH 0x4
CALL 0x00132206
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0015901f
MOV ECX,dword ptr [R13 + 0x744]
MOV RAX,qword ptr [RAX + RCX*0x1]
BSWAP RAX
MOV qword ptr [R13 + 0x700],RAX
JMP 0x00159035
LAB_00158ff3:
CALL 0x001a16ee
MOV dword ptr [RAX],0x88
MOV RDI,qword ptr [R13 + 0x930]
TEST RDI,RDI
JNZ 0x001590c7
LAB_0015900e:
MOV RDI,R12
CALL 0x001291e0
MOV R15,-0x1
JMP 0x00159087
LAB_0015901f:
CALL 0x001a16ee
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00136618
MOV R15,-0x1
LAB_00159035:
MOV RAX,qword ptr [R12]
MOV dword ptr [RAX + 0x8],0x6
MOV RAX,qword ptr [R12]
MOV dword ptr [RAX + 0xc],0x4
MOV RAX,qword ptr [R12]
MOV byte ptr [RAX + 0x10],0x1
LEA RDI,[R14 + 0x2e8]
MOV RSI,qword ptr [R12]
CALL 0x00191792
MOV EAX,dword ptr [R14 + 0x2f0]
DEC EAX
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x3
ADD RAX,qword ptr [R14 + 0x2e8]
MOV qword ptr [R12],RAX
LAB_0015907f:
OR byte ptr [R13 + 0x170],0x20
LAB_00159087:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00159099:
LEA RSI,[0x1da802]
MOV RDI,R12
MOV EDX,0x19b
CALL 0x0012eb8f
JMP 0x00158f43
LAB_001590b2:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00158f79
LAB_001590c7:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015900e
|
ulong _ma_new(long *param_1,int4 param_2,long *param_3)
{
pthread_mutex_t *__mutex;
long lVar1;
char cVar2;
long lVar3;
int4 *puVar4;
ulong uVar5;
ulong uVar6;
lVar1 = *param_1;
uVar5 = (ulong)*(uint *)(lVar1 + 0x7bc);
cVar2 = _ma_lock_key_del(param_1,1);
if (cVar2 == '\0') {
uVar6 = *(ulong *)(lVar1 + 0x700);
lVar3 = pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,uVar6 / uVar5,param_2,0,
*(int4 *)(lVar1 + 0x7d4),4,*param_3);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar4);
uVar6 = 0xffffffffffffffff;
}
else {
uVar5 = *(ulong *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x744));
*(ulong *)(lVar1 + 0x700) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
}
*(int4 *)(*param_3 + 8) = 6;
*(int4 *)(*param_3 + 0xc) = 4;
*(int1 *)(*param_3 + 0x10) = 1;
insert_dynamic(param_1 + 0x5d,*param_3);
*param_3 = (ulong)((int)param_1[0x5e] - 1) * 0x18 + param_1[0x5d];
}
else {
__mutex = (pthread_mutex_t *)(lVar1 + 0x8f0);
if (*(long *)(lVar1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c",
0x19b);
}
uVar6 = *(ulong *)(lVar1 + 0x38);
if (*(long *)(lVar1 + 0x370) - uVar5 <= uVar6) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x88;
if (*(long *)(lVar1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return 0xffffffffffffffff;
}
*(ulong *)(lVar1 + 0x38) = uVar5 + uVar6;
*(ulong *)(param_1[4] + 0x20) = uVar5 + uVar6;
if (*(long *)(lVar1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
*(int1 *)(*param_3 + 0x10) = 0;
*(int4 *)(*param_3 + 0xc) = 4;
}
*(byte *)(lVar1 + 0x170) = *(byte *)(lVar1 + 0x170) | 0x20;
return uVar6;
}
|
|
10,970 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateFaceParentFromParentFaces(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cFace = getFirstChildFaceFromFaces();
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
ConstIndexArray cFaces = getFaceChildFaces(pFace);
if (cFaces.size() == 4) {
_childFaceTag[cFace + 0] = initialChildTags[0][0];
_childFaceTag[cFace + 1] = initialChildTags[0][1];
_childFaceTag[cFace + 2] = initialChildTags[0][2];
_childFaceTag[cFace + 3] = initialChildTags[0][3];
_childFaceParentIndex[cFace + 0] = pFace;
_childFaceParentIndex[cFace + 1] = pFace;
_childFaceParentIndex[cFace + 2] = pFace;
_childFaceParentIndex[cFace + 3] = pFace;
cFace += 4;
} else {
bool childTooLarge = (cFaces.size() > 4);
for (int i = 0; i < cFaces.size(); ++i, ++cFace) {
_childFaceTag[cFace] = initialChildTags[0][childTooLarge ? 0 : i];
_childFaceParentIndex[cFace] = pFace;
}
}
}
} else {
// Child faces of faces:
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
bool incomplete = !_parentFaceTag[pFace]._selected;
IndexArray cFaces = getFaceChildFaces(pFace);
if (!incomplete && (cFaces.size() == 4)) {
_childFaceTag[cFaces[0]] = initialChildTags[0][0];
_childFaceTag[cFaces[1]] = initialChildTags[0][1];
_childFaceTag[cFaces[2]] = initialChildTags[0][2];
_childFaceTag[cFaces[3]] = initialChildTags[0][3];
_childFaceParentIndex[cFaces[0]] = pFace;
_childFaceParentIndex[cFaces[1]] = pFace;
_childFaceParentIndex[cFaces[2]] = pFace;
_childFaceParentIndex[cFaces[3]] = pFace;
} else {
bool childTooLarge = (cFaces.size() > 4);
for (int i = 0; i < cFaces.size(); ++i) {
if (IndexIsValid(cFaces[i])) {
_childFaceTag[cFaces[i]] = initialChildTags[incomplete][childTooLarge ? 0 : i];
_childFaceParentIndex[cFaces[i]] = pFace;
}
}
}
}
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movl (%rax), %eax
cmpb $0x0, 0x24(%rdi)
je 0x49696
testl %eax, %eax
jle 0x4979f
movl 0x40(%rdi), %eax
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x58(%rdi), %r8
movl (%r8,%rdx,8), %r8d
cmpl $0x4, %r8d
jne 0x49640
movslq %eax, %r8
movq 0x150(%rdi), %r9
movb (%rsi), %r10b
movb %r10b, (%r9,%r8)
movq 0x150(%rdi), %r9
movb 0x1(%rsi), %r10b
movb %r10b, 0x1(%r9,%r8)
movq 0x150(%rdi), %r9
movb 0x2(%rsi), %r10b
movb %r10b, 0x2(%r9,%r8)
movq 0x150(%rdi), %r9
movb 0x3(%rsi), %r10b
movb %r10b, 0x3(%r9,%r8)
movq 0x108(%rdi), %r9
movl %edx, (%r9,%r8,4)
movl %edx, 0x4(%r9,%r8,4)
movl %edx, 0x8(%r9,%r8,4)
movl %edx, 0xc(%r9,%r8,4)
addl $0x4, %eax
jmp 0x4967e
testl %r8d, %r8d
jle 0x4967e
movslq %eax, %r10
xorl %r9d, %r9d
cmpl $0x5, %r8d
movl %r9d, %r11d
cmovgel %ecx, %r11d
movq 0x150(%rdi), %rbx
movb (%rsi,%r11), %r11b
movb %r11b, (%rbx,%r10)
movq 0x108(%rdi), %r11
movl %edx, (%r11,%r10,4)
incl %r9d
incq %r10
cmpl %r9d, %r8d
jne 0x4964b
addl %r9d, %eax
incq %rdx
movq 0x8(%rdi), %r8
movslq (%r8), %r8
cmpq %r8, %rdx
jl 0x495d2
jmp 0x4979f
testl %eax, %eax
jle 0x4979f
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x58(%rdi), %r8
movq 0x198(%rdi), %rdx
movzbl (%rdx,%rcx), %r9d
movslq 0x4(%r8,%rcx,8), %rdx
shlq $0x2, %rdx
addq 0x78(%rdi), %rdx
movl (%r8,%rcx,8), %r8d
andq $0x1, %r9
je 0x49741
cmpl $0x4, %r8d
jne 0x49741
movslq (%rdx), %r8
movq 0x150(%rdi), %r9
movb (%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq 0x4(%rdx), %r8
movq 0x150(%rdi), %r9
movb 0x1(%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq 0x8(%rdx), %r8
movq 0x150(%rdi), %r9
movb 0x2(%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq 0xc(%rdx), %r8
movq 0x150(%rdi), %r9
movb 0x3(%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq (%rdx), %r8
movq 0x108(%rdi), %r9
movl %ecx, (%r9,%r8,4)
movslq 0x4(%rdx), %r8
movl %ecx, (%r9,%r8,4)
movslq 0x8(%rdx), %r8
movl %ecx, (%r9,%r8,4)
movslq 0xc(%rdx), %rdx
movl %ecx, (%r9,%rdx,4)
jmp 0x4978c
testl %r8d, %r8d
jle 0x4978c
xorq $0x1, %r9
leaq (%rsi,%r9,4), %r9
xorl %r10d, %r10d
movslq (%rdx,%r10,4), %r11
cmpq $-0x1, %r11
je 0x49784
cmpl $0x5, %r8d
movq %r10, %rbx
cmovgeq %rax, %rbx
movq 0x150(%rdi), %r14
movb (%rbx,%r9), %bl
movb %bl, (%r14,%r11)
movslq (%rdx,%r10,4), %r11
movq 0x108(%rdi), %rbx
movl %ecx, (%rbx,%r11,4)
incq %r10
cmpq %r10, %r8
jne 0x49751
incq %rcx
movq 0x8(%rdi), %rdx
movslq (%rdx), %rdx
cmpq %rdx, %rcx
jl 0x496a2
popq %rbx
popq %r14
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateFaceParentFromParentFacesEPA4_KNS3_8ChildTagE:
push r14
push rbx
mov rax, [rdi+8]
mov eax, [rax]
cmp byte ptr [rdi+24h], 0
jz loc_49696
test eax, eax
jle loc_4979F
mov eax, [rdi+40h]
xor ecx, ecx
xor edx, edx
loc_495D2:
mov r8, [rdi+58h]
mov r8d, [r8+rdx*8]
cmp r8d, 4
jnz short loc_49640
movsxd r8, eax
mov r9, [rdi+150h]
mov r10b, [rsi]
mov [r9+r8], r10b
mov r9, [rdi+150h]
mov r10b, [rsi+1]
mov [r9+r8+1], r10b
mov r9, [rdi+150h]
mov r10b, [rsi+2]
mov [r9+r8+2], r10b
mov r9, [rdi+150h]
mov r10b, [rsi+3]
mov [r9+r8+3], r10b
mov r9, [rdi+108h]
mov [r9+r8*4], edx
mov [r9+r8*4+4], edx
mov [r9+r8*4+8], edx
mov [r9+r8*4+0Ch], edx
add eax, 4
jmp short loc_4967E
loc_49640:
test r8d, r8d
jle short loc_4967E
movsxd r10, eax
xor r9d, r9d
loc_4964B:
cmp r8d, 5
mov r11d, r9d
cmovge r11d, ecx
mov rbx, [rdi+150h]
mov r11b, [rsi+r11]
mov [rbx+r10], r11b
mov r11, [rdi+108h]
mov [r11+r10*4], edx
inc r9d
inc r10
cmp r8d, r9d
jnz short loc_4964B
add eax, r9d
loc_4967E:
inc rdx
mov r8, [rdi+8]
movsxd r8, dword ptr [r8]
cmp rdx, r8
jl loc_495D2
jmp loc_4979F
loc_49696:
test eax, eax
jle loc_4979F
xor eax, eax
xor ecx, ecx
loc_496A2:
mov r8, [rdi+58h]
mov rdx, [rdi+198h]
movzx r9d, byte ptr [rdx+rcx]
movsxd rdx, dword ptr [r8+rcx*8+4]
shl rdx, 2
add rdx, [rdi+78h]
mov r8d, [r8+rcx*8]
and r9, 1
jz short loc_49741
cmp r8d, 4
jnz short loc_49741
movsxd r8, dword ptr [rdx]
mov r9, [rdi+150h]
mov r10b, [rsi]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+4]
mov r9, [rdi+150h]
mov r10b, [rsi+1]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+8]
mov r9, [rdi+150h]
mov r10b, [rsi+2]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+0Ch]
mov r9, [rdi+150h]
mov r10b, [rsi+3]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx]
mov r9, [rdi+108h]
mov [r9+r8*4], ecx
movsxd r8, dword ptr [rdx+4]
mov [r9+r8*4], ecx
movsxd r8, dword ptr [rdx+8]
mov [r9+r8*4], ecx
movsxd rdx, dword ptr [rdx+0Ch]
mov [r9+rdx*4], ecx
jmp short loc_4978C
loc_49741:
test r8d, r8d
jle short loc_4978C
xor r9, 1
lea r9, [rsi+r9*4]
xor r10d, r10d
loc_49751:
movsxd r11, dword ptr [rdx+r10*4]
cmp r11, 0FFFFFFFFFFFFFFFFh
jz short loc_49784
cmp r8d, 5
mov rbx, r10
cmovge rbx, rax
mov r14, [rdi+150h]
mov bl, [rbx+r9]
mov [r14+r11], bl
movsxd r11, dword ptr [rdx+r10*4]
mov rbx, [rdi+108h]
mov [rbx+r11*4], ecx
loc_49784:
inc r10
cmp r8, r10
jnz short loc_49751
loc_4978C:
inc rcx
mov rdx, [rdi+8]
movsxd rdx, dword ptr [rdx]
cmp rcx, rdx
jl loc_496A2
loc_4979F:
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(
long long a1,
_BYTE *a2)
{
long long result; // rax
long long v3; // rdx
int v4; // r8d
long long v5; // r9
long long v6; // r10
unsigned int i; // r9d
long long v8; // r11
long long v9; // rcx
long long v10; // r8
int *v11; // rdx
long long v12; // r8
long long v13; // r9
_BYTE *v14; // r9
long long j; // r10
long long v16; // r11
long long v17; // rbx
result = **(unsigned int **)(a1 + 8);
if ( *(_BYTE *)(a1 + 36) )
{
if ( (int)result > 0 )
{
result = *(unsigned int *)(a1 + 64);
v3 = 0LL;
do
{
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 88) + 8 * v3);
if ( v4 == 4 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 336) + (int)result) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 336) + (int)result + 1LL) = a2[1];
*(_BYTE *)(*(_QWORD *)(a1 + 336) + (int)result + 2LL) = a2[2];
*(_BYTE *)(*(_QWORD *)(a1 + 336) + (int)result + 3LL) = a2[3];
v5 = *(_QWORD *)(a1 + 264);
*(_DWORD *)(v5 + 4LL * (int)result) = v3;
*(_DWORD *)(v5 + 4LL * (int)result + 4) = v3;
*(_DWORD *)(v5 + 4LL * (int)result + 8) = v3;
*(_DWORD *)(v5 + 4LL * (int)result + 12) = v3;
result = (unsigned int)(result + 4);
}
else if ( v4 > 0 )
{
v6 = (int)result;
for ( i = 0; i != v4; ++i )
{
v8 = i;
if ( v4 >= 5 )
v8 = 0LL;
*(_BYTE *)(*(_QWORD *)(a1 + 336) + v6) = a2[v8];
*(_DWORD *)(*(_QWORD *)(a1 + 264) + 4 * v6++) = v3;
}
result = i + (unsigned int)result;
}
++v3;
}
while ( v3 < **(int **)(a1 + 8) );
}
}
else if ( (int)result > 0 )
{
result = 0LL;
v9 = 0LL;
do
{
v10 = *(_QWORD *)(a1 + 88);
v11 = (int *)(*(_QWORD *)(a1 + 120) + 4LL * *(int *)(v10 + 8 * v9 + 4));
v12 = *(unsigned int *)(v10 + 8 * v9);
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 408) + v9) & 1) != 0 && (_DWORD)v12 == 4 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 336) + *v11) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 336) + v11[1]) = a2[1];
*(_BYTE *)(*(_QWORD *)(a1 + 336) + v11[2]) = a2[2];
*(_BYTE *)(*(_QWORD *)(a1 + 336) + v11[3]) = a2[3];
v13 = *(_QWORD *)(a1 + 264);
*(_DWORD *)(v13 + 4LL * *v11) = v9;
*(_DWORD *)(v13 + 4LL * v11[1]) = v9;
*(_DWORD *)(v13 + 4LL * v11[2]) = v9;
*(_DWORD *)(v13 + 4LL * v11[3]) = v9;
}
else if ( (int)v12 > 0 )
{
v14 = &a2[4 * !(*(_BYTE *)(*(_QWORD *)(a1 + 408) + v9) & 1)];
for ( j = 0LL; j != v12; ++j )
{
v16 = v11[j];
if ( v16 != -1 )
{
v17 = j;
if ( (int)v12 >= 5 )
v17 = 0LL;
*(_BYTE *)(*(_QWORD *)(a1 + 336) + v16) = v14[v17];
*(_DWORD *)(*(_QWORD *)(a1 + 264) + 4LL * v11[j]) = v9;
}
}
}
++v9;
}
while ( v9 < **(int **)(a1 + 8) );
}
return result;
}
|
populateFaceParentFromParentFaces:
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RAX]
CMP byte ptr [RDI + 0x24],0x0
JZ 0x00149696
TEST EAX,EAX
JLE 0x0014979f
MOV EAX,dword ptr [RDI + 0x40]
XOR ECX,ECX
XOR EDX,EDX
LAB_001495d2:
MOV R8,qword ptr [RDI + 0x58]
MOV R8D,dword ptr [R8 + RDX*0x8]
CMP R8D,0x4
JNZ 0x00149640
MOVSXD R8,EAX
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI]
MOV byte ptr [R9 + R8*0x1],R10B
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x1]
MOV byte ptr [R9 + R8*0x1 + 0x1],R10B
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x2]
MOV byte ptr [R9 + R8*0x1 + 0x2],R10B
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x3]
MOV byte ptr [R9 + R8*0x1 + 0x3],R10B
MOV R9,qword ptr [RDI + 0x108]
MOV dword ptr [R9 + R8*0x4],EDX
MOV dword ptr [R9 + R8*0x4 + 0x4],EDX
MOV dword ptr [R9 + R8*0x4 + 0x8],EDX
MOV dword ptr [R9 + R8*0x4 + 0xc],EDX
ADD EAX,0x4
JMP 0x0014967e
LAB_00149640:
TEST R8D,R8D
JLE 0x0014967e
MOVSXD R10,EAX
XOR R9D,R9D
LAB_0014964b:
CMP R8D,0x5
MOV R11D,R9D
CMOVGE R11D,ECX
MOV RBX,qword ptr [RDI + 0x150]
MOV R11B,byte ptr [RSI + R11*0x1]
MOV byte ptr [RBX + R10*0x1],R11B
MOV R11,qword ptr [RDI + 0x108]
MOV dword ptr [R11 + R10*0x4],EDX
INC R9D
INC R10
CMP R8D,R9D
JNZ 0x0014964b
ADD EAX,R9D
LAB_0014967e:
INC RDX
MOV R8,qword ptr [RDI + 0x8]
MOVSXD R8,dword ptr [R8]
CMP RDX,R8
JL 0x001495d2
JMP 0x0014979f
LAB_00149696:
TEST EAX,EAX
JLE 0x0014979f
XOR EAX,EAX
XOR ECX,ECX
LAB_001496a2:
MOV R8,qword ptr [RDI + 0x58]
MOV RDX,qword ptr [RDI + 0x198]
MOVZX R9D,byte ptr [RDX + RCX*0x1]
MOVSXD RDX,dword ptr [R8 + RCX*0x8 + 0x4]
SHL RDX,0x2
ADD RDX,qword ptr [RDI + 0x78]
MOV R8D,dword ptr [R8 + RCX*0x8]
AND R9,0x1
JZ 0x00149741
CMP R8D,0x4
JNZ 0x00149741
MOVSXD R8,dword ptr [RDX]
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + 0x4]
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x1]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + 0x8]
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x2]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + 0xc]
MOV R9,qword ptr [RDI + 0x150]
MOV R10B,byte ptr [RSI + 0x3]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX]
MOV R9,qword ptr [RDI + 0x108]
MOV dword ptr [R9 + R8*0x4],ECX
MOVSXD R8,dword ptr [RDX + 0x4]
MOV dword ptr [R9 + R8*0x4],ECX
MOVSXD R8,dword ptr [RDX + 0x8]
MOV dword ptr [R9 + R8*0x4],ECX
MOVSXD RDX,dword ptr [RDX + 0xc]
MOV dword ptr [R9 + RDX*0x4],ECX
JMP 0x0014978c
LAB_00149741:
TEST R8D,R8D
JLE 0x0014978c
XOR R9,0x1
LEA R9,[RSI + R9*0x4]
XOR R10D,R10D
LAB_00149751:
MOVSXD R11,dword ptr [RDX + R10*0x4]
CMP R11,-0x1
JZ 0x00149784
CMP R8D,0x5
MOV RBX,R10
CMOVGE RBX,RAX
MOV R14,qword ptr [RDI + 0x150]
MOV BL,byte ptr [RBX + R9*0x1]
MOV byte ptr [R14 + R11*0x1],BL
MOVSXD R11,dword ptr [RDX + R10*0x4]
MOV RBX,qword ptr [RDI + 0x108]
MOV dword ptr [RBX + R11*0x4],ECX
LAB_00149784:
INC R10
CMP R8,R10
JNZ 0x00149751
LAB_0014978c:
INC RCX
MOV RDX,qword ptr [RDI + 0x8]
MOVSXD RDX,dword ptr [RDX]
CMP RCX,RDX
JL 0x001496a2
LAB_0014979f:
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag
const (*) [4]) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces
(Refinement *this,ChildTag *param_1)
{
byte bVar1;
uint uVar2;
int iVar3;
int4 uVar4;
long lVar5;
int *piVar6;
ulong uVar7;
long lVar8;
int iVar9;
uint uVar10;
long lVar11;
ulong uVar12;
if (this[0x24] == (Refinement)0x0) {
if (0 < **(int **)(this + 8)) {
lVar5 = 0;
do {
bVar1 = *(byte *)(*(long *)(this + 0x198) + lVar5);
piVar6 = (int *)((long)*(int *)(*(long *)(this + 0x58) + 4 + lVar5 * 8) * 4 +
*(long *)(this + 0x78));
uVar2 = *(uint *)(*(long *)(this + 0x58) + lVar5 * 8);
uVar4 = (int4)lVar5;
if (((bVar1 & 1) == 0) || (uVar2 != 4)) {
if (0 < (int)uVar2) {
uVar12 = 0;
do {
if ((long)piVar6[uVar12] != -1) {
uVar7 = uVar12;
if (4 < (int)uVar2) {
uVar7 = 0;
}
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar6[uVar12]) =
param_1[uVar7 + ((ulong)bVar1 & 1 ^ 1) * 4];
*(int4 *)(*(long *)(this + 0x108) + (long)piVar6[uVar12] * 4) = uVar4;
}
uVar12 = uVar12 + 1;
} while (uVar2 != uVar12);
}
}
else {
*(ChildTag *)(*(long *)(this + 0x150) + (long)*piVar6) = *param_1;
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar6[1]) = param_1[1];
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar6[2]) = param_1[2];
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar6[3]) = param_1[3];
lVar11 = *(long *)(this + 0x108);
*(int4 *)(lVar11 + (long)*piVar6 * 4) = uVar4;
*(int4 *)(lVar11 + (long)piVar6[1] * 4) = uVar4;
*(int4 *)(lVar11 + (long)piVar6[2] * 4) = uVar4;
*(int4 *)(lVar11 + (long)piVar6[3] * 4) = uVar4;
}
lVar5 = lVar5 + 1;
} while (lVar5 < **(int **)(this + 8));
}
}
else if (0 < **(int **)(this + 8)) {
iVar3 = *(int *)(this + 0x40);
lVar5 = 0;
do {
uVar2 = *(uint *)(*(long *)(this + 0x58) + lVar5 * 8);
uVar4 = (int4)lVar5;
if (uVar2 == 4) {
lVar8 = (long)iVar3;
*(ChildTag *)(*(long *)(this + 0x150) + lVar8) = *param_1;
*(ChildTag *)(*(long *)(this + 0x150) + 1 + lVar8) = param_1[1];
*(ChildTag *)(*(long *)(this + 0x150) + 2 + lVar8) = param_1[2];
*(ChildTag *)(*(long *)(this + 0x150) + 3 + lVar8) = param_1[3];
lVar11 = *(long *)(this + 0x108);
*(int4 *)(lVar11 + lVar8 * 4) = uVar4;
*(int4 *)(lVar11 + 4 + lVar8 * 4) = uVar4;
*(int4 *)(lVar11 + 8 + lVar8 * 4) = uVar4;
*(int4 *)(lVar11 + 0xc + lVar8 * 4) = uVar4;
iVar3 = iVar3 + 4;
}
else if (0 < (int)uVar2) {
lVar11 = (long)iVar3;
uVar12 = 0;
do {
iVar9 = (int)uVar12;
if (4 < (int)uVar2) {
uVar12 = 0;
}
*(ChildTag *)(*(long *)(this + 0x150) + lVar11) = param_1[uVar12];
*(int4 *)(*(long *)(this + 0x108) + lVar11 * 4) = uVar4;
uVar10 = iVar9 + 1;
uVar12 = (ulong)uVar10;
lVar11 = lVar11 + 1;
} while (uVar2 != uVar10);
iVar3 = iVar3 + uVar10;
}
lVar5 = lVar5 + 1;
} while (lVar5 < **(int **)(this + 8));
}
return;
}
|
|
10,971 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateFaceParentFromParentFaces(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cFace = getFirstChildFaceFromFaces();
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
ConstIndexArray cFaces = getFaceChildFaces(pFace);
if (cFaces.size() == 4) {
_childFaceTag[cFace + 0] = initialChildTags[0][0];
_childFaceTag[cFace + 1] = initialChildTags[0][1];
_childFaceTag[cFace + 2] = initialChildTags[0][2];
_childFaceTag[cFace + 3] = initialChildTags[0][3];
_childFaceParentIndex[cFace + 0] = pFace;
_childFaceParentIndex[cFace + 1] = pFace;
_childFaceParentIndex[cFace + 2] = pFace;
_childFaceParentIndex[cFace + 3] = pFace;
cFace += 4;
} else {
bool childTooLarge = (cFaces.size() > 4);
for (int i = 0; i < cFaces.size(); ++i, ++cFace) {
_childFaceTag[cFace] = initialChildTags[0][childTooLarge ? 0 : i];
_childFaceParentIndex[cFace] = pFace;
}
}
}
} else {
// Child faces of faces:
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
bool incomplete = !_parentFaceTag[pFace]._selected;
IndexArray cFaces = getFaceChildFaces(pFace);
if (!incomplete && (cFaces.size() == 4)) {
_childFaceTag[cFaces[0]] = initialChildTags[0][0];
_childFaceTag[cFaces[1]] = initialChildTags[0][1];
_childFaceTag[cFaces[2]] = initialChildTags[0][2];
_childFaceTag[cFaces[3]] = initialChildTags[0][3];
_childFaceParentIndex[cFaces[0]] = pFace;
_childFaceParentIndex[cFaces[1]] = pFace;
_childFaceParentIndex[cFaces[2]] = pFace;
_childFaceParentIndex[cFaces[3]] = pFace;
} else {
bool childTooLarge = (cFaces.size() > 4);
for (int i = 0; i < cFaces.size(); ++i) {
if (IndexIsValid(cFaces[i])) {
_childFaceTag[cFaces[i]] = initialChildTags[incomplete][childTooLarge ? 0 : i];
_childFaceParentIndex[cFaces[i]] = pFace;
}
}
}
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x24(%rdi)
je 0x61350
movl 0x40(%r14), %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%r14), %rax
cmpl (%rax), %ebp
jge 0x61450
movq %r14, %rdi
movl %ebp, %esi
callq 0x50b80
cmpl $0x4, %edx
jne 0x6130a
movslq %r15d, %r15
movq 0x150(%r14), %rax
movb (%rbx), %cl
movb %cl, (%rax,%r15)
movq 0x150(%r14), %rax
movb 0x1(%rbx), %cl
movb %cl, 0x1(%rax,%r15)
movq 0x150(%r14), %rax
movb 0x2(%rbx), %cl
movb %cl, 0x2(%rax,%r15)
movq 0x150(%r14), %rax
movb 0x3(%rbx), %cl
movb %cl, 0x3(%rax,%r15)
movq 0x108(%r14), %rax
movl %ebp, (%rax,%r15,4)
movl %ebp, 0x4(%rax,%r15,4)
movl %ebp, 0x8(%rax,%r15,4)
movl %ebp, 0xc(%rax,%r15,4)
addl $0x4, %r15d
jmp 0x61349
movslq %r15d, %rcx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %esi
cmovgl %edx, %esi
cmpl %eax, %esi
je 0x61346
cmpl $0x5, %edx
movl %eax, %edi
cmovgel %r12d, %edi
movq 0x150(%r14), %r8
movb (%rbx,%rdi), %dil
movb %dil, (%r8,%rcx)
movq 0x108(%r14), %rdi
movl %ebp, (%rdi,%rcx,4)
incl %eax
incq %rcx
jmp 0x61319
addl %eax, %r15d
incl %ebp
jmp 0x61292
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movslq (%rax), %rax
cmpq %rax, %r15
jge 0x61450
movq 0x198(%r14), %rax
movzbl (%rax,%r15), %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x50b80
andq $0x1, %r13
je 0x61400
cmpl $0x4, %edx
jne 0x61400
movslq (%rax), %rcx
movq 0x150(%r14), %rdx
movb (%rbx), %sil
movb %sil, (%rdx,%rcx)
movslq 0x4(%rax), %rcx
movq 0x150(%r14), %rdx
movb 0x1(%rbx), %sil
movb %sil, (%rdx,%rcx)
movslq 0x8(%rax), %rcx
movq 0x150(%r14), %rdx
movb 0x2(%rbx), %sil
movb %sil, (%rdx,%rcx)
movslq 0xc(%rax), %rcx
movq 0x150(%r14), %rdx
movb 0x3(%rbx), %sil
movb %sil, (%rdx,%rcx)
movslq (%rax), %rcx
movq 0x108(%r14), %rdx
movl %r15d, (%rdx,%rcx,4)
movslq 0x4(%rax), %rcx
movl %r15d, (%rdx,%rcx,4)
movslq 0x8(%rax), %rcx
movl %r15d, (%rdx,%rcx,4)
movslq 0xc(%rax), %rax
movl %r15d, (%rdx,%rax,4)
incq %r15
jmp 0x61356
xorq $0x1, %r13
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
leaq (%rbx,%r13,4), %rsi
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x613f8
movslq (%rax,%rdi,4), %r8
cmpq $-0x1, %r8
je 0x6144b
cmpl $0x5, %edx
movq %rdi, %r9
cmovgeq %r12, %r9
movq 0x150(%r14), %r10
movb (%r9,%rsi), %r9b
movb %r9b, (%r10,%r8)
movslq (%rax,%rdi,4), %r8
movq 0x108(%r14), %r9
movl %r15d, (%r9,%r8,4)
incq %rdi
jmp 0x61414
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateFaceParentFromParentFacesEPA4_KNS3_8ChildTagE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi+24h], 0
jz loc_61350
mov r15d, [r14+40h]
xor r12d, r12d
xor ebp, ebp
loc_61292:
mov rax, [r14+8]
cmp ebp, [rax]
jge loc_61450
mov rdi, r14; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getFaceChildFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(int)
cmp edx, 4
jnz short loc_6130A
movsxd r15, r15d
mov rax, [r14+150h]
mov cl, [rbx]
mov [rax+r15], cl
mov rax, [r14+150h]
mov cl, [rbx+1]
mov [rax+r15+1], cl
mov rax, [r14+150h]
mov cl, [rbx+2]
mov [rax+r15+2], cl
mov rax, [r14+150h]
mov cl, [rbx+3]
mov [rax+r15+3], cl
mov rax, [r14+108h]
mov [rax+r15*4], ebp
mov [rax+r15*4+4], ebp
mov [rax+r15*4+8], ebp
mov [rax+r15*4+0Ch], ebp
add r15d, 4
jmp short loc_61349
loc_6130A:
movsxd rcx, r15d
xor eax, eax
test edx, edx
mov esi, 0
cmovg esi, edx
loc_61319:
cmp esi, eax
jz short loc_61346
cmp edx, 5
mov edi, eax
cmovge edi, r12d
mov r8, [r14+150h]
mov dil, [rbx+rdi]
mov [r8+rcx], dil
mov rdi, [r14+108h]
mov [rdi+rcx*4], ebp
inc eax
inc rcx
jmp short loc_61319
loc_61346:
add r15d, eax
loc_61349:
inc ebp
jmp loc_61292
loc_61350:
xor r12d, r12d
xor r15d, r15d
loc_61356:
mov rax, [r14+8]
movsxd rax, dword ptr [rax]
cmp r15, rax
jge loc_61450
mov rax, [r14+198h]
movzx r13d, byte ptr [rax+r15]
mov rdi, r14; this
mov esi, r15d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getFaceChildFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(int)
and r13, 1
jz short loc_61400
cmp edx, 4
jnz short loc_61400
movsxd rcx, dword ptr [rax]
mov rdx, [r14+150h]
mov sil, [rbx]
mov [rdx+rcx], sil
movsxd rcx, dword ptr [rax+4]
mov rdx, [r14+150h]
mov sil, [rbx+1]
mov [rdx+rcx], sil
movsxd rcx, dword ptr [rax+8]
mov rdx, [r14+150h]
mov sil, [rbx+2]
mov [rdx+rcx], sil
movsxd rcx, dword ptr [rax+0Ch]
mov rdx, [r14+150h]
mov sil, [rbx+3]
mov [rdx+rcx], sil
movsxd rcx, dword ptr [rax]
mov rdx, [r14+108h]
mov [rdx+rcx*4], r15d
movsxd rcx, dword ptr [rax+4]
mov [rdx+rcx*4], r15d
movsxd rcx, dword ptr [rax+8]
mov [rdx+rcx*4], r15d
movsxd rax, dword ptr [rax+0Ch]
mov [rdx+rax*4], r15d
loc_613F8:
inc r15
jmp loc_61356
loc_61400:
xor r13, 1
test edx, edx
mov ecx, 0
cmovg ecx, edx
lea rsi, [rbx+r13*4]
xor edi, edi
loc_61414:
cmp rcx, rdi
jz short loc_613F8
movsxd r8, dword ptr [rax+rdi*4]
cmp r8, 0FFFFFFFFFFFFFFFFh
jz short loc_6144B
cmp edx, 5
mov r9, rdi
cmovge r9, r12
mov r10, [r14+150h]
mov r9b, [r9+rsi]
mov [r10+r8], r9b
movsxd r8, dword ptr [rax+rdi*4]
mov r9, [r14+108h]
mov [r9+r8*4], r15d
loc_6144B:
inc rdi
jmp short loc_61414
loc_61450:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this,
_BYTE *a2)
{
int v4; // r15d
int i; // ebp
long long result; // rax
int v7; // edx
long long v8; // rax
long long v9; // rcx
unsigned int v10; // eax
int v11; // esi
long long v12; // rdi
long long j; // r15
char v14; // r13
int *FaceChildFaces; // rax
int v16; // edx
long long v17; // r13
long long v18; // rdx
long long v19; // r13
long long v20; // rcx
long long k; // rdi
long long v22; // r8
long long v23; // r9
if ( *((_BYTE *)this + 36) )
{
v4 = *((_DWORD *)this + 16);
for ( i = 0; ; ++i )
{
result = *((_QWORD *)this + 1);
if ( i >= *(_DWORD *)result )
break;
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(this, i);
if ( v7 == 4 )
{
*(_BYTE *)(*((_QWORD *)this + 42) + v4) = *a2;
*(_BYTE *)(*((_QWORD *)this + 42) + v4 + 1LL) = a2[1];
*(_BYTE *)(*((_QWORD *)this + 42) + v4 + 2LL) = a2[2];
*(_BYTE *)(*((_QWORD *)this + 42) + v4 + 3LL) = a2[3];
v8 = *((_QWORD *)this + 33);
*(_DWORD *)(v8 + 4LL * v4) = i;
*(_DWORD *)(v8 + 4LL * v4 + 4) = i;
*(_DWORD *)(v8 + 4LL * v4 + 8) = i;
*(_DWORD *)(v8 + 4LL * v4 + 12) = i;
v4 += 4;
}
else
{
v9 = v4;
v10 = 0;
v11 = 0;
if ( v7 > 0 )
v11 = v7;
while ( v11 != v10 )
{
v12 = v10;
if ( v7 >= 5 )
v12 = 0LL;
*(_BYTE *)(*((_QWORD *)this + 42) + v9) = a2[v12];
*(_DWORD *)(*((_QWORD *)this + 33) + 4 * v9) = i;
++v10;
++v9;
}
v4 += v10;
}
}
}
else
{
for ( j = 0LL; ; ++j )
{
result = **((int **)this + 1);
if ( j >= result )
break;
v14 = *(_BYTE *)(*((_QWORD *)this + 51) + j);
FaceChildFaces = (int *)OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(this, j);
v17 = v14 & 1;
if ( v17 && v16 == 4 )
{
*(_BYTE *)(*((_QWORD *)this + 42) + *FaceChildFaces) = *a2;
*(_BYTE *)(*((_QWORD *)this + 42) + FaceChildFaces[1]) = a2[1];
*(_BYTE *)(*((_QWORD *)this + 42) + FaceChildFaces[2]) = a2[2];
*(_BYTE *)(*((_QWORD *)this + 42) + FaceChildFaces[3]) = a2[3];
v18 = *((_QWORD *)this + 33);
*(_DWORD *)(v18 + 4LL * *FaceChildFaces) = j;
*(_DWORD *)(v18 + 4LL * FaceChildFaces[1]) = j;
*(_DWORD *)(v18 + 4LL * FaceChildFaces[2]) = j;
*(_DWORD *)(v18 + 4LL * FaceChildFaces[3]) = j;
}
else
{
v19 = v17 ^ 1;
v20 = 0LL;
if ( v16 > 0 )
v20 = (unsigned int)v16;
for ( k = 0LL; v20 != k; ++k )
{
v22 = FaceChildFaces[k];
if ( v22 != -1 )
{
v23 = k;
if ( v16 >= 5 )
v23 = 0LL;
*(_BYTE *)(*((_QWORD *)this + 42) + v22) = a2[4 * v19 + v23];
*(_DWORD *)(*((_QWORD *)this + 33) + 4LL * FaceChildFaces[k]) = j;
}
}
}
}
}
return result;
}
|
populateFaceParentFromParentFaces:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI + 0x24],0x0
JZ 0x00161350
MOV R15D,dword ptr [R14 + 0x40]
XOR R12D,R12D
XOR EBP,EBP
LAB_00161292:
MOV RAX,qword ptr [R14 + 0x8]
CMP EBP,dword ptr [RAX]
JGE 0x00161450
MOV RDI,R14
MOV ESI,EBP
CALL 0x00150b80
CMP EDX,0x4
JNZ 0x0016130a
MOVSXD R15,R15D
MOV RAX,qword ptr [R14 + 0x150]
MOV CL,byte ptr [RBX]
MOV byte ptr [RAX + R15*0x1],CL
MOV RAX,qword ptr [R14 + 0x150]
MOV CL,byte ptr [RBX + 0x1]
MOV byte ptr [RAX + R15*0x1 + 0x1],CL
MOV RAX,qword ptr [R14 + 0x150]
MOV CL,byte ptr [RBX + 0x2]
MOV byte ptr [RAX + R15*0x1 + 0x2],CL
MOV RAX,qword ptr [R14 + 0x150]
MOV CL,byte ptr [RBX + 0x3]
MOV byte ptr [RAX + R15*0x1 + 0x3],CL
MOV RAX,qword ptr [R14 + 0x108]
MOV dword ptr [RAX + R15*0x4],EBP
MOV dword ptr [RAX + R15*0x4 + 0x4],EBP
MOV dword ptr [RAX + R15*0x4 + 0x8],EBP
MOV dword ptr [RAX + R15*0x4 + 0xc],EBP
ADD R15D,0x4
JMP 0x00161349
LAB_0016130a:
MOVSXD RCX,R15D
XOR EAX,EAX
TEST EDX,EDX
MOV ESI,0x0
CMOVG ESI,EDX
LAB_00161319:
CMP ESI,EAX
JZ 0x00161346
CMP EDX,0x5
MOV EDI,EAX
CMOVGE EDI,R12D
MOV R8,qword ptr [R14 + 0x150]
MOV DIL,byte ptr [RBX + RDI*0x1]
MOV byte ptr [R8 + RCX*0x1],DIL
MOV RDI,qword ptr [R14 + 0x108]
MOV dword ptr [RDI + RCX*0x4],EBP
INC EAX
INC RCX
JMP 0x00161319
LAB_00161346:
ADD R15D,EAX
LAB_00161349:
INC EBP
JMP 0x00161292
LAB_00161350:
XOR R12D,R12D
XOR R15D,R15D
LAB_00161356:
MOV RAX,qword ptr [R14 + 0x8]
MOVSXD RAX,dword ptr [RAX]
CMP R15,RAX
JGE 0x00161450
MOV RAX,qword ptr [R14 + 0x198]
MOVZX R13D,byte ptr [RAX + R15*0x1]
MOV RDI,R14
MOV ESI,R15D
CALL 0x00150b80
AND R13,0x1
JZ 0x00161400
CMP EDX,0x4
JNZ 0x00161400
MOVSXD RCX,dword ptr [RAX]
MOV RDX,qword ptr [R14 + 0x150]
MOV SIL,byte ptr [RBX]
MOV byte ptr [RDX + RCX*0x1],SIL
MOVSXD RCX,dword ptr [RAX + 0x4]
MOV RDX,qword ptr [R14 + 0x150]
MOV SIL,byte ptr [RBX + 0x1]
MOV byte ptr [RDX + RCX*0x1],SIL
MOVSXD RCX,dword ptr [RAX + 0x8]
MOV RDX,qword ptr [R14 + 0x150]
MOV SIL,byte ptr [RBX + 0x2]
MOV byte ptr [RDX + RCX*0x1],SIL
MOVSXD RCX,dword ptr [RAX + 0xc]
MOV RDX,qword ptr [R14 + 0x150]
MOV SIL,byte ptr [RBX + 0x3]
MOV byte ptr [RDX + RCX*0x1],SIL
MOVSXD RCX,dword ptr [RAX]
MOV RDX,qword ptr [R14 + 0x108]
MOV dword ptr [RDX + RCX*0x4],R15D
MOVSXD RCX,dword ptr [RAX + 0x4]
MOV dword ptr [RDX + RCX*0x4],R15D
MOVSXD RCX,dword ptr [RAX + 0x8]
MOV dword ptr [RDX + RCX*0x4],R15D
MOVSXD RAX,dword ptr [RAX + 0xc]
MOV dword ptr [RDX + RAX*0x4],R15D
LAB_001613f8:
INC R15
JMP 0x00161356
LAB_00161400:
XOR R13,0x1
TEST EDX,EDX
MOV ECX,0x0
CMOVG ECX,EDX
LEA RSI,[RBX + R13*0x4]
XOR EDI,EDI
LAB_00161414:
CMP RCX,RDI
JZ 0x001613f8
MOVSXD R8,dword ptr [RAX + RDI*0x4]
CMP R8,-0x1
JZ 0x0016144b
CMP EDX,0x5
MOV R9,RDI
CMOVGE R9,R12
MOV R10,qword ptr [R14 + 0x150]
MOV R9B,byte ptr [R9 + RSI*0x1]
MOV byte ptr [R10 + R8*0x1],R9B
MOVSXD R8,dword ptr [RAX + RDI*0x4]
MOV R9,qword ptr [R14 + 0x108]
MOV dword ptr [R9 + R8*0x4],R15D
LAB_0016144b:
INC RDI
JMP 0x00161414
LAB_00161450:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag
const (*) [4]) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentFromParentFaces
(Refinement *this,ChildTag *param_1)
{
byte bVar1;
uint uVar2;
int *piVar3;
long lVar4;
ulong uVar5;
uint extraout_EDX;
int iVar6;
uint uVar7;
ulong uVar8;
ulong uVar9;
int iVar10;
long lVar11;
int1 auVar12 [12];
if (this[0x24] == (Refinement)0x0) {
for (lVar4 = 0; lVar4 < **(int **)(this + 8); lVar4 = lVar4 + 1) {
bVar1 = *(byte *)(*(long *)(this + 0x198) + lVar4);
iVar10 = (int)lVar4;
auVar12 = getFaceChildFaces(this,iVar10);
uVar2 = auVar12._8_4_;
piVar3 = auVar12._0_8_;
if (((bVar1 & 1) == 0) || (uVar2 != 4)) {
uVar5 = 0;
if (0 < (int)uVar2) {
uVar5 = (ulong)uVar2;
}
for (uVar8 = 0; uVar5 != uVar8; uVar8 = uVar8 + 1) {
if ((long)piVar3[uVar8] != -1) {
uVar9 = uVar8;
if (4 < (int)uVar2) {
uVar9 = 0;
}
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar3[uVar8]) =
param_1[uVar9 + ((ulong)bVar1 & 1 ^ 1) * 4];
*(int *)(*(long *)(this + 0x108) + (long)piVar3[uVar8] * 4) = iVar10;
}
}
}
else {
*(ChildTag *)(*(long *)(this + 0x150) + (long)*piVar3) = *param_1;
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar3[1]) = param_1[1];
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar3[2]) = param_1[2];
*(ChildTag *)(*(long *)(this + 0x150) + (long)piVar3[3]) = param_1[3];
lVar11 = *(long *)(this + 0x108);
*(int *)(lVar11 + (long)*piVar3 * 4) = iVar10;
*(int *)(lVar11 + (long)piVar3[1] * 4) = iVar10;
*(int *)(lVar11 + (long)piVar3[2] * 4) = iVar10;
*(int *)(lVar11 + (long)piVar3[3] * 4) = iVar10;
}
}
}
else {
iVar10 = *(int *)(this + 0x40);
for (iVar6 = 0; iVar6 < **(int **)(this + 8); iVar6 = iVar6 + 1) {
getFaceChildFaces(this,iVar6);
if (extraout_EDX == 4) {
lVar11 = (long)iVar10;
*(ChildTag *)(*(long *)(this + 0x150) + lVar11) = *param_1;
*(ChildTag *)(*(long *)(this + 0x150) + 1 + lVar11) = param_1[1];
*(ChildTag *)(*(long *)(this + 0x150) + 2 + lVar11) = param_1[2];
*(ChildTag *)(*(long *)(this + 0x150) + 3 + lVar11) = param_1[3];
lVar4 = *(long *)(this + 0x108);
*(int *)(lVar4 + lVar11 * 4) = iVar6;
*(int *)(lVar4 + 4 + lVar11 * 4) = iVar6;
*(int *)(lVar4 + 8 + lVar11 * 4) = iVar6;
*(int *)(lVar4 + 0xc + lVar11 * 4) = iVar6;
iVar10 = iVar10 + 4;
}
else {
lVar4 = (long)iVar10;
uVar7 = 0;
uVar2 = 0;
if (0 < (int)extraout_EDX) {
uVar2 = 0;
uVar7 = extraout_EDX;
}
for (; uVar7 != uVar2; uVar2 = uVar2 + 1) {
uVar5 = (ulong)uVar2;
if (4 < (int)extraout_EDX) {
uVar5 = 0;
}
*(ChildTag *)(*(long *)(this + 0x150) + lVar4) = param_1[uVar5];
*(int *)(*(long *)(this + 0x108) + lVar4 * 4) = iVar6;
lVar4 = lVar4 + 1;
}
iVar10 = iVar10 + uVar2;
}
}
}
return;
}
|
|
10,972 |
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/irregularPatchBuilder.h
|
~IrregularPatchBuilder() { }
|
O1
|
c
|
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder():
pushq %rbx
movq %rdi, %rbx
movq 0x110(%rdi), %rdi
testq %rdi, %rdi
je 0x9e5b3
movq 0x120(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
leaq 0xe0(%rbx), %rdi
callq 0x38ec0
movq 0xd8(%rbx), %rdi
callq 0x3a0c0
leaq 0x38(%rbx), %rax
movq %rax, 0x28(%rbx)
movl $0x8, 0x34(%rbx)
popq %rbx
retq
|
_ZN10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilderD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+110h]; void *
test rdi, rdi
jz short loc_9E5B3
mov rsi, [rbx+120h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9E5B3:
lea rdi, [rbx+0E0h]
call __ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EED2Ev; std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree()
mov rdi, [rbx+0D8h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [rbx+38h]
mov [rbx+28h], rax
mov dword ptr [rbx+34h], 8
pop rbx
retn
|
void OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder(
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder *this,
unsigned long long a2,
long long a3,
long long a4)
{
void *v5; // rdi
v5 = (void *)*((_QWORD *)this + 34);
if ( v5 )
{
a2 = *((_QWORD *)this + 36) - (_QWORD)v5;
operator delete(v5, a2);
}
std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree(
(char *)this + 224,
a2,
a3,
a4);
operator delete(*((void **)this + 27));
*((_QWORD *)this + 5) = (char *)this + 56;
*((_DWORD *)this + 13) = 8;
}
|
~IrregularPatchBuilder:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x110]
TEST RDI,RDI
JZ 0x0019e5b3
MOV RSI,qword ptr [RBX + 0x120]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_0019e5b3:
LEA RDI,[RBX + 0xe0]
CALL 0x00138ec0
MOV RDI,qword ptr [RBX + 0xd8]
CALL 0x0013a0c0
LEA RAX,[RBX + 0x38]
MOV qword ptr [RBX + 0x28],RAX
MOV dword ptr [RBX + 0x34],0x8
POP RBX
RET
|
/* OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder() */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder(IrregularPatchBuilder *this)
{
void *pvVar1;
pvVar1 = *(void **)(this + 0x110);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x120) - (long)pvVar1);
}
std::
_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
::~_Rb_tree((_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
*)(this + 0xe0));
operator_delete(*(void **)(this + 0xd8));
*(IrregularPatchBuilder **)(this + 0x28) = this + 0x38;
*(int4 *)(this + 0x34) = 8;
return;
}
|
|
10,973 |
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/irregularPatchBuilder.h
|
~IrregularPatchBuilder() { }
|
O3
|
c
|
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder():
pushq %rbx
movq %rdi, %rbx
movq 0x110(%rdi), %rdi
testq %rdi, %rdi
je 0xa10bd
movq 0x120(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
leaq 0xe0(%rbx), %rdi
callq 0x38eb0
movq 0xd8(%rbx), %rdi
callq 0x3a0a0
leaq 0x38(%rbx), %rax
movq %rax, 0x28(%rbx)
movl $0x8, 0x34(%rbx)
popq %rbx
retq
|
_ZN10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilderD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+110h]; void *
test rdi, rdi
jz short loc_A10BD
mov rsi, [rbx+120h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A10BD:
lea rdi, [rbx+0E0h]
call __ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EED2Ev; std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree()
mov rdi, [rbx+0D8h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [rbx+38h]
mov [rbx+28h], rax
mov dword ptr [rbx+34h], 8
pop rbx
retn
|
void OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder(
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder *this,
unsigned long long a2,
long long a3,
long long a4)
{
void *v5; // rdi
v5 = (void *)*((_QWORD *)this + 34);
if ( v5 )
{
a2 = *((_QWORD *)this + 36) - (_QWORD)v5;
operator delete(v5, a2);
}
std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree(
(char *)this + 224,
a2,
a3,
a4);
operator delete(*((void **)this + 27));
*((_QWORD *)this + 5) = (char *)this + 56;
*((_DWORD *)this + 13) = 8;
}
|
~IrregularPatchBuilder:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x110]
TEST RDI,RDI
JZ 0x001a10bd
MOV RSI,qword ptr [RBX + 0x120]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_001a10bd:
LEA RDI,[RBX + 0xe0]
CALL 0x00138eb0
MOV RDI,qword ptr [RBX + 0xd8]
CALL 0x0013a0a0
LEA RAX,[RBX + 0x38]
MOV qword ptr [RBX + 0x28],RAX
MOV dword ptr [RBX + 0x34],0x8
POP RBX
RET
|
/* OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder() */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder(IrregularPatchBuilder *this)
{
void *pvVar1;
pvVar1 = *(void **)(this + 0x110);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x120) - (long)pvVar1);
}
std::
_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
::~_Rb_tree((_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
*)(this + 0xe0));
operator_delete(*(void **)(this + 0xd8));
*(IrregularPatchBuilder **)(this + 0x28) = this + 0x38;
*(int4 *)(this + 0x34) = 8;
return;
}
|
|
10,974 |
ma_alloc_root
|
eloqsql/libmariadb/libmariadb/ma_alloc.c
|
void * ma_alloc_root(MA_MEM_ROOT *mem_root, size_t Size)
{
#if defined(HAVE_purify) && defined(EXTRA_DEBUG)
reg1 MA_USED_MEM *next;
Size+=ALIGN_SIZE(sizeof(MA_USED_MEM));
if (!(next = (MA_USED_MEM*) malloc(Size)))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
return((void *) 0); /* purecov: inspected */
}
next->next=mem_root->used;
mem_root->used=next;
return (void *) (((char*) next)+ALIGN_SIZE(sizeof(MA_USED_MEM)));
#else
size_t get_size;
void * point;
reg1 MA_USED_MEM *next= 0;
reg2 MA_USED_MEM **prev;
Size= ALIGN_SIZE(Size);
if ((*(prev= &mem_root->free)))
{
if ((*prev)->left < Size &&
mem_root->first_block_usage++ >= 16 &&
(*prev)->left < 4096)
{
next= *prev;
*prev= next->next;
next->next= mem_root->used;
mem_root->used= next;
mem_root->first_block_usage= 0;
}
for (next= *prev; next && next->left < Size; next= next->next)
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)),
(mem_root->block_size & ~1) * (mem_root->block_num >> 2));
if (!(next = (MA_USED_MEM*) malloc(get_size)))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
return((void *) 0); /* purecov: inspected */
}
mem_root->block_num++;
next->next= *prev;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(MA_USED_MEM));
*prev=next;
}
point= (void *) ((char*) next+ (next->size-next->left));
if ((next->left-= Size) < mem_root->min_malloc)
{ /* Full block */
*prev=next->next; /* Remove block from list */
next->next=mem_root->used;
mem_root->used=next;
mem_root->first_block_usage= 0;
}
return(point);
#endif
}
|
O0
|
c
|
ma_alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, (%rax)
je 0x2576c
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x25723
movq -0x10(%rbp), %rcx
movl 0x2c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x2c(%rcx)
cmpl $0x10, %eax
jb 0x25723
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpq $0x1000, 0x8(%rax) # imm = 0x1000
jae 0x25723
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x39(%rbp)
je 0x2574c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x25755
jmp 0x2576a
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x2572e
jmp 0x2576c
cmpq $0x0, -0x30(%rbp)
jne 0x2584a
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
andq $-0x2, %rcx
movq -0x10(%rbp), %rdx
movl 0x28(%rdx), %edx
shrl $0x2, %edx
movl %edx, %edx
imulq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x257ae
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
jmp 0x257ce
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $-0x2, %rax
movq -0x10(%rbp), %rcx
movl 0x28(%rcx), %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x135b0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x25808
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x257fb
movq -0x10(%rbp), %rax
callq *0x30(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x258be
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
subq $0x18, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x30(%rbp), %rdx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x8(%rcx)
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x258b6
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ma_alloc_root:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_30], 0
mov rax, [rbp+var_18]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
cmp qword ptr [rax], 0
jz loc_2576C
mov rax, [rbp+var_38]
mov rax, [rax]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jnb short loc_25723
mov rcx, [rbp+var_10]
mov eax, [rcx+2Ch]
mov edx, eax
add edx, 1
mov [rcx+2Ch], edx
cmp eax, 10h
jb short loc_25723
mov rax, [rbp+var_38]
mov rax, [rax]
cmp qword ptr [rax+8], 1000h
jnb short loc_25723
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
loc_25723:
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_30], rax
loc_2572E:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_39], al
jz short loc_2574C
mov rax, [rbp+var_30]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
setb al
mov [rbp+var_39], al
loc_2574C:
mov al, [rbp+var_39]
test al, 1
jnz short loc_25755
jmp short loc_2576A
loc_25755:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_30], rax
jmp short loc_2572E
loc_2576A:
jmp short $+2
loc_2576C:
cmp [rbp+var_30], 0
jnz loc_2584A
mov rax, [rbp+var_18]
add rax, 18h
mov rcx, [rbp+var_10]
mov rcx, [rcx+20h]
and rcx, 0FFFFFFFFFFFFFFFEh
mov rdx, [rbp+var_10]
mov edx, [rdx+28h]
shr edx, 2
mov edx, edx
imul rcx, rdx
cmp rax, rcx
jbe short loc_257AE
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_48], rax
jmp short loc_257CE
loc_257AE:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 0FFFFFFFFFFFFFFFEh
mov rcx, [rbp+var_10]
mov ecx, [rcx+28h]
shr ecx, 2
mov ecx, ecx
imul rax, rcx
mov [rbp+var_48], rax
loc_257CE:
mov rax, [rbp+var_48]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _malloc
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_25808
mov rax, [rbp+var_10]
cmp qword ptr [rax+30h], 0
jz short loc_257FB
mov rax, [rbp+var_10]
call qword ptr [rax+30h]
loc_257FB:
mov [rbp+var_8], 0
jmp loc_258BE
loc_25808:
mov rax, [rbp+var_10]
mov ecx, [rax+28h]
add ecx, 1
mov [rax+28h], ecx
mov rax, [rbp+var_38]
mov rcx, [rax]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax+10h], rcx
mov rcx, [rbp+var_20]
sub rcx, 18h
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_38]
mov [rax], rcx
loc_2584A:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_30]
sub rcx, [rdx+8]
add rax, rcx
mov [rbp+var_28], rax
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_30]
mov rax, [rcx+8]
sub rax, rdx
mov [rcx+8], rax
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jnb short loc_258B6
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
loc_258B6:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_258BE:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
char * ma_alloc_root(_QWORD **a1, long long a2)
{
unsigned int v2; // eax
unsigned long long v3; // rax
unsigned long long v5; // [rsp+8h] [rbp-48h]
bool v6; // [rsp+17h] [rbp-39h]
_QWORD *v7; // [rsp+18h] [rbp-38h]
_QWORD *i; // [rsp+20h] [rbp-30h]
_QWORD *v9; // [rsp+20h] [rbp-30h]
char *v10; // [rsp+28h] [rbp-28h]
unsigned long long v11; // [rsp+38h] [rbp-18h]
i = 0LL;
v11 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v7 = a1;
if ( *a1 )
{
if ( (*a1)[1] < v11 )
{
v2 = *((_DWORD *)a1 + 11);
*((_DWORD *)a1 + 11) = v2 + 1;
if ( v2 >= 0x10 && (*a1)[1] < 0x1000uLL )
{
v9 = *a1;
*a1 = (_QWORD *)**a1;
*v9 = a1[1];
a1[1] = v9;
*((_DWORD *)a1 + 11) = 0;
}
}
for ( i = *a1; ; i = (_QWORD *)*i )
{
v6 = 0;
if ( i )
v6 = i[1] < v11;
if ( !v6 )
break;
v7 = i;
}
}
if ( !i )
{
if ( v11 + 24 <= (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL) )
v5 = (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL);
else
v5 = v11 + 24;
i = (_QWORD *)malloc(v5);
if ( !i )
{
if ( a1[6] )
((void (*)(void))a1[6])();
return 0LL;
}
++*((_DWORD *)a1 + 10);
*i = *v7;
i[2] = v5;
i[1] = v5 - 24;
*v7 = i;
}
v10 = (char *)i + i[2] - i[1];
v3 = i[1] - v11;
i[1] = v3;
if ( v3 < (unsigned long long)a1[3] )
{
*v7 = *i;
*i = a1[1];
a1[1] = i;
*((_DWORD *)a1 + 11) = 0;
}
return v10;
}
|
ma_alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RAX],0x0
JZ 0x0012576c
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00125723
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x2c]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x2c],EDX
CMP EAX,0x10
JC 0x00125723
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x8],0x1000
JNC 0x00125723
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
LAB_00125723:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_0012572e:
XOR EAX,EAX
CMP qword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x0012574c
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
SETC AL
MOV byte ptr [RBP + -0x39],AL
LAB_0012574c:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x00125755
JMP 0x0012576a
LAB_00125755:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0012572e
LAB_0012576a:
JMP 0x0012576c
LAB_0012576c:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0012584a
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x20]
AND RCX,-0x2
MOV RDX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RDX + 0x28]
SHR EDX,0x2
MOV EDX,EDX
IMUL RCX,RDX
CMP RAX,RCX
JBE 0x001257ae
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001257ce
LAB_001257ae:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,-0x2
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x28]
SHR ECX,0x2
MOV ECX,ECX
IMUL RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_001257ce:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001135b0
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x00125808
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x001257fb
MOV RAX,qword ptr [RBP + -0x10]
CALL qword ptr [RAX + 0x30]
LAB_001257fb:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001258be
LAB_00125808:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x28]
ADD ECX,0x1
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LAB_0012584a:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x30]
SUB RCX,qword ptr [RDX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,RDX
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JNC 0x001258b6
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
LAB_001258b6:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001258be:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long ma_alloc_root(long *param_1,long param_2)
{
uint uVar1;
long *plVar2;
long lVar3;
long lVar4;
long lVar5;
ulong uVar6;
bool bVar7;
size_t local_50;
long *local_40;
long *local_38;
local_38 = (long *)0x0;
uVar6 = param_2 + 7U & 0xfffffffffffffff8;
local_40 = param_1;
if (*param_1 != 0) {
if (((*(ulong *)(*param_1 + 8) < uVar6) &&
(uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1,
0xf < uVar1)) && (*(ulong *)(*param_1 + 8) < 0x1000)) {
plVar2 = (long *)*param_1;
*param_1 = *plVar2;
*plVar2 = param_1[1];
param_1[1] = (long)plVar2;
*(int4 *)((long)param_1 + 0x2c) = 0;
}
local_38 = (long *)*param_1;
while( true ) {
bVar7 = false;
if (local_38 != (long *)0x0) {
bVar7 = (ulong)local_38[1] < uVar6;
}
if (!bVar7) break;
local_40 = local_38;
local_38 = (long *)*local_38;
}
}
if (local_38 == (long *)0x0) {
if ((param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2) < uVar6 + 0x18) {
local_50 = uVar6 + 0x18;
}
else {
local_50 = (param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2);
}
local_38 = (long *)malloc(local_50);
if (local_38 == (long *)0x0) {
if (param_1[6] != 0) {
(*(code *)param_1[6])();
}
return 0;
}
*(int *)(param_1 + 5) = (int)param_1[5] + 1;
*local_38 = *local_40;
local_38[2] = local_50;
local_38[1] = local_50 - 0x18;
*local_40 = (long)local_38;
}
lVar3 = local_38[2];
lVar4 = local_38[1];
lVar5 = local_38[1];
local_38[1] = lVar5 - uVar6;
if (lVar5 - uVar6 < (ulong)param_1[3]) {
*local_40 = *local_38;
*local_38 = param_1[1];
param_1[1] = (long)local_38;
*(int4 *)((long)param_1 + 0x2c) = 0;
}
return (long)local_38 + (lVar3 - lVar4);
}
|
|
10,975 |
fmt::v10::detail::dragonbox::cache_accessor<float>::compute_mul_parity(unsigned int, unsigned long const&, int)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
|
static auto compute_mul_parity(carrier_uint two_f,
const cache_entry_type& cache,
int beta) noexcept
-> compute_mul_parity_result {
FMT_ASSERT(beta >= 1, "");
FMT_ASSERT(beta < 64, "");
auto r = umul96_lower64(two_f, cache);
return {((r >> (64 - beta)) & 1) != 0,
static_cast<uint32_t>(r >> (32 - beta)) == 0};
}
|
O0
|
c
|
fmt::v10::detail::dragonbox::cache_accessor<float>::compute_mul_parity(unsigned int, unsigned long const&, int):
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
cmpl $0x1, 0x14(%rsp)
setge %al
andb $0x1, %al
movb %al, 0x13(%rsp)
leaq 0x13(%rsp), %rdi
leaq 0x8ae49(%rip), %rsi # 0x11d894
callq 0x4e540
cmpl $0x40, 0x14(%rsp)
setl %al
andb $0x1, %al
movb %al, 0x12(%rsp)
leaq 0x12(%rsp), %rdi
leaq 0x8ae2a(%rip), %rsi # 0x11d894
callq 0x4e540
movl 0x20(%rsp), %edi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0x95570
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x40, %ecx
subl 0x14(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, 0x26(%rsp)
movq 0x8(%rsp), %rax
movl $0x20, %ecx
subl 0x14(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, 0x27(%rsp)
movw 0x26(%rsp), %ax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN3fmt3v106detail9dragonbox14cache_accessorIfE18compute_mul_parityEjRKmi:
sub rsp, 28h
mov dword ptr [rsp+28h+var_8], edi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_14], edx
cmp [rsp+28h+var_14], 1
setnl al
and al, 1
mov [rsp+28h+var_15], al
lea rdi, [rsp+28h+var_15]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
cmp [rsp+28h+var_14], 40h ; '@'
setl al
and al, 1
mov [rsp+28h+var_16], al
lea rdi, [rsp+28h+var_16]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
mov edi, dword ptr [rsp+28h+var_8]; this
mov rax, [rsp+28h+var_10]
mov rsi, [rax]; unsigned int
call _ZN3fmt3v106detail9dragonbox14umul96_lower64Ejm; fmt::v10::detail::dragonbox::umul96_lower64(uint,ulong)
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov ecx, 40h ; '@'
sub ecx, [rsp+28h+var_14]
mov ecx, ecx
shr rax, cl
and rax, 1
cmp rax, 0
setnz al
and al, 1
mov byte ptr [rsp+28h+var_8+6], al
mov rax, [rsp+28h+var_20]
mov ecx, 20h ; ' '
sub ecx, [rsp+28h+var_14]
mov ecx, ecx
shr rax, cl
cmp eax, 0
setz al
and al, 1
mov byte ptr [rsp+28h+var_8+7], al
mov ax, word ptr [rsp+28h+var_8+6]
add rsp, 28h
retn
|
__int16 fmt::v10::detail::dragonbox::cache_accessor<float>::compute_mul_parity(
unsigned int a1,
_QWORD *a2,
char a3)
{
unsigned long long v3; // rdx
unsigned long long v5; // [rsp+8h] [rbp-20h]
__int16 v7; // [rsp+26h] [rbp-2h]
fmt::v10::detail::ignore_unused<bool,char [1]>();
fmt::v10::detail::ignore_unused<bool,char [1]>();
v5 = fmt::v10::detail::dragonbox::umul96_lower64((fmt::v10::detail::dragonbox *)a1, *a2, v3);
LOBYTE(v7) = ((v5 >> (64 - a3)) & 1) != 0;
HIBYTE(v7) = (unsigned int)(v5 >> (32 - a3)) == 0;
return v7;
}
|
compute_mul_parity:
SUB RSP,0x28
MOV dword ptr [RSP + 0x20],EDI
MOV qword ptr [RSP + 0x18],RSI
MOV dword ptr [RSP + 0x14],EDX
CMP dword ptr [RSP + 0x14],0x1
SETGE AL
AND AL,0x1
MOV byte ptr [RSP + 0x13],AL
LEA RDI,[RSP + 0x13]
LEA RSI,[0x21d894]
CALL 0x0014e540
CMP dword ptr [RSP + 0x14],0x40
SETL AL
AND AL,0x1
MOV byte ptr [RSP + 0x12],AL
LEA RDI,[RSP + 0x12]
LEA RSI,[0x21d894]
CALL 0x0014e540
MOV EDI,dword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX]
CALL 0x00195570
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,0x40
SUB ECX,dword ptr [RSP + 0x14]
MOV ECX,ECX
SHR RAX,CL
AND RAX,0x1
CMP RAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x26],AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,0x20
SUB ECX,dword ptr [RSP + 0x14]
MOV ECX,ECX
SHR RAX,CL
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
MOV AX,word ptr [RSP + 0x26]
ADD RSP,0x28
RET
|
/* fmt::v10::detail::dragonbox::cache_accessor<float>::compute_mul_parity(unsigned int, unsigned
long const&, int) */
int8
fmt::v10::detail::dragonbox::cache_accessor<float>::compute_mul_parity
(uint param_1,ulong *param_2,int param_3)
{
ulong uVar1;
ulong uVar2;
bool local_16;
bool local_15;
int local_14;
ulong *local_10;
uint local_8;
int2 local_2;
local_15 = 0 < param_3;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
ignore_unused<bool,char[1]>(&local_15,"");
local_16 = local_14 < 0x40;
ignore_unused<bool,char[1]>(&local_16,"");
uVar1 = umul96_lower64(local_8,*local_10);
uVar2 = uVar1 >> (0x20U - (char)local_14 & 0x3f);
local_2 = CONCAT11((int)uVar2 == 0,(uVar1 >> (0x40U - (char)local_14 & 0x3f) & 1) != 0);
return CONCAT62((int6)(uVar2 >> 0x10),local_2);
}
|
|
10,976 |
flush_cached_blocks
|
eloqsql/storage/maria/ma_pagecache.c
|
static int flush_cached_blocks(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
PAGECACHE_BLOCK_LINK **cache,
PAGECACHE_BLOCK_LINK **end,
enum flush_type type,
int *first_errno)
{
int rc= PCFLUSH_OK;
my_bool error;
uint count= (uint) (end-cache);
DBUG_ENTER("flush_cached_blocks");
*first_errno= 0;
/* Don't lock the cache during the flush */
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
/*
As all blocks referred in 'cache' are marked by PCBLOCK_IN_FLUSH
we are guaranteed that no thread will change them
*/
qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
for (; cache != end; cache++)
{
PAGECACHE_BLOCK_LINK *block= *cache;
/*
In the case of non_transactional tables we want to flush also
block pinned with reads. This is becasue we may have other
threads reading the block during flush, as non transactional
tables can have many readers while the one writer is doing the
flush.
We don't want to do flush pinned blocks during checkpoint.
We detect the checkpoint case by checking if type is LAZY.
*/
if ((type == FLUSH_KEEP_LAZY && block->pins) || block->wlocks)
{
KEYCACHE_DBUG_PRINT("flush_cached_blocks",
("block: %u (%p) pinned",
PCBLOCK_NUMBER(pagecache, block), block));
DBUG_PRINT("info", ("block: %u (%p) pinned",
PCBLOCK_NUMBER(pagecache, block), block));
PCBLOCK_INFO(block);
/* undo the mark put by flush_pagecache_blocks_int(): */
block->status&= ~PCBLOCK_IN_FLUSH;
rc|= PCFLUSH_PINNED;
DBUG_PRINT("warning", ("Page pinned"));
unreg_request(pagecache, block, 1);
if (!*first_errno)
*first_errno= HA_ERR_INTERNAL_ERROR;
continue;
}
if (make_lock_and_pin(pagecache, block,
PAGECACHE_LOCK_READ, PAGECACHE_PIN, FALSE))
DBUG_ASSERT(0);
KEYCACHE_PRINT("flush_cached_blocks",
("block: %u (%p) to be flushed",
PCBLOCK_NUMBER(pagecache, block), block));
DBUG_PRINT("info", ("block: %u (%p) to be flushed",
PCBLOCK_NUMBER(pagecache, block), block));
PCBLOCK_INFO(block);
/**
@todo IO If page is contiguous with next page to flush, group flushes
in one single my_pwrite().
*/
/**
It is important to use block->hash_link->file below and not 'file', as
the first one is right and the second may have different out-of-date
content (see StaleFilePointersInFlush in ma_checkpoint.c).
@todo change argument of functions to be File.
*/
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
error= pagecache_fwrite(pagecache, &block->hash_link->file,
block->buffer,
block->hash_link->pageno,
block->type,
pagecache->readwrite_flags);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (make_lock_and_pin(pagecache, block,
PAGECACHE_LOCK_READ_UNLOCK,
PAGECACHE_UNPIN, FALSE))
DBUG_ASSERT(0);
pagecache->global_cache_write++;
if (error)
{
block->status|= PCBLOCK_ERROR;
block->error= (int16) my_errno;
my_debug_put_break_here();
if (!*first_errno)
*first_errno= my_errno ? my_errno : -1;
rc|= PCFLUSH_ERROR;
}
/*
Let to proceed for possible waiting requests to write to the block page.
It might happen only during an operation to resize the key cache.
*/
if (block->wqueue[COND_FOR_SAVED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]);
/* type will never be FLUSH_IGNORE_CHANGED here */
if (! (type == FLUSH_KEEP || type == FLUSH_KEEP_LAZY ||
type == FLUSH_FORCE_WRITE))
{
if (!free_block(pagecache, block, 1))
{
pagecache->blocks_changed--;
pagecache->global_blocks_changed--;
}
else
{
block->status&= ~PCBLOCK_IN_FLUSH;
link_to_file_list(pagecache, block, file, 1);
}
}
else
{
block->status&= ~PCBLOCK_IN_FLUSH;
link_to_file_list(pagecache, block, file, 1);
unreg_request(pagecache, block, 1);
}
}
DBUG_RETURN(rc);
}
|
O0
|
c
|
flush_cached_blocks:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x969e0
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %eax
movl %eax, %esi
movl $0x8, %edx
leaq 0x2c8(%rip), %rcx # 0x9be30
callq 0x29550
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
leaq 0xb8f8d(%rip), %rsi # 0x154b0c
movl $0x12a3, %edx # imm = 0x12A3
callq 0x96970
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x9be1e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpl $0x4, -0x24(%rbp)
jne 0x9bbb2
movq -0x48(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x9bbbc
movq -0x48(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x9bc0c
jmp 0x9bbbe
jmp 0x9bbc0
jmp 0x9bbc2
jmp 0x9bbc4
jmp 0x9bbc6
jmp 0x9bbc8
movq -0x48(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x11, %ecx
movw %cx, 0x74(%rax)
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
jmp 0x9bbe2
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x978d0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x9bc07
movq -0x30(%rbp), %rax
movl $0x7a, (%rax)
jmp 0x9be0d
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x97730
cmpb $0x0, %al
je 0x9bc30
jmp 0x9bc2c
jmp 0x9bc2e
jmp 0x9bc30
jmp 0x9bc32
jmp 0x9bc34
jmp 0x9bc36
jmp 0x9bc38
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x969e0
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x18, %rsi
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x60(%rax), %rcx
movq -0x48(%rbp), %rax
movl 0x7c(%rax), %r8d
movq -0x8(%rbp), %rax
movq 0x198(%rax), %r9
callq 0x99b80
movb %al, -0x35(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
leaq 0xb8e73(%rip), %rsi # 0x154b0c
movl $0x12dd, %edx # imm = 0x12DD
callq 0x96970
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x5, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x97730
cmpb $0x0, %al
je 0x9bcc7
jmp 0x9bcc3
jmp 0x9bcc5
jmp 0x9bcc7
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x178(%rax)
cmpb $0x0, -0x35(%rbp)
je 0x9bd41
movq -0x48(%rbp), %rax
movzwl 0x74(%rax), %ecx
orl $0x1, %ecx
movw %cx, 0x74(%rax)
callq 0xf9990
movl (%rax), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movw %cx, 0x76(%rax)
jmp 0x9bd06
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x9bd38
callq 0xf9990
cmpl $0x0, (%rax)
je 0x9bd25
callq 0xf9990
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x9bd2f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x4c(%rbp)
jmp 0x9bd2f
movl -0x4c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x9bd5d
movq -0x48(%rbp), %rdi
addq $0x48, %rdi
addq $0x8, %rdi
callq 0x102f50
cmpl $0x0, -0x24(%rbp)
je 0x9bdd4
cmpl $0x4, -0x24(%rbp)
je 0x9bdd4
cmpl $0x3, -0x24(%rbp)
je 0x9bdd4
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x9aee0
cmpb $0x0, %al
jne 0x9bdad
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x168(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x168(%rax)
jmp 0x9bdd2
movq -0x48(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x11, %ecx
movw %cx, 0x74(%rax)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl $0x1, %ecx
callq 0x9b140
jmp 0x9be0b
movq -0x48(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x11, %ecx
movw %cx, 0x74(%rax)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl $0x1, %ecx
callq 0x9b140
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x978d0
jmp 0x9be0d
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x9bb89
jmp 0x9be20
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
flush_cached_blocks:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
mov [rbp+var_34], 0
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
sar rax, 3
mov [rbp+var_3C], eax
mov rax, [rbp+var_30]
mov dword ptr [rax], 0
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_13
mov rdi, [rbp+var_18]
mov eax, [rbp+var_3C]
mov esi, eax
mov edx, 8
lea rcx, cmp_sec_link
call _qsort
mov rdi, [rbp+var_8]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 12A3h
call inline_mysql_mutex_lock_12
loc_9BB89:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz loc_9BE1E
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_48], rax
cmp [rbp+var_24], 4
jnz short loc_9BBB2
mov rax, [rbp+var_48]
cmp dword ptr [rax+64h], 0
jnz short loc_9BBBC
loc_9BBB2:
mov rax, [rbp+var_48]
cmp dword ptr [rax+68h], 0
jz short loc_9BC0C
loc_9BBBC:
jmp short $+2
loc_9BBBE:
jmp short $+2
loc_9BBC0:
jmp short $+2
loc_9BBC2:
jmp short $+2
loc_9BBC4:
jmp short $+2
loc_9BBC6:
jmp short $+2
loc_9BBC8:
mov rax, [rbp+var_48]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFEFh
mov [rax+74h], cx
mov eax, [rbp+var_34]
or eax, 2
mov [rbp+var_34], eax
jmp short $+2
loc_9BBE2:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 1
call unreg_request
mov rax, [rbp+var_30]
cmp dword ptr [rax], 0
jnz short loc_9BC07
mov rax, [rbp+var_30]
mov dword ptr [rax], 7Ah ; 'z'
loc_9BC07:
jmp loc_9BE0D
loc_9BC0C:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 3
mov ecx, 2
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_9BC30
jmp short $+2
loc_9BC2C:
jmp short $+2
loc_9BC2E:
jmp short $+2
loc_9BC30:
jmp short $+2
loc_9BC32:
jmp short $+2
loc_9BC34:
jmp short $+2
loc_9BC36:
jmp short $+2
loc_9BC38:
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_13
mov rdi, [rbp+var_8]
mov rax, [rbp+var_48]
mov rsi, [rax+20h]
add rsi, 18h
mov rax, [rbp+var_48]
mov rdx, [rax+30h]
mov rax, [rbp+var_48]
mov rax, [rax+20h]
mov rcx, [rax+60h]
mov rax, [rbp+var_48]
mov r8d, [rax+7Ch]
mov rax, [rbp+var_8]
mov r9, [rax+198h]
call pagecache_fwrite
mov [rbp+var_35], al
mov rdi, [rbp+var_8]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 12DDh
call inline_mysql_mutex_lock_12
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 5
mov ecx, 3
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_9BCC7
jmp short $+2
loc_9BCC3:
jmp short $+2
loc_9BCC5:
jmp short $+2
loc_9BCC7:
mov rax, [rbp+var_8]
mov rcx, [rax+178h]
add rcx, 1
mov [rax+178h], rcx
cmp [rbp+var_35], 0
jz short loc_9BD41
mov rax, [rbp+var_48]
movzx ecx, word ptr [rax+74h]
or ecx, 1
mov [rax+74h], cx
call _my_thread_var
mov eax, [rax]
mov cx, ax
mov rax, [rbp+var_48]
mov [rax+76h], cx
jmp short $+2
loc_9BD06:
mov rax, [rbp+var_30]
cmp dword ptr [rax], 0
jnz short loc_9BD38
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_9BD25
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4C], eax
jmp short loc_9BD2F
loc_9BD25:
mov eax, 0FFFFFFFFh
mov [rbp+var_4C], eax
jmp short $+2
loc_9BD2F:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_30]
mov [rax], ecx
loc_9BD38:
mov eax, [rbp+var_34]
or eax, 1
mov [rbp+var_34], eax
loc_9BD41:
mov rax, [rbp+var_48]
cmp qword ptr [rax+50h], 0
jz short loc_9BD5D
mov rdi, [rbp+var_48]
add rdi, 48h ; 'H'
add rdi, 8
call wqueue_release_queue
loc_9BD5D:
cmp [rbp+var_24], 0
jz short loc_9BDD4
cmp [rbp+var_24], 4
jz short loc_9BDD4
cmp [rbp+var_24], 3
jz short loc_9BDD4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 1
call free_block
cmp al, 0
jnz short loc_9BDAD
mov rax, [rbp+var_8]
mov rcx, [rax+58h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+58h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+168h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+168h], rcx
jmp short loc_9BDD2
loc_9BDAD:
mov rax, [rbp+var_48]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFEFh
mov [rax+74h], cx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_10]
mov ecx, 1
call link_to_file_list
loc_9BDD2:
jmp short loc_9BE0B
loc_9BDD4:
mov rax, [rbp+var_48]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFEFh
mov [rax+74h], cx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_10]
mov ecx, 1
call link_to_file_list
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 1
call unreg_request
loc_9BE0B:
jmp short $+2
loc_9BE0D:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp loc_9BB89
loc_9BE1E:
jmp short $+2
loc_9BE20:
mov eax, [rbp+var_34]
mov [rbp+var_50], eax
mov eax, [rbp+var_50]
add rsp, 50h
pop rbp
retn
|
long long flush_cached_blocks(_QWORD *a1, long long a2, long long *a3, long long *a4, int a5, int *a6)
{
int v7; // [rsp+4h] [rbp-4Ch]
long long v8; // [rsp+8h] [rbp-48h]
unsigned int v9; // [rsp+14h] [rbp-3Ch]
char v10; // [rsp+1Bh] [rbp-35h]
unsigned int v11; // [rsp+1Ch] [rbp-34h]
long long *v15; // [rsp+38h] [rbp-18h]
v15 = a3;
v11 = 0;
v9 = a4 - a3;
*a6 = 0;
inline_mysql_mutex_unlock_13((long long)(a1 + 25));
qsort(v15, v9, 8LL, cmp_sec_link);
inline_mysql_mutex_lock_12(
(long long)(a1 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x12A3u);
while ( v15 != a4 )
{
v8 = *v15;
if ( a5 == 4 && *(_DWORD *)(v8 + 100) || *(_DWORD *)(v8 + 104) )
{
*(_WORD *)(v8 + 116) &= ~0x10u;
v11 |= 2u;
unreg_request(a1, v8, 1);
if ( !*a6 )
*a6 = 122;
}
else
{
make_lock_and_pin((long long)a1, v8, 3, 2, 0);
inline_mysql_mutex_unlock_13((long long)(a1 + 25));
v10 = pagecache_fwrite(
(long long)a1,
*(_QWORD *)(v8 + 32) + 24LL,
*(_QWORD *)(v8 + 48),
*(_QWORD *)(*(_QWORD *)(v8 + 32) + 96LL),
*(_DWORD *)(v8 + 124),
a1[51]);
inline_mysql_mutex_lock_12(
(long long)(a1 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x12DDu);
make_lock_and_pin((long long)a1, v8, 5, 3, 0);
++a1[47];
if ( v10 )
{
*(_WORD *)(v8 + 116) |= 1u;
*(_WORD *)(v8 + 118) = *(_DWORD *)my_thread_var(a1, (const char *)v8);
if ( !*a6 )
{
if ( *(_DWORD *)my_thread_var(a1, (const char *)v8) )
v7 = *(_DWORD *)my_thread_var(a1, (const char *)v8);
else
v7 = -1;
*a6 = v7;
}
v11 |= 1u;
}
if ( *(_QWORD *)(v8 + 80) )
wqueue_release_queue(v8 + 80);
if ( !a5 || a5 == 4 || a5 == 3 )
{
*(_WORD *)(v8 + 116) &= ~0x10u;
link_to_file_list(a1, v8, a2, 1);
unreg_request(a1, v8, 1);
}
else if ( free_block(a1, v8, 1) )
{
*(_WORD *)(v8 + 116) &= ~0x10u;
link_to_file_list(a1, v8, a2, 1);
}
else
{
--a1[11];
--a1[45];
}
}
++v15;
}
return v11;
}
|
flush_cached_blocks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x34],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
SAR RAX,0x3
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x001969e0
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x3c]
MOV ESI,EAX
MOV EDX,0x8
LEA RCX,[0x19be30]
CALL 0x00129550
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
LEA RSI,[0x254b0c]
MOV EDX,0x12a3
CALL 0x00196970
LAB_0019bb89:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0019be1e
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
CMP dword ptr [RBP + -0x24],0x4
JNZ 0x0019bbb2
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x64],0x0
JNZ 0x0019bbbc
LAB_0019bbb2:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x68],0x0
JZ 0x0019bc0c
LAB_0019bbbc:
JMP 0x0019bbbe
LAB_0019bbbe:
JMP 0x0019bbc0
LAB_0019bbc0:
JMP 0x0019bbc2
LAB_0019bbc2:
JMP 0x0019bbc4
LAB_0019bbc4:
JMP 0x0019bbc6
LAB_0019bbc6:
JMP 0x0019bbc8
LAB_0019bbc8:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xffffffef
MOV word ptr [RAX + 0x74],CX
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x2
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0019bbe2
LAB_0019bbe2:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x1
CALL 0x001978d0
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX],0x0
JNZ 0x0019bc07
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x7a
LAB_0019bc07:
JMP 0x0019be0d
LAB_0019bc0c:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x3
MOV ECX,0x2
XOR R8D,R8D
CALL 0x00197730
CMP AL,0x0
JZ 0x0019bc30
JMP 0x0019bc2c
LAB_0019bc2c:
JMP 0x0019bc2e
LAB_0019bc2e:
JMP 0x0019bc30
LAB_0019bc30:
JMP 0x0019bc32
LAB_0019bc32:
JMP 0x0019bc34
LAB_0019bc34:
JMP 0x0019bc36
LAB_0019bc36:
JMP 0x0019bc38
LAB_0019bc38:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x001969e0
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RAX + 0x20]
ADD RSI,0x18
MOV RAX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOV R8D,dword ptr [RAX + 0x7c]
MOV RAX,qword ptr [RBP + -0x8]
MOV R9,qword ptr [RAX + 0x198]
CALL 0x00199b80
MOV byte ptr [RBP + -0x35],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
LEA RSI,[0x254b0c]
MOV EDX,0x12dd
CALL 0x00196970
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x5
MOV ECX,0x3
XOR R8D,R8D
CALL 0x00197730
CMP AL,0x0
JZ 0x0019bcc7
JMP 0x0019bcc3
LAB_0019bcc3:
JMP 0x0019bcc5
LAB_0019bcc5:
JMP 0x0019bcc7
LAB_0019bcc7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x178]
ADD RCX,0x1
MOV qword ptr [RAX + 0x178],RCX
CMP byte ptr [RBP + -0x35],0x0
JZ 0x0019bd41
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RAX + 0x74]
OR ECX,0x1
MOV word ptr [RAX + 0x74],CX
CALL 0x001f9990
MOV EAX,dword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x48]
MOV word ptr [RAX + 0x76],CX
JMP 0x0019bd06
LAB_0019bd06:
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX],0x0
JNZ 0x0019bd38
CALL 0x001f9990
CMP dword ptr [RAX],0x0
JZ 0x0019bd25
CALL 0x001f9990
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0019bd2f
LAB_0019bd25:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0019bd2f
LAB_0019bd2f:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
LAB_0019bd38:
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
LAB_0019bd41:
MOV RAX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0019bd5d
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x48
ADD RDI,0x8
CALL 0x00202f50
LAB_0019bd5d:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0019bdd4
CMP dword ptr [RBP + -0x24],0x4
JZ 0x0019bdd4
CMP dword ptr [RBP + -0x24],0x3
JZ 0x0019bdd4
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x1
CALL 0x0019aee0
CMP AL,0x0
JNZ 0x0019bdad
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x168]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x168],RCX
JMP 0x0019bdd2
LAB_0019bdad:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xffffffef
MOV word ptr [RAX + 0x74],CX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,0x1
CALL 0x0019b140
LAB_0019bdd2:
JMP 0x0019be0b
LAB_0019bdd4:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xffffffef
MOV word ptr [RAX + 0x74],CX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,0x1
CALL 0x0019b140
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x1
CALL 0x001978d0
LAB_0019be0b:
JMP 0x0019be0d
LAB_0019be0d:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0019bb89
LAB_0019be1e:
JMP 0x0019be20
LAB_0019be20:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x50],EAX
MOV EAX,dword ptr [RBP + -0x50]
ADD RSP,0x50
POP RBP
RET
|
uint flush_cached_blocks(long param_1,int8 param_2,long *param_3,long *param_4,int param_5,
int *param_6)
{
long lVar1;
char cVar2;
int4 *puVar3;
int *piVar4;
int local_54;
uint local_3c;
long *local_20;
local_3c = 0;
*param_6 = 0;
inline_mysql_mutex_unlock(param_1 + 200);
qsort(param_3,(long)param_4 - (long)param_3 >> 3 & 0xffffffff,8,cmp_sec_link);
inline_mysql_mutex_lock
(param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x12a3);
for (local_20 = param_3; local_20 != param_4; local_20 = local_20 + 1) {
lVar1 = *local_20;
if (((param_5 == 4) && (*(int *)(lVar1 + 100) != 0)) || (*(int *)(lVar1 + 0x68) != 0)) {
*(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef;
local_3c = local_3c | 2;
unreg_request(param_1,lVar1,1);
if (*param_6 == 0) {
*param_6 = 0x7a;
}
}
else {
make_lock_and_pin(param_1,lVar1,3,2,0);
inline_mysql_mutex_unlock(param_1 + 200);
cVar2 = pagecache_fwrite(param_1,*(long *)(lVar1 + 0x20) + 0x18,*(int8 *)(lVar1 + 0x30),
*(int8 *)(*(long *)(lVar1 + 0x20) + 0x60),
*(int4 *)(lVar1 + 0x7c),*(int8 *)(param_1 + 0x198));
inline_mysql_mutex_lock
(param_1 + 200,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x12dd);
make_lock_and_pin(param_1,lVar1,5,3,0);
*(long *)(param_1 + 0x178) = *(long *)(param_1 + 0x178) + 1;
if (cVar2 != '\0') {
*(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) | 1;
puVar3 = (int4 *)_my_thread_var();
*(short *)(lVar1 + 0x76) = (short)*puVar3;
if (*param_6 == 0) {
piVar4 = (int *)_my_thread_var();
if (*piVar4 == 0) {
local_54 = -1;
}
else {
piVar4 = (int *)_my_thread_var();
local_54 = *piVar4;
}
*param_6 = local_54;
}
local_3c = local_3c | 1;
}
if (*(long *)(lVar1 + 0x50) != 0) {
wqueue_release_queue(lVar1 + 0x50);
}
if (((param_5 == 0) || (param_5 == 4)) || (param_5 == 3)) {
*(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef;
link_to_file_list(param_1,lVar1,param_2,1);
unreg_request(param_1,lVar1,1);
}
else {
cVar2 = free_block(param_1,lVar1,1);
if (cVar2 == '\0') {
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1;
*(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1;
}
else {
*(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef;
link_to_file_list(param_1,lVar1,param_2,1);
}
}
}
}
return local_3c;
}
|
|
10,977 |
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long)
|
eloqsql/mysys/crc32/crc32c.cc
|
static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size)
{
const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu;
// Point x at first 16-byte aligned byte in string. This might be
// just past the end of the string.
const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
if (x <= e)
// Process bytes until finished or p is 16-byte aligned
while (p != x)
STEP1;
// Process bytes 16 at a time
while ((e-p) >= 16)
{
Slow_CRC32(&l, &p);
Slow_CRC32(&l, &p);
}
// Process bytes 8 at a time
while ((e-p) >= 8)
Slow_CRC32(&l, &p);
// Process the last few bytes
while (p != e)
STEP1;
return static_cast<uint32_t>(l ^ 0xffffffffu);
}
|
O3
|
cpp
|
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %eax
addq %rsi, %rdx
notl %eax
leaq 0xf(%rsi), %rdi
andq $-0x10, %rdi
cmpq %rdi, %rdx
setb %r8b
movq %rdi, %rcx
subq %rsi, %rcx
sete %r9b
orb %r8b, %r9b
je 0x333ff
movq %rsi, %rdi
jmp 0x3342a
leaq 0x34d6a(%rip), %r8 # 0x68170
movq %rsi, %r9
movzbl %al, %r10d
movzbl (%r9), %r11d
incq %r9
xorl %r10d, %r11d
movl (%r8,%r11,4), %r10d
shrq $0x8, %rax
xorq %r10, %rax
cmpq %rdi, %r9
jne 0x33409
addq %rcx, %rsi
movq %rdx, %rcx
subq %rdi, %rcx
cmpq $0x10, %rcx
jl 0x3353a
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x35124(%rip), %r8 # 0x68570
leaq 0x3551d(%rip), %r9 # 0x68970
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x35910(%rip), %r11 # 0x68d70
leaq 0x34d09(%rip), %rbx # 0x68170
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
xorl 0x8(%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0xc(%rsi), %r14d
addq $0x10, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x10, %rcx
cmpq $0xf, %rcx
jg 0x33467
movl %eax, %eax
cmpq $0x8, %rcx
jl 0x335e0
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x3501a(%rip), %r8 # 0x68570
leaq 0x35413(%rip), %r9 # 0x68970
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x35806(%rip), %r11 # 0x68d70
leaq 0x34bff(%rip), %rbx # 0x68170
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
addq $0x8, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x8, %rcx
cmpq $0x7, %rcx
jg 0x33571
movl %eax, %eax
cmpq %rdx, %rsi
je 0x33609
leaq 0x34b84(%rip), %rcx # 0x68170
movzbl %al, %edi
movzbl (%rsi), %r8d
incq %rsi
xorl %edi, %r8d
movl (%rcx,%r8,4), %edi
shrq $0x8, %rax
xorq %rdi, %rax
cmpq %rdx, %rsi
jne 0x335ec
notl %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov eax, edi
add rdx, rsi
not eax
lea rdi, [rsi+0Fh]
and rdi, 0FFFFFFFFFFFFFFF0h
cmp rdx, rdi
setb r8b
mov rcx, rdi
sub rcx, rsi
setz r9b
or r9b, r8b
jz short loc_333FF
mov rdi, rsi
jmp short loc_3342A
loc_333FF:
lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
mov r9, rsi
loc_33409:
movzx r10d, al
movzx r11d, byte ptr [r9]
inc r9
xor r11d, r10d
mov r10d, [r8+r11*4]
shr rax, 8
xor rax, r10
cmp r9, rdi
jnz short loc_33409
add rsi, rcx
loc_3342A:
mov rcx, rdx
sub rcx, rdi
cmp rcx, 10h
jl loc_3353A
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_33467:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
xor eax, [rsi+8]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+0Ch]
add rsi, 10h
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF0h
cmp rcx, 0Fh
jg loc_33467
mov eax, eax
loc_3353A:
cmp rcx, 8
jl loc_335E0
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_33571:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
add rsi, 8
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rcx, 7
jg short loc_33571
mov eax, eax
loc_335E0:
cmp rsi, rdx
jz short loc_33609
lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_335EC:
movzx edi, al
movzx r8d, byte ptr [rsi]
inc rsi
xor r8d, edi
mov edi, [rcx+r8*4]
shr rax, 8
xor rax, rdi
cmp rsi, rdx
jnz short loc_335EC
loc_33609:
not eax
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mysys_namespace::crc32c::crc32c_slow(
mysys_namespace::crc32c *this,
unsigned long long a2,
const char *a3)
{
const char *v3; // rdx
unsigned long long v4; // rax
unsigned long long v5; // rdi
unsigned __int8 *v6; // r9
int v7; // r11d
long long v8; // rcx
unsigned int v9; // r14d
unsigned int v10; // eax
unsigned int v11; // r14d
long long v12; // rcx
unsigned int v13; // r14d
int v14; // r8d
v3 = &a3[a2];
v4 = (unsigned int)~(_DWORD)this;
v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
if ( (unsigned long long)v3 < v5 || v5 == a2 )
{
v5 = a2;
}
else
{
v6 = (unsigned __int8 *)a2;
do
{
v7 = *v6++;
v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8);
}
while ( v6 != (unsigned __int8 *)v5 );
a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
}
v8 = (long long)&v3[-v5];
if ( (long long)&v3[-v5] >= 16 )
{
v8 = (long long)&v3[-a2];
do
{
v9 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
v10 = *(_DWORD *)(a2 + 8) ^ mysys_namespace::crc32c::table0_[HIBYTE(v9)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v9 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)(a2 + 4) ^ LOBYTE(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOBYTE(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOBYTE(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]))] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)(a2 + 4) ^ LOWORD(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ *(_WORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOWORD(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOWORD(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)])) >> 8)];
v11 = *(_DWORD *)(a2 + 12) ^ mysys_namespace::crc32c::table0_[HIBYTE(v10)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v10 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v10] ^ mysys_namespace::crc32c::table2_[BYTE1(v10)];
a2 += 16LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v11)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v11 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v11] ^ mysys_namespace::crc32c::table2_[BYTE1(v11)];
v8 -= 16LL;
}
while ( v8 > 15 );
v4 = (unsigned int)v4;
}
if ( v8 >= 8 )
{
v12 = (long long)&v3[-a2];
do
{
v13 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
a2 += 8LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v13)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v13 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v13] ^ mysys_namespace::crc32c::table2_[BYTE1(v13)];
v12 -= 8LL;
}
while ( v12 > 7 );
v4 = (unsigned int)v4;
}
for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v14] ^ (v4 >> 8) )
v14 = *(unsigned __int8 *)a2++;
return (unsigned int)~(_DWORD)v4;
}
|
crc32c_slow:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV EAX,EDI
ADD RDX,RSI
NOT EAX
LEA RDI,[RSI + 0xf]
AND RDI,-0x10
CMP RDX,RDI
SETC R8B
MOV RCX,RDI
SUB RCX,RSI
SETZ R9B
OR R9B,R8B
JZ 0x001333ff
MOV RDI,RSI
JMP 0x0013342a
LAB_001333ff:
LEA R8,[0x168170]
MOV R9,RSI
LAB_00133409:
MOVZX R10D,AL
MOVZX R11D,byte ptr [R9]
INC R9
XOR R11D,R10D
MOV R10D,dword ptr [R8 + R11*0x4]
SHR RAX,0x8
XOR RAX,R10
CMP R9,RDI
JNZ 0x00133409
ADD RSI,RCX
LAB_0013342a:
MOV RCX,RDX
SUB RCX,RDI
CMP RCX,0x10
JL 0x0013353a
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x168570]
LEA R9,[0x168970]
MOV R10D,0x3fc
LEA R11,[0x168d70]
LEA RBX,[0x168170]
LAB_00133467:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
XOR EAX,dword ptr [RSI + 0x8]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0xc]
ADD RSI,0x10
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x10
CMP RCX,0xf
JG 0x00133467
MOV EAX,EAX
LAB_0013353a:
CMP RCX,0x8
JL 0x001335e0
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x168570]
LEA R9,[0x168970]
MOV R10D,0x3fc
LEA R11,[0x168d70]
LEA RBX,[0x168170]
LAB_00133571:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
ADD RSI,0x8
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x8
CMP RCX,0x7
JG 0x00133571
MOV EAX,EAX
LAB_001335e0:
CMP RSI,RDX
JZ 0x00133609
LEA RCX,[0x168170]
LAB_001335ec:
MOVZX EDI,AL
MOVZX R8D,byte ptr [RSI]
INC RSI
XOR R8D,EDI
MOV EDI,dword ptr [RCX + R8*0x4]
SHR RAX,0x8
XOR RAX,RDI
CMP RSI,RDX
JNZ 0x001335ec
LAB_00133609:
NOT EAX
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long) */
uint __thiscall
mysys_namespace::crc32c::crc32c_slow(crc32c *this,uint param_1,char *param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
uint *puVar4;
int4 in_register_00000034;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
puVar5 = (uint *)CONCAT44(in_register_00000034,param_1);
puVar4 = (uint *)(param_2 + (long)puVar5);
uVar2 = (ulong)~(uint)this;
puVar6 = (uint *)((ulong)((long)puVar5 + 0xfU) & 0xfffffffffffffff0);
puVar7 = puVar5;
if ((long)puVar6 - (long)puVar5 != 0 && puVar6 <= puVar4) {
do {
puVar8 = (uint *)((long)puVar7 + 1);
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar7 ^ (uint)uVar2 & 0xff) * 4);
puVar7 = puVar8;
} while (puVar8 != puVar6);
puVar5 = (uint *)((long)puVar5 + ((long)puVar6 - (long)puVar5));
puVar7 = puVar6;
}
lVar3 = (long)puVar4 - (long)puVar7;
if (0xf < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[2];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[3];
puVar5 = puVar5 + 4;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -0x10;
} while (0xf < lVar3);
uVar2 = (ulong)uVar1;
}
if (7 < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
puVar5 = puVar5 + 2;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -8;
} while (7 < lVar3);
uVar2 = (ulong)uVar1;
}
for (; puVar5 != puVar4; puVar5 = (uint *)((long)puVar5 + 1)) {
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar5 ^ (uint)uVar2 & 0xff) * 4);
}
return ~(uint)uVar2;
}
|
|
10,978 |
gguf_get_arr_n
|
monkey531[P]llama/ggml/src/gguf.cpp
|
size_t gguf_get_arr_n(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
if (ctx->kv[key_id].type == GGUF_TYPE_STRING) {
return ctx->kv[key_id].data_string.size();
}
const size_t type_size = gguf_type_size(ctx->kv[key_id].type);
GGML_ASSERT(ctx->kv[key_id].data.size() % type_size == 0);
return ctx->kv[key_id].data.size() / type_size;
}
|
O2
|
cpp
|
gguf_get_arr_n:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3ef74
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rcx, %rax
pushq $0x58
popq %rdi
cqto
idivq %rdi
cmpq %rsi, %rax
jle 0x3ef74
imulq $0x58, %rsi, %r14
movl 0x24(%rcx,%r14), %edi
cmpl $0x8, %edi
jne 0x3ef4c
addq %r14, %rcx
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
sarq $0x5, %rax
jmp 0x3ef6c
callq 0x1eb80
movq %rax, %rcx
movq 0x8(%rbx), %rdx
movq 0x30(%rdx,%r14), %rax
subq 0x28(%rdx,%r14), %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x3ef95
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b88a(%rip), %rdi # 0x5a805
leaq 0xc64b(%rip), %rdx # 0x4b5cd
leaq 0x1bd07(%rip), %rcx # 0x5ac90
movl $0x317, %esi # imm = 0x317
xorl %eax, %eax
callq 0x1e760
leaq 0x1b869(%rip), %rdi # 0x5a805
leaq 0xc62a(%rip), %rdx # 0x4b5cd
leaq 0x1bd88(%rip), %rcx # 0x5ad32
movl $0x31e, %esi # imm = 0x31E
jmp 0x3ef8e
|
gguf_get_arr_n:
push r14
push rbx
push rax
test rsi, rsi
js short loc_3EF74
mov rbx, rdi
mov rcx, [rdi+8]
mov rax, [rdi+10h]
sub rax, rcx
push 58h ; 'X'
pop rdi
cqo
idiv rdi
cmp rax, rsi
jle short loc_3EF74
imul r14, rsi, 58h ; 'X'
mov edi, [rcx+r14+24h]
cmp edi, 8
jnz short loc_3EF4C
add rcx, r14
mov rax, [rcx+48h]
sub rax, [rcx+40h]
sar rax, 5
jmp short loc_3EF6C
loc_3EF4C:
call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type)
mov rcx, rax
mov rdx, [rbx+8]
mov rax, [rdx+r14+30h]
sub rax, [rdx+r14+28h]
xor edx, edx
div rcx
test rdx, rdx
jnz short loc_3EF95
loc_3EF6C:
add rsp, 8
pop rbx
pop r14
retn
loc_3EF74:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 317h
loc_3EF8E:
xor eax, eax
call _ggml_abort
loc_3EF95:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdData; "ctx->kv[key_id].data.size() % type_size"...
mov esi, 31Eh
jmp short loc_3EF8E
|
long long gguf_get_arr_n(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
long long v16; // rcx
long long v17; // rax
long long v18; // r14
long long v19; // rdi
long long result; // rax
unsigned long long v21; // rax
unsigned long long v22; // rt2
const char *v23; // rcx
int v24; // esi
char v25; // [rsp-8h] [rbp-18h]
v25 = v14;
if ( a2 < 0 || (v16 = *(_QWORD *)(a1 + 8), v17 = *(_QWORD *)(a1 + 16) - v16, v17 / 88 <= a2) )
{
v23 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v24 = 791;
goto LABEL_8;
}
v18 = 88 * a2;
v19 = *(unsigned int *)(v16 + 88 * a2 + 36);
if ( (_DWORD)v19 == 8 )
return (long long)(*(_QWORD *)(v18 + v16 + 72) - *(_QWORD *)(v18 + v16 + 64)) >> 5;
v21 = gguf_type_size(v19, a2, v17 % 88);
v22 = (*(_QWORD *)(*(_QWORD *)(a1 + 8) + v18 + 48) - *(_QWORD *)(*(_QWORD *)(a1 + 8) + v18 + 40)) % v21;
result = (*(_QWORD *)(*(_QWORD *)(a1 + 8) + v18 + 48) - *(_QWORD *)(*(_QWORD *)(a1 + 8) + v18 + 40)) / v21;
if ( v22 )
{
v23 = "ctx->kv[key_id].data.size() % type_size == 0";
v24 = 798;
LABEL_8:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",
v24,
(long long)"GGML_ASSERT(%s) failed",
(long long)v23,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v25);
}
return result;
}
|
gguf_get_arr_n:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013ef74
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,RCX
PUSH 0x58
POP RDI
CQO
IDIV RDI
CMP RAX,RSI
JLE 0x0013ef74
IMUL R14,RSI,0x58
MOV EDI,dword ptr [RCX + R14*0x1 + 0x24]
CMP EDI,0x8
JNZ 0x0013ef4c
ADD RCX,R14
MOV RAX,qword ptr [RCX + 0x48]
SUB RAX,qword ptr [RCX + 0x40]
SAR RAX,0x5
JMP 0x0013ef6c
LAB_0013ef4c:
CALL 0x0011eb80
MOV RCX,RAX
MOV RDX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDX + R14*0x1 + 0x30]
SUB RAX,qword ptr [RDX + R14*0x1 + 0x28]
XOR EDX,EDX
DIV RCX
TEST RDX,RDX
JNZ 0x0013ef95
LAB_0013ef6c:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013ef74:
LEA RDI,[0x15a805]
LEA RDX,[0x14b5cd]
LEA RCX,[0x15ac90]
MOV ESI,0x317
LAB_0013ef8e:
XOR EAX,EAX
CALL 0x0011e760
LAB_0013ef95:
LEA RDI,[0x15a805]
LEA RDX,[0x14b5cd]
LEA RCX,[0x15ad32]
MOV ESI,0x31e
JMP 0x0013ef8e
|
ulong gguf_get_arr_n(long param_1,long param_2)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
char *pcVar6;
int8 uVar7;
long lVar8;
if (-1 < param_2) {
lVar2 = *(long *)(param_1 + 8);
lVar3 = *(long *)(param_1 + 0x10) - lVar2;
if (param_2 < lVar3 / 0x58) {
lVar8 = param_2 * 0x58;
iVar1 = *(int *)(lVar2 + 0x24 + lVar8);
if (iVar1 == 8) {
return *(long *)(lVar2 + lVar8 + 0x48) - *(long *)(lVar2 + lVar8 + 0x40) >> 5;
}
uVar4 = gguf_type_size(iVar1,param_2,lVar3 % 0x58);
uVar5 = *(long *)(*(long *)(param_1 + 8) + 0x30 + lVar8) -
*(long *)(*(long *)(param_1 + 8) + 0x28 + lVar8);
if (uVar5 % uVar4 == 0) {
return uVar5 / uVar4;
}
pcVar6 = "ctx->kv[key_id].data.size() % type_size == 0";
uVar7 = 0x31e;
goto LAB_0013ef8e;
}
}
pcVar6 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar7 = 0x317;
LAB_0013ef8e:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
|
|
10,979 |
js_bigint_to_string1
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_bigint_to_string1(JSContext *ctx, JSValue val, int radix)
{
JSValue ret;
bf_t a_s, *a;
char *str;
int saved_sign;
size_t len;
a = JS_ToBigInt(ctx, &a_s, val);
if (!a)
return JS_EXCEPTION;
saved_sign = a->sign;
if (a->expn == BF_EXP_ZERO)
a->sign = 0;
str = bf_ftoa(&len, a, radix, 0, BF_RNDZ | BF_FTOA_FORMAT_FRAC |
BF_FTOA_JS_QUIRKS);
a->sign = saved_sign;
JS_FreeBigInt(ctx, a, &a_s);
if (!str)
return JS_ThrowOutOfMemory(ctx);
ret = js_new_string8_len(ctx, str, len);
bf_free(ctx->bf_ctx, str);
return ret;
}
|
O1
|
c
|
js_bigint_to_string1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
cmpl $-0x9, %ecx
jb 0x3e30e
movq 0x10(%rsp), %rax
incl (%rax)
leaq 0x10(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x3e45b
movl $0x6, %ebx
testq %rax, %rax
je 0x3e3fe
movq %rax, %r12
movl 0x8(%rax), %ebx
xorl %eax, %eax
cmpq 0x10(%r12), %rax
jno 0x3e344
movl $0x0, 0x8(%r12)
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x410001, %r8d # imm = 0x410001
callq 0x89abc
movq %rax, %r15
movl %ebx, 0x8(%r12)
cmpq %r13, %r12
je 0x3e398
movq 0x18(%r14), %rdi
movl -0x8(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x8(%r12)
cmpl $0x1, %eax
movl $0x6, %ebx
jg 0x3e3b8
addq $-0x8, %r12
movq %r12, %rsi
movq $-0x9, %rdx
callq 0x21266
jmp 0x3e3b8
movq (%r12), %rax
testq %rax, %rax
movl $0x6, %ebx
je 0x3e3b8
movq 0x20(%r12), %rsi
testq %rsi, %rsi
je 0x3e3b8
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testq %r15, %r15
je 0x3e3f6
movl 0x8(%rsp), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x201dd
movq %rax, %r12
movq %rdx, %rbx
movq 0x1d0(%r14), %rax
movq (%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x8(%rax)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movl %r12d, %eax
jmp 0x3e402
movq %r14, %rdi
callq 0x1cb63
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_bigint_to_string1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
mov [rsp+68h+var_58], rsi
cmp ecx, 0FFFFFFF7h
jb short loc_3E30E
mov rax, [rsp+68h+var_58]
inc dword ptr [rax]
loc_3E30E:
lea r13, [rsp+68h+var_58]
mov rdi, r14
mov rsi, r13
call JS_ToBigIntFree
mov ebx, 6
test rax, rax
jz loc_3E3FE
mov r12, rax
mov ebx, [rax+8]
xor eax, eax
cmp rax, [r12+10h]
jno short loc_3E344
mov dword ptr [r12+8], 0
loc_3E344:
lea rdi, [rsp+68h+var_60]
mov rsi, r12
mov edx, ebp
xor ecx, ecx
mov r8d, 410001h
call bf_ftoa
mov r15, rax
mov [r12+8], ebx
cmp r12, r13
jz short loc_3E398
mov rdi, [r14+18h]
mov eax, [r12-8]
lea ecx, [rax-1]
mov [r12-8], ecx
cmp eax, 1
mov ebx, 6
jg short loc_3E3B8
add r12, 0FFFFFFFFFFFFFFF8h
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFF7h
call js_free_value_rt
jmp short loc_3E3B8
loc_3E398:
mov rax, [r12]
test rax, rax
mov ebx, 6
jz short loc_3E3B8
mov rsi, [r12+20h]
test rsi, rsi
jz short loc_3E3B8
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_3E3B8:
test r15, r15
jz short loc_3E3F6
mov edx, [rsp+68h+var_60]
mov rdi, r14
mov rsi, r15
call js_new_string8_len
mov r12, rax
mov rbx, rdx
mov rax, [r14+1D0h]
mov rdi, [rax]
mov rsi, r15
xor edx, edx
call qword ptr [rax+8]
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov eax, r12d
jmp short loc_3E402
loc_3E3F6:
mov rdi, r14
call JS_ThrowOutOfMemory
loc_3E3FE:
xor eax, eax
xor ecx, ecx
loc_3E402:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_bigint_to_string1(long long a1, long long a2, unsigned int a3, unsigned int a4)
{
long long v6; // rax
_QWORD *v7; // r12
int v8; // ebx
long long v9; // rsi
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // r15
long long v15; // rdi
int v16; // eax
long long v17; // r12
unsigned long long v18; // rcx
long long v19; // rax
unsigned int v21; // [rsp+8h] [rbp-60h] BYREF
_QWORD v22[11]; // [rsp+10h] [rbp-58h] BYREF
v22[0] = a2;
if ( a3 >= 0xFFFFFFF7 )
++*(_DWORD *)v22[0];
v6 = JS_ToBigIntFree(a1, v22);
if ( !v6 )
goto LABEL_15;
v7 = (_QWORD *)v6;
v8 = *(_DWORD *)(v6 + 8);
if ( __OFSUB__(0LL, *(_QWORD *)(v6 + 16)) )
*(_DWORD *)(v6 + 8) = 0;
v9 = v6;
v14 = bf_ftoa(&v21, v6, a4, 0LL, 4259841LL);
*((_DWORD *)v7 + 2) = v8;
if ( v7 == v22 )
{
if ( *v7 )
{
v9 = v7[4];
if ( v9 )
(*(void ( **)(_QWORD, long long, _QWORD))(*v7 + 8LL))(*(_QWORD *)*v7, v9, 0LL);
}
}
else
{
v15 = *(_QWORD *)(a1 + 24);
v16 = *((_DWORD *)v7 - 2);
v11 = v16 - 1;
*((_DWORD *)v7 - 2) = v16 - 1;
if ( v16 <= 1 )
{
v9 = (long long)(v7 - 1);
js_free_value_rt(v15, v7 - 1, -9);
}
}
if ( !v14 )
{
JS_ThrowOutOfMemory(a1, v9, v10, v11, v12, v13);
LABEL_15:
v19 = 0LL;
v18 = 0LL;
return v18 | v19;
}
v17 = js_new_string8_len(a1, v14, v21);
(*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)(a1 + 464) + 8LL))(**(_QWORD **)(a1 + 464), v14, 0LL);
v18 = v17 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v17;
return v18 | v19;
}
|
js_bigint_to_string1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x10],RSI
CMP ECX,-0x9
JC 0x0013e30e
MOV RAX,qword ptr [RSP + 0x10]
INC dword ptr [RAX]
LAB_0013e30e:
LEA R13,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R13
CALL 0x0013e45b
MOV EBX,0x6
TEST RAX,RAX
JZ 0x0013e3fe
MOV R12,RAX
MOV EBX,dword ptr [RAX + 0x8]
XOR EAX,EAX
CMP RAX,qword ptr [R12 + 0x10]
JNO 0x0013e344
MOV dword ptr [R12 + 0x8],0x0
LAB_0013e344:
LEA RDI,[RSP + 0x8]
MOV RSI,R12
MOV EDX,EBP
XOR ECX,ECX
MOV R8D,0x410001
CALL 0x00189abc
MOV R15,RAX
MOV dword ptr [R12 + 0x8],EBX
CMP R12,R13
JZ 0x0013e398
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R12 + -0x8]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12 + -0x8],ECX
CMP EAX,0x1
MOV EBX,0x6
JG 0x0013e3b8
ADD R12,-0x8
MOV RSI,R12
MOV RDX,-0x9
CALL 0x00121266
JMP 0x0013e3b8
LAB_0013e398:
MOV RAX,qword ptr [R12]
TEST RAX,RAX
MOV EBX,0x6
JZ 0x0013e3b8
MOV RSI,qword ptr [R12 + 0x20]
TEST RSI,RSI
JZ 0x0013e3b8
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0013e3b8:
TEST R15,R15
JZ 0x0013e3f6
MOV EDX,dword ptr [RSP + 0x8]
MOV RDI,R14
MOV RSI,R15
CALL 0x001201dd
MOV R12,RAX
MOV RBX,RDX
MOV RAX,qword ptr [R14 + 0x1d0]
MOV RDI,qword ptr [RAX]
MOV RSI,R15
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV RCX,-0x100000000
AND RCX,R12
MOV EAX,R12D
JMP 0x0013e402
LAB_0013e3f6:
MOV RDI,R14
CALL 0x0011cb63
LAB_0013e3fe:
XOR EAX,EAX
XOR ECX,ECX
LAB_0013e402:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0013e33b) */
int1 [16] js_bigint_to_string1(long param_1,int *param_2,uint param_3,int4 param_4)
{
int4 uVar1;
int iVar2;
int *piVar3;
int **ppiVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
int8 uVar8;
int1 auVar9 [16];
int4 local_60 [2];
int *local_58 [5];
if (0xfffffff6 < param_3) {
*param_2 = *param_2 + 1;
}
local_58[0] = param_2;
ppiVar4 = (int **)JS_ToBigIntFree(param_1,local_58,param_2);
if (ppiVar4 != (int **)0x0) {
uVar1 = *(int4 *)(ppiVar4 + 1);
lVar5 = bf_ftoa(local_60,ppiVar4,param_4,0,0x410001);
*(int4 *)(ppiVar4 + 1) = uVar1;
if (ppiVar4 == local_58) {
piVar3 = *ppiVar4;
if ((piVar3 != (int *)0x0) && (ppiVar4[4] != (int *)0x0)) {
(**(code **)(piVar3 + 2))(*(int8 *)piVar3,ppiVar4[4],0);
}
}
else {
uVar8 = *(int8 *)(param_1 + 0x18);
iVar2 = *(int *)(ppiVar4 + -1);
*(int *)(ppiVar4 + -1) = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar8,ppiVar4 + -1,0xfffffffffffffff7);
}
}
if (lVar5 != 0) {
auVar9 = js_new_string8_len(param_1,lVar5,local_60[0]);
uVar8 = auVar9._8_8_;
(*(code *)(*(int8 **)(param_1 + 0x1d0))[1])(**(int8 **)(param_1 + 0x1d0),lVar5,0);
uVar7 = auVar9._0_8_ & 0xffffffff00000000;
uVar6 = auVar9._0_8_ & 0xffffffff;
goto LAB_0013e402;
}
JS_ThrowOutOfMemory(param_1);
}
uVar8 = 6;
uVar6 = 0;
uVar7 = 0;
LAB_0013e402:
auVar9._0_8_ = uVar6 | uVar7;
auVar9._8_8_ = uVar8;
return auVar9;
}
|
|
10,980 |
js_bigint_to_string1
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_bigint_to_string1(JSContext *ctx, JSValue val, int radix)
{
JSValue ret;
bf_t a_s, *a;
char *str;
int saved_sign;
size_t len;
a = JS_ToBigInt(ctx, &a_s, val);
if (!a)
return JS_EXCEPTION;
saved_sign = a->sign;
if (a->expn == BF_EXP_ZERO)
a->sign = 0;
str = bf_ftoa(&len, a, radix, 0, BF_RNDZ | BF_FTOA_FORMAT_FRAC |
BF_FTOA_JS_QUIRKS);
a->sign = saved_sign;
JS_FreeBigInt(ctx, a, &a_s);
if (!str)
return JS_ThrowOutOfMemory(ctx);
ret = js_new_string8_len(ctx, str, len);
bf_free(ctx->bf_ctx, str);
return ret;
}
|
O2
|
c
|
js_bigint_to_string1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x10(%rsp), %rsi
callq 0x36a4c
pushq $0x6
popq %rbx
testq %rax, %rax
je 0x36a33
movq %rax, %r15
movl 0x8(%rax), %r13d
xorl %eax, %eax
cmpq 0x10(%r15), %rax
jno 0x369bf
andl $0x0, 0x8(%r15)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x410001, %r8d # imm = 0x410001
callq 0x73479
movq %rax, %r12
movl %r13d, 0x8(%r15)
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x36a55
testq %r12, %r12
je 0x36a2b
movl 0x8(%rsp), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1a4e8
movq %rax, %r15
movq %rdx, %rbx
movq 0x1d0(%r14), %rax
movq (%rax), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq *0x8(%rax)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r15, %rcx
movl %r15d, %eax
jmp 0x36a37
movq %r14, %rdi
callq 0x171e0
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_bigint_to_string1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
lea rsi, [rsp+68h+var_58]
call JS_ToBigInt
push 6
pop rbx
test rax, rax
jz loc_36A33
mov r15, rax
mov r13d, [rax+8]
xor eax, eax
cmp rax, [r15+10h]
jno short loc_369BF
and dword ptr [r15+8], 0
loc_369BF:
lea rdi, [rsp+68h+var_60]
mov rsi, r15
mov edx, ebp
xor ecx, ecx
mov r8d, 410001h
call bf_ftoa
mov r12, rax
mov [r15+8], r13d
lea rdx, [rsp+68h+var_58]
mov rdi, r14
mov rsi, r15
call JS_FreeBigInt
test r12, r12
jz short loc_36A2B
mov edx, [rsp+68h+var_60]
mov rdi, r14
mov rsi, r12
call js_new_string8_len
mov r15, rax
mov rbx, rdx
mov rax, [r14+1D0h]
mov rdi, [rax]
mov rsi, r12
xor edx, edx
call qword ptr [rax+8]
mov rcx, 0FFFFFFFF00000000h
and rcx, r15
mov eax, r15d
jmp short loc_36A37
loc_36A2B:
mov rdi, r14
call JS_ThrowOutOfMemory
loc_36A33:
xor eax, eax
xor ecx, ecx
loc_36A37:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_bigint_to_string1(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v5; // rax
long long v6; // r15
int v7; // r13d
long long v8; // r12
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long v13; // r15
unsigned long long v14; // rcx
long long v15; // rax
unsigned int v17; // [rsp+8h] [rbp-60h] BYREF
_BYTE v18[88]; // [rsp+10h] [rbp-58h] BYREF
v5 = JS_ToBigInt(a1, v18, a2, a3);
if ( !v5 )
goto LABEL_7;
v6 = v5;
v7 = *(_DWORD *)(v5 + 8);
if ( __OFSUB__(0LL, *(_QWORD *)(v5 + 16)) )
*(_DWORD *)(v5 + 8) = 0;
v8 = bf_ftoa(&v17, v5, a4, 0LL, 4259841LL);
*(_DWORD *)(v6 + 8) = v7;
JS_FreeBigInt(a1, v6, v18);
if ( !v8 )
{
JS_ThrowOutOfMemory(a1, v6, v9, v10, v11, v12);
LABEL_7:
v15 = 0LL;
v14 = 0LL;
return v14 | v15;
}
v13 = js_new_string8_len(a1, v8, v17);
(*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)(a1 + 464) + 8LL))(**(_QWORD **)(a1 + 464), v8, 0LL);
v14 = v13 & 0xFFFFFFFF00000000LL;
v15 = (unsigned int)v13;
return v14 | v15;
}
|
js_bigint_to_string1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x10]
CALL 0x00136a4c
PUSH 0x6
POP RBX
TEST RAX,RAX
JZ 0x00136a33
MOV R15,RAX
MOV R13D,dword ptr [RAX + 0x8]
XOR EAX,EAX
CMP RAX,qword ptr [R15 + 0x10]
JNO 0x001369bf
AND dword ptr [R15 + 0x8],0x0
LAB_001369bf:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV EDX,EBP
XOR ECX,ECX
MOV R8D,0x410001
CALL 0x00173479
MOV R12,RAX
MOV dword ptr [R15 + 0x8],R13D
LEA RDX,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00136a55
TEST R12,R12
JZ 0x00136a2b
MOV EDX,dword ptr [RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
CALL 0x0011a4e8
MOV R15,RAX
MOV RBX,RDX
MOV RAX,qword ptr [R14 + 0x1d0]
MOV RDI,qword ptr [RAX]
MOV RSI,R12
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV RCX,-0x100000000
AND RCX,R15
MOV EAX,R15D
JMP 0x00136a37
LAB_00136a2b:
MOV RDI,R14
CALL 0x001171e0
LAB_00136a33:
XOR EAX,EAX
XOR ECX,ECX
LAB_00136a37:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001369ba) */
int1 [16]
js_bigint_to_string1(long param_1,int8 param_2,int8 param_3,int4 param_4)
{
int4 uVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
int4 local_60 [2];
int1 local_58 [40];
lVar2 = JS_ToBigInt(param_1,local_58,param_2,param_3);
uVar6 = 6;
if (lVar2 != 0) {
uVar1 = *(int4 *)(lVar2 + 8);
lVar3 = bf_ftoa(local_60,lVar2,param_4,0,0x410001);
*(int4 *)(lVar2 + 8) = uVar1;
JS_FreeBigInt(param_1,lVar2,local_58);
if (lVar3 != 0) {
auVar7 = js_new_string8_len(param_1,lVar3,local_60[0]);
uVar6 = auVar7._8_8_;
(*(code *)(*(int8 **)(param_1 + 0x1d0))[1])(**(int8 **)(param_1 + 0x1d0),lVar3,0);
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
uVar4 = auVar7._0_8_ & 0xffffffff;
goto LAB_00136a37;
}
JS_ThrowOutOfMemory(param_1);
}
uVar4 = 0;
uVar5 = 0;
LAB_00136a37:
auVar7._0_8_ = uVar4 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
|
|
10,981 |
getTableName
|
eloqsql/client/mysqldump.c
|
static char *getTableName(int reset, int want_sequences)
{
MYSQL_ROW row;
if (!get_table_name_result)
{
if (mysql_get_server_version(mysql) >= FIRST_SEQUENCE_VERSION)
{
const char *query= "SHOW FULL TABLES";
if (mysql_query_with_error_report(mysql, 0, query))
return (NULL);
if (!(get_table_name_result= mysql_store_result(mysql)))
return (NULL);
}
else
{
if (!(get_table_name_result= mysql_list_tables(mysql,NullS)))
return(NULL);
}
}
if ((row= mysql_fetch_row(get_table_name_result)))
{
if (want_sequences != DUMP_TABLE_ALL)
while (row && MY_TEST(strcmp(row[1], "SEQUENCE")) == want_sequences)
row= mysql_fetch_row(get_table_name_result);
if (row)
return((char*) row[0]);
}
if (reset)
mysql_data_seek(get_table_name_result,0); /* We want to read again */
else
{
mysql_free_result(get_table_name_result);
get_table_name_result= NULL;
}
return(NULL);
}
|
O0
|
c
|
getTableName:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpq $0x0, 0x3c1cfa(%rip) # 0x4018d0
jne 0x3fc77
movq 0x3c18e5(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0x187cc, %rax # imm = 0x187CC
jb 0x3fc49
leaq 0x9cafa(%rip), %rax # 0xdc6f1
movq %rax, -0x20(%rbp)
movq 0x3c18c6(%rip), %rdi # 0x4014c8
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x39350
cmpl $0x0, %eax
je 0x3fc21
movq $0x0, -0x8(%rbp)
jmp 0x3fd37
movq 0x3c18a0(%rip), %rdi # 0x4014c8
callq 0x514c0
movq %rax, 0x3c1c9c(%rip) # 0x4018d0
cmpq $0x0, %rax
jne 0x3fc47
movq $0x0, -0x8(%rbp)
jmp 0x3fd37
jmp 0x3fc75
movq 0x3c1878(%rip), %rdi # 0x4014c8
xorl %eax, %eax
movl %eax, %esi
callq 0x51c70
movq %rax, 0x3c1c70(%rip) # 0x4018d0
cmpq $0x0, %rax
jne 0x3fc73
movq $0x0, -0x8(%rbp)
jmp 0x3fd37
jmp 0x3fc75
jmp 0x3fc77
movq 0x3c1c52(%rip), %rdi # 0x4018d0
callq 0x51800
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3fd00
cmpl $-0x1, -0x10(%rbp)
je 0x3fcea
jmp 0x3fc95
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x21(%rbp)
je 0x3fccd
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x98592(%rip), %rsi # 0xd8242
callq 0x38880
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cmpl -0x10(%rbp), %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x3fcd6
jmp 0x3fce8
movq 0x3c1bf3(%rip), %rdi # 0x4018d0
callq 0x51800
movq %rax, -0x18(%rbp)
jmp 0x3fc95
jmp 0x3fcea
cmpq $0x0, -0x18(%rbp)
je 0x3fcfe
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3fd37
jmp 0x3fd00
cmpl $0x0, -0xc(%rbp)
je 0x3fd18
movq 0x3c1bc3(%rip), %rdi # 0x4018d0
xorl %eax, %eax
movl %eax, %esi
callq 0x51a80
jmp 0x3fd2f
movq 0x3c1bb1(%rip), %rdi # 0x4018d0
callq 0x48d00
movq $0x0, 0x3c1ba1(%rip) # 0x4018d0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
getTableName:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_C], edi
mov [rbp+var_10], esi
cmp cs:get_table_name_result, 0
jnz loc_3FC77
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 187CCh
jb short loc_3FC49
lea rax, aShowFullTables; "SHOW FULL TABLES"
mov [rbp+var_20], rax
mov rdi, cs:mysql
mov rdx, [rbp+var_20]
xor eax, eax
mov esi, eax
call mysql_query_with_error_report
cmp eax, 0
jz short loc_3FC21
mov [rbp+var_8], 0
jmp loc_3FD37
loc_3FC21:
mov rdi, cs:mysql
call mysql_store_result
mov cs:get_table_name_result, rax
cmp rax, 0
jnz short loc_3FC47
mov [rbp+var_8], 0
jmp loc_3FD37
loc_3FC47:
jmp short loc_3FC75
loc_3FC49:
mov rdi, cs:mysql
xor eax, eax
mov esi, eax
call mysql_list_tables
mov cs:get_table_name_result, rax
cmp rax, 0
jnz short loc_3FC73
mov [rbp+var_8], 0
jmp loc_3FD37
loc_3FC73:
jmp short $+2
loc_3FC75:
jmp short $+2
loc_3FC77:
mov rdi, cs:get_table_name_result
call mysql_fetch_row
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_3FD00
cmp [rbp+var_10], 0FFFFFFFFh
jz short loc_3FCEA
jmp short $+2
loc_3FC95:
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_21], al
jz short loc_3FCCD
mov rax, [rbp+var_18]
mov rdi, [rax+8]
lea rsi, aSequence; "SEQUENCE"
call _strcmp
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
cmp eax, [rbp+var_10]
setz al
mov [rbp+var_21], al
loc_3FCCD:
mov al, [rbp+var_21]
test al, 1
jnz short loc_3FCD6
jmp short loc_3FCE8
loc_3FCD6:
mov rdi, cs:get_table_name_result
call mysql_fetch_row
mov [rbp+var_18], rax
jmp short loc_3FC95
loc_3FCE8:
jmp short $+2
loc_3FCEA:
cmp [rbp+var_18], 0
jz short loc_3FCFE
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_3FD37
loc_3FCFE:
jmp short $+2
loc_3FD00:
cmp [rbp+var_C], 0
jz short loc_3FD18
mov rdi, cs:get_table_name_result
xor eax, eax
mov esi, eax
call mysql_data_seek
jmp short loc_3FD2F
loc_3FD18:
mov rdi, cs:get_table_name_result
call mysql_free_result
mov cs:get_table_name_result, 0
loc_3FD2F:
mov [rbp+var_8], 0
loc_3FD37:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long getTableName(int a1, int a2, double a3)
{
bool v4; // [rsp+Fh] [rbp-21h]
_QWORD *row; // [rsp+18h] [rbp-18h]
if ( !get_table_name_result )
{
if ( (unsigned long long)mysql_get_server_version(mysql, a3) < 0x187CC )
{
get_table_name_result = mysql_list_tables(mysql, 0LL);
if ( !get_table_name_result )
return 0LL;
}
else
{
if ( (unsigned int)mysql_query_with_error_report(mysql, 0LL, (long long)"SHOW FULL TABLES") )
return 0LL;
get_table_name_result = mysql_store_result(mysql);
if ( !get_table_name_result )
return 0LL;
}
}
row = (_QWORD *)mysql_fetch_row(get_table_name_result);
if ( !row )
goto LABEL_18;
if ( a2 != -1 )
{
while ( 1 )
{
v4 = 0;
if ( row )
v4 = ((unsigned int)strcmp(row[1], "SEQUENCE") != 0) == a2;
if ( !v4 )
break;
row = (_QWORD *)mysql_fetch_row(get_table_name_result);
}
}
if ( row )
return *row;
LABEL_18:
if ( a1 )
{
mysql_data_seek(get_table_name_result, 0LL);
}
else
{
mysql_free_result(get_table_name_result);
get_table_name_result = 0LL;
}
return 0LL;
}
|
getTableName:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0xc],EDI
MOV dword ptr [RBP + -0x10],ESI
CMP qword ptr [0x005018d0],0x0
JNZ 0x0013fc77
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0x187cc
JC 0x0013fc49
LEA RAX,[0x1dc6f1]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [0x005014c8]
MOV RDX,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00139350
CMP EAX,0x0
JZ 0x0013fc21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013fd37
LAB_0013fc21:
MOV RDI,qword ptr [0x005014c8]
CALL 0x001514c0
MOV qword ptr [0x005018d0],RAX
CMP RAX,0x0
JNZ 0x0013fc47
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013fd37
LAB_0013fc47:
JMP 0x0013fc75
LAB_0013fc49:
MOV RDI,qword ptr [0x005014c8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00151c70
MOV qword ptr [0x005018d0],RAX
CMP RAX,0x0
JNZ 0x0013fc73
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013fd37
LAB_0013fc73:
JMP 0x0013fc75
LAB_0013fc75:
JMP 0x0013fc77
LAB_0013fc77:
MOV RDI,qword ptr [0x005018d0]
CALL 0x00151800
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x0013fd00
CMP dword ptr [RBP + -0x10],-0x1
JZ 0x0013fcea
JMP 0x0013fc95
LAB_0013fc95:
XOR EAX,EAX
CMP qword ptr [RBP + -0x18],0x0
MOV byte ptr [RBP + -0x21],AL
JZ 0x0013fccd
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[0x1d8242]
CALL 0x00138880
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
CMP EAX,dword ptr [RBP + -0x10]
SETZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_0013fccd:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x0013fcd6
JMP 0x0013fce8
LAB_0013fcd6:
MOV RDI,qword ptr [0x005018d0]
CALL 0x00151800
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013fc95
LAB_0013fce8:
JMP 0x0013fcea
LAB_0013fcea:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013fcfe
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013fd37
LAB_0013fcfe:
JMP 0x0013fd00
LAB_0013fd00:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0013fd18
MOV RDI,qword ptr [0x005018d0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00151a80
JMP 0x0013fd2f
LAB_0013fd18:
MOV RDI,qword ptr [0x005018d0]
CALL 0x00148d00
MOV qword ptr [0x005018d0],0x0
LAB_0013fd2f:
MOV qword ptr [RBP + -0x8],0x0
LAB_0013fd37:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 getTableName(int param_1,uint param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
int8 *local_20;
if (get_table_name_result == 0) {
uVar2 = mysql_get_server_version(mysql);
if (uVar2 < 0x187cc) {
get_table_name_result = mysql_list_tables(mysql,0);
if (get_table_name_result == 0) {
return 0;
}
}
else {
iVar1 = mysql_query_with_error_report(mysql,0,"SHOW FULL TABLES");
if (iVar1 != 0) {
return 0;
}
get_table_name_result = mysql_store_result(mysql);
if (get_table_name_result == 0) {
return 0;
}
}
}
local_20 = (int8 *)mysql_fetch_row(get_table_name_result);
if (local_20 != (int8 *)0x0) {
if (param_2 != 0xffffffff) {
while( true ) {
bVar3 = false;
if (local_20 != (int8 *)0x0) {
iVar1 = strcmp((char *)local_20[1],"SEQUENCE");
bVar3 = (iVar1 != 0) == param_2;
}
if (!bVar3) break;
local_20 = (int8 *)mysql_fetch_row(get_table_name_result);
}
}
if (local_20 != (int8 *)0x0) {
return *local_20;
}
}
if (param_1 == 0) {
mysql_free_result(get_table_name_result);
get_table_name_result = 0;
}
else {
mysql_data_seek(get_table_name_result,0);
}
return 0;
}
|
|
10,982 |
host_set_storage
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmone_storage_status host_set_storage(void* context, const evmc_address* addr, const evmc_bytes32* key, const evmc_bytes32* value) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("set_storage for account", addr);
debug_print_bytes32("set_storage key", key);
debug_print_bytes32("set_storage value", value);
evmc_bytes32 current_value = host_get_storage(context, addr, key);
bool created_account = false;
bool created_storage = false;
if (memcmp(current_value.bytes, value->bytes, 32) == 0) {
EVM_LOG("set_storage: UNCHANGED");
return EVMONE_STORAGE_UNCHANGED;
}
set_changed_storage(ctx, addr->bytes, key->bytes, value->bytes, &created_account, &created_storage);
if (created_account) {
EVM_LOG("set_storage: ADDED (created account)");
return EVMONE_STORAGE_ADDED;
}
if (bytes_all_zero(bytes(value->bytes, 32))) {
EVM_LOG("set_storage: DELETED");
return EVMONE_STORAGE_DELETED;
}
if (!created_storage) {
EVM_LOG("set_storage: MODIFIED_AGAIN");
return EVMONE_STORAGE_MODIFIED_AGAIN;
}
if (created_storage && bytes_all_zero(bytes(current_value.bytes, 32))) {
EVM_LOG("set_storage: ADDED (created storage)");
return EVMONE_STORAGE_ADDED;
}
EVM_LOG("set_storage: MODIFIED");
return EVMONE_STORAGE_MODIFIED;
}
|
O0
|
c
|
host_set_storage:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
leaq 0xafbed(%rip), %rdi # 0xdd90b
callq 0x2db70
movq -0x20(%rbp), %rsi
leaq 0xafbf5(%rip), %rdi # 0xdd923
callq 0x2db80
movq -0x28(%rbp), %rsi
leaq 0xafbf5(%rip), %rdi # 0xdd933
callq 0x2db80
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x50(%rbp), %rdi
callq 0x2dc20
movb $0x0, -0x51(%rbp)
movb $0x0, -0x52(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x20, %edx
callq 0x23540
cmpl $0x0, %eax
jne 0x2dd87
jmp 0x2dd79
jmp 0x2dd7b
movl $0x0, -0x4(%rbp)
jmp 0x2de3e
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x51(%rbp), %r8
leaq -0x52(%rbp), %r9
callq 0x2e940
testb $0x1, -0x51(%rbp)
je 0x2ddba
jmp 0x2ddac
jmp 0x2ddae
movl $0x3, -0x4(%rbp)
jmp 0x2de3e
movl $0x20, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
xorl %edx, %edx
callq 0x9e340
testb $0x1, %al
jne 0x2dddd
jmp 0x2ddea
jmp 0x2dddf
jmp 0x2dde1
movl $0x4, -0x4(%rbp)
jmp 0x2de3e
testb $0x1, -0x52(%rbp)
jne 0x2ddfd
jmp 0x2ddf2
jmp 0x2ddf4
movl $0x2, -0x4(%rbp)
jmp 0x2de3e
testb $0x1, -0x52(%rbp)
je 0x2de33
movl $0x20, -0x78(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x78(%rbp), %edi
movq -0x70(%rbp), %rsi
xorl %edx, %edx
callq 0x9e340
testb $0x1, %al
jne 0x2de26
jmp 0x2de33
jmp 0x2de28
jmp 0x2de2a
movl $0x3, -0x4(%rbp)
jmp 0x2de3e
jmp 0x2de35
jmp 0x2de37
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
host_set_storage:
push rbp
mov rbp, rsp
sub rsp, 80h
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 [rbp+var_30], rax
mov rsi, [rbp+var_18]
lea rdi, aSetStorageForA; "set_storage for account"
call debug_print_address
mov rsi, [rbp+var_20]
lea rdi, aSetStorageKey; "set_storage key"
call debug_print_bytes32
mov rsi, [rbp+var_28]
lea rdi, aSetStorageValu; "set_storage value"
call debug_print_bytes32
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_50]
call host_get_storage
mov [rbp+var_51], 0
mov [rbp+var_52], 0
lea rdi, [rbp+var_50]
mov rsi, [rbp+var_28]
mov edx, 20h ; ' '
call _memcmp
cmp eax, 0
jnz short loc_2DD87
jmp short $+2
loc_2DD79:
jmp short $+2
loc_2DD7B:
mov [rbp+var_4], 0
jmp loc_2DE3E
loc_2DD87:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
lea r8, [rbp+var_51]
lea r9, [rbp+var_52]
call set_changed_storage
test [rbp+var_51], 1
jz short loc_2DDBA
jmp short $+2
loc_2DDAC:
jmp short $+2
loc_2DDAE:
mov [rbp+var_4], 3
jmp loc_2DE3E
loc_2DDBA:
mov [rbp+var_68], 20h ; ' '
mov rax, [rbp+var_28]
mov [rbp+var_60], rax
mov edi, [rbp+var_68]
mov rsi, [rbp+var_60]
xor edx, edx
call bytes_all_equal
test al, 1
jnz short loc_2DDDD
jmp short loc_2DDEA
loc_2DDDD:
jmp short $+2
loc_2DDDF:
jmp short $+2
loc_2DDE1:
mov [rbp+var_4], 4
jmp short loc_2DE3E
loc_2DDEA:
test [rbp+var_52], 1
jnz short loc_2DDFD
jmp short $+2
loc_2DDF2:
jmp short $+2
loc_2DDF4:
mov [rbp+var_4], 2
jmp short loc_2DE3E
loc_2DDFD:
test [rbp+var_52], 1
jz short loc_2DE33
mov [rbp+var_78], 20h ; ' '
lea rax, [rbp+var_50]
mov [rbp+var_70], rax
mov edi, [rbp+var_78]
mov rsi, [rbp+var_70]
xor edx, edx
call bytes_all_equal
test al, 1
jnz short loc_2DE26
jmp short loc_2DE33
loc_2DE26:
jmp short $+2
loc_2DE28:
jmp short $+2
loc_2DE2A:
mov [rbp+var_4], 3
jmp short loc_2DE3E
loc_2DE33:
jmp short $+2
loc_2DE35:
jmp short $+2
loc_2DE37:
mov [rbp+var_4], 1
loc_2DE3E:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long host_set_storage(long long a1, long long a2, long long a3, long long a4)
{
char v5; // [rsp+2Eh] [rbp-52h] BYREF
char v6; // [rsp+2Fh] [rbp-51h] BYREF
_QWORD v7[4]; // [rsp+30h] [rbp-50h] BYREF
long long v8; // [rsp+50h] [rbp-30h]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
long long v11; // [rsp+68h] [rbp-18h]
long long v12; // [rsp+70h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v8 = a1;
debug_print_address();
debug_print_bytes32();
debug_print_bytes32();
host_get_storage(v7, a1, a2, v10);
v6 = 0;
v5 = 0;
if ( !(unsigned int)memcmp(v7, v9, 32LL) )
{
return 0;
}
else
{
set_changed_storage(v8, v11, v10, v9, &v6, &v5);
if ( (v6 & 1) != 0 )
{
return 3;
}
else if ( (bytes_all_equal(32LL, v9, 0LL) & 1) != 0 )
{
return 4;
}
else if ( (v5 & 1) != 0 )
{
if ( (bytes_all_equal(32LL, v7, 0LL) & 1) != 0 )
return 3;
else
return 1;
}
else
{
return 2;
}
}
}
|
host_set_storage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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 qword ptr [RBP + -0x30],RAX
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x1dd90b]
CALL 0x0012db70
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x1dd923]
CALL 0x0012db80
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0x1dd933]
CALL 0x0012db80
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x50]
CALL 0x0012dc20
MOV byte ptr [RBP + -0x51],0x0
MOV byte ptr [RBP + -0x52],0x0
LEA RDI,[RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0x20
CALL 0x00123540
CMP EAX,0x0
JNZ 0x0012dd87
JMP 0x0012dd79
LAB_0012dd79:
JMP 0x0012dd7b
LAB_0012dd7b:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0012de3e
LAB_0012dd87:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
LEA R8,[RBP + -0x51]
LEA R9,[RBP + -0x52]
CALL 0x0012e940
TEST byte ptr [RBP + -0x51],0x1
JZ 0x0012ddba
JMP 0x0012ddac
LAB_0012ddac:
JMP 0x0012ddae
LAB_0012ddae:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0012de3e
LAB_0012ddba:
MOV dword ptr [RBP + -0x68],0x20
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x60],RAX
MOV EDI,dword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x60]
XOR EDX,EDX
CALL 0x0019e340
TEST AL,0x1
JNZ 0x0012dddd
JMP 0x0012ddea
LAB_0012dddd:
JMP 0x0012dddf
LAB_0012dddf:
JMP 0x0012dde1
LAB_0012dde1:
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0012de3e
LAB_0012ddea:
TEST byte ptr [RBP + -0x52],0x1
JNZ 0x0012ddfd
JMP 0x0012ddf2
LAB_0012ddf2:
JMP 0x0012ddf4
LAB_0012ddf4:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0012de3e
LAB_0012ddfd:
TEST byte ptr [RBP + -0x52],0x1
JZ 0x0012de33
MOV dword ptr [RBP + -0x78],0x20
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x70],RAX
MOV EDI,dword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x70]
XOR EDX,EDX
CALL 0x0019e340
TEST AL,0x1
JNZ 0x0012de26
JMP 0x0012de33
LAB_0012de26:
JMP 0x0012de28
LAB_0012de28:
JMP 0x0012de2a
LAB_0012de2a:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0012de3e
LAB_0012de33:
JMP 0x0012de35
LAB_0012de35:
JMP 0x0012de37
LAB_0012de37:
MOV dword ptr [RBP + -0x4],0x1
LAB_0012de3e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4 host_set_storage(int8 param_1,int8 param_2,int8 param_3,void *param_4)
{
int iVar1;
ulong uVar2;
byte local_5a;
byte local_59;
int1 local_58 [32];
int8 local_38;
void *local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_c;
local_38 = param_1;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
debug_print_address("set_storage for account",param_2);
debug_print_bytes32("set_storage key",local_28);
debug_print_bytes32("set_storage value",local_30);
host_get_storage(local_58,local_18,local_20,local_28);
local_59 = 0;
local_5a = 0;
iVar1 = memcmp(local_58,local_30,0x20);
if (iVar1 == 0) {
local_c = 0;
}
else {
set_changed_storage(local_38,local_20,local_28,local_30,&local_59,&local_5a);
if ((local_59 & 1) == 0) {
uVar2 = bytes_all_equal(0x20,local_30,0);
if ((uVar2 & 1) == 0) {
if ((local_5a & 1) == 0) {
local_c = 2;
}
else if (((local_5a & 1) == 0) ||
(uVar2 = bytes_all_equal(0x20,local_58,0), (uVar2 & 1) == 0)) {
local_c = 1;
}
else {
local_c = 3;
}
}
else {
local_c = 4;
}
}
else {
local_c = 3;
}
}
return local_c;
}
|
|
10,983 |
host_set_storage
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmone_storage_status host_set_storage(void* context, const evmc_address* addr, const evmc_bytes32* key, const evmc_bytes32* value) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("set_storage for account", addr);
debug_print_bytes32("set_storage key", key);
debug_print_bytes32("set_storage value", value);
evmc_bytes32 current_value = host_get_storage(context, addr, key);
bool created_account = false;
bool created_storage = false;
if (memcmp(current_value.bytes, value->bytes, 32) == 0) {
EVM_LOG("set_storage: UNCHANGED");
return EVMONE_STORAGE_UNCHANGED;
}
set_changed_storage(ctx, addr->bytes, key->bytes, value->bytes, &created_account, &created_storage);
if (created_account) {
EVM_LOG("set_storage: ADDED (created account)");
return EVMONE_STORAGE_ADDED;
}
if (bytes_all_zero(bytes(value->bytes, 32))) {
EVM_LOG("set_storage: DELETED");
return EVMONE_STORAGE_DELETED;
}
if (!created_storage) {
EVM_LOG("set_storage: MODIFIED_AGAIN");
return EVMONE_STORAGE_MODIFIED_AGAIN;
}
if (created_storage && bytes_all_zero(bytes(current_value.bytes, 32))) {
EVM_LOG("set_storage: ADDED (created storage)");
return EVMONE_STORAGE_ADDED;
}
EVM_LOG("set_storage: MODIFIED");
return EVMONE_STORAGE_MODIFIED;
}
|
O1
|
c
|
host_set_storage:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2aa29
xorl %eax, %eax
movb %al, 0xf(%rsp)
movb %al, 0xe(%rsp)
movdqu (%r13), %xmm0
movdqu 0x10(%r13), %xmm1
movdqu (%rbx), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rbx), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx # imm = 0xFFFF
je 0x2aca8
leaq 0xf(%rsp), %r13
leaq 0xe(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r13, %r8
callq 0x2b0e3
movl $0x3, %eax
cmpb $0x0, (%r13)
jne 0x2aca8
movl $0x20, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x571ad
movl %eax, %ecx
movl $0x4, %eax
testb %cl, %cl
jne 0x2aca8
movl $0x2, %eax
cmpb $0x1, 0xe(%rsp)
jne 0x2aca8
leaq 0x10(%rsp), %rsi
movl $0x20, %edi
xorl %edx, %edx
callq 0x571ad
movzbl %al, %eax
leal 0x1(,%rax,2), %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
host_set_storage:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea r13, [rsp+58h+var_48]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call host_get_storage
xor eax, eax
mov [rsp+58h+var_49], al
mov [rsp+58h+var_4A], al
movdqu xmm0, xmmword ptr [r13+0]
movdqu xmm1, xmmword ptr [r13+10h]
movdqu xmm2, xmmword ptr [rbx]
pcmpeqb xmm2, xmm0
movdqu xmm0, xmmword ptr [rbx+10h]
pcmpeqb xmm0, xmm1
pand xmm0, xmm2
pmovmskb ecx, xmm0
cmp ecx, 0FFFFh
jz short loc_2ACA8
lea r13, [rsp+58h+var_49]
lea r9, [rsp+58h+var_4A]
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r8, r13
call set_changed_storage
mov eax, 3
cmp byte ptr [r13+0], 0
jnz short loc_2ACA8
mov edi, 20h ; ' '
mov rsi, rbx
xor edx, edx
call bytes_all_equal
mov ecx, eax
mov eax, 4
test cl, cl
jnz short loc_2ACA8
mov eax, 2
cmp [rsp+58h+var_4A], 1
jnz short loc_2ACA8
lea rsi, [rsp+58h+var_48]
mov edi, 20h ; ' '
xor edx, edx
call bytes_all_equal
movzx eax, al
lea eax, ds:1[rax*2]
loc_2ACA8:
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long host_set_storage(const __m128i *a1, const __m128i *a2, const __m128i *a3, const __m128i *a4)
{
long long result; // rax
char v7; // cl
char v8; // [rsp+Eh] [rbp-4Ah] BYREF
char v9; // [rsp+Fh] [rbp-49h] BYREF
__m128i v10; // [rsp+10h] [rbp-48h] BYREF
__m128i v11[3]; // [rsp+20h] [rbp-38h] BYREF
host_get_storage(&v10, a1, a2, a3);
result = 0LL;
v9 = 0;
v8 = 0;
if ( _mm_movemask_epi8(
_mm_and_si128(
_mm_cmpeq_epi8(_mm_loadu_si128(a4 + 1), _mm_loadu_si128(v11)),
_mm_cmpeq_epi8(_mm_loadu_si128(a4), _mm_loadu_si128(&v10)))) != 0xFFFF )
{
set_changed_storage(a1, a2, a3, a4, &v9, &v8);
result = 3LL;
if ( !v9 )
{
v7 = bytes_all_equal(32LL, a4, 0LL);
result = 4LL;
if ( !v7 )
{
result = 2LL;
if ( v8 == 1 )
return 2 * (unsigned int)(unsigned __int8)bytes_all_equal(32LL, &v10, 0LL) + 1;
}
}
}
return result;
}
|
host_set_storage:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x0012aa29
XOR EAX,EAX
MOV byte ptr [RSP + 0xf],AL
MOV byte ptr [RSP + 0xe],AL
MOVDQU XMM0,xmmword ptr [R13]
MOVDQU XMM1,xmmword ptr [R13 + 0x10]
MOVDQU XMM2,xmmword ptr [RBX]
PCMPEQB XMM2,XMM0
MOVDQU XMM0,xmmword ptr [RBX + 0x10]
PCMPEQB XMM0,XMM1
PAND XMM0,XMM2
PMOVMSKB ECX,XMM0
CMP ECX,0xffff
JZ 0x0012aca8
LEA R13,[RSP + 0xf]
LEA R9,[RSP + 0xe]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R8,R13
CALL 0x0012b0e3
MOV EAX,0x3
CMP byte ptr [R13],0x0
JNZ 0x0012aca8
MOV EDI,0x20
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001571ad
MOV ECX,EAX
MOV EAX,0x4
TEST CL,CL
JNZ 0x0012aca8
MOV EAX,0x2
CMP byte ptr [RSP + 0xe],0x1
JNZ 0x0012aca8
LEA RSI,[RSP + 0x10]
MOV EDI,0x20
XOR EDX,EDX
CALL 0x001571ad
MOVZX EAX,AL
LEA EAX,[0x1 + RAX*0x2]
LAB_0012aca8:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int host_set_storage(int8 param_1,int8 param_2,int8 param_3,char *param_4)
{
char cVar1;
byte bVar2;
int iVar3;
int1 auVar4 [16];
int1 auVar5 [16];
char local_4a;
char local_49;
char local_48;
char cStack_47;
char cStack_46;
char cStack_45;
char cStack_44;
char cStack_43;
char cStack_42;
char cStack_41;
char cStack_40;
char cStack_3f;
char cStack_3e;
char cStack_3d;
char cStack_3c;
char cStack_3b;
char cStack_3a;
char cStack_39;
int1 local_38 [16];
host_get_storage(&local_48,param_1,param_2,param_3);
iVar3 = 0;
local_49 = '\0';
local_4a = '\0';
auVar5[0] = -(*param_4 == local_48);
auVar5[1] = -(param_4[1] == cStack_47);
auVar5[2] = -(param_4[2] == cStack_46);
auVar5[3] = -(param_4[3] == cStack_45);
auVar5[4] = -(param_4[4] == cStack_44);
auVar5[5] = -(param_4[5] == cStack_43);
auVar5[6] = -(param_4[6] == cStack_42);
auVar5[7] = -(param_4[7] == cStack_41);
auVar5[8] = -(param_4[8] == cStack_40);
auVar5[9] = -(param_4[9] == cStack_3f);
auVar5[10] = -(param_4[10] == cStack_3e);
auVar5[0xb] = -(param_4[0xb] == cStack_3d);
auVar5[0xc] = -(param_4[0xc] == cStack_3c);
auVar5[0xd] = -(param_4[0xd] == cStack_3b);
auVar5[0xe] = -(param_4[0xe] == cStack_3a);
auVar5[0xf] = -(param_4[0xf] == cStack_39);
auVar4[0] = -(param_4[0x10] == local_38[0]);
auVar4[1] = -(param_4[0x11] == local_38[1]);
auVar4[2] = -(param_4[0x12] == local_38[2]);
auVar4[3] = -(param_4[0x13] == local_38[3]);
auVar4[4] = -(param_4[0x14] == local_38[4]);
auVar4[5] = -(param_4[0x15] == local_38[5]);
auVar4[6] = -(param_4[0x16] == local_38[6]);
auVar4[7] = -(param_4[0x17] == local_38[7]);
auVar4[8] = -(param_4[0x18] == local_38[8]);
auVar4[9] = -(param_4[0x19] == local_38[9]);
auVar4[10] = -(param_4[0x1a] == local_38[10]);
auVar4[0xb] = -(param_4[0x1b] == local_38[0xb]);
auVar4[0xc] = -(param_4[0x1c] == local_38[0xc]);
auVar4[0xd] = -(param_4[0x1d] == local_38[0xd]);
auVar4[0xe] = -(param_4[0x1e] == local_38[0xe]);
auVar4[0xf] = -(param_4[0x1f] == local_38[0xf]);
auVar4 = auVar4 & auVar5;
if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) | (ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar4[0xf] >> 7) << 0xf) != 0xffff) {
set_changed_storage(param_1,param_2,param_3,param_4,&local_49,&local_4a);
iVar3 = 3;
if (local_49 == '\0') {
cVar1 = bytes_all_equal(0x20,param_4,0);
iVar3 = 4;
if ((cVar1 == '\0') && (iVar3 = 2, local_4a == '\x01')) {
bVar2 = bytes_all_equal(0x20,&local_48,0);
iVar3 = (uint)bVar2 * 2 + 1;
}
}
}
return iVar3;
}
|
|
10,984 |
host_set_storage
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmone_storage_status host_set_storage(void* context, const evmc_address* addr, const evmc_bytes32* key, const evmc_bytes32* value) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("set_storage for account", addr);
debug_print_bytes32("set_storage key", key);
debug_print_bytes32("set_storage value", value);
evmc_bytes32 current_value = host_get_storage(context, addr, key);
bool created_account = false;
bool created_storage = false;
if (memcmp(current_value.bytes, value->bytes, 32) == 0) {
EVM_LOG("set_storage: UNCHANGED");
return EVMONE_STORAGE_UNCHANGED;
}
set_changed_storage(ctx, addr->bytes, key->bytes, value->bytes, &created_account, &created_storage);
if (created_account) {
EVM_LOG("set_storage: ADDED (created account)");
return EVMONE_STORAGE_ADDED;
}
if (bytes_all_zero(bytes(value->bytes, 32))) {
EVM_LOG("set_storage: DELETED");
return EVMONE_STORAGE_DELETED;
}
if (!created_storage) {
EVM_LOG("set_storage: MODIFIED_AGAIN");
return EVMONE_STORAGE_MODIFIED_AGAIN;
}
if (created_storage && bytes_all_zero(bytes(current_value.bytes, 32))) {
EVM_LOG("set_storage: ADDED (created storage)");
return EVMONE_STORAGE_ADDED;
}
EVM_LOG("set_storage: MODIFIED");
return EVMONE_STORAGE_MODIFIED;
}
|
O2
|
c
|
host_set_storage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x292ad
xorl %ebp, %ebp
movb %bpl, 0x7(%rsp)
movb %bpl, 0x6(%rsp)
pushq $0x20
popq %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22380
testl %eax, %eax
je 0x294dc
leaq 0x7(%rsp), %r13
leaq 0x6(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r13, %r8
callq 0x2989a
cmpb $0x0, (%r13)
je 0x294a2
pushq $0x3
jmp 0x294db
pushq $0x20
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4b20e
testb %al, %al
je 0x294b7
pushq $0x4
jmp 0x294db
cmpb $0x1, 0x6(%rsp)
jne 0x294d9
pushq $0x20
popq %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x4b20e
movzbl %al, %eax
leal 0x1(,%rax,2), %ebp
jmp 0x294dc
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
host_set_storage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea r13, [rsp+58h+var_50]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call host_get_storage
xor ebp, ebp
mov [rsp+58h+var_51], bpl
mov [rsp+58h+var_52], bpl
push 20h ; ' '
pop rdx
mov rdi, r13
mov rsi, rbx
call _bcmp
test eax, eax
jz short loc_294DC
lea r13, [rsp+58h+var_51]
lea r9, [rsp+58h+var_52]
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r8, r13
call set_changed_storage
cmp byte ptr [r13+0], 0
jz short loc_294A2
push 3
jmp short loc_294DB
loc_294A2:
push 20h ; ' '
pop rdi
mov rsi, rbx
xor edx, edx
call bytes_all_equal
test al, al
jz short loc_294B7
push 4
jmp short loc_294DB
loc_294B7:
cmp [rsp+58h+var_52], 1
jnz short loc_294D9
push 20h ; ' '
pop rdi
lea rsi, [rsp+58h+var_50]
xor edx, edx
call bytes_all_equal
movzx eax, al
lea ebp, ds:1[rax*2]
jmp short loc_294DC
loc_294D9:
push 2
loc_294DB:
pop rbp
loc_294DC:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long host_set_storage(long long a1, long long a2, long long a3, long long a4)
{
unsigned int v6; // ebp
char v9; // [rsp+6h] [rbp-52h] BYREF
char v10; // [rsp+7h] [rbp-51h] BYREF
_OWORD v11[5]; // [rsp+8h] [rbp-50h] BYREF
host_get_storage(v11, a1, a2, a3);
v6 = 0;
v10 = 0;
v9 = 0;
if ( (unsigned int)bcmp(v11, a4, 32LL) )
{
set_changed_storage(a1, a2, a3, a4, &v10, &v9);
if ( v10 )
return 3;
if ( (unsigned __int8)bytes_all_equal(32LL, a4, 0LL) )
return 4;
if ( v9 != 1 )
return 2;
return 2 * (unsigned int)(unsigned __int8)bytes_all_equal(32LL, v11, 0LL) + 1;
}
return v6;
}
|
host_set_storage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x001292ad
XOR EBP,EBP
MOV byte ptr [RSP + 0x7],BPL
MOV byte ptr [RSP + 0x6],BPL
PUSH 0x20
POP RDX
MOV RDI,R13
MOV RSI,RBX
CALL 0x00122380
TEST EAX,EAX
JZ 0x001294dc
LEA R13,[RSP + 0x7]
LEA R9,[RSP + 0x6]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R8,R13
CALL 0x0012989a
CMP byte ptr [R13],0x0
JZ 0x001294a2
PUSH 0x3
JMP 0x001294db
LAB_001294a2:
PUSH 0x20
POP RDI
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0014b20e
TEST AL,AL
JZ 0x001294b7
PUSH 0x4
JMP 0x001294db
LAB_001294b7:
CMP byte ptr [RSP + 0x6],0x1
JNZ 0x001294d9
PUSH 0x20
POP RDI
LEA RSI,[RSP + 0x8]
XOR EDX,EDX
CALL 0x0014b20e
MOVZX EAX,AL
LEA EBP,[0x1 + RAX*0x2]
JMP 0x001294dc
LAB_001294d9:
PUSH 0x2
LAB_001294db:
POP RBP
LAB_001294dc:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int host_set_storage(int8 param_1,int8 param_2,int8 param_3,void *param_4)
{
char cVar1;
byte bVar2;
int iVar3;
int iVar4;
char local_52;
char local_51;
int1 local_50 [32];
host_get_storage(local_50,param_1,param_2,param_3);
iVar4 = 0;
local_51 = '\0';
local_52 = '\0';
iVar3 = bcmp(local_50,param_4,0x20);
if (iVar3 != 0) {
set_changed_storage(param_1,param_2,param_3,param_4,&local_51,&local_52);
if (local_51 == '\0') {
cVar1 = bytes_all_equal(0x20,param_4,0);
if (cVar1 == '\0') {
if (local_52 == '\x01') {
bVar2 = bytes_all_equal(0x20,local_50,0);
iVar4 = (uint)bVar2 * 2 + 1;
}
else {
iVar4 = 2;
}
}
else {
iVar4 = 4;
}
}
else {
iVar4 = 3;
}
}
return iVar4;
}
|
|
10,985 |
trnman_exists_active_transactions
|
eloqsql/storage/maria/trnman.c
|
my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id,
my_bool trnman_is_locked)
{
TRN *trn;
my_bool ret= 0;
if (!trnman_is_locked)
mysql_mutex_lock(&LOCK_trn_list);
mysql_mutex_assert_owner(&LOCK_trn_list);
for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next)
{
/*
We use <= for max_id as max_id is a commit_trid and trn->trid
is transaction id. When calculating commit_trid we use the
current value of global_trid_generator. global_trid_generator is
incremented for each new transaction.
For example, assuming we have
min_id = 5
max_id = 10
A trid of value 5 can't see the history event between 5 & 10
at it vas started before min_id 5 was committed.
A trid of value 10 can't see the next history event (max_id = 10)
as it started before this was committed. In this case it must use
the this event.
*/
if (trn->trid > min_id && trn->trid <= max_id)
{
ret= 1;
break;
}
}
if (!trnman_is_locked)
mysql_mutex_unlock(&LOCK_trn_list);
return ret;
}
|
O0
|
c
|
trnman_exists_active_transactions:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x21(%rbp)
cmpb $0x0, -0x11(%rbp)
jne 0x2c997
leaq 0x449a2a(%rip), %rdi # 0x4763b0
leaq 0x123904(%rip), %rsi # 0x150291
movl $0x3a8, %edx # imm = 0x3A8
callq 0x2b950
jmp 0x2c999
jmp 0x2c99b
movq 0x4496ce(%rip), %rax # 0x476070
movq %rax, -0x20(%rbp)
leaq 0x44970b(%rip), %rax # 0x4760b8
cmpq %rax, -0x20(%rbp)
je 0x2c9e5
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
cmpq -0x8(%rbp), %rax
jbe 0x2c9d5
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
cmpq -0x10(%rbp), %rax
ja 0x2c9d5
movb $0x1, -0x21(%rbp)
jmp 0x2c9e5
jmp 0x2c9d7
movq -0x20(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2c9a6
cmpb $0x0, -0x11(%rbp)
jne 0x2c9f7
leaq 0x4499be(%rip), %rdi # 0x4763b0
callq 0x2b9c0
movb -0x21(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
|
trnman_exists_active_transactions:
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 [rbp+var_21], 0
cmp [rbp+var_11], 0
jnz short loc_2C997
lea rdi, LOCK_trn_list
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3A8h
call inline_mysql_mutex_lock
loc_2C997:
jmp short $+2
loc_2C999:
jmp short $+2
loc_2C99B:
mov rax, cs:qword_476070
mov [rbp+var_20], rax
loc_2C9A6:
lea rax, active_list_max
cmp [rbp+var_20], rax
jz short loc_2C9E5
mov rax, [rbp+var_20]
mov rax, [rax+78h]
cmp rax, [rbp+var_8]
jbe short loc_2C9D5
mov rax, [rbp+var_20]
mov rax, [rax+78h]
cmp rax, [rbp+var_10]
ja short loc_2C9D5
mov [rbp+var_21], 1
jmp short loc_2C9E5
loc_2C9D5:
jmp short $+2
loc_2C9D7:
mov rax, [rbp+var_20]
mov rax, [rax+68h]
mov [rbp+var_20], rax
jmp short loc_2C9A6
loc_2C9E5:
cmp [rbp+var_11], 0
jnz short loc_2C9F7
lea rdi, LOCK_trn_list
call inline_mysql_mutex_unlock
loc_2C9F7:
mov al, [rbp+var_21]
add rsp, 30h
pop rbp
retn
|
char trnman_exists_active_transactions(unsigned long long a1, unsigned long long a2, char a3)
{
char v4; // [rsp+Fh] [rbp-21h]
long long i; // [rsp+10h] [rbp-20h]
v4 = 0;
if ( !a3 )
inline_mysql_mutex_lock(
(long long)&LOCK_trn_list,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",
0x3A8u);
for ( i = qword_476070; (_UNKNOWN *)i != &active_list_max; i = *(_QWORD *)(i + 104) )
{
if ( *(_QWORD *)(i + 120) > a1 && *(_QWORD *)(i + 120) <= a2 )
{
v4 = 1;
break;
}
}
if ( !a3 )
inline_mysql_mutex_unlock((long long)&LOCK_trn_list);
return v4;
}
|
trnman_exists_active_transactions:
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 byte ptr [RBP + -0x21],0x0
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x0012c997
LEA RDI,[0x5763b0]
LEA RSI,[0x250291]
MOV EDX,0x3a8
CALL 0x0012b950
LAB_0012c997:
JMP 0x0012c999
LAB_0012c999:
JMP 0x0012c99b
LAB_0012c99b:
MOV RAX,qword ptr [0x00576070]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012c9a6:
LEA RAX,[0x5760b8]
CMP qword ptr [RBP + -0x20],RAX
JZ 0x0012c9e5
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x0012c9d5
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0012c9d5
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0012c9e5
LAB_0012c9d5:
JMP 0x0012c9d7
LAB_0012c9d7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012c9a6
LAB_0012c9e5:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x0012c9f7
LEA RDI,[0x5763b0]
CALL 0x0012b9c0
LAB_0012c9f7:
MOV AL,byte ptr [RBP + -0x21]
ADD RSP,0x30
POP RBP
RET
|
int1 trnman_exists_active_transactions(ulong param_1,ulong param_2,char param_3)
{
int1 local_29;
int1 *local_28;
local_29 = 0;
if (param_3 == '\0') {
inline_mysql_mutex_lock
(LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x3a8
);
}
local_28 = (int1 *)active_list_min._104_8_;
do {
if (local_28 == active_list_max) {
LAB_0012c9e5:
if (param_3 == '\0') {
inline_mysql_mutex_unlock(LOCK_trn_list);
}
return local_29;
}
if ((param_1 < *(ulong *)(local_28 + 0x78)) && (*(ulong *)(local_28 + 0x78) <= param_2)) {
local_29 = 1;
goto LAB_0012c9e5;
}
local_28 = *(int1 **)(local_28 + 0x68);
} while( true );
}
|
|
10,986 |
CLI::CallForAllHelp::CallForAllHelp()
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Error.hpp
|
CallForAllHelp()
: CallForAllHelp("This should be caught in your main function, see examples", ExitCodes::Success) {}
|
O3
|
cpp
|
CLI::CallForAllHelp::CallForAllHelp():
pushq %rbx
movq %rdi, %rbx
leaq 0x2458f(%rip), %rax # 0x49358
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x24de4
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
|
_ZN3CLI14CallForAllHelpD0Ev:
push rbx
mov rbx, rdi
lea rax, off_49358
mov [rdi], rax
mov rdi, [rdi+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_24DE4
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24DE4:
mov rdi, rbx; this
call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error()
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void CLI::CallForAllHelp::~CallForAllHelp(CLI::CallForAllHelp *this)
{
char *v2; // rdi
*(_QWORD *)this = off_49358;
v2 = (char *)*((_QWORD *)this + 3);
if ( v2 != (char *)this + 40 )
operator delete(v2, *((_QWORD *)this + 5) + 1LL);
std::runtime_error::~runtime_error(this);
operator delete(this, 0x38uLL);
}
|
~CallForAllHelp:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x149358]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x00124de4
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00124de4:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::CallForAllHelp::~CallForAllHelp() */
void __thiscall CLI::CallForAllHelp::~CallForAllHelp(CallForAllHelp *this)
{
*(int ***)this = &PTR__Error_00149358;
if (*(CallForAllHelp **)(this + 0x18) != this + 0x28) {
operator_delete(*(CallForAllHelp **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
|
|
10,987 |
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const
|
monkey531[P]llama/common/./json.hpp
|
JSON_HEDLEY_RETURNS_NON_NULL
const char* type_name() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
return "null";
case value_t::object:
return "object";
case value_t::array:
return "array";
case value_t::string:
return "string";
case value_t::boolean:
return "boolean";
case value_t::binary:
return "binary";
case value_t::discarded:
return "discarded";
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
default:
return "number";
}
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const:
movzbl (%rdi), %eax
cmpq $0x9, %rax
ja 0x25475
leaq 0xc3d30(%rip), %rcx # 0xe91a0
movq (%rcx,%rax,8), %rax
retq
leaq 0x8e977(%rip), %rax # 0xb3df3
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv:
movzx eax, byte ptr [rdi]
cmp rax, 9
ja short loc_25475
lea rcx, off_E91A0; "null"
mov rax, [rcx+rax*8]
retn
loc_25475:
lea rax, aNumber; "number"
retn
|
const char * nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(
unsigned __int8 *a1)
{
unsigned long long v1; // rax
v1 = *a1;
if ( v1 > 9 )
return "number";
else
return (const char *)*(&off_E91A0 + v1);
}
|
type_name:
MOVZX EAX,byte ptr [RDI]
CMP RAX,0x9
JA 0x00125475
LEA RCX,[0x1e91a0]
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
LAB_00125475:
LEA RAX,[0x1b3df3]
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >, void>::type_name() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
if ((ulong)(byte)*this < 10) {
return (&PTR_s_null_001e91a0)[(byte)*this];
}
return "number";
}
|
|
10,988 |
my_coll_lexem_next
|
eloqsql/strings/ctype-uca.c
|
static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
}
|
O0
|
c
|
my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x9deab
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x40(%rbp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0x9db95
jmp 0x9db2e
movl -0x40(%rbp), %eax
subl $0xd, %eax
je 0x9db95
jmp 0x9db38
movl -0x40(%rbp), %eax
subl $0x20, %eax
je 0x9db95
jmp 0x9db42
movl -0x40(%rbp), %eax
subl $0x26, %eax
je 0x9dc2c
jmp 0x9db50
movl -0x40(%rbp), %eax
subl $0x2f, %eax
je 0x9dc67
jmp 0x9db5e
movl -0x40(%rbp), %eax
subl $0x3c, %eax
je 0x9dc97
jmp 0x9db6c
movl -0x40(%rbp), %eax
subl $0x3d, %eax
je 0x9dc44
jmp 0x9db7a
movl -0x40(%rbp), %eax
subl $0x5b, %eax
je 0x9db9a
jmp 0x9db84
movl -0x40(%rbp), %eax
subl $0x7c, %eax
je 0x9dc7f
jmp 0x9dd12
jmp 0x9de9a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x9dc20
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x9dbd6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x9dc10
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x9dc0e
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9dc0c
movl $0x7, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9deb2
jmp 0x9dc0e
jmp 0x9dc10
jmp 0x9dc12
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9dbae
movl $0x6, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x8, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x9, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x41(%rbp)
jae 0x9dce0
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3c, %ecx
movb %al, -0x41(%rbp)
jne 0x9dce0
movq -0x8(%rbp), %rax
cmpl $0x3, 0x20(%rax)
setle %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x9dce9
jmp 0x9dd06
jmp 0x9dceb
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
jmp 0x9dcae
movl $0x1, -0x14(%rbp)
jmp 0x9deb2
jmp 0x9dd14
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x9dde6
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x9dde6
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x9dde6
leaq 0x3471ee(%rip), %rax # 0x3e4f40
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x9dde6
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x42(%rbp)
jae 0x9ddaf
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x9df00
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
setge %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x9ddb8
jmp 0x9ddda
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
shll $0x4, %ecx
addl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9dd84
movl $0x5, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jl 0x9de23
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jg 0x9de23
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl $0x5, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x9de91
leaq 0x34710a(%rip), %rax # 0x3e4f40
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0x9de8f
movl $0x5, -0x14(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x9deb2
jmp 0x9de91
movl $0x6, -0x14(%rbp)
jmp 0x9deb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9db08
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
|
my_coll_lexem_next:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_10], rax
loc_9DB08:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb loc_9DEAB
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
mov [rbp+var_40], eax
add eax, 0FFFFFFF7h
sub eax, 2
jb short loc_9DB95
jmp short $+2
loc_9DB2E:
mov eax, [rbp+var_40]
sub eax, 0Dh
jz short loc_9DB95
jmp short $+2
loc_9DB38:
mov eax, [rbp+var_40]
sub eax, 20h ; ' '
jz short loc_9DB95
jmp short $+2
loc_9DB42:
mov eax, [rbp+var_40]
sub eax, 26h ; '&'
jz loc_9DC2C
jmp short $+2
loc_9DB50:
mov eax, [rbp+var_40]
sub eax, 2Fh ; '/'
jz loc_9DC67
jmp short $+2
loc_9DB5E:
mov eax, [rbp+var_40]
sub eax, 3Ch ; '<'
jz loc_9DC97
jmp short $+2
loc_9DB6C:
mov eax, [rbp+var_40]
sub eax, 3Dh ; '='
jz loc_9DC44
jmp short $+2
loc_9DB7A:
mov eax, [rbp+var_40]
sub eax, 5Bh ; '['
jz short loc_9DB9A
jmp short $+2
loc_9DB84:
mov eax, [rbp+var_40]
sub eax, 7Ch ; '|'
jz loc_9DC7F
jmp loc_9DD12
loc_9DB95:
jmp loc_9DE9A
loc_9DB9A:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_20], 1
loc_9DBAE:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb short loc_9DC20
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Bh ; '['
jnz short loc_9DBD6
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_9DC10
loc_9DBD6:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_9DC0E
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_9DC0C
mov [rbp+var_14], 7
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_9DEB2
loc_9DC0C:
jmp short $+2
loc_9DC0E:
jmp short $+2
loc_9DC10:
jmp short $+2
loc_9DC12:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_9DBAE
loc_9DC20:
mov [rbp+var_14], 6
jmp loc_9DEB2
loc_9DC2C:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 4
jmp loc_9DEB2
loc_9DC44:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+20h], 0
mov [rbp+var_14], 1
jmp loc_9DEB2
loc_9DC67:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 8
jmp loc_9DEB2
loc_9DC7F:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 9
jmp loc_9DEB2
loc_9DC97:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+20h], 1
loc_9DCAE:
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_41], al
jnb short loc_9DCE0
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 3Ch ; '<'
mov [rbp+var_41], al
jnz short loc_9DCE0
mov rax, [rbp+var_8]
cmp dword ptr [rax+20h], 3
setle al
mov [rbp+var_41], al
loc_9DCE0:
mov al, [rbp+var_41]
test al, 1
jnz short loc_9DCE9
jmp short loc_9DD06
loc_9DCE9:
jmp short $+2
loc_9DCEB:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov ecx, [rax+20h]
add ecx, 1
mov [rax+20h], ecx
jmp short loc_9DCAE
loc_9DD06:
mov [rbp+var_14], 1
jmp loc_9DEB2
loc_9DD12:
jmp short $+2
loc_9DD14:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_9DDE6
mov rax, [rbp+var_10]
add rax, 2
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb loc_9DDE6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_9DDE6
lea rax, my_charset_utf8mb3_general_ci
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_9DDE6
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+24h], 0
loc_9DD84:
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_42], al
jnb short loc_9DDAF
mov rax, [rbp+var_10]
movsx edi, byte ptr [rax]
call ch2x
mov [rbp+var_24], eax
cmp eax, 0
setnl al
mov [rbp+var_42], al
loc_9DDAF:
mov al, [rbp+var_42]
test al, 1
jnz short loc_9DDB8
jmp short loc_9DDDA
loc_9DDB8:
mov rax, [rbp+var_8]
mov ecx, [rax+24h]
shl ecx, 4
add ecx, [rbp+var_24]
mov rax, [rbp+var_8]
mov [rax+24h], ecx
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_9DD84
loc_9DDDA:
mov [rbp+var_14], 5
jmp loc_9DEB2
loc_9DDE6:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 21h ; '!'
jl short loc_9DE23
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jg short loc_9DE23
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx ecx, byte ptr [rax]
mov rax, [rbp+var_8]
mov [rax+24h], ecx
mov [rbp+var_14], 5
jmp loc_9DEB2
loc_9DE23:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle short loc_9DE91
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_8]
mov rcx, [rcx+10h]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jle short loc_9DE8F
mov [rbp+var_14], 5
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+24h], ecx
jmp short loc_9DEB2
loc_9DE8F:
jmp short $+2
loc_9DE91:
mov [rbp+var_14], 6
jmp short loc_9DEB2
loc_9DE9A:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_9DB08
loc_9DEAB:
mov [rbp+var_14], 0
loc_9DEB2:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_8]
mov [rax], ecx
mov eax, [rbp+var_14]
add rsp, 50h
pop rbp
retn
|
long long my_coll_lexem_next(long long a1)
{
char *v1; // rax
bool v3; // [rsp+Eh] [rbp-42h]
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
_QWORD v7[2]; // [rsp+18h] [rbp-38h] BYREF
int v8; // [rsp+2Ch] [rbp-24h]
long long v9; // [rsp+30h] [rbp-20h]
unsigned int v10; // [rsp+3Ch] [rbp-14h]
unsigned __int8 *i; // [rsp+40h] [rbp-10h]
long long v12; // [rsp+48h] [rbp-8h]
v12 = a1;
for ( i = *(unsigned __int8 **)(a1 + 8); ; ++i )
{
if ( (unsigned long long)i >= *(_QWORD *)(v12 + 16) )
{
v10 = 0;
goto LABEL_52;
}
v5 = (char)*i;
if ( (unsigned int)(v5 - 9) >= 2 && v5 != 13 && v5 != 32 )
break;
}
switch ( v5 )
{
case '&':
++i;
v10 = 4;
break;
case '/':
++i;
v10 = 8;
break;
case '<':
++i;
for ( *(_DWORD *)(v12 + 32) = 1; ; ++*(_DWORD *)(v12 + 32) )
{
v4 = 0;
if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
v4 = 0;
if ( *i == 60 )
v4 = *(_DWORD *)(v12 + 32) <= 3;
}
if ( !v4 )
break;
++i;
}
v10 = 1;
break;
case '=':
++i;
*(_DWORD *)(v12 + 32) = 0;
v10 = 1;
break;
case '[':
++i;
v9 = 1LL;
while ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
if ( *i == 91 )
{
++v9;
}
else if ( *i == 93 && !--v9 )
{
v10 = 7;
++i;
goto LABEL_52;
}
++i;
}
v10 = 6;
break;
case '|':
++i;
v10 = 9;
break;
default:
if ( *i == 92
&& (unsigned long long)(i + 2) < *(_QWORD *)(v12 + 16)
&& i[1] == 117
&& (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + i[2] + 1LL) & 0x80) != 0 )
{
i += 2;
*(_DWORD *)(v12 + 36) = 0;
while ( 1 )
{
v3 = 0;
if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
v8 = ch2x((unsigned int)(char)*i);
v3 = v8 >= 0;
}
if ( !v3 )
break;
*(_DWORD *)(v12 + 36) = v8 + 16 * *(_DWORD *)(v12 + 36);
++i;
}
v10 = 5;
}
else if ( (char)*i < 33 || *i == 127 )
{
if ( *i <= 0x7Fu
|| (v7[1] = my_charset_utf8mb3_general_ci,
v6 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *, _QWORD))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v7,
i,
*(_QWORD *)(v12 + 16)),
v6 <= 0) )
{
v10 = 6;
}
else
{
v10 = 5;
i += v6;
*(_DWORD *)(v12 + 36) = v7[0];
}
}
else
{
v1 = (char *)i++;
*(_DWORD *)(v12 + 36) = *v1;
v10 = 5;
}
break;
}
LABEL_52:
*(_QWORD *)(v12 + 24) = *(_QWORD *)(v12 + 8);
*(_QWORD *)(v12 + 8) = i;
*(_DWORD *)v12 = v10;
return v10;
}
|
my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_0019db08:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0019deab
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
ADD EAX,-0x9
SUB EAX,0x2
JC 0x0019db95
JMP 0x0019db2e
LAB_0019db2e:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0xd
JZ 0x0019db95
JMP 0x0019db38
LAB_0019db38:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x20
JZ 0x0019db95
JMP 0x0019db42
LAB_0019db42:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x26
JZ 0x0019dc2c
JMP 0x0019db50
LAB_0019db50:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x2f
JZ 0x0019dc67
JMP 0x0019db5e
LAB_0019db5e:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x3c
JZ 0x0019dc97
JMP 0x0019db6c
LAB_0019db6c:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x3d
JZ 0x0019dc44
JMP 0x0019db7a
LAB_0019db7a:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x5b
JZ 0x0019db9a
JMP 0x0019db84
LAB_0019db84:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x7c
JZ 0x0019dc7f
JMP 0x0019dd12
LAB_0019db95:
JMP 0x0019de9a
LAB_0019db9a:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x20],0x1
LAB_0019dbae:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0019dc20
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5b
JNZ 0x0019dbd6
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0019dc10
LAB_0019dbd6:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x0019dc0e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0019dc0c
MOV dword ptr [RBP + -0x14],0x7
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0019deb2
LAB_0019dc0c:
JMP 0x0019dc0e
LAB_0019dc0e:
JMP 0x0019dc10
LAB_0019dc10:
JMP 0x0019dc12
LAB_0019dc12:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0019dbae
LAB_0019dc20:
MOV dword ptr [RBP + -0x14],0x6
JMP 0x0019deb2
LAB_0019dc2c:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x4
JMP 0x0019deb2
LAB_0019dc44:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0019deb2
LAB_0019dc67:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x8
JMP 0x0019deb2
LAB_0019dc7f:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x9
JMP 0x0019deb2
LAB_0019dc97:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],0x1
LAB_0019dcae:
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0019dce0
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x3c
MOV byte ptr [RBP + -0x41],AL
JNZ 0x0019dce0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x20],0x3
SETLE AL
MOV byte ptr [RBP + -0x41],AL
LAB_0019dce0:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0019dce9
JMP 0x0019dd06
LAB_0019dce9:
JMP 0x0019dceb
LAB_0019dceb:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,0x1
MOV dword ptr [RAX + 0x20],ECX
JMP 0x0019dcae
LAB_0019dd06:
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0019deb2
LAB_0019dd12:
JMP 0x0019dd14
LAB_0019dd14:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x0019dde6
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0019dde6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x0019dde6
LEA RAX,[0x4e4f40]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0019dde6
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],0x0
LAB_0019dd84:
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0019ddaf
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EDI,byte ptr [RAX]
CALL 0x0019df00
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
SETGE AL
MOV byte ptr [RBP + -0x42],AL
LAB_0019ddaf:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x0019ddb8
JMP 0x0019ddda
LAB_0019ddb8:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x24]
SHL ECX,0x4
ADD ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0019dd84
LAB_0019ddda:
MOV dword ptr [RBP + -0x14],0x5
JMP 0x0019deb2
LAB_0019dde6:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x21
JL 0x0019de23
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JG 0x0019de23
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
MOV dword ptr [RBP + -0x14],0x5
JMP 0x0019deb2
LAB_0019de23:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x0019de91
LEA RAX,[0x4e4f40]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x10]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JLE 0x0019de8f
MOV dword ptr [RBP + -0x14],0x5
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x0019deb2
LAB_0019de8f:
JMP 0x0019de91
LAB_0019de91:
MOV dword ptr [RBP + -0x14],0x6
JMP 0x0019deb2
LAB_0019de9a:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0019db08
LAB_0019deab:
MOV dword ptr [RBP + -0x14],0x0
LAB_0019deb2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x50
POP RBP
RET
|
int4 my_coll_lexem_next(int4 *param_1)
{
byte *pbVar1;
int iVar2;
bool bVar3;
int4 local_40 [2];
int1 *local_38;
int local_2c;
long local_28;
int4 local_1c;
byte *local_18;
int4 *local_10;
local_18 = *(byte **)(param_1 + 2);
while( true ) {
local_10 = param_1;
if (*(byte **)(param_1 + 4) <= local_18) goto LAB_0019deab;
iVar2 = (int)(char)*local_18;
if (((1 < iVar2 - 9U) && (iVar2 != 0xd)) && (iVar2 != 0x20)) break;
local_18 = local_18 + 1;
}
if (iVar2 == 0x26) {
local_18 = local_18 + 1;
local_1c = 4;
goto LAB_0019deb2;
}
if (iVar2 == 0x2f) {
local_18 = local_18 + 1;
local_1c = 8;
goto LAB_0019deb2;
}
if (iVar2 != 0x3c) {
if (iVar2 == 0x3d) {
local_18 = local_18 + 1;
param_1[8] = 0;
local_1c = 1;
goto LAB_0019deb2;
}
if (iVar2 == 0x5b) {
local_28 = 1;
goto LAB_0019dbae;
}
if (iVar2 == 0x7c) {
local_18 = local_18 + 1;
local_1c = 9;
goto LAB_0019deb2;
}
if ((((*local_18 == 0x5c) && (local_18 + 2 < *(byte **)(param_1 + 4))) && (local_18[1] == 0x75))
&& ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)local_18[2]) & 0x80) != 0))
{
local_18 = local_18 + 2;
param_1[9] = 0;
while( true ) {
bVar3 = false;
if (local_18 < *(byte **)(local_10 + 4)) {
local_2c = ch2x((int)(char)*local_18);
bVar3 = -1 < local_2c;
}
if (!bVar3) break;
local_10[9] = local_10[9] * 0x10 + local_2c;
local_18 = local_18 + 1;
}
local_1c = 5;
goto LAB_0019deb2;
}
if ((' ' < (char)*local_18) && ((char)*local_18 < '\x7f')) {
param_1[9] = (int)(char)*local_18;
local_1c = 5;
local_18 = local_18 + 1;
goto LAB_0019deb2;
}
if (0x7f < *local_18) {
local_38 = my_charset_utf8mb3_general_ci;
iVar2 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_40,local_18,
*(int8 *)(param_1 + 4));
if (0 < iVar2) {
local_1c = 5;
local_18 = local_18 + iVar2;
local_10[9] = local_40[0];
goto LAB_0019deb2;
}
}
local_1c = 6;
goto LAB_0019deb2;
}
param_1[8] = 1;
while( true ) {
local_18 = local_18 + 1;
bVar3 = false;
if ((local_18 < *(byte **)(param_1 + 4)) && (bVar3 = false, *local_18 == 0x3c)) {
bVar3 = (int)param_1[8] < 4;
}
if (!bVar3) break;
param_1[8] = param_1[8] + 1;
}
local_1c = 1;
goto LAB_0019deb2;
LAB_0019deab:
local_1c = 0;
goto LAB_0019deb2;
while ((*local_18 != 0x5d || (local_28 = local_28 + -1, local_28 != 0))) {
LAB_0019dbae:
pbVar1 = local_18;
local_18 = pbVar1 + 1;
if (*(byte **)(param_1 + 4) <= local_18) {
local_1c = 6;
goto LAB_0019deb2;
}
if (*local_18 == 0x5b) {
local_28 = local_28 + 1;
goto LAB_0019dbae;
}
}
local_1c = 7;
local_18 = pbVar1 + 2;
LAB_0019deb2:
*(int8 *)(local_10 + 6) = *(int8 *)(local_10 + 2);
*(byte **)(local_10 + 2) = local_18;
*local_10 = local_1c;
return local_1c;
}
|
|
10,989 |
testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>::operator=(testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>&&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
|
class GTEST_API_ Matcher<const internal::StringView&>
: public internal::MatcherBase<const internal::StringView&> {
public:
Matcher() = default;
explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
: internal::MatcherBase<const internal::StringView&>(impl) {}
template <typename M, typename = typename std::remove_reference<
M>::type::is_gtest_matcher>
Matcher(M&& m) // NOLINT
: internal::MatcherBase<const internal::StringView&>(std::forward<M>(m)) {
}
// Allows the user to write str instead of Eq(str) sometimes, where
// str is a std::string object.
Matcher(const std::string& s); // NOLINT
// Allows the user to write "foo" instead of Eq("foo") sometimes.
Matcher(const char* s); // NOLINT
// Allows the user to pass absl::string_views or std::string_views directly.
Matcher(internal::StringView s); // NOLINT
}
|
O0
|
c
|
testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>::operator=(testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>&&):
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0x13b090
popq %rax
retq
|
_ZN7testing7MatcherIRKSt17basic_string_viewIcSt11char_traitsIcEEED2Ev:
push rax
mov [rsp+8+var_8], rdi
mov rdi, [rsp+8+var_8]
call _ZN7testing8internal11MatcherBaseIRKSt17basic_string_viewIcSt11char_traitsIcEEED2Ev; testing::internal::MatcherBase<std::string_view const&>::~MatcherBase()
pop rax
retn
|
long long testing::Matcher<std::string_view const&>::~Matcher(long long a1)
{
testing::internal::MatcherBase<std::string_view const&>::~MatcherBase(a1);
return a1;
}
|
clear:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
RET
|
/* fmt::v10::detail::buffer<char>::clear() */
void __thiscall fmt::v10::detail::buffer<char>::clear(buffer<char> *this)
{
*(int8 *)(this + 0x10) = 0;
return;
}
|
|
10,990 |
read_long_data2
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool read_long_data2(MARIA_HA *info, uchar *to, ulong length,
MARIA_EXTENT_CURSOR *extent,
uchar **data, uchar **end_of_data)
{
uint left_length= (uint) (*end_of_data - *data);
DBUG_ENTER("read_long_data2");
DBUG_PRINT("enter", ("length: %lu left_length: %u",
length, left_length));
DBUG_ASSERT(*data <= *end_of_data);
/*
Fields are never split in middle. This means that if length > rest-of-data
we should start reading from the next extent. The reason we may have
data left on the page is that if the fixed part of the row was less than
min_block_length the head block was extended to min_block_length.
This may change in the future, which is why we have the loop written
the way it's written.
*/
if (extent->first_extent && length > left_length)
{
*end_of_data= *data;
left_length= 0;
}
for(;;)
{
if (unlikely(left_length >= length))
{
memcpy(to, *data, length);
(*data)+= length;
DBUG_PRINT("info", ("left_length: %u", left_length - (uint) length));
DBUG_RETURN(0);
}
memcpy(to, *data, left_length);
to+= left_length;
length-= left_length;
if (!(*data= read_next_extent(info, extent, end_of_data)))
break;
left_length= (uint) (*end_of_data - *data);
}
DBUG_RETURN(1);
}
|
O0
|
c
|
read_long_data2:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x60ae6
jmp 0x60ae8
jmp 0x60aea
movq -0x28(%rbp), %rax
movsbl 0x34(%rax), %eax
cmpl $0x0, %eax
je 0x60b18
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x60b18
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x3c(%rbp)
jmp 0x60b1a
movl -0x3c(%rbp), %eax
cmpq -0x20(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x60b68
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x60b60
jmp 0x60b62
movb $0x0, -0x1(%rbp)
jmp 0x60bdc
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movl -0x3c(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x588b0
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x60bbd
jmp 0x60bd6
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x60b1a
jmp 0x60bd8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
read_long_data2:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov rax, [rax]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_3C], eax
jmp short $+2
loc_60AE6:
jmp short $+2
loc_60AE8:
jmp short $+2
loc_60AEA:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax+34h]
cmp eax, 0
jz short loc_60B18
mov rax, [rbp+var_20]
mov ecx, [rbp+var_3C]
cmp rax, rcx
jbe short loc_60B18
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_38]
mov [rax], rcx
mov [rbp+var_3C], 0
loc_60B18:
jmp short $+2
loc_60B1A:
mov eax, [rbp+var_3C]
cmp rax, [rbp+var_20]
setnb al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_60B68
mov rdi, [rbp+var_18]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
add rcx, [rax]
mov [rax], rcx
jmp short $+2
loc_60B60:
jmp short $+2
loc_60B62:
mov [rbp+var_1], 0
jmp short loc_60BDC
loc_60B68:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov eax, [rbp+var_3C]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_3C]
mov ecx, eax
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call read_next_extent
mov rcx, [rbp+var_30]
mov [rcx], rax
cmp rax, 0
jnz short loc_60BBD
jmp short loc_60BD6
loc_60BBD:
mov rax, [rbp+var_38]
mov rax, [rax]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_3C], eax
jmp loc_60B1A
loc_60BD6:
jmp short $+2
loc_60BD8:
mov [rbp+var_1], 1
loc_60BDC:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char read_long_data2(_DWORD *a1, long long a2, unsigned long long a3, long long a4, long long *a5, _DWORD *a6)
{
long long v6; // r8
int v7; // r9d
long long next_extent; // rax
unsigned int v10; // [rsp+4h] [rbp-3Ch]
unsigned long long v14; // [rsp+20h] [rbp-20h]
v14 = a3;
v10 = *a6 - *(_DWORD *)a5;
if ( *(_BYTE *)(a4 + 52) && a3 > v10 )
{
*(_QWORD *)a6 = *a5;
v10 = 0;
}
while ( 1 )
{
if ( v10 >= v14 )
{
memcpy(a2, *a5, v14);
*a5 += v14;
return 0;
}
memcpy(a2, *a5, v10);
a2 += v10;
v14 -= v10;
next_extent = read_next_extent(a1, a4, (long long)a6, v10, v6, v7);
*a5 = next_extent;
if ( !next_extent )
break;
v10 = *a6 - *(_DWORD *)a5;
}
return 1;
}
|
read_long_data2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00160ae6
LAB_00160ae6:
JMP 0x00160ae8
LAB_00160ae8:
JMP 0x00160aea
LAB_00160aea:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX + 0x34]
CMP EAX,0x0
JZ 0x00160b18
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x3c]
CMP RAX,RCX
JBE 0x00160b18
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x3c],0x0
LAB_00160b18:
JMP 0x00160b1a
LAB_00160b1a:
MOV EAX,dword ptr [RBP + -0x3c]
CMP RAX,qword ptr [RBP + -0x20]
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00160b68
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x00160b60
LAB_00160b60:
JMP 0x00160b62
LAB_00160b62:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00160bdc
LAB_00160b68:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x3c]
MOV EDX,EAX
CALL 0x0012a090
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001588b0
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00160bbd
JMP 0x00160bd6
LAB_00160bbd:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00160b1a
LAB_00160bd6:
JMP 0x00160bd8
LAB_00160bd8:
MOV byte ptr [RBP + -0x1],0x1
LAB_00160bdc:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
read_long_data2(int8 param_1,void *param_2,ulong param_3,long param_4,long *param_5,
long *param_6)
{
long lVar1;
uint local_44;
ulong local_28;
void *local_20;
local_44 = (int)*param_6 - (int)*param_5;
local_28 = param_3;
local_20 = param_2;
if ((*(char *)(param_4 + 0x34) != '\0') && (local_44 < param_3)) {
*param_6 = *param_5;
local_44 = 0;
}
while( true ) {
if (local_28 <= local_44) {
memcpy(local_20,(void *)*param_5,local_28);
*param_5 = local_28 + *param_5;
return 0;
}
memcpy(local_20,(void *)*param_5,(ulong)local_44);
local_20 = (void *)((long)local_20 + (ulong)local_44);
local_28 = local_28 - local_44;
lVar1 = read_next_extent(param_1,param_4,param_6);
*param_5 = lVar1;
if (lVar1 == 0) break;
local_44 = (int)*param_6 - (int)*param_5;
}
return 1;
}
|
|
10,991 |
free_root
|
eloqsql/mysys/my_alloc.c
|
void free_root(MEM_ROOT *root, myf MyFlags)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
/*
There is no point in using mark_blocks_free when using valgrind as
it will not reclaim any memory
*/
if (MyFlags & MY_MARK_BLOCKS_FREE)
{
mark_blocks_free(root);
DBUG_VOID_RETURN;
}
#endif
if (!(MyFlags & MY_KEEP_PREALLOC))
root->pre_alloc=0;
for (next=root->used; next ;)
{
old=next; next= next->next ;
if (old != root->pre_alloc)
my_free(old);
}
for (next=root->free ; next ;)
{
old=next; next= next->next;
if (old != root->pre_alloc)
my_free(old);
}
root->used=root->free=0;
if (root->pre_alloc)
{
root->free=root->pre_alloc;
root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(root->pre_alloc);
root->free->next=0;
}
root->block_num= 4;
root->first_block_usage= 0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
free_root:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testb $0x2, %sil
jne 0x4d8b8
testb $0x1, %sil
jne 0x4d851
movq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4d870
movq (%rdi), %r14
cmpq 0x10(%rbx), %rdi
je 0x4d868
callq 0x454fa
movq %r14, %rdi
testq %r14, %r14
jne 0x4d85a
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d88e
movq (%rdi), %r14
cmpq 0x10(%rbx), %rdi
je 0x4d886
callq 0x454fa
movq %r14, %rdi
testq %r14, %r14
jne 0x4d878
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x4d902
movq %rax, (%rbx)
movq 0x10(%rax), %rcx
addq $-0x18, %rcx
movq %rcx, 0x8(%rax)
movq (%rbx), %rax
movq $0x0, (%rax)
jmp 0x4d902
movq (%rbx), %rax
movq %rbx, %rcx
testq %rax, %rax
je 0x4d8d7
movq %rax, %rcx
movq (%rax), %rax
movq 0x10(%rcx), %rdx
addq $-0x18, %rdx
movq %rdx, 0x8(%rcx)
jmp 0x4d8be
movq 0x8(%rbx), %rax
movq %rax, (%rcx)
testq %rax, %rax
je 0x4d8fa
movq (%rax), %rcx
movq 0x10(%rax), %rdx
addq $-0x18, %rdx
movq %rdx, 0x8(%rax)
movq %rcx, %rax
testq %rcx, %rcx
jne 0x4d8e3
movq $0x0, 0x8(%rbx)
movq $0x4, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
free_root:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
test sil, 2
jnz short loc_4D8B8
test sil, 1
jnz short loc_4D851
mov qword ptr [rbx+10h], 0
loc_4D851:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_4D870
loc_4D85A:
mov r14, [rdi]
cmp rdi, [rbx+10h]
jz short loc_4D868
call my_free
loc_4D868:
mov rdi, r14
test r14, r14
jnz short loc_4D85A
loc_4D870:
mov rdi, [rbx]
test rdi, rdi
jz short loc_4D88E
loc_4D878:
mov r14, [rdi]
cmp rdi, [rbx+10h]
jz short loc_4D886
call my_free
loc_4D886:
mov rdi, r14
test r14, r14
jnz short loc_4D878
loc_4D88E:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov rax, [rbx+10h]
test rax, rax
jz short loc_4D902
mov [rbx], rax
mov rcx, [rax+10h]
add rcx, 0FFFFFFFFFFFFFFE8h
mov [rax+8], rcx
mov rax, [rbx]
mov qword ptr [rax], 0
jmp short loc_4D902
loc_4D8B8:
mov rax, [rbx]
mov rcx, rbx
loc_4D8BE:
test rax, rax
jz short loc_4D8D7
mov rcx, rax
mov rax, [rax]
mov rdx, [rcx+10h]
add rdx, 0FFFFFFFFFFFFFFE8h
mov [rcx+8], rdx
jmp short loc_4D8BE
loc_4D8D7:
mov rax, [rbx+8]
mov [rcx], rax
test rax, rax
jz short loc_4D8FA
loc_4D8E3:
mov rcx, [rax]
mov rdx, [rax+10h]
add rdx, 0FFFFFFFFFFFFFFE8h
mov [rax+8], rdx
mov rax, rcx
test rcx, rcx
jnz short loc_4D8E3
loc_4D8FA:
mov qword ptr [rbx+8], 0
loc_4D902:
mov qword ptr [rbx+28h], 4
pop rbx
pop r14
pop rbp
retn
|
_QWORD * free_root(_QWORD *a1, char a2)
{
_QWORD *v3; // rdi
_QWORD *v4; // r14
_QWORD *v5; // rdi
_QWORD *v6; // r14
_QWORD *result; // rax
_QWORD *v8; // rax
_QWORD *v9; // rcx
_QWORD *v10; // rcx
if ( (a2 & 2) != 0 )
{
v8 = (_QWORD *)*a1;
v9 = a1;
while ( v8 )
{
v9 = v8;
v8 = (_QWORD *)*v8;
v9[1] = v9[2] - 24LL;
}
result = (_QWORD *)a1[1];
*v9 = result;
if ( result )
{
do
{
v10 = (_QWORD *)*result;
result[1] = result[2] - 24LL;
result = v10;
}
while ( v10 );
}
a1[1] = 0LL;
}
else
{
if ( (a2 & 1) == 0 )
a1[2] = 0LL;
v3 = (_QWORD *)a1[1];
if ( v3 )
{
do
{
v4 = (_QWORD *)*v3;
if ( v3 != (_QWORD *)a1[2] )
my_free((long long)v3);
v3 = v4;
}
while ( v4 );
}
v5 = (_QWORD *)*a1;
if ( *a1 )
{
do
{
v6 = (_QWORD *)*v5;
if ( v5 != (_QWORD *)a1[2] )
my_free((long long)v5);
v5 = v6;
}
while ( v6 );
}
*(_OWORD *)a1 = 0LL;
result = (_QWORD *)a1[2];
if ( result )
{
*a1 = result;
result[1] = result[2] - 24LL;
result = (_QWORD *)*a1;
*(_QWORD *)*a1 = 0LL;
}
}
a1[5] = 4LL;
return result;
}
|
free_root:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
TEST SIL,0x2
JNZ 0x0014d8b8
TEST SIL,0x1
JNZ 0x0014d851
MOV qword ptr [RBX + 0x10],0x0
LAB_0014d851:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0014d870
LAB_0014d85a:
MOV R14,qword ptr [RDI]
CMP RDI,qword ptr [RBX + 0x10]
JZ 0x0014d868
CALL 0x001454fa
LAB_0014d868:
MOV RDI,R14
TEST R14,R14
JNZ 0x0014d85a
LAB_0014d870:
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0014d88e
LAB_0014d878:
MOV R14,qword ptr [RDI]
CMP RDI,qword ptr [RBX + 0x10]
JZ 0x0014d886
CALL 0x001454fa
LAB_0014d886:
MOV RDI,R14
TEST R14,R14
JNZ 0x0014d878
LAB_0014d88e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x0014d902
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,-0x18
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX],0x0
JMP 0x0014d902
LAB_0014d8b8:
MOV RAX,qword ptr [RBX]
MOV RCX,RBX
LAB_0014d8be:
TEST RAX,RAX
JZ 0x0014d8d7
MOV RCX,RAX
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RCX + 0x10]
ADD RDX,-0x18
MOV qword ptr [RCX + 0x8],RDX
JMP 0x0014d8be
LAB_0014d8d7:
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x0014d8fa
LAB_0014d8e3:
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x10]
ADD RDX,-0x18
MOV qword ptr [RAX + 0x8],RDX
MOV RAX,RCX
TEST RCX,RCX
JNZ 0x0014d8e3
LAB_0014d8fa:
MOV qword ptr [RBX + 0x8],0x0
LAB_0014d902:
MOV qword ptr [RBX + 0x28],0x4
POP RBX
POP R14
POP RBP
RET
|
void free_root(long *param_1,byte param_2)
{
int8 *puVar1;
long lVar2;
int8 *puVar3;
long *plVar4;
long *plVar5;
long *plVar6;
bool bVar7;
if ((param_2 & 2) == 0) {
if ((param_2 & 1) == 0) {
param_1[2] = 0;
}
puVar3 = (int8 *)param_1[1];
while (puVar3 != (int8 *)0x0) {
puVar1 = (int8 *)*puVar3;
bVar7 = puVar3 != (int8 *)param_1[2];
puVar3 = puVar1;
if (bVar7) {
my_free();
}
}
puVar3 = (int8 *)*param_1;
while (puVar3 != (int8 *)0x0) {
puVar1 = (int8 *)*puVar3;
bVar7 = puVar3 != (int8 *)param_1[2];
puVar3 = puVar1;
if (bVar7) {
my_free();
}
}
*param_1 = 0;
param_1[1] = 0;
lVar2 = param_1[2];
if (lVar2 != 0) {
*param_1 = lVar2;
*(long *)(lVar2 + 8) = *(long *)(lVar2 + 0x10) + -0x18;
*(int8 *)*param_1 = 0;
}
}
else {
plVar4 = (long *)*param_1;
plVar6 = param_1;
while (plVar5 = plVar4, plVar5 != (long *)0x0) {
plVar5[1] = plVar5[2] + -0x18;
plVar4 = (long *)*plVar5;
plVar6 = plVar5;
}
puVar3 = (int8 *)param_1[1];
*plVar6 = (long)puVar3;
while (puVar3 != (int8 *)0x0) {
puVar3[1] = puVar3[2] + -0x18;
puVar3 = (int8 *)*puVar3;
}
param_1[1] = 0;
}
param_1[5] = 4;
return;
}
|
|
10,992 |
js_find_loaded_module
|
bluesky950520[P]quickjs/quickjs.c
|
static JSModuleDef *js_find_loaded_module(JSContext *ctx, JSAtom name)
{
struct list_head *el;
JSModuleDef *m;
/* first look at the loaded modules */
list_for_each(el, &ctx->loaded_modules) {
m = list_entry(el, JSModuleDef, link);
if (m->module_name == name)
return m;
}
return NULL;
}
|
O2
|
c
|
js_find_loaded_module:
leaq 0x1e0(%rdi), %rcx
addq $0x1e8, %rdi # imm = 0x1E8
xorl %eax, %eax
movq (%rdi), %rdi
cmpq %rcx, %rdi
je 0x39499
cmpl %esi, -0x4(%rdi)
je 0x39492
addq $0x8, %rdi
jmp 0x3947f
addq $-0x8, %rdi
movq %rdi, %rax
retq
|
js_find_loaded_module:
lea rcx, [rdi+1E0h]
add rdi, 1E8h
xor eax, eax
loc_3947F:
mov rdi, [rdi]
cmp rdi, rcx
jz short locret_39499
cmp [rdi-4], esi
jz short loc_39492
add rdi, 8
jmp short loc_3947F
loc_39492:
add rdi, 0FFFFFFFFFFFFFFF8h
mov rax, rdi
locret_39499:
retn
|
long long js_find_loaded_module(long long a1, int a2)
{
long long v2; // rcx
long long *v3; // rdi
long long result; // rax
long long v5; // rdi
v2 = a1 + 480;
v3 = (long long *)(a1 + 488);
result = 0LL;
while ( 1 )
{
v5 = *v3;
if ( v5 == v2 )
break;
if ( *(_DWORD *)(v5 - 4) == a2 )
return v5 - 8;
v3 = (long long *)(v5 + 8);
}
return result;
}
|
js_find_loaded_module:
LEA RCX,[RDI + 0x1e0]
ADD RDI,0x1e8
XOR EAX,EAX
LAB_0013947f:
MOV RDI,qword ptr [RDI]
CMP RDI,RCX
JZ 0x00139499
CMP dword ptr [RDI + -0x4],ESI
JZ 0x00139492
ADD RDI,0x8
JMP 0x0013947f
LAB_00139492:
ADD RDI,-0x8
MOV RAX,RDI
LAB_00139499:
RET
|
long js_find_loaded_module(long param_1,int param_2)
{
long lVar1;
long *plVar2;
plVar2 = (long *)(param_1 + 0x1e8);
while( true ) {
lVar1 = *plVar2;
if (lVar1 == param_1 + 0x1e0) {
return 0;
}
if (*(int *)(lVar1 + -4) == param_2) break;
plVar2 = (long *)(lVar1 + 8);
}
return lVar1 + -8;
}
|
|
10,993 |
ExampleGuardedVector<main::Payload16B>::reserve(unsigned long)
|
BadAccessGuards/benchmarks/../examples/GuardedVectorExample.h
|
void reserve(typename super::size_type newCapacity)
{
BA_GUARD_WRITE(BAShadow);
super::reserve(newCapacity);
}
|
O0
|
c
|
ExampleGuardedVector<main::Payload16B>::reserve(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rsi, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xe0(%rbp)
addq $0x18, %rax
leaq -0xc8(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
je 0xf19a
movq -0xa8(%rbp), %rdi
movl $0x1, %esi
callq 0x10370
movq -0xe0(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq $0x1, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rbp, %rcx
andq $-0x4, %rcx
movq -0x10(%rbp), %rdx
orq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0xc0(%rbp), %rsi
callq 0xeeb0
jmp 0xf1df
leaq -0xc8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
andq $0x3, %rax
cmpq $0x1, %rax
je 0xf246
movq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x10370
jmp 0xf23c
jmp 0xf246
movq %rax, %rdi
callq 0xf7b0
movq -0xe8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rbp, %rcx
andq $-0x4, %rcx
movq -0x28(%rbp), %rdx
orq %rdx, %rcx
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
andq $0x3, %rax
cmpq $0x1, %rax
je 0xf2ec
movq -0x70(%rbp), %rdi
movl $0x1, %esi
callq 0x10370
jmp 0xf2e2
jmp 0xf2ec
movq %rax, %rdi
callq 0xf7b0
movq -0xf0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rbp, %rcx
andq $-0x4, %rcx
movq -0x40(%rbp), %rdx
orq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0xd0(%rbp), %rdi
callq 0x47a0
nopl (%rax,%rax)
|
_ZN20ExampleGuardedVectorImE7reserveEm:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_B8], rdi
mov [rbp+var_C0], rsi
mov rax, [rbp+var_B8]
mov [rbp+var_E0], rax
add rax, 18h
lea rcx, [rbp+var_C8]
mov [rbp+var_98], rcx
mov [rbp+var_A0], rax
mov rax, [rbp+var_98]
mov rcx, [rbp+var_A0]
mov [rax], rcx
mov rax, [rbp+var_A0]
mov rax, [rax]
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
and rax, 3
cmp rax, 0
jz short loc_F19A
mov rdi, [rbp+var_A8]
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
loc_F19A:
mov rdi, [rbp+var_E0]
mov rax, [rbp+var_A0]
mov [rbp+var_8], rax
mov [rbp+var_10], 1
mov rax, [rbp+var_8]
mov rcx, rbp
and rcx, 0FFFFFFFFFFFFFFFCh
mov rdx, [rbp+var_10]
or rcx, rdx
mov [rbp+var_18], rcx
mov rcx, [rbp+var_18]
mov [rax], rcx
mov rsi, [rbp+var_C0]
call _ZNSt6vectorImSaImEE7reserveEm; std::vector<ulong>::reserve(ulong)
jmp short $+2
loc_F1DF:
lea rax, [rbp+var_C8]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
mov [rbp+var_E8], rax
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
and rax, 3
cmp rax, 1
jz short loc_F246
mov rdi, [rbp+var_88]
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short $+2
loc_F23C:
jmp short loc_F246
mov rdi, rax
call __clang_call_terminate
loc_F246:
mov rax, [rbp+var_E8]
mov rax, [rax]
mov [rbp+var_20], rax
mov [rbp+var_28], 0
mov rax, [rbp+var_20]
mov rcx, rbp
and rcx, 0FFFFFFFFFFFFFFFCh
mov rdx, [rbp+var_28]
or rcx, rdx
mov [rbp+var_30], rcx
mov rcx, [rbp+var_30]
mov [rax], rcx
add rsp, 0F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_D0], rcx
mov [rbp+var_D4], eax
lea rax, [rbp+var_C8]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov [rbp+var_F0], rax
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
and rax, 3
cmp rax, 1
jz short loc_F2EC
mov rdi, [rbp+var_70]
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short $+2
loc_F2E2:
jmp short loc_F2EC
mov rdi, rax
call __clang_call_terminate
loc_F2EC:
mov rax, [rbp+var_F0]
mov rax, [rax]
mov [rbp+var_38], rax
mov [rbp+var_40], 0
mov rax, [rbp+var_38]
mov rcx, rbp
and rcx, 0FFFFFFFFFFFFFFFCh
mov rdx, [rbp+var_40]
or rcx, rdx
mov [rbp+var_48], rcx
mov rcx, [rbp+var_48]
mov [rax], rcx
mov rdi, [rbp+var_D0]
call __Unwind_Resume
|
_QWORD * ExampleGuardedVector<unsigned long>::reserve(long long *a1, unsigned long long a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+28h] [rbp-C8h] BYREF
unsigned long long v4; // [rsp+30h] [rbp-C0h]
long long *v5; // [rsp+38h] [rbp-B8h]
long long v6; // [rsp+40h] [rbp-B0h]
long long v7; // [rsp+48h] [rbp-A8h]
_QWORD *v8; // [rsp+50h] [rbp-A0h]
_QWORD **v9; // [rsp+58h] [rbp-98h]
long long v10; // [rsp+60h] [rbp-90h]
long long v11; // [rsp+68h] [rbp-88h]
_QWORD **v12; // [rsp+70h] [rbp-80h]
long long v13; // [rsp+98h] [rbp-58h]
long long v14; // [rsp+A0h] [rbp-50h]
char *v15; // [rsp+D8h] [rbp-18h]
long long v16; // [rsp+E0h] [rbp-10h]
_QWORD *v17; // [rsp+E8h] [rbp-8h]
long long savedregs; // [rsp+F0h] [rbp+0h] BYREF
v5 = a1;
v4 = a2;
v9 = &v3;
v8 = a1 + 3;
v3 = a1 + 3;
v6 = a1[3];
v7 = v6;
v14 = v6;
if ( (v6 & 3) != 0 )
BAGuardHandleBadAccess(v7, 1LL);
v17 = v8;
v16 = 1LL;
v15 = (char *)&savedregs + 1;
*v8 = (char *)&savedregs + 1;
std::vector<unsigned long>::reserve(a1, v4);
v12 = &v3;
v10 = *v3;
v11 = v10;
v13 = v10;
if ( (v10 & 3) != 1 )
BAGuardHandleBadAccess(v11, 1LL);
result = v3;
*v3 = &savedregs;
return result;
}
|
reserve:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0xb8],RDI
MOV qword ptr [RBP + -0xc0],RSI
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xe0],RAX
ADD RAX,0x18
LEA RCX,[RBP + -0xc8]
MOV qword ptr [RBP + -0x98],RCX
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0xa0]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3
CMP RAX,0x0
JZ 0x0010f19a
MOV RDI,qword ptr [RBP + -0xa8]
MOV ESI,0x1
CALL 0x00110370
LAB_0010f19a:
MOV RDI,qword ptr [RBP + -0xe0]
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x10],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RBP
AND RCX,-0x4
MOV RDX,qword ptr [RBP + -0x10]
OR RCX,RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RBP + -0xc0]
LAB_0010f1d8:
CALL 0x0010eeb0
JMP 0x0010f1df
LAB_0010f1df:
LEA RAX,[RBP + -0xc8]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xe8],RAX
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x3
CMP RAX,0x1
JZ 0x0010f246
MOV RDI,qword ptr [RBP + -0x88]
LAB_0010f230:
MOV ESI,0x1
CALL 0x00110370
JMP 0x0010f23c
LAB_0010f23c:
JMP 0x0010f246
LAB_0010f246:
MOV RAX,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RBP
AND RCX,-0x4
MOV RDX,qword ptr [RBP + -0x28]
OR RCX,RDX
MOV qword ptr [RBP + -0x30],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
ADD RSP,0xf0
POP RBP
RET
|
/* ExampleGuardedVector<unsigned long>::reserve(unsigned long) */
void __thiscall
ExampleGuardedVector<unsigned_long>::reserve
(ExampleGuardedVector<unsigned_long> *this,ulong param_1)
{
ExampleGuardedVector<unsigned_long> *local_d0;
ulong local_c8;
ExampleGuardedVector<unsigned_long> *local_c0;
ulong local_b8;
ulong local_b0;
ExampleGuardedVector<unsigned_long> *local_a8;
ExampleGuardedVector<unsigned_long> **local_a0;
ulong local_98;
ulong local_90;
ExampleGuardedVector<unsigned_long> **local_88;
ulong local_60;
ulong local_58;
ulong local_20;
int8 local_18;
ExampleGuardedVector<unsigned_long> *local_10;
local_a8 = this + 0x18;
local_a0 = &local_d0;
local_b8 = *(ulong *)local_a8;
local_c8 = param_1;
local_c0 = this;
local_b0 = local_b8;
local_58 = local_b8;
local_d0 = local_a8;
if ((local_b8 & 3) != 0) {
BAGuardHandleBadAccess(local_b8,1);
}
local_10 = local_a8;
local_18 = 1;
local_20 = (ulong)&stack0xfffffffffffffff8 | 1;
*(ulong *)local_a8 = local_20;
/* try { // try from 0010f1d8 to 0010f1dc has its CatchHandler @ 0010f282 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::reserve
((vector<unsigned_long,std::allocator<unsigned_long>> *)this,local_c8);
local_88 = &local_d0;
local_98 = *(ulong *)local_d0;
if ((local_98 & 3) != 1) {
local_90 = local_98;
local_60 = local_98;
/* try { // try from 0010f230 to 0010f239 has its CatchHandler @ 0010f23e */
BAGuardHandleBadAccess(local_98,1);
}
*(int1 **)local_d0 = &stack0xfffffffffffffff8;
return;
}
|
|
10,994 |
js_execute_async_module
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_execute_async_module(JSContext *ctx, JSModuleDef *m)
{
JSValue promise, m_obj;
JSValue resolve_funcs[2], ret_val;
promise = js_async_function_call(ctx, m->func_obj, JS_UNDEFINED, 0, NULL, 0);
if (JS_IsException(promise))
return -1;
m_obj = JS_NewModuleValue(ctx, m);
resolve_funcs[0] = JS_NewCFunctionData(ctx, js_async_module_execution_fulfilled, 0, 0, 1, (JSValueConst *)&m_obj);
resolve_funcs[1] = JS_NewCFunctionData(ctx, js_async_module_execution_rejected, 0, 0, 1, (JSValueConst *)&m_obj);
ret_val = js_promise_then(ctx, promise, 2, (JSValueConst *)resolve_funcs);
JS_FreeValue(ctx, ret_val);
JS_FreeValue(ctx, m_obj);
JS_FreeValue(ctx, resolve_funcs[0]);
JS_FreeValue(ctx, resolve_funcs[1]);
JS_FreeValue(ctx, promise);
return 0;
}
|
O2
|
c
|
js_execute_async_module:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rsi), %rsi
movq 0x70(%r14), %rdx
andq $0x0, (%rsp)
pushq $0x3
popq %r8
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x3384c
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x4046a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl (%r14)
leaq 0x30(%rsp), %r13
movq %r14, (%r13)
movq $-0x3, 0x8(%r13)
leaq 0x1ba(%rip), %rsi # 0x4063f
pushq $0x1
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r9
movq %rax, %r15
callq 0x1ef6a
movq %rax, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
leaq 0x40(%rsp), %rbp
movq %rax, (%rbp)
movq %rdx, 0x8(%rbp)
leaq 0x2ed(%rip), %rsi # 0x407a6
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
pushq $0x1
popq %r8
movq %r13, %r9
callq 0x1ef6a
movq %rax, 0x18(%rsp)
movq %rdx, %r13
movq %rax, 0x10(%rbp)
movq %rdx, 0x18(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %r8
callq 0x3f543
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1bbce
pushq $-0x3
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bbce
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1bbce
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x1bbce
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1bbce
|
js_execute_async_module:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+68h]
mov rdx, [r14+70h]
and [rsp+98h+var_98], 0
push 3
pop r8
xor ecx, ecx
xor r9d, r9d
call js_async_function_call
mov r12, rdx
cmp r12d, 6
jnz short loc_4046A
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4046A:
inc dword ptr [r14]
lea r13, [rsp+98h+var_68]
mov [r13+0], r14
mov qword ptr [r13+8], 0FFFFFFFFFFFFFFFDh
lea rsi, js_async_module_execution_fulfilled
push 1
pop r8
mov rdi, rbx
xor edx, edx
xor ecx, ecx
mov r9, r13
mov r15, rax
call JS_NewCFunctionData
mov [rsp+98h+var_70], rax
mov [rsp+98h+var_78], rdx
lea rbp, [rsp+98h+var_58]
mov [rbp+0], rax
mov [rbp+8], rdx
lea rsi, js_async_module_execution_rejected
mov rdi, rbx
xor edx, edx
xor ecx, ecx
push 1
pop r8
mov r9, r13
call JS_NewCFunctionData
mov [rsp+98h+var_80], rax
mov r13, rdx
mov [rbp+10h], rax
mov [rbp+18h], rdx
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov r8, rbp
call js_promise_then
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
push 0FFFFFFFFFFFFFFFDh
pop rdx
mov rdi, rbx
mov rsi, r14
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+98h+var_70]
mov rdx, [rsp+98h+var_78]
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+98h+var_80]
mov rdx, r13
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, r12
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_FreeValue
|
unsigned long long js_execute_async_module(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned long long result; // rax
long long v11; // rdx
long long v12; // r12
long long v13; // r15
long long v14; // rdx
long long v15; // rdx
long long v16; // r13
long long v17; // rcx
double v18; // xmm4_8
double v19; // xmm5_8
unsigned long long v20; // rax
long long v21; // rdx
unsigned long long v22; // [rsp+18h] [rbp-80h]
long long v23; // [rsp+20h] [rbp-78h]
unsigned long long v24; // [rsp+28h] [rbp-70h]
_QWORD v25[2]; // [rsp+30h] [rbp-68h] BYREF
_QWORD v26[11]; // [rsp+40h] [rbp-58h] BYREF
result = js_async_function_call(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112), 0, 3, 0, 0LL);
v12 = v11;
if ( (_DWORD)v11 != 6 )
{
++*(_DWORD *)a2;
v25[0] = a2;
v25[1] = -3LL;
v13 = result;
v24 = JS_NewCFunctionData(a1, (long long)js_async_module_execution_fulfilled, 0, 0, 1u, (long long)v25);
v23 = v14;
v26[0] = v24;
v26[1] = v14;
v22 = JS_NewCFunctionData(a1, (long long)js_async_module_execution_rejected, 0, 0, 1u, (long long)v25);
v16 = v15;
v26[2] = v22;
v26[3] = v15;
v20 = js_promise_then(a1, v13, v12, a3, a4, a5, a6, v18, v19, a9, a10, v17, (long long)v26);
JS_FreeValue(a1, v20, v21);
JS_FreeValue(a1, a2, -3LL);
JS_FreeValue(a1, v24, v23);
JS_FreeValue(a1, v22, v16);
return JS_FreeValue(a1, v13, v12);
}
return result;
}
|
js_execute_async_module:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x68]
MOV RDX,qword ptr [R14 + 0x70]
AND qword ptr [RSP],0x0
PUSH 0x3
POP R8
XOR ECX,ECX
XOR R9D,R9D
CALL 0x0013384c
MOV R12,RDX
CMP R12D,0x6
JNZ 0x0014046a
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014046a:
INC dword ptr [R14]
LEA R13,[RSP + 0x30]
MOV qword ptr [R13],R14
MOV qword ptr [R13 + 0x8],-0x3
LEA RSI,[0x14063f]
PUSH 0x1
POP R8
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
MOV R9,R13
MOV R15,RAX
CALL 0x0011ef6a
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RDX
LEA RBP,[RSP + 0x40]
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],RDX
LEA RSI,[0x1407a6]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
PUSH 0x1
POP R8
MOV R9,R13
CALL 0x0011ef6a
MOV qword ptr [RSP + 0x18],RAX
MOV R13,RDX
MOV qword ptr [RBP + 0x10],RAX
MOV qword ptr [RBP + 0x18],RDX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV R8,RBP
CALL 0x0013f543
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011bbce
PUSH -0x3
POP RDX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,R13
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011bbce
|
void js_execute_async_module(int8 param_1,int *param_2)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int1 auVar6 [16];
int *local_68;
int8 local_60;
int1 local_58 [16];
int1 local_48 [16];
auVar6 = js_async_function_call
(param_1,*(int8 *)(param_2 + 0x1a),*(int8 *)(param_2 + 0x1c),0,3,0,
0);
if (auVar6._8_4_ == 6) {
return;
}
*param_2 = *param_2 + 1;
local_60 = 0xfffffffffffffffd;
local_68 = param_2;
local_58 = JS_NewCFunctionData(param_1,js_async_module_execution_fulfilled,0,0,1,&local_68);
uVar4 = local_58._8_8_;
uVar1 = local_58._0_8_;
local_48 = JS_NewCFunctionData(param_1,js_async_module_execution_rejected,0,0,1,&local_68);
uVar5 = local_48._8_8_;
uVar2 = local_48._0_8_;
uVar3 = js_promise_then(param_1,auVar6._0_8_,auVar6._8_8_);
JS_FreeValue(param_1,uVar3);
JS_FreeValue(param_1,param_2,0xfffffffffffffffd);
JS_FreeValue(param_1,uVar1,uVar4);
JS_FreeValue(param_1,uVar2,uVar5);
JS_FreeValue(param_1,auVar6._0_8_,auVar6._8_8_);
return;
}
|
|
10,995 |
ftxui::Box::Union(ftxui::Box, ftxui::Box)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/box.cpp
|
Box Box::Union(Box a, Box b) {
return Box{
std::min(a.x_min, b.x_min),
std::max(a.x_max, b.x_max),
std::min(a.y_min, b.y_min),
std::max(a.y_max, b.y_max),
};
}
|
O0
|
cpp
|
ftxui::Box::Union(ftxui::Box, ftxui::Box):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x20(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4b0c0
movl (%rax), %eax
movl %eax, -0x10(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x3e710
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl (%rax), %eax
movl %eax, -0xc(%rbp)
callq 0x4b0c0
movl (%rax), %eax
movl %eax, -0x8(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x3e710
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nop
|
_ZN5ftxui3Box5UnionES0_S0_:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_20], rdi
lea rax, [rbp+var_18]
mov [rbp+var_40], rax
mov [rbp+var_18], rsi
mov [rbp+var_30], rdx
lea rax, [rbp+var_28]
mov [rbp+var_38], rax
mov [rbp+var_28], rcx
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_30]
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_10], eax
lea rdi, [rbp+var_20+4]
lea rsi, [rbp+var_30+4]
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov eax, [rax]
mov dword ptr [rbp+var_10+4], eax
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_8], eax
lea rdi, [rbp+var_18+4]
lea rsi, [rbp+var_28+4]
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_8+4], eax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long ftxui::Box::Union(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // [rsp+10h] [rbp-30h] BYREF
long long v6; // [rsp+18h] [rbp-28h] BYREF
long long v7; // [rsp+20h] [rbp-20h] BYREF
long long v8; // [rsp+28h] [rbp-18h] BYREF
long long v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v7 = a1;
v8 = a2;
v5 = a3;
v6 = a4;
LODWORD(v9) = *std::min<int>(&v7, &v5);
HIDWORD(v9) = *std::max<int>((_DWORD *)&v7 + 1, (_DWORD *)&v5 + 1);
LODWORD(v10) = *std::min<int>(&v8, &v6);
std::max<int>((_DWORD *)&v8 + 1, (_DWORD *)&v6 + 1);
return v9;
}
|
Union:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x20],RDI
LEA RAX,[RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x30],RDX
LEA RAX,[RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x28],RCX
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x30]
CALL 0x0014b0c0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
LEA RDI,[RBP + -0x1c]
LEA RSI,[RBP + -0x2c]
CALL 0x0013e710
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
CALL 0x0014b0c0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x8],EAX
LEA RDI,[RBP + -0x14]
LEA RSI,[RBP + -0x24]
CALL 0x0013e710
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
/* ftxui::Box::Union(ftxui::Box, ftxui::Box) */
int1 [16]
ftxui::Box::Union(int8 param_1,int8 param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int *piVar2;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int local_18;
int iStack_14;
int local_10;
local_38 = param_3;
local_30 = param_4;
local_28 = param_1;
local_20 = param_2;
piVar2 = std::min<int>((int *)&local_28,(int *)&local_38);
local_18 = *piVar2;
piVar2 = std::max<int>((int *)((long)&local_28 + 4),(int *)((long)&local_38 + 4));
iStack_14 = *piVar2;
piVar2 = std::min<int>((int *)&local_20,(int *)&local_30);
local_10 = *piVar2;
piVar2 = std::max<int>((int *)((long)&local_20 + 4),(int *)((long)&local_30 + 4));
auVar1._4_4_ = iStack_14;
auVar1._0_4_ = local_18;
auVar1._8_4_ = local_10;
auVar1._12_4_ = *piVar2;
return auVar1;
}
|
|
10,996 |
my_strxfrm_pad_desc_and_reverse_nopad
|
eloqsql/strings/ctype-simple.c
|
size_t
my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
memset(frmend, 0x00, fill_length);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
memset(frmend, 0x00, fill_length);
frmend= strend;
}
return frmend - str;
}
|
O0
|
c
|
my_strxfrm_pad_desc_and_reverse_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x119942
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x119942
movl -0x28(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x119942
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x98(%rdx), %ecx
cmpl %ecx, %eax
jae 0x11990b
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x11991c
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x98(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x11cb40
movl -0x28(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x119992
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x119992
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strxfrm_pad_desc_and_reverse_nopad:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_24], 0
jz short loc_119942
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_119942
mov eax, [rbp+var_28]
and eax, 40h
cmp eax, 0
jz short loc_119942
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov ecx, [rbp+var_24]
mov rdx, [rbp+var_8]
imul ecx, [rdx+98h]
cmp eax, ecx
jnb short loc_11990B
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_3C], eax
jmp short loc_11991C
loc_11990B:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
imul eax, [rcx+98h]
mov [rbp+var_3C], eax
loc_11991C:
mov eax, [rbp+var_3C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_18]
mov eax, [rbp+var_2C]
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_119942:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_28]
mov ecx, [rbp+arg_0]
call my_strxfrm_desc_and_reverse
mov eax, [rbp+var_28]
and eax, 80h
cmp eax, 0
jz short loc_119992
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_119992
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_38]
xor esi, esi
call _memset
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
loc_119992:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rsp, 40h
pop rbp
retn
|
long long my_strxfrm_pad_desc_and_reverse_nopad(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned int v8; // [rsp+4h] [rbp-3Ch]
unsigned long long v11; // [rsp+28h] [rbp-18h]
v11 = a3;
if ( a5 && a3 < a4 && (a6 & 0x40) != 0 )
{
if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) )
v8 = *(_DWORD *)(a1 + 152) * a5;
else
v8 = a4 - a3;
memset(a3, 0LL, v8);
v11 += v8;
}
my_strxfrm_desc_and_reverse(a2, v11, a6, a7);
if ( (a6 & 0x80) != 0 && v11 < a4 )
{
memset(v11, 0LL, a4 - v11);
v11 = a4;
}
return v11 - a2;
}
| |||
10,997 |
my_strxfrm_pad_desc_and_reverse_nopad
|
eloqsql/strings/ctype-simple.c
|
size_t
my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
memset(frmend, 0x00, fill_length);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
memset(frmend, 0x00, fill_length);
frmend= strend;
}
return frmend - str;
}
|
O3
|
c
|
my_strxfrm_pad_desc_and_reverse_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movl 0x10(%rbp), %ecx
testl %r8d, %r8d
sete %al
cmpq %r15, %rdx
setae %sil
testb $0x40, %r12b
sete %dl
orb %al, %dl
orb %sil, %dl
jne 0xb4e05
movl %r8d, %r13d
movl %r15d, %eax
imull 0x98(%rdi), %r13d
subl %r14d, %eax
cmpl %eax, %r13d
cmovael %eax, %r13d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x292c0
movl 0x10(%rbp), %ecx
addq %r13, %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0xb6646
testb %r12b, %r12b
jns 0xb4e30
cmpq %r15, %r14
jae 0xb4e30
movq %r15, %rdx
subq %r14, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x292c0
movq %r15, %r14
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strxfrm_pad_desc_and_reverse_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, r9d
mov r15, rcx
mov r14, rdx
mov rbx, rsi
mov ecx, [rbp+arg_0]
test r8d, r8d
setz al
cmp rdx, r15
setnb sil
test r12b, 40h
setz dl
or dl, al
or dl, sil
jnz short loc_B4E05
mov r13d, r8d
mov eax, r15d
imul r13d, [rdi+98h]
sub eax, r14d
cmp r13d, eax
cmovnb r13d, eax
mov rdi, r14
xor esi, esi
mov rdx, r13
call _memset
mov ecx, [rbp+arg_0]
add r14, r13
loc_B4E05:
mov rdi, rbx
mov rsi, r14
mov edx, r12d
call my_strxfrm_desc_and_reverse
test r12b, r12b
jns short loc_B4E30
cmp r14, r15
jnb short loc_B4E30
mov rdx, r15
sub rdx, r14
mov rdi, r14
xor esi, esi
call _memset
mov r14, r15
loc_B4E30:
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_strxfrm_pad_desc_and_reverse_nopad(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned long long v9; // r14
long long v10; // rcx
long long v11; // r13
v9 = a3;
v10 = a7;
if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 )
{
v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5);
if ( (unsigned int)v11 >= (int)a4 - (int)a3 )
v11 = (unsigned int)(a4 - a3);
memset(a3, 0LL, v11);
v10 = a7;
v9 += v11;
}
my_strxfrm_desc_and_reverse(a2, v9, a6, v10);
if ( (a6 & 0x80u) != 0 && v9 < a4 )
{
memset(v9, 0LL, a4 - v9);
v9 = a4;
}
return v9 - a2;
}
|
my_strxfrm_pad_desc_and_reverse_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,R9D
MOV R15,RCX
MOV R14,RDX
MOV RBX,RSI
MOV ECX,dword ptr [RBP + 0x10]
TEST R8D,R8D
SETZ AL
CMP RDX,R15
SETNC SIL
TEST R12B,0x40
SETZ DL
OR DL,AL
OR DL,SIL
JNZ 0x001b4e05
MOV R13D,R8D
MOV EAX,R15D
IMUL R13D,dword ptr [RDI + 0x98]
SUB EAX,R14D
CMP R13D,EAX
CMOVNC R13D,EAX
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R13
CALL 0x001292c0
MOV ECX,dword ptr [RBP + 0x10]
ADD R14,R13
LAB_001b4e05:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R12D
CALL 0x001b6646
TEST R12B,R12B
JNS 0x001b4e30
CMP R14,R15
JNC 0x001b4e30
MOV RDX,R15
SUB RDX,R14
MOV RDI,R14
XOR ESI,ESI
CALL 0x001292c0
MOV R14,R15
LAB_001b4e30:
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse_nopad
(long param_1,long param_2,void *param_3,void *param_4,int param_5,uint param_6,
int4 param_7)
{
uint uVar1;
uint uVar2;
if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) {
uVar2 = param_5 * *(int *)(param_1 + 0x98);
uVar1 = (int)param_4 - (int)param_3;
if (uVar1 <= uVar2) {
uVar2 = uVar1;
}
memset(param_3,0,(ulong)uVar2);
param_3 = (void *)((long)param_3 + (ulong)uVar2);
}
my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7);
if (((char)param_6 < '\0') && (param_3 < param_4)) {
memset(param_3,0,(long)param_4 - (long)param_3);
param_3 = param_4;
}
return (long)param_3 - param_2;
}
|
|
10,998 |
find_tail
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool find_tail(MARIA_HA *info, uint length, uint position)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
MARIA_BITMAP_BLOCK *block;
DBUG_ENTER("find_tail");
DBUG_ASSERT(length <= info->s->block_size - PAGE_OVERHEAD_SIZE(info->s));
/* Needed, as there is no error checking in dynamic_element */
if (allocate_dynamic(&info->bitmap_blocks, position))
DBUG_RETURN(1);
block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *);
/*
We have to add DIR_ENTRY_SIZE to ensure we have space for the tail and
it's directroy entry on the page
*/
while (allocate_tail(bitmap, length + DIR_ENTRY_SIZE, block))
if (move_to_next_bitmap(info, bitmap))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O0
|
c
|
find_tail:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x20(%rbp)
jmp 0x61de5
movq -0x10(%rbp), %rdi
addq $0x2c0, %rdi # imm = 0x2C0
movl -0x18(%rbp), %esi
callq 0xddbc0
cmpb $0x0, %al
je 0x61e04
jmp 0x61dfe
movb $0x1, -0x1(%rbp)
jmp 0x61e55
movq -0x10(%rbp), %rax
movq 0x2c0(%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x4, %esi
movq -0x28(%rbp), %rdx
callq 0x61e60
cmpb $0x0, %al
je 0x61e4f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x613f0
cmpb $0x0, %al
je 0x61e4d
jmp 0x61e47
movb $0x1, -0x1(%rbp)
jmp 0x61e55
jmp 0x61e1d
jmp 0x61e51
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
|
find_tail:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
add rax, 0A10h
mov [rbp+var_20], rax
jmp short $+2
loc_61DE5:
mov rdi, [rbp+var_10]
add rdi, 2C0h
mov esi, [rbp+var_18]
call allocate_dynamic
cmp al, 0
jz short loc_61E04
jmp short $+2
loc_61DFE:
mov [rbp+var_1], 1
jmp short loc_61E55
loc_61E04:
mov rax, [rbp+var_10]
mov rax, [rax+2C0h]
mov ecx, [rbp+var_18]
imul rcx, 18h
add rax, rcx
mov [rbp+var_28], rax
loc_61E1D:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_14]
add esi, 4
mov rdx, [rbp+var_28]
call allocate_tail
cmp al, 0
jz short loc_61E4F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call move_to_next_bitmap
cmp al, 0
jz short loc_61E4D
jmp short $+2
loc_61E47:
mov [rbp+var_1], 1
jmp short loc_61E55
loc_61E4D:
jmp short loc_61E1D
loc_61E4F:
jmp short $+2
loc_61E51:
mov [rbp+var_1], 0
loc_61E55:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char find_tail(long long *a1, int a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *a1 + 2576;
if ( (unsigned __int8)allocate_dynamic(a1 + 88, a3) )
return 1;
v4 = 24LL * a3 + a1[88];
while ( (unsigned __int8)allocate_tail(v5, (unsigned int)(a2 + 4), v4) )
{
if ( move_to_next_bitmap(a1, v5) )
return 1;
}
return 0;
}
|
find_tail:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00161de5
LAB_00161de5:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x2c0
MOV ESI,dword ptr [RBP + -0x18]
CALL 0x001ddbc0
CMP AL,0x0
JZ 0x00161e04
JMP 0x00161dfe
LAB_00161dfe:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00161e55
LAB_00161e04:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2c0]
MOV ECX,dword ptr [RBP + -0x18]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_00161e1d:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x14]
ADD ESI,0x4
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00161e60
CMP AL,0x0
JZ 0x00161e4f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001613f0
CMP AL,0x0
JZ 0x00161e4d
JMP 0x00161e47
LAB_00161e47:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00161e55
LAB_00161e4d:
JMP 0x00161e1d
LAB_00161e4f:
JMP 0x00161e51
LAB_00161e51:
MOV byte ptr [RBP + -0x1],0x0
LAB_00161e55:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 find_tail(long *param_1,int param_2,uint param_3)
{
long lVar1;
long lVar2;
char cVar3;
lVar1 = *param_1;
cVar3 = allocate_dynamic(param_1 + 0x58,param_3);
if (cVar3 == '\0') {
lVar2 = param_1[0x58];
do {
cVar3 = allocate_tail(lVar1 + 0xa10,param_2 + 4,lVar2 + (ulong)param_3 * 0x18);
if (cVar3 == '\0') {
return 0;
}
cVar3 = move_to_next_bitmap(param_1,lVar1 + 0xa10);
} while (cVar3 == '\0');
}
return 1;
}
|
|
10,999 |
lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document*)
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
SVGSVGElement::SVGSVGElement(Document* document)
: SVGGraphicsElement(document, ElementID::Svg)
, SVGFitToViewBox(this)
, m_x(PropertyID::X, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
, m_y(PropertyID::Y, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None)
, m_width(PropertyID::Width, LengthDirection::Horizontal, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent)
, m_height(PropertyID::Height, LengthDirection::Vertical, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent)
{
addProperty(m_x);
addProperty(m_y);
addProperty(m_width);
addProperty(m_height);
}
|
O0
|
cpp
|
lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movl $0x14, %edx
callq 0x1a4a0
movq -0x28(%rbp), %rsi
leaq 0xa70a7(%rip), %rax # 0xc1978
movq %rax, (%rsi)
movq %rsi, %rdi
addq $0x98, %rdi
callq 0x1a140
jmp 0x1a8e5
movq -0x28(%rbp), %rdi
leaq 0xa7088(%rip), %rax # 0xc1978
movq %rax, (%rdi)
addq $0xd0, %rdi
movq %rdi, -0x30(%rbp)
movl $0x4b, %esi
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x20d00
jmp 0x1a916
movq -0x28(%rbp), %rdi
addq $0xe8, %rdi
movq %rdi, -0x38(%rbp)
movl $0x4e, %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x1a93f
movq -0x28(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
movq %rdi, -0x40(%rbp)
movl $0x4a, %esi
xorl %edx, %edx
movss 0x71a73(%rip), %xmm0 # 0x8c3d0
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x1a96d
movq -0x28(%rbp), %rdi
addq $0x118, %rdi # imm = 0x118
movq %rdi, -0x48(%rbp)
movl $0x1b, %esi
movss 0x71a47(%rip), %xmm0 # 0x8c3d0
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x20d00
jmp 0x1a99c
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0xd0, %rsi
callq 0x19a70
jmp 0x1a9b1
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0xe8, %rsi
callq 0x19a70
jmp 0x1a9c6
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x100, %rsi # imm = 0x100
callq 0x19a70
jmp 0x1a9db
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x118, %rsi # imm = 0x118
callq 0x19a70
jmp 0x1a9f0
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1aa7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1aa6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1aa63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1aa5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1aa51
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xfb10
movq -0x40(%rbp), %rdi
callq 0xfb10
movq -0x38(%rbp), %rdi
callq 0xfb10
movq -0x30(%rbp), %rdi
callq 0xfb10
movq -0x28(%rbp), %rdi
addq $0x98, %rdi
callq 0xfb30
movq -0x28(%rbp), %rdi
callq 0xfb60
movq -0x18(%rbp), %rdi
callq 0xb6c0
nop
|
_ZN7lunasvg13SVGSVGElementC2EPNS_8DocumentE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_28], rdi
mov rsi, [rbp+var_10]
mov edx, 14h
call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID)
mov rsi, [rbp+var_28]; lunasvg::SVGElement *
lea rax, off_C1978
mov [rsi], rax
mov rdi, rsi
add rdi, 98h; this
call _ZN7lunasvg15SVGFitToViewBoxC2EPNS_10SVGElementE; lunasvg::SVGFitToViewBox::SVGFitToViewBox(lunasvg::SVGElement *)
jmp short $+2
loc_1A8E5:
mov rdi, [rbp+var_28]
lea rax, off_C1978
mov [rdi], rax
add rdi, 0D0h
mov [rbp+var_30], rdi
mov esi, 4Bh ; 'K'
xorps xmm0, xmm0
xor r8d, r8d
mov edx, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_1A916:
mov rdi, [rbp+var_28]
add rdi, 0E8h
mov [rbp+var_38], rdi
mov esi, 4Eh ; 'N'
mov edx, 1
xorps xmm0, xmm0
xor r8d, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_1A93F:
mov rdi, [rbp+var_28]
add rdi, 100h
mov [rbp+var_40], rdi
mov esi, 4Ah ; 'J'
xor edx, edx
movss xmm0, cs:dword_8C3D0
mov r8d, 1
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_1A96D:
mov rdi, [rbp+var_28]
add rdi, 118h
mov [rbp+var_48], rdi
mov esi, 1Bh
movss xmm0, cs:dword_8C3D0
mov r8d, 1
mov edx, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_1A99C:
mov rdi, [rbp+var_28]; this
mov rsi, rdi
add rsi, 0D0h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_1A9B1:
mov rdi, [rbp+var_28]; this
mov rsi, rdi
add rsi, 0E8h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_1A9C6:
mov rdi, [rbp+var_28]; this
mov rsi, rdi
add rsi, 100h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_1A9DB:
mov rdi, [rbp+var_28]; this
mov rsi, rdi
add rsi, 118h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_1A9F0:
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_1AA7C
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_1AA6C
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_1AA63
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_1AA5A
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_1AA51
mov rdi, [rbp+var_48]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_1AA51:
mov rdi, [rbp+var_40]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_1AA5A:
mov rdi, [rbp+var_38]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_1AA63:
mov rdi, [rbp+var_30]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_1AA6C:
mov rdi, [rbp+var_28]
add rdi, 98h; this
call _ZN7lunasvg15SVGFitToViewBoxD2Ev; lunasvg::SVGFitToViewBox::~SVGFitToViewBox()
loc_1AA7C:
mov rdi, [rbp+var_28]; this
call _ZN7lunasvg18SVGGraphicsElementD2Ev; lunasvg::SVGGraphicsElement::~SVGGraphicsElement()
mov rdi, [rbp+var_18]
call __Unwind_Resume
|
long long lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::SVGSVGElement *this, lunasvg::Document *a2)
{
lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, a2, 20);
*(_QWORD *)this = off_C1978;
lunasvg::SVGFitToViewBox::SVGFitToViewBox((lunasvg::SVGSVGElement *)((char *)this + 152), this);
*(_QWORD *)this = off_C1978;
lunasvg::SVGLength::SVGLength((char *)this + 208, 75LL, 0LL, 0LL, 0.0);
lunasvg::SVGLength::SVGLength((char *)this + 232, 78LL, 1LL, 0LL, 0.0);
lunasvg::SVGLength::SVGLength((char *)this + 256, 74LL, 0LL, 1LL, COERCE_DOUBLE(1120403456LL));
lunasvg::SVGLength::SVGLength((char *)this + 280, 27LL, 1LL, 1LL, COERCE_DOUBLE(1120403456LL));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGSVGElement *)((char *)this + 208));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGSVGElement *)((char *)this + 232));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGSVGElement *)((char *)this + 256));
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGSVGElement *)((char *)this + 280));
}
|
SVGSVGElement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x14
CALL 0x0011a4a0
MOV RSI,qword ptr [RBP + -0x28]
LEA RAX,[0x1c1978]
MOV qword ptr [RSI],RAX
MOV RDI,RSI
ADD RDI,0x98
LAB_0011a8de:
CALL 0x0011a140
JMP 0x0011a8e5
LAB_0011a8e5:
MOV RDI,qword ptr [RBP + -0x28]
LEA RAX,[0x1c1978]
MOV qword ptr [RDI],RAX
ADD RDI,0xd0
MOV qword ptr [RBP + -0x30],RDI
LAB_0011a8fe:
MOV ESI,0x4b
XORPS XMM0,XMM0
XOR R8D,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0011a916
LAB_0011a916:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0xe8
MOV qword ptr [RBP + -0x38],RDI
LAB_0011a925:
MOV ESI,0x4e
MOV EDX,0x1
XORPS XMM0,XMM0
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0011a93f
LAB_0011a93f:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x100
MOV qword ptr [RBP + -0x40],RDI
LAB_0011a94e:
MOV ESI,0x4a
XOR EDX,EDX
MOVSS XMM0,dword ptr [0x0018c3d0]
MOV R8D,0x1
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0011a96d
LAB_0011a96d:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x118
MOV qword ptr [RBP + -0x48],RDI
LAB_0011a97c:
MOV ESI,0x1b
MOVSS XMM0,dword ptr [0x0018c3d0]
MOV R8D,0x1
MOV EDX,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0011a99c
LAB_0011a99c:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,RDI
ADD RSI,0xd0
LAB_0011a9aa:
CALL 0x00119a70
JMP 0x0011a9b1
LAB_0011a9b1:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,RDI
ADD RSI,0xe8
CALL 0x00119a70
JMP 0x0011a9c6
LAB_0011a9c6:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,RDI
ADD RSI,0x100
CALL 0x00119a70
JMP 0x0011a9db
LAB_0011a9db:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,RDI
ADD RSI,0x118
CALL 0x00119a70
LAB_0011a9ee:
JMP 0x0011a9f0
LAB_0011a9f0:
ADD RSP,0x50
POP RBP
RET
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.