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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,000
|
get_partitioned_key_cache_statistics
|
eloqsql/mysys/mf_keycache.c
|
static
void
get_partitioned_key_cache_statistics(PARTITIONED_KEY_CACHE_CB *keycache,
uint partition_no,
KEY_CACHE_STATISTICS *keycache_stats)
{
uint i;
SIMPLE_KEY_CACHE_CB *partition;
uint partitions= keycache->partitions;
DBUG_ENTER("get_partitioned_key_cache_statistics");
if (partition_no != 0)
{
partition= keycache->partition_array[partition_no-1];
get_simple_key_cache_statistics((void *) partition, 0, keycache_stats);
DBUG_VOID_RETURN;
}
bzero(keycache_stats, sizeof(KEY_CACHE_STATISTICS));
keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size;
keycache_stats->block_size= (longlong) keycache->key_cache_block_size;
for (i = 0; i < partitions; i++)
{
partition= keycache->partition_array[i];
keycache_stats->blocks_used+= partition->blocks_used;
keycache_stats->blocks_unused+= partition->blocks_unused;
keycache_stats->blocks_changed+= partition->global_blocks_changed;
keycache_stats->blocks_warm+= partition->warm_blocks;
keycache_stats->read_requests+= partition->global_cache_r_requests;
keycache_stats->reads+= partition->global_cache_read;
keycache_stats->write_requests+= partition->global_cache_w_requests;
keycache_stats->writes+= partition->global_cache_write;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
get_partitioned_key_cache_statistics:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
je 0x9a92e
movq 0x8(%rdi), %rax
decl %esi
movq (%rax,%rsi,8), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rdx)
movl 0x18(%rax), %ecx
movq %rcx, 0x8(%rdx)
movq 0x50(%rax), %rcx
movq %rcx, 0x10(%rdx)
movq 0x58(%rax), %rcx
movq %rcx, 0x18(%rdx)
movq 0x138(%rax), %rcx
movq %rcx, 0x20(%rdx)
movq 0x68(%rax), %rcx
movq %rcx, 0x28(%rdx)
movq 0x150(%rax), %rcx
movq %rcx, 0x30(%rdx)
movq 0x158(%rax), %rcx
movq %rcx, 0x38(%rdx)
movq 0x140(%rax), %rcx
movq %rcx, 0x40(%rdx)
movq 0x148(%rax), %rax
movq %rax, 0x48(%rdx)
jmp 0x9a9e8
movl 0x1c(%rdi), %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdx)
movups %xmm0, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movq 0x10(%rdi), %rcx
movq %rcx, (%rdx)
movl 0x18(%rdi), %ecx
movq %rcx, 0x8(%rdx)
testq %rax, %rax
je 0x9a9e8
movq 0x10(%rdx), %rcx
movq 0x18(%rdx), %rsi
movq 0x20(%rdx), %r8
movq 0x28(%rdx), %r9
movq 0x30(%rdx), %r10
movq 0x38(%rdx), %r11
movq 0x40(%rdx), %rbx
movq 0x48(%rdx), %r14
xorl %r15d, %r15d
movq 0x8(%rdi), %r12
movq (%r12,%r15,8), %r12
addq 0x50(%r12), %rcx
movq %rcx, 0x10(%rdx)
addq 0x58(%r12), %rsi
movq %rsi, 0x18(%rdx)
addq 0x138(%r12), %r8
movq %r8, 0x20(%rdx)
addq 0x68(%r12), %r9
movq %r9, 0x28(%rdx)
addq 0x150(%r12), %r10
movq %r10, 0x30(%rdx)
addq 0x158(%r12), %r11
movq %r11, 0x38(%rdx)
addq 0x140(%r12), %rbx
movq %rbx, 0x40(%rdx)
addq 0x148(%r12), %r14
movq %r14, 0x48(%rdx)
incq %r15
cmpq %r15, %rax
jne 0x9a981
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
get_partitioned_key_cache_statistics:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
test esi, esi
jz short loc_9A92E
mov rax, [rdi+8]
dec esi
mov rax, [rax+rsi*8]
mov rcx, [rax+8]
mov [rdx], rcx
mov ecx, [rax+18h]
mov [rdx+8], rcx
mov rcx, [rax+50h]
mov [rdx+10h], rcx
mov rcx, [rax+58h]
mov [rdx+18h], rcx
mov rcx, [rax+138h]
mov [rdx+20h], rcx
mov rcx, [rax+68h]
mov [rdx+28h], rcx
mov rcx, [rax+150h]
mov [rdx+30h], rcx
mov rcx, [rax+158h]
mov [rdx+38h], rcx
mov rcx, [rax+140h]
mov [rdx+40h], rcx
mov rax, [rax+148h]
mov [rdx+48h], rax
jmp loc_9A9E8
loc_9A92E:
mov eax, [rdi+1Ch]
xorps xmm0, xmm0
movups xmmword ptr [rdx+40h], xmm0
movups xmmword ptr [rdx+30h], xmm0
movups xmmword ptr [rdx+20h], xmm0
movups xmmword ptr [rdx+10h], xmm0
movups xmmword ptr [rdx], xmm0
mov rcx, [rdi+10h]
mov [rdx], rcx
mov ecx, [rdi+18h]
mov [rdx+8], rcx
test rax, rax
jz loc_9A9E8
mov rcx, [rdx+10h]
mov rsi, [rdx+18h]
mov r8, [rdx+20h]
mov r9, [rdx+28h]
mov r10, [rdx+30h]
mov r11, [rdx+38h]
mov rbx, [rdx+40h]
mov r14, [rdx+48h]
xor r15d, r15d
loc_9A981:
mov r12, [rdi+8]
mov r12, [r12+r15*8]
add rcx, [r12+50h]
mov [rdx+10h], rcx
add rsi, [r12+58h]
mov [rdx+18h], rsi
add r8, [r12+138h]
mov [rdx+20h], r8
add r9, [r12+68h]
mov [rdx+28h], r9
add r10, [r12+150h]
mov [rdx+30h], r10
add r11, [r12+158h]
mov [rdx+38h], r11
add rbx, [r12+140h]
mov [rdx+40h], rbx
add r14, [r12+148h]
mov [rdx+48h], r14
inc r15
cmp rax, r15
jnz short loc_9A981
loc_9A9E8:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long get_partitioned_key_cache_statistics(long long a1, int a2, _QWORD *a3)
{
long long v3; // rax
long long result; // rax
long long v5; // rcx
long long v6; // rsi
long long v7; // r8
long long v8; // r9
long long v9; // r10
long long v10; // r11
long long v11; // rbx
long long v12; // r14
long long i; // r15
_QWORD *v14; // r12
if ( a2 )
{
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (unsigned int)(a2 - 1));
*a3 = *(_QWORD *)(v3 + 8);
a3[1] = *(unsigned int *)(v3 + 24);
a3[2] = *(_QWORD *)(v3 + 80);
a3[3] = *(_QWORD *)(v3 + 88);
a3[4] = *(_QWORD *)(v3 + 312);
a3[5] = *(_QWORD *)(v3 + 104);
a3[6] = *(_QWORD *)(v3 + 336);
a3[7] = *(_QWORD *)(v3 + 344);
a3[8] = *(_QWORD *)(v3 + 320);
result = *(_QWORD *)(v3 + 328);
a3[9] = result;
}
else
{
result = *(unsigned int *)(a1 + 28);
*((_OWORD *)a3 + 4) = 0LL;
*((_OWORD *)a3 + 3) = 0LL;
*((_OWORD *)a3 + 2) = 0LL;
*((_OWORD *)a3 + 1) = 0LL;
*(_OWORD *)a3 = 0LL;
*a3 = *(_QWORD *)(a1 + 16);
a3[1] = *(unsigned int *)(a1 + 24);
if ( result )
{
v5 = a3[2];
v6 = a3[3];
v7 = a3[4];
v8 = a3[5];
v9 = a3[6];
v10 = a3[7];
v11 = a3[8];
v12 = a3[9];
for ( i = 0LL; i != result; ++i )
{
v14 = *(_QWORD **)(*(_QWORD *)(a1 + 8) + 8 * i);
v5 += v14[10];
a3[2] = v5;
v6 += v14[11];
a3[3] = v6;
v7 += v14[39];
a3[4] = v7;
v8 += v14[13];
a3[5] = v8;
v9 += v14[42];
a3[6] = v9;
v10 += v14[43];
a3[7] = v10;
v11 += v14[40];
a3[8] = v11;
v12 += v14[41];
a3[9] = v12;
}
}
}
return result;
}
|
get_partitioned_key_cache_statistics:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST ESI,ESI
JZ 0x0019a92e
MOV RAX,qword ptr [RDI + 0x8]
DEC ESI
MOV RAX,qword ptr [RAX + RSI*0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RDX],RCX
MOV ECX,dword ptr [RAX + 0x18]
MOV qword ptr [RDX + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x50]
MOV qword ptr [RDX + 0x10],RCX
MOV RCX,qword ptr [RAX + 0x58]
MOV qword ptr [RDX + 0x18],RCX
MOV RCX,qword ptr [RAX + 0x138]
MOV qword ptr [RDX + 0x20],RCX
MOV RCX,qword ptr [RAX + 0x68]
MOV qword ptr [RDX + 0x28],RCX
MOV RCX,qword ptr [RAX + 0x150]
MOV qword ptr [RDX + 0x30],RCX
MOV RCX,qword ptr [RAX + 0x158]
MOV qword ptr [RDX + 0x38],RCX
MOV RCX,qword ptr [RAX + 0x140]
MOV qword ptr [RDX + 0x40],RCX
MOV RAX,qword ptr [RAX + 0x148]
MOV qword ptr [RDX + 0x48],RAX
JMP 0x0019a9e8
LAB_0019a92e:
MOV EAX,dword ptr [RDI + 0x1c]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDX + 0x40],XMM0
MOVUPS xmmword ptr [RDX + 0x30],XMM0
MOVUPS xmmword ptr [RDX + 0x20],XMM0
MOVUPS xmmword ptr [RDX + 0x10],XMM0
MOVUPS xmmword ptr [RDX],XMM0
MOV RCX,qword ptr [RDI + 0x10]
MOV qword ptr [RDX],RCX
MOV ECX,dword ptr [RDI + 0x18]
MOV qword ptr [RDX + 0x8],RCX
TEST RAX,RAX
JZ 0x0019a9e8
MOV RCX,qword ptr [RDX + 0x10]
MOV RSI,qword ptr [RDX + 0x18]
MOV R8,qword ptr [RDX + 0x20]
MOV R9,qword ptr [RDX + 0x28]
MOV R10,qword ptr [RDX + 0x30]
MOV R11,qword ptr [RDX + 0x38]
MOV RBX,qword ptr [RDX + 0x40]
MOV R14,qword ptr [RDX + 0x48]
XOR R15D,R15D
LAB_0019a981:
MOV R12,qword ptr [RDI + 0x8]
MOV R12,qword ptr [R12 + R15*0x8]
ADD RCX,qword ptr [R12 + 0x50]
MOV qword ptr [RDX + 0x10],RCX
ADD RSI,qword ptr [R12 + 0x58]
MOV qword ptr [RDX + 0x18],RSI
ADD R8,qword ptr [R12 + 0x138]
MOV qword ptr [RDX + 0x20],R8
ADD R9,qword ptr [R12 + 0x68]
MOV qword ptr [RDX + 0x28],R9
ADD R10,qword ptr [R12 + 0x150]
MOV qword ptr [RDX + 0x30],R10
ADD R11,qword ptr [R12 + 0x158]
MOV qword ptr [RDX + 0x38],R11
ADD RBX,qword ptr [R12 + 0x140]
MOV qword ptr [RDX + 0x40],RBX
ADD R14,qword ptr [R12 + 0x148]
MOV qword ptr [RDX + 0x48],R14
INC R15
CMP RAX,R15
JNZ 0x0019a981
LAB_0019a9e8:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void get_partitioned_key_cache_statistics(long param_1,int param_2,int8 *param_3)
{
uint uVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
ulong uVar11;
if (param_2 == 0) {
uVar1 = *(uint *)(param_1 + 0x1c);
param_3[8] = 0;
param_3[9] = 0;
param_3[6] = 0;
param_3[7] = 0;
param_3[4] = 0;
param_3[5] = 0;
param_3[2] = 0;
param_3[3] = 0;
*param_3 = 0;
param_3[1] = 0;
*param_3 = *(int8 *)(param_1 + 0x10);
param_3[1] = (ulong)*(uint *)(param_1 + 0x18);
if ((ulong)uVar1 != 0) {
lVar3 = param_3[2];
lVar5 = param_3[3];
lVar6 = param_3[4];
lVar7 = param_3[5];
lVar8 = param_3[6];
lVar9 = param_3[7];
lVar4 = param_3[8];
lVar10 = param_3[9];
uVar11 = 0;
do {
lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar11 * 8);
lVar3 = lVar3 + *(long *)(lVar2 + 0x50);
param_3[2] = lVar3;
lVar5 = lVar5 + *(long *)(lVar2 + 0x58);
param_3[3] = lVar5;
lVar6 = lVar6 + *(long *)(lVar2 + 0x138);
param_3[4] = lVar6;
lVar7 = lVar7 + *(long *)(lVar2 + 0x68);
param_3[5] = lVar7;
lVar8 = lVar8 + *(long *)(lVar2 + 0x150);
param_3[6] = lVar8;
lVar9 = lVar9 + *(long *)(lVar2 + 0x158);
param_3[7] = lVar9;
lVar4 = lVar4 + *(long *)(lVar2 + 0x140);
param_3[8] = lVar4;
lVar10 = lVar10 + *(long *)(lVar2 + 0x148);
param_3[9] = lVar10;
uVar11 = uVar11 + 1;
} while (uVar1 != uVar11);
}
}
else {
lVar3 = *(long *)(*(long *)(param_1 + 8) + (ulong)(param_2 - 1) * 8);
*param_3 = *(int8 *)(lVar3 + 8);
param_3[1] = (ulong)*(uint *)(lVar3 + 0x18);
param_3[2] = *(int8 *)(lVar3 + 0x50);
param_3[3] = *(int8 *)(lVar3 + 0x58);
param_3[4] = *(int8 *)(lVar3 + 0x138);
param_3[5] = *(int8 *)(lVar3 + 0x68);
param_3[6] = *(int8 *)(lVar3 + 0x150);
param_3[7] = *(int8 *)(lVar3 + 0x158);
param_3[8] = *(int8 *)(lVar3 + 0x140);
param_3[9] = *(int8 *)(lVar3 + 0x148);
}
return;
}
|
|
14,001
|
safe_lexcstrdup_root
|
eloqsql/mysys/my_alloc.c
|
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
}
|
O0
|
c
|
safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xedb02
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xeda20
movq %rax, -0x10(%rbp)
jmp 0xedb0d
leaq 0x69fd1(%rip), %rax # 0x157ada
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
safe_lexcstrdup_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_20], rsi
mov [rbp+var_18], rdx
mov [rbp+var_28], rdi
cmp [rbp+var_18], 0
jz short loc_EDB02
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call strmake_root
mov [rbp+var_10], rax
jmp short loc_EDB0D
loc_EDB02:
lea rax, asc_157AD6+4; ""
mov [rbp+var_10], rax
loc_EDB0D:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
|
safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x28],RDI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001edb02
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001eda20
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001edb0d
LAB_001edb02:
LEA RAX,[0x257ada]
MOV qword ptr [RBP + -0x10],RAX
LAB_001edb0d:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int1 auVar1 [16];
int *local_18;
if (param_3 == 0) {
local_18 = &DAT_00257ada;
}
else {
local_18 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = local_18;
return auVar1;
}
|
|
14,002
|
test_file_copy
|
tsotchke[P]eshkol/tests/unit/test_file_io.c
|
static void test_file_copy(void) {
printf("Testing file copy...\n");
// Create a temporary file
const char* test_file = "test_file.txt";
const char* copy_file = "copy_file.txt";
// Open the file for writing
File* file = file_open(test_file, FILE_MODE_WRITE);
assert(file != NULL);
// Write to the file
const char* test_data = "Hello, world!";
size_t test_data_len = strlen(test_data);
size_t bytes_written = file_write(file, test_data, test_data_len);
assert(bytes_written == test_data_len);
// Close the file
file_close(file);
// Copy the file
assert(file_copy(test_file, copy_file));
// Check if the original file exists (it should)
assert(file_exists(test_file));
// Check if the copy file exists (it should)
assert(file_exists(copy_file));
// Open the copy file for reading
file = file_open(copy_file, FILE_MODE_READ);
assert(file != NULL);
// Read from the file
char buffer[256];
size_t bytes_read = file_read(file, buffer, test_data_len);
assert(bytes_read == test_data_len);
// Verify the data
buffer[test_data_len] = '\0';
assert(strcmp(buffer, test_data) == 0);
// Close the file
file_close(file);
// Delete the files
assert(file_delete(test_file));
assert(file_delete(copy_file));
printf("PASS: file_copy\n");
}
|
O0
|
c
|
test_file_copy:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
leaq 0x4479(%rip), %rdi # 0x73fb
movb $0x0, %al
callq 0x2130
leaq 0x49b6(%rip), %rax # 0x7946
movq %rax, -0x8(%rbp)
leaq 0x4476(%rip), %rax # 0x7411
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4780
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2fba
jmp 0x2fd9
leaq 0x4a6d(%rip), %rdi # 0x7a2e
leaq 0x4093(%rip), %rsi # 0x705b
movl $0x120, %edx # imm = 0x120
leaq 0x444b(%rip), %rcx # 0x741f
callq 0x2170
leaq 0x415d(%rip), %rax # 0x713d
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2100
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4b00
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x3012
jmp 0x3031
leaq 0x4132(%rip), %rdi # 0x714b
leaq 0x403b(%rip), %rsi # 0x705b
movl $0x126, %edx # imm = 0x126
leaq 0x43f3(%rip), %rcx # 0x741f
callq 0x2170
movq -0x18(%rbp), %rdi
callq 0x49c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x50f0
testb $0x1, %al
jne 0x304d
jmp 0x304f
jmp 0x306e
leaq 0x43e3(%rip), %rdi # 0x7439
leaq 0x3ffe(%rip), %rsi # 0x705b
movl $0x12c, %edx # imm = 0x12C
leaq 0x43b6(%rip), %rcx # 0x741f
callq 0x2170
movq -0x8(%rbp), %rdi
callq 0x4f40
testb $0x1, %al
jne 0x307d
jmp 0x307f
jmp 0x309e
leaq 0x428e(%rip), %rdi # 0x7314
leaq 0x3fce(%rip), %rsi # 0x705b
movl $0x12f, %edx # imm = 0x12F
leaq 0x4386(%rip), %rcx # 0x741f
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x4f40
testb $0x1, %al
jne 0x30ad
jmp 0x30af
jmp 0x30ce
leaq 0x43a3(%rip), %rdi # 0x7459
leaq 0x3f9e(%rip), %rsi # 0x705b
movl $0x132, %edx # imm = 0x132
leaq 0x4356(%rip), %rcx # 0x741f
callq 0x2170
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x4780
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x30e6
jmp 0x3105
leaq 0x4941(%rip), %rdi # 0x7a2e
leaq 0x3f67(%rip), %rsi # 0x705b
movl $0x136, %edx # imm = 0x136
leaq 0x431f(%rip), %rcx # 0x741f
callq 0x2170
movq -0x18(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4a30
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x312f
jmp 0x314e
leaq 0x4034(%rip), %rdi # 0x716a
leaq 0x3f1e(%rip), %rsi # 0x705b
movl $0x13b, %edx # imm = 0x13B
leaq 0x42d6(%rip), %rcx # 0x741f
callq 0x2170
movq -0x28(%rbp), %rax
movb $0x0, -0x130(%rbp,%rax)
leaq -0x130(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x21d0
cmpl $0x0, %eax
jne 0x3171
jmp 0x3190
leaq 0x400e(%rip), %rdi # 0x7186
leaq 0x3edc(%rip), %rsi # 0x705b
movl $0x13f, %edx # imm = 0x13F
leaq 0x4294(%rip), %rcx # 0x741f
callq 0x2170
movq -0x18(%rbp), %rdi
callq 0x49c0
movq -0x8(%rbp), %rdi
callq 0x4fc0
testb $0x1, %al
jne 0x31a8
jmp 0x31aa
jmp 0x31c9
leaq 0x3f1e(%rip), %rdi # 0x70cf
leaq 0x3ea3(%rip), %rsi # 0x705b
movl $0x145, %edx # imm = 0x145
leaq 0x425b(%rip), %rcx # 0x741f
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x4fc0
testb $0x1, %al
jne 0x31d8
jmp 0x31da
jmp 0x31f9
leaq 0x428f(%rip), %rdi # 0x7470
leaq 0x3e73(%rip), %rsi # 0x705b
movl $0x146, %edx # imm = 0x146
leaq 0x422b(%rip), %rcx # 0x741f
callq 0x2170
leaq 0x4287(%rip), %rdi # 0x7487
movb $0x0, %al
callq 0x2130
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
|
test_file_copy:
push rbp
mov rbp, rsp
sub rsp, 140h
lea rdi, aTestingFileCop; "Testing file copy...\n"
mov al, 0
call _printf
lea rax, aTestDirTestFil+9; "test_file.txt"
mov [rbp+var_8], rax
lea rax, aCopyFileTxt; "copy_file.txt"
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
mov esi, 1
call file_open
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_2FBA
jmp short loc_2FD9
loc_2FBA:
lea rdi, aTempFileNull+5; "file != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 120h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_2FD9:
lea rax, aHelloWorld; "Hello, world!"
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _strlen
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call file_write
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_28]
jnz short loc_3012
jmp short loc_3031
loc_3012:
lea rdi, aBytesWrittenTe; "bytes_written == test_data_len"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 126h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_3031:
mov rdi, [rbp+var_18]
call file_close
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call file_copy
test al, 1
jnz short loc_304D
jmp short loc_304F
loc_304D:
jmp short loc_306E
loc_304F:
lea rdi, aFileCopyTestFi; "file_copy(test_file, copy_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 12Ch
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_306E:
mov rdi, [rbp+var_8]
call file_exists
test al, 1
jnz short loc_307D
jmp short loc_307F
loc_307D:
jmp short loc_309E
loc_307F:
lea rdi, aFileExistsTest+1; "file_exists(test_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 12Fh
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_309E:
mov rdi, [rbp+var_10]
call file_exists
test al, 1
jnz short loc_30AD
jmp short loc_30AF
loc_30AD:
jmp short loc_30CE
loc_30AF:
lea rdi, aFileExistsCopy; "file_exists(copy_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 132h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_30CE:
mov rdi, [rbp+var_10]
xor esi, esi
call file_open
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_30E6
jmp short loc_3105
loc_30E6:
lea rdi, aTempFileNull+5; "file != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 136h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_3105:
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_130]
mov rdx, [rbp+var_28]
call file_read
mov [rbp+var_138], rax
mov rax, [rbp+var_138]
cmp rax, [rbp+var_28]
jnz short loc_312F
jmp short loc_314E
loc_312F:
lea rdi, aBytesReadTestD; "bytes_read == test_data_len"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 13Bh
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_314E:
mov rax, [rbp+var_28]
mov [rbp+rax+var_130], 0
lea rdi, [rbp+var_130]
mov rsi, [rbp+var_20]
call _strcmp
cmp eax, 0
jnz short loc_3171
jmp short loc_3190
loc_3171:
lea rdi, aStrcmpBufferTe; "strcmp(buffer, test_data) == 0"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 13Fh
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_3190:
mov rdi, [rbp+var_18]
call file_close
mov rdi, [rbp+var_8]
call file_delete
test al, 1
jnz short loc_31A8
jmp short loc_31AA
loc_31A8:
jmp short loc_31C9
loc_31AA:
lea rdi, aFileDeleteTest; "file_delete(test_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 145h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_31C9:
mov rdi, [rbp+var_10]
call file_delete
test al, 1
jnz short loc_31D8
jmp short loc_31DA
loc_31D8:
jmp short loc_31F9
loc_31DA:
lea rdi, aFileDeleteCopy; "file_delete(copy_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 146h
lea rcx, aVoidTestFileCo; "void test_file_copy(void)"
call ___assert_fail
loc_31F9:
lea rdi, aPassFileCopy; "PASS: file_copy\n"
mov al, 0
call _printf
add rsp, 140h
pop rbp
retn
|
long long test_file_copy(long long a1, long long a2, long long a3)
{
char v3; // al
char v4; // al
long long v5; // rax
const char *v6; // rsi
char v7; // al
long long v8; // rdx
long long v10; // [rsp+8h] [rbp-138h]
_BYTE v11[256]; // [rsp+10h] [rbp-130h] BYREF
long long v12; // [rsp+110h] [rbp-30h]
long long v13; // [rsp+118h] [rbp-28h]
const char *v14; // [rsp+120h] [rbp-20h]
long long v15; // [rsp+128h] [rbp-18h]
const char *v16; // [rsp+130h] [rbp-10h]
char *v17; // [rsp+138h] [rbp-8h]
printf("Testing file copy...\n", a2, a3);
v17 = "test_file.txt";
v16 = "copy_file.txt";
v15 = file_open("test_file.txt", 1LL);
if ( !v15 )
__assert_fail(
"file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
288LL,
"void test_file_copy(void)");
v14 = "Hello, world!";
v13 = strlen("Hello, world!");
v12 = file_write(v15, "Hello, world!", v13);
if ( v12 != v13 )
__assert_fail(
"bytes_written == test_data_len",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
294LL,
"void test_file_copy(void)");
file_close(v15);
if ( (file_copy(v17, v16) & 1) == 0 )
__assert_fail(
"file_copy(test_file, copy_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
300LL,
"void test_file_copy(void)");
v3 = file_exists(v17);
if ( (v3 & 1) == 0 )
__assert_fail(
"file_exists(test_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
303LL,
"void test_file_copy(void)");
v4 = file_exists(v16);
if ( (v4 & 1) == 0 )
__assert_fail(
"file_exists(copy_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
306LL,
"void test_file_copy(void)");
v5 = file_open(v16, 0LL);
v15 = v5;
if ( !v5 )
__assert_fail(
"file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
310LL,
"void test_file_copy(void)");
v10 = file_read(v15, v11, v13);
if ( v10 != v13 )
__assert_fail(
"bytes_read == test_data_len",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
315LL,
"void test_file_copy(void)");
v11[v13] = 0;
v6 = v14;
if ( (unsigned int)strcmp(v11, v14) )
__assert_fail(
"strcmp(buffer, test_data) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
319LL,
"void test_file_copy(void)");
file_close(v15);
if ( (file_delete(v17) & 1) == 0 )
__assert_fail(
"file_delete(test_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
325LL,
"void test_file_copy(void)");
v7 = file_delete(v16);
if ( (v7 & 1) == 0 )
__assert_fail(
"file_delete(copy_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
326LL,
"void test_file_copy(void)");
return printf("PASS: file_copy\n", v6, v8);
}
|
test_file_copy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
LEA RDI,[0x1073e9]
MOV AL,0x0
CALL 0x00102130
LEA RAX,[0x107934]
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x1073ff]
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00104780
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00102fba
JMP 0x00102fd9
LAB_00102fba:
LEA RDI,[0x107a1c]
LEA RSI,[0x10705b]
MOV EDX,0x120
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_00102fd9:
LEA RAX,[0x10712b]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00102100
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00104b00
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00103012
JMP 0x00103031
LAB_00103012:
LEA RDI,[0x107139]
LEA RSI,[0x10705b]
MOV EDX,0x126
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_00103031:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001049c0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001050f0
TEST AL,0x1
JNZ 0x0010304d
JMP 0x0010304f
LAB_0010304d:
JMP 0x0010306e
LAB_0010304f:
LEA RDI,[0x107427]
LEA RSI,[0x10705b]
MOV EDX,0x12c
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_0010306e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104f40
TEST AL,0x1
JNZ 0x0010307d
JMP 0x0010307f
LAB_0010307d:
JMP 0x0010309e
LAB_0010307f:
LEA RDI,[0x107302]
LEA RSI,[0x10705b]
MOV EDX,0x12f
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_0010309e:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104f40
TEST AL,0x1
JNZ 0x001030ad
JMP 0x001030af
LAB_001030ad:
JMP 0x001030ce
LAB_001030af:
LEA RDI,[0x107447]
LEA RSI,[0x10705b]
MOV EDX,0x132
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_001030ce:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00104780
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001030e6
JMP 0x00103105
LAB_001030e6:
LEA RDI,[0x107a1c]
LEA RSI,[0x10705b]
MOV EDX,0x136
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_00103105:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00104a30
MOV qword ptr [RBP + -0x138],RAX
MOV RAX,qword ptr [RBP + -0x138]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0010312f
JMP 0x0010314e
LAB_0010312f:
LEA RDI,[0x107158]
LEA RSI,[0x10705b]
MOV EDX,0x13b
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_0010314e:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + RAX*0x1 + -0x130],0x0
LEA RDI,[RBP + -0x130]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001021d0
CMP EAX,0x0
JNZ 0x00103171
JMP 0x00103190
LAB_00103171:
LEA RDI,[0x107174]
LEA RSI,[0x10705b]
MOV EDX,0x13f
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_00103190:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001049c0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104fc0
TEST AL,0x1
JNZ 0x001031a8
JMP 0x001031aa
LAB_001031a8:
JMP 0x001031c9
LAB_001031aa:
LEA RDI,[0x1070bd]
LEA RSI,[0x10705b]
MOV EDX,0x145
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_001031c9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104fc0
TEST AL,0x1
JNZ 0x001031d8
JMP 0x001031da
LAB_001031d8:
JMP 0x001031f9
LAB_001031da:
LEA RDI,[0x10745e]
LEA RSI,[0x10705b]
MOV EDX,0x146
LEA RCX,[0x10740d]
CALL 0x00102170
LAB_001031f9:
LEA RDI,[0x107475]
MOV AL,0x0
CALL 0x00102130
ADD RSP,0x140
POP RBP
RET
|
void test_file_copy(void)
{
int iVar1;
ulong uVar2;
size_t sVar3;
char local_138 [256];
size_t local_38;
size_t local_30;
char *local_28;
long local_20;
char *local_18;
char *local_10;
printf("Testing file copy...\n");
local_10 = "test_file.txt";
local_18 = "copy_file.txt";
local_20 = file_open("test_file.txt",1);
if (local_20 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c"
,0x120,"void test_file_copy(void)");
}
local_28 = "Hello, world!";
local_30 = strlen("Hello, world!");
local_38 = file_write(local_20,local_28,local_30);
if (local_38 != local_30) {
/* WARNING: Subroutine does not return */
__assert_fail("bytes_written == test_data_len",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x126,
"void test_file_copy(void)");
}
file_close(local_20);
uVar2 = file_copy(local_10,local_18);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_copy(test_file, copy_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",300,
"void test_file_copy(void)");
}
uVar2 = file_exists(local_10);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_exists(test_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x12f,
"void test_file_copy(void)");
}
uVar2 = file_exists(local_18);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_exists(copy_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x132,
"void test_file_copy(void)");
}
local_20 = file_open(local_18,0);
if (local_20 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c"
,0x136,"void test_file_copy(void)");
}
sVar3 = file_read(local_20,local_138,local_30);
if (sVar3 != local_30) {
/* WARNING: Subroutine does not return */
__assert_fail("bytes_read == test_data_len",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x13b,
"void test_file_copy(void)");
}
local_138[local_30] = '\0';
iVar1 = strcmp(local_138,local_28);
if (iVar1 == 0) {
file_close(local_20);
uVar2 = file_delete(local_10);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_delete(test_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x145,
"void test_file_copy(void)");
}
uVar2 = file_delete(local_18);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_delete(copy_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x146,
"void test_file_copy(void)");
}
printf("PASS: file_copy\n");
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("strcmp(buffer, test_data) == 0",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x13f,
"void test_file_copy(void)");
}
|
|
14,003
|
get_label_pos
|
bluesky950520[P]quickjs/quickjs.c
|
static int get_label_pos(JSFunctionDef *s, int label)
{
int i, pos;
for (i = 0; i < 20; i++) {
pos = s->label_slots[label].pos;
for (;;) {
switch (s->byte_code.buf[pos]) {
case OP_source_loc:
pos += 9;
continue;
case OP_label:
pos += 5;
continue;
case OP_goto:
label = get_u32(s->byte_code.buf + pos + 1);
break;
default:
return pos;
}
break;
}
}
return pos;
}
|
O0
|
c
|
get_label_pos:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
cmpl $0x14, 0x10(%rsp)
jge 0xc1ff4
movq 0x18(%rsp), %rax
movq 0x170(%rax), %rax
movslq 0x14(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x8(%rsp)
subl $0x6b, %eax
je 0xc1fb3
jmp 0xc1f7f
movl 0x8(%rsp), %eax
subl $0xb5, %eax
je 0xc1fa6
jmp 0xc1f8c
movl 0x8(%rsp), %eax
subl $0xc4, %eax
jne 0xc1fd6
jmp 0xc1f99
movl 0xc(%rsp), %eax
addl $0x9, %eax
movl %eax, 0xc(%rsp)
jmp 0xc1f5f
movl 0xc(%rsp), %eax
addl $0x5, %eax
movl %eax, 0xc(%rsp)
jmp 0xc1f5f
movq 0x18(%rsp), %rax
movq 0x138(%rax), %rdi
movslq 0xc(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, 0x14(%rsp)
jmp 0xc1fe0
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0xc1ffc
jmp 0xc1fe2
jmp 0xc1fe4
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0xc1f35
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
get_label_pos:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov [rsp+28h+var_18], 0
loc_C1F35:
cmp [rsp+28h+var_18], 14h
jge loc_C1FF4
mov rax, [rsp+28h+var_10]
mov rax, [rax+170h]
movsxd rcx, [rsp+28h+var_14]
imul rcx, 18h
add rax, rcx
mov eax, [rax+4]
mov [rsp+28h+var_1C], eax
loc_C1F5F:
mov rax, [rsp+28h+var_10]
mov rax, [rax+138h]
movsxd rcx, [rsp+28h+var_1C]
movzx eax, byte ptr [rax+rcx]
mov [rsp+28h+var_20], eax
sub eax, 6Bh ; 'k'
jz short loc_C1FB3
jmp short $+2
loc_C1F7F:
mov eax, [rsp+28h+var_20]
sub eax, 0B5h
jz short loc_C1FA6
jmp short $+2
loc_C1F8C:
mov eax, [rsp+28h+var_20]
sub eax, 0C4h
jnz short loc_C1FD6
jmp short $+2
loc_C1F99:
mov eax, [rsp+28h+var_1C]
add eax, 9
mov [rsp+28h+var_1C], eax
jmp short loc_C1F5F
loc_C1FA6:
mov eax, [rsp+28h+var_1C]
add eax, 5
mov [rsp+28h+var_1C], eax
jmp short loc_C1F5F
loc_C1FB3:
mov rax, [rsp+28h+var_10]
mov rdi, [rax+138h]
movsxd rax, [rsp+28h+var_1C]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+28h+var_14], eax
jmp short loc_C1FE0
loc_C1FD6:
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
jmp short loc_C1FFC
loc_C1FE0:
jmp short $+2
loc_C1FE2:
jmp short $+2
loc_C1FE4:
mov eax, [rsp+28h+var_18]
add eax, 1
mov [rsp+28h+var_18], eax
jmp loc_C1F35
loc_C1FF4:
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
loc_C1FFC:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long get_label_pos(long long a1, int u32)
{
int v3; // [rsp+8h] [rbp-20h]
unsigned int i; // [rsp+Ch] [rbp-1Ch]
int v5; // [rsp+10h] [rbp-18h]
v5 = 0;
LABEL_2:
if ( v5 >= 20 )
{
return i;
}
else
{
for ( i = *(_DWORD *)(24LL * u32 + *(_QWORD *)(a1 + 368) + 4); ; i += 9 )
{
while ( 1 )
{
v3 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 312) + (int)i);
if ( v3 == 107 )
{
u32 = get_u32((unsigned int *)((int)i + *(_QWORD *)(a1 + 312) + 1LL));
++v5;
goto LABEL_2;
}
if ( v3 != 181 )
break;
i += 5;
}
if ( v3 != 196 )
break;
}
return i;
}
}
|
get_label_pos:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x10],0x0
LAB_001c1f35:
CMP dword ptr [RSP + 0x10],0x14
JGE 0x001c1ff4
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x170]
MOVSXD RCX,dword ptr [RSP + 0x14]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0xc],EAX
LAB_001c1f5f:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x8],EAX
SUB EAX,0x6b
JZ 0x001c1fb3
JMP 0x001c1f7f
LAB_001c1f7f:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0xb5
JZ 0x001c1fa6
JMP 0x001c1f8c
LAB_001c1f8c:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0xc4
JNZ 0x001c1fd6
JMP 0x001c1f99
LAB_001c1f99:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x9
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001c1f5f
LAB_001c1fa6:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x5
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001c1f5f
LAB_001c1fb3:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x138]
MOVSXD RAX,dword ptr [RSP + 0xc]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001c1fe0
LAB_001c1fd6:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001c1ffc
LAB_001c1fe0:
JMP 0x001c1fe2
LAB_001c1fe2:
JMP 0x001c1fe4
LAB_001c1fe4:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001c1f35
LAB_001c1ff4:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
LAB_001c1ffc:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int get_label_pos(long param_1,int param_2)
{
char cVar1;
int local_1c;
int local_18;
int local_14;
local_18 = 0;
local_14 = param_2;
do {
if (0x13 < local_18) {
return local_1c;
}
local_1c = *(int *)(*(long *)(param_1 + 0x170) + (long)local_14 * 0x18 + 4);
while (cVar1 = *(char *)(*(long *)(param_1 + 0x138) + (long)local_1c), cVar1 != 'k') {
if (cVar1 == -0x4b) {
local_1c = local_1c + 5;
}
else {
if (cVar1 != -0x3c) {
return local_1c;
}
local_1c = local_1c + 9;
}
}
local_14 = get_u32(*(long *)(param_1 + 0x138) + (long)local_1c + 1);
local_18 = local_18 + 1;
} while( true );
}
|
|
14,004
|
translog_read_file_header
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc, File file)
{
uchar page_buff[LOG_HEADER_DATA_SIZE];
DBUG_ENTER("translog_read_file_header");
if (mysql_file_pread(file, page_buff,
sizeof(page_buff), 0, MYF(MY_FNABP | MY_WME)))
{
DBUG_PRINT("info", ("log read fail error: %d", my_errno));
DBUG_RETURN(1);
}
translog_interpret_file_header(desc, page_buff);
DBUG_PRINT("info", ("timestamp: %llu aria ver: %lu mysql ver: %lu "
"server id %lu page size %lu file number %lu "
"max lsn: " LSN_FMT,
(ulonglong) desc->timestamp,
(ulong) desc->maria_version,
(ulong) desc->mysql_version,
(ulong) desc->server_id,
desc->page_size, (ulong) desc->file_number,
LSN_IN_PARTS(desc->max_lsn)));
DBUG_RETURN(0);
}
|
O3
|
c
|
translog_read_file_header:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x323476(%rip), %rax # 0x389050
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x65c91
leaq -0x50(%rbp), %rsi
movl $0x2c, %edx
movl $0x12, %r8d
movl %r14d, %edi
xorl %ecx, %ecx
callq 0xa34b4
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x65c74
movq -0x44(%rbp), %rax
movq %rax, 0x8(%rbx)
movsd -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movups %xmm0, 0x10(%rbx)
movl -0x34(%rbp), %eax
movq %rax, 0x20(%rbx)
movzwl -0x30(%rbp), %eax
incq %rax
movq %rax, 0x28(%rbx)
movzwl -0x2e(%rbp), %eax
movzbl -0x2c(%rbp), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x30(%rbx)
movzwl -0x2b(%rbp), %eax
shlq $0x20, %rax
movzbl -0x29(%rbp), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl -0x28(%rbp), %eax
orq %rcx, %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x65caf
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %r15
movq %rax, %rdi
movl %r14d, %esi
movq %r15, %rcx
callq 0x2c6f8
movq (%r15), %rcx
jmp 0x65c14
callq 0x29220
|
translog_read_file_header:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 88h
mov r14d, esi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_65C91
lea rsi, [rbp+var_50]
mov edx, 2Ch ; ','
mov r8d, 12h
mov edi, r14d
xor ecx, ecx
call my_pread
mov rcx, rax
loc_65C14:
mov al, 1
test rcx, rcx
jnz short loc_65C74
mov rax, [rbp+var_44]
mov [rbx+8], rax
movsd xmm0, [rbp+var_3C]
xorps xmm1, xmm1
unpcklps xmm0, xmm1
movups xmmword ptr [rbx+10h], xmm0
mov eax, [rbp+var_34]
mov [rbx+20h], rax
movzx eax, [rbp+var_30]
inc rax
mov [rbx+28h], rax
movzx eax, [rbp+var_2E]
movzx ecx, [rbp+var_2C]
shl ecx, 10h
or rcx, rax
mov [rbx+30h], rcx
movzx eax, [rbp+var_2B]
shl rax, 20h
movzx ecx, [rbp+var_29]
shl rcx, 30h
or rcx, rax
mov eax, [rbp+var_28]
or rax, rcx
mov [rbx], rax
xor eax, eax
loc_65C74:
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_65CAF
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_65C91:
lea rdx, [rbp+var_50]
lea r15, [rbp+var_58]
mov rdi, rax
mov esi, r14d
mov rcx, r15
call translog_read_file_header_cold_1
mov rcx, [r15]
jmp loc_65C14
loc_65CAF:
call ___stack_chk_fail
|
char translog_read_file_header(__m128 *a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
char result; // al
_BYTE v5[72]; // [rsp+0h] [rbp-A0h] BYREF
long long v6; // [rsp+48h] [rbp-58h] BYREF
_BYTE v7[12]; // [rsp+50h] [rbp-50h] BYREF
unsigned long long v8; // [rsp+5Ch] [rbp-44h]
unsigned long long v9; // [rsp+64h] [rbp-3Ch]
unsigned int v10; // [rsp+6Ch] [rbp-34h]
unsigned __int16 v11; // [rsp+70h] [rbp-30h]
unsigned __int16 v12; // [rsp+72h] [rbp-2Eh]
unsigned __int8 v13; // [rsp+74h] [rbp-2Ch]
unsigned __int16 v14; // [rsp+75h] [rbp-2Bh]
unsigned __int8 v15; // [rsp+77h] [rbp-29h]
unsigned int v16; // [rsp+78h] [rbp-28h]
unsigned long long v17; // [rsp+80h] [rbp-20h]
v17 = __readfsqword(0x28u);
v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v5, a2, 6LL);
if ( v2 )
{
translog_read_file_header_cold_1(v2, a2, (long long)v7, &v6);
v3 = v6;
}
else
{
v3 = my_pread((unsigned int)a2, v7, 44LL, 0LL, 18LL);
}
result = 1;
if ( !v3 )
{
a1->m128_u64[1] = v8;
a1[1] = _mm_unpacklo_ps((__m128)v9, (__m128)0LL);
a1[2].m128_u64[0] = v10;
a1[2].m128_u64[1] = v11 + 1LL;
a1[3].m128_u64[0] = v12 | (unsigned long long)(v13 << 16);
a1->m128_u64[0] = ((unsigned long long)v14 << 32) | ((unsigned long long)v15 << 48) | v16;
return 0;
}
return result;
}
|
translog_read_file_header:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00165c91
LEA RSI,[RBP + -0x50]
MOV EDX,0x2c
MOV R8D,0x12
MOV EDI,R14D
XOR ECX,ECX
CALL 0x001a34b4
MOV RCX,RAX
LAB_00165c14:
MOV AL,0x1
TEST RCX,RCX
JNZ 0x00165c74
MOV RAX,qword ptr [RBP + -0x44]
MOV qword ptr [RBX + 0x8],RAX
MOVSD XMM0,qword ptr [RBP + -0x3c]
XORPS XMM1,XMM1
UNPCKLPS XMM0,XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV EAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBX + 0x20],RAX
MOVZX EAX,word ptr [RBP + -0x30]
INC RAX
MOV qword ptr [RBX + 0x28],RAX
MOVZX EAX,word ptr [RBP + -0x2e]
MOVZX ECX,byte ptr [RBP + -0x2c]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x30],RCX
MOVZX EAX,word ptr [RBP + -0x2b]
SHL RAX,0x20
MOVZX ECX,byte ptr [RBP + -0x29]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [RBP + -0x28]
OR RAX,RCX
MOV qword ptr [RBX],RAX
XOR EAX,EAX
LAB_00165c74:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x00165caf
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00165c91:
LEA RDX,[RBP + -0x50]
LEA R15,[RBP + -0x58]
MOV RDI,RAX
MOV ESI,R14D
MOV RCX,R15
CALL 0x0012c6f8
MOV RCX,qword ptr [R15]
JMP 0x00165c14
LAB_00165caf:
CALL 0x00129220
|
bool translog_read_file_header(ulong *param_1,ulong param_2)
{
int1 auVar1 [16];
long lVar2;
long in_FS_OFFSET;
int1 local_a8 [72];
long local_60;
int1 local_58 [12];
ulong local_4c;
ulong local_44;
uint local_3c;
ushort local_38;
uint3 local_36;
ushort local_33;
byte local_31;
uint local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = (**(code **)(PSI_server + 0x158))(local_a8,param_2,6);
if (lVar2 == 0) {
local_60 = my_pread(param_2 & 0xffffffff,local_58,0x2c,0,0x12);
}
else {
translog_read_file_header_cold_1(lVar2,param_2 & 0xffffffff,local_58,&local_60);
}
if (local_60 == 0) {
param_1[1] = local_4c;
auVar1._8_4_ = (int)(local_44 >> 0x20);
auVar1._0_8_ = local_44 & 0xffffffff;
auVar1._12_4_ = 0;
*(int1 (*) [16])(param_1 + 2) = auVar1;
param_1[4] = (ulong)local_3c;
param_1[5] = (ulong)local_38 + 1;
param_1[6] = (ulong)local_36;
*param_1 = (ulong)local_30 | (ulong)local_31 << 0x30 | (ulong)local_33 << 0x20;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return local_60 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,005
|
eval_num_suffix
|
eloqsql/mysys/my_getopt.c
|
static inline ulonglong eval_num_suffix(char *suffix, int *error)
{
switch (*suffix) {
case '\0':
return 1ULL;
case 'k':
case 'K':
return 1ULL << 10;
case 'm':
case 'M':
return 1ULL << 20;
case 'g':
case 'G':
return 1ULL << 30;
case 't':
case 'T':
return 1ULL << 40;
case 'p':
case 'P':
return 1ULL << 50;
case 'e':
case 'E':
return 1ULL << 60;
default:
*error= 1;
return 0ULL;
}
}
|
O0
|
c
|
eval_num_suffix:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x74, %eax
ja 0x2d4fa
movq -0x20(%rbp), %rax
leaq 0x576a3(%rip), %rcx # 0x84b3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x1, -0x8(%rbp)
jmp 0x2d50c
movq $0x400, -0x8(%rbp) # imm = 0x400
jmp 0x2d50c
movq $0x100000, -0x8(%rbp) # imm = 0x100000
jmp 0x2d50c
movq $0x40000000, -0x8(%rbp) # imm = 0x40000000
jmp 0x2d50c
movabsq $0x10000000000, %rax # imm = 0x10000000000
movq %rax, -0x8(%rbp)
jmp 0x2d50c
movabsq $0x4000000000000, %rax # imm = 0x4000000000000
movq %rax, -0x8(%rbp)
jmp 0x2d50c
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
movq %rax, -0x8(%rbp)
jmp 0x2d50c
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
eval_num_suffix:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 74h; switch 117 cases
ja short def_2D4A0; jumptable 000000000002D4A0 default case, cases 1-68,70,72-74,76,78,79,81-83,85-100,102,104-106,108,110,111,113-115
mov rax, [rbp+var_20]
lea rcx, jpt_2D4A0
movsxd rax, ds:(jpt_2D4A0 - 84B3Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2D4A2:
mov [rbp+var_8], 1; jumptable 000000000002D4A0 case 0
jmp short loc_2D50C
loc_2D4AC:
mov [rbp+var_8], 400h; jumptable 000000000002D4A0 cases 75,107
jmp short loc_2D50C
loc_2D4B6:
mov [rbp+var_8], offset unk_100000; jumptable 000000000002D4A0 cases 77,109
jmp short loc_2D50C
loc_2D4C0:
mov [rbp+var_8], 40000000h; jumptable 000000000002D4A0 cases 71,103
jmp short loc_2D50C
loc_2D4CA:
mov rax, 10000000000h; jumptable 000000000002D4A0 cases 84,116
mov [rbp+var_8], rax
jmp short loc_2D50C
loc_2D4DA:
mov rax, 4000000000000h; jumptable 000000000002D4A0 cases 80,112
mov [rbp+var_8], rax
jmp short loc_2D50C
loc_2D4EA:
mov rax, 1000000000000000h; jumptable 000000000002D4A0 cases 69,101
mov [rbp+var_8], rax
jmp short loc_2D50C
def_2D4A0:
mov rax, [rbp+var_18]; jumptable 000000000002D4A0 default case, cases 1-68,70,72-74,76,78,79,81-83,85-100,102,104-106,108,110,111,113-115
mov dword ptr [rax], 1
mov [rbp+var_8], 0
loc_2D50C:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long eval_num_suffix(_BYTE *a1, _DWORD *a2)
{
long long v3; // [rsp+18h] [rbp-8h]
switch ( *a1 )
{
case 0:
v3 = 1LL;
break;
case 0x45:
case 0x65:
v3 = 0x1000000000000000LL;
break;
case 0x47:
case 0x67:
v3 = 0x40000000LL;
break;
case 0x4B:
case 0x6B:
v3 = 1024LL;
break;
case 0x4D:
case 0x6D:
v3 = (long long)&unk_100000;
break;
case 0x50:
case 0x70:
v3 = 0x4000000000000LL;
break;
case 0x54:
case 0x74:
v3 = 0x10000000000LL;
break;
default:
*a2 = 1;
v3 = 0LL;
break;
}
return v3;
}
|
eval_num_suffix:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x74
JA 0x0012d4fa
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x184b3c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV qword ptr [RBP + -0x8],0x1
JMP 0x0012d50c
caseD_4b:
MOV qword ptr [RBP + -0x8],0x400
JMP 0x0012d50c
caseD_4d:
MOV qword ptr [RBP + -0x8],0x100000
JMP 0x0012d50c
caseD_47:
MOV qword ptr [RBP + -0x8],0x40000000
JMP 0x0012d50c
caseD_54:
MOV RAX,0x10000000000
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012d50c
caseD_50:
MOV RAX,0x4000000000000
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012d50c
caseD_45:
MOV RAX,0x1000000000000000
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012d50c
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
MOV qword ptr [RBP + -0x8],0x0
LAB_0012d50c:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int8 eval_num_suffix(int1 *param_1,int4 *param_2)
{
int8 local_10;
switch(*param_1) {
case 0:
local_10 = 1;
break;
default:
*param_2 = 1;
local_10 = 0;
break;
case 0x45:
case 0x65:
local_10 = 0x1000000000000000;
break;
case 0x47:
case 0x67:
local_10 = 0x40000000;
break;
case 0x4b:
case 0x6b:
local_10 = 0x400;
break;
case 0x4d:
case 0x6d:
local_10 = 0x100000;
break;
case 0x50:
case 0x70:
local_10 = 0x4000000000000;
break;
case 0x54:
case 0x74:
local_10 = 0x10000000000;
}
return local_10;
}
|
|
14,006
|
blst_core_verify_pk_in_g1
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c
|
BLST_ERROR blst_core_verify_pk_in_g1(const POINTonE1_affine *pk,
const POINTonE2_affine *signature,
int hash_or_encode,
const void *msg, size_t msg_len,
const void *DST, size_t DST_len,
const void *aug, size_t aug_len)
{
PAIRING ctx;
BLST_ERROR ret;
ctx.ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0);
ctx.nelems = 0;
ctx.DST = DST;
ctx.DST_len = DST_len;
ret = PAIRING_Aggregate_PK_in_G1(&ctx, pk, 1, signature, 1, NULL, 0,
msg, msg_len, aug, aug_len);
if (ret != BLST_SUCCESS)
return ret;
PAIRING_Commit(&ctx);
return PAIRING_FinalVerify(&ctx, NULL) ? BLST_SUCCESS : BLST_VERIFY_FAIL;
}
|
O3
|
c
|
blst_core_verify_pk_in_g1:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xca8, %rsp # imm = 0xCA8
movq %rcx, %rax
movq %rsi, %rcx
movq %rdi, %rsi
xorl %r10d, %r10d
testl %edx, %edx
setne %r10b
movups 0x18(%rbp), %xmm0
movq 0x10(%rbp), %rdx
shll $0x6, %r10d
leaq -0xc80(%rbp), %rdi
movl %r10d, (%rdi)
movl $0x0, 0x4(%rdi)
movq %r9, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movups %xmm0, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movl $0x1, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x6174b
testl %eax, %eax
jne 0x6224f
leaq -0xc80(%rbp), %rbx
movq %rbx, %rdi
callq 0x61b81
movq %rbx, %rdi
xorl %esi, %esi
callq 0x61d3f
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leal (%rcx,%rcx,4), %eax
addq $0xca8, %rsp # imm = 0xCA8
popq %rbx
popq %rbp
retq
|
blst_core_verify_pk_in_g1:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0CA8h
mov rax, rcx
mov rcx, rsi
mov rsi, rdi
xor r10d, r10d
test edx, edx
setnz r10b
movups xmm0, [rbp+arg_8]
mov rdx, [rbp+arg_0]
shl r10d, 6
lea rdi, [rbp+var_C80]
mov [rdi], r10d
mov dword ptr [rdi+4], 0
mov [rdi+8], r9
mov [rdi+10h], rdx
movups [rsp+0CB0h+var_C98], xmm0
mov [rsp+0CB0h+var_CA0], r8
mov [rsp+0CB0h+var_CA8], rax
mov [rsp+0CB0h+var_CB0], 0
mov edx, 1
mov r8d, 1
xor r9d, r9d
call PAIRING_Aggregate_PK_in_G1
test eax, eax
jnz short loc_6224F
lea rbx, [rbp+var_C80]
mov rdi, rbx
call PAIRING_Commit
mov rdi, rbx
xor esi, esi
call PAIRING_FinalVerify
xor ecx, ecx
test rax, rax
setz cl
lea eax, [rcx+rcx*4]
loc_6224F:
add rsp, 0CA8h
pop rbx
pop rbp
retn
|
long long blst_core_verify_pk_in_g1(
_BYTE *a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
long long a7,
__int128 a8)
{
long long result; // rax
_QWORD v9[400]; // [rsp+30h] [rbp-C80h] BYREF
v9[0] = (unsigned __int8)(a3 != 0) << 6;
v9[1] = a6;
v9[2] = a7;
result = PAIRING_Aggregate_PK_in_G1((long long)v9, a1, 1LL, a2, 1LL, 0LL, 0LL, a4, a5, a8, *((long long *)&a8 + 1));
if ( !(_DWORD)result )
{
PAIRING_Commit((long long)v9);
return 5 * (unsigned int)(PAIRING_FinalVerify(v9, 0LL) == 0);
}
return result;
}
|
blst_core_verify_pk_in_g1:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xca8
MOV RAX,RCX
MOV RCX,RSI
MOV RSI,RDI
XOR R10D,R10D
TEST EDX,EDX
SETNZ R10B
MOVUPS XMM0,xmmword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + 0x10]
SHL R10D,0x6
LEA RDI,[RBP + -0xc80]
MOV dword ptr [RDI],R10D
MOV dword ptr [RDI + 0x4],0x0
MOV qword ptr [RDI + 0x8],R9
MOV qword ptr [RDI + 0x10],RDX
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV EDX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x0016174b
TEST EAX,EAX
JNZ 0x0016224f
LEA RBX,[RBP + -0xc80]
MOV RDI,RBX
CALL 0x00161b81
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00161d3f
XOR ECX,ECX
TEST RAX,RAX
SETZ CL
LEA EAX,[RCX + RCX*0x4]
LAB_0016224f:
ADD RSP,0xca8
POP RBX
POP RBP
RET
|
ulong blst_core_verify_pk_in_g1
(int8 param_1,int8 param_2,int param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int4 param_8,
int4 param_9)
{
ulong uVar1;
long lVar2;
int local_c88 [2];
int8 local_c80;
int8 local_c78;
local_c88[0] = (uint)(param_3 != 0) << 6;
local_c88[1] = 0;
local_c78 = param_7;
local_c80 = param_6;
uVar1 = PAIRING_Aggregate_PK_in_G1
(local_c88,param_1,1,param_2,1,0,0,param_4,param_5,param_8,param_9);
if ((int)uVar1 == 0) {
PAIRING_Commit(local_c88);
lVar2 = PAIRING_FinalVerify(local_c88,0);
uVar1 = (ulong)((uint)(lVar2 == 0) * 5);
}
return uVar1;
}
|
|
14,007
|
bool fmt::v10::detail::loc_writer<char>::operator()<int, 0>(int)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
auto operator()(T value) -> bool {
auto arg = make_write_int_arg(value, specs.sign);
write_int(out, static_cast<uint64_or_128_t<T>>(arg.abs_value), arg.prefix,
specs, digit_grouping<Char>(grouping, sep));
return true;
}
|
O0
|
c
|
bool fmt::v10::detail::loc_writer<char>::operator()<int, 0>(int):
subq $0x158, %rsp # imm = 0x158
movq %rsi, 0x140(%rsp)
movq %rdx, 0x148(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
movq %rdi, 0x138(%rsp)
movq %rcx, 0x128(%rsp)
movq %rax, 0x120(%rsp)
movq 0x138(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x120(%rsp), %rax
movq 0x128(%rsp), %rdx
movq 0x8(%rcx), %rcx
movzwl 0x9(%rcx), %ecx
shrl $0x4, %ecx
andl $0x7, %ecx
movq %rdx, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0x1b3ab0
movq 0x30(%rsp), %rsi
movq (%rsi), %rax
movq %rax, 0xe8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x28(%rsp)
addq $0x30, %rsi
leaq 0x88(%rsp), %rdi
callq 0x1a1260
movq 0x30(%rsp), %rsi
addq $0x10, %rsi
leaq 0x68(%rsp), %rdi
callq 0x1a1260
jmp 0x1b047b
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x1b0da0
jmp 0x1b0497
movq 0x28(%rsp), %r8
movl 0x24(%rsp), %ecx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rdx
movq 0xe8(%rsp), %rdi
movq %rdx, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0xa8(%rsp), %r9
callq 0x1b3b90
movq %rax, 0x8(%rsp)
jmp 0x1b04da
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x1b0de0
leaq 0x68(%rsp), %rdi
callq 0x1a7610
leaq 0x88(%rsp), %rdi
callq 0x1a7610
movb $0x1, %al
andb $0x1, %al
addq $0x158, %rsp # imm = 0x158
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x1b0559
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x1b054f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x1b0de0
leaq 0x68(%rsp), %rdi
callq 0x1a7610
leaq 0x88(%rsp), %rdi
callq 0x1a7610
movq 0x60(%rsp), %rdi
callq 0x198ce0
|
_ZN3fmt3v106detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_:
sub rsp, 158h
mov [rsp+158h+var_18], rsi
mov [rsp+158h+var_10], rdx
mov rax, [rsp+158h+var_18]
mov rcx, [rsp+158h+var_10]
mov [rsp+158h+var_20], rdi
mov [rsp+158h+var_30], rcx
mov [rsp+158h+var_38], rax
mov rcx, [rsp+158h+var_20]
mov [rsp+158h+var_128], rcx
mov rax, [rsp+158h+var_38]
mov rdx, [rsp+158h+var_30]
mov rcx, [rcx+8]
movzx ecx, word ptr [rcx+9]
shr ecx, 4
and ecx, 7
mov [rsp+158h+var_60], rdx
mov [rsp+158h+var_68], rax
mov rsi, [rsp+158h+var_68]
mov rdx, [rsp+158h+var_60]
lea rdi, [rsp+158h+var_58]
call _ZN3fmt3v106detail18make_write_int_argInEENS1_13write_int_argINSt11conditionalIXaalecl8num_bitsIT_EELi32EntLi0EEjNS4_IXlecl8num_bitsIS5_EELi64EEmoE4typeEE4typeEEES5_NS0_4sign4typeE; fmt::v10::detail::make_write_int_arg<__int128>(__int128,fmt::v10::sign::type)
mov rsi, [rsp+158h+var_128]
mov rax, [rsi]
mov [rsp+158h+var_70], rax
mov rax, [rsp+158h+var_58]
mov [rsp+158h+var_148], rax
mov rax, [rsp+158h+var_50]
mov [rsp+158h+var_140], rax
mov eax, [rsp+158h+var_48]
mov [rsp+158h+var_134], eax
mov rax, [rsi+8]
mov [rsp+158h+var_130], rax
add rsi, 30h ; '0'
lea rdi, [rsp+158h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rsi, [rsp+158h+var_128]
add rsi, 10h
lea rdi, [rsp+158h+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_1B047B:
lea rdi, [rsp+158h+var_B0]
lea rsi, [rsp+158h+var_D0]
lea rdx, [rsp+158h+var_F0]
call _ZN3fmt3v106detail14digit_groupingIcEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; fmt::v10::detail::digit_grouping<char>::digit_grouping(std::string,std::string)
jmp short $+2
loc_1B0497:
mov r8, [rsp+158h+var_130]
mov ecx, [rsp+158h+var_134]
mov rax, [rsp+158h+var_140]
mov rdx, [rsp+158h+var_148]
mov rdi, [rsp+158h+var_70]
mov [rsp+158h+var_118], rdx
mov [rsp+158h+var_110], rax
mov rsi, [rsp+158h+var_118]
mov rdx, [rsp+158h+var_110]
lea r9, [rsp+158h+var_B0]
call _ZN3fmt3v106detail9write_intINS0_8appenderEocEET_S4_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingIS7_EE; fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,uint,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)
mov [rsp+158h+var_150], rax
jmp short $+2
loc_1B04DA:
mov rax, [rsp+158h+var_150]
mov [rsp+158h+var_120], rax
lea rdi, [rsp+158h+var_B0]
call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping()
lea rdi, [rsp+158h+var_F0]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_D0]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov al, 1
and al, 1
add rsp, 158h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_1B0559
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_1B054F
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_A0]
call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping()
loc_1B054F:
lea rdi, [rsp+arg_60]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1B0559:
lea rdi, [rsp+arg_80]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| ||||
14,008
|
bool fmt::v10::detail::loc_writer<char>::operator()<int, 0>(int)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
auto operator()(T value) -> bool {
auto arg = make_write_int_arg(value, specs.sign);
write_int(out, static_cast<uint64_or_128_t<T>>(arg.abs_value), arg.prefix,
specs, digit_grouping<Char>(grouping, sep));
return true;
}
|
O3
|
c
|
bool fmt::v10::detail::loc_writer<char>::operator()<int, 0>(int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, %r12
movq (%rdi), %r15
movq 0x8(%rdi), %r14
movzwl 0x9(%r14), %eax
shrl $0x2, %eax
andl $0x1c, %eax
leaq 0x163662(%rip), %rcx # 0x1ef180
movl (%rax,%rcx), %ebp
leaq 0x10(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x30(%rdi), %rsi
movq 0x38(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x80c60
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x80c60
leaq 0x58(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rsp), %rax
cmpq %rbx, %rax
je 0x8bb80
movq %rax, 0x48(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0x8bb86
movups (%rbx), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rsp), %rax
leaq 0x78(%rsp), %r12
movq %rax, -0x28(%r12)
movq %rbx, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r12, -0x10(%r12)
movq 0x20(%rsp), %rax
movq %rcx, %rbx
cmpq %r13, %rax
je 0x8bbca
movq %rax, 0x68(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x8bbd4
movups (%r13), %xmm0
movups %xmm0, (%r12)
movq 0x28(%rsp), %rax
leaq 0x48(%rsp), %r8
movq %rax, 0x28(%r8)
movq %r13, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
movq %r15, %rdi
movq 0x40(%rsp), %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x8c0c1
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x8bc1e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x82190
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x8bc35
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x82190
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x8bc4c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82190
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8bc67
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82190
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x8c54e
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x8bca4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x82190
jmp 0x8bca4
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8bcbf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82190
movq %rbx, %rdi
callq 0x83b70
nop
|
_ZN3fmt3v106detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov [rsp+0B8h+var_78], rsi
mov r12, rdi
mov r15, [rdi]
mov r14, [rdi+8]
movzx eax, word ptr [r14+9]
shr eax, 2
and eax, 1Ch
lea rcx, dword_1EF180
mov ebp, [rax+rcx]
lea rbx, [rsp+0B8h+var_A8]
mov [rbx-10h], rbx
mov rsi, [rdi+30h]
mov rdx, [rdi+38h]
add rdx, rsi
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r13, [rsp+0B8h+var_88]
mov [r13-10h], r13
mov rsi, [r12+10h]
mov rdx, [r12+18h]
add rdx, rsi
lea rdi, [rsp+0B8h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rcx, [rsp+0B8h+var_60]
mov [rcx-10h], rcx
mov rax, [rsp+0B8h+var_B8]
cmp rax, rbx
jz short loc_8BB80
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_60], rax
jmp short loc_8BB86
loc_8BB80:
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rcx], xmm0
loc_8BB86:
mov rax, [rsp+0B8h+var_B0]
lea r12, [rsp+0B8h+var_40]
mov [r12-28h], rax
mov [rsp+0B8h+var_B8], rbx
mov [rsp+0B8h+var_B0], 0
mov byte ptr [rsp+0B8h+var_A8], 0
mov [r12-10h], r12
mov rax, [rsp+0B8h+var_98]
mov rbx, rcx
cmp rax, r13
jz short loc_8BBCA
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_40], rax
jmp short loc_8BBD4
loc_8BBCA:
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [r12], xmm0
loc_8BBD4:
mov rax, [rsp+0B8h+var_90]
lea r8, [rsp+0B8h+var_70]
mov [r8+28h], rax
mov [rsp+0B8h+var_98], r13
mov [rsp+0B8h+var_90], 0
mov byte ptr [rsp+0B8h+var_88], 0
mov rdi, r15; int
mov rsi, [rsp+0B8h+var_78]
mov edx, ebp
mov rcx, r14
call _ZN3fmt3v106detail9write_intINS0_8appenderEmcEET_S4_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingIS7_EE; fmt::v10::detail::write_int<fmt::v10::appender,ulong,char>(fmt::v10::appender,ulong,uint,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)
mov rdi, [rsp+0B8h+var_50]; void *
cmp rdi, r12
jz short loc_8BC1E
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BC1E:
mov rdi, [rsp+0B8h+var_70]; void *
cmp rdi, rbx
jz short loc_8BC35
mov rsi, [rsp+0B8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BC35:
mov rdi, [rsp+0B8h+var_98]; void *
cmp rdi, r13
jz short loc_8BC4C
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BC4C:
mov rdi, [rsp+0B8h+var_B8]; void *
lea rax, [rsp+0B8h+var_A8]
cmp rdi, rax
jz short loc_8BC67
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BC67:
mov al, 1
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_40]
call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping()
mov rdi, [rsp+arg_18]; void *
cmp rdi, r13
jz short loc_8BCA4
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8BCA4
mov rbx, rax
loc_8BCA4:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_8BCBF
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BCBF:
mov rdi, rbx
call __Unwind_Resume
|
char ZN3fmt3v106detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_(
long long *a1,
long long a2)
{
long long v2; // r15
void *v4; // [rsp+0h] [rbp-B8h] BYREF
long long v5; // [rsp+8h] [rbp-B0h]
__int128 v6; // [rsp+10h] [rbp-A8h] BYREF
void *v7; // [rsp+20h] [rbp-98h] BYREF
long long v8; // [rsp+28h] [rbp-90h]
__int128 v9; // [rsp+30h] [rbp-88h] BYREF
long long v10; // [rsp+40h] [rbp-78h]
void *v11; // [rsp+48h] [rbp-70h]
long long v12; // [rsp+50h] [rbp-68h]
__int128 v13; // [rsp+58h] [rbp-60h] BYREF
void *v14; // [rsp+68h] [rbp-50h]
long long v15; // [rsp+70h] [rbp-48h]
_OWORD v16[4]; // [rsp+78h] [rbp-40h] BYREF
v10 = a2;
v2 = *a1;
v4 = &v6;
std::string::_M_construct<char *>(&v4, a1[6], a1[6] + a1[7]);
v7 = &v9;
std::string::_M_construct<char *>(&v7, a1[2], a1[2] + a1[3]);
v11 = &v13;
if ( v4 == &v6 )
{
v13 = v6;
}
else
{
v11 = v4;
*(_QWORD *)&v13 = v6;
}
v12 = v5;
v4 = &v6;
v5 = 0LL;
LOBYTE(v6) = 0;
v14 = v16;
if ( v7 == &v9 )
{
v16[0] = v9;
}
else
{
v14 = v7;
*(_QWORD *)&v16[0] = v9;
}
v15 = v8;
v7 = &v9;
v8 = 0LL;
LOBYTE(v9) = 0;
fmt::v10::detail::write_int<fmt::v10::appender,unsigned long,char>(v2);
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)&v16[0] + 1LL);
if ( v11 != &v13 )
operator delete(v11, v13 + 1);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v4 != &v6 )
operator delete(v4, v6 + 1);
return 1;
}
|
_ZN3fmt3v106detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RSP + 0x40],RSI
MOV R12,RDI
MOV R15,qword ptr [RDI]
MOV R14,qword ptr [RDI + 0x8]
MOVZX EAX,word ptr [R14 + 0x9]
SHR EAX,0x2
AND EAX,0x1c
LEA RCX,[0x2ef180]
MOV EBP,dword ptr [RAX + RCX*0x1]
LEA RBX,[RSP + 0x10]
MOV qword ptr [RBX + -0x10],RBX
MOV RSI,qword ptr [RDI + 0x30]
MOV RDX,qword ptr [RDI + 0x38]
ADD RDX,RSI
MOV RDI,RSP
CALL 0x00180c60
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R12 + 0x10]
MOV RDX,qword ptr [R12 + 0x18]
ADD RDX,RSI
LAB_0018bb53:
LEA RDI,[RSP + 0x20]
CALL 0x00180c60
LEA RCX,[RSP + 0x58]
MOV qword ptr [RCX + -0x10],RCX
MOV RAX,qword ptr [RSP]
CMP RAX,RBX
JZ 0x0018bb80
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x58],RAX
JMP 0x0018bb86
LAB_0018bb80:
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0018bb86:
MOV RAX,qword ptr [RSP + 0x8]
LEA R12,[RSP + 0x78]
MOV qword ptr [R12 + -0x28],RAX
MOV qword ptr [RSP],RBX
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [R12 + -0x10],R12
MOV RAX,qword ptr [RSP + 0x20]
MOV RBX,RCX
CMP RAX,R13
JZ 0x0018bbca
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0018bbd4
LAB_0018bbca:
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [R12],XMM0
LAB_0018bbd4:
MOV RAX,qword ptr [RSP + 0x28]
LEA R8,[RSP + 0x48]
MOV qword ptr [R8 + 0x28],RAX
MOV qword ptr [RSP + 0x20],R13
MOV qword ptr [RSP + 0x28],0x0
MOV byte ptr [RSP + 0x30],0x0
LAB_0018bbf5:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x40]
MOV EDX,EBP
MOV RCX,R14
CALL 0x0018c0c1
LAB_0018bc07:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R12
JZ 0x0018bc1e
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00182190
LAB_0018bc1e:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBX
JZ 0x0018bc35
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00182190
LAB_0018bc35:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x0018bc4c
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00182190
LAB_0018bc4c:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018bc67
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00182190
LAB_0018bc67:
MOV AL,0x1
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ZN3fmt3v106detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_
(int8 *param_1,int8 param_2)
{
int4 uVar1;
int8 uVar2;
long lVar3;
uint *local_b8;
int8 local_b0;
uint local_a8;
int4 uStack_a4;
int4 uStack_a0;
int4 uStack_9c;
uint *local_98;
int8 local_90;
uint local_88;
int4 uStack_84;
int4 uStack_80;
int4 uStack_7c;
int8 local_78;
uint *local_70;
int8 local_68;
int8 local_60;
int4 uStack_58;
int4 uStack_54;
uint *local_50;
int8 local_48;
int8 local_40;
int4 uStack_38;
int4 uStack_34;
uVar2 = *param_1;
lVar3 = param_1[1];
uVar1 = *(int4 *)(&DAT_002ef180 + (*(ushort *)(lVar3 + 9) >> 2 & 0x1c));
local_b8 = &local_a8;
local_78 = param_2;
std::__cxx11::string::_M_construct<char*>(&local_b8,param_1[6],param_1[7] + param_1[6]);
/* try { // try from 0018bb53 to 0018bb5c has its CatchHandler @ 0018bca1 */
local_98 = &local_88;
std::__cxx11::string::_M_construct<char*>(&local_98,param_1[2],param_1[3] + param_1[2]);
if (local_b8 == &local_a8) {
uStack_58 = uStack_a0;
uStack_54 = uStack_9c;
local_70 = (uint *)&local_60;
}
else {
local_70 = local_b8;
}
local_60 = CONCAT44(uStack_a4,local_a8);
local_68 = local_b0;
local_b0 = 0;
local_a8 = local_a8 & 0xffffff00;
if (local_98 == &local_88) {
uStack_38 = uStack_80;
uStack_34 = uStack_7c;
local_50 = (uint *)&local_40;
}
else {
local_50 = local_98;
}
local_40 = CONCAT44(uStack_84,local_88);
local_48 = local_90;
local_90 = 0;
local_88 = local_88 & 0xffffff00;
local_b8 = &local_a8;
local_98 = &local_88;
/* try { // try from 0018bbf5 to 0018bc06 has its CatchHandler @ 0018bc7b */
fmt::v10::detail::write_int<fmt::v10::appender,unsigned_long,char>(uVar2,local_78,uVar1,lVar3);
if (local_50 != (uint *)&local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_70 != (uint *)&local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_98 != &local_88) {
operator_delete(local_98,CONCAT44(uStack_84,local_88) + 1);
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT44(uStack_a4,local_a8) + 1);
}
return 1;
}
|
|
14,009
|
JS_GetScriptOrModuleName
|
bluesky950520[P]quickjs/quickjs.c
|
JSAtom JS_GetScriptOrModuleName(JSContext *ctx, int n_stack_levels)
{
JSStackFrame *sf;
JSFunctionBytecode *b;
JSObject *p;
/* XXX: currently we just use the filename of the englobing
function. It does not work for eval(). Need to add a
ScriptOrModule info in JSFunctionBytecode */
sf = ctx->rt->current_stack_frame;
if (!sf)
return JS_ATOM_NULL;
while (n_stack_levels-- > 0) {
sf = sf->prev_frame;
if (!sf)
return JS_ATOM_NULL;
}
if (JS_VALUE_GET_TAG(sf->cur_func) != JS_TAG_OBJECT)
return JS_ATOM_NULL;
p = JS_VALUE_GET_OBJ(sf->cur_func);
if (!js_class_has_bytecode(p->class_id))
return JS_ATOM_NULL;
b = p->u.func.function_bytecode;
return JS_DupAtom(ctx, b->filename);
}
|
O1
|
c
|
JS_GetScriptOrModuleName:
movq 0x18(%rdi), %rcx
movq 0x108(%rcx), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x30e7c
incl %esi
decl %esi
testl %esi, %esi
jle 0x30e7d
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x30e6e
retq
cmpl $-0x1, 0x10(%rdx)
jne 0x30e7c
movq 0x8(%rdx), %rdx
movzwl 0x6(%rdx), %esi
cmpq $0x38, %rsi
ja 0x30e7c
movabsq $0x110000000012000, %rdi # imm = 0x110000000012000
btq %rsi, %rdi
jae 0x30e7c
movq 0x30(%rdx), %rax
movslq 0x68(%rax), %rax
cmpq $0xe0, %rax
jl 0x30e7c
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rcx
incl (%rcx)
retq
|
JS_GetScriptOrModuleName:
mov rcx, [rdi+18h]
mov rdx, [rcx+108h]
xor eax, eax
test rdx, rdx
jz short locret_30E7C
inc esi
loc_30E6E:
dec esi
test esi, esi
jle short loc_30E7D
mov rdx, [rdx]
test rdx, rdx
jnz short loc_30E6E
locret_30E7C:
retn
loc_30E7D:
cmp dword ptr [rdx+10h], 0FFFFFFFFh
jnz short locret_30E7C
mov rdx, [rdx+8]
movzx esi, word ptr [rdx+6]
cmp rsi, 38h ; '8'
ja short locret_30E7C
mov rdi, 110000000012000h
bt rdi, rsi
jnb short locret_30E7C
mov rax, [rdx+30h]
movsxd rax, dword ptr [rax+68h]
cmp rax, 0E0h
jl short locret_30E7C
mov rcx, [rcx+68h]
mov rcx, [rcx+rax*8]
inc dword ptr [rcx]
retn
|
long long JS_GetScriptOrModuleName(long long a1, int a2)
{
long long v2; // rcx
long long *v3; // rdx
long long result; // rax
int v5; // esi
long long v6; // rdx
unsigned long long v7; // rsi
long long v8; // rdi
_DWORD *v9; // rcx
v2 = *(_QWORD *)(a1 + 24);
v3 = *(long long **)(v2 + 264);
result = 0LL;
if ( v3 )
{
v5 = a2 + 1;
while ( --v5 > 0 )
{
v3 = (long long *)*v3;
if ( !v3 )
return result;
}
if ( *((_DWORD *)v3 + 4) == -1 )
{
v6 = v3[1];
v7 = *(unsigned __int16 *)(v6 + 6);
if ( v7 <= 0x38 )
{
v8 = 0x110000000012000LL;
if ( _bittest64(&v8, v7) )
{
result = *(int *)(*(_QWORD *)(v6 + 48) + 104LL);
if ( result >= 224 )
{
v9 = *(_DWORD **)(*(_QWORD *)(v2 + 104) + 8 * result);
++*v9;
}
}
}
}
}
return result;
}
|
JS_GetScriptOrModuleName:
MOV RCX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RCX + 0x108]
XOR EAX,EAX
TEST RDX,RDX
JZ 0x00130e7c
INC ESI
LAB_00130e6e:
DEC ESI
TEST ESI,ESI
JLE 0x00130e7d
MOV RDX,qword ptr [RDX]
TEST RDX,RDX
JNZ 0x00130e6e
LAB_00130e7c:
RET
LAB_00130e7d:
CMP dword ptr [RDX + 0x10],-0x1
JNZ 0x00130e7c
MOV RDX,qword ptr [RDX + 0x8]
MOVZX ESI,word ptr [RDX + 0x6]
CMP RSI,0x38
JA 0x00130e7c
MOV RDI,0x110000000012000
BT RDI,RSI
JNC 0x00130e7c
MOV RAX,qword ptr [RDX + 0x30]
MOVSXD RAX,dword ptr [RAX + 0x68]
CMP RAX,0xe0
JL 0x00130e7c
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + RAX*0x8]
INC dword ptr [RCX]
RET
|
long JS_GetScriptOrModuleName(long param_1,int param_2)
{
int *piVar1;
long lVar2;
long *plVar3;
ulong uVar4;
plVar3 = *(long **)(*(long *)(param_1 + 0x18) + 0x108);
if (plVar3 != (long *)0x0) {
param_2 = param_2 + 1;
do {
param_2 = param_2 + -1;
if (param_2 < 1) {
if ((int)plVar3[2] != -1) {
return 0;
}
uVar4 = (ulong)*(ushort *)(plVar3[1] + 6);
if (0x38 < uVar4) {
return 0;
}
if ((0x110000000012000U >> (uVar4 & 0x3f) & 1) == 0) {
return 0;
}
lVar2 = (long)*(int *)(*(long *)(plVar3[1] + 0x30) + 0x68);
if (lVar2 < 0xe0) {
return lVar2;
}
piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + lVar2 * 8);
*piVar1 = *piVar1 + 1;
return lVar2;
}
plVar3 = (long *)*plVar3;
} while (plVar3 != (long *)0x0);
}
return 0;
}
|
|
14,010
|
JS_GetScriptOrModuleName
|
bluesky950520[P]quickjs/quickjs.c
|
JSAtom JS_GetScriptOrModuleName(JSContext *ctx, int n_stack_levels)
{
JSStackFrame *sf;
JSFunctionBytecode *b;
JSObject *p;
/* XXX: currently we just use the filename of the englobing
function. It does not work for eval(). Need to add a
ScriptOrModule info in JSFunctionBytecode */
sf = ctx->rt->current_stack_frame;
if (!sf)
return JS_ATOM_NULL;
while (n_stack_levels-- > 0) {
sf = sf->prev_frame;
if (!sf)
return JS_ATOM_NULL;
}
if (JS_VALUE_GET_TAG(sf->cur_func) != JS_TAG_OBJECT)
return JS_ATOM_NULL;
p = JS_VALUE_GET_OBJ(sf->cur_func);
if (!js_class_has_bytecode(p->class_id))
return JS_ATOM_NULL;
b = p->u.func.function_bytecode;
return JS_DupAtom(ctx, b->filename);
}
|
O2
|
c
|
JS_GetScriptOrModuleName:
movq 0x18(%rdi), %rcx
movq 0x108(%rcx), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x29442
incl %esi
decl %esi
testl %esi, %esi
jle 0x29443
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x29434
retq
cmpl $-0x1, 0x10(%rdx)
jne 0x29442
movq 0x8(%rdx), %rdx
movzwl 0x6(%rdx), %esi
cmpq $0x38, %rsi
ja 0x29442
movabsq $0x110000000012000, %rdi # imm = 0x110000000012000
btq %rsi, %rdi
jae 0x29442
movq 0x30(%rdx), %rax
movslq 0x68(%rax), %rax
cmpq $0xe0, %rax
jl 0x29442
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rcx
incl (%rcx)
retq
|
JS_GetScriptOrModuleName:
mov rcx, [rdi+18h]
mov rdx, [rcx+108h]
xor eax, eax
test rdx, rdx
jz short locret_29442
inc esi
loc_29434:
dec esi
test esi, esi
jle short loc_29443
mov rdx, [rdx]
test rdx, rdx
jnz short loc_29434
locret_29442:
retn
loc_29443:
cmp dword ptr [rdx+10h], 0FFFFFFFFh
jnz short locret_29442
mov rdx, [rdx+8]
movzx esi, word ptr [rdx+6]
cmp rsi, 38h ; '8'
ja short locret_29442
mov rdi, 110000000012000h
bt rdi, rsi
jnb short locret_29442
mov rax, [rdx+30h]
movsxd rax, dword ptr [rax+68h]
cmp rax, 0E0h
jl short locret_29442
mov rcx, [rcx+68h]
mov rcx, [rcx+rax*8]
inc dword ptr [rcx]
retn
|
long long JS_GetScriptOrModuleName(long long a1, int a2)
{
long long v2; // rcx
long long *v3; // rdx
long long result; // rax
int v5; // esi
long long v6; // rdx
unsigned long long v7; // rsi
long long v8; // rdi
_DWORD *v9; // rcx
v2 = *(_QWORD *)(a1 + 24);
v3 = *(long long **)(v2 + 264);
result = 0LL;
if ( v3 )
{
v5 = a2 + 1;
while ( --v5 > 0 )
{
v3 = (long long *)*v3;
if ( !v3 )
return result;
}
if ( *((_DWORD *)v3 + 4) == -1 )
{
v6 = v3[1];
v7 = *(unsigned __int16 *)(v6 + 6);
if ( v7 <= 0x38 )
{
v8 = 0x110000000012000LL;
if ( _bittest64(&v8, v7) )
{
result = *(int *)(*(_QWORD *)(v6 + 48) + 104LL);
if ( result >= 224 )
{
v9 = *(_DWORD **)(*(_QWORD *)(v2 + 104) + 8 * result);
++*v9;
}
}
}
}
}
return result;
}
|
JS_GetScriptOrModuleName:
MOV RCX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RCX + 0x108]
XOR EAX,EAX
TEST RDX,RDX
JZ 0x00129442
INC ESI
LAB_00129434:
DEC ESI
TEST ESI,ESI
JLE 0x00129443
MOV RDX,qword ptr [RDX]
TEST RDX,RDX
JNZ 0x00129434
LAB_00129442:
RET
LAB_00129443:
CMP dword ptr [RDX + 0x10],-0x1
JNZ 0x00129442
MOV RDX,qword ptr [RDX + 0x8]
MOVZX ESI,word ptr [RDX + 0x6]
CMP RSI,0x38
JA 0x00129442
MOV RDI,0x110000000012000
BT RDI,RSI
JNC 0x00129442
MOV RAX,qword ptr [RDX + 0x30]
MOVSXD RAX,dword ptr [RAX + 0x68]
CMP RAX,0xe0
JL 0x00129442
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + RAX*0x8]
INC dword ptr [RCX]
RET
|
long JS_GetScriptOrModuleName(long param_1,int param_2)
{
int *piVar1;
long lVar2;
long *plVar3;
ulong uVar4;
plVar3 = *(long **)(*(long *)(param_1 + 0x18) + 0x108);
if (plVar3 != (long *)0x0) {
param_2 = param_2 + 1;
do {
param_2 = param_2 + -1;
if (param_2 < 1) {
if ((int)plVar3[2] != -1) {
return 0;
}
uVar4 = (ulong)*(ushort *)(plVar3[1] + 6);
if (0x38 < uVar4) {
return 0;
}
if ((0x110000000012000U >> (uVar4 & 0x3f) & 1) == 0) {
return 0;
}
lVar2 = (long)*(int *)(*(long *)(plVar3[1] + 0x30) + 0x68);
if (lVar2 < 0xe0) {
return lVar2;
}
piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + lVar2 * 8);
*piVar1 = *piVar1 + 1;
return lVar2;
}
plVar3 = (long *)*plVar3;
} while (plVar3 != (long *)0x0);
}
return 0;
}
|
|
14,011
|
ssz_create_multi_proof_for_gindexes
|
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
|
bytes_t ssz_create_multi_proof_for_gindexes(ssz_ob_t root, bytes32_t root_hash, gindex_t* gindex, int gindex_len) {
buffer_t witnesses = {0};
buffer_t calculated = {0};
buffer_t proof = {0};
for (int i = 0; i < gindex_len; i++)
ssz_add_multi_merkle_proof(gindex[i], &witnesses, &calculated);
buffer_free(&calculated);
merkle_proot_ctx_t proof_ctx = {
.proof = &proof,
.witnesses = &witnesses,
};
merkle_ctx_t ctx = {0};
ctx.proof = &proof_ctx;
ctx.root_gindex = 1;
ctx.last_gindex = 1;
hash_tree_root(root, root_hash, &ctx);
buffer_free(&witnesses);
return proof.data;
}
|
O0
|
c
|
ssz_create_multi_proof_for_gindexes:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
leaq 0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x23140
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x23140
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x23140
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xa0d74
movq -0x20(%rbp), %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0xa0e30
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xa0d48
leaq -0x58(%rbp), %rdi
callq 0x9cbf0
movq -0xd8(%rbp), %rcx
leaq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x1, -0xa8(%rbp)
movq $0x1, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
movq 0x10(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
leaq -0xd0(%rbp), %rsi
callq 0xa0a90
movq -0xe0(%rbp), %rdi
callq 0x9cbf0
movups -0x70(%rbp), %xmm0
movaps %xmm0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ssz_create_multi_proof_for_gindexes:
push rbp
mov rbp, rsp
sub rsp, 100h
lea rax, [rbp+arg_0]
mov [rbp+var_D8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
lea rdi, [rbp+var_40]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_58]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_70]
xor esi, esi
mov edx, 18h
call _memset
mov [rbp+var_74], 0
loc_A0D48:
mov eax, [rbp+var_74]
cmp eax, [rbp+var_24]
jge short loc_A0D74
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_74]
mov rdi, [rax+rcx*8]
lea rsi, [rbp+var_40]
lea rdx, [rbp+var_58]
call ssz_add_multi_merkle_proof
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp short loc_A0D48
loc_A0D74:
lea rdi, [rbp+var_58]
call buffer_free
mov rcx, [rbp+var_D8]
lea rax, [rbp+var_40]
mov [rbp+var_E0], rax
mov [rbp+var_88], rax
lea rax, [rbp+var_70]
mov [rbp+var_80], rax
xorps xmm0, xmm0
movaps [rbp+var_A0], xmm0
movaps [rbp+var_B0], xmm0
movaps [rbp+var_C0], xmm0
movaps [rbp+var_D0], xmm0
lea rax, [rbp+var_88]
mov qword ptr [rbp+var_A0+8], rax
mov qword ptr [rbp+var_B0+8], 1
mov qword ptr [rbp+var_A0], 1
mov rdi, [rbp+var_18]
mov rdx, [rcx+10h]
mov rax, rsp
mov [rax+10h], rdx
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
lea rsi, [rbp+var_D0]
call hash_tree_root
mov rdi, [rbp+var_E0]
call buffer_free
movups xmm0, [rbp+var_70]
movaps [rbp+var_10], xmm0
mov eax, dword ptr [rbp+var_10]
mov rdx, qword ptr [rbp+var_10+8]
add rsp, 100h
pop rbp
retn
|
long long ssz_create_multi_proof_for_gindexes(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
long long a7,
unsigned __int8 *a8,
long long a9)
{
int v9; // r8d
int v10; // r9d
_OWORD v12[2]; // [rsp+30h] [rbp-D0h] BYREF
long long v13; // [rsp+50h] [rbp-B0h]
long long v14; // [rsp+58h] [rbp-A8h]
long long v15; // [rsp+60h] [rbp-A0h]
_QWORD *v16; // [rsp+68h] [rbp-98h]
_QWORD v17[2]; // [rsp+78h] [rbp-88h] BYREF
int i; // [rsp+8Ch] [rbp-74h]
__int128 v19; // [rsp+90h] [rbp-70h] BYREF
_BYTE v20[24]; // [rsp+A8h] [rbp-58h] BYREF
_BYTE v21[28]; // [rsp+C0h] [rbp-40h] BYREF
int v22; // [rsp+DCh] [rbp-24h]
long long v23; // [rsp+E0h] [rbp-20h]
long long v24; // [rsp+E8h] [rbp-18h]
v24 = a1;
v23 = a2;
v22 = a3;
memset(v21, 0LL, 24LL);
memset(v20, 0LL, sizeof(v20));
memset(&v19, 0LL, 24LL);
for ( i = 0; i < v22; ++i )
ssz_add_multi_merkle_proof(*(_QWORD *)(v23 + 8LL * i), v21, v20);
buffer_free((long long)v20);
v17[0] = v21;
v17[1] = &v19;
v13 = 0LL;
memset(v12, 0, sizeof(v12));
v16 = v17;
v14 = 1LL;
v15 = 1LL;
hash_tree_root(v24, (long long)v12, a9, (unsigned int)&a7, v9, v10, a7, a8, a9);
buffer_free((long long)v21);
return (unsigned int)v19;
}
|
ssz_create_multi_proof_for_gindexes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0xd8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
LEA RDI,[RBP + -0x40]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00123140
LEA RDI,[RBP + -0x58]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00123140
LEA RDI,[RBP + -0x70]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00123140
MOV dword ptr [RBP + -0x74],0x0
LAB_001a0d48:
MOV EAX,dword ptr [RBP + -0x74]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x001a0d74
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x74]
MOV RDI,qword ptr [RAX + RCX*0x8]
LEA RSI,[RBP + -0x40]
LEA RDX,[RBP + -0x58]
CALL 0x001a0e30
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001a0d48
LAB_001a0d74:
LEA RDI,[RBP + -0x58]
CALL 0x0019cbf0
MOV RCX,qword ptr [RBP + -0xd8]
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0xe0],RAX
MOV qword ptr [RBP + -0x88],RAX
LEA RAX,[RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
LEA RAX,[RBP + -0x88]
MOV qword ptr [RBP + -0x98],RAX
MOV qword ptr [RBP + -0xa8],0x1
MOV qword ptr [RBP + -0xa0],0x1
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX + 0x10]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RDX
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
LEA RSI,[RBP + -0xd0]
CALL 0x001a0a90
MOV RDI,qword ptr [RBP + -0xe0]
CALL 0x0019cbf0
MOVUPS XMM0,xmmword ptr [RBP + -0x70]
MOVAPS xmmword ptr [RBP + -0x10],XMM0
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x100
POP RBP
RET
|
int1 [16] ssz_create_multi_proof_for_gindexes(int8 param_1,long param_2,int param_3)
{
int1 auVar1 [16];
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int1 **ppuStack_a0;
int1 *local_90;
ulong *local_88;
int local_7c;
ulong local_78;
int8 uStack_70;
int1 local_60 [24];
int1 local_48 [28];
int local_2c;
long local_28;
int8 local_20;
local_2c = param_3;
local_28 = param_2;
local_20 = param_1;
memset(local_48,0,0x18);
memset(local_60,0,0x18);
memset(&local_78,0,0x18);
for (local_7c = 0; local_7c < local_2c; local_7c = local_7c + 1) {
ssz_add_multi_merkle_proof(*(int8 *)(local_28 + (long)local_7c * 8),local_48,local_60);
}
buffer_free(local_60);
local_88 = &local_78;
local_b8 = 0;
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
ppuStack_a0 = &local_90;
uStack_b0 = 1;
local_a8 = 1;
local_90 = local_48;
hash_tree_root(local_20,&local_d8);
buffer_free(local_48);
auVar1._0_8_ = local_78 & 0xffffffff;
auVar1._8_8_ = uStack_70;
return auVar1;
}
|
|
14,012
|
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*, int) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool DescriptorPool::TryFindExtensionInFallbackDatabase(
const Descriptor* containing_type, int field_number) const {
if (fallback_database_ == nullptr) return false;
FileDescriptorProto file_proto;
if (!fallback_database_->FindFileContainingExtension(
containing_type->full_name(), field_number, &file_proto)) {
return false;
}
if (tables_->FindFile(file_proto.name()) != nullptr) {
// We've already loaded this file, and it apparently doesn't contain the
// extension we're looking for. Some DescriptorDatabases return false
// positives.
return false;
}
if (BuildFileFromDatabase(file_proto) == nullptr) {
return false;
}
return true;
}
|
O0
|
cpp
|
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*, int) const:
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x148(%rsp)
movq %rsi, 0x140(%rsp)
movl %edx, 0x13c(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x35a2f
movb $0x0, 0x157(%rsp)
jmp 0x35b74
leaq 0x60(%rsp), %rdi
callq 0x758e0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x140(%rsp), %rdi
callq 0x163d0
movq %rax, 0x30(%rsp)
jmp 0x35a5b
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
movl 0x13c(%rsp), %edx
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq 0x60(%rsp), %rcx
callq *%rax
movb %al, 0x27(%rsp)
jmp 0x35a80
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x35abc
jmp 0x35a8a
movb $0x0, 0x157(%rsp)
movl $0x1, 0x50(%rsp)
jmp 0x35b6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xa9790
jmp 0x35b85
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq %rax, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x759a0
movq %rax, 0x18(%rsp)
jmp 0x35ae0
movq 0x18(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x30550
jmp 0x35af1
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x744b0
movq %rax, 0x8(%rsp)
jmp 0x35b0c
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x35b29
movb $0x0, 0x157(%rsp)
movl $0x1, 0x50(%rsp)
jmp 0x35b6a
movq 0x38(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x37040
movq %rax, (%rsp)
jmp 0x35b3e
movq (%rsp), %rax
cmpq $0x0, %rax
jne 0x35b5a
movb $0x0, 0x157(%rsp)
movl $0x1, 0x50(%rsp)
jmp 0x35b6a
movb $0x1, 0x157(%rsp)
movl $0x1, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xa9790
movb 0x157(%rsp), %al
andb $0x1, %al
addq $0x158, %rsp # imm = 0x158
retq
movq 0x58(%rsp), %rdi
callq 0x13750
nop
|
_ZNK6google8protobuf14DescriptorPool34TryFindExtensionInFallbackDatabaseEPKNS0_10DescriptorEi:
sub rsp, 158h
mov [rsp+158h+var_10], rdi
mov [rsp+158h+var_18], rsi
mov [rsp+158h+var_1C], edx
mov rax, [rsp+158h+var_10]
mov [rsp+158h+var_120], rax
cmp qword ptr [rax+8], 0
jnz short loc_35A2F
mov [rsp+158h+var_1], 0
jmp loc_35B74
loc_35A2F:
lea rdi, [rsp+158h+var_F8]; this
call _ZN6google8protobuf19FileDescriptorProtoC2Ev; google::protobuf::FileDescriptorProto::FileDescriptorProto(void)
mov rax, [rsp+158h+var_120]
mov rax, [rax+8]
mov [rsp+158h+var_130], rax
mov rdi, [rsp+158h+var_18]
call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void)
mov [rsp+158h+var_128], rax
jmp short $+2
loc_35A5B:
mov rsi, [rsp+158h+var_128]
mov rdi, [rsp+158h+var_130]
mov edx, [rsp+158h+var_1C]
mov rax, [rdi]
mov rax, [rax+20h]
lea rcx, [rsp+158h+var_F8]
call rax
mov [rsp+158h+var_131], al
jmp short $+2
loc_35A80:
mov al, [rsp+158h+var_131]
test al, 1
jnz short loc_35ABC
jmp short $+2
loc_35A8A:
mov [rsp+158h+var_1], 0
mov [rsp+158h+var_108], 1
jmp loc_35B6A
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_58]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
jmp loc_35B85
loc_35ABC:
mov rdi, [rsp+158h+var_120]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov [rsp+158h+var_148], rax
lea rdi, [rsp+158h+var_F8]
call _ZNK6google8protobuf19FileDescriptorProto4nameB5cxx11Ev; google::protobuf::FileDescriptorProto::name(void)
mov [rsp+158h+var_140], rax
jmp short $+2
loc_35AE0:
mov rsi, [rsp+158h+var_140]
lea rdi, [rsp+158h+var_118]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
jmp short $+2
loc_35AF1:
mov rdi, [rsp+158h+var_148]
mov rsi, [rsp+158h+var_118]
mov rdx, [rsp+158h+var_110]
call _ZNK6google8protobuf14DescriptorPool6Tables8FindFileENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindFile(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+158h+var_150], rax
jmp short $+2
loc_35B0C:
mov rax, [rsp+158h+var_150]
cmp rax, 0
jz short loc_35B29
mov [rsp+158h+var_1], 0
mov [rsp+158h+var_108], 1
jmp short loc_35B6A
loc_35B29:
mov rdi, [rsp+158h+var_120]; this
lea rsi, [rsp+158h+var_F8]; google::protobuf::FileDescriptorProto *
call _ZNK6google8protobuf14DescriptorPool21BuildFileFromDatabaseERKNS0_19FileDescriptorProtoE; google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&)
mov [rsp+158h+var_158], rax
jmp short $+2
loc_35B3E:
mov rax, [rsp+158h+var_158]
cmp rax, 0
jnz short loc_35B5A
mov [rsp+158h+var_1], 0
mov [rsp+158h+var_108], 1
jmp short loc_35B6A
loc_35B5A:
mov [rsp+158h+var_1], 1
mov [rsp+158h+var_108], 1
loc_35B6A:
lea rdi, [rsp+158h+var_F8]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
loc_35B74:
mov al, [rsp+158h+var_1]
and al, 1
add rsp, 158h
retn
loc_35B85:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
bool google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(
google::protobuf::DescriptorPool *this,
const google::protobuf::Descriptor *a2,
unsigned int a3)
{
long long v4; // [rsp+10h] [rbp-148h]
long long v5; // [rsp+18h] [rbp-140h]
long long v6; // [rsp+28h] [rbp-130h]
long long v7; // [rsp+30h] [rbp-128h]
long long v8[2]; // [rsp+40h] [rbp-118h] BYREF
int v9; // [rsp+50h] [rbp-108h]
_BYTE v10[220]; // [rsp+60h] [rbp-F8h] BYREF
unsigned int v11; // [rsp+13Ch] [rbp-1Ch]
const google::protobuf::Descriptor *v12; // [rsp+140h] [rbp-18h]
google::protobuf::DescriptorPool *v13; // [rsp+148h] [rbp-10h]
bool v14; // [rsp+157h] [rbp-1h]
v13 = this;
v12 = a2;
v11 = a3;
if ( *((_QWORD *)this + 1) )
{
google::protobuf::FileDescriptorProto::FileDescriptorProto((google::protobuf::FileDescriptorProto *)v10);
v6 = *((_QWORD *)this + 1);
v7 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)v12);
if ( ((*(long long ( **)(long long, long long, _QWORD, _BYTE *))(*(_QWORD *)v6 + 32LL))(v6, v7, v11, v10) & 1) != 0 )
{
v4 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->((char *)this + 32);
v5 = google::protobuf::FileDescriptorProto::name[abi:cxx11](v10);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v8, v5);
if ( google::protobuf::DescriptorPool::Tables::FindFile(v4, v8[0], v8[1]) )
v14 = 0;
else
v14 = google::protobuf::DescriptorPool::BuildFileFromDatabase(
this,
(const google::protobuf::FileDescriptorProto *)v10) != 0;
v9 = 1;
}
else
{
v14 = 0;
v9 = 1;
}
google::protobuf::FileDescriptorProto::~FileDescriptorProto((google::protobuf::FileDescriptorProto *)v10);
}
else
{
return 0;
}
return v14;
}
|
TryFindExtensionInFallbackDatabase:
SUB RSP,0x158
MOV qword ptr [RSP + 0x148],RDI
MOV qword ptr [RSP + 0x140],RSI
MOV dword ptr [RSP + 0x13c],EDX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00135a2f
MOV byte ptr [RSP + 0x157],0x0
JMP 0x00135b74
LAB_00135a2f:
LEA RDI,[RSP + 0x60]
CALL 0x001758e0
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x140]
LAB_00135a4f:
CALL 0x001163d0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00135a5b
LAB_00135a5b:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x13c]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x20]
LEA RCX,[RSP + 0x60]
CALL RAX
MOV byte ptr [RSP + 0x27],AL
JMP 0x00135a80
LAB_00135a80:
MOV AL,byte ptr [RSP + 0x27]
TEST AL,0x1
JNZ 0x00135abc
JMP 0x00135a8a
LAB_00135a8a:
MOV byte ptr [RSP + 0x157],0x0
MOV dword ptr [RSP + 0x50],0x1
JMP 0x00135b6a
LAB_00135abc:
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x20
CALL 0x001732b0
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x60]
CALL 0x001759a0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00135ae0
LAB_00135ae0:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x40]
CALL 0x00130550
JMP 0x00135af1
LAB_00135af1:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001744b0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00135b0c
LAB_00135b0c:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,0x0
JZ 0x00135b29
MOV byte ptr [RSP + 0x157],0x0
MOV dword ptr [RSP + 0x50],0x1
JMP 0x00135b6a
LAB_00135b29:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x60]
CALL 0x00137040
LAB_00135b38:
MOV qword ptr [RSP],RAX
JMP 0x00135b3e
LAB_00135b3e:
MOV RAX,qword ptr [RSP]
CMP RAX,0x0
JNZ 0x00135b5a
MOV byte ptr [RSP + 0x157],0x0
MOV dword ptr [RSP + 0x50],0x1
JMP 0x00135b6a
LAB_00135b5a:
MOV byte ptr [RSP + 0x157],0x1
MOV dword ptr [RSP + 0x50],0x1
LAB_00135b6a:
LEA RDI,[RSP + 0x60]
CALL 0x001a9790
LAB_00135b74:
MOV AL,byte ptr [RSP + 0x157]
AND AL,0x1
ADD RSP,0x158
RET
|
/* google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor
const*, int) const */
ulong __thiscall
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase
(DescriptorPool *this,Descriptor *param_1,int param_2)
{
long *plVar1;
byte bVar2;
int8 uVar3;
string *psVar4;
long lVar5;
int8 local_118;
int8 local_110;
int4 local_108;
FileDescriptorProto local_f8 [220];
int local_1c;
Descriptor *local_18;
DescriptorPool *local_10;
int1 local_1;
if (*(long *)(this + 8) == 0) {
local_1 = 0;
}
else {
local_1c = param_2;
local_18 = param_1;
local_10 = this;
FileDescriptorProto::FileDescriptorProto(local_f8);
plVar1 = *(long **)(this + 8);
/* try { // try from 00135a4f to 00135b37 has its CatchHandler @ 00135a9f */
uVar3 = Descriptor::full_name_abi_cxx11_(local_18);
bVar2 = (**(code **)(*plVar1 + 0x20))(plVar1,uVar3,local_1c,local_f8);
if ((bVar2 & 1) == 0) {
local_1 = 0;
}
else {
uVar3 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20));
psVar4 = (string *)FileDescriptorProto::name_abi_cxx11_(local_f8);
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_118,psVar4);
lVar5 = Tables::FindFile(uVar3,local_118,local_110);
if (lVar5 == 0) {
lVar5 = BuildFileFromDatabase(this,local_f8);
if (lVar5 == 0) {
local_1 = 0;
}
else {
local_1 = 1;
}
}
else {
local_1 = 0;
}
}
local_108 = 1;
this = (DescriptorPool *)FileDescriptorProto::~FileDescriptorProto(local_f8);
}
return CONCAT71((int7)((ulong)this >> 8),local_1) & 0xffffffffffffff01;
}
|
|
14,013
|
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*, int) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool DescriptorPool::TryFindExtensionInFallbackDatabase(
const Descriptor* containing_type, int field_number) const {
if (fallback_database_ == nullptr) return false;
FileDescriptorProto file_proto;
if (!fallback_database_->FindFileContainingExtension(
containing_type->full_name(), field_number, &file_proto)) {
return false;
}
if (tables_->FindFile(file_proto.name()) != nullptr) {
// We've already loaded this file, and it apparently doesn't contain the
// extension we're looking for. Some DescriptorDatabases return false
// positives.
return false;
}
if (BuildFileFromDatabase(file_proto) == nullptr) {
return false;
}
return true;
}
|
O3
|
cpp
|
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*, int) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xe8, %rsp
cmpq $0x0, 0x8(%rdi)
je 0x1e60d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x47e76
movq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x20, %rsi
movq (%rdi), %rax
movl %ebp, %edx
movq %r15, %rcx
callq *0x20(%rax)
testb %al, %al
je 0x1e609
movq 0xc0(%rsp), %rax
andq $-0x4, %rax
movups (%rax), %xmm0
movl $0x160, %edi # imm = 0x160
addq 0x20(%rbx), %rdi
movq %rsp, %rsi
movups %xmm0, (%rsi)
callq 0x3fb1a
testq %rax, %rax
je 0x1e611
cmpq $0x0, 0x18(%rax)
je 0x1e611
xorl %ebx, %ebx
jmp 0x1e624
xorl %ebx, %ebx
jmp 0x1e62e
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1f4d8
testq %rax, %rax
setne %bl
leaq 0x10(%rsp), %rdi
callq 0x482b2
movl %ebx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x482b2
movq %rbx, %rdi
callq 0xf570
nop
|
_ZNK6google8protobuf14DescriptorPool34TryFindExtensionInFallbackDatabaseEPKNS0_10DescriptorEi:
push rbp
push r15
push r14
push rbx
sub rsp, 0E8h
cmp qword ptr [rdi+8], 0
jz short loc_1E60D
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+108h+var_F8]
mov rdi, r15
xor esi, esi
xor edx, edx
call _ZN6google8protobuf19FileDescriptorProtoC2EPNS0_5ArenaEb; google::protobuf::FileDescriptorProto::FileDescriptorProto(google::protobuf::Arena *,bool)
mov rdi, [rbx+8]
mov rsi, [r14+8]
add rsi, 20h ; ' '
mov rax, [rdi]
mov edx, ebp
mov rcx, r15
call qword ptr [rax+20h]
test al, al
jz short loc_1E609
mov rax, [rsp+108h+var_48]
and rax, 0FFFFFFFFFFFFFFFCh
movups xmm0, xmmword ptr [rax]
mov edi, 160h
add rdi, [rbx+20h]
mov rsi, rsp
movups xmmword ptr [rsi], xmm0
call _ZNKSt10_HashtableIN6google8protobuf20stringpiece_internal11StringPieceESt4pairIKS3_PKNS1_14FileDescriptorEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ENS1_4hashIS3_EENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS5_; std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(google::protobuf::stringpiece_internal::StringPiece const&)
test rax, rax
jz short loc_1E611
cmp qword ptr [rax+18h], 0
jz short loc_1E611
loc_1E609:
xor ebx, ebx
jmp short loc_1E624
loc_1E60D:
xor ebx, ebx
jmp short loc_1E62E
loc_1E611:
lea rsi, [rsp+108h+var_F8]; google::protobuf::FileDescriptorProto *
mov rdi, rbx; this
call _ZNK6google8protobuf14DescriptorPool21BuildFileFromDatabaseERKNS0_19FileDescriptorProtoE; google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&)
test rax, rax
setnz bl
loc_1E624:
lea rdi, [rsp+108h+var_F8]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
loc_1E62E:
mov eax, ebx
add rsp, 0E8h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
mov rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(
google::protobuf::DescriptorPool *this,
const google::protobuf::Descriptor *a2,
unsigned int a3)
{
google::protobuf::DescriptorPool *v4; // rbx
long long v5; // rax
_BYTE v7[176]; // [rsp+10h] [rbp-F8h] BYREF
if ( *((_QWORD *)this + 1) )
{
v4 = this;
google::protobuf::FileDescriptorProto::FileDescriptorProto((google::protobuf::FileDescriptorProto *)v7, 0LL, 0);
if ( !(*(unsigned __int8 ( **)(_QWORD, long long, _QWORD, _BYTE *))(**((_QWORD **)v4 + 1) + 32LL))(
*((_QWORD *)v4 + 1),
*((_QWORD *)a2 + 1) + 32LL,
a3,
v7)
|| (v5 = std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(*((_QWORD *)this + 4) + 352LL)) != 0
&& *(_QWORD *)(v5 + 24) )
{
LODWORD(v4) = 0;
}
else
{
LOBYTE(v4) = google::protobuf::DescriptorPool::BuildFileFromDatabase(
this,
(const google::protobuf::FileDescriptorProto *)v7) != 0;
}
google::protobuf::FileDescriptorProto::~FileDescriptorProto((google::protobuf::FileDescriptorProto *)v7);
}
else
{
LODWORD(v4) = 0;
}
return (unsigned int)v4;
}
|
TryFindExtensionInFallbackDatabase:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xe8
CMP qword ptr [RDI + 0x8],0x0
JZ 0x0011e60d
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00147e76
MOV RDI,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [R14 + 0x8]
ADD RSI,0x20
MOV RAX,qword ptr [RDI]
LAB_0011e5ce:
MOV EDX,EBP
MOV RCX,R15
CALL qword ptr [RAX + 0x20]
TEST AL,AL
JZ 0x0011e609
MOV RAX,qword ptr [RSP + 0xc0]
AND RAX,-0x4
MOVUPS XMM0,xmmword ptr [RAX]
MOV EDI,0x160
ADD RDI,qword ptr [RBX + 0x20]
MOV RSI,RSP
MOVUPS xmmword ptr [RSI],XMM0
CALL 0x0013fb1a
TEST RAX,RAX
JZ 0x0011e611
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0011e611
LAB_0011e609:
XOR EBX,EBX
JMP 0x0011e624
LAB_0011e60d:
XOR EBX,EBX
JMP 0x0011e62e
LAB_0011e611:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011f4d8
LAB_0011e61e:
TEST RAX,RAX
SETNZ BL
LAB_0011e624:
LEA RDI,[RSP + 0x10]
CALL 0x001482b2
LAB_0011e62e:
MOV EAX,EBX
ADD RSP,0xe8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor
const*, int) const */
ulong __thiscall
google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase
(DescriptorPool *this,Descriptor *param_1,int param_2)
{
char cVar1;
long lVar2;
ulong uVar3;
int8 local_108;
int8 uStack_100;
FileDescriptorProto local_f8 [176];
ulong local_48;
if (*(long *)(this + 8) == 0) {
uVar3 = 0;
goto LAB_0011e62e;
}
FileDescriptorProto::FileDescriptorProto(local_f8,(Arena *)0x0,false);
/* try { // try from 0011e5ce to 0011e61d has its CatchHandler @ 0011e63e */
cVar1 = (**(code **)(**(long **)(this + 8) + 0x20))
(*(long **)(this + 8),*(long *)(param_1 + 8) + 0x20,param_2,local_f8);
if (cVar1 == '\0') {
LAB_0011e609:
uVar3 = 0;
}
else {
local_108 = *(int8 *)(local_48 & 0xfffffffffffffffc);
uStack_100 = ((int8 *)(local_48 & 0xfffffffffffffffc))[1];
lVar2 = std::
_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(*(long *)(this + 0x20) + 0x160),(StringPiece *)&local_108);
if ((lVar2 != 0) && (*(long *)(lVar2 + 0x18) != 0)) goto LAB_0011e609;
lVar2 = BuildFileFromDatabase(this,local_f8);
uVar3 = CONCAT71((int7)((ulong)this >> 8),lVar2 != 0);
}
FileDescriptorProto::~FileDescriptorProto(local_f8);
LAB_0011e62e:
return uVar3 & 0xffffffff;
}
|
|
14,014
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O1
|
c
|
nglog::LogMessage::LogStream::~LogStream():
pushq %rbx
leaq 0x1e6cc(%rip), %rax # 0x31888
leaq 0x18(%rax), %rcx
movq %rcx, (%rdi)
leaq 0x60(%rdi), %rbx
addq $0x40, %rax
movq %rax, 0x60(%rdi)
movq 0x1ed52(%rip), %rax # 0x31f28
addq $0x10, %rax
movq %rax, 0x8(%rdi)
addq $0x40, %rdi
callq 0x7760
movq %rbx, %rdi
popq %rbx
jmp 0x7160
|
_ZN5nglog10NullStreamD1Ev:
push rbx
lea rax, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rcx, [rax+18h]
mov [rdi], rcx
lea rbx, [rdi+60h]
add rax, 40h ; '@'
mov [rdi+60h], rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [rdi+8], rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
|
void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
*(_QWORD *)this = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
*((_QWORD *)this + 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
*((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((nglog::NullStream *)((char *)this + 64));
std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96));
}
|
~NullStream:
PUSH RBX
LEA RAX,[0x131888]
LEA RCX,[RAX + 0x18]
MOV qword ptr [RDI],RCX
LEA RBX,[RDI + 0x60]
ADD RAX,0x40
MOV qword ptr [RDI + 0x60],RAX
MOV RAX,qword ptr [0x00131f28]
ADD RAX,0x10
MOV qword ptr [RDI + 0x8],RAX
ADD RDI,0x40
CALL 0x00107760
MOV RDI,RBX
POP RBX
JMP 0x00107160
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
*(int8 *)this = 0x1318a0;
*(int8 *)(this + 0x60) = 0x1318c8;
*(int **)(this + 8) = PTR_vtable_00131f28 + 0x10;
std::locale::~locale((locale *)(this + 0x40));
std::ios_base::~ios_base((ios_base *)(this + 0x60));
return;
}
|
|
14,015
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O2
|
c
|
nglog::LogMessage::LogStream::~LogStream():
pushq %rbx
movq %rdi, %rbx
callq 0x9530
movq %rbx, %rdi
popq %rbx
jmp 0x7690
|
_ZN5nglog10LogMessage9LogStreamD0Ev:
push rbx
mov rbx, rdi
call _ZN5nglog10LogMessage9LogStreamD1Ev; nglog::LogMessage::LogStream::~LogStream()
mov rdi, rbx
pop rbx
jmp _free
|
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this)
{
nglog::LogMessage::LogStream::~LogStream(this);
free(this);
}
|
~LogStream:
PUSH RBX
MOV RBX,RDI
CALL 0x00109530
MOV RDI,RBX
POP RBX
JMP 0x00107690
|
/* nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
~LogStream(this);
free(this);
return;
}
|
|
14,016
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O3
|
c
|
nglog::LogMessage::LogStream::~LogStream():
pushq %rbx
leaq 0x1eafe(%rip), %rax # 0x318c8
leaq 0x18(%rax), %rcx
movq %rcx, (%rdi)
leaq 0x60(%rdi), %rbx
addq $0x40, %rax
movq %rax, 0x60(%rdi)
movq 0x1f144(%rip), %rax # 0x31f28
addq $0x10, %rax
movq %rax, 0x8(%rdi)
addq $0x40, %rdi
callq 0x7760
movq %rbx, %rdi
popq %rbx
jmp 0x7160
|
_ZN5nglog10NullStreamD1Ev:
push rbx
lea rax, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rcx, [rax+18h]
mov [rdi], rcx
lea rbx, [rdi+60h]
add rax, 40h ; '@'
mov [rdi+60h], rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [rdi+8], rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
|
void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
*(_QWORD *)this = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
*((_QWORD *)this + 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
*((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((nglog::NullStream *)((char *)this + 64));
std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96));
}
|
~NullStream:
PUSH RBX
LEA RAX,[0x1318c8]
LEA RCX,[RAX + 0x18]
MOV qword ptr [RDI],RCX
LEA RBX,[RDI + 0x60]
ADD RAX,0x40
MOV qword ptr [RDI + 0x60],RAX
MOV RAX,qword ptr [0x00131f28]
ADD RAX,0x10
MOV qword ptr [RDI + 0x8],RAX
ADD RDI,0x40
CALL 0x00107760
MOV RDI,RBX
POP RBX
JMP 0x00107160
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
*(int8 *)this = 0x1318e0;
*(int8 *)(this + 0x60) = 0x131908;
*(int **)(this + 8) = PTR_vtable_00131f28 + 0x10;
std::locale::~locale((locale *)(this + 0x40));
std::ios_base::~ios_base((ios_base *)(this + 0x60));
return;
}
|
|
14,017
|
set_prealloc_root
|
eloqsql/mysys/my_alloc.c
|
void set_prealloc_root(MEM_ROOT *root, char *ptr)
{
USED_MEM *next;
for (next=root->used; next ; next=next->next)
{
if ((char*) next <= ptr && (char*) next + next->size > ptr)
{
root->pre_alloc=next;
return;
}
}
for (next=root->free ; next ; next=next->next)
{
if ((char*) next <= ptr && (char*) next + next->size > ptr)
{
root->pre_alloc=next;
return;
}
}
}
|
O0
|
c
|
set_prealloc_root:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x783f8
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x783e9
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
cmpq -0x10(%rbp), %rax
jbe 0x783e9
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x78443
jmp 0x783eb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x783b8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x78443
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x78434
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
cmpq -0x10(%rbp), %rax
jbe 0x78434
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x78443
jmp 0x78436
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x78403
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
set_prealloc_root:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_783B8:
cmp [rbp+var_18], 0
jz short loc_783F8
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
ja short loc_783E9
mov rax, [rbp+var_18]
mov rcx, [rbp+var_18]
add rax, [rcx+10h]
cmp rax, [rbp+var_10]
jbe short loc_783E9
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp short loc_78443
loc_783E9:
jmp short $+2
loc_783EB:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_783B8
loc_783F8:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
loc_78403:
cmp [rbp+var_18], 0
jz short loc_78443
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
ja short loc_78434
mov rax, [rbp+var_18]
mov rcx, [rbp+var_18]
add rax, [rcx+10h]
cmp rax, [rbp+var_10]
jbe short loc_78434
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp short loc_78443
loc_78434:
jmp short $+2
loc_78436:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_78403
loc_78443:
pop rbp
retn
|
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2)
{
_QWORD *result; // rax
_QWORD *i; // [rsp+0h] [rbp-18h]
_QWORD *j; // [rsp+0h] [rbp-18h]
for ( i = (_QWORD *)a1[1]; i; i = (_QWORD *)*i )
{
if ( (unsigned long long)i <= a2 && (unsigned long long)i + i[2] > a2 )
{
result = a1;
a1[2] = i;
return result;
}
}
result = (_QWORD *)*a1;
for ( j = (_QWORD *)*a1; j; j = (_QWORD *)*j )
{
if ( (unsigned long long)j <= a2 && (unsigned long long)j + j[2] > a2 )
{
result = a1;
a1[2] = j;
return result;
}
result = (_QWORD *)*j;
}
return result;
}
|
set_prealloc_root:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_001783b8:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001783f8
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x001783e9
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RCX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x001783e9
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00178443
LAB_001783e9:
JMP 0x001783eb
LAB_001783eb:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001783b8
LAB_001783f8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00178403:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00178443
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x00178434
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RCX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x00178434
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00178443
LAB_00178434:
JMP 0x00178436
LAB_00178436:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00178403
LAB_00178443:
POP RBP
RET
|
void set_prealloc_root(int8 *param_1,int8 *param_2)
{
int8 *local_20;
local_20 = (int8 *)param_1[1];
while( true ) {
if (local_20 == (int8 *)0x0) {
local_20 = (int8 *)*param_1;
while( true ) {
if (local_20 == (int8 *)0x0) {
return;
}
if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2])))
break;
local_20 = (int8 *)*local_20;
}
param_1[2] = local_20;
return;
}
if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break;
local_20 = (int8 *)*local_20;
}
param_1[2] = local_20;
return;
}
|
|
14,018
|
pagecache_delete
|
eloqsql/storage/maria/ma_pagecache.c
|
my_bool pagecache_delete(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
my_bool flush)
{
my_bool error= 0;
enum pagecache_page_pin pin= lock_to_pin_one_phase[lock];
DBUG_ENTER("pagecache_delete");
DBUG_PRINT("enter", ("fd: %u page: %lu %s %s",
(uint) file->file, (ulong) pageno,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED);
DBUG_ASSERT(pin == PAGECACHE_PIN ||
pin == PAGECACHE_PIN_LEFT_PINNED);
restart:
DBUG_ASSERT(pageno < ((1ULL) << 40));
if (pagecache->can_be_used)
{
/* Key cache is used */
reg1 PAGECACHE_BLOCK_LINK *block;
PAGECACHE_HASH_LINK **unused_start, *page_link;
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (!pagecache->can_be_used)
goto end;
inc_counter_for_resize_op(pagecache);
page_link= get_present_hash_link(pagecache, file, pageno, &unused_start);
if (!page_link)
{
DBUG_PRINT("info", ("There is no such page in the cache"));
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_RETURN(0);
}
block= page_link->block;
if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH))
{
DBUG_PRINT("info", ("Block %p already is %s",
block,
((block->status & PCBLOCK_REASSIGNED) ?
"reassigned" : "in switch")));
PCBLOCK_INFO(block);
page_link->requests--;
dec_counter_for_resize_op(pagecache);
goto end;
}
/* See NOTE for pagecache_unlock about registering requests. */
if (pin == PAGECACHE_PIN)
reg_requests(pagecache, block, 1);
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
{
/*
We failed to writelock the block, cache is unlocked, and last write
lock is released, we will try to get the block again.
*/
if (pin == PAGECACHE_PIN)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
dec_counter_for_resize_op(pagecache);
DBUG_PRINT("info", ("restarting..."));
goto restart;
}
/* we can't delete with opened direct link for write */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0);
error= pagecache_delete_internal(pagecache, block, page_link, flush);
end:
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
}
DBUG_RETURN(error);
}
|
O0
|
c
|
pagecache_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movb %al, -0x25(%rbp)
movb $0x0, -0x26(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x8da0d3(%rip), %rax # 0x13fc0f0
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
jmp 0xb22025
jmp 0xb22027
jmp 0xb22029
jmp 0xb2202b
jmp 0xb2202d
jmp 0xb2202f
jmp 0xb22031
jmp 0xb22033
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
je 0xb2219f
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
leaq 0x2aeaa1(%rip), %rsi # 0xdd0af7
movl $0x107a, %edx # imm = 0x107A
callq 0xb1f7c0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
jne 0xb22072
jmp 0xb2218f
movq -0x10(%rbp), %rdi
callq 0xb1fb70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0xb221b0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xb220c1
jmp 0xb2209d
jmp 0xb2209f
movq -0x10(%rbp), %rdi
callq 0xb208a0
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb1f830
movb $0x0, -0x1(%rbp)
jmp 0xb221a7
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0xb22100
jmp 0xb220df
jmp 0xb220e1
jmp 0xb220e3
jmp 0xb220e5
movq -0x48(%rbp), %rax
movl 0x68(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x10(%rbp), %rdi
callq 0xb208a0
jmp 0xb2218f
cmpl $0x2, -0x2c(%rbp)
jne 0xb22118
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0xb22290
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x2c(%rbp), %ecx
xorl %r8d, %r8d
callq 0xb20580
cmpb $0x0, %al
je 0xb22173
cmpl $0x2, -0x2c(%rbp)
jne 0xb2214a
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0xb20720
movq -0x10(%rbp), %rdi
callq 0xb208a0
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb1f830
movq -0x10(%rbp), %rdi
callq 0xb208a0
jmp 0xb2216e
jmp 0xb2202f
jmp 0xb22175
jmp 0xb22177
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movsbl -0x25(%rbp), %ecx
callq 0xb21d30
movb %al, -0x26(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0xb1f830
jmp 0xb221a1
movb -0x26(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
|
pagecache_delete:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_25], al
mov [rbp+var_26], 0
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, lock_to_pin_one_phase
mov eax, [rax+rcx*4]
mov [rbp+var_2C], eax
jmp short $+2
loc_B22025:
jmp short $+2
loc_B22027:
jmp short $+2
loc_B22029:
jmp short $+2
loc_B2202B:
jmp short $+2
loc_B2202D:
jmp short $+2
loc_B2202F:
jmp short $+2
loc_B22031:
jmp short $+2
loc_B22033:
mov rax, [rbp+var_10]
cmp byte ptr [rax+1AAh], 0
jz loc_B2219F
mov rdi, [rbp+var_10]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_121; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 107Ah
call inline_mysql_mutex_lock_7
mov rax, [rbp+var_10]
cmp byte ptr [rax+1AAh], 0
jnz short loc_B22072
jmp loc_B2218F
loc_B22072:
mov rdi, [rbp+var_10]
call inc_counter_for_resize_op
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call get_present_hash_link
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jnz short loc_B220C1
jmp short $+2
loc_B2209D:
jmp short $+2
loc_B2209F:
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock_7
mov [rbp+var_1], 0
jmp loc_B221A7
loc_B220C1:
mov rax, [rbp+var_48]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+74h]
and eax, 0Ch
cmp eax, 0
jz short loc_B22100
jmp short $+2
loc_B220DF:
jmp short $+2
loc_B220E1:
jmp short $+2
loc_B220E3:
jmp short $+2
loc_B220E5:
mov rax, [rbp+var_48]
mov ecx, [rax+68h]
add ecx, 0FFFFFFFFh
mov [rax+68h], ecx
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
jmp loc_B2218F
loc_B22100:
cmp [rbp+var_2C], 2
jnz short loc_B22118
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 1
call reg_requests
loc_B22118:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, [rbp+var_24]
mov ecx, [rbp+var_2C]
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_B22173
cmp [rbp+var_2C], 2
jnz short loc_B2214A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 1
call unreg_request
loc_B2214A:
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock_7
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
jmp short $+2
loc_B2216E:
jmp loc_B2202F
loc_B22173:
jmp short $+2
loc_B22175:
jmp short $+2
loc_B22177:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
movsx ecx, [rbp+var_25]
call pagecache_delete_internal
mov [rbp+var_26], al
loc_B2218F:
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock_7
loc_B2219F:
jmp short $+2
loc_B221A1:
mov al, [rbp+var_26]
mov [rbp+var_1], al
loc_B221A7:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
|
char pagecache_delete(_QWORD *a1, long long a2, long long a3, unsigned int a4, bool a5)
{
long long present_hash_link; // [rsp+8h] [rbp-48h]
_BYTE v7[8]; // [rsp+10h] [rbp-40h] BYREF
long long v8; // [rsp+18h] [rbp-38h]
int v9; // [rsp+24h] [rbp-2Ch]
char v10; // [rsp+2Ah] [rbp-26h]
bool v11; // [rsp+2Bh] [rbp-25h]
unsigned int v12; // [rsp+2Ch] [rbp-24h]
long long v13; // [rsp+30h] [rbp-20h]
long long v14; // [rsp+38h] [rbp-18h]
_QWORD *v15; // [rsp+40h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = 0;
v9 = lock_to_pin_one_phase[a4];
while ( *((_BYTE *)v15 + 426) )
{
inline_mysql_mutex_lock_7(
(long long)(v15 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x107Au);
if ( !*((_BYTE *)v15 + 426) )
goto LABEL_15;
inc_counter_for_resize_op((long long)v15);
present_hash_link = get_present_hash_link(v15, v14, v13, v7);
if ( !present_hash_link )
{
dec_counter_for_resize_op((long long)v15);
inline_mysql_mutex_unlock_7((long long)(v15 + 25));
return 0;
}
v8 = *(_QWORD *)(present_hash_link + 16);
if ( (*(_WORD *)(v8 + 116) & 0xC) != 0 )
{
--*(_DWORD *)(present_hash_link + 104);
dec_counter_for_resize_op((long long)v15);
LABEL_15:
inline_mysql_mutex_unlock_7((long long)(v15 + 25));
return v10;
}
if ( v9 == 2 )
reg_requests(v15, v8, 1LL);
if ( !make_lock_and_pin((long long)v15, v8, v12, v9, 0) )
{
v10 = pagecache_delete_internal(v15, v8, present_hash_link, v11);
goto LABEL_15;
}
if ( v9 == 2 )
unreg_request(v15, v8, 1);
dec_counter_for_resize_op((long long)v15);
inline_mysql_mutex_unlock_7((long long)(v15 + 25));
dec_counter_for_resize_op((long long)v15);
}
return v10;
}
|
pack_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x1f8],RDI
MOV qword ptr [RBP + -0x200],RSI
MOV RAX,qword ptr [RBP + -0x1f8]
MOV qword ptr [RBP + -0x218],RAX
LEA RSI,[0xeca642]
LEA RDI,[RBP + -0x1f0]
MOV qword ptr [RBP + -0x210],RDI
CALL 0x00534910
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x208],RCX
MOV RDI,qword ptr [RBP + -0x208]
MOV RSI,qword ptr [RAX + 0xb0]
MOV EAX,dword ptr [RAX + 0x84]
MOV EDX,EAX
CALL 0x005331a0
MOV RAX,qword ptr [RBP + -0x218]
MOV RDI,qword ptr [RBP + -0x208]
MOV EAX,dword ptr [RAX + 0x84]
ADD RDI,RAX
LEA RSI,[0xeca646]
CALL 0x00534910
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x208],RCX
MOV RDI,qword ptr [RBP + -0x208]
MOV RSI,qword ptr [RAX + 0xa8]
MOV EAX,dword ptr [RAX + 0x80]
MOV EDX,EAX
CALL 0x005331a0
MOV RAX,qword ptr [RBP + -0x218]
MOV RDI,qword ptr [RBP + -0x208]
MOV EAX,dword ptr [RAX + 0x80]
ADD RDI,RAX
LEA RSI,[0xeca834]
CALL 0x00534910
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x208],RCX
MOV EAX,dword ptr [RAX + 0x164]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x208]
MOV EDX,0xa
MOV dword ptr [RBP + -0x21c],EDX
CALL 0x00d88640
MOV qword ptr [RBP + -0x208],RAX
MOV RDI,qword ptr [RBP + -0x208]
LEA RSI,[0xeca64e]
CALL 0x00534910
MOV EDX,dword ptr [RBP + -0x21c]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x208],RCX
MOV EAX,dword ptr [RAX + 0x160]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x208]
CALL 0x00d88640
MOV RSI,qword ptr [RBP + -0x210]
MOV qword ptr [RBP + -0x208],RAX
MOV RDI,qword ptr [RBP + -0x200]
MOV EAX,dword ptr [RBP + -0x208]
MOV ECX,ESI
SUB EAX,ECX
MOV EDX,EAX
LEA RCX,[0x1501e00]
CALL 0x005b3b70
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00b22199
ADD RSP,0x220
POP RBP
RET
LAB_00b22199:
CALL 0x00533650
|
/* Create_file_log_event::pack_info(Protocol*) */
void __thiscall Create_file_log_event::pack_info(Create_file_log_event *this,Protocol *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
char local_1f8 [488];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar2 = stpcpy(local_1f8,"db=");
memcpy(pcVar2,*(void **)(this + 0xb0),(ulong)*(uint *)(this + 0x84));
pcVar2 = stpcpy(pcVar2 + *(uint *)(this + 0x84),";table=");
memcpy(pcVar2,*(void **)(this + 0xa8),(ulong)*(uint *)(this + 0x80));
pcVar2 = stpcpy(pcVar2 + *(uint *)(this + 0x80),";file_id=");
pcVar2 = (char *)int10_to_str(*(int4 *)(this + 0x164),pcVar2);
pcVar2 = stpcpy(pcVar2,";block_len=");
iVar1 = int10_to_str(*(int4 *)(this + 0x160),pcVar2,10);
Protocol::store(param_1,local_1f8,(ulong)(uint)(iVar1 - (int)local_1f8),
(charset_info_st *)&my_charset_bin);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,019
|
bitmap_union
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits == map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ |= *from++;
}
|
O0
|
c
|
bitmap_union:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xf0744
jmp 0xf0746
jmp 0xf0748
jmp 0xf074a
jmp 0xf074c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xf0788
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x18(%rbp)
orl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xf0758
popq %rbp
retq
nopw (%rax,%rax)
|
bitmap_union:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short $+2
loc_F0744:
jmp short $+2
loc_F0746:
jmp short $+2
loc_F0748:
jmp short $+2
loc_F074A:
jmp short $+2
loc_F074C:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_F0758:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
ja short loc_F0788
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov ecx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 4
mov [rbp+var_18], rdx
or ecx, [rax]
mov [rax], ecx
jmp short loc_F0758
loc_F0788:
pop rbp
retn
|
_DWORD * bitmap_union(_QWORD *a1, int **a2)
{
_DWORD *result; // rax
int *v3; // rax
int v4; // ecx
_DWORD *v5; // rax
unsigned long long v6; // [rsp+0h] [rbp-28h]
int *v7; // [rsp+8h] [rbp-20h]
_DWORD *v8; // [rsp+10h] [rbp-18h]
v8 = (_DWORD *)*a1;
v7 = *a2;
v6 = a1[1];
while ( 1 )
{
result = v8;
if ( (unsigned long long)v8 > v6 )
break;
v3 = v7++;
v4 = *v3;
v5 = v8++;
*v5 |= v4;
}
return result;
}
|
bitmap_union:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001f0744
LAB_001f0744:
JMP 0x001f0746
LAB_001f0746:
JMP 0x001f0748
LAB_001f0748:
JMP 0x001f074a
LAB_001f074a:
JMP 0x001f074c
LAB_001f074c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f0758:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001f0788
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x20],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x18],RDX
OR ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
JMP 0x001f0758
LAB_001f0788:
POP RBP
RET
|
void bitmap_union(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint *local_28;
uint *local_20;
puVar1 = (uint *)param_1[1];
local_28 = (uint *)*param_2;
local_20 = (uint *)*param_1;
while (local_20 <= puVar1) {
*local_20 = *local_28 | *local_20;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
return;
}
|
|
14,020
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::~ConcurrentQueue()
|
angrymouse[P]emittra/include/concurrentqueue.h
|
~ConcurrentQueue()
{
// Destroy producers
auto ptr = producerListTail.load(std::memory_order_relaxed);
while (ptr != nullptr) {
auto next = ptr->next_prod();
if (ptr->token != nullptr) {
ptr->token->producer = nullptr;
}
destroy(ptr);
ptr = next;
}
// Destroy implicit producer hash tables
MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE != 0) {
auto hash = implicitProducerHash.load(std::memory_order_relaxed);
while (hash != nullptr) {
auto prev = hash->prev;
if (prev != nullptr) { // The last hash is part of this object and was not allocated dynamically
for (size_t i = 0; i != hash->capacity; ++i) {
hash->entries[i].~ImplicitProducerKVP();
}
hash->~ImplicitProducerHash();
(Traits::free)(hash);
}
hash = prev;
}
}
// Destroy global free list
auto block = freeList.head_unsafe();
while (block != nullptr) {
auto next = block->freeListNext.load(std::memory_order_relaxed);
if (block->dynamicallyAllocated) {
destroy(block);
}
block = next;
}
// Destroy initial free list
destroy_array(initialBlockPool, initialBlockPoolSize);
}
|
O1
|
c
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::~ConcurrentQueue():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x64de
movq 0x8(%r14), %r15
movq 0x18(%r14), %rax
leaq -0x8(%r15), %r12
testq %r15, %r15
cmoveq %r15, %r12
testq %rax, %rax
je 0x64c6
movq $0x0, (%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq %r14, %rdi
callq 0x3310
movq %r12, %r14
testq %r15, %r15
jne 0x64a7
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x6501
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x6501
movq %rax, %r14
callq 0x3310
movq 0x10(%r14), %rax
movq %r14, %rdi
jmp 0x64eb
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x6527
movq 0x538(%rdi), %r14
cmpb $0x1, 0x540(%rdi)
jne 0x651f
callq 0x3310
movq %r14, %rdi
testq %r14, %r14
jne 0x650a
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3310
nop
|
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEED2Ev:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r14, [rdi]
test r14, r14
jz short loc_64DE
loc_64A7:
mov r15, [r14+8]
mov rax, [r14+18h]
lea r12, [r15-8]
test r15, r15
cmovz r12, r15
test rax, rax
jz short loc_64C6
mov qword ptr [rax], 0
loc_64C6:
mov rax, [r14]
mov rdi, r14
call qword ptr [rax]
mov rdi, r14
call _free
mov r14, r12
test r15, r15
jnz short loc_64A7
loc_64DE:
mov rdi, [rbx+30h]
test rdi, rdi
jz short loc_6501
mov rax, [rdi+10h]
loc_64EB:
test rax, rax
jz short loc_6501
mov r14, rax
call _free
mov rax, [r14+10h]
mov rdi, r14
jmp short loc_64EB
loc_6501:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_6527
loc_650A:
mov r14, [rdi+538h]
cmp byte ptr [rdi+540h], 1
jnz short loc_651F
call _free
loc_651F:
mov rdi, r14
test r14, r14
jnz short loc_650A
loc_6527:
mov rdi, [rbx+18h]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _free
|
long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::~ConcurrentQueue(
long long *a1)
{
long long v2; // r14
long long v3; // r15
_QWORD *v4; // rax
long long v5; // r12
long long v6; // rdi
long long v7; // rax
long long v8; // r14
long long v9; // rdi
long long v10; // r14
v2 = *a1;
if ( *a1 )
{
do
{
v3 = *(_QWORD *)(v2 + 8);
v4 = *(_QWORD **)(v2 + 24);
v5 = v3 - 8;
if ( !v3 )
v5 = 0LL;
if ( v4 )
*v4 = 0LL;
(**(void ( ***)(long long))v2)(v2);
free(v2);
v2 = v5;
}
while ( v3 );
}
v6 = a1[6];
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 16);
while ( v7 )
{
v8 = v7;
free(v6);
v7 = *(_QWORD *)(v8 + 16);
v6 = v8;
}
}
v9 = a1[5];
if ( v9 )
{
do
{
v10 = *(_QWORD *)(v9 + 1336);
if ( *(_BYTE *)(v9 + 1344) == 1 )
free(v9);
v9 = v10;
}
while ( v10 );
}
return free(a1[3]);
}
|
~ConcurrentQueue:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI]
TEST R14,R14
JZ 0x001064de
LAB_001064a7:
MOV R15,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x18]
LEA R12,[R15 + -0x8]
TEST R15,R15
CMOVZ R12,R15
TEST RAX,RAX
JZ 0x001064c6
MOV qword ptr [RAX],0x0
LAB_001064c6:
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX]
MOV RDI,R14
CALL 0x00103310
MOV R14,R12
TEST R15,R15
JNZ 0x001064a7
LAB_001064de:
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JZ 0x00106501
MOV RAX,qword ptr [RDI + 0x10]
LAB_001064eb:
TEST RAX,RAX
JZ 0x00106501
MOV R14,RAX
CALL 0x00103310
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,R14
JMP 0x001064eb
LAB_00106501:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x00106527
LAB_0010650a:
MOV R14,qword ptr [RDI + 0x538]
CMP byte ptr [RDI + 0x540],0x1
JNZ 0x0010651f
CALL 0x00103310
LAB_0010651f:
MOV RDI,R14
TEST R14,R14
JNZ 0x0010650a
LAB_00106527:
MOV RDI,qword ptr [RBX + 0x18]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00103310
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::~ConcurrentQueue() */
void __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::~ConcurrentQueue(ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
*this)
{
int8 *puVar1;
int8 *__ptr;
void *pvVar2;
void *pvVar3;
void *pvVar4;
int8 *puVar5;
puVar1 = *(int8 **)this;
__ptr = puVar1;
while (puVar1 != (int8 *)0x0) {
puVar1 = (int8 *)__ptr[1];
puVar5 = puVar1 + -1;
if (puVar1 == (int8 *)0x0) {
puVar5 = (int8 *)0x0;
}
if ((int8 *)__ptr[3] != (int8 *)0x0) {
*(int8 *)__ptr[3] = 0;
}
(**(code **)*__ptr)(__ptr);
free(__ptr);
__ptr = puVar5;
}
pvVar4 = *(void **)(this + 0x30);
if (pvVar4 != (void *)0x0) {
pvVar2 = *(void **)((long)pvVar4 + 0x10);
while (pvVar3 = pvVar2, pvVar3 != (void *)0x0) {
free(pvVar4);
pvVar4 = pvVar3;
pvVar2 = *(void **)((long)pvVar3 + 0x10);
}
}
pvVar4 = *(void **)(this + 0x28);
while (pvVar2 = pvVar4, pvVar2 != (void *)0x0) {
pvVar4 = *(void **)((long)pvVar2 + 0x538);
if (*(char *)((long)pvVar2 + 0x540) == '\x01') {
free(pvVar2);
}
}
free(*(void **)(this + 0x18));
return;
}
|
|
14,021
|
nlohmann::json_abi_v3_11_2::detail::invalid_iterator nlohmann::json_abi_v3_11_2::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*)
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_2::detail::invalid_iterator nlohmann::json_abi_v3_11_2::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x4d431(%rip), %rsi # 0x9efaa
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x19f24
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x4bc2a
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4bca0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x4bbc0
leaq 0x8(%rsp), %rdi
callq 0xac60
leaq 0x48(%rsp), %rdi
callq 0xac60
leaq 0x28(%rsp), %rdi
callq 0xac60
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x51c48
leaq 0x68(%rsp), %rdi
callq 0xac60
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x51c35
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xac60
jmp 0x51c21
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xac60
jmp 0x51c30
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xac60
jmp 0x51c3f
movq %rax, %rbx
movq %rbx, %rdi
callq 0xaab0
nop
|
_ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_26detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_2::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_26detail9exception11diagnosticsINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEEEESC_PKT_; nlohmann::json_abi_v3_11_2::detail::exception::diagnostics<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>(nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_2::detail::invalid_iterator::invalid_iterator(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_51C35
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_51C21
mov rbx, rax
loc_51C21:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_51C30
mov rbx, rax
loc_51C30:
lea rdi, [rsp+arg_20]; void *
loc_51C35:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_51C3F
mov rbx, rax
loc_51C3F:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_2::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_2::detail::invalid_iterator *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator");
nlohmann::json_abi_v3_11_2::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_2::detail::exception::diagnostics<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>(v5);
nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_2::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_00151b72:
LEA RSI,[0x19efaa]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x00119f24
LAB_00151b88:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0014bc2a
LAB_00151b99:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x0014bca0
LAB_00151ba6:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0014bbc0
LEA RDI,[RSP + 0x8]
CALL 0x0010ac60
LEA RDI,[RSP + 0x48]
CALL 0x0010ac60
LEA RDI,[RSP + 0x28]
CALL 0x0010ac60
MOV RDX,qword ptr [RSP + 0x68]
LAB_00151be0:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00151c48
LAB_00151bea:
LEA RDI,[RSP + 0x68]
CALL 0x0010ac60
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
invalid_iterator *
_ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(invalid_iterator *param_1,int param_2,string *param_3)
{
allocator local_a1;
string local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 00151b72 to 00151b87 has its CatchHandler @ 00151c3c */
std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1);
/* try { // try from 00151b88 to 00151b98 has its CatchHandler @ 00151c2d */
nlohmann::json_abi_v3_11_2::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 00151b99 to 00151ba5 has its CatchHandler @ 00151c1e */
nlohmann::json_abi_v3_11_2::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
(local_a0);
/* try { // try from 00151ba6 to 00151bbc has its CatchHandler @ 00151c0f */
nlohmann::json_abi_v3_11_2::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,local_a0,param_3);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 00151be0 to 00151be9 has its CatchHandler @ 00151c05 */
nlohmann::json_abi_v3_11_2::detail::invalid_iterator::invalid_iterator
(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
14,022
|
nlohmann::json_abi_v3_11_2::detail::invalid_iterator nlohmann::json_abi_v3_11_2::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*)
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_2::detail::invalid_iterator nlohmann::json_abi_v3_11_2::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4d8bf(%rip), %rsi # 0xc20aa
leaq 0x4d8c8(%rip), %rdx # 0xc20ba
leaq 0x28(%rsp), %rdi
callq 0x2ecd4
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x6e0ce
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xa980
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0xa180
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0xa180
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0xa180
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x74895
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x748b0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x748c7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6e2ca
leaq 0x7f6cb(%rip), %rax # 0xf3fa8
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x748f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x74985
movq 0x18(%rsp), %rsi
jmp 0x7497d
movq %rax, %rbx
jmp 0x7496e
movq %rax, %rbx
jmp 0x74985
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x74947
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0xbe47
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x74985
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq %rbx, %rdi
callq 0xaad0
nop
|
_ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_2::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_74895
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_74895:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_748B0
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_748B0:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_748C7
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_748C7:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_2::detail::exception::exception(int,char const*)
lea rax, off_F3FA8
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_748F7
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_748F7:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_74985
mov rsi, [rsp+arg_10]
jmp short loc_7497D
mov rbx, rax
jmp short loc_7496E
mov rbx, rax
jmp short loc_74985
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_74947
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_74947:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_7496E:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_74985
mov rsi, [rsp+arg_30]
loc_7497D:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_74985:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_2::detail::exception * ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_2::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_2::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_2::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_F3FA8;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| |||
14,023
|
get_hash_link
|
eloqsql/mysys/mf_keycache.c
|
static HASH_LINK *get_hash_link(SIMPLE_KEY_CACHE_CB *keycache,
int file, my_off_t filepos)
{
reg1 HASH_LINK *hash_link, **start;
#if defined(KEYCACHE_DEBUG)
int cnt;
#endif
KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu",
(uint) file,(ulong) filepos));
restart:
/*
Find the bucket in the hash table for the pair (file, filepos);
start contains the head of the bucket list,
hash_link points to the first member of the list
*/
hash_link= *(start= &keycache->hash_root[KEYCACHE_HASH(file, filepos)]);
#if defined(KEYCACHE_DEBUG)
cnt= 0;
#endif
/* Look for an element for the pair (file, filepos) in the bucket chain */
while (hash_link &&
(hash_link->diskpos != filepos || hash_link->file != file))
{
hash_link= hash_link->next;
#if defined(KEYCACHE_DEBUG)
cnt++;
if (! (cnt <= keycache->hash_links_used))
{
int i;
for (i=0, hash_link= *start ;
i < cnt ; i++, hash_link= hash_link->next)
{
KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu",
(uint) hash_link->file,(ulong) hash_link->diskpos));
}
}
KEYCACHE_DBUG_ASSERT(cnt <= keycache->hash_links_used);
#endif
}
if (! hash_link)
{
/* There is no hash link in the hash table for the pair (file, filepos) */
if (keycache->free_hash_list)
{
hash_link= keycache->free_hash_list;
keycache->free_hash_list= hash_link->next;
}
else if (keycache->hash_links_used < keycache->hash_links)
{
hash_link= &keycache->hash_link_root[keycache->hash_links_used++];
}
else
{
/* Wait for a free hash link */
struct st_my_thread_var *thread= my_thread_var;
KEYCACHE_PAGE page;
KEYCACHE_DBUG_PRINT("get_hash_link", ("waiting"));
page.file= file;
page.filepos= filepos;
thread->keycache_link= (void *) &page;
link_into_queue(&keycache->waiting_for_hash_link, thread);
KEYCACHE_DBUG_PRINT("get_hash_link: wait",
("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend,
&keycache->cache_lock);
thread->keycache_link= NULL;
goto restart;
}
hash_link->file= file;
hash_link->diskpos= filepos;
link_hash(start, hash_link);
}
/* Register the request for the page */
hash_link->requests++;
return hash_link;
}
|
O0
|
c
|
get_hash_link:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xe4ee5
jmp 0xe4ee7
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movslq -0xc(%rbp), %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x164(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
andq %rdx, %rcx
movq %rcx, %rsi
shlq $0x3, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movq %rdx, -0x28(%rbp)
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x49(%rbp)
je 0xe4f80
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rcx
movb $0x1, %al
cmpq -0x18(%rbp), %rcx
movb %al, -0x4a(%rbp)
jne 0xe4f7a
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0xc(%rbp), %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xe4f89
jmp 0xe4f96
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xe4f4b
cmpq $0x0, -0x20(%rbp)
jne 0xe50aa
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0xe4fd5
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
jmp 0xe5087
movq -0x8(%rbp), %rax
movl 0x44(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0xe500f
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x44(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x44(%rdx)
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xe5085
callq 0xf60c0
movq %rax, -0x30(%rbp)
jmp 0xe501a
movl -0xc(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
leaq -0x40(%rbp), %rcx
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rdi
addq $0x118, %rdi # imm = 0x118
movq -0x30(%rbp), %rsi
callq 0xe5280
jmp 0xe504d
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq 0x6f183(%rip), %rdx # 0x1541ea
movl $0x71e, %ecx # imm = 0x71E
callq 0xe4e60
movq -0x30(%rbp), %rax
movq $0x0, 0xa8(%rax)
jmp 0xe4ee7
jmp 0xe5087
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xe55b0
movq -0x20(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_hash_link_0:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
jmp short $+2
loc_E4EE5:
jmp short $+2
loc_E4EE7:
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
movsxd rcx, [rbp+var_C]
add rax, rcx
mov rcx, [rbp+var_8]
mov ecx, [rcx+164h]
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_48]
mov rdx, [rbp+var_8]
mov edx, [rdx+38h]
sub edx, 1
mov edx, edx
and rcx, rdx
mov rsi, rcx
shl rsi, 3
mov rdx, rax
add rdx, rsi
mov [rbp+var_28], rdx
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
loc_E4F4B:
xor eax, eax
cmp [rbp+var_20], 0
mov [rbp+var_49], al
jz short loc_E4F80
mov rax, [rbp+var_20]
mov rcx, [rax+20h]
mov al, 1
cmp rcx, [rbp+var_18]
mov [rbp+var_4A], al
jnz short loc_E4F7A
mov rax, [rbp+var_20]
mov eax, [rax+18h]
cmp eax, [rbp+var_C]
setnz al
mov [rbp+var_4A], al
loc_E4F7A:
mov al, [rbp+var_4A]
mov [rbp+var_49], al
loc_E4F80:
mov al, [rbp+var_49]
test al, 1
jnz short loc_E4F89
jmp short loc_E4F96
loc_E4F89:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_E4F4B
loc_E4F96:
cmp [rbp+var_20], 0
jnz loc_E50AA
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 0
jz short loc_E4FD5
mov rax, [rbp+var_8]
mov rax, [rax+90h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_8]
mov [rax+90h], rcx
jmp loc_E5087
loc_E4FD5:
mov rax, [rbp+var_8]
mov eax, [rax+44h]
mov rcx, [rbp+var_8]
cmp eax, [rcx+40h]
jge short loc_E500F
mov rax, [rbp+var_8]
mov rax, [rax+88h]
mov rdx, [rbp+var_8]
mov ecx, [rdx+44h]
mov esi, ecx
add esi, 1
mov [rdx+44h], esi
movsxd rcx, ecx
imul rcx, 30h ; '0'
add rax, rcx
mov [rbp+var_20], rax
jmp short loc_E5085
loc_E500F:
call _my_thread_var
mov [rbp+var_30], rax
jmp short $+2
loc_E501A:
mov eax, [rbp+var_C]
mov [rbp+var_40], eax
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
lea rcx, [rbp+var_40]
mov [rax+0A8h], rcx
mov rdi, [rbp+var_8]
add rdi, 118h
mov rsi, [rbp+var_30]
call link_into_queue
jmp short $+2
loc_E504D:
mov rdi, [rbp+var_30]
add rdi, 8
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 71Eh
call inline_mysql_cond_wait_4
mov rax, [rbp+var_30]
mov qword ptr [rax+0A8h], 0
jmp loc_E4EE7
loc_E5085:
jmp short $+2
loc_E5087:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_20]
mov [rax+18h], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+20h], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
call link_hash_0
loc_E50AA:
mov rax, [rbp+var_20]
mov ecx, [rax+28h]
add ecx, 1
mov [rax+28h], ecx
mov rax, [rbp+var_20]
add rsp, 50h
pop rbp
retn
|
long long * get_hash_link_0(long long a1, int a2, unsigned long long a3)
{
const char *v3; // rsi
long long v4; // rax
int v5; // ecx
bool v7; // [rsp+6h] [rbp-4Ah]
bool v8; // [rsp+7h] [rbp-49h]
int v9; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v10; // [rsp+18h] [rbp-38h]
long long v11; // [rsp+20h] [rbp-30h]
const char *v12; // [rsp+28h] [rbp-28h]
long long *i; // [rsp+30h] [rbp-20h]
unsigned long long v14; // [rsp+38h] [rbp-18h]
int v15; // [rsp+44h] [rbp-Ch]
long long v16; // [rsp+48h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
while ( 1 )
{
v3 = (const char *)(8
* ((unsigned int)(*(_DWORD *)(v16 + 56) - 1) & ((v15 + v14 / *(unsigned int *)(v16 + 24))
/ *(unsigned int *)(v16 + 356))));
v12 = &v3[*(_QWORD *)(v16 + 128)];
for ( i = *(long long **)v12; ; i = (long long *)*i )
{
v8 = 0;
if ( i )
{
v7 = 1;
if ( i[4] == v14 )
v7 = *((_DWORD *)i + 6) != v15;
v8 = v7;
}
if ( !v8 )
break;
}
if ( i )
break;
if ( *(_QWORD *)(v16 + 144) )
{
i = *(long long **)(v16 + 144);
*(_QWORD *)(v16 + 144) = *i;
LABEL_15:
*((_DWORD *)i + 6) = v15;
i[4] = v14;
link_hash_0(v12, i);
break;
}
if ( *(_DWORD *)(v16 + 68) < *(_DWORD *)(v16 + 64) )
{
v4 = *(_QWORD *)(v16 + 136);
v5 = *(_DWORD *)(v16 + 68);
*(_DWORD *)(v16 + 68) = v5 + 1;
i = (long long *)(48LL * v5 + v4);
goto LABEL_15;
}
v11 = my_thread_var(a1, v3);
v9 = v15;
v10 = v14;
*(_QWORD *)(v11 + 168) = &v9;
link_into_queue(v16 + 280, v11);
a1 = v11 + 8;
inline_mysql_cond_wait_4(
v11 + 8,
v16 + 192,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x71Eu);
*(_QWORD *)(v11 + 168) = 0LL;
}
++*((_DWORD *)i + 10);
return i;
}
|
get_hash_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001e4ee5
LAB_001e4ee5:
JMP 0x001e4ee7
LAB_001e4ee7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOVSXD RCX,dword ptr [RBP + -0xc]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x164]
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RDX + 0x38]
SUB EDX,0x1
MOV EDX,EDX
AND RCX,RDX
MOV RSI,RCX
SHL RSI,0x3
MOV RDX,RAX
ADD RDX,RSI
MOV qword ptr [RBP + -0x28],RDX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001e4f4b:
XOR EAX,EAX
CMP qword ptr [RBP + -0x20],0x0
MOV byte ptr [RBP + -0x49],AL
JZ 0x001e4f80
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x20]
MOV AL,0x1
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x4a],AL
JNZ 0x001e4f7a
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
CMP EAX,dword ptr [RBP + -0xc]
SETNZ AL
MOV byte ptr [RBP + -0x4a],AL
LAB_001e4f7a:
MOV AL,byte ptr [RBP + -0x4a]
MOV byte ptr [RBP + -0x49],AL
LAB_001e4f80:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x001e4f89
JMP 0x001e4f96
LAB_001e4f89:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e4f4b
LAB_001e4f96:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e50aa
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x001e4fd5
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x90],RCX
JMP 0x001e5087
LAB_001e4fd5:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x40]
JGE 0x001e500f
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x88]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x44]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x44],ESI
MOVSXD RCX,ECX
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e5085
LAB_001e500f:
CALL 0x001f60c0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e501a
LAB_001e501a:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x40]
MOV qword ptr [RAX + 0xa8],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x118
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001e5280
JMP 0x001e504d
LAB_001e504d:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[0x2541ea]
MOV ECX,0x71e
CALL 0x001e4e60
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0xa8],0x0
JMP 0x001e4ee7
LAB_001e5085:
JMP 0x001e5087
LAB_001e5087:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001e55b0
LAB_001e50aa:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x28]
ADD ECX,0x1
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x50
POP RBP
RET
|
int8 * get_hash_link(long param_1,int param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
bool bVar3;
int local_48 [2];
ulong local_40;
long local_38;
long local_30;
int8 *local_28;
ulong local_20;
int local_14;
long local_10;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
while( true ) {
uVar2 = (local_20 / *(uint *)(local_10 + 0x18) + (long)local_14) /
(ulong)*(uint *)(local_10 + 0x164) & (ulong)(*(int *)(local_10 + 0x38) - 1);
local_30 = *(long *)(local_10 + 0x80) + uVar2 * 8;
local_28 = *(int8 **)(*(long *)(local_10 + 0x80) + uVar2 * 8);
while( true ) {
bVar3 = false;
if ((local_28 != (int8 *)0x0) && (bVar3 = true, local_28[4] == local_20)) {
bVar3 = *(int *)(local_28 + 3) != local_14;
}
if (!bVar3) break;
local_28 = (int8 *)*local_28;
}
if (local_28 != (int8 *)0x0) goto LAB_001e50aa;
if (*(long *)(local_10 + 0x90) != 0) break;
if (*(int *)(local_10 + 0x44) < *(int *)(local_10 + 0x40)) {
iVar1 = *(int *)(local_10 + 0x44);
*(int *)(local_10 + 0x44) = iVar1 + 1;
local_28 = (int8 *)(*(long *)(local_10 + 0x88) + (long)iVar1 * 0x30);
LAB_001e5087:
*(int *)(local_28 + 3) = local_14;
local_28[4] = local_20;
link_hash(local_30,local_28);
LAB_001e50aa:
*(int *)(local_28 + 5) = *(int *)(local_28 + 5) + 1;
return local_28;
}
local_38 = _my_thread_var();
local_48[0] = local_14;
local_40 = local_20;
*(int **)(local_38 + 0xa8) = local_48;
link_into_queue(local_10 + 0x118,local_38);
inline_mysql_cond_wait
(local_38 + 8,local_10 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x71e);
*(int8 *)(local_38 + 0xa8) = 0;
}
local_28 = *(int8 **)(local_10 + 0x90);
*(int8 *)(local_10 + 0x90) = *local_28;
goto LAB_001e5087;
}
|
|
14,024
|
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
|
monkey531[P]llama/common/json.hpp
|
static std::string name(const std::string& ename, int id_)
{
return concat("[json.exception.", ename, '.', std::to_string(id_), "] ");
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r15d
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movb $0x2e, 0xf(%rsp)
movl %edx, %ebp
negl %ebp
cmovsl %edx, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x6af93
movl $0x4, %r12d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x6af8a
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x6af90
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x6af93
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x6af57
addl $-0x3, %r12d
jmp 0x6af93
addl $-0x2, %r12d
jmp 0x6af93
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x1ba60
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x6b115
leaq 0x89d78(%rip), %rsi # 0xf4d46
leaq 0x91ccf(%rip), %r9 # 0xfcca4
leaq 0xf(%rsp), %rcx
movq %rbx, %rdi
movq 0x10(%rsp), %rdx
movq %r13, %r8
callq 0x6b035
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x6b001
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x6b02d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rdi
callq 0x1bff0
|
_ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15d, edx
mov [rsp+68h+var_58], rsi
mov rbx, rdi
mov [rsp+68h+var_59], 2Eh ; '.'
mov ebp, edx
neg ebp
cmovs ebp, edx
mov r12d, 1
cmp ebp, 0Ah
jb short loc_6AF93
mov r12d, 4
mov eax, 0D1B71759h
mov ecx, ebp
loc_6AF57:
cmp ecx, 63h ; 'c'
jbe short loc_6AF8A
cmp ecx, 3E7h
jbe short loc_6AF90
cmp ecx, 2710h
jb short loc_6AF93
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r12d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_6AF57
add r12d, 0FFFFFFFDh
jmp short loc_6AF93
loc_6AF8A:
add r12d, 0FFFFFFFEh
jmp short loc_6AF93
loc_6AF90:
dec r12d
loc_6AF93:
shr r15d, 1Fh
lea esi, [r12+r15]
lea r14, [rsp+68h+var_40]
mov [r14-10h], r14
lea r13, [rsp+68h+var_50]
mov rdi, r13
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r15, [r13+0]
mov rdi, r15
mov esi, r12d
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
lea rsi, aJsonException; "[json.exception."
lea r9, a19+8; "] "
lea rcx, [rsp+68h+var_59]
mov rdi, rbx
mov rdx, [rsp+68h+var_58]
mov r8, r13
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA17_KcRKS8_cS8_RA3_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(char const(&)[17],std::string const&,char,std::string,char const(&)[3] &&)
mov rdi, [rsp+68h+var_50]; void *
cmp rdi, r14
jz short loc_6B001
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6B001:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r14
jz short loc_6B02D
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6B02D:
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::exception::name(long long a1, long long a2, int a3)
{
unsigned int v3; // ebp
unsigned int v4; // r12d
unsigned int v5; // ecx
bool v6; // cc
unsigned int v7; // r15d
char v9; // [rsp+Fh] [rbp-59h] BYREF
long long v10; // [rsp+10h] [rbp-58h]
void *v11[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v12[8]; // [rsp+28h] [rbp-40h] BYREF
v10 = a2;
v9 = 46;
v3 = -a3;
if ( a3 > 0 )
v3 = a3;
v4 = 1;
if ( v3 >= 0xA )
{
v4 = 4;
v5 = v3;
while ( 1 )
{
if ( v5 <= 0x63 )
{
v4 -= 2;
goto LABEL_12;
}
if ( v5 <= 0x3E7 )
break;
if ( v5 < 0x2710 )
goto LABEL_12;
v4 += 4;
v6 = v5 <= 0x1869F;
v5 /= 0x2710u;
if ( v6 )
{
v4 -= 3;
goto LABEL_12;
}
}
--v4;
}
LABEL_12:
v7 = (unsigned int)a3 >> 31;
v11[0] = v12;
std::string::_M_construct(v11, v4 + ((unsigned int)a3 >> 31), 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v11[0] + v7, v4, v3);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(
a1,
(unsigned int)"[json.exception.",
v10,
(unsigned int)&v9,
(unsigned int)v11,
(unsigned int)"] ");
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
return a1;
}
|
name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15D,EDX
MOV qword ptr [RSP + 0x10],RSI
MOV RBX,RDI
MOV byte ptr [RSP + 0xf],0x2e
MOV EBP,EDX
NEG EBP
CMOVS EBP,EDX
MOV R12D,0x1
CMP EBP,0xa
JC 0x0016af93
MOV R12D,0x4
MOV EAX,0xd1b71759
MOV ECX,EBP
LAB_0016af57:
CMP ECX,0x63
JBE 0x0016af8a
CMP ECX,0x3e7
JBE 0x0016af90
CMP ECX,0x2710
JC 0x0016af93
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R12D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x0016af57
ADD R12D,-0x3
JMP 0x0016af93
LAB_0016af8a:
ADD R12D,-0x2
JMP 0x0016af93
LAB_0016af90:
DEC R12D
LAB_0016af93:
SHR R15D,0x1f
LEA ESI,[R12 + R15*0x1]
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x10],R14
LEA R13,[RSP + 0x18]
MOV RDI,R13
MOV EDX,0x2d
CALL 0x0011ba60
ADD R15,qword ptr [R13]
MOV RDI,R15
MOV ESI,R12D
MOV EDX,EBP
CALL 0x0016b115
LAB_0016afc7:
LEA RSI,[0x1f4d46]
LEA R9,[0x1fcca4]
LEA RCX,[RSP + 0xf]
MOV RDI,RBX
MOV RDX,qword ptr [RSP + 0x10]
MOV R8,R13
CALL 0x0016b035
LAB_0016afea:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R14
JZ 0x0016b001
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b910
LAB_0016b001:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::string const&, int) */
exception * __thiscall
nlohmann::json_abi_v3_11_3::detail::exception::name(exception *this,string *param_1,int param_2)
{
uint uVar1;
uint uVar2;
ulong uVar3;
uint uVar4;
uint uVar5;
char local_59;
string *local_58;
long *local_50 [2];
long local_40 [2];
local_59 = '.';
uVar4 = -param_2;
if (0 < param_2) {
uVar4 = param_2;
}
uVar5 = 1;
if (9 < uVar4) {
uVar3 = (ulong)uVar4;
uVar1 = 4;
do {
uVar5 = uVar1;
uVar2 = (uint)uVar3;
if (uVar2 < 100) {
uVar5 = uVar5 - 2;
goto LAB_0016af93;
}
if (uVar2 < 1000) {
uVar5 = uVar5 - 1;
goto LAB_0016af93;
}
if (uVar2 < 10000) goto LAB_0016af93;
uVar3 = uVar3 / 10000;
uVar1 = uVar5 + 4;
} while (99999 < uVar2);
uVar5 = uVar5 + 1;
}
LAB_0016af93:
local_58 = param_1;
local_50[0] = local_40;
std::__cxx11::string::_M_construct((ulong)local_50,(char)uVar5 - (char)(param_2 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)((uint)param_2 >> 0x1f) + (long)local_50[0]),uVar5,uVar4);
/* try { // try from 0016afc7 to 0016afe9 has its CatchHandler @ 0016b013 */
concat<std::__cxx11::string,char_const(&)[17],std::__cxx11::string_const&,char,std::__cxx11::string,char_const(&)[3]>
((detail *)this,"[json.exception.",local_58,&local_59,(string *)local_50,"] ");
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return this;
}
|
|
14,025
|
nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_msgpack_object(unsigned long)
|
monkey531[P]llama/common/./json.hpp
|
bool get_msgpack_object(const std::size_t len)
{
if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))
{
return false;
}
string_t key;
for (std::size_t i = 0; i < len; ++i)
{
get();
if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key)))
{
return false;
}
if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))
{
return false;
}
key.clear();
}
return sax->end_object();
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_msgpack_object(unsigned long):
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rax), %rdi
movq 0x50(%rsp), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18ef03
jmp 0x18ef0d
movb $0x0, 0x67(%rsp)
jmp 0x18f046
leaq 0x30(%rsp), %rdi
callq 0x504a0
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x18f012
movq 0x10(%rsp), %rdi
callq 0x18b910
jmp 0x18ef3c
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x18f100
movb %al, 0xf(%rsp)
jmp 0x18ef51
movb 0xf(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x18ef62
jmp 0x18ef89
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
leaq 0x30(%rsp), %rsi
callq *%rax
movb %al, 0xd(%rsp)
jmp 0x18ef7f
movb 0xd(%rsp), %al
xorb $-0x1, %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18ef97
jmp 0x18efc6
movb $0x0, 0x67(%rsp)
movl $0x1, 0x18(%rsp)
jmp 0x18f03c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x510c0
jmp 0x18f051
movq 0x10(%rsp), %rdi
callq 0x18ab80
movb %al, 0xc(%rsp)
jmp 0x18efd6
movb 0xc(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18efe6
jmp 0x18eff5
movb $0x0, 0x67(%rsp)
movl $0x1, 0x18(%rsp)
jmp 0x18f03c
leaq 0x30(%rsp), %rdi
callq 0x507b0
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x18ef20
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movb %al, 0xb(%rsp)
jmp 0x18f02a
movb 0xb(%rsp), %al
andb $0x1, %al
movb %al, 0x67(%rsp)
movl $0x1, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x510c0
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x50940
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE18get_msgpack_objectEm:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_58], rax
mov rdi, [rax+28h]
mov rsi, [rsp+68h+var_18]
mov rax, [rdi]
call qword ptr [rax+38h]
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18EF03
jmp short loc_18EF0D
loc_18EF03:
mov [rsp+68h+var_1], 0
jmp loc_18F046
loc_18EF0D:
lea rdi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rsp+68h+var_40], 0
loc_18EF20:
mov rax, [rsp+68h+var_40]
cmp rax, [rsp+68h+var_18]
jnb loc_18F012
mov rdi, [rsp+68h+var_58]
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE3getEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get(void)
jmp short $+2
loc_18EF3C:
mov rdi, [rsp+68h+var_58]
lea rsi, [rsp+68h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE18get_msgpack_stringERSB_; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get_msgpack_string(std::string&)
mov [rsp+68h+var_59], al
jmp short $+2
loc_18EF51:
mov cl, [rsp+68h+var_59]
mov al, 1
test cl, 1
mov [rsp+68h+var_5A], al
jnz short loc_18EF62
jmp short loc_18EF89
loc_18EF62:
mov rax, [rsp+68h+var_58]
mov rdi, [rax+28h]
mov rax, [rdi]
mov rax, [rax+40h]
lea rsi, [rsp+68h+var_38]
call rax
mov [rsp+68h+var_5B], al
jmp short $+2
loc_18EF7F:
mov al, [rsp+68h+var_5B]
xor al, 0FFh
mov [rsp+68h+var_5A], al
loc_18EF89:
mov al, [rsp+68h+var_5A]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18EF97
jmp short loc_18EFC6
loc_18EF97:
mov [rsp+68h+var_1], 0
mov [rsp+68h+var_50], 1
jmp loc_18F03C
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_18F051
loc_18EFC6:
mov rdi, [rsp+68h+var_58]
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE22parse_msgpack_internalEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::parse_msgpack_internal(void)
mov [rsp+68h+var_5C], al
jmp short $+2
loc_18EFD6:
mov al, [rsp+68h+var_5C]
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18EFE6
jmp short loc_18EFF5
loc_18EFE6:
mov [rsp+68h+var_1], 0
mov [rsp+68h+var_50], 1
jmp short loc_18F03C
loc_18EFF5:
lea rdi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv; std::string::clear(void)
mov rax, [rsp+68h+var_40]
add rax, 1
mov [rsp+68h+var_40], rax
jmp loc_18EF20
loc_18F012:
mov rax, [rsp+68h+var_58]
mov rdi, [rax+28h]
mov rax, [rdi]
mov rax, [rax+48h]
call rax
mov [rsp+68h+var_5D], al
jmp short $+2
loc_18F02A:
mov al, [rsp+68h+var_5D]
and al, 1
mov [rsp+68h+var_1], al
mov [rsp+68h+var_50], 1
loc_18F03C:
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_18F046:
mov al, [rsp+68h+var_1]
and al, 1
add rsp, 68h
retn
loc_18F051:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
|
char nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get_msgpack_object(
long long a1,
unsigned long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+Eh] [rbp-5Ah]
unsigned long long i; // [rsp+28h] [rbp-40h]
_BYTE v9[32]; // [rsp+30h] [rbp-38h] BYREF
unsigned long long v10; // [rsp+50h] [rbp-18h]
long long v11; // [rsp+58h] [rbp-10h]
char v12; // [rsp+67h] [rbp-1h]
v11 = a1;
v10 = a2;
if ( ((*(long long ( **)(_QWORD, unsigned long long))(**(_QWORD **)(a1 + 40) + 56LL))(*(_QWORD *)(a1 + 40), a2) & 1) != 0 )
{
std::string::basic_string(v9);
for ( i = 0LL; i < v10; ++i )
{
nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get(a1);
v7 = 1;
if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get_msgpack_string(
a1,
(unsigned int)v9,
v2,
v3,
v4,
v5) & 1) != 0 )
v7 = ~(*(unsigned __int8 ( **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 40) + 64LL))(
*(_QWORD *)(a1 + 40),
v9);
if ( (v7 & 1) != 0 )
{
v12 = 0;
goto LABEL_13;
}
if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::parse_msgpack_internal(a1) & 1) == 0 )
{
v12 = 0;
goto LABEL_13;
}
std::string::clear(v9);
}
v12 = (*(long long ( **)(_QWORD))(**(_QWORD **)(a1 + 40) + 72LL))(*(_QWORD *)(a1 + 40)) & 1;
LABEL_13:
std::string::~string(v9);
}
else
{
v12 = 0;
}
return v12 & 1;
}
|
~_Vector_base:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x10]
SUB RDX,RSI
LAB_0018eeed:
CALL 0x0018ef50
JMP 0x0018eef4
LAB_0018eef4:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0018ef90
ADD RSP,0x18
RET
|
/* std::_Vector_base<char, std::allocator<char> >::~_Vector_base() */
void __thiscall
std::_Vector_base<char,std::allocator<char>>::~_Vector_base
(_Vector_base<char,std::allocator<char>> *this)
{
/* try { // try from 0018eeed to 0018eef1 has its CatchHandler @ 0018ef03 */
_M_deallocate(this,*(char **)this,*(long *)(this + 0x10) - (long)*(char **)this);
_Vector_impl::~_Vector_impl((_Vector_impl *)this);
return;
}
|
|
14,026
|
gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool)
|
monkey531[P]llama/ggml/src/gguf.cpp
|
void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
const struct gguf_writer gw(buf);
const int64_t n_kv = gguf_get_n_kv(ctx);
const int64_t n_tensors = gguf_get_n_tensors(ctx);
// write header
gw.write(GGUF_MAGIC[0]);
gw.write(GGUF_MAGIC[1]);
gw.write(GGUF_MAGIC[2]);
gw.write(GGUF_MAGIC[3]);
gw.write(ctx->version);
gw.write(n_tensors);
gw.write(n_kv);
// write key-value pairs
for (int64_t i = 0; i < n_kv; ++i) {
gw.write(ctx->kv[i]);
}
// write tensor info
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_meta(ctx->info[i]);
}
// we require the data section to be aligned
gw.pad(ctx->alignment);
if (only_meta) {
return;
}
const size_t offset_data = gw.buf.size();
// write tensor data
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
}
}
|
O1
|
cpp
|
gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
movl %edx, %ebp
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83
imulq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0x3eef2
movb $0x47, (%rax)
incq 0x8(%rsi)
jmp 0x3ef04
leaq 0x1abca(%rip), %rdx # 0x59ac3
movq %rsi, %rdi
movq %rax, %rsi
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3ef1b
movb $0x47, (%rsi)
incq 0x8(%rdi)
jmp 0x3ef27
leaq 0x1aba2(%rip), %rdx # 0x59ac4
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3ef3e
movb $0x55, (%rsi)
incq 0x8(%rdi)
jmp 0x3ef4a
leaq 0x1ab80(%rip), %rdx # 0x59ac5
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3ef61
movb $0x46, (%rsi)
incq 0x8(%rdi)
jmp 0x3ef6d
leaq 0x1ab5e(%rip), %rdx # 0x59ac6
callq 0x17810
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17b30
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x17a20
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a20
cmpq $0x0, (%r15)
jle 0x3efc4
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16070
incq %r12
addq $0x58, %r15
cmpq 0x10(%rsp), %r12
jl 0x3efa7
cmpq $0x0, 0x8(%rsp)
jle 0x3eff5
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq 0x20(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16ae0
incq %r12
addq $0x158, %r15 # imm = 0x158
cmpq 0x8(%rsp), %r12
jl 0x3efd5
movq 0x38(%rbx), %rsi
movq %rsp, %rdi
callq 0x17300
testb %bpl, %bpl
jne 0x3f048
cmpq $0x0, 0x8(%rsp)
jle 0x3f048
movq %rsp, %r14
movq (%r14), %rax
movq 0x8(%rax), %r15
subq (%rax), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rbx), %rsi
addq %r12, %rsi
movq 0x38(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x161d0
incq %r13
addq $0x158, %r12 # imm = 0x158
cmpq 0x8(%rsp), %r13
jl 0x3f021
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov [rsp+48h+var_48], rsi
mov rax, [rdi+10h]
sub rax, [rdi+8]
sar rax, 3
mov rcx, 2E8BA2E8BA2E8BA3h
imul rcx, rax
mov [rsp+48h+var_38], rcx
mov rax, [rdi+28h]
sub rax, [rdi+20h]
mov ebp, edx
sar rax, 3
mov rcx, 82FA0BE82FA0BE83h
imul rcx, rax
mov [rsp+48h+var_40], rcx
mov rax, [rsi+8]
cmp rax, [rsi+10h]
jz short loc_3EEF2
mov byte ptr [rax], 47h ; 'G'
inc qword ptr [rsi+8]
jmp short loc_3EF04
loc_3EEF2:
lea rdx, aGguf; "GGUF"
mov rdi, rsi
mov rsi, rax
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3EF04:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3EF1B
mov byte ptr [rsi], 47h ; 'G'
inc qword ptr [rdi+8]
jmp short loc_3EF27
loc_3EF1B:
lea rdx, aGguf+1; "GUF"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3EF27:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3EF3E
mov byte ptr [rsi], 55h ; 'U'
inc qword ptr [rdi+8]
jmp short loc_3EF4A
loc_3EF3E:
lea rdx, aGguf+2; "UF"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3EF4A:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3EF61
mov byte ptr [rsi], 46h ; 'F'
inc qword ptr [rdi+8]
jmp short loc_3EF6D
loc_3EF61:
lea rdx, aGguf+3; "F"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3EF6D:
mov r14, rsp
mov rdi, r14
mov rsi, rbx
call __ZNK11gguf_writer5writeIjEEvRKT_; gguf_writer::write<uint>(uint const&)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
lea r15, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r15
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
cmp qword ptr [r15], 0
jle short loc_3EFC4
xor r15d, r15d
mov r14, rsp
xor r12d, r12d
loc_3EFA7:
mov rsi, [rbx+8]
add rsi, r15; gguf_kv *
mov rdi, r14; this
call __ZNK11gguf_writer5writeERK7gguf_kv; gguf_writer::write(gguf_kv const&)
inc r12
add r15, 58h ; 'X'
cmp r12, [rsp+48h+var_38]
jl short loc_3EFA7
loc_3EFC4:
cmp [rsp+48h+var_40], 0
jle short loc_3EFF5
xor r15d, r15d
mov r14, rsp
xor r12d, r12d
loc_3EFD5:
mov rsi, [rbx+20h]
add rsi, r15
mov rdi, r14
call __ZNK11gguf_writer17write_tensor_metaERK16gguf_tensor_info; gguf_writer::write_tensor_meta(gguf_tensor_info const&)
inc r12
add r15, 158h
cmp r12, [rsp+48h+var_40]
jl short loc_3EFD5
loc_3EFF5:
mov rsi, [rbx+38h]; unsigned __int64
mov rdi, rsp; this
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
test bpl, bpl
jnz short loc_3F048
cmp [rsp+48h+var_40], 0
jle short loc_3F048
mov r14, rsp
mov rax, [r14]
mov r15, [rax+8]
sub r15, [rax]
xor r12d, r12d
xor r13d, r13d
loc_3F021:
mov rsi, [rbx+20h]
add rsi, r12
mov rcx, [rbx+38h]
mov rdi, r14; this
mov rdx, r15
call __ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm; gguf_writer::write_tensor_data(gguf_tensor_info const&,ulong,ulong)
inc r13
add r12, 158h
cmp r13, [rsp+48h+var_40]
jl short loc_3F021
loc_3F048:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long gguf_write_to_buf(_QWORD *a1, long long a2, char a3)
{
_BYTE *v5; // rax
long long v6; // rdi
_BYTE *v7; // rsi
long long v8; // rdi
_BYTE *v9; // rsi
long long v10; // rdi
_BYTE *v11; // rsi
long long v12; // r15
long long v13; // r12
long long v14; // r15
signed long long i; // r12
long long result; // rax
long long v17; // r12
signed long long j; // r13
long long v19; // [rsp+0h] [rbp-48h] BYREF
signed long long v20; // [rsp+8h] [rbp-40h] BYREF
long long v21[7]; // [rsp+10h] [rbp-38h] BYREF
v19 = a2;
v21[0] = 0x2E8BA2E8BA2E8BA3LL * ((long long)(a1[2] - a1[1]) >> 3);
v20 = 0x82FA0BE82FA0BE83LL * ((long long)(a1[5] - a1[4]) >> 3);
v5 = *(_BYTE **)(a2 + 8);
if ( v5 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, *(_QWORD *)(a2 + 8), "GGUF");
}
else
{
*v5 = 71;
++*(_QWORD *)(a2 + 8);
}
v6 = v19;
v7 = *(_BYTE **)(v19 + 8);
if ( v7 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v7, "GUF");
}
else
{
*v7 = 71;
++*(_QWORD *)(v6 + 8);
}
v8 = v19;
v9 = *(_BYTE **)(v19 + 8);
if ( v9 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v9, "UF");
}
else
{
*v9 = 85;
++*(_QWORD *)(v8 + 8);
}
v10 = v19;
v11 = *(_BYTE **)(v19 + 8);
if ( v11 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v11, "F");
}
else
{
*v11 = 70;
++*(_QWORD *)(v10 + 8);
}
gguf_writer::write<unsigned int>(&v19, a1);
gguf_writer::write<long>(&v19, &v20);
gguf_writer::write<long>(&v19, v21);
if ( v21[0] > 0 )
{
v12 = 0LL;
v13 = 0LL;
do
{
gguf_writer::write((gguf_writer *)&v19, (const gguf_kv *)(v12 + a1[1]));
++v13;
v12 += 88LL;
}
while ( v13 < v21[0] );
}
if ( v20 > 0 )
{
v14 = 0LL;
for ( i = 0LL; i < v20; ++i )
{
gguf_writer::write_tensor_meta(&v19, v14 + a1[4]);
v14 += 344LL;
}
}
result = gguf_writer::pad((gguf_writer *)&v19, a1[7]);
if ( !a3 && v20 > 0 )
{
v17 = 0LL;
for ( j = 0LL; j < v20; ++j )
{
result = gguf_writer::write_tensor_data((gguf_writer *)&v19);
v17 += 344LL;
}
}
return result;
}
|
gguf_write_to_buf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV qword ptr [RSP],RSI
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,qword ptr [RDI + 0x8]
SAR RAX,0x3
MOV RCX,0x2e8ba2e8ba2e8ba3
IMUL RCX,RAX
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RDI + 0x28]
SUB RAX,qword ptr [RDI + 0x20]
MOV EBP,EDX
SAR RAX,0x3
MOV RCX,-0x7d05f417d05f417d
IMUL RCX,RAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RSI + 0x8]
CMP RAX,qword ptr [RSI + 0x10]
JZ 0x0013eef2
MOV byte ptr [RAX],0x47
INC qword ptr [RSI + 0x8]
JMP 0x0013ef04
LAB_0013eef2:
LEA RDX,[0x159ac3]
MOV RDI,RSI
MOV RSI,RAX
CALL 0x00117810
LAB_0013ef04:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013ef1b
MOV byte ptr [RSI],0x47
INC qword ptr [RDI + 0x8]
JMP 0x0013ef27
LAB_0013ef1b:
LEA RDX,[0x159ac4]
CALL 0x00117810
LAB_0013ef27:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013ef3e
MOV byte ptr [RSI],0x55
INC qword ptr [RDI + 0x8]
JMP 0x0013ef4a
LAB_0013ef3e:
LEA RDX,[0x159ac5]
CALL 0x00117810
LAB_0013ef4a:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013ef61
MOV byte ptr [RSI],0x46
INC qword ptr [RDI + 0x8]
JMP 0x0013ef6d
LAB_0013ef61:
LEA RDX,[0x159ac6]
CALL 0x00117810
LAB_0013ef6d:
MOV R14,RSP
MOV RDI,R14
MOV RSI,RBX
CALL 0x00117b30
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00117a20
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00117a20
CMP qword ptr [R15],0x0
JLE 0x0013efc4
XOR R15D,R15D
MOV R14,RSP
XOR R12D,R12D
LAB_0013efa7:
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116070
INC R12
ADD R15,0x58
CMP R12,qword ptr [RSP + 0x10]
JL 0x0013efa7
LAB_0013efc4:
CMP qword ptr [RSP + 0x8],0x0
JLE 0x0013eff5
XOR R15D,R15D
MOV R14,RSP
XOR R12D,R12D
LAB_0013efd5:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116ae0
INC R12
ADD R15,0x158
CMP R12,qword ptr [RSP + 0x8]
JL 0x0013efd5
LAB_0013eff5:
MOV RSI,qword ptr [RBX + 0x38]
MOV RDI,RSP
CALL 0x00117300
TEST BPL,BPL
JNZ 0x0013f048
CMP qword ptr [RSP + 0x8],0x0
JLE 0x0013f048
MOV R14,RSP
MOV RAX,qword ptr [R14]
MOV R15,qword ptr [RAX + 0x8]
SUB R15,qword ptr [RAX]
XOR R12D,R12D
XOR R13D,R13D
LAB_0013f021:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R12
MOV RCX,qword ptr [RBX + 0x38]
MOV RDI,R14
MOV RDX,R15
CALL 0x001161d0
INC R13
ADD R12,0x158
CMP R13,qword ptr [RSP + 0x8]
JL 0x0013f021
LAB_0013f048:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char> >&,
bool) */
void gguf_write_to_buf(gguf_context *param_1,vector *param_2,bool param_3)
{
int1 *puVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
vector *local_48;
long local_40;
long local_38;
local_38 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
local_40 = (*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20) >> 3) * -0x7d05f417d05f417d;
puVar1 = *(int1 **)(param_2 + 8);
local_48 = param_2;
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159ac3);
}
else {
*puVar1 = 0x47;
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159ac4);
}
else {
*puVar1 = 0x47;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159ac5);
}
else {
*puVar1 = 0x55;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159ac6);
}
else {
*puVar1 = 0x46;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
gguf_writer::write<unsigned_int>((gguf_writer *)&local_48,(uint *)param_1);
gguf_writer::write<long>((gguf_writer *)&local_48,&local_40);
gguf_writer::write<long>((gguf_writer *)&local_48,&local_38);
if (0 < local_38) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write((gguf_writer *)&local_48,(gguf_kv *)(*(long *)(param_1 + 8) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x58;
} while (lVar2 < local_38);
}
if (0 < local_40) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write_tensor_meta
((gguf_writer *)&local_48,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x158;
} while (lVar2 < local_40);
}
gguf_writer::pad((gguf_writer *)&local_48,*(ulong *)(param_1 + 0x38));
if ((!param_3) && (0 < local_40)) {
lVar2 = *(long *)(local_48 + 8);
lVar5 = *(long *)local_48;
lVar3 = 0;
lVar4 = 0;
do {
gguf_writer::write_tensor_data
((gguf_writer *)&local_48,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar3),
lVar2 - lVar5,*(ulong *)(param_1 + 0x38));
lVar4 = lVar4 + 1;
lVar3 = lVar3 + 0x158;
} while (lVar4 < local_40);
}
return;
}
|
|
14,027
|
apply_shift
|
eloqsql/strings/ctype-uca.c
|
static my_bool
apply_shift(MY_CHARSET_LOADER *loader,
MY_COLL_RULES *rules, MY_COLL_RULE *r, int level,
uint16 *to, size_t nweights)
{
/* Apply level difference. */
if (nweights)
{
to[nweights - 1]+= r->diff[level];
if (r->before_level == 1) /* Apply "&[before primary]" */
{
if (nweights >= 2)
{
to[nweights - 2]--; /* Reset before */
if (rules->shift_after_method == my_shift_method_expand)
{
/*
Special case. Don't let characters shifted after X
and before next(X) intermix to each other.
For example:
"[shift-after-method expand] &0 < a &[before primary]1 < A".
I.e. we reorder 'a' after '0', and then 'A' before '1'.
'a' must be sorted before 'A'.
Note, there are no real collations in CLDR which shift
after and before two neighbourgh characters. We need this
just in case. Reserving 4096 (0x1000) weights for such
cases is perfectly enough.
*/
to[nweights - 1]+= 0x1000; /* W3-TODO: const may vary on levels 2,3*/
}
}
else
{
my_snprintf(loader->error, sizeof(loader->error),
"Can't reset before "
"a primary ignorable character U+%04lX", r->base[0]);
return TRUE;
}
}
}
else
{
/* Shift to an ignorable character, e.g.: & \u0000 < \u0001 */
DBUG_ASSERT(to[0] == 0);
to[0]= r->diff[level];
}
return FALSE;
}
|
O0
|
c
|
apply_shift:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xaf0ea
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %esi
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl %esi, %edx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
cmpq $0x1, 0x90(%rax)
jne 0xaf0e8
cmpq $0x2, -0x38(%rbp)
jb 0xaf0c2
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x2, %rcx
movw (%rax,%rcx,2), %dx
addw $-0x1, %dx
movw %dx, (%rax,%rcx,2)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0xaf0c0
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl $0x1000, %edx # imm = 0x1000
movw %dx, (%rax,%rcx,2)
jmp 0xaf0e6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl $0x80, %esi
leaq 0x3584f(%rip), %rdx # 0xe4928
movb $0x0, %al
callq 0xd4cd0
movb $0x1, -0x1(%rbp)
jmp 0xaf10b
jmp 0xaf0e8
jmp 0xaf107
jmp 0xaf0ec
jmp 0xaf0ee
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
apply_shift:
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_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
cmp [rbp+var_38], 0
jz loc_AF0EA
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov esi, [rax+rcx*4+80h]
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, esi
mov [rax+rcx*2], dx
mov rax, [rbp+var_20]
cmp qword ptr [rax+90h], 1
jnz short loc_AF0E8
cmp [rbp+var_38], 2
jb short loc_AF0C2
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 2
mov dx, [rax+rcx*2]
add dx, 0FFFFh
mov [rax+rcx*2], dx
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_AF0C0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, 1000h
mov [rax+rcx*2], dx
loc_AF0C0:
jmp short loc_AF0E6
loc_AF0C2:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rcx, [rax]
mov esi, 80h
lea rdx, aCanTResetBefor; "Can't reset before a primary ignorable "...
mov al, 0
call my_snprintf
mov [rbp+var_1], 1
jmp short loc_AF10B
loc_AF0E6:
jmp short $+2
loc_AF0E8:
jmp short loc_AF107
loc_AF0EA:
jmp short $+2
loc_AF0EC:
jmp short $+2
loc_AF0EE:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov eax, [rax+rcx*4+80h]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
loc_AF107:
mov [rbp+var_1], 0
loc_AF10B:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char apply_shift(int a1, long long a2, _QWORD *a3, int a4, _WORD *a5, unsigned long long a6)
{
if ( !a6 )
{
*a5 = *((_DWORD *)a3 + a4 + 32);
return 0;
}
a5[a6 - 1] += *((_DWORD *)a3 + a4 + 32);
if ( a3[18] != 1LL )
return 0;
if ( a6 >= 2 )
{
--a5[a6 - 2];
if ( *(_DWORD *)(a2 + 48) == 1 )
a5[a6 - 1] += 4096;
return 0;
}
my_snprintf(a1, 128, (unsigned int)"Can't reset before a primary ignorable character U+%04lX", *a3, (_DWORD)a5, a6);
return 1;
}
|
apply_shift:
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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001af0ea
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x80]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,ESI
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x001af0e8
CMP qword ptr [RBP + -0x38],0x2
JC 0x001af0c2
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x2
MOV DX,word ptr [RAX + RCX*0x2]
ADD DX,-0x1
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x30],0x1
JNZ 0x001af0c0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,0x1000
MOV word ptr [RAX + RCX*0x2],DX
LAB_001af0c0:
JMP 0x001af0e6
LAB_001af0c2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV ESI,0x80
LEA RDX,[0x1e4928]
MOV AL,0x0
CALL 0x001d4cd0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001af10b
LAB_001af0e6:
JMP 0x001af0e8
LAB_001af0e8:
JMP 0x001af107
LAB_001af0ea:
JMP 0x001af0ec
LAB_001af0ec:
JMP 0x001af0ee
LAB_001af0ee:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0x80]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
LAB_001af107:
MOV byte ptr [RBP + -0x1],0x0
LAB_001af10b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
apply_shift(int8 param_1,long param_2,int8 *param_3,int param_4,int2 *param_5,
ulong param_6)
{
if (param_6 == 0) {
*param_5 = (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
}
else {
param_5[param_6 - 1] =
param_5[param_6 - 1] + (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
if (param_3[0x12] == 1) {
if (param_6 < 2) {
my_snprintf(param_1,0x80,"Can\'t reset before a primary ignorable character U+%04lX",
*param_3);
return 1;
}
param_5[param_6 - 2] = param_5[param_6 - 2] + -1;
if (*(int *)(param_2 + 0x30) == 1) {
param_5[param_6 - 1] = param_5[param_6 - 1] + 0x1000;
}
}
}
return 0;
}
|
|
14,028
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O0
|
c
|
js_global_decodeURI:
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq %r8, 0x70(%rsp)
movl %r9d, 0x6c(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x30030
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0xd67af
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0xd6a61
movq 0x80(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x56930
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0xd69f6
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x62ec0
movl %eax, 0x20(%rsp)
cmpl $0x25, 0x20(%rsp)
jne 0xd69d8
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
callq 0xd71a0
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jge 0xd6834
jmp 0xd6a29
movl 0x24(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x24(%rsp)
cmpl $0x80, 0x20(%rsp)
jge 0xd6876
cmpl $0x0, 0x6c(%rsp)
jne 0xd6871
movl 0x20(%rsp), %edi
callq 0xd7260
cmpl $0x0, %eax
je 0xd6871
movl $0x25, 0x20(%rsp)
movl 0x24(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x24(%rsp)
jmp 0xd69d6
cmpl $0xc0, 0x20(%rsp)
jl 0xd68a7
cmpl $0xdf, 0x20(%rsp)
jg 0xd68a7
movl $0x1, 0x18(%rsp)
movl $0x80, 0x14(%rsp)
movl 0x20(%rsp), %eax
andl $0x1f, %eax
movl %eax, 0x20(%rsp)
jmp 0xd6925
cmpl $0xe0, 0x20(%rsp)
jl 0xd68d8
cmpl $0xef, 0x20(%rsp)
jg 0xd68d8
movl $0x2, 0x18(%rsp)
movl $0x800, 0x14(%rsp) # imm = 0x800
movl 0x20(%rsp), %eax
andl $0xf, %eax
movl %eax, 0x20(%rsp)
jmp 0xd6923
cmpl $0xf0, 0x20(%rsp)
jl 0xd6909
cmpl $0xf7, 0x20(%rsp)
jg 0xd6909
movl $0x3, 0x18(%rsp)
movl $0x10000, 0x14(%rsp) # imm = 0x10000
movl 0x20(%rsp), %eax
andl $0x7, %eax
movl %eax, 0x20(%rsp)
jmp 0xd6921
movl $0x0, 0x18(%rsp)
movl $0x1, 0x14(%rsp)
movl $0x0, 0x20(%rsp)
jmp 0xd6923
jmp 0xd6925
jmp 0xd6927
movl 0x18(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rsp)
cmpl $0x0, %eax
jle 0xd699a
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
callq 0xd71a0
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jge 0xd695f
jmp 0xd6a29
movl 0x24(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x24(%rsp)
movl 0x1c(%rsp), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xd6984
movl $0x0, 0x20(%rsp)
jmp 0xd699a
movl 0x20(%rsp), %eax
shll $0x6, %eax
movl 0x1c(%rsp), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, 0x20(%rsp)
jmp 0xd6927
movl 0x20(%rsp), %eax
cmpl 0x14(%rsp), %eax
jl 0xd69bc
cmpl $0x10ffff, 0x20(%rsp) # imm = 0x10FFFF
jg 0xd69bc
movl 0x20(%rsp), %edi
callq 0x8c3b0
cmpl $0x0, %eax
je 0xd69d4
movq 0x80(%rsp), %rdi
leaq 0x406f9(%rip), %rsi # 0x1170c4
movb $0x0, %al
callq 0xd72a0
jmp 0xd6a29
jmp 0xd69d6
jmp 0xd69e3
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x53d70
jmp 0xd67d5
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
callq 0x53df0
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
jmp 0xd6a61
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
callq 0x587a0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopl (%rax)
|
js_global_decodeURI:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_2C], ecx
mov [rsp+0A8h+var_38], r8
mov [rsp+0A8h+var_3C], r9d
lea rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_78], rax
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToString
mov [rsp+0A8h+var_A8], rax
mov [rsp+0A8h+var_A0], rdx
mov rax, [rsp+0A8h+var_A8]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_48], rax
mov rdi, [rsp+0A8h+var_50]
mov rsi, [rsp+0A8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_D67AF
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_8], rax
jmp loc_D6A61
loc_D67AF:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_78]
xor edx, edx
call string_buffer_init
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_84], 0
loc_D67D5:
mov eax, [rsp+0A8h+var_84]
mov rcx, [rsp+0A8h+var_80]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jge loc_D69F6
mov rdi, [rsp+0A8h+var_80]
mov esi, [rsp+0A8h+var_84]
call string_get
mov [rsp+0A8h+var_88], eax
cmp [rsp+0A8h+var_88], 25h ; '%'
jnz loc_D69D8
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_80]
mov edx, [rsp+0A8h+var_84]
call hex_decode
mov [rsp+0A8h+var_88], eax
cmp [rsp+0A8h+var_88], 0
jge short loc_D6834
jmp loc_D6A29
loc_D6834:
mov eax, [rsp+0A8h+var_84]
add eax, 3
mov [rsp+0A8h+var_84], eax
cmp [rsp+0A8h+var_88], 80h
jge short loc_D6876
cmp [rsp+0A8h+var_3C], 0
jnz short loc_D6871
mov edi, [rsp+0A8h+var_88]
call isURIReserved
cmp eax, 0
jz short loc_D6871
mov [rsp+0A8h+var_88], 25h ; '%'
mov eax, [rsp+0A8h+var_84]
sub eax, 2
mov [rsp+0A8h+var_84], eax
loc_D6871:
jmp loc_D69D6
loc_D6876:
cmp [rsp+0A8h+var_88], 0C0h
jl short loc_D68A7
cmp [rsp+0A8h+var_88], 0DFh
jg short loc_D68A7
mov [rsp+0A8h+var_90], 1
mov [rsp+0A8h+var_94], 80h
mov eax, [rsp+0A8h+var_88]
and eax, 1Fh
mov [rsp+0A8h+var_88], eax
jmp short loc_D6925
loc_D68A7:
cmp [rsp+0A8h+var_88], 0E0h
jl short loc_D68D8
cmp [rsp+0A8h+var_88], 0EFh
jg short loc_D68D8
mov [rsp+0A8h+var_90], 2
mov [rsp+0A8h+var_94], 800h
mov eax, [rsp+0A8h+var_88]
and eax, 0Fh
mov [rsp+0A8h+var_88], eax
jmp short loc_D6923
loc_D68D8:
cmp [rsp+0A8h+var_88], 0F0h
jl short loc_D6909
cmp [rsp+0A8h+var_88], 0F7h
jg short loc_D6909
mov [rsp+0A8h+var_90], 3
mov [rsp+0A8h+var_94], offset loc_10000
mov eax, [rsp+0A8h+var_88]
and eax, 7
mov [rsp+0A8h+var_88], eax
jmp short loc_D6921
loc_D6909:
mov [rsp+0A8h+var_90], 0
mov [rsp+0A8h+var_94], 1
mov [rsp+0A8h+var_88], 0
loc_D6921:
jmp short $+2
loc_D6923:
jmp short $+2
loc_D6925:
jmp short $+2
loc_D6927:
mov eax, [rsp+0A8h+var_90]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+0A8h+var_90], ecx
cmp eax, 0
jle short loc_D699A
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_80]
mov edx, [rsp+0A8h+var_84]
call hex_decode
mov [rsp+0A8h+var_8C], eax
cmp [rsp+0A8h+var_8C], 0
jge short loc_D695F
jmp loc_D6A29
loc_D695F:
mov eax, [rsp+0A8h+var_84]
add eax, 3
mov [rsp+0A8h+var_84], eax
mov eax, [rsp+0A8h+var_8C]
and eax, 0C0h
cmp eax, 80h
jz short loc_D6984
mov [rsp+0A8h+var_88], 0
jmp short loc_D699A
loc_D6984:
mov eax, [rsp+0A8h+var_88]
shl eax, 6
mov ecx, [rsp+0A8h+var_8C]
and ecx, 3Fh
or eax, ecx
mov [rsp+0A8h+var_88], eax
jmp short loc_D6927
loc_D699A:
mov eax, [rsp+0A8h+var_88]
cmp eax, [rsp+0A8h+var_94]
jl short loc_D69BC
cmp [rsp+0A8h+var_88], 10FFFFh
jg short loc_D69BC
mov edi, [rsp+0A8h+var_88]
call is_surrogate
cmp eax, 0
jz short loc_D69D4
loc_D69BC:
mov rdi, [rsp+0A8h+var_28]
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov al, 0
call js_throw_URIError
jmp short loc_D6A29
loc_D69D4:
jmp short $+2
loc_D69D6:
jmp short loc_D69E3
loc_D69D8:
mov eax, [rsp+0A8h+var_84]
add eax, 1
mov [rsp+0A8h+var_84], eax
loc_D69E3:
mov rdi, [rsp+0A8h+var_78]
mov esi, [rsp+0A8h+var_88]
call string_buffer_putc
jmp loc_D67D5
loc_D69F6:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_78]
call string_buffer_end
mov [rsp+0A8h+var_10], rax
mov [rsp+0A8h+var_8], rdx
jmp short loc_D6A61
loc_D6A29:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_78]
call string_buffer_free
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_D6A61:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long js_global_decodeURI(long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6)
{
long long v6; // rdx
int v7; // edx
int v8; // r8d
int v9; // r9d
int v10; // eax
int v11; // ecx
long long v12; // rdx
long long v14; // [rsp+0h] [rbp-A8h]
int v15; // [rsp+14h] [rbp-94h]
int v16; // [rsp+18h] [rbp-90h]
int v17; // [rsp+1Ch] [rbp-8Ch]
signed int v18; // [rsp+20h] [rbp-88h]
unsigned int v19; // [rsp+24h] [rbp-84h]
long long v20; // [rsp+28h] [rbp-80h]
long long v21[4]; // [rsp+38h] [rbp-70h] BYREF
long long v22; // [rsp+58h] [rbp-50h]
long long v23; // [rsp+60h] [rbp-48h]
int v24; // [rsp+6Ch] [rbp-3Ch]
long long *v25; // [rsp+70h] [rbp-38h]
int v26; // [rsp+7Ch] [rbp-2Ch]
long long v27; // [rsp+80h] [rbp-28h]
long long v28; // [rsp+88h] [rbp-20h]
long long v29; // [rsp+90h] [rbp-18h]
long long v30; // [rsp+98h] [rbp-10h]
long long v31; // [rsp+A0h] [rbp-8h]
v28 = a2;
v29 = a3;
v27 = a1;
v26 = a4;
v25 = a5;
v24 = a6;
v14 = JS_ToString(a1, *a5, a5[1], a4, (long long)a5, a6);
v22 = v14;
v23 = v6;
if ( JS_IsException_1(v14, v6) )
{
v30 = v22;
v31 = v23;
return v30;
}
string_buffer_init(v27, (long long)v21, 0);
v20 = v22;
v19 = 0;
while ( 1 )
{
if ( (int)v19 >= (*(_DWORD *)(v20 + 4) & 0x7FFFFFFF) )
{
JS_FreeValue(v27, v22, v23);
v30 = string_buffer_end((long long)v21);
v31 = v12;
return v30;
}
v18 = string_get(v20, v19);
if ( v18 != 37 )
{
++v19;
goto LABEL_33;
}
v18 = hex_decode(v27, v20, v19);
if ( v18 < 0 )
goto LABEL_35;
v19 += 3;
if ( v18 < 128 )
{
if ( !v24 && (unsigned int)isURIReserved((unsigned int)v18) )
{
v18 = 37;
v19 -= 2;
}
goto LABEL_33;
}
if ( v18 < 192 || v18 > 223 )
{
if ( v18 < 224 || v18 > 239 )
{
if ( v18 < 240 || v18 > 247 )
{
v16 = 0;
v15 = 1;
v18 = 0;
}
else
{
v16 = 3;
v15 = (int)&loc_10000;
v18 &= 7u;
}
}
else
{
v16 = 2;
v15 = 2048;
v18 &= 0xFu;
}
}
else
{
v16 = 1;
v15 = 128;
v18 &= 0x1Fu;
}
while ( 1 )
{
v10 = v16;
v11 = --v16;
if ( v10 <= 0 )
break;
v17 = hex_decode(v27, v20, v19);
if ( v17 < 0 )
goto LABEL_35;
v19 += 3;
if ( (v17 & 0xC0) != 0x80 )
{
v18 = 0;
break;
}
v18 = v17 & 0x3F | (v18 << 6);
}
if ( v18 < v15 || v18 > 1114111 || is_surrogate(v18) )
break;
LABEL_33:
string_buffer_putc((long long)v21, v18);
}
js_throw_URIError(v27, (unsigned int)"malformed UTF-8", v7, v11, v8, v9, v14);
LABEL_35:
JS_FreeValue(v27, v22, v23);
string_buffer_free(v21);
LODWORD(v30) = 0;
v31 = 6LL;
return v30;
}
|
js_global_decodeURI:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
MOV dword ptr [RSP + 0x7c],ECX
MOV qword ptr [RSP + 0x70],R8
MOV dword ptr [RSP + 0x6c],R9D
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00130030
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001d67af
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001d6a61
LAB_001d67af:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x30]
XOR EDX,EDX
CALL 0x00156930
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RAX
MOV dword ptr [RSP + 0x24],0x0
LAB_001d67d5:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JGE 0x001d69f6
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x00162ec0
MOV dword ptr [RSP + 0x20],EAX
CMP dword ptr [RSP + 0x20],0x25
JNZ 0x001d69d8
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x24]
CALL 0x001d71a0
MOV dword ptr [RSP + 0x20],EAX
CMP dword ptr [RSP + 0x20],0x0
JGE 0x001d6834
JMP 0x001d6a29
LAB_001d6834:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x3
MOV dword ptr [RSP + 0x24],EAX
CMP dword ptr [RSP + 0x20],0x80
JGE 0x001d6876
CMP dword ptr [RSP + 0x6c],0x0
JNZ 0x001d6871
MOV EDI,dword ptr [RSP + 0x20]
CALL 0x001d7260
CMP EAX,0x0
JZ 0x001d6871
MOV dword ptr [RSP + 0x20],0x25
MOV EAX,dword ptr [RSP + 0x24]
SUB EAX,0x2
MOV dword ptr [RSP + 0x24],EAX
LAB_001d6871:
JMP 0x001d69d6
LAB_001d6876:
CMP dword ptr [RSP + 0x20],0xc0
JL 0x001d68a7
CMP dword ptr [RSP + 0x20],0xdf
JG 0x001d68a7
MOV dword ptr [RSP + 0x18],0x1
MOV dword ptr [RSP + 0x14],0x80
MOV EAX,dword ptr [RSP + 0x20]
AND EAX,0x1f
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001d6925
LAB_001d68a7:
CMP dword ptr [RSP + 0x20],0xe0
JL 0x001d68d8
CMP dword ptr [RSP + 0x20],0xef
JG 0x001d68d8
MOV dword ptr [RSP + 0x18],0x2
MOV dword ptr [RSP + 0x14],0x800
MOV EAX,dword ptr [RSP + 0x20]
AND EAX,0xf
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001d6923
LAB_001d68d8:
CMP dword ptr [RSP + 0x20],0xf0
JL 0x001d6909
CMP dword ptr [RSP + 0x20],0xf7
JG 0x001d6909
MOV dword ptr [RSP + 0x18],0x3
MOV dword ptr [RSP + 0x14],0x10000
MOV EAX,dword ptr [RSP + 0x20]
AND EAX,0x7
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001d6921
LAB_001d6909:
MOV dword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x14],0x1
MOV dword ptr [RSP + 0x20],0x0
LAB_001d6921:
JMP 0x001d6923
LAB_001d6923:
JMP 0x001d6925
LAB_001d6925:
JMP 0x001d6927
LAB_001d6927:
MOV EAX,dword ptr [RSP + 0x18]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RSP + 0x18],ECX
CMP EAX,0x0
JLE 0x001d699a
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x24]
CALL 0x001d71a0
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x0
JGE 0x001d695f
JMP 0x001d6a29
LAB_001d695f:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x3
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x1c]
AND EAX,0xc0
CMP EAX,0x80
JZ 0x001d6984
MOV dword ptr [RSP + 0x20],0x0
JMP 0x001d699a
LAB_001d6984:
MOV EAX,dword ptr [RSP + 0x20]
SHL EAX,0x6
MOV ECX,dword ptr [RSP + 0x1c]
AND ECX,0x3f
OR EAX,ECX
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001d6927
LAB_001d699a:
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,dword ptr [RSP + 0x14]
JL 0x001d69bc
CMP dword ptr [RSP + 0x20],0x10ffff
JG 0x001d69bc
MOV EDI,dword ptr [RSP + 0x20]
CALL 0x0018c3b0
CMP EAX,0x0
JZ 0x001d69d4
LAB_001d69bc:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[0x2170c4]
MOV AL,0x0
CALL 0x001d72a0
JMP 0x001d6a29
LAB_001d69d4:
JMP 0x001d69d6
LAB_001d69d6:
JMP 0x001d69e3
LAB_001d69d8:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
LAB_001d69e3:
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RSP + 0x20]
CALL 0x00153d70
JMP 0x001d67d5
LAB_001d69f6:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00153df0
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
JMP 0x001d6a61
LAB_001d6a29:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001587a0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_001d6a61:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_global_decodeURI(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5,int param_6)
{
int8 uVar1;
int iVar2;
int iVar3;
uint uVar4;
int1 auVar5 [16];
int local_94;
int local_90;
uint local_88;
int local_84;
int1 local_70 [32];
int1 local_50 [16];
int local_3c;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_50 = JS_ToString(param_1,*param_5,param_5[1]);
iVar2 = JS_IsException(local_50._0_8_,local_50._8_8_);
if (iVar2 == 0) {
string_buffer_init(local_28,local_70,0);
uVar1 = local_50._0_8_;
local_84 = 0;
while( true ) {
if ((int)((uint)*(int8 *)(uVar1 + 4) & 0x7fffffff) <= local_84) break;
local_88 = string_get(uVar1,local_84);
if (local_88 == 0x25) {
local_88 = hex_decode(local_28,uVar1,local_84);
if (-1 < (int)local_88) {
iVar2 = local_84 + 3;
if ((int)local_88 < 0x80) {
if (local_3c == 0) {
iVar3 = isURIReserved(local_88);
if (iVar3 != 0) {
local_88 = 0x25;
iVar2 = local_84 + 1;
}
}
goto LAB_001d69e3;
}
local_84 = iVar2;
if (((int)local_88 < 0xc0) || (0xdf < (int)local_88)) {
if (((int)local_88 < 0xe0) || (0xef < (int)local_88)) {
if (((int)local_88 < 0xf0) || (0xf7 < (int)local_88)) {
local_90 = 0;
local_94 = 1;
local_88 = 0;
}
else {
local_90 = 3;
local_94 = 0x10000;
local_88 = local_88 & 7;
}
}
else {
local_90 = 2;
local_94 = 0x800;
local_88 = local_88 & 0xf;
}
}
else {
local_90 = 1;
local_94 = 0x80;
local_88 = local_88 & 0x1f;
}
while (0 < local_90) {
uVar4 = hex_decode(local_28,uVar1,local_84);
if ((int)uVar4 < 0) goto LAB_001d6a29;
local_84 = local_84 + 3;
if ((uVar4 & 0xc0) != 0x80) {
local_88 = 0;
break;
}
local_88 = local_88 << 6 | uVar4 & 0x3f;
local_90 = local_90 + -1;
}
if ((local_94 <= (int)local_88) && ((int)local_88 < 0x110000)) {
iVar3 = is_surrogate(local_88);
iVar2 = local_84;
if (iVar3 == 0) goto LAB_001d69e3;
}
js_throw_URIError(local_28,"malformed UTF-8");
}
LAB_001d6a29:
JS_FreeValue(local_28,local_50._0_8_,local_50._8_8_);
string_buffer_free(local_70);
local_10 = 0;
local_8 = 6;
goto LAB_001d6a61;
}
iVar2 = local_84 + 1;
LAB_001d69e3:
local_84 = iVar2;
string_buffer_putc(local_70,local_88);
}
JS_FreeValue(local_28,local_50._0_8_,local_50._8_8_);
auVar5 = string_buffer_end(local_70);
local_8 = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
}
else {
local_10 = local_50._0_4_;
uStack_c = local_50._4_4_;
local_8 = local_50._8_8_;
}
LAB_001d6a61:
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
|
|
14,029
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_global_decodeURI:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x1c(%rsp)
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x2bb39
movq %rax, 0x10(%rsp)
cmpl $0x6, %edx
je 0x7d781
movq %rdx, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x24bcf
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x7d790
movq 0x10(%rsp), %r15
movq 0x4(%r15), %rax
testl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x7d713
xorl %ebp, %ebp
leaq 0x28(%rsp), %r14
movslq %ebp, %rcx
testl %eax, %eax
js 0x7d59d
movzbl 0x18(%r15,%rcx), %r12d
jmp 0x7d5a3
movzwl 0x18(%r15,%rcx,2), %r12d
cmpl $0x25, %r12d
jne 0x7d5ff
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x7dd69
testl %eax, %eax
js 0x7d74a
movl %eax, %r12d
leal 0x3(%rbp), %r13d
cmpl $0x7f, %eax
jg 0x7d609
cmpl $0x0, 0x1c(%rsp)
jne 0x7d6da
movl $0xb, %edx
leaq 0x28b0f(%rip), %rdi # 0xa60f2
movl %r12d, %esi
callq 0xe490
incl %ebp
testq %rax, %rax
movl $0x25, %eax
cmovnel %eax, %r12d
cmovel %r13d, %ebp
jmp 0x7d601
incl %ebp
movl %ebp, %r13d
jmp 0x7d6da
movl %r12d, %eax
andl $0x7fffffe0, %eax # imm = 0x7FFFFFE0
cmpl $0xc0, %eax
jne 0x7d625
andl $0x1f, %r12d
movl $0x80, %ecx
xorl %ebx, %ebx
jmp 0x7d665
movl %r12d, %eax
andl $0x7ffffff0, %eax # imm = 0x7FFFFFF0
cmpl $0xe0, %eax
jne 0x7d644
andl $0xf, %r12d
movl $0x800, %ecx # imm = 0x800
movl $0x1, %ebx
jmp 0x7d665
movl %r12d, %eax
andl $0x7ffffff8, %eax # imm = 0x7FFFFFF8
cmpl $0xf0, %eax
jne 0x7d6ff
andl $0x7, %r12d
movl $0x10000, %ecx # imm = 0x10000
movl $0x2, %ebx
movb $0x1, %al
testb %al, %al
je 0x7d6bd
movl %ecx, 0x18(%rsp)
incl %ebx
movl %r13d, %ebp
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x7dd69
testl %eax, %eax
js 0x7d74a
movl %eax, %ecx
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x7d6b0
shll $0x6, %r12d
andl $0x3f, %eax
orl %eax, %r12d
leal 0x3(%rbp), %r13d
decl %ebx
jg 0x7d671
jmp 0x7d6b3
xorl %r12d, %r12d
addl $0x3, %ebp
movl %ebp, %r13d
movl 0x18(%rsp), %ecx
cmpl %ecx, %r12d
jl 0x7d737
cmpl $0x10ffff, %r12d # imm = 0x10FFFF
jg 0x7d737
movl %r12d, %eax
andl $0xfffff800, %eax # imm = 0xFFFFF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x7d737
movq %r14, %rdi
movl %r12d, %esi
callq 0x3744c
movq 0x4(%r15), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %r13d, %ebp
cmpl %ecx, %r13d
jl 0x7d58e
jmp 0x7d713
movl $0x1, %ecx
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
xorl %r12d, %r12d
xorl %eax, %eax
jmp 0x7d667
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rdx
callq 0x21922
leaq 0x28(%rsp), %rdi
callq 0x374a0
jmp 0x7d781
leaq 0x28983(%rip), %rsi # 0xa60c1
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x7dddb
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rdx
callq 0x21922
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x20bf5
movq $0x0, 0x30(%rsp)
movl $0x6, %edx
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x3c(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x7d573
|
js_global_decodeURI:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_5C], r9d
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+78h+var_68], rax
cmp edx, 6
jz loc_7D781
mov [rsp+78h+var_58], rdx
mov [rsp+78h+var_50], rbx
xorps xmm0, xmm0
movups [rsp+78h+var_40], xmm0
mov [rsp+78h+var_70], rbx
mov rdi, rbx
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_48], rax
test rax, rax
jz loc_7D790
loc_7D573:
mov r15, [rsp+78h+var_68]
mov rax, [r15+4]
test eax, 7FFFFFFFh
jz loc_7D713
xor ebp, ebp
lea r14, [rsp+78h+var_50]
loc_7D58E:
movsxd rcx, ebp
test eax, eax
js short loc_7D59D
movzx r12d, byte ptr [r15+rcx+18h]
jmp short loc_7D5A3
loc_7D59D:
movzx r12d, word ptr [r15+rcx*2+18h]
loc_7D5A3:
cmp r12d, 25h ; '%'
jnz short loc_7D5FF
mov rdi, [rsp+78h+var_70]
mov rsi, r15
mov edx, ebp
call hex_decode
test eax, eax
js loc_7D74A
mov r12d, eax
lea r13d, [rbp+3]
cmp eax, 7Fh
jg short loc_7D609
cmp [rsp+78h+var_5C], 0
jnz loc_7D6DA
mov edx, 0Bh
lea rdi, asc_A60F2; ";/?:@&=+$,#"
mov esi, r12d
call _memchr
inc ebp
test rax, rax
mov eax, 25h ; '%'
cmovnz r12d, eax
cmovz ebp, r13d
jmp short loc_7D601
loc_7D5FF:
inc ebp
loc_7D601:
mov r13d, ebp
jmp loc_7D6DA
loc_7D609:
mov eax, r12d
and eax, 7FFFFFE0h
cmp eax, 0C0h
jnz short loc_7D625
and r12d, 1Fh
mov ecx, 80h
xor ebx, ebx
jmp short loc_7D665
loc_7D625:
mov eax, r12d
and eax, 7FFFFFF0h
cmp eax, 0E0h
jnz short loc_7D644
and r12d, 0Fh
mov ecx, 800h
mov ebx, 1
jmp short loc_7D665
loc_7D644:
mov eax, r12d
and eax, 7FFFFFF8h
cmp eax, 0F0h
jnz loc_7D6FF
and r12d, 7
mov ecx, 10000h
mov ebx, 2
loc_7D665:
mov al, 1
loc_7D667:
test al, al
jz short loc_7D6BD
mov [rsp+78h+var_60], ecx
inc ebx
loc_7D671:
mov ebp, r13d
mov rdi, [rsp+78h+var_70]
mov rsi, r15
mov edx, r13d
call hex_decode
test eax, eax
js loc_7D74A
mov ecx, eax
and ecx, 0C0h
cmp ecx, 80h
jnz short loc_7D6B0
shl r12d, 6
and eax, 3Fh
or r12d, eax
lea r13d, [rbp+3]
dec ebx
jg short loc_7D671
jmp short loc_7D6B3
loc_7D6B0:
xor r12d, r12d
loc_7D6B3:
add ebp, 3
mov r13d, ebp
mov ecx, [rsp+78h+var_60]
loc_7D6BD:
cmp r12d, ecx
jl short loc_7D737
cmp r12d, 10FFFFh
jg short loc_7D737
mov eax, r12d
and eax, 0FFFFF800h
cmp eax, 0D800h
jz short loc_7D737
loc_7D6DA:
mov rdi, r14
mov esi, r12d
call string_buffer_putc
mov rax, [r15+4]
mov ecx, eax
and ecx, 7FFFFFFFh
mov ebp, r13d
cmp r13d, ecx
jl loc_7D58E
jmp short loc_7D713
loc_7D6FF:
mov ecx, 1
mov ebx, 0FFFFFFFFh
xor r12d, r12d
xor eax, eax
jmp loc_7D667
loc_7D713:
mov rsi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_70]
mov rdi, [rax+18h]
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
lea rdi, [rsp+78h+var_50]
call string_buffer_end
jmp short loc_7D781
loc_7D737:
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov rdi, [rsp+78h+var_70]
xor eax, eax
call js_throw_URIError
loc_7D74A:
mov rsi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_70]
mov rdi, [rax+18h]
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call js_free
mov [rsp+78h+var_48], 0
mov edx, 6
xor eax, eax
loc_7D781:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7D790:
mov dword ptr [rsp+78h+var_40+4], 0
mov dword ptr [rsp+78h+var_40+0Ch], 0FFFFFFFFh
jmp loc_7D573
|
_DWORD * js_global_decodeURI(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
_DWORD *result; // rax
long long v15; // rdx
long long v16; // rax
int v17; // ebp
signed int v18; // r12d
int v19; // eax
int v20; // edx
int v21; // r8d
int v22; // r9d
int v23; // r13d
int v24; // ebp
long long v25; // rcx
int v26; // ebx
char v27; // al
int v28; // ebx
int v29; // ebp
int v30; // eax
_DWORD *v32; // [rsp+10h] [rbp-68h]
int v33; // [rsp+18h] [rbp-60h]
int v34; // [rsp+1Ch] [rbp-5Ch]
long long v35; // [rsp+20h] [rbp-58h]
long long v36; // [rsp+28h] [rbp-50h] BYREF
long long v37; // [rsp+30h] [rbp-48h]
__int128 v38; // [rsp+38h] [rbp-40h]
v34 = a14;
result = (_DWORD *)JS_ToStringInternal(a1, *a13, a13[1], 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v32 = result;
if ( (_DWORD)v15 == 6 )
return result;
v35 = v15;
v36 = a1;
v38 = 0LL;
v37 = js_alloc_string(a1, 0LL, 0);
if ( !v37 )
{
DWORD1(v38) = 0;
HIDWORD(v38) = -1;
}
v16 = *(_QWORD *)(v32 + 1);
if ( (v16 & 0x7FFFFFFF) == 0 )
{
LABEL_39:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v32, v35);
return string_buffer_end((long long)&v36);
}
v17 = 0;
while ( 1 )
{
if ( (int)v16 < 0 )
v18 = *((unsigned __int16 *)v32 + v17 + 12);
else
v18 = *((unsigned __int8 *)v32 + v17 + 24);
if ( v18 != 37 )
{
v24 = v17 + 1;
LABEL_17:
v23 = v24;
goto LABEL_36;
}
v19 = hex_decode(a1, v32, (unsigned int)v17, v17);
if ( v19 < 0 )
goto LABEL_41;
v18 = v19;
v23 = v17 + 3;
if ( v19 > 127 )
break;
if ( !v34 )
{
v24 = v17 + 1;
if ( memchr(";/?:@&=+$,#", (unsigned int)v19, 11LL) )
v18 = 37;
else
v24 = v23;
goto LABEL_17;
}
LABEL_36:
string_buffer_putc((long long)&v36, v18);
v16 = *(_QWORD *)(v32 + 1);
v17 = v23;
if ( v23 >= (v32[1] & 0x7FFFFFFF) )
goto LABEL_39;
}
if ( (v19 & 0x7FFFFFE0) == 0xC0 )
{
v18 = v19 & 0x1F;
v25 = 128LL;
v26 = 0;
LABEL_24:
v27 = 1;
goto LABEL_25;
}
if ( (v19 & 0x7FFFFFF0) == 0xE0 )
{
v18 = v19 & 0xF;
v25 = 2048LL;
v26 = 1;
goto LABEL_24;
}
if ( (v19 & 0x7FFFFFF8) == 0xF0 )
{
v18 = v19 & 7;
v25 = 0x10000LL;
v26 = 2;
goto LABEL_24;
}
v25 = 1LL;
v26 = -1;
v18 = 0;
v27 = 0;
LABEL_25:
if ( !v27 )
{
LABEL_33:
if ( v18 < (int)v25 || v18 > 1114111 || (v18 & 0xFFFFF800) == 0xD800 )
{
js_throw_URIError(a1, (unsigned int)"malformed UTF-8", v20, v25, v21, v22);
goto LABEL_41;
}
goto LABEL_36;
}
v33 = v25;
v28 = v26 + 1;
while ( 1 )
{
v29 = v23;
v30 = hex_decode(a1, v32, (unsigned int)v23, v25);
if ( v30 < 0 )
break;
v25 = (unsigned __int8)v30 & 0xC0;
if ( (_DWORD)v25 != 128 )
{
v18 = 0;
LABEL_32:
v23 = v29 + 3;
LODWORD(v25) = v33;
goto LABEL_33;
}
v18 = v30 & 0x3F | (v18 << 6);
v23 += 3;
if ( v28-- <= 1 )
goto LABEL_32;
}
LABEL_41:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v32, v35);
js_free(v36, v37);
return 0LL;
}
|
js_global_decodeURI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x1c],R9D
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x0012bb39
MOV qword ptr [RSP + 0x10],RAX
CMP EDX,0x6
JZ 0x0017d781
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x28],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x38],XMM0
MOV qword ptr [RSP + 0x8],RBX
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00124bcf
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x0017d790
LAB_0017d573:
MOV R15,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [R15 + 0x4]
TEST EAX,0x7fffffff
JZ 0x0017d713
XOR EBP,EBP
LEA R14,[RSP + 0x28]
LAB_0017d58e:
MOVSXD RCX,EBP
TEST EAX,EAX
JS 0x0017d59d
MOVZX R12D,byte ptr [R15 + RCX*0x1 + 0x18]
JMP 0x0017d5a3
LAB_0017d59d:
MOVZX R12D,word ptr [R15 + RCX*0x2 + 0x18]
LAB_0017d5a3:
CMP R12D,0x25
JNZ 0x0017d5ff
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
MOV EDX,EBP
CALL 0x0017dd69
TEST EAX,EAX
JS 0x0017d74a
MOV R12D,EAX
LEA R13D,[RBP + 0x3]
CMP EAX,0x7f
JG 0x0017d609
CMP dword ptr [RSP + 0x1c],0x0
JNZ 0x0017d6da
MOV EDX,0xb
LEA RDI,[0x1a60f2]
MOV ESI,R12D
CALL 0x0010e490
INC EBP
TEST RAX,RAX
MOV EAX,0x25
CMOVNZ R12D,EAX
CMOVZ EBP,R13D
JMP 0x0017d601
LAB_0017d5ff:
INC EBP
LAB_0017d601:
MOV R13D,EBP
JMP 0x0017d6da
LAB_0017d609:
MOV EAX,R12D
AND EAX,0x7fffffe0
CMP EAX,0xc0
JNZ 0x0017d625
AND R12D,0x1f
MOV ECX,0x80
XOR EBX,EBX
JMP 0x0017d665
LAB_0017d625:
MOV EAX,R12D
AND EAX,0x7ffffff0
CMP EAX,0xe0
JNZ 0x0017d644
AND R12D,0xf
MOV ECX,0x800
MOV EBX,0x1
JMP 0x0017d665
LAB_0017d644:
MOV EAX,R12D
AND EAX,0x7ffffff8
CMP EAX,0xf0
JNZ 0x0017d6ff
AND R12D,0x7
MOV ECX,0x10000
MOV EBX,0x2
LAB_0017d665:
MOV AL,0x1
LAB_0017d667:
TEST AL,AL
JZ 0x0017d6bd
MOV dword ptr [RSP + 0x18],ECX
INC EBX
LAB_0017d671:
MOV EBP,R13D
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
MOV EDX,R13D
CALL 0x0017dd69
TEST EAX,EAX
JS 0x0017d74a
MOV ECX,EAX
AND ECX,0xc0
CMP ECX,0x80
JNZ 0x0017d6b0
SHL R12D,0x6
AND EAX,0x3f
OR R12D,EAX
LEA R13D,[RBP + 0x3]
DEC EBX
JG 0x0017d671
JMP 0x0017d6b3
LAB_0017d6b0:
XOR R12D,R12D
LAB_0017d6b3:
ADD EBP,0x3
MOV R13D,EBP
MOV ECX,dword ptr [RSP + 0x18]
LAB_0017d6bd:
CMP R12D,ECX
JL 0x0017d737
CMP R12D,0x10ffff
JG 0x0017d737
MOV EAX,R12D
AND EAX,0xfffff800
CMP EAX,0xd800
JZ 0x0017d737
LAB_0017d6da:
MOV RDI,R14
MOV ESI,R12D
CALL 0x0013744c
MOV RAX,qword ptr [R15 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
MOV EBP,R13D
CMP R13D,ECX
JL 0x0017d58e
JMP 0x0017d713
LAB_0017d6ff:
MOV ECX,0x1
MOV EBX,0xffffffff
XOR R12D,R12D
XOR EAX,EAX
JMP 0x0017d667
LAB_0017d713:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00121922
LEA RDI,[RSP + 0x28]
CALL 0x001374a0
JMP 0x0017d781
LAB_0017d737:
LEA RSI,[0x1a60c1]
MOV RDI,qword ptr [RSP + 0x8]
XOR EAX,EAX
CALL 0x0017dddb
LAB_0017d74a:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00121922
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00120bf5
MOV qword ptr [RSP + 0x30],0x0
MOV EDX,0x6
XOR EAX,EAX
LAB_0017d781:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017d790:
MOV dword ptr [RSP + 0x3c],0x0
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0017d573
|
long js_global_decodeURI(long param_1)
{
bool bVar1;
int iVar2;
uint __c;
uint uVar3;
ulong uVar4;
void *pvVar5;
long lVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int8 *in_R8;
int in_R9D;
int1 auVar11 [16];
long local_50;
long local_48;
ulong local_40;
int8 uStack_38;
auVar11 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
lVar6 = auVar11._0_8_;
if (auVar11._8_4_ != 6) {
local_40 = 0;
uStack_38 = 0;
local_50 = param_1;
local_48 = js_alloc_string(param_1,0,0);
if (local_48 == 0) {
local_40 = local_40 & 0xffffffff;
uStack_38 = CONCAT44(0xffffffff,(int4)uStack_38);
}
uVar4 = *(ulong *)(lVar6 + 4);
if ((uVar4 & 0x7fffffff) != 0) {
iVar9 = 0;
do {
if ((int)uVar4 < 0) {
__c = (uint)*(ushort *)(lVar6 + 0x18 + (long)iVar9 * 2);
}
else {
__c = (uint)*(byte *)(lVar6 + 0x18 + (long)iVar9);
}
if (__c == 0x25) {
__c = hex_decode(param_1,lVar6,iVar9);
if ((int)__c < 0) goto LAB_0017d74a;
iVar10 = iVar9 + 3;
if ((int)__c < 0x80) {
if (in_R9D == 0) {
pvVar5 = memchr(";/?:@&=+$,#",__c,0xb);
if (pvVar5 != (void *)0x0) {
__c = 0x25;
iVar10 = iVar9 + 1;
}
}
goto LAB_0017d6da;
}
if ((__c & 0x7fffffe0) == 0xc0) {
__c = __c & 0x1f;
iVar9 = 0x80;
iVar8 = 0;
LAB_0017d665:
bVar1 = true;
}
else {
if ((__c & 0x7ffffff0) == 0xe0) {
__c = __c & 0xf;
iVar9 = 0x800;
iVar8 = 1;
goto LAB_0017d665;
}
if ((__c & 0x7ffffff8) == 0xf0) {
__c = __c & 7;
iVar9 = 0x10000;
iVar8 = 2;
goto LAB_0017d665;
}
iVar9 = 1;
iVar8 = -1;
__c = 0;
bVar1 = false;
}
if (bVar1) {
iVar8 = iVar8 + 1;
do {
iVar2 = iVar10;
uVar3 = hex_decode(param_1,lVar6,iVar2);
if ((int)uVar3 < 0) goto LAB_0017d74a;
if ((uVar3 & 0xc0) != 0x80) {
__c = 0;
break;
}
__c = __c << 6 | uVar3 & 0x3f;
iVar7 = iVar8 + -1;
bVar1 = 0 < iVar8;
iVar10 = iVar2 + 3;
iVar8 = iVar7;
} while (iVar7 != 0 && bVar1);
iVar10 = iVar2 + 3;
}
if ((((int)__c < iVar9) || (0x10ffff < (int)__c)) || ((__c & 0xfffff800) == 0xd800)) {
js_throw_URIError(param_1,"malformed UTF-8");
LAB_0017d74a:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar6,auVar11._8_8_);
js_free(local_50,local_48);
return 0;
}
}
else {
iVar10 = iVar9 + 1;
}
LAB_0017d6da:
iVar9 = iVar10;
string_buffer_putc(&local_50,__c);
uVar4 = *(ulong *)(lVar6 + 4);
} while (iVar9 < (int)((uint)uVar4 & 0x7fffffff));
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar6,auVar11._8_8_);
lVar6 = string_buffer_end(&local_50);
}
return lVar6;
}
|
|
14,030
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_global_decodeURI:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x4(%rsp)
movq %rdi, %r15
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x1ebec
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x69c89
leaq 0x8(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %edx, %edx
callq 0x31bf2
movq 0x4(%r14), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpl %ecx, %r12d
jge 0x69c9e
movslq %r12d, %rcx
testl %eax, %eax
js 0x69b1f
movzbl 0x18(%r14,%rcx), %r13d
jmp 0x69b25
movzwl 0x18(%r14,%rcx,2), %r13d
cmpl $0x25, %r13d
jne 0x69b6f
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x6a158
testl %eax, %eax
js 0x69c6b
movl %eax, %r13d
leal 0x3(%r12), %ebp
cmpl $0x7f, %eax
ja 0x69b8a
cmpl $0x0, 0x4(%rsp)
jne 0x69b75
movl %r13d, %edi
callq 0x6a1c8
incl %r12d
testl %eax, %eax
pushq $0x25
popq %rax
cmovnel %eax, %r13d
cmovel %ebp, %r12d
jmp 0x69b72
incl %r12d
movl %r12d, %ebp
leaq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0x30632
movl %ebp, %r12d
jmp 0x69afb
movl %r13d, %eax
andl $0x7fffffe0, %eax # imm = 0x7FFFFFE0
cmpl $0xc0, %eax
jne 0x69bab
andl $0x1f, %r13d
movl $0x80, (%rsp)
movl %r13d, %eax
pushq $0x1
jmp 0x69bfb
movl %r13d, %eax
andl $0x7ffffff0, %eax # imm = 0x7FFFFFF0
cmpl $0xe0, %eax
jne 0x69bcc
andl $0xf, %r13d
movl $0x800, (%rsp) # imm = 0x800
movl %r13d, %eax
pushq $0x2
jmp 0x69bfb
movl %r13d, %ecx
andl $0x7ffffff8, %ecx # imm = 0x7FFFFFF8
xorl %eax, %eax
movl $0x0, %r12d
pushq $0x1
popq %rdx
movl %edx, (%rsp)
cmpl $0xf0, %ecx
jne 0x69bfd
andl $0x7, %r13d
movl $0x10000, (%rsp) # imm = 0x10000
movl %r13d, %eax
pushq $0x3
popq %r12
movl %eax, %r13d
testl %r12d, %r12d
jle 0x69c38
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x6a158
testl %eax, %eax
js 0x69c6b
movl %eax, %ecx
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x69c5a
addl $0x3, %ebp
shll $0x6, %r13d
andl $0x3f, %eax
orl %eax, %r13d
decl %r12d
jmp 0x69c00
cmpl (%rsp), %r13d
jl 0x69c5a
cmpl $0x10ffff, %r13d # imm = 0x10FFFF
jg 0x69c5a
movl %r13d, %eax
andl $0xfffff800, %eax # imm = 0xFFFFF800
cmpl $0xd800, %eax # imm = 0xD800
jne 0x69b75
leaq 0x2239a(%rip), %rsi # 0x8bffb
movq %r15, %rdi
xorl %eax, %eax
callq 0x6a1e6
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bbce
leaq 0x8(%rsp), %rdi
callq 0x32ab1
pushq $0x6
popq %rbx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bbce
leaq 0x8(%rsp), %rdi
callq 0x30684
movq %rax, %r14
movq %rdx, %rbx
jmp 0x69c89
|
js_global_decodeURI:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_54], r9d
mov r15, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToString
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz loc_69C89
lea rsi, [rsp+58h+var_50]
xor r12d, r12d
mov rdi, r15
xor edx, edx
call string_buffer_init
loc_69AFB:
mov rax, [r14+4]
mov ecx, eax
and ecx, 7FFFFFFFh
cmp r12d, ecx
jge loc_69C9E
movsxd rcx, r12d
test eax, eax
js short loc_69B1F
movzx r13d, byte ptr [r14+rcx+18h]
jmp short loc_69B25
loc_69B1F:
movzx r13d, word ptr [r14+rcx*2+18h]
loc_69B25:
cmp r13d, 25h ; '%'
jnz short loc_69B6F
mov rdi, r15
mov rsi, r14
mov edx, r12d
call hex_decode
test eax, eax
js loc_69C6B
mov r13d, eax
lea ebp, [r12+3]
cmp eax, 7Fh
ja short loc_69B8A
cmp [rsp+58h+var_54], 0
jnz short loc_69B75
mov edi, r13d
call isURIReserved
inc r12d
test eax, eax
push 25h ; '%'
pop rax
cmovnz r13d, eax
cmovz r12d, ebp
jmp short loc_69B72
loc_69B6F:
inc r12d
loc_69B72:
mov ebp, r12d
loc_69B75:
lea rdi, [rsp+58h+var_50]
mov esi, r13d
call string_buffer_putc
mov r12d, ebp
jmp loc_69AFB
loc_69B8A:
mov eax, r13d
and eax, 7FFFFFE0h
cmp eax, 0C0h
jnz short loc_69BAB
and r13d, 1Fh
mov [rsp+58h+var_58], 80h
mov eax, r13d
push 1
jmp short loc_69BFB
loc_69BAB:
mov eax, r13d
and eax, 7FFFFFF0h
cmp eax, 0E0h
jnz short loc_69BCC
and r13d, 0Fh
mov [rsp+58h+var_58], 800h
mov eax, r13d
push 2
jmp short loc_69BFB
loc_69BCC:
mov ecx, r13d
and ecx, 7FFFFFF8h
xor eax, eax
mov r12d, 0
push 1
pop rdx
mov [rsp+58h+var_58], edx
cmp ecx, 0F0h
jnz short loc_69BFD
and r13d, 7
mov [rsp+58h+var_58], 10000h
mov eax, r13d
push 3
loc_69BFB:
pop r12
loc_69BFD:
mov r13d, eax
loc_69C00:
test r12d, r12d
jle short loc_69C38
mov rdi, r15
mov rsi, r14
mov edx, ebp
call hex_decode
test eax, eax
js short loc_69C6B
mov ecx, eax
and ecx, 0C0h
cmp ecx, 80h
jnz short loc_69C5A
add ebp, 3
shl r13d, 6
and eax, 3Fh
or r13d, eax
dec r12d
jmp short loc_69C00
loc_69C38:
cmp r13d, [rsp+58h+var_58]
jl short loc_69C5A
cmp r13d, 10FFFFh
jg short loc_69C5A
mov eax, r13d
and eax, 0FFFFF800h
cmp eax, 0D800h
jnz loc_69B75
loc_69C5A:
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov rdi, r15
xor eax, eax
call js_throw_URIError
loc_69C6B:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
lea rdi, [rsp+58h+var_50]
call string_buffer_free
push 6
pop rbx
xor r14d, r14d
loc_69C89:
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_69C9E:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
lea rdi, [rsp+58h+var_50]
call string_buffer_end
mov r14, rax
mov rbx, rdx
jmp short loc_69C89
|
long long js_global_decodeURI(long long a1, long long a2, long long a3, long long a4, long long *a5, int a6)
{
long long v6; // r14
long long v7; // rdx
long long v8; // rbx
int v9; // r12d
signed int v10; // r13d
int v11; // eax
int v12; // edx
long long v13; // rcx
int v14; // r8d
int v15; // r9d
unsigned int v16; // ebp
int v17; // r12d
int v18; // eax
int v19; // r12d
int v20; // eax
int v22; // [rsp-8h] [rbp-60h]
int v23; // [rsp+0h] [rbp-58h]
long long v25[10]; // [rsp+8h] [rbp-50h] BYREF
v6 = JS_ToString(a1, *a5, a5[1]);
v8 = v7;
if ( (_DWORD)v7 != 6 )
{
v9 = 0;
string_buffer_init(a1, (long long)v25, 0);
while ( 1 )
{
if ( v9 >= (*(_DWORD *)(v6 + 4) & 0x7FFFFFFF) )
{
JS_FreeValue(a1, v6, v8);
return string_buffer_end(v25);
}
if ( (int)*(_QWORD *)(v6 + 4) < 0 )
v10 = *(unsigned __int16 *)(v6 + 2LL * v9 + 24);
else
v10 = *(unsigned __int8 *)(v6 + v9 + 24);
if ( v10 != 37 )
{
v17 = v9 + 1;
LABEL_15:
v16 = v17;
goto LABEL_16;
}
v11 = hex_decode(a1, v6, (unsigned int)v9, v9);
if ( v11 < 0 )
{
LABEL_33:
JS_FreeValue(a1, v6, v8);
string_buffer_free(v25);
return 0LL;
}
v10 = v11;
v16 = v9 + 3;
if ( (unsigned int)v11 <= 0x7F )
{
if ( a6 )
goto LABEL_16;
v17 = v9 + 1;
if ( (unsigned int)isURIReserved((unsigned int)v11) )
v10 = 37;
else
v17 = v16;
goto LABEL_15;
}
if ( (v11 & 0x7FFFFFE0) == 0xC0 )
break;
if ( (v11 & 0x7FFFFFF0) == 0xE0 )
{
v23 = 2048;
v18 = v11 & 0xF;
v22 = 2;
goto LABEL_23;
}
v13 = v11 & 0x7FFFFFF8;
v18 = 0;
v19 = 0;
v12 = 1;
v23 = 1;
if ( (_DWORD)v13 == 240 )
{
v23 = 0x10000;
v18 = v10 & 7;
v22 = 3;
goto LABEL_23;
}
LABEL_24:
v10 = v18;
while ( v19 > 0 )
{
v20 = hex_decode(a1, v6, v16, v13);
if ( v20 < 0 )
goto LABEL_33;
v13 = (unsigned __int8)v20 & 0xC0;
if ( (_DWORD)v13 != 128 )
goto LABEL_32;
v16 += 3;
v10 = v20 & 0x3F | (v10 << 6);
--v19;
}
if ( v10 < v23 || v10 > 1114111 || (v10 & 0xFFFFF800) == 0xD800 )
{
LABEL_32:
js_throw_URIError(a1, (unsigned int)"malformed UTF-8", v12, v13, v14, v15, v23);
goto LABEL_33;
}
LABEL_16:
string_buffer_putc((long long)v25, v10);
v9 = v16;
}
v23 = 128;
v18 = v11 & 0x1F;
v22 = 1;
LABEL_23:
v19 = v22;
goto LABEL_24;
}
return v6;
}
|
js_global_decodeURI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RSP + 0x4],R9D
MOV R15,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x0011ebec
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00169c89
LEA RSI,[RSP + 0x8]
XOR R12D,R12D
MOV RDI,R15
XOR EDX,EDX
CALL 0x00131bf2
LAB_00169afb:
MOV RAX,qword ptr [R14 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
CMP R12D,ECX
JGE 0x00169c9e
MOVSXD RCX,R12D
TEST EAX,EAX
JS 0x00169b1f
MOVZX R13D,byte ptr [R14 + RCX*0x1 + 0x18]
JMP 0x00169b25
LAB_00169b1f:
MOVZX R13D,word ptr [R14 + RCX*0x2 + 0x18]
LAB_00169b25:
CMP R13D,0x25
JNZ 0x00169b6f
MOV RDI,R15
MOV RSI,R14
MOV EDX,R12D
CALL 0x0016a158
TEST EAX,EAX
JS 0x00169c6b
MOV R13D,EAX
LEA EBP,[R12 + 0x3]
CMP EAX,0x7f
JA 0x00169b8a
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00169b75
MOV EDI,R13D
CALL 0x0016a1c8
INC R12D
TEST EAX,EAX
PUSH 0x25
POP RAX
CMOVNZ R13D,EAX
CMOVZ R12D,EBP
JMP 0x00169b72
LAB_00169b6f:
INC R12D
LAB_00169b72:
MOV EBP,R12D
LAB_00169b75:
LEA RDI,[RSP + 0x8]
MOV ESI,R13D
CALL 0x00130632
MOV R12D,EBP
JMP 0x00169afb
LAB_00169b8a:
MOV EAX,R13D
AND EAX,0x7fffffe0
CMP EAX,0xc0
JNZ 0x00169bab
AND R13D,0x1f
MOV dword ptr [RSP],0x80
MOV EAX,R13D
PUSH 0x1
JMP 0x00169bfb
LAB_00169bab:
MOV EAX,R13D
AND EAX,0x7ffffff0
CMP EAX,0xe0
JNZ 0x00169bcc
AND R13D,0xf
MOV dword ptr [RSP],0x800
MOV EAX,R13D
PUSH 0x2
JMP 0x00169bfb
LAB_00169bcc:
MOV ECX,R13D
AND ECX,0x7ffffff8
XOR EAX,EAX
MOV R12D,0x0
PUSH 0x1
POP RDX
MOV dword ptr [RSP],EDX
CMP ECX,0xf0
JNZ 0x00169bfd
AND R13D,0x7
MOV dword ptr [RSP],0x10000
MOV EAX,R13D
PUSH 0x3
LAB_00169bfb:
POP R12
LAB_00169bfd:
MOV R13D,EAX
LAB_00169c00:
TEST R12D,R12D
JLE 0x00169c38
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x0016a158
TEST EAX,EAX
JS 0x00169c6b
MOV ECX,EAX
AND ECX,0xc0
CMP ECX,0x80
JNZ 0x00169c5a
ADD EBP,0x3
SHL R13D,0x6
AND EAX,0x3f
OR R13D,EAX
DEC R12D
JMP 0x00169c00
LAB_00169c38:
CMP R13D,dword ptr [RSP]
JL 0x00169c5a
CMP R13D,0x10ffff
JG 0x00169c5a
MOV EAX,R13D
AND EAX,0xfffff800
CMP EAX,0xd800
JNZ 0x00169b75
LAB_00169c5a:
LEA RSI,[0x18bffb]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0016a1e6
LAB_00169c6b:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bbce
LEA RDI,[RSP + 0x8]
CALL 0x00132ab1
PUSH 0x6
POP RBX
XOR R14D,R14D
LAB_00169c89:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00169c9e:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bbce
LEA RDI,[RSP + 0x8]
CALL 0x00130684
MOV R14,RAX
MOV RBX,RDX
JMP 0x00169c89
|
int1 [16] js_global_decodeURI(int8 param_1)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
int iVar5;
int8 *in_R8;
int in_R9D;
int iVar6;
uint uVar7;
int1 auVar8 [16];
int local_58;
int1 local_50 [32];
auVar8 = JS_ToString(param_1,*in_R8,in_R8[1]);
lVar4 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
iVar6 = 0;
string_buffer_init(param_1,local_50,0);
while (uVar7 = (uint)*(int8 *)(lVar4 + 4), iVar6 < (int)(uVar7 & 0x7fffffff)) {
if ((int)uVar7 < 0) {
uVar7 = (uint)*(ushort *)(lVar4 + 0x18 + (long)iVar6 * 2);
}
else {
uVar7 = (uint)*(byte *)(lVar4 + 0x18 + (long)iVar6);
}
if (uVar7 == 0x25) {
uVar2 = hex_decode(param_1,lVar4,iVar6);
if ((int)uVar2 < 0) {
LAB_00169c6b:
JS_FreeValue(param_1,lVar4,auVar8._8_8_);
string_buffer_free(local_50);
return ZEXT816(6) << 0x40;
}
iVar5 = iVar6 + 3;
if (uVar2 < 0x80) {
uVar7 = uVar2;
iVar1 = iVar5;
if (in_R9D == 0) {
iVar3 = isURIReserved(uVar2);
uVar7 = 0x25;
iVar1 = iVar6 + 1;
if (iVar3 == 0) {
uVar7 = uVar2;
iVar1 = iVar5;
}
}
}
else {
if ((uVar2 & 0x7fffffe0) == 0xc0) {
uVar7 = uVar2 & 0x1f;
local_58 = 0x80;
iVar6 = 1;
}
else if ((uVar2 & 0x7ffffff0) == 0xe0) {
uVar7 = uVar2 & 0xf;
local_58 = 0x800;
iVar6 = 2;
}
else {
uVar7 = 0;
iVar6 = 0;
local_58 = 1;
if ((uVar2 & 0x7ffffff8) == 0xf0) {
uVar7 = uVar2 & 7;
local_58 = 0x10000;
iVar6 = 3;
}
}
for (; 0 < iVar6; iVar6 = iVar6 + -1) {
uVar2 = hex_decode(param_1,lVar4,iVar5);
if ((int)uVar2 < 0) goto LAB_00169c6b;
if ((uVar2 & 0xc0) != 0x80) goto LAB_00169c5a;
iVar5 = iVar5 + 3;
uVar7 = uVar7 << 6 | uVar2 & 0x3f;
}
if ((((int)uVar7 < local_58) || (0x10ffff < (int)uVar7)) ||
(iVar1 = iVar5, (uVar7 & 0xfffff800) == 0xd800)) {
LAB_00169c5a:
js_throw_URIError(param_1,"malformed UTF-8");
goto LAB_00169c6b;
}
}
}
else {
iVar1 = iVar6 + 1;
}
iVar6 = iVar1;
string_buffer_putc(local_50,uVar7);
}
JS_FreeValue(param_1,lVar4,auVar8._8_8_);
auVar8 = string_buffer_end(local_50);
}
return auVar8;
}
|
|
14,031
|
testing::UnitTest::set_current_test_info(testing::TestInfo*)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void UnitTest::set_current_test_info(TestInfo* a_current_test_info) {
internal::MutexLock lock(&mutex_);
impl_->set_current_test_info(a_current_test_info);
}
|
O1
|
cpp
|
testing::UnitTest::set_current_test_info(testing::TestInfo*):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x370dc
movq 0x40(%r14), %rax
movq %rbx, 0x1e0(%rax)
movq %r15, %rdi
callq 0x3717a
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x326a4
|
_ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
lea r15, [rdi+8]
mov rdi, r15; this
call _ZN7testing8internal9MutexBase4LockEv; testing::internal::MutexBase::Lock(void)
mov rax, [r14+40h]
mov [rax+1E0h], rbx
mov rdi, r15; this
call _ZN7testing8internal9MutexBase6UnlockEv; testing::internal::MutexBase::Unlock(void)
pop rbx
pop r14
pop r15
retn
mov rdi, rax
call __clang_call_terminate
|
long long testing::UnitTest::set_current_test_info(testing::UnitTest *this, testing::TestInfo *a2)
{
testing::internal::MutexBase::Lock((testing::UnitTest *)((char *)this + 8));
*(_QWORD *)(*((_QWORD *)this + 8) + 480LL) = a2;
return testing::internal::MutexBase::Unlock((testing::UnitTest *)((char *)this + 8));
}
|
set_current_test_info:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RDI + 0x8]
MOV RDI,R15
CALL 0x001370dc
MOV RAX,qword ptr [R14 + 0x40]
MOV qword ptr [RAX + 0x1e0],RBX
LAB_001216f0:
MOV RDI,R15
CALL 0x0013717a
POP RBX
POP R14
POP R15
RET
|
/* testing::UnitTest::set_current_test_info(testing::TestInfo*) */
void __thiscall testing::UnitTest::set_current_test_info(UnitTest *this,TestInfo *param_1)
{
internal::MutexBase::Lock((MutexBase *)(this + 8));
*(TestInfo **)(*(long *)(this + 0x40) + 0x1e0) = param_1;
/* try { // try from 001216f0 to 001216f7 has its CatchHandler @ 001216fe */
internal::MutexBase::Unlock((MutexBase *)(this + 8));
return;
}
|
|
14,032
|
maria_ft_parse
|
eloqsql/storage/maria/ma_ft_parser.c
|
int maria_ft_parse(TREE *wtree, uchar *doc, int doclen,
struct st_mysql_ftparser *parser,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
MY_FT_PARSER_PARAM my_param;
DBUG_ENTER("maria_ft_parse");
DBUG_ASSERT(parser);
my_param.wtree= wtree;
my_param.mem_root= mem_root;
param->mysql_parse= maria_ft_parse_internal;
param->mysql_add_word= maria_ft_add_word;
param->mysql_ftparam= &my_param;
param->cs= wtree->custom_arg;
param->doc= (char*)doc;
param->length= doclen;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
DBUG_RETURN(parser->parse(param));
}
|
O3
|
c
|
maria_ft_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rax
movq %rdi, (%rax)
movq %r9, 0x8(%rax)
leaq 0x39(%rip), %r9 # 0x60045
movq %r9, (%r8)
leaq 0xa6(%rip), %r9 # 0x600bc
movq %r9, 0x8(%r8)
movq %rax, 0x18(%r8)
movq 0x230(%rdi), %rax
movq %rax, 0x20(%r8)
movq %rsi, 0x28(%r8)
movl %edx, 0x30(%r8)
movl $0x0, 0x38(%r8)
movq %r8, %rdi
callq *0x8(%rcx)
addq $0x10, %rsp
popq %rbp
retq
|
maria_ft_parse:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, [rbp+var_10]
mov [rax], rdi
mov [rax+8], r9
lea r9, maria_ft_parse_internal
mov [r8], r9
lea r9, maria_ft_add_word
mov [r8+8], r9
mov [r8+18h], rax
mov rax, [rdi+230h]
mov [r8+20h], rax
mov [r8+28h], rsi
mov [r8+30h], edx
mov dword ptr [r8+38h], 0
mov rdi, r8
call qword ptr [rcx+8]
add rsp, 10h
pop rbp
retn
|
long long maria_ft_parse(long long a1, long long a2, int a3, long long a4, long long a5, long long a6)
{
_QWORD v7[2]; // [rsp+0h] [rbp-10h] BYREF
v7[0] = a1;
v7[1] = a6;
*(_QWORD *)a5 = maria_ft_parse_internal;
*(_QWORD *)(a5 + 8) = maria_ft_add_word;
*(_QWORD *)(a5 + 24) = v7;
*(_QWORD *)(a5 + 32) = *(_QWORD *)(a1 + 560);
*(_QWORD *)(a5 + 40) = a2;
*(_DWORD *)(a5 + 48) = a3;
*(_DWORD *)(a5 + 56) = 0;
return (*(long long ( **)(long long))(a4 + 8))(a5);
}
|
maria_ft_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[RBP + -0x10]
MOV qword ptr [RAX],RDI
MOV qword ptr [RAX + 0x8],R9
LEA R9,[0x160045]
MOV qword ptr [R8],R9
LEA R9,[0x1600bc]
MOV qword ptr [R8 + 0x8],R9
MOV qword ptr [R8 + 0x18],RAX
MOV RAX,qword ptr [RDI + 0x230]
MOV qword ptr [R8 + 0x20],RAX
MOV qword ptr [R8 + 0x28],RSI
MOV dword ptr [R8 + 0x30],EDX
MOV dword ptr [R8 + 0x38],0x0
MOV RDI,R8
CALL qword ptr [RCX + 0x8]
ADD RSP,0x10
POP RBP
RET
|
void maria_ft_parse(long param_1,int8 param_2,int4 param_3,long param_4,
int8 *param_5,int8 param_6)
{
long local_18;
int8 local_10;
*param_5 = maria_ft_parse_internal;
param_5[1] = maria_ft_add_word;
param_5[3] = &local_18;
param_5[4] = *(int8 *)(param_1 + 0x230);
param_5[5] = param_2;
*(int4 *)(param_5 + 6) = param_3;
*(int4 *)(param_5 + 7) = 0;
local_18 = param_1;
local_10 = param_6;
(**(code **)(param_4 + 8))(param_5);
return;
}
|
|
14,033
|
mysql_commit_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_commit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_commit,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
}
|
O0
|
c
|
mysql_commit_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x25c40
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_commit_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_commit
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_commit_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_commit(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_commit_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00125c40
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_commit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_commit(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
14,034
|
mysql_commit_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_commit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_commit,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
}
|
O3
|
c
|
mysql_commit_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x1f26e
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_commit_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_commit
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_commit_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_commit(v1);
*(_BYTE *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_commit_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0011f26e
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_commit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_commit();
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
14,035
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
|
monkey531[P]llama/common/json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa6de8
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa6dcd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b220
testl %eax, %eax
je 0xa6dca
addq $0x30, %rbx
jmp 0xa6dab
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xa6e44
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f888
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4d896(%rip), %rsi # 0xf46a2
movq %rsp, %rdi
callq 0xac779
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x87cb4
xorl %ebp, %ebp
leaq 0x860e5(%rip), %rsi # 0x12cf18
leaq -0x4b470(%rip), %rdx # 0x5b9ca
movq %rbx, %rdi
callq 0x1bf30
jmp 0xa6ebd
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3f0
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2337c
leaq 0x4d857(%rip), %rsi # 0xf46d2
leaq 0x4d856(%rip), %rcx # 0xf46d8
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xacd82
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xad0fc
xorl %ebp, %ebp
leaq 0x85fea(%rip), %rsi # 0x12ce98
leaq -0x4b4eb(%rip), %rdx # 0x5b9ca
movq %rbx, %rdi
callq 0x1bf30
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6ee3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xa6ee3
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xa6f1c
movq 0x30(%rsp), %rsi
jmp 0xa6f0c
jmp 0xa6f16
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6f1c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xa6f1c
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xa6f29
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bfb0
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A6DE8
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_A6DAB:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A6DCD
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A6DCA
add rbx, 30h ; '0'
jmp short loc_A6DAB
loc_A6DCA:
mov rax, rbx
loc_A6DCD:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_A6E44
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A6DE8:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A6EBD
loc_A6E44:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A6EBD:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6EE3
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A6EE3
mov r14, rax
mov bpl, 1
loc_A6EE3:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_A6F1C
mov rsi, [rsp+68h+var_38]
jmp short loc_A6F0C
jmp short loc_A6F16
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6F1C
mov rsi, [rsp+68h+var_58]
loc_A6F0C:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A6F1C
loc_A6F16:
mov r14, rax
mov bpl, 1
loc_A6F1C:
test bpl, bpl
jz short loc_A6F29
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A6F29:
mov rdi, r14
call __Unwind_Resume
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a6de8
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_001a6dab:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a6dcd
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b220
TEST EAX,EAX
JZ 0x001a6dca
ADD RBX,0x30
JMP 0x001a6dab
LAB_001a6dca:
MOV RAX,RBX
LAB_001a6dcd:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001a6e44
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a6de8:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f888
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001a6e05:
LEA RSI,[0x1f46a2]
MOV RDI,RSP
CALL 0x001ac779
MOV BPL,0x1
LAB_001a6e17:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00187cb4
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15b9ca]
MOV RDI,RBX
CALL 0x0011bf30
LAB_001a6e44:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3f0
LEA RDX,[RAX + R15*0x1]
LAB_001a6e67:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x0012337c
LAB_001a6e74:
LEA RSI,[0x1f46d2]
LEA RCX,[0x1f46d8]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001acd82
MOV BPL,0x1
LAB_001a6e92:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ad0fc
XOR EBP,EBP
LEA RSI,[0x22ce98]
LEA RDX,[0x15b9ca]
MOV RDI,RBX
CALL 0x0011bf30
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a6e05 to 001a6e13 has its CatchHandler @ 001a6f16 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001a6e17 to 001a6e41 has its CatchHandler @ 001a6ef6 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 001a6e67 to 001a6e73 has its CatchHandler @ 001a6ef4 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 001a6e74 to 001a6e8e has its CatchHandler @ 001a6edd */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 001a6e92 to 001a6ebc has its CatchHandler @ 001a6ebd */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
14,036
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
|
monkey531[P]llama/common/json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
O3
|
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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa532f
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa5319
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a220
testl %eax, %eax
je 0xa530e
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa52ef
jmp 0xa5311
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa538d
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5efec
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4c341(%rip), %rsi # 0xf1692
leaq 0x20(%rsp), %rdi
callq 0xaaee9
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x8684e
xorl %ebp, %ebp
leaq 0x84bdc(%rip), %rsi # 0x129f58
leaq -0x4a161(%rip), %rdx # 0x5b222
movq %rbx, %rdi
callq 0x1af30
jmp 0xa5406
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a3f0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22338
leaq 0x4c300(%rip), %rsi # 0xf16c2
leaq 0x4c2ff(%rip), %rcx # 0xf16c8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xab4c6
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xab83e
xorl %ebp, %ebp
leaq 0x84ae1(%rip), %rsi # 0x129ed8
leaq -0x4a1dc(%rip), %rdx # 0x5b222
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5424
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa546f
movq 0x10(%rsp), %rsi
jmp 0xa5467
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5479
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0xa5479
jmp 0xa5476
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa546f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0xa5479
jmp 0xa5481
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afb0
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A532F
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A5319
loc_A52EF:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A530E
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A52EF
jmp short loc_A5311
loc_A530E:
mov rax, rbx
loc_A5311:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A5319:
cmp rax, rbx
jz short loc_A538D
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A532F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A5406
loc_A538D:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A5406:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5424
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5424:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A546F
mov rsi, [rsp+68h+var_58]
jmp short loc_A5467
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A5479
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A5479
jmp short loc_A5476
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A546F
mov rsi, [rsp+68h+var_38]
loc_A5467:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A546F:
test bpl, bpl
jnz short loc_A5479
jmp short loc_A5481
loc_A5476:
mov r14, rax
loc_A5479:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A5481:
mov rdi, r14
call __Unwind_Resume
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a532f
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a5319
LAB_001a52ef:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a220
TEST EAX,EAX
JZ 0x001a530e
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a52ef
JMP 0x001a5311
LAB_001a530e:
MOV RAX,RBX
LAB_001a5311:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a5319:
CMP RAX,RBX
JZ 0x001a538d
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a532f:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015efec
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a534a:
LEA RSI,[0x1f1692]
LEA RDI,[RSP + 0x20]
CALL 0x001aaee9
MOV BPL,0x1
LAB_001a535e:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0018684e
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b222]
MOV RDI,RBX
CALL 0x0011af30
LAB_001a538d:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a3f0
LEA RDX,[RAX + R15*0x1]
LAB_001a53b0:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00122338
LAB_001a53bb:
LEA RSI,[0x1f16c2]
LEA RCX,[0x1f16c8]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001ab4c6
MOV BPL,0x1
LAB_001a53d9:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ab83e
XOR EBP,EBP
LEA RSI,[0x229ed8]
LEA RDX,[0x15b222]
MOV RDI,RBX
CALL 0x0011af30
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a534a to 001a535a has its CatchHandler @ 001a5476 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a535e to 001a538a has its CatchHandler @ 001a5451 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a53b0 to 001a53ba has its CatchHandler @ 001a544f */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a53bb to 001a53d5 has its CatchHandler @ 001a5434 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a53d9 to 001a5405 has its CatchHandler @ 001a5406 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
14,037
|
ma_rec_pack
|
eloqsql/storage/maria/ma_dynrec.c
|
uint _ma_rec_pack(MARIA_HA *info, register uchar *to,
register const uchar *from)
{
uint length,new_length,flag,bit,i;
const uchar *pos,*end;
uchar *startpos,*packpos;
enum en_fieldtype type;
reg3 MARIA_COLUMNDEF *column;
MARIA_BLOB *blob;
DBUG_ENTER("_ma_rec_pack");
flag= 0;
bit= 1;
startpos= packpos=to;
to+= info->s->base.pack_bytes;
blob= info->blobs;
column= info->s->columndef;
if (info->s->base.null_bytes)
{
memcpy(to, from, info->s->base.null_bytes);
from+= info->s->base.null_bytes;
to+= info->s->base.null_bytes;
}
for (i=info->s->base.fields ; i-- > 0; from+= length, column++)
{
length=(uint) column->length;
if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
{
if (type == FIELD_BLOB)
{
if (!blob->length)
flag|=bit;
else
{
char *temp_pos;
size_t tmp_length=length-portable_sizeof_char_ptr;
memcpy(to,from,tmp_length);
memcpy(&temp_pos,from+tmp_length,sizeof(char*));
memcpy(to+tmp_length,temp_pos,(size_t) blob->length);
to+=tmp_length+blob->length;
}
blob++;
}
else if (type == FIELD_SKIP_ZERO)
{
if (memcmp(from, maria_zero_string, length) == 0)
flag|=bit;
else
{
memcpy(to, from, (size_t) length);
to+=length;
}
}
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
pos= from; end= from + length;
if (type == FIELD_SKIP_ENDSPACE)
{ /* Pack trailing spaces */
while (end > from && *(end-1) == ' ')
end--;
}
else
{ /* Pack pref-spaces */
while (pos < end && *pos == ' ')
pos++;
}
new_length=(uint) (end-pos);
if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127)
< length)
{
if (column->length > 255 && new_length > 127)
{
to[0]= (uchar) ((new_length & 127) + 128);
to[1]= (uchar) (new_length >> 7);
to+=2;
}
else
*to++= (uchar) new_length;
memcpy(to, pos, (size_t) new_length); to+=new_length;
flag|=bit;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
else if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(column->length -1);
uint tmp_length;
if (pack_length == 1)
{
tmp_length= (uint) *from;
*to++= *from;
}
else
{
tmp_length= uint2korr(from);
store_key_length_inc(to,tmp_length);
}
if (tmp_length > column->length)
{
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(0);
}
memcpy(to, from+pack_length,tmp_length);
to+= tmp_length;
continue;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
continue; /* Normal field */
}
if ((bit= bit << 1) >= 256)
{
*packpos++ = (uchar) flag;
bit=1; flag=0;
}
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
if (bit != 1)
*packpos= (uchar) flag;
if (info->s->calc_checksum)
*to++= (uchar) info->cur_row.checksum;
DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos)));
DBUG_RETURN((uint) (to-startpos));
}
|
O3
|
c
|
ma_rec_pack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq (%rdi), %rax
movl 0x3f4(%rax), %r14d
movl 0x3fc(%rax), %edx
addq %rsi, %r14
movq 0x288(%rdi), %rcx
movq %rcx, -0x58(%rbp)
movq 0x588(%rax), %r15
testq %rdx, %rdx
movq %rdi, -0x60(%rbp)
je 0x45d04
movq %rdi, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x29080
movq (%r13), %rax
movl 0x3fc(%rax), %ecx
addq %rcx, %r12
addq %rcx, %r14
movq %r14, %rcx
movl 0x3c8(%rax), %r14d
testl %r14d, %r14d
je 0x45fca
movq %rbx, -0x48(%rbp)
movq %rbx, -0x40(%rbp)
movl $0x1, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq %rcx, %rbx
decl %r14d
movzwl 0x8(%r15), %r8d
movl (%r15), %ecx
testl %ecx, %ecx
je 0x45e21
cmpl $0x3, %ecx
je 0x45dae
cmpl $0x4, %ecx
jne 0x45ddd
movq -0x58(%rbp), %rcx
cmpq $0x0, 0x10(%rcx)
je 0x45e45
movl %r14d, -0x34(%rbp)
movq %rcx, %r14
movq %rbx, %r13
leal -0x8(%r8), %ebx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r8, -0x50(%rbp)
callq 0x29080
movq (%r12,%rbx), %rsi
leaq (%rbx,%r13), %rdi
movq 0x10(%r14), %rdx
callq 0x29080
movq -0x50(%rbp), %r8
addq 0x10(%r14), %rbx
addq %rbx, %r13
movq %r13, %rbx
movq %r14, %rcx
movl -0x34(%rbp), %r14d
movl -0x2c(%rbp), %eax
jmp 0x45e4b
movq %r12, %rdi
leaq 0x3c13b8(%rip), %rsi # 0x407170
movq %r8, %rdx
movq %r8, %r13
callq 0x29510
testl %eax, %eax
je 0x45e3a
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x29080
addq %r13, %rbx
movl -0x2c(%rbp), %eax
jmp 0x45e40
cmpl $0x2, %ecx
ja 0x45e0c
leaq (%r12,%r8), %rax
cmpl $0x1, %ecx
jne 0x45e78
movq %rax, %rcx
cmpq %r12, %rax
jbe 0x45e01
leaq -0x1(%rcx), %rax
cmpb $0x20, -0x1(%rcx)
je 0x45def
movq %r12, %rsi
movq %rcx, %rax
jmp 0x45eac
cmpl $0x8, %ecx
jne 0x45e21
cmpl $0x100, %r8d # imm = 0x100
ja 0x45e8f
movzbl (%r12), %eax
jmp 0x45e9f
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r8, %r13
callq 0x29080
movq %r13, %r8
addq %r13, %rbx
jmp 0x45e63
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
movq %r13, %r8
jmp 0x45e53
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
addq $0x18, %rcx
movq %rcx, -0x58(%rbp)
addl %eax, %eax
cmpl $0xff, %eax
ja 0x45f88
movl %eax, -0x2c(%rbp)
addq %r8, %r12
addq $0x38, %r15
testl %r14d, %r14d
jne 0x45d30
jmp 0x45fb4
movq %r12, %rsi
testq %r8, %r8
je 0x45ea9
cmpb $0x20, (%rsi)
jne 0x45eac
incq %rsi
cmpq %rax, %rsi
jb 0x45e80
jmp 0x45eac
movzwl (%r12), %eax
cmpl $0xfe, %eax
ja 0x45f33
movb %al, (%rbx)
incq %rbx
jmp 0x45f40
movq %r12, %rsi
subq %rsi, %rax
cmpl $0x100, %r8d # imm = 0x100
setae %dl
cmpl $0x7f, %eax
seta %cl
andb %dl, %cl
movzbl %cl, %edx
addl %eax, %edx
incl %edx
cmpl %r8d, %edx
jae 0x45f14
movq %rbx, %rdi
movl $0x1, %ebx
testb %cl, %cl
movq %r8, -0x50(%rbp)
movl %eax, %ecx
je 0x45eef
orb $-0x80, %cl
movl %eax, %edx
shrl $0x7, %edx
movb %dl, 0x1(%rdi)
movl $0x2, %ebx
addq %rdi, %rbx
movb %cl, (%rdi)
movl %eax, %r13d
movq %rbx, %rdi
movq %r13, %rdx
callq 0x29080
addq %r13, %rbx
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
movq -0x50(%rbp), %r8
jmp 0x45e53
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r8, %r13
callq 0x29080
movq %r13, %r8
addq %r13, %rbx
movl -0x2c(%rbp), %eax
jmp 0x45e53
movb $-0x1, (%rbx)
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
addq $0x3, %rbx
movzwl 0x8(%r15), %ecx
cmpl %ecx, %eax
ja 0x45ffa
cmpl $0x101, %r8d # imm = 0x101
movq %r12, %rsi
sbbq $0x0, %rsi
addq $0x2, %rsi
movl %r14d, -0x34(%rbp)
movq %rbx, %r13
movl %eax, %ebx
movq %r13, %rdi
movq %rbx, %rdx
movq %r8, %r14
callq 0x29080
movq %r14, %r8
addq %rbx, %r13
movq %r13, %rbx
movl -0x34(%rbp), %r14d
jmp 0x45e63
movq %rbx, %rcx
movq -0x48(%rbp), %rax
movl -0x30(%rbp), %edx
movb %dl, (%rax)
incq %rax
movq %rax, -0x48(%rbp)
movl %r8d, %eax
addq %rax, %r12
addq $0x38, %r15
testl %r14d, %r14d
movq -0x40(%rbp), %rbx
jne 0x45d1f
jmp 0x45fca
movq %rbx, %rcx
cmpl $0x1, -0x2c(%rbp)
je 0x45fc6
movq -0x48(%rbp), %rax
movl -0x30(%rbp), %edx
movb %dl, (%rax)
movq -0x40(%rbp), %rbx
movq -0x60(%rbp), %rdx
movq (%rdx), %rax
cmpq $0x0, 0x6a8(%rax)
je 0x45fe6
movb 0xb0(%rdx), %al
movb %al, (%rcx)
incq %rcx
subl %ebx, %ecx
movq %rcx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa7c22
movl $0x7f, (%rax)
xorl %eax, %eax
jmp 0x45feb
|
_ma_rec_pack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rdx
mov rbx, rsi
mov rax, [rdi]
mov r14d, [rax+3F4h]
mov edx, [rax+3FCh]
add r14, rsi
mov rcx, [rdi+288h]
mov [rbp+var_58], rcx
mov r15, [rax+588h]
test rdx, rdx
mov [rbp+var_60], rdi
jz short loc_45D04
mov r13, rdi
mov rdi, r14
mov rsi, r12
call _memcpy
mov rax, [r13+0]
mov ecx, [rax+3FCh]
add r12, rcx
add r14, rcx
loc_45D04:
mov rcx, r14
mov r14d, [rax+3C8h]
test r14d, r14d
jz loc_45FCA
mov [rbp+var_48], rbx
mov [rbp+var_40], rbx
loc_45D1F:
mov [rbp+var_2C], 1
mov [rbp+var_30], 0
mov rbx, rcx
loc_45D30:
dec r14d
movzx r8d, word ptr [r15+8]
mov ecx, [r15]
test ecx, ecx
jz loc_45E21
cmp ecx, 3
jz short loc_45DAE
cmp ecx, 4
jnz loc_45DDD
mov rcx, [rbp+var_58]
cmp qword ptr [rcx+10h], 0
jz loc_45E45
mov [rbp+var_34], r14d
mov r14, rcx
mov r13, rbx
lea ebx, [r8-8]
mov rdi, r13
mov rsi, r12
mov rdx, rbx
mov [rbp+var_50], r8
call _memcpy
mov rsi, [r12+rbx]
lea rdi, [rbx+r13]
mov rdx, [r14+10h]
call _memcpy
mov r8, [rbp+var_50]
add rbx, [r14+10h]
add r13, rbx
mov rbx, r13
mov rcx, r14
mov r14d, [rbp+var_34]
mov eax, [rbp+var_2C]
jmp loc_45E4B
loc_45DAE:
mov rdi, r12
lea rsi, maria_zero_string
mov rdx, r8
mov r13, r8
call _bcmp
test eax, eax
jz short loc_45E3A
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _memcpy
add rbx, r13
mov eax, [rbp+var_2C]
jmp short loc_45E40
loc_45DDD:
cmp ecx, 2
ja short loc_45E0C
lea rax, [r12+r8]
cmp ecx, 1
jnz loc_45E78
loc_45DEF:
mov rcx, rax
cmp rax, r12
jbe short loc_45E01
lea rax, [rcx-1]
cmp byte ptr [rcx-1], 20h ; ' '
jz short loc_45DEF
loc_45E01:
mov rsi, r12
mov rax, rcx
jmp loc_45EAC
loc_45E0C:
cmp ecx, 8
jnz short loc_45E21
cmp r8d, 100h
ja short loc_45E8F
movzx eax, byte ptr [r12]
jmp short loc_45E9F
loc_45E21:
mov rdi, rbx
mov rsi, r12
mov rdx, r8
mov r13, r8
call _memcpy
mov r8, r13
add rbx, r13
jmp short loc_45E63
loc_45E3A:
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
loc_45E40:
mov r8, r13
jmp short loc_45E53
loc_45E45:
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
loc_45E4B:
add rcx, 18h
mov [rbp+var_58], rcx
loc_45E53:
add eax, eax
cmp eax, 0FFh
ja loc_45F88
mov [rbp+var_2C], eax
loc_45E63:
add r12, r8
add r15, 38h ; '8'
test r14d, r14d
jnz loc_45D30
jmp loc_45FB4
loc_45E78:
mov rsi, r12
test r8, r8
jz short loc_45EA9
loc_45E80:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_45EAC
inc rsi
cmp rsi, rax
jb short loc_45E80
jmp short loc_45EAC
loc_45E8F:
movzx eax, word ptr [r12]
cmp eax, 0FEh
ja loc_45F33
loc_45E9F:
mov [rbx], al
inc rbx
jmp loc_45F40
loc_45EA9:
mov rsi, r12
loc_45EAC:
sub rax, rsi
cmp r8d, 100h
setnb dl
cmp eax, 7Fh
setnbe cl
and cl, dl
movzx edx, cl
add edx, eax
inc edx
cmp edx, r8d
jnb short loc_45F14
mov rdi, rbx
mov ebx, 1
test cl, cl
mov [rbp+var_50], r8
mov ecx, eax
jz short loc_45EEF
or cl, 80h
mov edx, eax
shr edx, 7
mov [rdi+1], dl
mov ebx, 2
loc_45EEF:
add rbx, rdi
mov [rdi], cl
mov r13d, eax
mov rdi, rbx
mov rdx, r13
call _memcpy
add rbx, r13
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
mov r8, [rbp+var_50]
jmp loc_45E53
loc_45F14:
mov rdi, rbx
mov rsi, r12
mov rdx, r8
mov r13, r8
call _memcpy
mov r8, r13
add rbx, r13
mov eax, [rbp+var_2C]
jmp loc_45E53
loc_45F33:
mov byte ptr [rbx], 0FFh
mov [rbx+2], al
mov [rbx+1], ah
add rbx, 3
loc_45F40:
movzx ecx, word ptr [r15+8]
cmp eax, ecx
ja loc_45FFA
cmp r8d, 101h
mov rsi, r12
sbb rsi, 0
add rsi, 2
mov [rbp+var_34], r14d
mov r13, rbx
mov ebx, eax
mov rdi, r13
mov rdx, rbx
mov r14, r8
call _memcpy
mov r8, r14
add r13, rbx
mov rbx, r13
mov r14d, [rbp+var_34]
jmp loc_45E63
loc_45F88:
mov rcx, rbx
mov rax, [rbp+var_48]
mov edx, [rbp+var_30]
mov [rax], dl
inc rax
mov [rbp+var_48], rax
mov eax, r8d
add r12, rax
add r15, 38h ; '8'
test r14d, r14d
mov rbx, [rbp+var_40]
jnz loc_45D1F
jmp short loc_45FCA
loc_45FB4:
mov rcx, rbx
cmp [rbp+var_2C], 1
jz short loc_45FC6
mov rax, [rbp+var_48]
mov edx, [rbp+var_30]
mov [rax], dl
loc_45FC6:
mov rbx, [rbp+var_40]
loc_45FCA:
mov rdx, [rbp+var_60]
mov rax, [rdx]
cmp qword ptr [rax+6A8h], 0
jz short loc_45FE6
mov al, [rdx+0B0h]
mov [rcx], al
inc rcx
loc_45FE6:
sub ecx, ebx
mov rax, rcx
loc_45FEB:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45FFA:
call _my_thread_var
mov dword ptr [rax], 7Fh
xor eax, eax
jmp short loc_45FEB
|
long long ma_rec_pack(const char *a1, const char *a2, const char *a3)
{
char *v4; // rbx
long long v5; // rax
long long v6; // rdx
const char *v7; // r14
long long v8; // r15
const char *v9; // r13
long long v10; // rcx
char *v11; // rcx
int v12; // r14d
long long v13; // r8
unsigned int v14; // ecx
long long v15; // rcx
char *v16; // r13
long long v17; // rbx
int v18; // eax
long long v19; // r13
unsigned __int8 *v20; // rax
unsigned __int8 *v21; // rcx
unsigned int v22; // eax
long long v23; // r13
unsigned int v24; // eax
const char *v25; // rbx
unsigned int v26; // eax
bool v27; // cl
char *v28; // rdi
long long v29; // rbx
bool v30; // zf
char v31; // cl
long long v32; // r13
long long v33; // r13
const char *v34; // r13
long long v35; // rbx
long long v36; // r14
const char *v38; // [rsp+0h] [rbp-60h]
long long v39; // [rsp+8h] [rbp-58h]
long long v40; // [rsp+10h] [rbp-50h]
long long v41; // [rsp+10h] [rbp-50h]
char *v42; // [rsp+18h] [rbp-48h]
int v43; // [rsp+20h] [rbp-40h]
int v44; // [rsp+2Ch] [rbp-34h]
int v45; // [rsp+30h] [rbp-30h]
int v46; // [rsp+34h] [rbp-2Ch]
v4 = (char *)a2;
v5 = *(_QWORD *)a1;
v6 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL);
v7 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)];
v39 = *((_QWORD *)a1 + 81);
v8 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL);
v38 = a1;
if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) )
{
v9 = a1;
a1 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)];
a2 = a3;
memcpy(v7, a3, v6);
v5 = *(_QWORD *)v9;
v10 = *(unsigned int *)(*(_QWORD *)v9 + 1020LL);
a3 += v10;
v7 += v10;
}
v11 = (char *)v7;
v12 = *(_DWORD *)(v5 + 968);
if ( v12 )
{
v42 = v4;
v43 = (int)v4;
LABEL_5:
v46 = 1;
v45 = 0;
v4 = v11;
while ( 1 )
{
--v12;
v13 = *(unsigned __int16 *)(v8 + 8);
v14 = *(_DWORD *)v8;
if ( !*(_DWORD *)v8 )
goto LABEL_21;
if ( v14 == 3 )
{
a1 = a3;
a2 = (const char *)&maria_zero_string;
v19 = *(unsigned __int16 *)(v8 + 8);
if ( (unsigned int)bcmp(a3, &maria_zero_string, v19) )
{
a1 = v4;
a2 = a3;
memcpy(v4, a3, v19);
v4 += v19;
v18 = v46;
}
else
{
v18 = v46;
v45 |= v46;
}
v13 = v19;
}
else if ( v14 == 4 )
{
v15 = v39;
if ( *(_QWORD *)(v39 + 16) )
{
v16 = v4;
v17 = (unsigned int)(v13 - 8);
v40 = *(unsigned __int16 *)(v8 + 8);
memcpy(v16, a3, v17);
a2 = *(const char **)&a3[v17];
a1 = &v16[v17];
memcpy(&v16[v17], a2, *(_QWORD *)(v39 + 16));
v13 = v40;
v4 = &v16[*(_QWORD *)(v39 + 16) + v17];
v15 = v39;
v18 = v46;
}
else
{
v18 = v46;
v45 |= v46;
}
v39 = v15 + 24;
}
else
{
if ( v14 > 2 )
{
if ( v14 == 8 )
{
if ( (unsigned int)v13 <= 0x100 )
{
v22 = *(unsigned __int8 *)a3;
goto LABEL_35;
}
v22 = *(unsigned __int16 *)a3;
if ( v22 > 0xFE )
{
*v4 = -1;
v4[2] = v22;
v4[1] = BYTE1(v22);
v25 = v4 + 3;
}
else
{
LABEL_35:
*v4 = v22;
v25 = v4 + 1;
}
if ( v22 > *(unsigned __int16 *)(v8 + 8) )
{
*(_DWORD *)my_thread_var(a1, a2) = 127;
return 0LL;
}
a2 = &a3[-((unsigned int)v13 < 0x101) + 2];
v44 = v12;
v34 = v25;
v35 = v22;
a1 = v34;
v36 = v13;
memcpy(v34, a2, v22);
v13 = v36;
v4 = (char *)&v34[v35];
v12 = v44;
goto LABEL_28;
}
LABEL_21:
a1 = v4;
a2 = a3;
v23 = *(unsigned __int16 *)(v8 + 8);
memcpy(v4, a3, v23);
v13 = v23;
v4 += v23;
goto LABEL_28;
}
v20 = (unsigned __int8 *)&a3[v13];
if ( v14 == 1 )
{
do
{
v21 = v20;
if ( v20 <= (unsigned __int8 *)a3 )
break;
--v20;
}
while ( *(v21 - 1) == 32 );
a2 = a3;
LODWORD(v20) = (_DWORD)v21;
}
else
{
a2 = a3;
if ( *(_WORD *)(v8 + 8) )
{
do
{
if ( *a2 != 32 )
break;
++a2;
}
while ( a2 < (const char *)v20 );
}
else
{
a2 = a3;
}
}
v26 = (_DWORD)v20 - (_DWORD)a2;
v27 = (unsigned int)v13 >= 0x100 && v26 > 0x7F;
if ( v26 + v27 + 1 >= (unsigned int)v13 )
{
a1 = v4;
a2 = a3;
v33 = *(unsigned __int16 *)(v8 + 8);
memcpy(v4, a3, v33);
v13 = v33;
v4 += v33;
v18 = v46;
}
else
{
v28 = v4;
v29 = 1LL;
v30 = !v27;
v41 = *(unsigned __int16 *)(v8 + 8);
v31 = v26;
if ( !v30 )
{
v31 = v26 | 0x80;
v28[1] = v26 >> 7;
v29 = 2LL;
}
*v28 = v31;
v32 = v26;
a1 = &v28[v29];
memcpy(a1, a2, v26);
v4 = (char *)&a1[v32];
v18 = v46;
v45 |= v46;
v13 = v41;
}
}
v24 = 2 * v18;
if ( v24 > 0xFF )
{
v11 = v4;
*v42++ = v45;
a3 += (unsigned int)v13;
v8 += 56LL;
LODWORD(v4) = v43;
if ( v12 )
goto LABEL_5;
break;
}
v46 = v24;
LABEL_28:
a3 += v13;
v8 += 56LL;
if ( !v12 )
{
v11 = v4;
if ( v46 != 1 )
*v42 = v45;
LODWORD(v4) = v43;
break;
}
}
}
if ( *(_QWORD *)(*(_QWORD *)v38 + 1704LL) )
{
*v11 = v38[176];
LODWORD(v11) = (_DWORD)v11 + 1;
}
return (unsigned int)((_DWORD)v11 - (_DWORD)v4);
}
|
_ma_rec_pack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RDX
MOV RBX,RSI
MOV RAX,qword ptr [RDI]
MOV R14D,dword ptr [RAX + 0x3f4]
MOV EDX,dword ptr [RAX + 0x3fc]
ADD R14,RSI
MOV RCX,qword ptr [RDI + 0x288]
MOV qword ptr [RBP + -0x58],RCX
MOV R15,qword ptr [RAX + 0x588]
TEST RDX,RDX
MOV qword ptr [RBP + -0x60],RDI
JZ 0x00145d04
MOV R13,RDI
MOV RDI,R14
MOV RSI,R12
CALL 0x00129080
MOV RAX,qword ptr [R13]
MOV ECX,dword ptr [RAX + 0x3fc]
ADD R12,RCX
ADD R14,RCX
LAB_00145d04:
MOV RCX,R14
MOV R14D,dword ptr [RAX + 0x3c8]
TEST R14D,R14D
JZ 0x00145fca
MOV qword ptr [RBP + -0x48],RBX
MOV qword ptr [RBP + -0x40],RBX
LAB_00145d1f:
MOV dword ptr [RBP + -0x2c],0x1
MOV dword ptr [RBP + -0x30],0x0
MOV RBX,RCX
LAB_00145d30:
DEC R14D
MOVZX R8D,word ptr [R15 + 0x8]
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x00145e21
CMP ECX,0x3
JZ 0x00145dae
CMP ECX,0x4
JNZ 0x00145ddd
MOV RCX,qword ptr [RBP + -0x58]
CMP qword ptr [RCX + 0x10],0x0
JZ 0x00145e45
MOV dword ptr [RBP + -0x34],R14D
MOV R14,RCX
MOV R13,RBX
LEA EBX,[R8 + -0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,RBX
MOV qword ptr [RBP + -0x50],R8
CALL 0x00129080
MOV RSI,qword ptr [R12 + RBX*0x1]
LEA RDI,[RBX + R13*0x1]
MOV RDX,qword ptr [R14 + 0x10]
CALL 0x00129080
MOV R8,qword ptr [RBP + -0x50]
ADD RBX,qword ptr [R14 + 0x10]
ADD R13,RBX
MOV RBX,R13
MOV RCX,R14
MOV R14D,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x00145e4b
LAB_00145dae:
MOV RDI,R12
LEA RSI,[0x507170]
MOV RDX,R8
MOV R13,R8
CALL 0x00129510
TEST EAX,EAX
JZ 0x00145e3a
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x00129080
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x00145e40
LAB_00145ddd:
CMP ECX,0x2
JA 0x00145e0c
LEA RAX,[R12 + R8*0x1]
CMP ECX,0x1
JNZ 0x00145e78
LAB_00145def:
MOV RCX,RAX
CMP RAX,R12
JBE 0x00145e01
LEA RAX,[RCX + -0x1]
CMP byte ptr [RCX + -0x1],0x20
JZ 0x00145def
LAB_00145e01:
MOV RSI,R12
MOV RAX,RCX
JMP 0x00145eac
LAB_00145e0c:
CMP ECX,0x8
JNZ 0x00145e21
CMP R8D,0x100
JA 0x00145e8f
MOVZX EAX,byte ptr [R12]
JMP 0x00145e9f
LAB_00145e21:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R8
MOV R13,R8
CALL 0x00129080
MOV R8,R13
ADD RBX,R13
JMP 0x00145e63
LAB_00145e3a:
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
LAB_00145e40:
MOV R8,R13
JMP 0x00145e53
LAB_00145e45:
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
LAB_00145e4b:
ADD RCX,0x18
MOV qword ptr [RBP + -0x58],RCX
LAB_00145e53:
ADD EAX,EAX
CMP EAX,0xff
JA 0x00145f88
MOV dword ptr [RBP + -0x2c],EAX
LAB_00145e63:
ADD R12,R8
ADD R15,0x38
TEST R14D,R14D
JNZ 0x00145d30
JMP 0x00145fb4
LAB_00145e78:
MOV RSI,R12
TEST R8,R8
JZ 0x00145ea9
LAB_00145e80:
CMP byte ptr [RSI],0x20
JNZ 0x00145eac
INC RSI
CMP RSI,RAX
JC 0x00145e80
JMP 0x00145eac
LAB_00145e8f:
MOVZX EAX,word ptr [R12]
CMP EAX,0xfe
JA 0x00145f33
LAB_00145e9f:
MOV byte ptr [RBX],AL
INC RBX
JMP 0x00145f40
LAB_00145ea9:
MOV RSI,R12
LAB_00145eac:
SUB RAX,RSI
CMP R8D,0x100
SETNC DL
CMP EAX,0x7f
SETA CL
AND CL,DL
MOVZX EDX,CL
ADD EDX,EAX
INC EDX
CMP EDX,R8D
JNC 0x00145f14
MOV RDI,RBX
MOV EBX,0x1
TEST CL,CL
MOV qword ptr [RBP + -0x50],R8
MOV ECX,EAX
JZ 0x00145eef
OR CL,0x80
MOV EDX,EAX
SHR EDX,0x7
MOV byte ptr [RDI + 0x1],DL
MOV EBX,0x2
LAB_00145eef:
ADD RBX,RDI
MOV byte ptr [RDI],CL
MOV R13D,EAX
MOV RDI,RBX
MOV RDX,R13
CALL 0x00129080
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
MOV R8,qword ptr [RBP + -0x50]
JMP 0x00145e53
LAB_00145f14:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R8
MOV R13,R8
CALL 0x00129080
MOV R8,R13
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x00145e53
LAB_00145f33:
MOV byte ptr [RBX],0xff
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
ADD RBX,0x3
LAB_00145f40:
MOVZX ECX,word ptr [R15 + 0x8]
CMP EAX,ECX
JA 0x00145ffa
CMP R8D,0x101
MOV RSI,R12
SBB RSI,0x0
ADD RSI,0x2
MOV dword ptr [RBP + -0x34],R14D
MOV R13,RBX
MOV EBX,EAX
MOV RDI,R13
MOV RDX,RBX
MOV R14,R8
CALL 0x00129080
MOV R8,R14
ADD R13,RBX
MOV RBX,R13
MOV R14D,dword ptr [RBP + -0x34]
JMP 0x00145e63
LAB_00145f88:
MOV RCX,RBX
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x30]
MOV byte ptr [RAX],DL
INC RAX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,R8D
ADD R12,RAX
ADD R15,0x38
TEST R14D,R14D
MOV RBX,qword ptr [RBP + -0x40]
JNZ 0x00145d1f
JMP 0x00145fca
LAB_00145fb4:
MOV RCX,RBX
CMP dword ptr [RBP + -0x2c],0x1
JZ 0x00145fc6
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x30]
MOV byte ptr [RAX],DL
LAB_00145fc6:
MOV RBX,qword ptr [RBP + -0x40]
LAB_00145fca:
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RDX]
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x00145fe6
MOV AL,byte ptr [RDX + 0xb0]
MOV byte ptr [RCX],AL
INC RCX
LAB_00145fe6:
SUB ECX,EBX
MOV RAX,RCX
LAB_00145feb:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145ffa:
CALL 0x001a7c22
MOV dword ptr [RAX],0x7f
XOR EAX,EAX
JMP 0x00145feb
|
int _ma_rec_pack(long *param_1,int1 *param_2,ushort *param_3)
{
ushort uVar1;
ushort uVar2;
ushort *puVar3;
int iVar4;
uint uVar5;
ulong uVar6;
int1 *puVar8;
int4 *puVar9;
byte bVar10;
long lVar11;
ushort *puVar12;
uint uVar13;
ulong __n;
int iVar14;
byte *pbVar15;
uint *puVar16;
long local_60;
uint local_38;
uint local_34;
ushort *puVar7;
lVar11 = *param_1;
pbVar15 = param_2 + *(uint *)(lVar11 + 0x3f4);
local_60 = param_1[0x51];
puVar16 = *(uint **)(lVar11 + 0x588);
if ((ulong)*(uint *)(lVar11 + 0x3fc) != 0) {
memcpy(pbVar15,param_3,(ulong)*(uint *)(lVar11 + 0x3fc));
lVar11 = *param_1;
param_3 = (ushort *)((long)param_3 + (ulong)*(uint *)(lVar11 + 0x3fc));
pbVar15 = pbVar15 + *(uint *)(lVar11 + 0x3fc);
}
iVar14 = *(int *)(lVar11 + 0x3c8);
puVar8 = param_2;
joined_r0x00145d11:
if (iVar14 == 0) {
LAB_00145fca:
if (*(long *)(*param_1 + 0x6a8) != 0) {
*pbVar15 = *(byte *)(param_1 + 0x16);
pbVar15 = pbVar15 + 1;
}
return (int)pbVar15 - (int)param_2;
}
local_34 = 1;
local_38 = 0;
do {
iVar14 = iVar14 + -1;
uVar1 = (ushort)puVar16[2];
__n = (ulong)uVar1;
uVar5 = *puVar16;
if (uVar5 == 0) {
LAB_00145e21:
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
else {
if (uVar5 == 3) {
iVar4 = bcmp(param_3,maria_zero_string,__n);
if (iVar4 == 0) {
local_38 = local_38 | local_34;
}
else {
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
}
else if (uVar5 == 4) {
if (*(long *)(local_60 + 0x10) == 0) {
local_38 = local_38 | local_34;
}
else {
uVar6 = (ulong)(uVar1 - 8);
memcpy(pbVar15,param_3,uVar6);
memcpy(pbVar15 + uVar6,*(void **)((long)param_3 + uVar6),*(size_t *)(local_60 + 0x10));
pbVar15 = pbVar15 + uVar6 + *(long *)(local_60 + 0x10);
}
local_60 = local_60 + 0x18;
}
else {
if (2 < uVar5) {
if (uVar5 != 8) goto LAB_00145e21;
if (uVar1 < 0x101) {
uVar5 = (uint)(byte)*param_3;
LAB_00145e9f:
uVar13 = uVar5;
*pbVar15 = (byte)uVar13;
pbVar15 = pbVar15 + 1;
}
else {
uVar2 = *param_3;
uVar13 = (uint)uVar2;
uVar5 = (uint)uVar2;
if (uVar2 < 0xff) goto LAB_00145e9f;
*pbVar15 = 0xff;
pbVar15[2] = (byte)uVar2;
pbVar15[1] = (byte)(uVar2 >> 8);
pbVar15 = pbVar15 + 3;
}
if ((ushort)puVar16[2] < uVar13) {
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x7f;
return 0;
}
memcpy(pbVar15,(byte *)((long)param_3 + (2 - (ulong)(uVar1 < 0x101))),(ulong)uVar13);
pbVar15 = pbVar15 + uVar13;
goto LAB_00145e63;
}
puVar7 = (ushort *)((long)param_3 + __n);
puVar3 = puVar7;
puVar12 = param_3;
if (uVar5 == 1) {
do {
puVar7 = puVar3;
if (puVar7 <= param_3) break;
puVar3 = (ushort *)((long)puVar7 + -1);
} while (*(byte *)((long)puVar7 + -1) == 0x20);
}
else if (__n != 0) {
do {
if ((byte)*puVar12 != 0x20) break;
puVar12 = (ushort *)((long)puVar12 + 1);
} while (puVar12 < puVar7);
}
uVar6 = (long)puVar7 - (long)puVar12;
uVar13 = (uint)uVar1;
uVar5 = (uint)uVar6;
if ((0x7f < uVar5 && 0xff < uVar13) + uVar5 + 1 < uVar13) {
lVar11 = 1;
bVar10 = (byte)uVar6;
if (0x7f < uVar5 && 0xff < uVar13) {
bVar10 = bVar10 | 0x80;
pbVar15[1] = (byte)(uVar6 >> 7);
lVar11 = 2;
}
*pbVar15 = bVar10;
memcpy(pbVar15 + lVar11,puVar12,uVar6 & 0xffffffff);
pbVar15 = pbVar15 + lVar11 + (uVar6 & 0xffffffff);
local_38 = local_38 | local_34;
}
else {
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
}
local_34 = local_34 * 2;
if (0xff < local_34) break;
}
LAB_00145e63:
param_3 = (ushort *)((long)param_3 + __n);
puVar16 = puVar16 + 0xe;
if (iVar14 == 0) {
if (local_34 != 1) {
*puVar8 = (char)local_38;
}
goto LAB_00145fca;
}
} while( true );
*puVar8 = (char)local_38;
puVar8 = puVar8 + 1;
param_3 = (ushort *)((long)param_3 + __n);
puVar16 = puVar16 + 0xe;
goto joined_r0x00145d11;
}
|
|
14,038
|
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
llama.cpp/common/minja/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::object();
for (const auto& [key, value] : elements) {
if (!key) throw std::runtime_error("Dict key is null");
if (!value) throw std::runtime_error("Dict value is null");
result.set(key->evaluate(context), value->evaluate(context));
}
return result;
}
|
O3
|
cpp
|
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movl $0x30, %edi
callq 0x20220
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x7a5ac(%rip), %rcx # 0x164430
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, (%r12)
movq %rcx, -0x8(%r12)
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsp)
movq %rbx, %rdi
callq 0xc4816
movq %r12, %rdi
callq 0x7416e
movq 0x20(%r15), %rbx
movq 0x28(%r15), %r15
cmpq %r15, %rbx
je 0xea00a
leaq 0x68(%rsp), %rbp
leaq 0x18(%rsp), %r13
movq (%rbx), %rsi
testq %rsi, %rsi
je 0xea020
cmpq $0x0, 0x10(%rbx)
je 0xea03e
movq %rbp, %rdi
movq %r14, %rdx
callq 0xe4adc
movq 0x10(%rbx), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0xe4adc
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xc4224
leaq 0x58(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x88a76
movq %r12, %rdi
callq 0x8d190
leaq 0x50(%rsp), %rdi
callq 0x7416e
leaq 0x40(%rsp), %rdi
callq 0x7416e
leaq 0x30(%rsp), %rdi
callq 0x7416e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xe9f86
movq 0x7c037(%rip), %rax # 0x165f98
cmpb $0x0, (%rax)
je 0xe9f71
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xe9f7b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xe9f86
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x88a76
movq %r12, %rdi
callq 0x8d190
leaq 0xa0(%rsp), %rdi
callq 0x7416e
leaq 0x90(%rsp), %rdi
callq 0x7416e
leaq 0x80(%rsp), %rdi
callq 0x7416e
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xe9ffd
movq 0x7bfc0(%rip), %rax # 0x165f98
cmpb $0x0, (%rax)
je 0xe9fe8
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xe9ff2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xe9ffd
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x20, %rbx
cmpq %r15, %rbx
jne 0xe9edb
movq (%rsp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20680
movq %rax, %r15
leaq 0x3ab20(%rip), %rsi # 0x124b54
movq %rax, %rdi
callq 0x20450
jmp 0xea05a
movl $0x10, %edi
callq 0x20680
movq %rax, %r15
leaq 0x3ab13(%rip), %rsi # 0x124b65
movq %rax, %rdi
callq 0x20450
movq 0x7bf5f(%rip), %rsi # 0x165fc0
movq 0x7bf18(%rip), %rdx # 0x165f80
movq %r15, %rdi
callq 0x20ab0
jmp 0xea072
movq %rax, %r14
movq %r15, %rdi
callq 0x20f60
jmp 0xea0a2
jmp 0xea09f
movq %rax, %r14
jmp 0xea093
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0xb9a74
leaq 0x68(%rsp), %rdi
callq 0xb9a74
jmp 0xea0a2
movq %rax, %r14
movq (%rsp), %rdi
callq 0xb9a74
movq %r14, %rdi
callq 0x20b50
nop
|
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsp+0E8h+var_D8]
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
lea rcx, [rax+10h]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
mov [r12], rax
mov [r12-8], rcx
lea rsi, [rsp+0E8h+var_E0]
mov [rsp+0E8h+var_E8], rbx
mov rdi, rbx
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&)
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rbx, [r15+20h]
mov r15, [r15+28h]
cmp rbx, r15
jz loc_EA00A
lea rbp, [rsp+0E8h+var_80]
lea r13, [rsp+0E8h+var_D0]
loc_E9EDB:
mov rsi, [rbx]
test rsi, rsi
jz loc_EA020
cmp qword ptr [rbx+10h], 0
jz loc_EA03E
mov rdi, rbp
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, [rbx+10h]
mov rdi, r13
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, [rsp+0E8h+var_E8]; this
mov rsi, rbp; minja::Value *
mov rdx, r13; minja::Value *
call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&)
lea r12, [rsp+0E8h+var_90]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0E8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0E8h+var_A8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0E8h+var_B8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+0E8h+var_C8]
test rdi, rdi
jz short loc_E9F86
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_E9F71
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_E9F7B
loc_E9F71:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_E9F7B:
cmp eax, 1
jnz short loc_E9F86
mov rax, [rdi]
call qword ptr [rax+18h]
loc_E9F86:
lea r12, [rsp+0E8h+var_40]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0E8h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0E8h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0E8h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+0E8h+var_78]
test rdi, rdi
jz short loc_E9FFD
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_E9FE8
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_E9FF2
loc_E9FE8:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_E9FF2:
cmp eax, 1
jnz short loc_E9FFD
mov rax, [rdi]
call qword ptr [rax+18h]
loc_E9FFD:
add rbx, 20h ; ' '
cmp rbx, r15
jnz loc_E9EDB
loc_EA00A:
mov rax, [rsp+0E8h+var_E8]
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EA020:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictKeyIsNull; "Dict key is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_EA05A
loc_EA03E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictValueIsNul; "Dict value is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_EA05A:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short $+2
loc_EA072:
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_EA0A2
jmp short loc_EA09F
mov r14, rax
jmp short loc_EA093
mov r14, rax
lea rdi, [rsp+0E8h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_EA093:
lea rdi, [rsp+0E8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_EA0A2
loc_EA09F:
mov r14, rax
loc_EA0A2:
mov rdi, [rsp+0E8h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
|
minja::Value * minja::DictExpr::do_evaluate(minja::Value *a1, long long a2)
{
long long v2; // rax
void (****v3)(void); // rbx
void (****v4)(void); // r15
long long v5; // rdi
signed __int32 v6; // eax
long long v7; // rdi
signed __int32 v8; // eax
std::runtime_error *exception; // r15
long long v12; // [rsp+8h] [rbp-E0h] BYREF
volatile signed __int32 *v13; // [rsp+10h] [rbp-D8h] BYREF
_BYTE v14[8]; // [rsp+18h] [rbp-D0h] BYREF
long long v15; // [rsp+20h] [rbp-C8h]
volatile signed __int32 *v16; // [rsp+30h] [rbp-B8h] BYREF
volatile signed __int32 *v17; // [rsp+40h] [rbp-A8h] BYREF
volatile signed __int32 *v18; // [rsp+50h] [rbp-98h] BYREF
char v19[16]; // [rsp+58h] [rbp-90h] BYREF
_BYTE v20[8]; // [rsp+68h] [rbp-80h] BYREF
long long v21; // [rsp+70h] [rbp-78h]
volatile signed __int32 *v22; // [rsp+80h] [rbp-68h] BYREF
volatile signed __int32 *v23; // [rsp+90h] [rbp-58h] BYREF
volatile signed __int32 *v24; // [rsp+A0h] [rbp-48h] BYREF
char v25[64]; // [rsp+A8h] [rbp-40h] BYREF
v2 = operator new(0x30uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
v13 = (volatile signed __int32 *)v2;
v12 = v2 + 16;
minja::Value::Value((long long)a1, &v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
v3 = *(void (*****)(void))(a2 + 32);
v4 = *(void (*****)(void))(a2 + 40);
if ( v3 != v4 )
{
while ( *v3 )
{
if ( !v3[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict value is null");
LABEL_20:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, *v3);
minja::Expression::evaluate((long long)v14, v3[2]);
minja::Value::set(a1, (const minja::Value *)v20, (const minja::Value *)v14);
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(v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16);
v5 = v15;
if ( v15 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v15 + 12);
*(_DWORD *)(v15 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 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(v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v22);
v7 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
v3 += 4;
if ( v3 == v4 )
return a1;
}
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict key is null");
goto LABEL_20;
}
return a1;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x10]
MOV EDI,0x30
CALL 0x00120220
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x264430]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + -0x8],RCX
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSP],RBX
MOV RDI,RBX
CALL 0x001c4816
MOV RDI,R12
CALL 0x0017416e
MOV RBX,qword ptr [R15 + 0x20]
MOV R15,qword ptr [R15 + 0x28]
CMP RBX,R15
JZ 0x001ea00a
LEA RBP,[RSP + 0x68]
LEA R13,[RSP + 0x18]
LAB_001e9edb:
MOV RSI,qword ptr [RBX]
TEST RSI,RSI
JZ 0x001ea020
CMP qword ptr [RBX + 0x10],0x0
JZ 0x001ea03e
LAB_001e9ef2:
MOV RDI,RBP
MOV RDX,R14
CALL 0x001e4adc
MOV RSI,qword ptr [RBX + 0x10]
LAB_001e9f01:
MOV RDI,R13
MOV RDX,R14
CALL 0x001e4adc
LAB_001e9f0c:
MOV RDI,qword ptr [RSP]
MOV RSI,RBP
MOV RDX,R13
CALL 0x001c4224
LAB_001e9f1b:
LEA R12,[RSP + 0x58]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00188a76
MOV RDI,R12
CALL 0x0018d190
LEA RDI,[RSP + 0x50]
CALL 0x0017416e
LEA RDI,[RSP + 0x40]
CALL 0x0017416e
LEA RDI,[RSP + 0x30]
CALL 0x0017416e
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001e9f86
MOV RAX,qword ptr [0x00265f98]
CMP byte ptr [RAX],0x0
JZ 0x001e9f71
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001e9f7b
LAB_001e9f71:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001e9f7b:
CMP EAX,0x1
JNZ 0x001e9f86
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001e9f86:
LEA R12,[RSP + 0xa8]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00188a76
MOV RDI,R12
CALL 0x0018d190
LEA RDI,[RSP + 0xa0]
CALL 0x0017416e
LEA RDI,[RSP + 0x90]
CALL 0x0017416e
LEA RDI,[RSP + 0x80]
CALL 0x0017416e
MOV RDI,qword ptr [RSP + 0x70]
TEST RDI,RDI
JZ 0x001e9ffd
MOV RAX,qword ptr [0x00265f98]
CMP byte ptr [RAX],0x0
JZ 0x001e9fe8
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001e9ff2
LAB_001e9fe8:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001e9ff2:
CMP EAX,0x1
JNZ 0x001e9ffd
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001e9ffd:
ADD RBX,0x20
CMP RBX,R15
JNZ 0x001e9edb
LAB_001ea00a:
MOV RAX,qword ptr [RSP]
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ea020:
MOV EDI,0x10
CALL 0x00120680
MOV R15,RAX
LAB_001ea02d:
LEA RSI,[0x224b54]
MOV RDI,RAX
CALL 0x00120450
LAB_001ea03c:
JMP 0x001ea05a
LAB_001ea03e:
MOV EDI,0x10
CALL 0x00120680
MOV R15,RAX
LAB_001ea04b:
LEA RSI,[0x224b65]
MOV RDI,RAX
CALL 0x00120450
LAB_001ea05a:
MOV RSI,qword ptr [0x00265fc0]
MOV RDX,qword ptr [0x00265f80]
MOV RDI,R15
CALL 0x00120ab0
|
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1)
{
int *piVar1;
int8 *puVar2;
int iVar3;
runtime_error *this_00;
int8 *puVar4;
int8 *local_e0;
int8 *local_d8;
Expression local_d0 [8];
long *local_c8;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_b8 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_98 [8];
data local_90 [16];
Expression local_80 [8];
long *local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
data local_40 [16];
local_d8 = (int8 *)operator_new(0x30);
local_d8[1] = 0x100000001;
*local_d8 = &PTR___Sp_counted_base_00264440;
local_e0 = local_d8 + 2;
local_d8[2] = 0;
local_d8[3] = 0;
local_d8[4] = 0;
Value::Value((Value *)this,(shared_ptr *)&local_e0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_d8);
puVar4 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar4 != puVar2) {
do {
if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ea02d to 001ea03b has its CatchHandler @ 001ea072 */
std::runtime_error::runtime_error(this_00,"Dict key is null");
LAB_001ea05a:
/* try { // try from 001ea05a to 001ea06f has its CatchHandler @ 001ea09f */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80);
}
if (puVar4[2] == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ea04b to 001ea059 has its CatchHandler @ 001ea070 */
std::runtime_error::runtime_error(this_00,"Dict value is null");
goto LAB_001ea05a;
}
/* try { // try from 001e9ef2 to 001e9efc has its CatchHandler @ 001ea07f */
Expression::evaluate(local_80,(shared_ptr *)*puVar4);
/* try { // try from 001e9f01 to 001e9f0b has its CatchHandler @ 001ea081 */
Expression::evaluate(local_d0,(shared_ptr *)puVar4[2]);
/* try { // try from 001e9f0c to 001e9f1a has its CatchHandler @ 001ea086 */
Value::set((Value *)this,(Value *)local_80,(Value *)local_d0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_98);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b8);
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_00265f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00265f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
puVar4 = puVar4 + 4;
} while (puVar4 != puVar2);
}
return this;
}
|
|
14,039
|
array_append_string_unique
|
eloqsql/mysys/mf_arr_appstr.c
|
my_bool array_append_string_unique(const char *str,
const char **array, size_t size)
{
const char **p;
/* end points at the terminating NULL element */
const char **end= array + size - 1;
DBUG_ASSERT(*end == NULL);
for (p= array; *p; ++p)
{
if (strcmp(*p, str) == 0)
break;
}
if (p >= end)
return TRUE; /* Array is full */
DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0);
while (*(p + 1))
{
*p= *(p + 1);
++p;
}
DBUG_ASSERT(p < end);
*p= str;
return FALSE; /* Success */
}
|
O3
|
c
|
array_append_string_unique:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rsi,%rdx,8), %r15
addq $-0x8, %r15
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x6565e
movq %r14, %rsi
callq 0x28560
testl %eax, %eax
je 0x6565e
movq 0x8(%rbx), %rdi
addq $0x8, %rbx
jmp 0x65643
movb $0x1, %al
cmpq %r15, %rbx
jae 0x65680
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x6567b
movq %rax, (%rbx)
movq 0x10(%rbx), %rax
addq $0x8, %rbx
jmp 0x65669
movq %r14, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
array_append_string_unique:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea r15, [rsi+rdx*8]
add r15, 0FFFFFFFFFFFFFFF8h
mov rdi, [rsi]
loc_65643:
test rdi, rdi
jz short loc_6565E
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_6565E
mov rdi, [rbx+8]
add rbx, 8
jmp short loc_65643
loc_6565E:
mov al, 1
cmp rbx, r15
jnb short loc_65680
mov rax, [rbx+8]
loc_65669:
test rax, rax
jz short loc_6567B
mov [rbx], rax
mov rax, [rbx+10h]
add rbx, 8
jmp short loc_65669
loc_6567B:
mov [rbx], r14
xor eax, eax
loc_65680:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
char array_append_string_unique(long long a1, _QWORD *a2, long long a3)
{
_QWORD *v3; // rbx
unsigned long long v5; // r15
long long v6; // rdi
char result; // al
long long v8; // rax
v3 = a2;
v5 = (unsigned long long)&a2[a3 - 1];
v6 = *a2;
while ( v6 && (unsigned int)strcmp(v6, a1) )
{
v6 = v3[1];
++v3;
}
result = 1;
if ( (unsigned long long)v3 < v5 )
{
v8 = v3[1];
while ( v8 )
{
*v3 = v8;
v8 = v3[2];
++v3;
}
*v3 = a1;
return 0;
}
return result;
}
|
array_append_string_unique:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSI + RDX*0x8]
ADD R15,-0x8
MOV RDI,qword ptr [RSI]
LAB_00165643:
TEST RDI,RDI
JZ 0x0016565e
MOV RSI,R14
CALL 0x00128560
TEST EAX,EAX
JZ 0x0016565e
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x8
JMP 0x00165643
LAB_0016565e:
MOV AL,0x1
CMP RBX,R15
JNC 0x00165680
MOV RAX,qword ptr [RBX + 0x8]
LAB_00165669:
TEST RAX,RAX
JZ 0x0016567b
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RBX + 0x10]
ADD RBX,0x8
JMP 0x00165669
LAB_0016567b:
MOV qword ptr [RBX],R14
XOR EAX,EAX
LAB_00165680:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 array_append_string_unique(char *param_1,long *param_2,long param_3)
{
long *plVar1;
int iVar2;
int8 uVar3;
long lVar4;
char *__s1;
long *plVar5;
plVar5 = param_2 + param_3 + -1;
__s1 = (char *)*param_2;
while (__s1 != (char *)0x0) {
iVar2 = strcmp(__s1,param_1);
if (iVar2 == 0) break;
plVar1 = param_2 + 1;
param_2 = param_2 + 1;
__s1 = (char *)*plVar1;
}
uVar3 = 1;
if (param_2 < plVar5) {
lVar4 = param_2[1];
while (lVar4 != 0) {
*param_2 = lVar4;
plVar5 = param_2 + 2;
param_2 = param_2 + 1;
lVar4 = *plVar5;
}
*param_2 = (long)param_1;
uVar3 = 0;
}
return uVar3;
}
|
|
14,040
|
mi_delete_static_record
|
eloqsql/storage/myisam/mi_statrec.c
|
int _mi_delete_static_record(MI_INFO *info)
{
uchar temp[9]; /* 1+sizeof(uint32) */
info->state->del++;
info->state->empty+=info->s->base.pack_reclength;
temp[0]= '\0'; /* Mark that record is deleted */
_mi_dpointer(info,temp+1,info->s->state.dellink);
info->s->state.dellink = info->lastpos;
info->rec_cache.seek_not_done=1;
return (info->s->file_write(info,(uchar*) temp, 1+info->s->rec_reflength,
info->lastpos, MYF(MY_NABP)) != 0);
}
|
O0
|
c
|
mi_delete_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
incq %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq 0x148(%rcx), %rdx
movq 0x10(%rax), %rcx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movb $0x0, -0x11(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0x58(%rax), %rdx
callq 0xc0850
movq -0x20(%rbp), %rcx
movq (%rcx), %rax
movq 0x170(%rcx), %rcx
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x20(%rbp), %rdi
movq (%rdi), %rdx
movq 0x170(%rdi), %rcx
movq 0x2e8(%rdx), %rax
movl 0x338(%rdx), %edx
incl %edx
leaq -0x11(%rbp), %rsi
movl $0x4, %r8d
callq *%rax
testq %rax, %rax
setne %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc3ec1
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
|
_mi_delete_static_record:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+8]
inc rcx
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rax+8]
mov rdx, [rcx+148h]
mov rcx, [rax+10h]
add rcx, rdx
mov [rax+10h], rcx
mov [rbp+var_11], 0
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov rax, [rdi]
mov rdx, [rax+58h]
call _mi_dpointer
mov rcx, [rbp+var_20]
mov rax, [rcx]
mov rcx, [rcx+170h]
mov [rax+58h], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax+300h], 1
mov rdi, [rbp+var_20]
mov rdx, [rdi]
mov rcx, [rdi+170h]
mov rax, [rdx+2E8h]
mov edx, [rdx+338h]
inc edx
lea rsi, [rbp+var_11]
mov r8d, 4
call rax
test rax, rax
setnz al
movzx eax, al
mov [rbp+var_24], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C3EC1
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
loc_C3EC1:
call ___stack_chk_fail
|
_BOOL8 mi_delete_static_record(_QWORD *a1)
{
char v2; // [rsp+1Fh] [rbp-11h] BYREF
_BYTE v3[8]; // [rsp+20h] [rbp-10h] BYREF
unsigned long long v4; // [rsp+28h] [rbp-8h]
v4 = __readfsqword(0x28u);
++*(_QWORD *)(a1[1] + 8LL);
*(_QWORD *)(a1[1] + 16LL) += *(_QWORD *)(*a1 + 328LL);
v2 = 0;
mi_dpointer((long long)a1, v3, *(_QWORD *)(*a1 + 88LL));
*(_QWORD *)(*a1 + 88LL) = a1[46];
*((_DWORD *)a1 + 192) = 1;
return (*(long long ( **)(_QWORD *, char *, _QWORD, _QWORD, long long))(*a1 + 744LL))(
a1,
&v2,
(unsigned int)(*(_DWORD *)(*a1 + 824LL) + 1),
a1[46],
4LL) != 0;
}
|
_mi_delete_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
INC RCX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RCX + 0x148]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x11],0x0
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0x58]
CALL 0x001c0850
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x170]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x300],0x1
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x170]
MOV RAX,qword ptr [RDX + 0x2e8]
MOV EDX,dword ptr [RDX + 0x338]
INC EDX
LEA RSI,[RBP + -0x11]
MOV R8D,0x4
CALL RAX
TEST RAX,RAX
SETNZ AL
MOVZX EAX,AL
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c3ec1
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
LAB_001c3ec1:
CALL 0x0012a250
|
bool _mi_delete_static_record(long *param_1)
{
long lVar1;
long in_FS_OFFSET;
int1 local_19;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + *(long *)(*param_1 + 0x148);
local_19 = 0;
_mi_dpointer(param_1,local_18,*(int8 *)(*param_1 + 0x58));
*(long *)(*param_1 + 0x58) = param_1[0x2e];
*(int4 *)(param_1 + 0x60) = 1;
lVar1 = (**(code **)(*param_1 + 0x2e8))
(param_1,&local_19,*(int *)(*param_1 + 0x338) + 1,param_1[0x2e],4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,041
|
vidmodeFromModeInfo
|
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_monitor.c
|
static GLFWvidmode vidmodeFromModeInfo(const XRRModeInfo* mi,
const XRRCrtcInfo* ci)
{
GLFWvidmode mode;
if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)
{
mode.width = mi->height;
mode.height = mi->width;
}
else
{
mode.width = mi->width;
mode.height = mi->height;
}
mode.refreshRate = calculateRefreshRate(mi);
_glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),
&mode.redBits, &mode.greenBits, &mode.blueBits);
return mode;
}
|
O3
|
c
|
vidmodeFromModeInfo:
pushq %rbx
movq %rdi, %rbx
cmpw $0x8, %dx
je 0x20df9
movzwl %dx, %eax
cmpl $0x2, %eax
jne 0x20e04
leaq 0xc(%rsi), %rax
movl $0x8, %ecx
jmp 0x20e0d
leaq 0x8(%rsi), %rax
movl $0xc, %ecx
movl (%rax), %eax
movl %eax, (%rbx)
movl (%rsi,%rcx), %eax
movl %eax, 0x4(%rbx)
movl 0x20(%rsi), %eax
xorl %edx, %edx
testl %eax, %eax
je 0x20e69
movl 0x30(%rsi), %ecx
testl %ecx, %ecx
je 0x20e69
movsd 0x10(%rsi), %xmm1
unpcklps 0x61e5d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x61e65(%rip), %xmm1 # 0x82ca0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movl %ecx, %eax
cvtsi2sd %rax, %xmm2
mulsd %xmm1, %xmm2
divsd %xmm2, %xmm0
callq 0xc380
cvttsd2si %xmm0, %edx
movl %edx, 0x14(%rbx)
leaq 0x877c5(%rip), %rax # 0xa8638
movq 0x1fec0(%rax), %rcx
movq 0xe8(%rcx), %rcx
movslq 0x1fec8(%rax), %rax
shlq $0x7, %rax
movl 0x38(%rcx,%rax), %edi
leaq 0x8(%rbx), %rsi
leaq 0xc(%rbx), %rdx
addq $0x10, %rbx
movq %rbx, %rcx
popq %rbx
jmp 0x1bdeb
|
vidmodeFromModeInfo:
push rbx
mov rbx, rdi
cmp dx, 8
jz short loc_20DF9
movzx eax, dx
cmp eax, 2
jnz short loc_20E04
loc_20DF9:
lea rax, [rsi+0Ch]
mov ecx, 8
jmp short loc_20E0D
loc_20E04:
lea rax, [rsi+8]
mov ecx, 0Ch
loc_20E0D:
mov eax, [rax]
mov [rbx], eax
mov eax, [rsi+rcx]
mov [rbx+4], eax
mov eax, [rsi+20h]
xor edx, edx
test eax, eax
jz short loc_20E69
mov ecx, [rsi+30h]
test ecx, ecx
jz short loc_20E69
movsd xmm1, qword ptr [rsi+10h]
unpcklps xmm1, cs:xmmword_82C90
subpd xmm1, cs:xmmword_82CA0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
mov eax, eax
xorps xmm1, xmm1
cvtsi2sd xmm1, rax
mov eax, ecx
cvtsi2sd xmm2, rax
mulsd xmm2, xmm1
divsd xmm0, xmm2
call _round
cvttsd2si edx, xmm0
loc_20E69:
mov [rbx+14h], edx
lea rax, _glfw
mov rcx, [rax+1FEC0h]
mov rcx, [rcx+0E8h]
movsxd rax, dword ptr [rax+1FEC8h]
shl rax, 7
mov edi, [rcx+rax+38h]
lea rsi, [rbx+8]
lea rdx, [rbx+0Ch]
add rbx, 10h
mov rcx, rbx
pop rbx
jmp _glfwSplitBPP
|
long long vidmodeFromModeInfo(int *a1, long long a2, __int16 a3)
{
int *v3; // rax
long long v4; // rcx
int v5; // eax
int v6; // edx
int v7; // ecx
__m128d v8; // xmm1
if ( a3 == 8 || a3 == 2 )
{
v3 = (int *)(a2 + 12);
v4 = 8LL;
}
else
{
v3 = (int *)(a2 + 8);
v4 = 12LL;
}
*a1 = *v3;
a1[1] = *(_DWORD *)(a2 + v4);
v5 = *(_DWORD *)(a2 + 32);
v6 = 0;
if ( v5 )
{
v7 = *(_DWORD *)(a2 + 48);
if ( v7 )
{
v8 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*(unsigned long long *)(a2 + 16), (__m128)xmmword_82C90),
(__m128d)xmmword_82CA0);
v6 = (int)round(a1, a2, 0LL, (_mm_unpackhi_pd(v8, v8).m128d_f64[0] + v8.m128d_f64[0]) / ((double)v7 * (double)v5));
}
}
a1[5] = v6;
return glfwSplitBPP(
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)&glfw[32688] + 232LL) + ((long long)(int)glfw[32690] << 7) + 56),
a1 + 2,
a1 + 3,
a1 + 4);
}
|
vidmodeFromModeInfo:
PUSH RBX
MOV RBX,RDI
CMP DX,0x8
JZ 0x00120df9
MOVZX EAX,DX
CMP EAX,0x2
JNZ 0x00120e04
LAB_00120df9:
LEA RAX,[RSI + 0xc]
MOV ECX,0x8
JMP 0x00120e0d
LAB_00120e04:
LEA RAX,[RSI + 0x8]
MOV ECX,0xc
LAB_00120e0d:
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBX],EAX
MOV EAX,dword ptr [RSI + RCX*0x1]
MOV dword ptr [RBX + 0x4],EAX
MOV EAX,dword ptr [RSI + 0x20]
XOR EDX,EDX
TEST EAX,EAX
JZ 0x00120e69
MOV ECX,dword ptr [RSI + 0x30]
TEST ECX,ECX
JZ 0x00120e69
MOVSD XMM1,qword ptr [RSI + 0x10]
UNPCKLPS XMM1,xmmword ptr [0x00182c90]
SUBPD XMM1,xmmword ptr [0x00182ca0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
MOV EAX,EAX
XORPS XMM1,XMM1
CVTSI2SD XMM1,RAX
MOV EAX,ECX
CVTSI2SD XMM2,RAX
MULSD XMM2,XMM1
DIVSD XMM0,XMM2
CALL 0x0010c380
CVTTSD2SI EDX,XMM0
LAB_00120e69:
MOV dword ptr [RBX + 0x14],EDX
LEA RAX,[0x1a8638]
MOV RCX,qword ptr [RAX + 0x1fec0]
MOV RCX,qword ptr [RCX + 0xe8]
MOVSXD RAX,dword ptr [RAX + 0x1fec8]
SHL RAX,0x7
MOV EDI,dword ptr [RCX + RAX*0x1 + 0x38]
LEA RSI,[RBX + 0x8]
LEA RDX,[RBX + 0xc]
ADD RBX,0x10
MOV RCX,RBX
POP RBX
JMP 0x0011bdeb
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void vidmodeFromModeInfo(int4 *param_1,long param_2,short param_3)
{
int4 *puVar1;
long lVar2;
int iVar3;
double dVar4;
if ((param_3 == 8) || (param_3 == 2)) {
puVar1 = (int4 *)(param_2 + 0xc);
lVar2 = 8;
}
else {
puVar1 = (int4 *)(param_2 + 8);
lVar2 = 0xc;
}
*param_1 = *puVar1;
param_1[1] = *(int4 *)(param_2 + lVar2);
iVar3 = 0;
if ((*(uint *)(param_2 + 0x20) != 0) && (iVar3 = 0, *(uint *)(param_2 + 0x30) != 0)) {
dVar4 = round((((double)CONCAT44(DAT_00182c90._4_4_,
(int)((ulong)*(int8 *)(param_2 + 0x10) >> 0x20)) -
_UNK_00182ca8) +
((double)CONCAT44((int4)DAT_00182c90,(int)*(int8 *)(param_2 + 0x10)) -
_DAT_00182ca0)) /
((double)*(uint *)(param_2 + 0x30) * (double)*(uint *)(param_2 + 0x20)));
iVar3 = (int)dVar4;
}
param_1[5] = iVar3;
_glfwSplitBPP(*(int4 *)(*(long *)(DAT_001c84f8 + 0xe8) + 0x38 + (long)DAT_001c8500 * 0x80),
param_1 + 2,param_1 + 3,param_1 + 4);
return;
}
|
|
14,042
|
parseStyle(std::vector<SEMANTICANALYZER::Property, std::allocator<SEMANTICANALYZER::Property>>&, Style const&)
|
11AgReS1SoR11[P]Graph/Common/Translator/src/Translator.cpp
|
Style parseStyle(std::vector<SEMANTICANALYZER::Property>& _props, Style const& default_style) {
Style _style = default_style;
for (auto& _prop : _props) {
if (_prop.key == "color") {
if (_prop.value == "red") { _style.color = color_e::RED; }
else if (_prop.value == "green") { _style.color = color_e::GREEN; }
else if (_prop.value == "blue") { _style.color = color_e::BLUE; }
else if (_prop.value == "black") { _style.color = color_e::BLACK; }
else if (_prop.value == "white") { _style.color = color_e::WHITE; }
else if (_prop.value == "yellow") { _style.color = color_e::YELLOW; }
else if (_prop.value == "purple") { _style.color = color_e::PURPLE; }
else if (_prop.value == "none") { _style.color = color_e::NONE; }
}
else if (_prop.key == "border") {
_style.border = std::stod(_prop.value);
}
else if (_prop.key == "size_text") {_style.textSize = std::stod(_prop.value);}
}
return _style;
}
|
O3
|
cpp
|
parseStyle(std::vector<SEMANTICANALYZER::Property, std::allocator<SEMANTICANALYZER::Property>>&, Style const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rax
movq %rax, %r15
shrq $0x20, %r15
movl 0x8(%rsi), %r14d
movq (%rdi), %rbx
movq 0x8(%rdi), %rbp
cmpq %rbp, %rbx
movq %rax, 0x10(%rsp)
je 0x7c95
addq $0x20, %rbx
leaq 0x3640(%rip), %r12 # 0xb0d8
movl %eax, 0x4(%rsp)
leaq -0x20(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x60f0
testl %eax, %eax
je 0x7b29
movq %r13, %rdi
leaq 0x3625(%rip), %rsi # 0xb0de
callq 0x60f0
testl %eax, %eax
je 0x7beb
movq %r13, %rdi
leaq 0x3619(%rip), %rsi # 0xb0e9
callq 0x60f0
testl %eax, %eax
jne 0x7c7f
movq (%rbx), %r12
callq 0x6050
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6290
cmpq %r12, 0x8(%rsp)
je 0x7cd1
movl (%r14), %eax
testl %eax, %eax
je 0x7c4e
cmpl $0x22, %eax
leaq 0x35ba(%rip), %r12 # 0xb0d8
jne 0x7c58
jmp 0x7ce9
movq %rbx, %rdi
leaq 0x35ee(%rip), %rsi # 0xb121
callq 0x60f0
testl %eax, %eax
je 0x7c30
movq %rbx, %rdi
leaq 0x35db(%rip), %rsi # 0xb125
callq 0x60f0
testl %eax, %eax
je 0x7c48
movq %rbx, %rdi
leaq 0x35ca(%rip), %rsi # 0xb12b
callq 0x60f0
testl %eax, %eax
je 0x7c5f
movq %rbx, %rdi
leaq 0x35b8(%rip), %rsi # 0xb130
callq 0x60f0
testl %eax, %eax
je 0x7c65
movq %rbx, %rdi
leaq 0x35a7(%rip), %rsi # 0xb136
callq 0x60f0
testl %eax, %eax
je 0x7c6b
movq %rbx, %rdi
leaq 0x3596(%rip), %rsi # 0xb13c
callq 0x60f0
testl %eax, %eax
je 0x7c71
movq %rbx, %rdi
leaq 0x3586(%rip), %rsi # 0xb143
callq 0x60f0
testl %eax, %eax
je 0x7c77
movq %rbx, %rdi
leaq 0x3576(%rip), %rsi # 0xb14a
callq 0x60f0
testl %eax, %eax
movl 0x4(%rsp), %ecx
cmovel %eax, %ecx
movl %ecx, 0x4(%rsp)
jmp 0x7c7f
movq (%rbx), %r12
callq 0x6050
movq %rax, %r13
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6290
cmpq %r12, 0x8(%rsp)
je 0x7cc5
movl (%r13), %eax
testl %eax, %eax
je 0x7c36
cmpl $0x22, %eax
leaq 0x34af(%rip), %r12 # 0xb0d8
jne 0x7c41
jmp 0x7cdd
movw $0x1, %ax
jmp 0x7c7b
movl %r15d, (%r13)
leaq 0x3497(%rip), %r12 # 0xb0d8
cvttsd2si %xmm0, %r15
jmp 0x7c7f
movw $0x2, %ax
jmp 0x7c7b
movl %r13d, (%r14)
leaq 0x3480(%rip), %r12 # 0xb0d8
cvttsd2si %xmm0, %r14
jmp 0x7c7f
movw $0x3, %ax
jmp 0x7c7b
movw $0x4, %ax
jmp 0x7c7b
movw $0x5, %ax
jmp 0x7c7b
movw $0x6, %ax
jmp 0x7c7b
movw $0x7, %ax
movl %eax, 0x4(%rsp)
leaq 0x40(%rbx), %rax
addq $0x20, %rbx
cmpq %rbp, %rbx
movq %rax, %rbx
jne 0x7a9c
jmp 0x7c99
movl %eax, 0x4(%rsp)
shlq $0x20, %r15
movq 0x10(%rsp), %rcx
andl $0xffff0000, %ecx # imm = 0xFFFF0000
orq %r15, %rcx
movzwl 0x4(%rsp), %eax
orq %rcx, %rax
movl %r14d, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x350c(%rip), %rdi # 0xb1d8
callq 0x6220
leaq 0x3500(%rip), %rdi # 0xb1d8
callq 0x6220
leaq 0x34f4(%rip), %rdi # 0xb1d8
callq 0x6520
leaq 0x34e8(%rip), %rdi # 0xb1d8
callq 0x6520
cmpl $0x0, (%r14)
jne 0x7d0b
movl %r13d, (%r14)
jmp 0x7d0b
cmpl $0x0, (%r13)
jne 0x7d0b
movl %r15d, (%r13)
movq %rax, %rdi
callq 0x66c0
|
_Z10parseStyleRSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EERK5Style:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rax, [rsi]
mov r15, rax
shr r15, 20h
mov r14d, [rsi+8]
mov rbx, [rdi]
mov rbp, [rdi+8]
cmp rbx, rbp
mov [rsp+48h+var_38], rax
jz loc_7C95
add rbx, 20h ; ' '
lea r12, aColor; "color"
mov [rsp+48h+var_44], eax
loc_7A9C:
lea r13, [rbx-20h]
mov rdi, r13
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_7B29
mov rdi, r13
lea rsi, aBorder; "border"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7BEB
mov rdi, r13
lea rsi, aSizeText; "size_text"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_7C7F
mov r12, [rbx]
call ___errno_location
mov r14, rax
mov r13d, [rax]
mov dword ptr [rax], 0
mov rdi, r12
lea rsi, [rsp+48h+var_40]
call _strtod
cmp [rsp+48h+var_40], r12
jz loc_7CD1
mov eax, [r14]
test eax, eax
jz loc_7C4E
cmp eax, 22h ; '"'
lea r12, aColor; "color"
jnz loc_7C58
jmp loc_7CE9
loc_7B29:
mov rdi, rbx
lea rsi, aRed; "red"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C30
mov rdi, rbx
lea rsi, aGreen; "green"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C48
mov rdi, rbx
lea rsi, aBlue; "blue"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C5F
mov rdi, rbx
lea rsi, aBlack; "black"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C65
mov rdi, rbx
lea rsi, aWhite; "white"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C6B
mov rdi, rbx
lea rsi, aYellow; "yellow"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C71
mov rdi, rbx
lea rsi, aPurple; "purple"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_7C77
mov rdi, rbx
lea rsi, aNone; "none"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
mov ecx, [rsp+48h+var_44]
cmovz ecx, eax
mov [rsp+48h+var_44], ecx
jmp loc_7C7F
loc_7BEB:
mov r12, [rbx]
call ___errno_location
mov r13, rax
mov r15d, [rax]
mov dword ptr [rax], 0
mov rdi, r12
lea rsi, [rsp+48h+var_40]
call _strtod
cmp [rsp+48h+var_40], r12
jz loc_7CC5
mov eax, [r13+0]
test eax, eax
jz short loc_7C36
cmp eax, 22h ; '"'
lea r12, aColor; "color"
jnz short loc_7C41
jmp loc_7CDD
loc_7C30:
mov ax, 1
jmp short loc_7C7B
loc_7C36:
mov [r13+0], r15d
lea r12, aColor; "color"
loc_7C41:
cvttsd2si r15, xmm0
jmp short loc_7C7F
loc_7C48:
mov ax, 2
jmp short loc_7C7B
loc_7C4E:
mov [r14], r13d
lea r12, aColor; "color"
loc_7C58:
cvttsd2si r14, xmm0
jmp short loc_7C7F
loc_7C5F:
mov ax, 3
jmp short loc_7C7B
loc_7C65:
mov ax, 4
jmp short loc_7C7B
loc_7C6B:
mov ax, 5
jmp short loc_7C7B
loc_7C71:
mov ax, 6
jmp short loc_7C7B
loc_7C77:
mov ax, 7
loc_7C7B:
mov [rsp+48h+var_44], eax
loc_7C7F:
lea rax, [rbx+40h]
add rbx, 20h ; ' '
cmp rbx, rbp
mov rbx, rax
jnz loc_7A9C
jmp short loc_7C99
loc_7C95:
mov [rsp+48h+var_44], eax
loc_7C99:
shl r15, 20h
mov rcx, [rsp+48h+var_38]
and ecx, 0FFFF0000h
or rcx, r15
movzx eax, word ptr [rsp+48h+var_44]
or rax, rcx
mov edx, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7CC5:
lea rdi, aStod; "stod"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_7CD1:
lea rdi, aStod; "stod"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_7CDD:
lea rdi, aStod; "stod"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_7CE9:
lea rdi, aStod; "stod"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
cmp dword ptr [r14], 0
jnz short loc_7D0B
mov [r14], r13d
jmp short loc_7D0B
cmp dword ptr [r13+0], 0
jnz short loc_7D0B
mov [r13+0], r15d
loc_7D0B:
mov rdi, rax
call __Unwind_Resume
|
long long parseStyle(long long *a1, long long *a2, double a3)
{
long long v3; // rax
unsigned long long v4; // r15
long long v5; // rbx
long long *v6; // rbp
bool v7; // zf
long long *v8; // rbx
long long v9; // r12
int *v10; // r14
int v11; // r13d
int v12; // eax
int v13; // eax
int v14; // ecx
long long v15; // r12
int *v16; // r13
int v17; // r15d
int v19; // [rsp+4h] [rbp-44h]
long long v20; // [rsp+8h] [rbp-40h] BYREF
long long v21; // [rsp+10h] [rbp-38h]
v3 = *a2;
v4 = HIDWORD(*a2);
v5 = *a1;
v6 = (long long *)a1[1];
v7 = *a1 == (_QWORD)v6;
v21 = *a2;
if ( !v7 )
{
v8 = (long long *)(v5 + 32);
v19 = v3;
while ( 1 )
{
if ( (unsigned int)std::string::compare(v8 - 4, "color") )
{
if ( !(unsigned int)std::string::compare(v8 - 4, "border") )
{
v15 = *v8;
v16 = (int *)__errno_location();
v17 = *v16;
*v16 = 0;
strtod(v15, &v20);
if ( v20 == v15 )
{
std::__throw_invalid_argument("stod");
LABEL_41:
std::__throw_invalid_argument("stod");
LABEL_42:
std::__throw_out_of_range("stod");
}
if ( *v16 )
{
if ( *v16 == 34 )
goto LABEL_42;
}
else
{
*v16 = v17;
}
v4 = (unsigned int)(int)a3;
}
else if ( !(unsigned int)std::string::compare(v8 - 4, "size_text") )
{
v9 = *v8;
v10 = (int *)__errno_location();
v11 = *v10;
*v10 = 0;
strtod(v9, &v20);
if ( v20 == v9 )
goto LABEL_41;
if ( *v10 )
{
if ( *v10 == 34 )
std::__throw_out_of_range("stod");
}
else
{
*v10 = v11;
}
}
goto LABEL_36;
}
v12 = std::string::compare(v8, "red");
if ( v12 )
{
v12 = std::string::compare(v8, "green");
if ( v12 )
{
v12 = std::string::compare(v8, "blue");
if ( v12 )
{
v12 = std::string::compare(v8, "black");
if ( v12 )
{
v12 = std::string::compare(v8, "white");
if ( v12 )
{
v12 = std::string::compare(v8, "yellow");
if ( v12 )
{
v12 = std::string::compare(v8, "purple");
if ( v12 )
{
v13 = std::string::compare(v8, "none");
v14 = v19;
if ( !v13 )
v14 = 0;
v19 = v14;
goto LABEL_36;
}
LOWORD(v12) = 7;
}
else
{
LOWORD(v12) = 6;
}
}
else
{
LOWORD(v12) = 5;
}
}
else
{
LOWORD(v12) = 4;
}
}
else
{
LOWORD(v12) = 3;
}
}
else
{
LOWORD(v12) = 2;
}
}
else
{
LOWORD(v12) = 1;
}
v19 = v12;
LABEL_36:
v7 = v8 + 4 == v6;
v8 += 8;
if ( v7 )
return (v4 << 32) | (unsigned int)v21 & 0xFFFF0000 | (unsigned __int16)v19;
}
}
LOWORD(v19) = v3;
return (v4 << 32) | (unsigned int)v21 & 0xFFFF0000 | (unsigned __int16)v19;
}
|
parseStyle:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr [RSI]
MOV R15,RAX
SHR R15,0x20
MOV R14D,dword ptr [RSI + 0x8]
MOV RBX,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP RBX,RBP
MOV qword ptr [RSP + 0x10],RAX
JZ 0x00107c95
ADD RBX,0x20
LEA R12,[0x10b0d8]
MOV dword ptr [RSP + 0x4],EAX
LAB_00107a9c:
LEA R13,[RBX + -0x20]
MOV RDI,R13
MOV RSI,R12
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107b29
MOV RDI,R13
LEA RSI,[0x10b0de]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107beb
MOV RDI,R13
LEA RSI,[0x10b0e9]
CALL 0x001060f0
TEST EAX,EAX
JNZ 0x00107c7f
MOV R12,qword ptr [RBX]
CALL 0x00106050
MOV R14,RAX
MOV R13D,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RDI,R12
LEA RSI,[RSP + 0x8]
CALL 0x00106290
CMP qword ptr [RSP + 0x8],R12
JZ 0x00107cd1
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x00107c4e
CMP EAX,0x22
LEA R12,[0x10b0d8]
JNZ 0x00107c58
JMP 0x00107ce9
LAB_00107b29:
MOV RDI,RBX
LEA RSI,[0x10b121]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c30
MOV RDI,RBX
LEA RSI,[0x10b125]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c48
MOV RDI,RBX
LEA RSI,[0x10b12b]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c5f
MOV RDI,RBX
LEA RSI,[0x10b130]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c65
MOV RDI,RBX
LEA RSI,[0x10b136]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c6b
MOV RDI,RBX
LEA RSI,[0x10b13c]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c71
MOV RDI,RBX
LEA RSI,[0x10b143]
CALL 0x001060f0
TEST EAX,EAX
JZ 0x00107c77
MOV RDI,RBX
LEA RSI,[0x10b14a]
CALL 0x001060f0
TEST EAX,EAX
MOV ECX,dword ptr [RSP + 0x4]
CMOVZ ECX,EAX
MOV dword ptr [RSP + 0x4],ECX
JMP 0x00107c7f
LAB_00107beb:
MOV R12,qword ptr [RBX]
CALL 0x00106050
MOV R13,RAX
MOV R15D,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RDI,R12
LEA RSI,[RSP + 0x8]
CALL 0x00106290
CMP qword ptr [RSP + 0x8],R12
JZ 0x00107cc5
MOV EAX,dword ptr [R13]
TEST EAX,EAX
JZ 0x00107c36
CMP EAX,0x22
LEA R12,[0x10b0d8]
JNZ 0x00107c41
JMP 0x00107cdd
LAB_00107c30:
MOV AX,0x1
JMP 0x00107c7b
LAB_00107c36:
MOV dword ptr [R13],R15D
LEA R12,[0x10b0d8]
LAB_00107c41:
CVTTSD2SI R15,XMM0
JMP 0x00107c7f
LAB_00107c48:
MOV AX,0x2
JMP 0x00107c7b
LAB_00107c4e:
MOV dword ptr [R14],R13D
LEA R12,[0x10b0d8]
LAB_00107c58:
CVTTSD2SI R14,XMM0
JMP 0x00107c7f
LAB_00107c5f:
MOV AX,0x3
JMP 0x00107c7b
LAB_00107c65:
MOV AX,0x4
JMP 0x00107c7b
LAB_00107c6b:
MOV AX,0x5
JMP 0x00107c7b
LAB_00107c71:
MOV AX,0x6
JMP 0x00107c7b
LAB_00107c77:
MOV AX,0x7
LAB_00107c7b:
MOV dword ptr [RSP + 0x4],EAX
LAB_00107c7f:
LEA RAX,[RBX + 0x40]
ADD RBX,0x20
CMP RBX,RBP
MOV RBX,RAX
JNZ 0x00107a9c
JMP 0x00107c99
LAB_00107c95:
MOV dword ptr [RSP + 0x4],EAX
LAB_00107c99:
SHL R15,0x20
MOV RCX,qword ptr [RSP + 0x10]
AND ECX,0xffff0000
OR RCX,R15
MOVZX EAX,word ptr [RSP + 0x4]
OR RAX,RCX
MOV EDX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00107cc5:
LEA RDI,[0x10b1d8]
CALL 0x00106220
LAB_00107cd1:
LEA RDI,[0x10b1d8]
CALL 0x00106220
LAB_00107cdd:
LEA RDI,[0x10b1d8]
CALL 0x00106520
LAB_00107ce9:
LEA RDI,[0x10b1d8]
CALL 0x00106520
LAB_00107cf5:
CMP dword ptr [R14],0x0
JNZ 0x00107d0b
MOV dword ptr [R14],R13D
JMP 0x00107d0b
LAB_00107d0b:
MOV RDI,RAX
CALL 0x001066c0
|
/* parseStyle(std::vector<SEMANTICANALYZER::Property, std::allocator<SEMANTICANALYZER::Property> >&,
Style const&) */
int1 [16] parseStyle(vector *param_1,Style *param_2)
{
char *pcVar1;
ushort uVar2;
int iVar3;
uint *puVar4;
int *piVar5;
int8 uVar6;
char *pcVar7;
char *pcVar8;
uint uVar9;
ulong uVar10;
double dVar11;
int1 auVar12 [16];
int4 local_44;
char *local_40;
ulong local_38;
local_38 = *(ulong *)param_2;
uVar10 = local_38 >> 0x20;
puVar4 = (uint *)(ulong)*(uint *)(param_2 + 8);
pcVar1 = *(char **)(param_1 + 8);
local_44 = (int4)local_38;
uVar2 = (ushort)local_38;
if (*(char **)param_1 != pcVar1) {
pcVar7 = *(char **)param_1 + 0x20;
do {
pcVar8 = pcVar7 + -0x20;
iVar3 = std::__cxx11::string::compare(pcVar8);
if (iVar3 == 0) {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 1;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 2;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 3;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 4;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 5;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 6;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 7;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar7);
if (iVar3 == 0) {
local_44 = 0;
}
}
}
}
}
}
}
}
}
else {
iVar3 = std::__cxx11::string::compare(pcVar8);
if (iVar3 == 0) {
pcVar8 = *(char **)pcVar7;
piVar5 = __errno_location();
iVar3 = *piVar5;
*piVar5 = 0;
dVar11 = strtod(pcVar8,&local_40);
if (local_40 == pcVar8) {
/* try { // try from 00107cc5 to 00107cd0 has its CatchHandler @ 00107d00 */
std::__throw_invalid_argument("stod");
LAB_00107cd1:
/* try { // try from 00107cd1 to 00107cdc has its CatchHandler @ 00107cf5 */
std::__throw_invalid_argument("stod");
LAB_00107cdd:
/* try { // try from 00107cdd to 00107ce8 has its CatchHandler @ 00107d00 */
uVar9 = (uint)piVar5;
std::__throw_out_of_range("stod");
LAB_00107ce9:
/* try { // try from 00107ce9 to 00107cf4 has its CatchHandler @ 00107cf5 */
uVar6 = std::__throw_out_of_range("stod");
/* catch() { ... } // from try @ 00107cd1 with catch @ 00107cf5
catch() { ... } // from try @ 00107ce9 with catch @ 00107cf5 */
if (*puVar4 == 0) {
*puVar4 = uVar9;
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar6);
}
if (*piVar5 == 0) {
*piVar5 = iVar3;
}
else if (*piVar5 == 0x22) goto LAB_00107cdd;
uVar10 = (ulong)dVar11;
}
else {
iVar3 = std::__cxx11::string::compare(pcVar8);
if (iVar3 == 0) {
pcVar8 = *(char **)pcVar7;
puVar4 = (uint *)__errno_location();
uVar9 = *puVar4;
piVar5 = (int *)(ulong)uVar9;
*puVar4 = 0;
dVar11 = strtod(pcVar8,&local_40);
if (local_40 == pcVar8) goto LAB_00107cd1;
if (*puVar4 == 0) {
*puVar4 = uVar9;
}
else if (*puVar4 == 0x22) goto LAB_00107ce9;
puVar4 = (uint *)(long)dVar11;
}
}
}
pcVar8 = pcVar7 + 0x20;
pcVar7 = pcVar7 + 0x40;
uVar2 = (ushort)local_44;
} while (pcVar8 != pcVar1);
}
local_44._0_2_ = uVar2;
auVar12._0_8_ = (ulong)(ushort)local_44 | (ulong)((uint)local_38 & 0xffff0000) | uVar10 << 0x20;
auVar12._8_8_ = (ulong)puVar4 & 0xffffffff;
return auVar12;
}
|
|
14,043
|
action_a_load
|
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/parts/engine.c
|
int32_t
action_a_load (PENGINE_T instance, uint32_t parm, uint32_t flags)
{
int32_t value ;
if (flags & (PART_ACTION_FLAG_VALIDATE)) {
return parts_valadate_int (instance, parm, flags, INT_MIN, INT_MAX) ;
}
value = parts_get_int (instance, parm, flags, INT_MIN, INT_MAX) ;
engine_set_variable (instance, ENGINE_VARIABLE_ACCUMULATOR, value) ;
return value ;
}
|
O3
|
c
|
action_a_load:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testb $0x1, %dl
jne 0x6b6f
movq %rbx, %rdi
movl $0x80000000, %ecx # imm = 0x80000000
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
callq 0x82dd
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0xe75e
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl $0x80000000, %ecx # imm = 0x80000000
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
popq %rbx
popq %r14
popq %rbp
jmp 0x8254
|
action_a_load:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
test dl, 1
jnz short loc_6B6F
mov rdi, rbx
mov ecx, 80000000h
mov r8d, 7FFFFFFFh
call parts_get_int
mov r14d, eax
mov rdi, rbx
xor esi, esi
mov edx, eax
call engine_set_variable
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_6B6F:
mov rdi, rbx
mov ecx, 80000000h
mov r8d, 7FFFFFFFh
pop rbx
pop r14
pop rbp
jmp parts_valadate_int
|
long long action_a_load(long long a1, long long a2, long long a3)
{
long long v3; // r14
if ( (a3 & 1) != 0 )
return parts_valadate_int(a1, a2, a3, 0x80000000LL, 0x7FFFFFFFLL);
v3 = (unsigned int)parts_get_int(a1, a2, a3, 0x80000000LL, 0x7FFFFFFFLL);
engine_set_variable(a1, 0LL, v3);
return (unsigned int)v3;
}
|
action_a_load:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
TEST DL,0x1
JNZ 0x00106b6f
MOV RDI,RBX
MOV ECX,0x80000000
MOV R8D,0x7fffffff
CALL 0x001082dd
MOV R14D,EAX
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,EAX
CALL 0x0010e75e
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_00106b6f:
MOV RDI,RBX
MOV ECX,0x80000000
MOV R8D,0x7fffffff
POP RBX
POP R14
POP RBP
JMP 0x00108254
|
ulong action_a_load(int8 param_1,int8 param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
if ((param_3 & 1) == 0) {
uVar1 = parts_get_int(param_1,param_2,param_3,0x80000000,0x7fffffff);
engine_set_variable(param_1,0,uVar1);
return (ulong)uVar1;
}
uVar2 = parts_valadate_int(param_1,param_2,param_3,0x80000000,0x7fffffff);
return uVar2;
}
|
|
14,044
|
my_string_repertoire_8bit
|
eloqsql/strings/ctype.c
|
uint
my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, size_t length)
{
const char *strend;
if ((cs->state & MY_CS_NONASCII) && length > 0)
return MY_REPERTOIRE_UNICODE30;
for (strend= str + length; str < strend; str++)
{
if (((uchar) *str) > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
return MY_REPERTOIRE_ASCII;
}
|
O3
|
c
|
my_string_repertoire_8bit:
movl $0x3, %eax
testq %rdx, %rdx
je 0x54bcb
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%rdi), %ecx
je 0x54bcb
retq
testq %rdx, %rdx
jle 0x54beb
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
cmpb $0x0, (%rsi)
js 0x54be9
incq %rsi
cmpq %rdx, %rsi
jb 0x54bd7
movl $0x1, %eax
popq %rbp
retq
movl $0x1, %eax
retq
|
my_string_repertoire_8bit:
mov eax, 3
test rdx, rdx
jz short loc_54BCB
mov ecx, 2000h
and ecx, [rdi+0Ch]
jz short loc_54BCB
retn
loc_54BCB:
test rdx, rdx
jle short loc_54BEB
push rbp
mov rbp, rsp
add rdx, rsi
loc_54BD7:
cmp byte ptr [rsi], 0
js short loc_54BE9
inc rsi
cmp rsi, rdx
jb short loc_54BD7
mov eax, 1
loc_54BE9:
pop rbp
retn
loc_54BEB:
mov eax, 1
retn
|
long long my_string_repertoire_8bit(long long a1, char *a2, long long a3)
{
long long result; // rax
char *v4; // rdx
result = 3LL;
if ( !a3 || (*(_DWORD *)(a1 + 12) & 0x2000) == 0 )
{
if ( a3 <= 0 )
{
return 1LL;
}
else
{
v4 = &a2[a3];
while ( *a2 >= 0 )
{
if ( ++a2 >= v4 )
return 1LL;
}
}
}
return result;
}
|
my_string_repertoire_8bit:
MOV EAX,0x3
TEST RDX,RDX
JZ 0x00154bcb
MOV ECX,0x2000
AND ECX,dword ptr [RDI + 0xc]
JZ 0x00154bcb
RET
LAB_00154bcb:
TEST RDX,RDX
JLE 0x00154beb
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_00154bd7:
CMP byte ptr [RSI],0x0
JS 0x00154be9
INC RSI
CMP RSI,RDX
JC 0x00154bd7
MOV EAX,0x1
LAB_00154be9:
POP RBP
RET
LAB_00154beb:
MOV EAX,0x1
RET
|
int8 my_string_repertoire_8bit(long param_1,char *param_2,long param_3)
{
char *pcVar1;
if ((param_3 != 0) && ((*(uint *)(param_1 + 0xc) & 0x2000) != 0)) {
return 3;
}
if (param_3 < 1) {
return 1;
}
pcVar1 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return 3;
}
param_2 = param_2 + 1;
} while (param_2 < pcVar1);
return 1;
}
|
|
14,045
|
sort_locks
|
eloqsql/mysys/thr_lock.c
|
static void sort_locks(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end,**prev,*tmp;
/* Sort locks with insertion sort (fast because almost always few locks) */
for (pos=data+1,end=data+count; pos < end ; pos++)
{
tmp= *pos;
if (LOCK_CMP(tmp,pos[-1]))
{
prev=pos;
do {
prev[0]=prev[-1];
} while (--prev != data && LOCK_CMP(tmp,prev[-1]));
prev[0]=tmp;
}
}
}
|
O0
|
c
|
sort_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xf83b9
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9c00
cmpl $0x0, %eax
je 0xf83a6
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
addq $-0x8, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x31(%rbp)
je 0xf8394
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9c00
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xf8354
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf83a8
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0xf831d
addq $0x40, %rsp
popq %rbp
retq
nop
|
sort_locks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_F831D:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb loc_F83B9
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_18]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
jz short loc_F83A6
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_F8354:
mov rax, [rbp+var_28]
mov rcx, [rax-8]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_31], al
jz short loc_F8394
mov rdi, [rbp+var_30]
mov rax, [rbp+var_28]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_F8394:
mov al, [rbp+var_31]
test al, 1
jnz short loc_F8354
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_F83A6:
jmp short $+2
loc_F83A8:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp loc_F831D
loc_F83B9:
add rsp, 40h
pop rbp
retn
|
_QWORD * sort_locks(_QWORD *a1, int a2)
{
_QWORD *result; // rax
bool v3; // [rsp+Fh] [rbp-31h]
long long v4; // [rsp+10h] [rbp-30h]
_QWORD *v5; // [rsp+18h] [rbp-28h]
_QWORD *i; // [rsp+28h] [rbp-18h]
for ( i = a1 + 1; ; ++i )
{
result = i;
if ( i >= &a1[a2] )
break;
v4 = *i;
if ( (unsigned int)LOCK_CMP(*i, *(i - 1)) )
{
v5 = i;
do
{
*v5 = *(v5 - 1);
--v5;
v3 = 0;
if ( v5 != a1 )
v3 = (unsigned int)LOCK_CMP(v4, *(v5 - 1)) != 0;
}
while ( v3 );
*v5 = v4;
}
}
return result;
}
|
sort_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001f831d:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001f83b9
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9c00
CMP EAX,0x0
JZ 0x001f83a6
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f8354:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,-0x8
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x31],AL
JZ 0x001f8394
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9c00
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f8394:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001f8354
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_001f83a6:
JMP 0x001f83a8
LAB_001f83a8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001f831d
LAB_001f83b9:
ADD RSP,0x40
POP RBP
RET
|
void sort_locks(int8 *param_1,uint param_2)
{
int8 uVar1;
int iVar2;
int8 *puVar3;
bool bVar4;
int8 *local_30;
int8 *local_20;
for (local_20 = param_1 + 1; local_20 < param_1 + param_2; local_20 = local_20 + 1) {
uVar1 = *local_20;
iVar2 = LOCK_CMP(uVar1,local_20[-1]);
if (iVar2 != 0) {
local_30 = local_20;
do {
*local_30 = local_30[-1];
puVar3 = local_30 + -1;
bVar4 = false;
if (puVar3 != param_1) {
iVar2 = LOCK_CMP(uVar1,local_30[-2]);
bVar4 = iVar2 != 0;
}
local_30 = puVar3;
} while (bVar4);
*puVar3 = uVar1;
}
}
return;
}
|
|
14,046
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O0
|
c
|
js_std_loadFile:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movl $0x0, 0x24(%rsp)
cmpl $0x2, 0x6c(%rsp)
jl 0x14adb
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x24(%rsp), %rsi
leaq 0xf3b8b(%rip), %r8 # 0x10863e
callq 0x15310
cmpl $0x0, %eax
je 0x14ad9
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x14c09
jmp 0x14adb
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x13520
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x14b1a
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x14c09
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x28(%rsp), %rsi
callq 0xec10
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x28b90
cmpq $0x0, 0x58(%rsp)
jne 0x14b66
movl $0x0, 0x88(%rsp)
movq $0x2, 0x90(%rsp)
jmp 0x14c09
cmpl $0x0, 0x24(%rsp)
je 0x14bb0
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x9fd(%rip), %rcx # 0x15580
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x57970
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x14bef
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x26fb0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x20af0
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_std_loadFile:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov [rsp+98h+var_74], 0
cmp [rsp+98h+var_2C], 2
jl short loc_14ADB
mov rax, [rsp+98h+var_38]
mov rcx, [rax+10h]
mov [rsp+98h+var_68], rcx
mov rax, [rax+18h]
mov [rsp+98h+var_60], rax
mov rdi, [rsp+98h+var_28]
mov rdx, [rsp+98h+var_68]
mov rcx, [rsp+98h+var_60]
lea rsi, [rsp+98h+var_74]
lea r8, aBinary; "binary"
call get_bool_option
cmp eax, 0
jz short loc_14AD9
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_14C09
loc_14AD9:
jmp short $+2
loc_14ADB:
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+98h+var_48], rax
cmp [rsp+98h+var_48], 0
jnz short loc_14B1A
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_14C09
loc_14B1A:
mov rdi, [rsp+98h+var_28]
mov rdx, [rsp+98h+var_48]
lea rsi, [rsp+98h+var_70]
call js_load_file
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
call JS_FreeCString
cmp [rsp+98h+var_40], 0
jnz short loc_14B66
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 2
jmp loc_14C09
loc_14B66:
cmp [rsp+98h+var_74], 0
jz short loc_14BB0
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_70]
lea rcx, free_buf
xor eax, eax
mov r8d, eax
xor r9d, r9d
call JS_NewUint8Array
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_50], rax
jmp short loc_14BEF
loc_14BB0:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_70]
call JS_NewStringLen
mov [rsp+98h+var_98], rax
mov [rsp+98h+var_90], rdx
mov rax, [rsp+98h+var_98]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_50], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
call js_free
loc_14BEF:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_8], rax
loc_14C09:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rdx
long long v6; // rdx
int v8; // [rsp+24h] [rbp-74h] BYREF
long long v9; // [rsp+28h] [rbp-70h] BYREF
long long v10; // [rsp+30h] [rbp-68h]
long long v11; // [rsp+38h] [rbp-60h]
long long v12; // [rsp+40h] [rbp-58h]
long long v13; // [rsp+48h] [rbp-50h]
long long v14; // [rsp+50h] [rbp-48h]
long long v15; // [rsp+58h] [rbp-40h]
long long *v16; // [rsp+60h] [rbp-38h]
int v17; // [rsp+6Ch] [rbp-2Ch]
long long v18; // [rsp+70h] [rbp-28h]
long long v19; // [rsp+78h] [rbp-20h]
long long v20; // [rsp+80h] [rbp-18h]
long long v21; // [rsp+88h] [rbp-10h]
long long v22; // [rsp+90h] [rbp-8h]
v19 = a2;
v20 = a3;
v18 = a1;
v17 = a4;
v16 = a5;
v8 = 0;
if ( a4 >= 2 && (v10 = v16[2], v11 = v16[3], (unsigned int)get_bool_option(v18, &v8, v10, v11, "binary")) )
{
LODWORD(v21) = 0;
v22 = 6LL;
}
else
{
v14 = JS_ToCString(v18, *v16, v16[1]);
if ( v14 )
{
v15 = js_load_file(v18, &v9, v14);
JS_FreeCString(v18, v14);
if ( v15 )
{
if ( v8 )
{
v12 = JS_NewUint8Array(v18, v15, v9, free_buf, 0LL, 0LL);
v13 = v5;
}
else
{
v12 = JS_NewStringLen(v18, v15, v9);
v13 = v6;
js_free(v18, v15);
}
v21 = v12;
v22 = v13;
}
else
{
LODWORD(v21) = 0;
v22 = 2LL;
}
}
else
{
LODWORD(v21) = 0;
v22 = 6LL;
}
}
return v21;
}
|
js_std_loadFile:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV dword ptr [RSP + 0x24],0x0
CMP dword ptr [RSP + 0x6c],0x2
JL 0x00114adb
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x24]
LEA R8,[0x20863e]
CALL 0x00115310
CMP EAX,0x0
JZ 0x00114ad9
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00114c09
LAB_00114ad9:
JMP 0x00114adb
LAB_00114adb:
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x00114b1a
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00114c09
LAB_00114b1a:
MOV RDI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x50]
LEA RSI,[RSP + 0x28]
CALL 0x0010ec10
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00128b90
CMP qword ptr [RSP + 0x58],0x0
JNZ 0x00114b66
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x2
JMP 0x00114c09
LAB_00114b66:
CMP dword ptr [RSP + 0x24],0x0
JZ 0x00114bb0
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x28]
LEA RCX,[0x115580]
XOR EAX,EAX
MOV R8D,EAX
XOR R9D,R9D
CALL 0x00157970
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
JMP 0x00114bef
LAB_00114bb0:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00126fb0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00120af0
LAB_00114bef:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
LAB_00114c09:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_74;
int8 local_70;
int8 local_68;
int8 local_60;
int1 local_58 [16];
long local_48;
long local_40;
int8 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_74 = 0;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
if (1 < param_4) {
local_68 = param_5[2];
local_60 = param_5[3];
iVar2 = get_bool_option(param_1,&local_74,local_68,local_60,"binary");
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_00114c09;
}
}
local_48 = JS_ToCString(local_28,*local_38,local_38[1]);
if (local_48 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
local_40 = js_load_file(local_28,&local_70,local_48);
JS_FreeCString(local_28,local_48);
if (local_40 == 0) {
local_10 = 0;
local_8 = 2;
}
else {
if (local_74 == 0) {
local_58 = JS_NewStringLen(local_28,local_40,local_70);
js_free(local_28,local_40);
}
else {
local_58 = JS_NewUint8Array(local_28,local_40,local_70,free_buf,0,0);
}
local_10 = local_58._0_4_;
uStack_c = local_58._4_4_;
local_8 = local_58._8_8_;
}
}
LAB_00114c09:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
14,047
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O1
|
c
|
js_std_loadFile:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
cmpl $0x2, %ecx
jl 0x16c47
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
leaq 0x83978(%rip), %r8 # 0x9a5a6
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x1717c
testl %eax, %eax
je 0x16c47
movl $0x6, %r14d
jmp 0x16cc3
movq (%r14), %rdx
movq 0x8(%r14), %rcx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x16cb5
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x13b34
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x202c9
testq %r15, %r15
je 0x16cbd
cmpl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rdx
je 0x16cca
leaq 0x54d(%rip), %rcx # 0x171e9
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x38bbc
movq %rax, %r12
movq %rdx, %r14
jmp 0x16ce6
movl $0x6, %r14d
jmp 0x16cc6
movl $0x2, %r14d
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x16cf6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f2f3
movq %rax, %r12
movq %rdx, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bf85
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r12, %rax
movl %r12d, %r15d
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_std_loadFile:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r14, r8
mov rbx, rdi
mov [rsp+38h+var_2C], 0
cmp ecx, 2
jl short loc_16C47
mov rdx, [r14+10h]
mov rcx, [r14+18h]
lea r8, aBinary; "binary"
lea rsi, [rsp+38h+var_2C]
mov rdi, rbx
call get_bool_option
test eax, eax
jz short loc_16C47
mov r14d, 6
jmp short loc_16CC3
loc_16C47:
mov rdx, [r14]
mov rcx, [r14+8]
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_16CB5
mov r14, rax
lea rsi, [rsp+38h+var_28]
mov rdi, rbx
mov rdx, rax
call js_load_file
mov r15, rax
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
test r15, r15
jz short loc_16CBD
cmp [rsp+38h+var_2C], 0
mov rdx, [rsp+38h+var_28]
jz short loc_16CCA
lea rcx, free_buf
mov rdi, rbx
mov rsi, r15
xor r8d, r8d
xor r9d, r9d
call JS_NewUint8Array
mov r12, rax
mov r14, rdx
jmp short loc_16CE6
loc_16CB5:
mov r14d, 6
jmp short loc_16CC6
loc_16CBD:
mov r14d, 2
loc_16CC3:
xor r15d, r15d
loc_16CC6:
xor eax, eax
jmp short loc_16CF6
loc_16CCA:
mov rdi, rbx
mov rsi, r15
call JS_NewStringLen
mov r12, rax
mov r14, rdx
mov rdi, rbx
mov rsi, r15
call js_free
loc_16CE6:
mov rax, 0FFFFFFFF00000000h
and rax, r12
mov r15d, r12d
loc_16CF6:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long file; // r15
long long v10; // r12
unsigned long long v11; // rax
int v13; // [rsp+Ch] [rbp-2Ch] BYREF
long long v14[5]; // [rsp+10h] [rbp-28h] BYREF
v13 = 0;
if ( a4 >= 2 && (unsigned int)get_bool_option(a1, &v13, a5[2], a5[3], "binary") )
goto LABEL_8;
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( !v7 )
goto LABEL_9;
v8 = v7;
file = js_load_file(a1, v14, v7);
JS_FreeCString(a1, v8);
if ( !file )
{
LABEL_8:
v6 = 0LL;
LABEL_9:
v11 = 0LL;
return v11 | v6;
}
if ( v13 )
{
v10 = JS_NewUint8Array(a1, file, v14[0], free_buf, 0LL, 0LL);
}
else
{
v10 = JS_NewStringLen(a1, file, v14[0]);
js_free(a1, file);
}
v11 = v10 & 0xFFFFFFFF00000000LL;
v6 = (unsigned int)v10;
return v11 | v6;
}
|
js_std_loadFile:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R8
MOV RBX,RDI
MOV dword ptr [RSP + 0xc],0x0
CMP ECX,0x2
JL 0x00116c47
MOV RDX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
LEA R8,[0x19a5a6]
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0011717c
TEST EAX,EAX
JZ 0x00116c47
MOV R14D,0x6
JMP 0x00116cc3
LAB_00116c47:
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x00116cb5
MOV R14,RAX
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV RDX,RAX
CALL 0x00113b34
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x001202c9
TEST R15,R15
JZ 0x00116cbd
CMP dword ptr [RSP + 0xc],0x0
MOV RDX,qword ptr [RSP + 0x10]
JZ 0x00116cca
LEA RCX,[0x1171e9]
MOV RDI,RBX
MOV RSI,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00138bbc
MOV R12,RAX
MOV R14,RDX
JMP 0x00116ce6
LAB_00116cb5:
MOV R14D,0x6
JMP 0x00116cc6
LAB_00116cbd:
MOV R14D,0x2
LAB_00116cc3:
XOR R15D,R15D
LAB_00116cc6:
XOR EAX,EAX
JMP 0x00116cf6
LAB_00116cca:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011f2f3
MOV R12,RAX
MOV R14,RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011bf85
LAB_00116ce6:
MOV RAX,-0x100000000
AND RAX,R12
MOV R15D,R12D
LAB_00116cf6:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
int1 auVar7 [16];
int local_2c;
int8 local_28;
local_2c = 0;
if ((param_4 < 2) ||
(iVar1 = get_bool_option(param_1,&local_2c,param_5[2],param_5[3],"binary"), iVar1 == 0)) {
lVar2 = JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0);
if (lVar2 == 0) {
uVar5 = 6;
}
else {
lVar3 = js_load_file(param_1,&local_28,lVar2);
JS_FreeCString(param_1,lVar2);
if (lVar3 != 0) {
if (local_2c == 0) {
auVar7 = JS_NewStringLen(param_1,lVar3,local_28);
js_free(param_1,lVar3);
}
else {
auVar7 = JS_NewUint8Array(param_1,lVar3,local_28,free_buf,0,0);
}
uVar5 = auVar7._8_8_;
uVar4 = auVar7._0_8_ & 0xffffffff00000000;
uVar6 = auVar7._0_8_ & 0xffffffff;
goto LAB_00116cf6;
}
uVar5 = 2;
}
}
else {
uVar5 = 6;
}
uVar6 = 0;
uVar4 = 0;
LAB_00116cf6:
auVar7._8_8_ = uVar5;
auVar7._0_8_ = uVar6 | uVar4;
return auVar7;
}
|
|
14,048
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O2
|
c
|
js_std_loadFile:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
andl $0x0, 0xc(%rsp)
movq %rdi, %r14
pushq $0x6
popq %rbx
cmpl $0x2, %ecx
jl 0x11a39
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x6fb2a(%rip), %r8 # 0x81552
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x11ec1
testl %eax, %eax
jne 0x11aa2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x10ef0
testq %rax, %rax
je 0x11aa2
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xeb90
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x1a4db
testq %r15, %r15
je 0x11a9f
cmpl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rdx
je 0x11aa8
leaq 0x513(%rip), %rcx # 0x11f99
movq %r14, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x31da6
movq %rax, %r12
movq %rdx, %rbx
jmp 0x11ac4
pushq $0x2
popq %rbx
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x11ad4
movq %r14, %rdi
movq %r15, %rsi
callq 0x1976e
movq %rax, %r12
movq %rdx, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x166f2
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movl %r12d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_std_loadFile:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r15, r8
and [rsp+38h+var_2C], 0
mov r14, rdi
push 6
pop rbx
cmp ecx, 2
jl short loc_11A39
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea r8, aBinary; "binary"
lea rsi, [rsp+38h+var_2C]
mov rdi, r14
call get_bool_option
test eax, eax
jnz short loc_11AA2
loc_11A39:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_ToCString
test rax, rax
jz short loc_11AA2
mov r12, rax
lea rsi, [rsp+38h+var_28]
mov rdi, r14
mov rdx, rax
call js_load_file
mov r15, rax
mov rdi, r14
mov rsi, r12
call JS_FreeCString
test r15, r15
jz short loc_11A9F
cmp [rsp+38h+var_2C], 0
mov rdx, [rsp+38h+var_28]
jz short loc_11AA8
lea rcx, free_buf
mov rdi, r14
mov rsi, r15
xor r8d, r8d
xor r9d, r9d
call JS_NewUint8Array
mov r12, rax
mov rbx, rdx
jmp short loc_11AC4
loc_11A9F:
push 2
pop rbx
loc_11AA2:
xor eax, eax
xor ecx, ecx
jmp short loc_11AD4
loc_11AA8:
mov rdi, r14
mov rsi, r15
call JS_NewStringLen
mov r12, rax
mov rbx, rdx
mov rdi, r14
mov rsi, r15
call js_free
loc_11AC4:
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov eax, r12d
loc_11AD4:
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v6; // rax
long long v7; // r12
long long file; // r15
long long v9; // r12
long long v10; // rax
unsigned long long v11; // rcx
int v13; // [rsp+Ch] [rbp-2Ch] BYREF
long long v14[5]; // [rsp+10h] [rbp-28h] BYREF
v13 = 0;
if ( (a4 < 2 || !(unsigned int)get_bool_option(a1, &v13, a5[2], a5[3], "binary"))
&& (v6 = JS_ToCString(a1, *a5, a5[1])) != 0
&& (v7 = v6, file = js_load_file(a1, v14, v6), JS_FreeCString(a1, v7), file) )
{
if ( v13 )
{
v9 = JS_NewUint8Array(a1, file, v14[0], free_buf, 0LL, 0LL);
}
else
{
v9 = JS_NewStringLen(a1, file, v14[0]);
js_free(a1, file);
}
v11 = v9 & 0xFFFFFFFF00000000LL;
v10 = (unsigned int)v9;
}
else
{
v10 = 0LL;
v11 = 0LL;
}
return v11 | v10;
}
|
js_std_loadFile:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,R8
AND dword ptr [RSP + 0xc],0x0
MOV R14,RDI
PUSH 0x6
POP RBX
CMP ECX,0x2
JL 0x00111a39
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA R8,[0x181552]
LEA RSI,[RSP + 0xc]
MOV RDI,R14
CALL 0x00111ec1
TEST EAX,EAX
JNZ 0x00111aa2
LAB_00111a39:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x00110ef0
TEST RAX,RAX
JZ 0x00111aa2
MOV R12,RAX
LEA RSI,[RSP + 0x10]
MOV RDI,R14
MOV RDX,RAX
CALL 0x0010eb90
MOV R15,RAX
MOV RDI,R14
MOV RSI,R12
CALL 0x0011a4db
TEST R15,R15
JZ 0x00111a9f
CMP dword ptr [RSP + 0xc],0x0
MOV RDX,qword ptr [RSP + 0x10]
JZ 0x00111aa8
LEA RCX,[0x111f99]
MOV RDI,R14
MOV RSI,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00131da6
MOV R12,RAX
MOV RBX,RDX
JMP 0x00111ac4
LAB_00111a9f:
PUSH 0x2
POP RBX
LAB_00111aa2:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x00111ad4
LAB_00111aa8:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011976e
MOV R12,RAX
MOV RBX,RDX
MOV RDI,R14
MOV RSI,R15
CALL 0x001166f2
LAB_00111ac4:
MOV RCX,-0x100000000
AND RCX,R12
MOV EAX,R12D
LAB_00111ad4:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
int local_2c;
int8 local_28;
local_2c = 0;
uVar6 = 6;
if (param_4 < 2) {
LAB_00111a39:
lVar2 = JS_ToCString(param_1,*param_5,param_5[1]);
if (lVar2 != 0) {
lVar3 = js_load_file(param_1,&local_28,lVar2);
JS_FreeCString(param_1,lVar2);
if (lVar3 != 0) {
if (local_2c == 0) {
auVar7 = JS_NewStringLen(param_1,lVar3,local_28);
js_free(param_1,lVar3);
}
else {
auVar7 = JS_NewUint8Array(param_1,lVar3,local_28,free_buf,0,0);
}
uVar6 = auVar7._8_8_;
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
uVar4 = auVar7._0_8_ & 0xffffffff;
goto LAB_00111ad4;
}
uVar6 = 2;
}
}
else {
iVar1 = get_bool_option(param_1,&local_2c,param_5[2],param_5[3],"binary");
if (iVar1 == 0) goto LAB_00111a39;
}
uVar4 = 0;
uVar5 = 0;
LAB_00111ad4:
auVar7._0_8_ = uVar4 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
|
|
14,049
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O3
|
c
|
js_std_loadFile:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
cmpl $0x2, %ecx
jl 0x17651
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
leaq 0x85f1a(%rip), %r8 # 0x9d552
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x17b86
testl %eax, %eax
je 0x17651
movl $0x6, %r14d
jmp 0x176cd
movq (%r14), %rdx
movq 0x8(%r14), %rcx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20717
testq %rax, %rax
je 0x176bf
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x14574
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x209ed
testq %r15, %r15
je 0x176c7
cmpl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rdx
je 0x176d4
leaq 0x54d(%rip), %rcx # 0x17bf3
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x39ed5
movq %rax, %r12
movq %rdx, %r14
jmp 0x176f0
movl $0x6, %r14d
jmp 0x176d0
movl $0x2, %r14d
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x17700
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fa32
movq %rax, %r12
movq %rdx, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c845
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r12, %rax
movl %r12d, %r15d
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_std_loadFile:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r14, r8
mov rbx, rdi
mov [rsp+38h+var_2C], 0
cmp ecx, 2
jl short loc_17651
mov rdx, [r14+10h]
mov rcx, [r14+18h]
lea r8, aBinary; "binary"
lea rsi, [rsp+38h+var_2C]
mov rdi, rbx
call get_bool_option
test eax, eax
jz short loc_17651
mov r14d, 6
jmp short loc_176CD
loc_17651:
mov rdx, [r14]
mov rcx, [r14+8]
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_176BF
mov r14, rax
lea rsi, [rsp+38h+var_28]
mov rdi, rbx
mov rdx, rax
call js_load_file
mov r15, rax
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
test r15, r15
jz short loc_176C7
cmp [rsp+38h+var_2C], 0
mov rdx, [rsp+38h+var_28]
jz short loc_176D4
lea rcx, free_buf
mov rdi, rbx
mov rsi, r15
xor r8d, r8d
xor r9d, r9d
call JS_NewUint8Array
mov r12, rax
mov r14, rdx
jmp short loc_176F0
loc_176BF:
mov r14d, 6
jmp short loc_176D0
loc_176C7:
mov r14d, 2
loc_176CD:
xor r15d, r15d
loc_176D0:
xor eax, eax
jmp short loc_17700
loc_176D4:
mov rdi, rbx
mov rsi, r15
call JS_NewStringLen
mov r12, rax
mov r14, rdx
mov rdi, rbx
mov rsi, r15
call js_free
loc_176F0:
mov rax, 0FFFFFFFF00000000h
and rax, r12
mov r15d, r12d
loc_17700:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long file; // r15
long long v10; // r12
unsigned long long v11; // rax
int v13; // [rsp+Ch] [rbp-2Ch] BYREF
long long v14[5]; // [rsp+10h] [rbp-28h] BYREF
v13 = 0;
if ( a4 >= 2 && (unsigned int)get_bool_option(a1, &v13, a5[2], a5[3], "binary") )
goto LABEL_8;
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( !v7 )
goto LABEL_9;
v8 = v7;
file = js_load_file(a1, v14, v7);
JS_FreeCString(a1, v8);
if ( !file )
{
LABEL_8:
v6 = 0LL;
LABEL_9:
v11 = 0LL;
return v11 | v6;
}
if ( v13 )
{
v10 = JS_NewUint8Array(a1, file, v14[0], free_buf, 0LL, 0LL);
}
else
{
v10 = JS_NewStringLen(a1, file, v14[0]);
js_free(a1, file);
}
v11 = v10 & 0xFFFFFFFF00000000LL;
v6 = (unsigned int)v10;
return v11 | v6;
}
|
js_std_loadFile:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R8
MOV RBX,RDI
MOV dword ptr [RSP + 0xc],0x0
CMP ECX,0x2
JL 0x00117651
MOV RDX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
LEA R8,[0x19d552]
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x00117b86
TEST EAX,EAX
JZ 0x00117651
MOV R14D,0x6
JMP 0x001176cd
LAB_00117651:
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120717
TEST RAX,RAX
JZ 0x001176bf
MOV R14,RAX
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV RDX,RAX
CALL 0x00114574
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x001209ed
TEST R15,R15
JZ 0x001176c7
CMP dword ptr [RSP + 0xc],0x0
MOV RDX,qword ptr [RSP + 0x10]
JZ 0x001176d4
LEA RCX,[0x117bf3]
MOV RDI,RBX
MOV RSI,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00139ed5
MOV R12,RAX
MOV R14,RDX
JMP 0x001176f0
LAB_001176bf:
MOV R14D,0x6
JMP 0x001176d0
LAB_001176c7:
MOV R14D,0x2
LAB_001176cd:
XOR R15D,R15D
LAB_001176d0:
XOR EAX,EAX
JMP 0x00117700
LAB_001176d4:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011fa32
MOV R12,RAX
MOV R14,RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c845
LAB_001176f0:
MOV RAX,-0x100000000
AND RAX,R12
MOV R15D,R12D
LAB_00117700:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
int1 auVar7 [16];
int local_2c;
int8 local_28;
local_2c = 0;
if ((param_4 < 2) ||
(iVar1 = get_bool_option(param_1,&local_2c,param_5[2],param_5[3],"binary"), iVar1 == 0)) {
lVar2 = JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0);
if (lVar2 == 0) {
uVar5 = 6;
}
else {
lVar3 = js_load_file(param_1,&local_28,lVar2);
JS_FreeCString(param_1,lVar2);
if (lVar3 != 0) {
if (local_2c == 0) {
auVar7 = JS_NewStringLen(param_1,lVar3,local_28);
js_free(param_1,lVar3);
}
else {
auVar7 = JS_NewUint8Array(param_1,lVar3,local_28,free_buf,0,0);
}
uVar5 = auVar7._8_8_;
uVar4 = auVar7._0_8_ & 0xffffffff00000000;
uVar6 = auVar7._0_8_ & 0xffffffff;
goto LAB_00117700;
}
uVar5 = 2;
}
}
else {
uVar5 = 6;
}
uVar6 = 0;
uVar4 = 0;
LAB_00117700:
auVar7._8_8_ = uVar5;
auVar7._0_8_ = uVar6 | uVar4;
return auVar7;
}
|
|
14,050
|
mysql_real_connect_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_real_connect_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_real_connect,
(parms->mysql, parms->host, parms->user, parms->passwd, parms->db,
parms->port, parms->unix_socket, parms->client_flags),
parms->mysql,
MYSQL *,
r_ptr)
}
|
O0
|
c
|
mysql_real_connect_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %r8
movq -0x10(%rbp), %rax
movl 0x28(%rax), %r9d
movq -0x10(%rbp), %rax
movq 0x30(%rax), %r10
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x41cb0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_real_connect_start_internal:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov r8, [rax+20h]
mov rax, [rbp+var_10]
mov r9d, [rax+28h]
mov rax, [rbp+var_10]
mov r10, [rax+30h]
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rsp+30h+var_30], r10
mov [rsp+30h+var_28], rax
call mysql_real_connect
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 30h
pop rbp
retn
|
long long mysql_real_connect_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+10h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_real_connect(
*(_QWORD *)a1,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24),
*(_QWORD *)(a1 + 32),
*(_DWORD *)(a1 + 40),
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a1 + 56));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_real_connect_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9D,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV R10,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00141cb0
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x30
POP RBP
RET
|
void mysql_real_connect_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_real_connect(*param_1,param_1[1],param_1[2],param_1[3],param_1[4],(int)param_1[5],
param_1[6],param_1[7]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
14,051
|
ma_trnman_end_trans_hook
|
eloqsql/storage/maria/ma_state.c
|
my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit,
my_bool active_transactions)
{
my_bool error= 0;
MARIA_USED_TABLES *tables, *next;
DBUG_ENTER("_ma_trnman_end_trans_hook");
DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables));
for (tables= (MARIA_USED_TABLES*) trn->used_tables;
tables;
tables= next)
{
MARIA_SHARE *share= tables->share;
next= tables->next;
if (commit)
{
MARIA_STATE_HISTORY *history;
mysql_mutex_lock(&share->intern_lock);
/* We only have to update history state if something changed */
if (tables->state_current.changed)
{
if (tables->state_current.no_transid)
{
/*
The change was done without using transid on rows (like in
bulk insert). In this case this thread is the only one
that is using the table and all rows will be visible
for all transactions.
*/
_ma_reset_history(share);
}
else
{
if (active_transactions && share->now_transactional &&
trnman_exists_active_transactions(share->state_history->trid,
trn->commit_trid, 1))
{
/*
There exist transactions that are still using the current
share->state_history. Create a new history item for this
commit and add it first in the state_history list. This
ensures that all history items are stored in the list in
decresing trid order.
*/
if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history),
MYF(MY_WME))))
{
/* purecov: begin inspected */
error= 1;
mysql_mutex_unlock(&share->intern_lock);
my_free(tables);
continue;
/* purecov: end */
}
history->state= share->state_history->state;
history->next= share->state_history;
share->state_history= history;
}
else
{
/* Previous history can't be seen by anyone, reuse old memory */
history= share->state_history;
DBUG_PRINT("info", ("removing history->trid: %lu new: %lu",
(ulong) history->trid,
(ulong) trn->commit_trid));
}
history->state.records+= (tables->state_current.records -
tables->state_start.records);
history->state.checksum+= (tables->state_current.checksum -
tables->state_start.checksum);
history->trid= trn->commit_trid;
share->state.last_change_trn= trn->commit_trid;
if (history->next)
{
/* Remove not visible states */
share->state_history= _ma_remove_not_visible_states(history, 0, 1);
}
DBUG_PRINT("info", ("share: %p in_trans: %d",
share, share->in_trans));
}
}
/* The following calls frees &share->intern_lock */
decrement_share_in_trans(share);
}
else
{
/*
We need to keep share->in_trans correct because of the check
in free_maria_share()
*/
mysql_mutex_lock(&share->intern_lock);
decrement_share_in_trans(share);
}
my_free(tables);
}
trn->used_tables= 0;
trn->used_instances= 0;
DBUG_RETURN(error);
}
|
O0
|
c
|
ma_trnman_end_trans_hook:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movb $0x0, -0xb(%rbp)
jmp 0x4803d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4827f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpb $0x0, -0x9(%rbp)
je 0x48244
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x10ffe9(%rip), %rsi # 0x158070
movl $0x1d7, %edx # imm = 0x1D7
callq 0x479b0
movq -0x18(%rbp), %rax
movb 0x44(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x48239
movq -0x18(%rbp), %rax
movb 0x44(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x480c7
movq -0x28(%rbp), %rdi
callq 0x482b0
jmp 0x48237
movsbl -0xa(%rbp), %eax
cmpl $0x0, %eax
je 0x48199
movq -0x28(%rbp), %rax
movsbl 0x7e7(%rax), %eax
cmpl $0x0, %eax
je 0x48199
movq -0x28(%rbp), %rax
movq 0x450(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rsi
movl $0x1, %edx
callq 0x782a0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x48199
xorl %edi, %edi
movl $0x48, %esi
movl $0x10, %edx
callq 0xf99f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x48155
movb $0x1, -0xb(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x47a20
movq -0x18(%rbp), %rdi
callq 0xf9d70
jmp 0x48272
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movq -0x28(%rbp), %rax
movq 0x450(%rax), %rsi
addq $0x10, %rsi
movl $0x38, %edx
callq 0x2a0b0
movq -0x28(%rbp), %rax
movq 0x450(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x450(%rax)
jmp 0x481ac
movq -0x28(%rbp), %rax
movq 0x450(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x481aa
jmp 0x481ac
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x48(%rax), %rcx
movq -0x30(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x78(%rax), %ecx
movq -0x30(%rbp), %rax
addl 0x40(%rax), %ecx
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xe8(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x48231
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x47a80
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x450(%rax)
jmp 0x48233
jmp 0x48235
jmp 0x48237
jmp 0x48239
movq -0x28(%rbp), %rdi
callq 0x48350
jmp 0x48269
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x10fe1a(%rip), %rsi # 0x158070
movl $0x224, %edx # imm = 0x224
callq 0x479b0
movq -0x28(%rbp), %rdi
callq 0x48350
movq -0x18(%rbp), %rdi
callq 0xf9d70
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x48049
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movb -0xb(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_trnman_end_trans_hook:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, dl
mov cl, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], cl
mov [rbp+var_A], al
mov [rbp+var_B], 0
jmp short $+2
loc_4803D:
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_18], rax
loc_48049:
cmp [rbp+var_18], 0
jz loc_4827F
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_20], rax
cmp [rbp+var_9], 0
jz loc_48244
mov rdi, [rbp+var_28]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1D7h
call inline_mysql_mutex_lock_6
mov rax, [rbp+var_18]
mov al, [rax+44h]
and al, 1
movzx eax, al
cmp eax, 0
jz loc_48239
mov rax, [rbp+var_18]
mov al, [rax+44h]
shr al, 1
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_480C7
mov rdi, [rbp+var_28]
call _ma_reset_history
jmp loc_48237
loc_480C7:
movsx eax, [rbp+var_A]
cmp eax, 0
jz loc_48199
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax+7E7h]
cmp eax, 0
jz loc_48199
mov rax, [rbp+var_28]
mov rax, [rax+450h]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
mov rsi, [rax+88h]
mov edx, 1
call trnman_exists_active_transactions
movsx eax, al
cmp eax, 0
jz loc_48199
xor edi, edi
mov esi, 48h ; 'H'
mov edx, 10h
call my_malloc
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_48155
mov [rbp+var_B], 1
mov rdi, [rbp+var_28]
add rdi, 8F0h
call inline_mysql_mutex_unlock_6
mov rdi, [rbp+var_18]
call my_free
jmp loc_48272
loc_48155:
mov rdi, [rbp+var_30]
add rdi, 10h
mov rax, [rbp+var_28]
mov rsi, [rax+450h]
add rsi, 10h
mov edx, 38h ; '8'
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rax+450h]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+450h], rcx
jmp short loc_481AC
loc_48199:
mov rax, [rbp+var_28]
mov rax, [rax+450h]
mov [rbp+var_30], rax
jmp short $+2
loc_481AA:
jmp short $+2
loc_481AC:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
sub rcx, [rax+48h]
mov rax, [rbp+var_30]
add rcx, [rax+10h]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov ecx, [rax+40h]
mov rax, [rbp+var_18]
sub ecx, [rax+78h]
mov rax, [rbp+var_30]
add ecx, [rax+40h]
mov [rax+40h], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+88h]
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+88h]
mov rax, [rbp+var_28]
mov [rax+0E8h], rcx
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jz short loc_48231
mov rdi, [rbp+var_30]
xor esi, esi
mov edx, 1
call _ma_remove_not_visible_states
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax+450h], rcx
loc_48231:
jmp short $+2
loc_48233:
jmp short $+2
loc_48235:
jmp short $+2
loc_48237:
jmp short $+2
loc_48239:
mov rdi, [rbp+var_28]
call decrement_share_in_trans
jmp short loc_48269
loc_48244:
mov rdi, [rbp+var_28]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 224h
call inline_mysql_mutex_lock_6
mov rdi, [rbp+var_28]
call decrement_share_in_trans
loc_48269:
mov rdi, [rbp+var_18]
call my_free
loc_48272:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp loc_48049
loc_4827F:
mov rax, [rbp+var_8]
mov qword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov al, [rbp+var_B]
mov [rbp+var_31], al
mov al, [rbp+var_31]
add rsp, 40h
pop rbp
retn
|
char ma_trnman_end_trans_hook(_QWORD *a1, char a2, char a3)
{
long long v4; // [rsp+10h] [rbp-30h]
long long v5; // [rsp+18h] [rbp-28h]
long long *v6; // [rsp+20h] [rbp-20h]
long long *i; // [rsp+28h] [rbp-18h]
char v8; // [rsp+35h] [rbp-Bh]
v8 = 0;
for ( i = (long long *)a1[11]; i; i = v6 )
{
v5 = i[1];
v6 = (long long *)*i;
if ( a2 )
{
inline_mysql_mutex_lock_6(
v5 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x1D7u);
if ( (*((_BYTE *)i + 68) & 1) != 0 )
{
if ( (*((_BYTE *)i + 68) & 2) != 0 )
{
ma_reset_history(v5);
}
else
{
if ( a3
&& *(_BYTE *)(v5 + 2023)
&& (unsigned __int8)trnman_exists_active_transactions(
*(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL),
a1[17],
1LL) )
{
v4 = my_malloc(0LL, 72LL, 16LL);
if ( !v4 )
{
v8 = 1;
inline_mysql_mutex_unlock_6(v5 + 2288);
my_free(i);
continue;
}
memcpy(v4 + 16, *(_QWORD *)(v5 + 1104) + 16LL, 56LL);
*(_QWORD *)v4 = *(_QWORD *)(v5 + 1104);
*(_QWORD *)(v5 + 1104) = v4;
}
else
{
v4 = *(_QWORD *)(v5 + 1104);
}
*(_QWORD *)(v4 + 16) += i[2] - i[9];
*(_DWORD *)(v4 + 64) += *((_DWORD *)i + 16) - *((_DWORD *)i + 30);
*(_QWORD *)(v4 + 8) = a1[17];
*(_QWORD *)(v5 + 232) = a1[17];
if ( *(_QWORD *)v4 )
*(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v4, 0, 1);
}
}
decrement_share_in_trans(v5);
}
else
{
inline_mysql_mutex_lock_6(
v5 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x224u);
decrement_share_in_trans(v5);
}
my_free(i);
}
a1[11] = 0LL;
a1[12] = 0LL;
return v8;
}
|
_ma_trnman_end_trans_hook:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,DL
MOV CL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],CL
MOV byte ptr [RBP + -0xa],AL
MOV byte ptr [RBP + -0xb],0x0
JMP 0x0014803d
LAB_0014803d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x18],RAX
LAB_00148049:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0014827f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP byte ptr [RBP + -0x9],0x0
JZ 0x00148244
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
LEA RSI,[0x258070]
MOV EDX,0x1d7
CALL 0x001479b0
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX + 0x44]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00148239
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX + 0x44]
SHR AL,0x1
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001480c7
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001482b0
JMP 0x00148237
LAB_001480c7:
MOVSX EAX,byte ptr [RBP + -0xa]
CMP EAX,0x0
JZ 0x00148199
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX + 0x7e7]
CMP EAX,0x0
JZ 0x00148199
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x450]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x88]
MOV EDX,0x1
CALL 0x001782a0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00148199
XOR EDI,EDI
MOV ESI,0x48
MOV EDX,0x10
CALL 0x001f99f0
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x00148155
MOV byte ptr [RBP + -0xb],0x1
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
CALL 0x00147a20
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f9d70
JMP 0x00148272
LAB_00148155:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x450]
ADD RSI,0x10
MOV EDX,0x38
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x450]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x450],RCX
JMP 0x001481ac
LAB_00148199:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x450]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001481aa
LAB_001481aa:
JMP 0x001481ac
LAB_001481ac:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
SUB RCX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x30]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x18]
SUB ECX,dword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX + 0x40]
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0xe8],RCX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JZ 0x00148231
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x1
CALL 0x00147a80
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x450],RCX
LAB_00148231:
JMP 0x00148233
LAB_00148233:
JMP 0x00148235
LAB_00148235:
JMP 0x00148237
LAB_00148237:
JMP 0x00148239
LAB_00148239:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00148350
JMP 0x00148269
LAB_00148244:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
LEA RSI,[0x258070]
MOV EDX,0x224
CALL 0x001479b0
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00148350
LAB_00148269:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f9d70
LAB_00148272:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00148049
LAB_0014827f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV AL,byte ptr [RBP + -0xb]
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
ADD RSP,0x40
POP RBP
RET
|
int1 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3)
{
long lVar1;
int8 *puVar2;
char cVar3;
int8 uVar4;
long *local_38;
int8 *local_20;
int1 local_13;
local_13 = 0;
local_20 = *(int8 **)(param_1 + 0x58);
LAB_00148049:
do {
if (local_20 == (int8 *)0x0) {
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return local_13;
}
lVar1 = local_20[1];
puVar2 = (int8 *)*local_20;
if (param_2 == '\0') {
inline_mysql_mutex_lock
(lVar1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x224);
decrement_share_in_trans(lVar1);
}
else {
inline_mysql_mutex_lock
(lVar1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x1d7);
if ((*(byte *)((long)local_20 + 0x44) & 1) != 0) {
if ((*(byte *)((long)local_20 + 0x44) >> 1 & 1) == 0) {
if (((param_3 == '\0') || (*(char *)(lVar1 + 0x7e7) == '\0')) ||
(cVar3 = trnman_exists_active_transactions
(*(int8 *)(*(long *)(lVar1 + 0x450) + 8),
*(int8 *)(param_1 + 0x88),1), cVar3 == '\0')) {
local_38 = *(long **)(lVar1 + 0x450);
}
else {
local_38 = (long *)my_malloc(0,0x48,0x10);
if (local_38 == (long *)0x0) {
local_13 = 1;
inline_mysql_mutex_unlock(lVar1 + 0x8f0);
my_free(local_20);
local_20 = puVar2;
goto LAB_00148049;
}
memcpy(local_38 + 2,(void *)(*(long *)(lVar1 + 0x450) + 0x10),0x38);
*local_38 = *(long *)(lVar1 + 0x450);
*(long **)(lVar1 + 0x450) = local_38;
}
local_38[2] = (local_20[2] - local_20[9]) + local_38[2];
*(int *)(local_38 + 8) =
(*(int *)(local_20 + 8) - *(int *)(local_20 + 0xf)) + (int)local_38[8];
local_38[1] = *(long *)(param_1 + 0x88);
*(int8 *)(lVar1 + 0xe8) = *(int8 *)(param_1 + 0x88);
if (*local_38 != 0) {
uVar4 = _ma_remove_not_visible_states(local_38,0,1);
*(int8 *)(lVar1 + 0x450) = uVar4;
}
}
else {
_ma_reset_history(lVar1);
}
}
decrement_share_in_trans(lVar1);
}
my_free(local_20);
local_20 = puVar2;
} while( true );
}
|
|
14,052
|
ma_trnman_end_trans_hook
|
eloqsql/storage/maria/ma_state.c
|
my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit,
my_bool active_transactions)
{
my_bool error= 0;
MARIA_USED_TABLES *tables, *next;
DBUG_ENTER("_ma_trnman_end_trans_hook");
DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables));
for (tables= (MARIA_USED_TABLES*) trn->used_tables;
tables;
tables= next)
{
MARIA_SHARE *share= tables->share;
next= tables->next;
if (commit)
{
MARIA_STATE_HISTORY *history;
mysql_mutex_lock(&share->intern_lock);
/* We only have to update history state if something changed */
if (tables->state_current.changed)
{
if (tables->state_current.no_transid)
{
/*
The change was done without using transid on rows (like in
bulk insert). In this case this thread is the only one
that is using the table and all rows will be visible
for all transactions.
*/
_ma_reset_history(share);
}
else
{
if (active_transactions && share->now_transactional &&
trnman_exists_active_transactions(share->state_history->trid,
trn->commit_trid, 1))
{
/*
There exist transactions that are still using the current
share->state_history. Create a new history item for this
commit and add it first in the state_history list. This
ensures that all history items are stored in the list in
decresing trid order.
*/
if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history),
MYF(MY_WME))))
{
/* purecov: begin inspected */
error= 1;
mysql_mutex_unlock(&share->intern_lock);
my_free(tables);
continue;
/* purecov: end */
}
history->state= share->state_history->state;
history->next= share->state_history;
share->state_history= history;
}
else
{
/* Previous history can't be seen by anyone, reuse old memory */
history= share->state_history;
DBUG_PRINT("info", ("removing history->trid: %lu new: %lu",
(ulong) history->trid,
(ulong) trn->commit_trid));
}
history->state.records+= (tables->state_current.records -
tables->state_start.records);
history->state.checksum+= (tables->state_current.checksum -
tables->state_start.checksum);
history->trid= trn->commit_trid;
share->state.last_change_trn= trn->commit_trid;
if (history->next)
{
/* Remove not visible states */
share->state_history= _ma_remove_not_visible_states(history, 0, 1);
}
DBUG_PRINT("info", ("share: %p in_trans: %d",
share, share->in_trans));
}
}
/* The following calls frees &share->intern_lock */
decrement_share_in_trans(share);
}
else
{
/*
We need to keep share->in_trans correct because of the check
in free_maria_share()
*/
mysql_mutex_lock(&share->intern_lock);
decrement_share_in_trans(share);
}
my_free(tables);
}
trn->used_tables= 0;
trn->used_instances= 0;
DBUG_RETURN(error);
}
|
O3
|
c
|
ma_trnman_end_trans_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
leaq 0x58(%rdi), %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x58(%rdi), %r15
testq %r15, %r15
je 0x43d28
movl %esi, %r14d
movl $0x0, -0x2c(%rbp)
movq %r15, %r12
movq (%r15), %r15
movq 0x8(%r12), %rbx
leaq 0x8f0(%rbx), %r13
movq 0x930(%rbx), %rax
movq %r13, %rdi
testb %r14b, %r14b
je 0x43c19
testq %rax, %rax
jne 0x43cd8
callq 0x2a1f0
movb 0x44(%r12), %al
testb $0x1, %al
je 0x43c84
testb $0x2, %al
jne 0x43c29
cmpb $0x0, -0x30(%rbp)
je 0x43c33
cmpb $0x0, 0x7e7(%rbx)
je 0x43c33
movq 0x450(%rbx), %rax
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rsi
movl $0x1, %edx
callq 0x61a31
testb %al, %al
je 0x43c33
movl $0x48, %esi
movl $0x10, %edx
xorl %edi, %edi
callq 0xa46f9
testq %rax, %rax
je 0x43cbd
movq %rax, %rdi
movq 0x450(%rbx), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x40(%rdi)
movups 0x10(%rax), %xmm0
movups 0x20(%rax), %xmm1
movups 0x30(%rax), %xmm2
movups %xmm2, 0x30(%rdi)
movups %xmm1, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq 0x450(%rbx), %rax
movq %rax, (%rdi)
movq %rdi, 0x450(%rbx)
jmp 0x43c3a
testq %rax, %rax
jne 0x43d00
callq 0x2a1f0
jmp 0x43c84
movq %rbx, %rdi
callq 0x43d4b
jmp 0x43c84
movq 0x450(%rbx), %rdi
movq 0x10(%r12), %rax
subq 0x48(%r12), %rax
addq %rax, 0x10(%rdi)
movl 0x40(%r12), %eax
subl 0x78(%r12), %eax
addl %eax, 0x40(%rdi)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rdi)
movq %rax, 0xe8(%rbx)
cmpq $0x0, (%rdi)
je 0x43c84
xorl %esi, %esi
movl $0x1, %edx
callq 0x436c6
movq %rax, 0x450(%rbx)
decl 0x7ac(%rbx)
je 0x43ca2
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x43cee
movq %r13, %rdi
callq 0x2a1c0
jmp 0x43caa
movq %rbx, %rdi
callq 0x5c7b0
movq %r12, %rdi
callq 0xa4926
testq %r15, %r15
jne 0x43b3f
jmp 0x43d2f
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x43d16
movq %r13, %rdi
callq 0x2a1c0
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x43caa
leaq 0x9a391(%rip), %rsi # 0xde070
movl $0x1d7, %edx # imm = 0x1D7
callq 0x306c5
jmp 0x43b72
leaq 0x3486d3(%rip), %rax # 0x38c3c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x43c98
leaq 0x9a369(%rip), %rsi # 0xde070
movl $0x224, %edx # imm = 0x224
callq 0x306c5
jmp 0x43c84
leaq 0x3486ab(%rip), %rax # 0x38c3c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x43cc9
movl $0x0, -0x2c(%rbp)
xorps %xmm0, %xmm0
movq -0x40(%rbp), %rax
movups %xmm0, (%rax)
movl -0x2c(%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_trnman_end_trans_hook:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], edx
lea rax, [rdi+58h]
mov [rbp+var_40], rax
mov [rbp+var_38], rdi
mov r15, [rdi+58h]
test r15, r15
jz loc_43D28
mov r14d, esi
mov [rbp+var_2C], 0
loc_43B3F:
mov r12, r15
mov r15, [r15]
mov rbx, [r12+8]
lea r13, [rbx+8F0h]
mov rax, [rbx+930h]
mov rdi, r13
test r14b, r14b
jz loc_43C19
test rax, rax
jnz loc_43CD8
call _pthread_mutex_lock
loc_43B72:
mov al, [r12+44h]
test al, 1
jz loc_43C84
test al, 2
jnz loc_43C29
cmp byte ptr [rbp+var_30], 0
jz loc_43C33
cmp byte ptr [rbx+7E7h], 0
jz loc_43C33
mov rax, [rbx+450h]
mov rdi, [rax+8]
mov rax, [rbp+var_38]
mov rsi, [rax+88h]
mov edx, 1
call trnman_exists_active_transactions
test al, al
jz short loc_43C33
mov esi, 48h ; 'H'
mov edx, 10h
xor edi, edi
call my_malloc
test rax, rax
jz loc_43CBD
mov rdi, rax
mov rax, [rbx+450h]
mov rcx, [rax+40h]
mov [rdi+40h], rcx
movups xmm0, xmmword ptr [rax+10h]
movups xmm1, xmmword ptr [rax+20h]
movups xmm2, xmmword ptr [rax+30h]
movups xmmword ptr [rdi+30h], xmm2
movups xmmword ptr [rdi+20h], xmm1
movups xmmword ptr [rdi+10h], xmm0
mov rax, [rbx+450h]
mov [rdi], rax
mov [rbx+450h], rdi
jmp short loc_43C3A
loc_43C19:
test rax, rax
jnz loc_43D00
call _pthread_mutex_lock
jmp short loc_43C84
loc_43C29:
mov rdi, rbx
call _ma_reset_history
jmp short loc_43C84
loc_43C33:
mov rdi, [rbx+450h]
loc_43C3A:
mov rax, [r12+10h]
sub rax, [r12+48h]
add [rdi+10h], rax
mov eax, [r12+40h]
sub eax, [r12+78h]
add [rdi+40h], eax
mov rax, [rbp+var_38]
mov rax, [rax+88h]
mov [rdi+8], rax
mov [rbx+0E8h], rax
cmp qword ptr [rdi], 0
jz short loc_43C84
xor esi, esi
mov edx, 1
call _ma_remove_not_visible_states
mov [rbx+450h], rax
loc_43C84:
dec dword ptr [rbx+7ACh]
jz short loc_43CA2
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_43CEE
loc_43C98:
mov rdi, r13
call _pthread_mutex_unlock
jmp short loc_43CAA
loc_43CA2:
mov rdi, rbx
call free_maria_share
loc_43CAA:
mov rdi, r12
call my_free
test r15, r15
jnz loc_43B3F
jmp short loc_43D2F
loc_43CBD:
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_43D16
loc_43CC9:
mov rdi, r13
call _pthread_mutex_unlock
mov al, 1
mov [rbp+var_2C], eax
jmp short loc_43CAA
loc_43CD8:
lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1D7h
call psi_mutex_lock
jmp loc_43B72
loc_43CEE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_43C98
loc_43D00:
lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 224h
call psi_mutex_lock
jmp loc_43C84
loc_43D16:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_43CC9
loc_43D28:
mov [rbp+var_2C], 0
loc_43D2F:
xorps xmm0, xmm0
mov rax, [rbp+var_40]
movups xmmword ptr [rax], xmm0
mov eax, [rbp+var_2C]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_trnman_end_trans_hook(long long a1, char a2, char a3)
{
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // rax
long long v7; // rdi
char v8; // al
long long v9; // rax
long long v10; // rdi
long long v11; // rax
__int128 v12; // xmm0
__int128 v13; // xmm1
long long v14; // rax
long long v16; // rax
_OWORD *v18; // [rsp+0h] [rbp-40h]
unsigned int v21; // [rsp+14h] [rbp-2Ch]
v18 = (_OWORD *)(a1 + 88);
v3 = *(_QWORD **)(a1 + 88);
if ( v3 )
{
v21 = 0;
while ( 1 )
{
v4 = v3;
v3 = (_QWORD *)*v3;
v5 = v4[1];
v6 = *(_QWORD *)(v5 + 2352);
v7 = v5 + 2288;
if ( a2 )
{
if ( v6 )
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x1D7u);
else
pthread_mutex_lock(v7);
v8 = *((_BYTE *)v4 + 68);
if ( (v8 & 1) != 0 )
{
if ( (v8 & 2) != 0 )
{
ma_reset_history(v5);
}
else
{
if ( a3
&& *(_BYTE *)(v5 + 2023)
&& (unsigned __int8)trnman_exists_active_transactions(
*(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL),
*(_QWORD *)(a1 + 136),
1LL) )
{
v9 = my_malloc(0LL, 72LL, 16LL);
if ( !v9 )
{
if ( *(_QWORD *)(v5 + 2352) )
PSI_server[44]();
v16 = pthread_mutex_unlock(v5 + 2288);
LOBYTE(v16) = 1;
v21 = v16;
goto LABEL_24;
}
v10 = v9;
v11 = *(_QWORD *)(v5 + 1104);
*(_QWORD *)(v10 + 64) = *(_QWORD *)(v11 + 64);
v12 = *(_OWORD *)(v11 + 16);
v13 = *(_OWORD *)(v11 + 32);
*(_OWORD *)(v10 + 48) = *(_OWORD *)(v11 + 48);
*(_OWORD *)(v10 + 32) = v13;
*(_OWORD *)(v10 + 16) = v12;
*(_QWORD *)v10 = *(_QWORD *)(v5 + 1104);
*(_QWORD *)(v5 + 1104) = v10;
}
else
{
v10 = *(_QWORD *)(v5 + 1104);
}
*(_QWORD *)(v10 + 16) += v4[2] - v4[9];
*(_DWORD *)(v10 + 64) += *((_DWORD *)v4 + 16) - *((_DWORD *)v4 + 30);
v14 = *(_QWORD *)(a1 + 136);
*(_QWORD *)(v10 + 8) = v14;
*(_QWORD *)(v5 + 232) = v14;
if ( *(_QWORD *)v10 )
*(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v10, 0, 1);
}
}
}
else if ( v6 )
{
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x224u);
}
else
{
pthread_mutex_lock(v7);
}
if ( (*(_DWORD *)(v5 + 1964))-- == 1 )
{
free_maria_share(v5);
}
else
{
if ( *(_QWORD *)(v5 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v5 + 2288);
}
LABEL_24:
my_free(v4);
if ( !v3 )
goto LABEL_32;
}
}
v21 = 0;
LABEL_32:
*v18 = 0LL;
return v21;
}
|
_ma_trnman_end_trans_hook:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],EDX
LEA RAX,[RDI + 0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV R15,qword ptr [RDI + 0x58]
TEST R15,R15
JZ 0x00143d28
MOV R14D,ESI
MOV dword ptr [RBP + -0x2c],0x0
LAB_00143b3f:
MOV R12,R15
MOV R15,qword ptr [R15]
MOV RBX,qword ptr [R12 + 0x8]
LEA R13,[RBX + 0x8f0]
MOV RAX,qword ptr [RBX + 0x930]
MOV RDI,R13
TEST R14B,R14B
JZ 0x00143c19
TEST RAX,RAX
JNZ 0x00143cd8
CALL 0x0012a1f0
LAB_00143b72:
MOV AL,byte ptr [R12 + 0x44]
TEST AL,0x1
JZ 0x00143c84
TEST AL,0x2
JNZ 0x00143c29
CMP byte ptr [RBP + -0x30],0x0
JZ 0x00143c33
CMP byte ptr [RBX + 0x7e7],0x0
JZ 0x00143c33
MOV RAX,qword ptr [RBX + 0x450]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x88]
MOV EDX,0x1
CALL 0x00161a31
TEST AL,AL
JZ 0x00143c33
MOV ESI,0x48
MOV EDX,0x10
XOR EDI,EDI
CALL 0x001a46f9
TEST RAX,RAX
JZ 0x00143cbd
MOV RDI,RAX
MOV RAX,qword ptr [RBX + 0x450]
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RDI + 0x40],RCX
MOVUPS XMM0,xmmword ptr [RAX + 0x10]
MOVUPS XMM1,xmmword ptr [RAX + 0x20]
MOVUPS XMM2,xmmword ptr [RAX + 0x30]
MOVUPS xmmword ptr [RDI + 0x30],XMM2
MOVUPS xmmword ptr [RDI + 0x20],XMM1
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOV RAX,qword ptr [RBX + 0x450]
MOV qword ptr [RDI],RAX
MOV qword ptr [RBX + 0x450],RDI
JMP 0x00143c3a
LAB_00143c19:
TEST RAX,RAX
JNZ 0x00143d00
CALL 0x0012a1f0
JMP 0x00143c84
LAB_00143c29:
MOV RDI,RBX
CALL 0x00143d4b
JMP 0x00143c84
LAB_00143c33:
MOV RDI,qword ptr [RBX + 0x450]
LAB_00143c3a:
MOV RAX,qword ptr [R12 + 0x10]
SUB RAX,qword ptr [R12 + 0x48]
ADD qword ptr [RDI + 0x10],RAX
MOV EAX,dword ptr [R12 + 0x40]
SUB EAX,dword ptr [R12 + 0x78]
ADD dword ptr [RDI + 0x40],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RDI + 0x8],RAX
MOV qword ptr [RBX + 0xe8],RAX
CMP qword ptr [RDI],0x0
JZ 0x00143c84
XOR ESI,ESI
MOV EDX,0x1
CALL 0x001436c6
MOV qword ptr [RBX + 0x450],RAX
LAB_00143c84:
DEC dword ptr [RBX + 0x7ac]
JZ 0x00143ca2
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00143cee
LAB_00143c98:
MOV RDI,R13
CALL 0x0012a1c0
JMP 0x00143caa
LAB_00143ca2:
MOV RDI,RBX
CALL 0x0015c7b0
LAB_00143caa:
MOV RDI,R12
CALL 0x001a4926
TEST R15,R15
JNZ 0x00143b3f
JMP 0x00143d2f
LAB_00143cbd:
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00143d16
LAB_00143cc9:
MOV RDI,R13
CALL 0x0012a1c0
MOV AL,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00143caa
LAB_00143cd8:
LEA RSI,[0x1de070]
MOV EDX,0x1d7
CALL 0x001306c5
JMP 0x00143b72
LAB_00143cee:
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00143c98
LAB_00143d00:
LEA RSI,[0x1de070]
MOV EDX,0x224
CALL 0x001306c5
JMP 0x00143c84
LAB_00143d16:
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00143cc9
LAB_00143d28:
MOV dword ptr [RBP + -0x2c],0x0
LAB_00143d2f:
XORPS XMM0,XMM0
MOV RAX,qword ptr [RBP + -0x40]
MOVUPS xmmword ptr [RAX],XMM0
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3)
{
pthread_mutex_t *__mutex;
int *piVar1;
long *plVar2;
long lVar3;
long lVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int4 uVar8;
long lVar9;
long lVar10;
long lVar11;
char cVar12;
int iVar13;
long *plVar14;
int8 uVar15;
long *plVar16;
int4 local_34;
if (*(long **)(param_1 + 0x58) == (long *)0x0) {
local_34 = 0;
}
else {
local_34 = 0;
plVar16 = *(long **)(param_1 + 0x58);
do {
plVar2 = (long *)*plVar16;
lVar3 = plVar16[1];
__mutex = (pthread_mutex_t *)(lVar3 + 0x8f0);
if (param_2 == '\0') {
if (*(long *)(lVar3 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c"
,0x224);
}
LAB_00143c84:
piVar1 = (int *)(lVar3 + 0x7ac);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
free_maria_share(lVar3);
}
else {
if (*(long *)(lVar3 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
}
else {
if (*(long *)(lVar3 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c"
,0x1d7);
}
if ((*(byte *)((long)plVar16 + 0x44) & 1) == 0) goto LAB_00143c84;
if ((*(byte *)((long)plVar16 + 0x44) & 2) != 0) {
_ma_reset_history(lVar3);
goto LAB_00143c84;
}
if (((param_3 == '\0') || (*(char *)(lVar3 + 0x7e7) == '\0')) ||
(cVar12 = trnman_exists_active_transactions
(*(int8 *)(*(long *)(lVar3 + 0x450) + 8),
*(int8 *)(param_1 + 0x88),1), cVar12 == '\0')) {
plVar14 = *(long **)(lVar3 + 0x450);
LAB_00143c3a:
plVar14[2] = plVar14[2] + (plVar16[2] - plVar16[9]);
*(int *)(plVar14 + 8) = (int)plVar14[8] + ((int)plVar16[8] - (int)plVar16[0xf]);
lVar4 = *(long *)(param_1 + 0x88);
plVar14[1] = lVar4;
*(long *)(lVar3 + 0xe8) = lVar4;
if (*plVar14 != 0) {
uVar15 = _ma_remove_not_visible_states(plVar14,0,1);
*(int8 *)(lVar3 + 0x450) = uVar15;
}
goto LAB_00143c84;
}
plVar14 = (long *)my_malloc(0,0x48,0x10);
if (plVar14 != (long *)0x0) {
lVar4 = *(long *)(lVar3 + 0x450);
plVar14[8] = *(long *)(lVar4 + 0x40);
uVar5 = *(int4 *)(lVar4 + 0x10);
uVar6 = *(int4 *)(lVar4 + 0x14);
uVar7 = *(int4 *)(lVar4 + 0x18);
uVar8 = *(int4 *)(lVar4 + 0x1c);
lVar9 = *(long *)(lVar4 + 0x20);
lVar10 = *(long *)(lVar4 + 0x28);
lVar11 = *(long *)(lVar4 + 0x38);
plVar14[6] = *(long *)(lVar4 + 0x30);
plVar14[7] = lVar11;
plVar14[4] = lVar9;
plVar14[5] = lVar10;
*(int4 *)(plVar14 + 2) = uVar5;
*(int4 *)((long)plVar14 + 0x14) = uVar6;
*(int4 *)(plVar14 + 3) = uVar7;
*(int4 *)((long)plVar14 + 0x1c) = uVar8;
*plVar14 = *(long *)(lVar3 + 0x450);
*(long **)(lVar3 + 0x450) = plVar14;
goto LAB_00143c3a;
}
if (*(long *)(lVar3 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
iVar13 = pthread_mutex_unlock(__mutex);
local_34 = (int4)CONCAT71((uint7)(uint3)((uint)iVar13 >> 8),1);
}
my_free(plVar16);
plVar16 = plVar2;
} while (plVar2 != (long *)0x0);
}
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return local_34;
}
|
|
14,053
|
testing::internal::CapturedStream::CapturedStream(int)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
|
explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
#ifdef GTEST_OS_WINDOWS
char temp_dir_path[MAX_PATH + 1] = {'\0'}; // NOLINT
char temp_file_path[MAX_PATH + 1] = {'\0'}; // NOLINT
::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
const UINT success = ::GetTempFileNameA(temp_dir_path, "gtest_redir",
0, // Generate unique file name.
temp_file_path);
GTEST_CHECK_(success != 0)
<< "Unable to create a temporary file in " << temp_dir_path;
const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
GTEST_CHECK_(captured_fd != -1)
<< "Unable to open temporary file " << temp_file_path;
filename_ = temp_file_path;
#else
// There's no guarantee that a test has write access to the current
// directory, so we create the temporary file in a temporary directory.
std::string name_template;
#ifdef GTEST_OS_LINUX_ANDROID
// Note: Android applications are expected to call the framework's
// Context.getExternalStorageDirectory() method through JNI to get
// the location of the world-writable SD Card directory. However,
// this requires a Context handle, which cannot be retrieved
// globally from native code. Doing so also precludes running the
// code as part of a regular standalone executable, which doesn't
// run in a Dalvik process (e.g. when running it through 'adb shell').
//
// The location /data/local/tmp is directly accessible from native code.
// '/sdcard' and other variants cannot be relied on, as they are not
// guaranteed to be mounted, or may have a delay in mounting.
//
// However, prefer using the TMPDIR environment variable if set, as newer
// devices may have /data/local/tmp read-only.
name_template = TempDir();
if (!EndsWithPathSeparator(name_template))
name_template.push_back(GTEST_PATH_SEP_[0]);
#elif defined(GTEST_OS_IOS)
char user_temp_dir[PATH_MAX + 1];
// Documented alternative to NSTemporaryDirectory() (for obtaining creating
// a temporary directory) at
// https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10
//
// _CS_DARWIN_USER_TEMP_DIR (as well as _CS_DARWIN_USER_CACHE_DIR) is not
// documented in the confstr() man page at
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/confstr.3.html#//apple_ref/doc/man/3/confstr
// but are still available, according to the WebKit patches at
// https://trac.webkit.org/changeset/262004/webkit
// https://trac.webkit.org/changeset/263705/webkit
//
// The confstr() implementation falls back to getenv("TMPDIR"). See
// https://opensource.apple.com/source/Libc/Libc-1439.100.3/gen/confstr.c.auto.html
::confstr(_CS_DARWIN_USER_TEMP_DIR, user_temp_dir, sizeof(user_temp_dir));
name_template = user_temp_dir;
if (!EndsWithPathSeparator(name_template))
name_template.push_back(GTEST_PATH_SEP_[0]);
#else
name_template = "/tmp/";
#endif
name_template.append("gtest_captured_stream.XXXXXX");
// mkstemp() modifies the string bytes in place, and does not go beyond the
// string's length. This results in well-defined behavior in C++17.
//
// The const_cast is needed below C++17. The constraints on std::string
// implementations in C++11 and above make assumption behind the const_cast
// fairly safe.
const int captured_fd = ::mkstemp(const_cast<char*>(name_template.data()));
if (captured_fd == -1) {
GTEST_LOG_(WARNING)
<< "Failed to create tmp file " << name_template
<< " for test; does the test have access to the /tmp directory?";
}
filename_ = std::move(name_template);
#endif // GTEST_OS_WINDOWS
fflush(nullptr);
dup2(captured_fd, fd_);
close(captured_fd);
}
|
O0
|
cpp
|
testing::internal::CapturedStream::CapturedStream(int):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x6c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x6c(%rsp), %edi
callq 0xb830
movq 0x18(%rsp), %rdi
movl %eax, 0x4(%rdi)
addq $0x8, %rdi
movq %rdi, 0x20(%rsp)
callq 0x117b0
leaq 0x48(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x117b0
movq 0x28(%rsp), %rdi
leaq 0x23a9a(%rip), %rsi # 0x75a21
callq 0x464f0
jmp 0x51f8e
leaq 0x23e31(%rip), %rsi # 0x75dc6
leaq 0x48(%rsp), %rdi
callq 0x11750
jmp 0x51fa1
leaq 0x48(%rsp), %rdi
callq 0x520d0
movq %rax, %rdi
callq 0xb160
movl %eax, 0x14(%rsp)
jmp 0x51fb9
movl 0x14(%rsp), %eax
movl %eax, 0x38(%rsp)
cmpl $-0x1, 0x38(%rsp)
jne 0x52066
leaq 0x22313(%rip), %rdx # 0x742e6
leaq 0x34(%rsp), %rdi
movl $0x1, %esi
movl $0x478, %ecx # imm = 0x478
callq 0x1b8d0
jmp 0x51fe9
leaq 0x34(%rsp), %rdi
callq 0x107d0
movq %rax, %rdi
leaq 0x23de6(%rip), %rsi # 0x75de3
callq 0xb460
movq %rax, 0x8(%rsp)
jmp 0x52009
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xb3f0
movq %rax, (%rsp)
jmp 0x5201e
movq (%rsp), %rdi
leaq 0x23dd5(%rip), %rsi # 0x75dfe
callq 0xb460
jmp 0x52030
leaq 0x34(%rsp), %rdi
callq 0x1ba40
jmp 0x52066
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x520ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x34(%rsp), %rdi
callq 0x1ba40
jmp 0x520ae
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
leaq 0x48(%rsp), %rsi
callq 0x462b0
xorl %eax, %eax
movl %eax, %edi
callq 0xb5c0
jmp 0x52084
movq 0x18(%rsp), %rax
movl 0x38(%rsp), %edi
movl (%rax), %esi
callq 0xb450
movl 0x38(%rsp), %edi
callq 0xba40
jmp 0x5209f
leaq 0x48(%rsp), %rdi
callq 0xec60
addq $0x78, %rsp
retq
leaq 0x48(%rsp), %rdi
callq 0xec60
movq 0x20(%rsp), %rdi
callq 0xec60
movq 0x40(%rsp), %rdi
callq 0xb910
nopl (%rax)
|
_ZN7testing8internal14CapturedStreamC2Ei:
sub rsp, 78h
mov qword ptr [rsp+78h+var_8], rdi
mov [rsp+78h+var_C], esi
mov rax, qword ptr [rsp+78h+var_8]
mov qword ptr [rsp+78h+var_60], rax; int
mov ecx, [rsp+78h+var_C]
mov [rax], ecx
mov edi, [rsp+78h+var_C]
call _dup
mov rdi, qword ptr [rsp+78h+var_60]
mov [rdi+4], eax
add rdi, 8
mov qword ptr [rsp+78h+var_58], rdi; int
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
lea rdi, [rsp+78h+var_30]
mov qword ptr [rsp+78h+var_50], rdi; int
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, qword ptr [rsp+78h+var_50]
lea rsi, aTmp; "/tmp/"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_51F8E:
lea rsi, aGtestCapturedS; "gtest_captured_stream.XXXXXX"
lea rdi, [rsp+78h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short $+2
loc_51FA1:
lea rdi, [rsp+78h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, rax
call _mkstemp
mov [rsp+78h+var_64], eax
jmp short $+2
loc_51FB9:
mov eax, [rsp+78h+var_64]
mov [rsp+78h+var_40], eax; int
cmp [rsp+78h+var_40], 0FFFFFFFFh
jnz loc_52066
lea rdx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+78h+var_44]; int
mov esi, 1
mov ecx, 478h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_51FE9:
lea rdi, [rsp+78h+var_44]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov rdi, rax
lea rsi, aFailedToCreate; "Failed to create tmp file "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+78h+var_70], rax
jmp short $+2
loc_52009:
mov rdi, [rsp+78h+var_70]
lea rsi, [rsp+78h+var_30]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+78h+var_78], rax
jmp short $+2
loc_5201E:
mov rdi, [rsp+78h+var_78]
lea rsi, aForTestDoesThe; " for test; does the test have access to"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_52030:
lea rdi, [rsp+78h+var_44]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_52066
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_520AE
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_2C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_520AE
loc_52066:
mov rdi, qword ptr [rsp+78h+var_60]
add rdi, 8
lea rsi, [rsp+78h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
xor eax, eax
mov edi, eax
call _fflush
jmp short $+2
loc_52084:
mov rax, qword ptr [rsp+78h+var_60]
mov edi, [rsp+78h+var_40]
mov esi, [rax]
call _dup2
mov edi, [rsp+78h+var_40]
call _close
jmp short $+2
loc_5209F:
lea rdi, [rsp+78h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 78h
retn
loc_520AE:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
void testing::internal::CapturedStream::CapturedStream(
testing::internal::CapturedStream *this,
unsigned int a2)
{
long long v2; // rax
void *Stream; // rax
long long v4; // [rsp+0h] [rbp-78h]
long long v5; // [rsp+8h] [rbp-70h]
int v6; // [rsp+34h] [rbp-44h] BYREF
int v7; // [rsp+38h] [rbp-40h]
_QWORD v8[4]; // [rsp+48h] [rbp-30h] BYREF
unsigned int v9; // [rsp+6Ch] [rbp-Ch]
int v10[2]; // [rsp+70h] [rbp-8h]
*(_QWORD *)v10 = this;
v9 = a2;
*(_DWORD *)this = a2;
*((_DWORD *)this + 1) = dup(v9);
std::string::basic_string((_QWORD *)this + 1);
std::string::basic_string(v8);
std::string::operator=((long long)v8, (long long)"/tmp/");
std::string::append((long long)v8, (long long)"gtest_captured_stream.XXXXXX");
v2 = std::string::data(v8);
v7 = mkstemp(v2);
if ( v7 == -1 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v6,
1,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc",
1144);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v6);
v5 = std::operator<<<std::char_traits<char>>(Stream, "Failed to create tmp file ");
v4 = std::operator<<<char>(v5, v8);
std::operator<<<std::char_traits<char>>(v4, " for test; does the test have access to the /tmp directory?");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v6);
}
std::string::operator=((_QWORD *)this + 1, v8);
fflush(0LL);
dup2((unsigned int)v7, *(unsigned int *)this);
close((unsigned int)v7);
std::string::~string(v8);
}
|
CapturedStream:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ESI
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x18],RAX
MOV ECX,dword ptr [RSP + 0x6c]
MOV dword ptr [RAX],ECX
MOV EDI,dword ptr [RSP + 0x6c]
CALL 0x0010b830
MOV RDI,qword ptr [RSP + 0x18]
MOV dword ptr [RDI + 0x4],EAX
ADD RDI,0x8
MOV qword ptr [RSP + 0x20],RDI
CALL 0x001117b0
LEA RDI,[RSP + 0x48]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001117b0
MOV RDI,qword ptr [RSP + 0x28]
LAB_00151f80:
LEA RSI,[0x175a21]
CALL 0x001464f0
JMP 0x00151f8e
LAB_00151f8e:
LEA RSI,[0x175dc6]
LEA RDI,[RSP + 0x48]
CALL 0x00111750
JMP 0x00151fa1
LAB_00151fa1:
LEA RDI,[RSP + 0x48]
CALL 0x001520d0
MOV RDI,RAX
CALL 0x0010b160
MOV dword ptr [RSP + 0x14],EAX
JMP 0x00151fb9
LAB_00151fb9:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x38],EAX
CMP dword ptr [RSP + 0x38],-0x1
JNZ 0x00152066
LEA RDX,[0x1742e6]
LEA RDI,[RSP + 0x34]
MOV ESI,0x1
MOV ECX,0x478
CALL 0x0011b8d0
JMP 0x00151fe9
LAB_00151fe9:
LEA RDI,[RSP + 0x34]
CALL 0x001107d0
MOV RDI,RAX
LAB_00151ff6:
LEA RSI,[0x175de3]
CALL 0x0010b460
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00152009
LAB_00152009:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x48]
CALL 0x0010b3f0
MOV qword ptr [RSP],RAX
JMP 0x0015201e
LAB_0015201e:
MOV RDI,qword ptr [RSP]
LEA RSI,[0x175dfe]
CALL 0x0010b460
LAB_0015202e:
JMP 0x00152030
LAB_00152030:
LEA RDI,[RSP + 0x34]
CALL 0x0011ba40
JMP 0x00152066
LAB_00152066:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
LEA RSI,[RSP + 0x48]
CALL 0x001462b0
LAB_00152079:
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0010b5c0
JMP 0x00152084
LAB_00152084:
MOV RAX,qword ptr [RSP + 0x18]
MOV EDI,dword ptr [RSP + 0x38]
MOV ESI,dword ptr [RAX]
CALL 0x0010b450
MOV EDI,dword ptr [RSP + 0x38]
CALL 0x0010ba40
LAB_0015209d:
JMP 0x0015209f
LAB_0015209f:
LEA RDI,[RSP + 0x48]
CALL 0x0010ec60
ADD RSP,0x78
RET
|
/* testing::internal::CapturedStream::CapturedStream(int) */
void __thiscall testing::internal::CapturedStream::CapturedStream(CapturedStream *this,int param_1)
{
int iVar1;
char *__template;
ostream *poVar2;
GTestLog local_44 [4];
int local_40;
string local_30 [36];
int local_c;
CapturedStream *local_8;
*(int *)this = param_1;
local_c = param_1;
local_8 = this;
iVar1 = dup(param_1);
*(int *)(this + 4) = iVar1;
std::__cxx11::string::string((string *)(this + 8));
std::__cxx11::string::string(local_30);
/* try { // try from 00151f80 to 00151fe6 has its CatchHandler @ 0015203c */
std::__cxx11::string::operator=(local_30,"/tmp/");
std::__cxx11::string::append(local_30,"gtest_captured_stream.XXXXXX");
__template = (char *)std::__cxx11::string::data(local_30);
local_40 = mkstemp(__template);
if (local_40 == -1) {
GTestLog::GTestLog(local_44,1,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc"
,0x478);
poVar2 = (ostream *)GTestLog::GetStream();
/* try { // try from 00151ff6 to 0015202d has its CatchHandler @ 0015204c */
poVar2 = std::operator<<(poVar2,"Failed to create tmp file ");
poVar2 = std::operator<<(poVar2,local_30);
std::operator<<(poVar2," for test; does the test have access to the /tmp directory?");
GTestLog::~GTestLog(local_44);
}
std::__cxx11::string::operator=((string *)(this + 8),local_30);
/* try { // try from 00152079 to 0015209c has its CatchHandler @ 0015203c */
fflush((FILE *)0x0);
dup2(local_40,*(int *)this);
close(local_40);
std::__cxx11::string::~string(local_30);
return;
}
|
|
14,054
|
ha_federated::index_read_idx_with_result_set(unsigned char*, unsigned int, unsigned char const*, unsigned int, ha_rkey_function, st_mysql_res**)
|
eloqsql/storage/federated/ha_federated.cc
|
int ha_federated::index_read_idx_with_result_set(uchar *buf, uint index,
const uchar *key,
uint key_len,
ha_rkey_function find_flag,
MYSQL_RES **result)
{
int retval;
char error_buffer[FEDERATED_QUERY_BUFFER_SIZE];
char index_value[STRING_BUFFER_USUAL_SIZE];
char sql_query_buffer[FEDERATED_QUERY_BUFFER_SIZE];
String index_string(index_value,
sizeof(index_value),
&my_charset_bin);
String sql_query(sql_query_buffer,
sizeof(sql_query_buffer),
&my_charset_bin);
key_range range;
DBUG_ENTER("ha_federated::index_read_idx_with_result_set");
*result= 0; // In case of errors
index_string.length(0);
sql_query.length(0);
sql_query.append(share->select_query, strlen(share->select_query));
range.key= key;
range.length= key_len;
range.flag= find_flag;
create_where_from_key(&index_string,
&table->key_info[index],
&range,
NULL, 0, 0);
sql_query.append(index_string);
if (real_query(sql_query.ptr(), sql_query.length()))
{
sprintf(error_buffer, "error: %d '%s'",
mysql_errno(mysql), mysql_error(mysql));
retval= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
goto error;
}
if (!(*result= store_result(mysql)))
{
retval= HA_ERR_END_OF_FILE;
goto error;
}
if ((retval= read_next(buf, *result)))
{
mysql_free_result(*result);
results.elements--;
*result= 0;
DBUG_RETURN(retval);
}
DBUG_RETURN(0);
error:
my_error(retval, MYF(0), error_buffer);
DBUG_RETURN(retval);
}
|
O3
|
cpp
|
ha_federated::index_read_idx_with_result_set(unsigned char*, unsigned int, unsigned char const*, unsigned int, ha_rkey_function, st_mysql_res**):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp # imm = 0x3F8
movl %r9d, -0x3a8(%rbp)
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, -0x3a4(%rbp)
movq %rsi, -0x3b0(%rbp)
movq %rdi, %r15
movq 0x10(%rbp), %rsi
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x5935(%rip), %rax # 0x10f88
leaq -0x3c8(%rbp), %rdx
movq %rax, -0x8(%rdx)
leaq -0x210(%rbp), %rcx
movq %rcx, (%rdx)
movq $0x50, 0xc(%rdx)
xorl %ecx, %ecx
movw %cx, 0x14(%rdx)
leaq -0x3e8(%rbp), %r12
movq %rax, -0x8(%r12)
leaq -0x3a0(%rbp), %rax
movq %rax, (%r12)
movq $0x190, 0xc(%r12) # imm = 0x190
movw %cx, 0x14(%r12)
movq $0x0, (%rsi)
movl %ecx, 0x8(%rdx)
movl %ecx, 0x8(%r12)
movq 0x538(%rdi), %rax
movq 0x50(%rax), %r13
movq %r13, %rdi
callq 0x8190
leaq -0x3f0(%rbp), %rdi
movq %r13, %rsi
movq %r12, %r13
movq %rax, %rdx
callq 0x80f0
leaq -0x410(%rbp), %rcx
movq %r14, (%rcx)
movl %ebx, 0x8(%rcx)
movl -0x3a8(%rbp), %eax
movl %eax, 0x18(%rcx)
movq 0x10(%r15), %rax
movl -0x3a4(%rbp), %edx
leaq (%rdx,%rdx,2), %rdx
shlq $0x6, %rdx
addq 0xa8(%rax), %rdx
movl $0x0, (%rsp)
leaq -0x3d0(%rbp), %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8220
movq -0x3c8(%rbp), %rsi
movl -0x3c0(%rbp), %edx
movq %r13, %rdi
callq 0x83b0
movq -0x3e8(%rbp), %rsi
movl -0x3e0(%rbp), %edx
movq %r15, %rdi
callq 0x8380
movq 0x540(%r15), %rsi
testl %eax, %eax
je 0xb7e0
movq %rsi, %rdi
callq 0x8480
movl %eax, %ebx
movq 0x540(%r15), %rdi
callq 0x8400
leaq 0x1a2b(%rip), %rsi # 0xd19c
leaq -0x1c0(%rbp), %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x8090
movl $0x596, %r12d # imm = 0x596
movq 0x57ff(%rip), %rax # 0x10f90
movq (%rax), %rcx
leaq -0x1c0(%rbp), %rdx
movl %r12d, %edi
xorl %esi, %esi
xorl %eax, %eax
callq *(%rcx)
movq %r13, %rdi
callq 0x8510
leaq -0x3c8(%rbp), %rdi
callq 0x8510
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xb871
movl %r12d, %eax
addq $0x3f8, %rsp # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x8140
movq 0x10(%rbp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0xb830
movq %r15, %rdi
movq -0x3b0(%rbp), %rsi
movq %rax, %rdx
callq 0x8370
movl %eax, %r12d
testl %eax, %eax
je 0xb83b
movq 0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x8160
decl 0x558(%r15)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0xb7a4
movl $0x89, %r12d
jmp 0xb78a
xorl %r12d, %r12d
jmp 0xb7a4
movq %rax, %rbx
movq %r13, %rdi
callq 0x8510
leaq -0x3c8(%rbp), %rdi
callq 0x8510
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xb871
movq %rbx, %rdi
callq 0x8560
callq 0x83a0
|
_ZN12ha_federated30index_read_idx_with_result_setEPhjPKhj16ha_rkey_functionPP12st_mysql_res:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 3F8h
mov [rbp+var_3A8], r9d
mov ebx, r8d
mov r14, rcx
mov [rbp+var_3A4], edx
mov [rbp+var_3B0], rsi
mov r15, rdi
mov rsi, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, cs:my_charset_bin_ptr
lea rdx, [rbp+var_3C8]
mov [rdx-8], rax
lea rcx, [rbp+var_210]
mov [rdx], rcx
mov qword ptr [rdx+0Ch], 50h ; 'P'
xor ecx, ecx
mov [rdx+14h], cx
lea r12, [rbp+var_3E8]
mov [r12-8], rax
lea rax, [rbp+var_3A0]
mov [r12], rax
mov qword ptr [r12+0Ch], 190h
mov [r12+14h], cx
mov qword ptr [rsi], 0
mov [rdx+8], ecx
mov [r12+8], ecx
mov rax, [rdi+538h]
mov r13, [rax+50h]
mov rdi, r13
call _strlen
lea rdi, [rbp+var_3F0]; this
mov rsi, r13; char *
mov r13, r12
mov rdx, rax; unsigned __int64
call __ZN6String6appendEPKcm; String::append(char const*,ulong)
lea rcx, [rbp+var_410]
mov [rcx], r14
mov [rcx+8], ebx
mov eax, [rbp+var_3A8]
mov [rcx+18h], eax
mov rax, [r15+10h]
mov edx, [rbp+var_3A4]
lea rdx, [rdx+rdx*2]
shl rdx, 6
add rdx, [rax+0A8h]
mov [rsp+420h+var_420], 0
lea rsi, [rbp+var_3D0]
xor r8d, r8d
xor r9d, r9d
call __ZN12ha_federated21create_where_from_keyEP6StringP6st_keyPK12st_key_rangeS6_bb; ha_federated::create_where_from_key(String *,st_key *,st_key_range const*,st_key_range const*,bool,bool)
mov rsi, [rbp+var_3C8]; char *
mov edx, dword ptr [rbp+var_3C0]; unsigned __int64
mov rdi, r13; this
call __ZN13Binary_string6appendEPKcm; Binary_string::append(char const*,ulong)
mov rsi, [rbp+var_3E8]; char *
mov edx, dword ptr [rbp+var_3E0]; unsigned __int64
mov rdi, r15; this
call __ZN12ha_federated10real_queryEPKcm; ha_federated::real_query(char const*,ulong)
mov rsi, [r15+540h]
test eax, eax
jz loc_B7E0
mov rdi, rsi
call _mysql_errno
mov ebx, eax
mov rdi, [r15+540h]
call _mysql_error
lea rsi, aErrorDS; "error: %d '%s'"
lea rdi, [rbp+var_1C0]
mov edx, ebx
mov rcx, rax
xor eax, eax
call _sprintf
mov r12d, 596h
loc_B78A:
mov rax, cs:my_print_error_service_ptr
mov rcx, [rax]
lea rdx, [rbp+var_1C0]
mov edi, r12d
xor esi, esi
xor eax, eax
call qword ptr [rcx]
loc_B7A4:
mov rdi, r13; this
call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string()
lea rdi, [rbp+var_3C8]; this
call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string()
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_B871
mov eax, r12d
add rsp, 3F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B7E0:
mov rdi, r15
call __ZN12ha_federated12store_resultEP8st_mysql; ha_federated::store_result(st_mysql *)
mov rcx, [rbp+arg_0]
mov [rcx], rax
test rax, rax
jz short loc_B830
mov rdi, r15
mov rsi, [rbp+var_3B0]
mov rdx, rax
call __ZN12ha_federated9read_nextEPhP12st_mysql_res; ha_federated::read_next(uchar *,st_mysql_res *)
mov r12d, eax
test eax, eax
jz short loc_B83B
mov rax, [rbp+arg_0]
mov rdi, [rax]
call _mysql_free_result
dec dword ptr [r15+558h]
mov rax, [rbp+arg_0]
mov qword ptr [rax], 0
jmp loc_B7A4
loc_B830:
mov r12d, 89h
jmp loc_B78A
loc_B83B:
xor r12d, r12d
jmp loc_B7A4
mov rbx, rax
mov rdi, r13; this
call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string()
lea rdi, [rbp+var_3C8]; this
call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string()
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_B871
mov rdi, rbx
call __Unwind_Resume
loc_B871:
call ___stack_chk_fail
|
long long ha_federated::index_read_idx_with_result_set(
ha_federated *this,
long long a2,
unsigned int a3,
long long a4,
int a5,
int a6,
long long *a7)
{
const char *v9; // r13
unsigned long long v10; // rax
int v11; // ebx
const char *v12; // rax
unsigned int next; // r12d
long long v15; // rax
long long v16; // [rsp+10h] [rbp-410h] BYREF
int v17; // [rsp+18h] [rbp-408h]
int v18; // [rsp+28h] [rbp-3F8h]
void *v19; // [rsp+30h] [rbp-3F0h] BYREF
char *v20; // [rsp+38h] [rbp-3E8h] BYREF
_DWORD v21[3]; // [rsp+40h] [rbp-3E0h]
__int16 v22; // [rsp+4Ch] [rbp-3D4h]
void *v23; // [rsp+50h] [rbp-3D0h] BYREF
char *v24; // [rsp+58h] [rbp-3C8h] BYREF
_DWORD v25[3]; // [rsp+60h] [rbp-3C0h]
__int16 v26; // [rsp+6Ch] [rbp-3B4h]
long long v27; // [rsp+70h] [rbp-3B0h]
int v28; // [rsp+78h] [rbp-3A8h]
unsigned int v29; // [rsp+7Ch] [rbp-3A4h]
char v30; // [rsp+80h] [rbp-3A0h] BYREF
char v31; // [rsp+210h] [rbp-210h] BYREF
_BYTE v32[400]; // [rsp+260h] [rbp-1C0h] BYREF
unsigned long long v33; // [rsp+3F0h] [rbp-30h]
v28 = a6;
v29 = a3;
v27 = a2;
v33 = __readfsqword(0x28u);
v23 = &my_charset_bin;
v24 = &v31;
*(_QWORD *)&v25[1] = 80LL;
v26 = 0;
v19 = &my_charset_bin;
v20 = &v30;
*(_QWORD *)&v21[1] = 400LL;
v22 = 0;
*a7 = 0LL;
v25[0] = 0;
v21[0] = 0;
v9 = *(const char **)(*((_QWORD *)this + 167) + 80LL);
v10 = strlen(v9);
String::append((String *)&v19, v9, v10);
v16 = a4;
v17 = a5;
v18 = v28;
ha_federated::create_where_from_key(
(long long)&v19,
(String *)&v23,
*(_QWORD *)(*((_QWORD *)this + 2) + 168LL) + 192LL * v29,
(long long)&v16,
0LL,
0,
0);
Binary_string::append((Binary_string *)&v20, v24, v25[0]);
if ( (unsigned int)ha_federated::real_query(this, v20, v21[0]) )
{
v11 = mysql_errno(*((_QWORD *)this + 168));
v12 = (const char *)mysql_error(*((_QWORD *)this + 168));
sprintf(v32, "error: %d '%s'", v11, v12);
next = 1430;
LABEL_3:
((void ( *)(_QWORD, _QWORD, _BYTE *))*my_print_error_service)(next, 0LL, v32);
goto LABEL_4;
}
v15 = ha_federated::store_result(this, *((_QWORD *)this + 168));
*a7 = v15;
if ( !v15 )
{
next = 137;
goto LABEL_3;
}
next = ha_federated::read_next(this, v27, v15);
if ( next )
{
mysql_free_result(*a7);
--*((_DWORD *)this + 342);
*a7 = 0LL;
}
else
{
next = 0;
}
LABEL_4:
Binary_string::~Binary_string((Binary_string *)&v20);
Binary_string::~Binary_string((Binary_string *)&v24);
return next;
}
|
index_read_idx_with_result_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x3f8
MOV dword ptr [RBP + -0x3a8],R9D
MOV EBX,R8D
MOV R14,RCX
MOV dword ptr [RBP + -0x3a4],EDX
MOV qword ptr [RBP + -0x3b0],RSI
MOV R15,RDI
MOV RSI,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [0x00110f88]
LEA RDX,[RBP + -0x3c8]
MOV qword ptr [RDX + -0x8],RAX
LEA RCX,[RBP + -0x210]
MOV qword ptr [RDX],RCX
MOV qword ptr [RDX + 0xc],0x50
XOR ECX,ECX
MOV word ptr [RDX + 0x14],CX
LEA R12,[RBP + -0x3e8]
MOV qword ptr [R12 + -0x8],RAX
LEA RAX,[RBP + -0x3a0]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0xc],0x190
MOV word ptr [R12 + 0x14],CX
MOV qword ptr [RSI],0x0
MOV dword ptr [RDX + 0x8],ECX
MOV dword ptr [R12 + 0x8],ECX
MOV RAX,qword ptr [RDI + 0x538]
MOV R13,qword ptr [RAX + 0x50]
MOV RDI,R13
CALL 0x00108190
LAB_0010b6be:
LEA RDI,[RBP + -0x3f0]
MOV RSI,R13
MOV R13,R12
MOV RDX,RAX
CALL 0x001080f0
LEA RCX,[RBP + -0x410]
MOV qword ptr [RCX],R14
MOV dword ptr [RCX + 0x8],EBX
MOV EAX,dword ptr [RBP + -0x3a8]
MOV dword ptr [RCX + 0x18],EAX
MOV RAX,qword ptr [R15 + 0x10]
MOV EDX,dword ptr [RBP + -0x3a4]
LEA RDX,[RDX + RDX*0x2]
SHL RDX,0x6
ADD RDX,qword ptr [RAX + 0xa8]
MOV dword ptr [RSP],0x0
LEA RSI,[RBP + -0x3d0]
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00108220
MOV RSI,qword ptr [RBP + -0x3c8]
MOV EDX,dword ptr [RBP + -0x3c0]
MOV RDI,R13
CALL 0x001083b0
MOV RSI,qword ptr [RBP + -0x3e8]
MOV EDX,dword ptr [RBP + -0x3e0]
MOV RDI,R15
CALL 0x00108380
MOV RSI,qword ptr [R15 + 0x540]
TEST EAX,EAX
JZ 0x0010b7e0
MOV RDI,RSI
CALL 0x00108480
MOV EBX,EAX
MOV RDI,qword ptr [R15 + 0x540]
CALL 0x00108400
LEA RSI,[0x10d19c]
LEA RDI,[RBP + -0x1c0]
MOV EDX,EBX
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00108090
MOV R12D,0x596
LAB_0010b78a:
MOV RAX,qword ptr [0x00110f90]
MOV RCX,qword ptr [RAX]
LEA RDX,[RBP + -0x1c0]
MOV EDI,R12D
XOR ESI,ESI
XOR EAX,EAX
CALL qword ptr [RCX]
LAB_0010b7a4:
MOV RDI,R13
CALL 0x00108510
LEA RDI,[RBP + -0x3c8]
CALL 0x00108510
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0010b871
MOV EAX,R12D
ADD RSP,0x3f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010b7e0:
MOV RDI,R15
CALL 0x00108140
MOV RCX,qword ptr [RBP + 0x10]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x0010b830
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x3b0]
MOV RDX,RAX
CALL 0x00108370
MOV R12D,EAX
TEST EAX,EAX
JZ 0x0010b83b
MOV RAX,qword ptr [RBP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00108160
LAB_0010b819:
DEC dword ptr [R15 + 0x558]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0010b7a4
LAB_0010b830:
MOV R12D,0x89
JMP 0x0010b78a
LAB_0010b83b:
XOR R12D,R12D
JMP 0x0010b7a4
LAB_0010b871:
CALL 0x001083a0
|
/* ha_federated::index_read_idx_with_result_set(unsigned char*, unsigned int, unsigned char const*,
unsigned int, ha_rkey_function, st_mysql_res**) */
int __thiscall
ha_federated::index_read_idx_with_result_set
(ha_federated *this,uchar *param_1,uint param_2,int8 param_3,int4 param_4,
int4 param_6,int8 *param_7)
{
char *__s;
int iVar1;
uint uVar2;
int8 uVar3;
st_mysql_res *psVar4;
ha_federated *this_00;
long in_FS_OFFSET;
int8 local_418;
int4 local_410;
int4 local_400;
int *local_3f8;
char *local_3f0;
uint local_3e8;
int8 local_3e4;
int2 local_3dc;
int *local_3d8;
char *local_3d0;
uint local_3c8;
int8 local_3c4;
int2 local_3bc;
uchar *local_3b8;
int4 local_3b0;
uint local_3ac;
char local_3a8 [400];
char local_218 [80];
char local_1c8 [400];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_3d8 = PTR_my_charset_bin_00110f88;
local_3d0 = local_218;
local_3c4 = 0x50;
local_3bc = 0;
local_3f8 = PTR_my_charset_bin_00110f88;
local_3f0 = local_3a8;
local_3e4 = 400;
local_3dc = 0;
*param_7 = 0;
local_3c8 = 0;
local_3e8 = 0;
__s = *(char **)(*(long *)(this + 0x538) + 0x50);
local_3b8 = param_1;
local_3b0 = param_6;
local_3ac = param_2;
strlen(__s);
/* try { // try from 0010b6be to 0010b818 has its CatchHandler @ 0010b843 */
this_00 = (ha_federated *)&local_3f8;
String::append((char *)this_00,(ulong)__s);
local_400 = local_3b0;
local_418 = param_3;
local_410 = param_4;
create_where_from_key
(this_00,(String *)&local_3d8,
(st_key *)((ulong)local_3ac * 0xc0 + *(long *)(*(long *)(this + 0x10) + 0xa8)),
(st_key_range *)&local_418,(st_key_range *)0x0,false,false);
Binary_string::append((Binary_string *)&local_3f0,local_3d0,(ulong)local_3c8);
iVar1 = real_query(this,local_3f0,(ulong)local_3e8);
if (iVar1 == 0) {
psVar4 = (st_mysql_res *)store_result(this,*(st_mysql **)(this + 0x540));
*param_7 = psVar4;
if (psVar4 != (st_mysql_res *)0x0) {
iVar1 = read_next(this,local_3b8,psVar4);
if (iVar1 == 0) {
iVar1 = 0;
}
else {
mysql_free_result(*param_7);
*(int *)(this + 0x558) = *(int *)(this + 0x558) + -1;
*param_7 = 0;
}
goto LAB_0010b7a4;
}
iVar1 = 0x89;
}
else {
uVar2 = mysql_errno(*(st_mysql **)(this + 0x540));
uVar3 = mysql_error(*(int8 *)(this + 0x540));
sprintf(local_1c8,"error: %d \'%s\'",(ulong)uVar2,uVar3);
iVar1 = 0x596;
}
(*(code *)**(int8 **)PTR_my_print_error_service_00110f90)(iVar1,0,local_1c8);
LAB_0010b7a4:
Binary_string::~Binary_string((Binary_string *)&local_3f0);
Binary_string::~Binary_string((Binary_string *)&local_3d0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,055
|
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O0
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x1304c1
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0x1304bd
movq -0x88(%rbp), %rax
leaq 0x15d815(%rip), %rcx # 0x28dcb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x1304bf
jmp 0x1304bf
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1304bf
jmp 0x1304bf
jmp 0x130518
jmp 0x1304f9
cmpq $0x0, -0x30(%rbp)
je 0x1304d3
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x130721
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x13045a
jmp 0x130516
jmp 0x130518
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x130629
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0x130597
cmpq $0x39, -0x50(%rbp)
ja 0x130597
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0x1305e0
cmpq $0x41, -0x50(%rbp)
jb 0x1305b7
cmpq $0x5a, -0x50(%rbp)
ja 0x1305b7
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x1305de
cmpq $0x61, -0x50(%rbp)
jb 0x1305d7
cmpq $0x7a, -0x50(%rbp)
ja 0x1305d7
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x1305dc
jmp 0x130668
jmp 0x1305de
jmp 0x1305e0
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0x1305eb
jmp 0x130668
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0x130607
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x130610
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x130610
movl $0x1, -0x40(%rbp)
jmp 0x130627
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0x13065a
cmpl $0x0, -0x44(%rbp)
jne 0x130658
cmpq $0x0, -0x30(%rbp)
je 0x130641
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x130721
jmp 0x130668
jmp 0x13065c
movb $0x1, %al
testb $0x1, %al
jne 0x130548
jmp 0x130668
cmpq $0x0, -0x30(%rbp)
je 0x13067a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0x13069b
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x130721
cmpl $0x0, -0x3c(%rbp)
je 0x1306b3
cmpl $0x80000000, -0x64(%rbp) # imm = 0x80000000
jbe 0x1306b1
movl $0x1, -0x40(%rbp)
jmp 0x1306c7
movl -0x64(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0x1306c5
movl $0x1, -0x40(%rbp)
jmp 0x1306c7
cmpl $0x0, -0x40(%rbp)
je 0x1306f3
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx # imm = 0x80000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130721
cmpl $0x0, -0x3c(%rbp)
je 0x13070c
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x130716
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_13045A:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_1304C1
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_1304A2; jumptable 00000000001304A2 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_1304A2
movsxd rax, ds:(jpt_1304A2 - 28DCB0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1304A4:
jmp short loc_1304BF; jumptable 00000000001304A2 case 32
loc_1304A6:
jmp short loc_1304BF; jumptable 00000000001304A2 case 9
loc_1304A8:
cmp [rbp+var_3C], 0; jumptable 00000000001304A2 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_1304BF
loc_1304BB:
jmp short loc_1304BF; jumptable 00000000001304A2 case 43
def_1304A2:
jmp short loc_130518; jumptable 00000000001304A2 default case, cases 10-31,33-42,44
loc_1304BF:
jmp short loc_1304F9
loc_1304C1:
cmp [rbp+var_30], 0
jz short loc_1304D3
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_1304D3:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_130721
loc_1304F9:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_13045A
jmp short $+2
loc_130516:
jmp short $+2
loc_130518:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_130548:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_130629
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_130597
cmp [rbp+var_50], 39h ; '9'
ja short loc_130597
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_1305E0
loc_130597:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_1305B7
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_1305B7
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_1305DE
loc_1305B7:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_1305D7
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_1305D7
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_1305DC
loc_1305D7:
jmp loc_130668
loc_1305DC:
jmp short $+2
loc_1305DE:
jmp short $+2
loc_1305E0:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_1305EB
jmp short loc_130668
loc_1305EB:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_130607
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_130610
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_130610
loc_130607:
mov [rbp+var_40], 1
jmp short loc_130627
loc_130610:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_130627:
jmp short loc_13065A
loc_130629:
cmp [rbp+var_44], 0
jnz short loc_130658
cmp [rbp+var_30], 0
jz short loc_130641
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_130641:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_130721
loc_130658:
jmp short loc_130668
loc_13065A:
jmp short $+2
loc_13065C:
mov al, 1
test al, 1
jnz loc_130548
jmp short $+2
loc_130668:
cmp [rbp+var_30], 0
jz short loc_13067A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_13067A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_13069B
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_130721
loc_13069B:
cmp [rbp+var_3C], 0
jz short loc_1306B3
cmp [rbp+var_64], 80000000h
jbe short loc_1306B1
mov [rbp+var_40], 1
loc_1306B1:
jmp short loc_1306C7
loc_1306B3:
mov eax, [rbp+var_64]
cmp rax, 7FFFFFFFh
jle short loc_1306C5
mov [rbp+var_40], 1
loc_1306C5:
jmp short $+2
loc_1306C7:
cmp [rbp+var_40], 0
jz short loc_1306F3
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov eax, 7FFFFFFFh
mov rcx, 0FFFFFFFF80000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_130721
loc_1306F3:
cmp [rbp+var_3C], 0
jz short loc_13070C
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_130716
loc_13070C:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_130716:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_130721:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v7; // rax
long long v10; // [rsp+10h] [rbp-80h]
long long v11; // [rsp+18h] [rbp-78h]
long long v12; // [rsp+20h] [rbp-70h]
unsigned int v13; // [rsp+2Ch] [rbp-64h]
unsigned int v14; // [rsp+30h] [rbp-60h]
unsigned int v15; // [rsp+34h] [rbp-5Ch]
long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v17; // [rsp+40h] [rbp-50h] BYREF
int v18; // [rsp+4Ch] [rbp-44h]
int v19; // [rsp+50h] [rbp-40h]
BOOL v20; // [rsp+54h] [rbp-3Ch]
int *v21; // [rsp+58h] [rbp-38h]
_QWORD *v22; // [rsp+60h] [rbp-30h]
unsigned int v23; // [rsp+6Ch] [rbp-24h]
long long v24; // [rsp+70h] [rbp-20h]
long long v25; // [rsp+78h] [rbp-18h]
long long v26; // [rsp+80h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = 0;
v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v12 = a2;
v11 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
{
if ( v22 )
*v22 = v12;
v6 = 33;
if ( !v18 )
v6 = 84;
*v21 = v6;
return 0LL;
}
else
{
switch ( v17 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v20 = !v20;
LABEL_10:
v12 += v18;
continue;
default:
v19 = 0;
v13 = 0;
v10 = v12;
v14 = 0xFFFFFFFF / v23;
v15 = 0xFFFFFFFF % v23;
break;
}
while ( 1 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
break;
v12 += v18;
if ( v17 < 0x30 || v17 > 0x39 )
{
if ( v17 < 0x41 || v17 > 0x5A )
{
if ( v17 < 0x61 || v17 > 0x7A )
goto LABEL_33;
v17 = v17 - 97 + 10;
}
else
{
v17 = v17 - 65 + 10;
}
}
else
{
v17 -= 48LL;
}
if ( (int)v17 >= (int)v23 )
goto LABEL_33;
if ( v13 > v14 || v13 == v14 && v17 > v15 )
v19 = 1;
else
v13 = v17 + v13 * v23;
}
if ( v18 )
{
LABEL_33:
if ( v22 )
*v22 = v12;
if ( v12 == v10 )
{
*v21 = 33;
return 0LL;
}
else
{
if ( v20 )
{
if ( v13 > 0x80000000 )
v19 = 1;
}
else if ( v13 > 0x7FFFFFFFuLL )
{
v19 = 1;
}
if ( v19 )
{
*v21 = 34;
v7 = 0x7FFFFFFFLL;
if ( v20 )
return 0xFFFFFFFF80000000LL;
return v7;
}
else if ( v20 )
{
return -(long long)v13;
}
else
{
return v13;
}
}
}
if ( v22 )
*v22 = v12;
*v21 = 84;
return 0LL;
}
}
}
| |||
14,056
|
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O3
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc380e
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xc37de
cmpq $0x9, %rcx
je 0xc37f6
cmpq $0x20, %rcx
je 0xc37f6
jmp 0xc3840
cmpq $0x2b, %rcx
je 0xc37f6
cmpq $0x2d, %rcx
jne 0xc3840
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xc37c6
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xc381a
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc3906
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r8d, %r8d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xc3891
movq %rax, -0x30(%rbp)
jmp 0xc38b6
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xc38a1
addq $-0x37, %rsi
jmp 0xc38af
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xc3916
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0xc3916
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0xc38d9
jne 0xc38d0
movl -0x44(%rbp), %edi
cmpq -0x60(%rbp), %rax
ja 0xc38db
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %r8d, %esi
movl %ecx, %edi
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl %edi, %ecx
movl %esi, %r8d
testl %eax, %eax
jg 0xc3875
jmp 0xc390d
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xc3975
movl %esi, %r8d
movl %edi, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc3922
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xc3966
cmpl $0x80000001, %ecx # imm = 0x80000001
movl $0x1, %eax
movl %r8d, %esi
cmovael %eax, %esi
testl %ecx, %ecx
cmovsl %eax, %r8d
movl -0x38(%rbp), %edi
testl %edi, %edi
cmovnel %esi, %r8d
testl %r8d, %r8d
je 0xc3990
testl %edi, %edi
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movq $-0x80000000, %rax # imm = 0x80000000
jmp 0xc399a
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xc382f
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc3981
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xc382f
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
testl %edi, %edi
cmoveq %rcx, %rax
jmp 0xc3831
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_C380E
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_C37C6:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_C37DE
cmp rcx, 9
jz short loc_C37F6
cmp rcx, 20h ; ' '
jz short loc_C37F6
jmp short loc_C3840
loc_C37DE:
cmp rcx, 2Bh ; '+'
jz short loc_C37F6
cmp rcx, 2Dh ; '-'
jnz short loc_C3840
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_C37F6:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_C37C6
loc_C380E:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_C381A
mov [rcx], r15
loc_C381A:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_C382F:
xor eax, eax
loc_C3831:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C3840:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_C3906
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor r8d, r8d
loc_C3875:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_C3891
mov [rbp+var_30], rax
jmp short loc_C38B6
loc_C3891:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_C38A1
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_C38AF
loc_C38A1:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_C3916
add rsi, 0FFFFFFFFFFFFFFA9h
loc_C38AF:
mov [rbp+var_30], rsi
mov rax, rsi
loc_C38B6:
cmp eax, [rbp+var_34]
jge short loc_C3916
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_C38D9
jnz short loc_C38D0
mov edi, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_C38DB
loc_C38D0:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, r8d
loc_C38D9:
mov edi, ecx
loc_C38DB:
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov edi, [rbp+var_54]
mov esi, [rbp+var_58]
mov ecx, edi
mov r8d, esi
test eax, eax
jg loc_C3875
jmp short loc_C390D
loc_C3906:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_C390D:
test eax, eax
jz short loc_C3975
mov r8d, esi
mov ecx, edi
loc_C3916:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C3922
mov [rax], rbx
loc_C3922:
cmp rbx, r15
jz short loc_C3966
cmp ecx, 80000001h
mov eax, 1
mov esi, r8d
cmovnb esi, eax
test ecx, ecx
cmovs r8d, eax
mov edi, [rbp+var_38]
test edi, edi
cmovnz r8d, esi
test r8d, r8d
jz short loc_C3990
test edi, edi
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov ecx, 7FFFFFFFh
mov rax, 0FFFFFFFF80000000h
jmp short loc_C399A
loc_C3966:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_C382F
loc_C3975:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C3981
mov [rax], rbx
loc_C3981:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_C382F
loc_C3990:
mov ecx, ecx
mov rax, rcx
neg rax
test edi, edi
loc_C399A:
cmovz rax, rcx
jmp loc_C3831
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r8
unsigned long long v17; // rax
long long v18; // rsi
unsigned int v19; // esi
unsigned int v20; // edi
int v21; // esi
bool v22; // zf
unsigned int v24; // [rsp+1Ch] [rbp-44h]
BOOL v26; // [rsp+28h] [rbp-38h]
_QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v26 = 0;
while ( 1 )
{
if ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
break;
v26 = !v26;
}
goto LABEL_10;
}
if ( v28[0] != 9LL && v28[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v24 = 0xFFFFFFFF / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 > 0 )
{
LODWORD(v14) = 0;
v15 = v6;
v16 = 0LL;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v28[0] - 87LL;
}
else
{
v18 = v28[0] - 55LL;
}
v28[0] = v18;
v17 = v18;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( (unsigned int)v14 <= v24 )
{
if ( (_DWORD)v14 == v24 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
LODWORD(v14) = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16);
LODWORD(v14) = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
LODWORD(v16) = v19;
LODWORD(v14) = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
v21 = v16;
if ( (unsigned int)v14 >= 0x80000001 )
v21 = 1;
if ( (int)v14 < 0 )
LODWORD(v16) = 1;
if ( v26 )
LODWORD(v16) = v21;
if ( (_DWORD)v16 )
{
v22 = !v26;
*a6 = 34;
v14 = 0x7FFFFFFFLL;
result = 0xFFFFFFFF80000000LL;
}
else
{
v14 = (unsigned int)v14;
result = -(long long)(unsigned int)v14;
v22 = !v26;
}
if ( v22 )
return v14;
return result;
}
|
my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c380e
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_001c37c6:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001c37de
CMP RCX,0x9
JZ 0x001c37f6
CMP RCX,0x20
JZ 0x001c37f6
JMP 0x001c3840
LAB_001c37de:
CMP RCX,0x2b
JZ 0x001c37f6
CMP RCX,0x2d
JNZ 0x001c3840
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001c37f6:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001c37c6
LAB_001c380e:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001c381a
MOV qword ptr [RCX],R15
LAB_001c381a:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001c382f:
XOR EAX,EAX
LAB_001c3831:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c3840:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c3906
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R8D,R8D
LAB_001c3875:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001c3891
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c38b6
LAB_001c3891:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001c38a1
ADD RSI,-0x37
JMP 0x001c38af
LAB_001c38a1:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001c3916
ADD RSI,-0x57
LAB_001c38af:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001c38b6:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001c3916
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x001c38d9
JNZ 0x001c38d0
MOV EDI,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001c38db
LAB_001c38d0:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,R8D
LAB_001c38d9:
MOV EDI,ECX
LAB_001c38db:
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV EDI,dword ptr [RBP + -0x54]
MOV ESI,dword ptr [RBP + -0x58]
MOV ECX,EDI
MOV R8D,ESI
TEST EAX,EAX
JG 0x001c3875
JMP 0x001c390d
LAB_001c3906:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_001c390d:
TEST EAX,EAX
JZ 0x001c3975
MOV R8D,ESI
MOV ECX,EDI
LAB_001c3916:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c3922
MOV qword ptr [RAX],RBX
LAB_001c3922:
CMP RBX,R15
JZ 0x001c3966
CMP ECX,0x80000001
MOV EAX,0x1
MOV ESI,R8D
CMOVNC ESI,EAX
TEST ECX,ECX
CMOVS R8D,EAX
MOV EDI,dword ptr [RBP + -0x38]
TEST EDI,EDI
CMOVNZ R8D,ESI
TEST R8D,R8D
JZ 0x001c3990
TEST EDI,EDI
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV ECX,0x7fffffff
MOV RAX,-0x80000000
JMP 0x001c399a
LAB_001c3966:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001c382f
LAB_001c3975:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c3981
MOV qword ptr [RAX],RBX
LAB_001c3981:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001c382f
LAB_001c3990:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
TEST EDI,EDI
LAB_001c399a:
CMOVZ RAX,RCX
JMP 0x001c3831
|
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int4 uVar8;
uint uVar9;
ulong uVar10;
long lVar11;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001c3840:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar11 = param_2;
if ((int)uVar6 < 1) {
uVar9 = 0;
bVar3 = false;
goto LAB_001c390d;
}
uVar9 = 0;
bVar3 = false;
goto LAB_001c3875;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001c3840;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar8 = 0x21;
if (uVar5 == 0) {
uVar8 = 0x54;
}
*param_6 = uVar8;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar7) goto LAB_001c3916;
uVar6 = uVar9;
bVar4 = true;
if ((uVar9 <= uVar5) &&
((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar9 * param_4 + (int)uVar7;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar9 = uVar6;
local_38 = uVar7;
uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3);
if ((int)uVar6 < 1) break;
LAB_001c3875:
lVar11 = (ulong)uVar6 + lVar11;
uVar7 = local_38 - 0x30;
if (9 < uVar7) {
if (local_38 - 0x41 < 0x1a) {
uVar7 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001c3916;
uVar7 = local_38 - 0x57;
}
}
}
LAB_001c390d:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
*param_6 = 0x54;
}
else {
LAB_001c3916:
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
if (lVar11 != param_2) {
bVar4 = bVar3;
if (0x80000000 < uVar9) {
bVar4 = true;
}
if ((int)uVar9 < 0) {
bVar3 = true;
}
if (bVar2) {
bVar3 = bVar4;
}
if (bVar3) {
*param_6 = 0x22;
uVar10 = 0x7fffffff;
uVar7 = 0xffffffff80000000;
}
else {
uVar10 = (ulong)uVar9;
uVar7 = -uVar10;
}
if (!bVar2) {
return uVar10;
}
return uVar7;
}
*param_6 = 0x21;
}
return 0;
}
|
|
14,057
|
AuthSession::ReadHandler()
|
SylCore-WoTLK/src/server/apps/authserver/Server/AuthSession.cpp
|
void AuthSession::ReadHandler()
{
MessageBuffer& packet = GetReadBuffer();
while (packet.GetActiveSize())
{
uint8 cmd = packet.GetReadPointer()[0];
auto itr = Handlers.find(cmd);
if (itr == Handlers.end())
{
// well we dont handle this, lets just ignore it
packet.Reset();
break;
}
if (_status != itr->second.status)
{
CloseSocket();
return;
}
uint16 size = uint16(itr->second.packetSize);
if (packet.GetActiveSize() < size)
break;
if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE)
{
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(packet.GetReadPointer());
size += challenge->size;
if (size > MAX_ACCEPTED_CHALLENGE_SIZE)
{
CloseSocket();
return;
}
}
if (packet.GetActiveSize() < size)
break;
if (!(*this.*itr->second.handler)())
{
CloseSocket();
return;
}
packet.ReadCompleted(size);
}
AsyncRead();
}
|
O0
|
cpp
|
AuthSession::ReadHandler():
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x56f10
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x52b20
cmpq $0x0, %rax
je 0x7df02
movq 0x58(%rsp), %rdi
callq 0x52af0
movb (%rax), %al
movb %al, 0x57(%rsp)
leaq 0x357d70(%rip), %rdi # 0x3d5ad8
leaq 0x57(%rsp), %rsi
callq 0x83480
movq %rax, 0x48(%rsp)
leaq 0x357d5a(%rip), %rdi # 0x3d5ad8
callq 0x834e0
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x834b0
testb $0x1, %al
jne 0x7dd9d
jmp 0x7ddac
movq 0x58(%rsp), %rdi
callq 0x83510
jmp 0x7df02
movq 0x28(%rsp), %rax
movl 0x1b8(%rax), %eax
movl %eax, 0x24(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x83530
movq %rax, %rcx
movl 0x24(%rsp), %eax
cmpl 0x1(%rcx), %eax
je 0x7dde0
movq 0x28(%rsp), %rdi
callq 0x567a0
jmp 0x7df0c
leaq 0x48(%rsp), %rdi
callq 0x83530
movq 0x5(%rax), %rax
movw %ax, 0x3e(%rsp)
movq 0x58(%rsp), %rdi
callq 0x52b20
movzwl 0x3e(%rsp), %ecx
cmpq %rcx, %rax
jae 0x7de0c
jmp 0x7df02
movzbl 0x57(%rsp), %eax
cmpl $0x0, %eax
je 0x7de20
movzbl 0x57(%rsp), %eax
cmpl $0x2, %eax
jne 0x7de60
movq 0x58(%rsp), %rdi
callq 0x52af0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x2(%rax), %ecx
movzwl 0x3e(%rsp), %eax
addl %ecx, %eax
movw %ax, 0x3e(%rsp)
movzwl 0x3e(%rsp), %eax
cmpq $0x33, %rax
jbe 0x7de5e
movq 0x28(%rsp), %rdi
callq 0x567a0
jmp 0x7df0c
jmp 0x7de60
movq 0x58(%rsp), %rdi
callq 0x52b20
movzwl 0x3e(%rsp), %ecx
cmpq %rcx, %rax
jae 0x7de79
jmp 0x7df02
leaq 0x48(%rsp), %rdi
callq 0x83530
movq 0x28(%rsp), %rcx
movq %rax, %rdx
movq 0xd(%rdx), %rax
movq %rax, 0x10(%rsp)
movq 0x15(%rdx), %rdx
addq %rdx, %rcx
movq %rcx, 0x18(%rsp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x7dec6
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, 0x8(%rsp)
jmp 0x7ded0
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
callq *%rax
testb $0x1, %al
jne 0x7deec
movq 0x28(%rsp), %rdi
callq 0x567a0
jmp 0x7df0c
movq 0x58(%rsp), %rdi
movzwl 0x3e(%rsp), %eax
movl %eax, %esi
callq 0x57080
jmp 0x7dd3d
movq 0x28(%rsp), %rdi
callq 0x83330
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN11AuthSession11ReadHandlerEv:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov rdi, [rsp+68h+var_8]
mov [rsp+68h+var_40], rdi
call _ZN6SocketI11AuthSessionE13GetReadBufferEv; Socket<AuthSession>::GetReadBuffer(void)
mov [rsp+68h+var_10], rax
loc_7DD3D:
mov rdi, [rsp+68h+var_10]; this
call _ZNK13MessageBuffer13GetActiveSizeEv; MessageBuffer::GetActiveSize(void)
cmp rax, 0
jz loc_7DF02
mov rdi, [rsp+68h+var_10]; this
call _ZN13MessageBuffer14GetReadPointerEv; MessageBuffer::GetReadPointer(void)
mov al, [rax]
mov [rsp+68h+var_11], al
lea rdi, _ZL8Handlers; Handlers
lea rsi, [rsp+68h+var_11]
call _ZNKSt13unordered_mapIh11AuthHandlerSt4hashIhESt8equal_toIhESaISt4pairIKhS0_EEE4findERS6_; std::unordered_map<uchar,AuthHandler>::find(uchar const&)
mov [rsp+68h+var_20], rax
lea rdi, _ZL8Handlers; Handlers
call _ZNKSt13unordered_mapIh11AuthHandlerSt4hashIhESt8equal_toIhESaISt4pairIKhS0_EEE3endEv; std::unordered_map<uchar,AuthHandler>::end(void)
mov [rsp+68h+var_28], rax
lea rdi, [rsp+68h+var_20]
lea rsi, [rsp+68h+var_28]
call _ZNSt8__detaileqERKNS_20_Node_const_iteratorISt4pairIKh11AuthHandlerELb0ELb0EEES7_; std::__detail::operator==(std::__detail::_Node_const_iterator<std::pair<uchar const,AuthHandler>,false,false> const&,std::__detail::_Node_const_iterator<std::pair<uchar const,AuthHandler>,false,false> const&)
test al, 1
jnz short loc_7DD9D
jmp short loc_7DDAC
loc_7DD9D:
mov rdi, [rsp+68h+var_10]; this
call _ZN13MessageBuffer5ResetEv; MessageBuffer::Reset(void)
jmp loc_7DF02
loc_7DDAC:
mov rax, [rsp+68h+var_40]
mov eax, [rax+1B8h]
mov [rsp+68h+var_44], eax
lea rdi, [rsp+68h+var_20]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKh11AuthHandlerELb0ELb0EEptEv; std::__detail::_Node_const_iterator<std::pair<uchar const,AuthHandler>,false,false>::operator->(void)
mov rcx, rax
mov eax, [rsp+68h+var_44]
cmp eax, [rcx+1]
jz short loc_7DDE0
mov rdi, [rsp+68h+var_40]
call _ZN6SocketI11AuthSessionE11CloseSocketEv; Socket<AuthSession>::CloseSocket(void)
jmp loc_7DF0C
loc_7DDE0:
lea rdi, [rsp+68h+var_20]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKh11AuthHandlerELb0ELb0EEptEv; std::__detail::_Node_const_iterator<std::pair<uchar const,AuthHandler>,false,false>::operator->(void)
mov rax, [rax+5]
mov [rsp+68h+var_2A], ax
mov rdi, [rsp+68h+var_10]; this
call _ZNK13MessageBuffer13GetActiveSizeEv; MessageBuffer::GetActiveSize(void)
movzx ecx, [rsp+68h+var_2A]
cmp rax, rcx
jnb short loc_7DE0C
jmp loc_7DF02
loc_7DE0C:
movzx eax, [rsp+68h+var_11]
cmp eax, 0
jz short loc_7DE20
movzx eax, [rsp+68h+var_11]
cmp eax, 2
jnz short loc_7DE60
loc_7DE20:
mov rdi, [rsp+68h+var_10]; this
call _ZN13MessageBuffer14GetReadPointerEv; MessageBuffer::GetReadPointer(void)
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_38]
movzx ecx, word ptr [rax+2]
movzx eax, [rsp+68h+var_2A]
add eax, ecx
mov [rsp+68h+var_2A], ax
movzx eax, [rsp+68h+var_2A]
cmp rax, 33h ; '3'
jbe short loc_7DE5E
mov rdi, [rsp+68h+var_40]
call _ZN6SocketI11AuthSessionE11CloseSocketEv; Socket<AuthSession>::CloseSocket(void)
jmp loc_7DF0C
loc_7DE5E:
jmp short $+2
loc_7DE60:
mov rdi, [rsp+68h+var_10]; this
call _ZNK13MessageBuffer13GetActiveSizeEv; MessageBuffer::GetActiveSize(void)
movzx ecx, [rsp+68h+var_2A]
cmp rax, rcx
jnb short loc_7DE79
jmp loc_7DF02
loc_7DE79:
lea rdi, [rsp+68h+var_20]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKh11AuthHandlerELb0ELb0EEptEv; std::__detail::_Node_const_iterator<std::pair<uchar const,AuthHandler>,false,false>::operator->(void)
mov rcx, [rsp+68h+var_40]
mov rdx, rax
mov rax, [rdx+0Dh]
mov [rsp+68h+var_58], rax
mov rdx, [rdx+15h]
add rcx, rdx
mov [rsp+68h+var_50], rcx
and rax, 1
cmp rax, 0
jz short loc_7DEC6
mov rcx, [rsp+68h+var_58]
mov rax, [rsp+68h+var_50]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rsp+68h+var_60], rax
jmp short loc_7DED0
loc_7DEC6:
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_60], rax
loc_7DED0:
mov rdi, [rsp+68h+var_50]
mov rax, [rsp+68h+var_60]
call rax
test al, 1
jnz short loc_7DEEC
mov rdi, [rsp+68h+var_40]
call _ZN6SocketI11AuthSessionE11CloseSocketEv; Socket<AuthSession>::CloseSocket(void)
jmp short loc_7DF0C
loc_7DEEC:
mov rdi, [rsp+68h+var_10]; this
movzx eax, [rsp+68h+var_2A]
mov esi, eax; unsigned __int64
call _ZN13MessageBuffer13ReadCompletedEm; MessageBuffer::ReadCompleted(ulong)
jmp loc_7DD3D
loc_7DF02:
mov rdi, [rsp+68h+var_40]
call _ZN6SocketI11AuthSessionE9AsyncReadEv; Socket<AuthSession>::AsyncRead(void)
loc_7DF0C:
add rsp, 68h
retn
|
long long AuthSession::ReadHandler(AuthSession *this, long long *a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
unsigned long long ActiveSize; // rax
unsigned long long v7; // rax
long long v8; // rax
char v9; // al
unsigned __int8 ( *v11)(_QWORD); // [rsp+10h] [rbp-58h]
_QWORD *v12; // [rsp+18h] [rbp-50h]
int v13; // [rsp+24h] [rbp-44h]
unsigned __int16 v14; // [rsp+3Eh] [rbp-2Ah]
long long v15; // [rsp+40h] [rbp-28h] BYREF
long long v16; // [rsp+48h] [rbp-20h] BYREF
char v17; // [rsp+57h] [rbp-11h] BYREF
MessageBuffer *i; // [rsp+58h] [rbp-10h]
AuthSession *v19; // [rsp+60h] [rbp-8h]
v19 = this;
for ( i = (MessageBuffer *)Socket<AuthSession>::GetReadBuffer((long long)this);
MessageBuffer::GetActiveSize(i);
MessageBuffer::ReadCompleted(i, v14) )
{
v17 = *(_BYTE *)MessageBuffer::GetReadPointer(i);
v16 = std::unordered_map<unsigned char,AuthHandler>::find(&Handlers, &v17);
v15 = std::unordered_map<unsigned char,AuthHandler>::end(&Handlers);
a2 = &v15;
if ( (std::__detail::operator==(&v16, &v15) & 1) != 0 )
{
MessageBuffer::Reset(i);
return Socket<AuthSession>::AsyncRead((_DWORD)this, (_DWORD)a2, v2, v3, v4, v5);
}
v13 = *((_DWORD *)this + 110);
if ( v13 != *(_DWORD *)(std::__detail::_Node_const_iterator<std::pair<unsigned char const,AuthHandler>,false,false>::operator->(&v16)
+ 1) )
return Socket<AuthSession>::CloseSocket((long long)this);
v14 = *(_QWORD *)(std::__detail::_Node_const_iterator<std::pair<unsigned char const,AuthHandler>,false,false>::operator->(&v16)
+ 5);
ActiveSize = MessageBuffer::GetActiveSize(i);
v3 = v14;
if ( ActiveSize < v14 )
return Socket<AuthSession>::AsyncRead((_DWORD)this, (_DWORD)a2, v2, v3, v4, v5);
if ( !v17 || v17 == 2 )
{
v14 += *(_WORD *)(MessageBuffer::GetReadPointer(i) + 2);
if ( v14 > 0x33uLL )
return Socket<AuthSession>::CloseSocket((long long)this);
}
v7 = MessageBuffer::GetActiveSize(i);
v3 = v14;
if ( v7 < v14 )
return Socket<AuthSession>::AsyncRead((_DWORD)this, (_DWORD)a2, v2, v3, v4, v5);
v8 = std::__detail::_Node_const_iterator<std::pair<unsigned char const,AuthHandler>,false,false>::operator->(&v16);
v11 = *(unsigned __int8 ( **)(_QWORD))(v8 + 13);
v12 = (_QWORD *)((char *)this + *(_QWORD *)(v8 + 21));
v9 = ((unsigned __int8)v11 & 1) != 0
? (*(long long ( **)(_QWORD *))((char *)v11 + *v12 - 1))(v12)
: v11(v12);
if ( (v9 & 1) == 0 )
return Socket<AuthSession>::CloseSocket((long long)this);
LODWORD(a2) = v14;
}
return Socket<AuthSession>::AsyncRead((_DWORD)this, (_DWORD)a2, v2, v3, v4, v5);
}
|
ReadHandler:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00156f10
MOV qword ptr [RSP + 0x58],RAX
LAB_0017dd3d:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00152b20
CMP RAX,0x0
JZ 0x0017df02
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00152af0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x57],AL
LEA RDI,[0x4d5ad8]
LEA RSI,[RSP + 0x57]
CALL 0x00183480
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[0x4d5ad8]
CALL 0x001834e0
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x40]
CALL 0x001834b0
TEST AL,0x1
JNZ 0x0017dd9d
JMP 0x0017ddac
LAB_0017dd9d:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00183510
JMP 0x0017df02
LAB_0017ddac:
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0x1b8]
MOV dword ptr [RSP + 0x24],EAX
LEA RDI,[RSP + 0x48]
CALL 0x00183530
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RCX + 0x1]
JZ 0x0017dde0
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001567a0
JMP 0x0017df0c
LAB_0017dde0:
LEA RDI,[RSP + 0x48]
CALL 0x00183530
MOV RAX,qword ptr [RAX + 0x5]
MOV word ptr [RSP + 0x3e],AX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00152b20
MOVZX ECX,word ptr [RSP + 0x3e]
CMP RAX,RCX
JNC 0x0017de0c
JMP 0x0017df02
LAB_0017de0c:
MOVZX EAX,byte ptr [RSP + 0x57]
CMP EAX,0x0
JZ 0x0017de20
MOVZX EAX,byte ptr [RSP + 0x57]
CMP EAX,0x2
JNZ 0x0017de60
LAB_0017de20:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00152af0
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOVZX ECX,word ptr [RAX + 0x2]
MOVZX EAX,word ptr [RSP + 0x3e]
ADD EAX,ECX
MOV word ptr [RSP + 0x3e],AX
MOVZX EAX,word ptr [RSP + 0x3e]
CMP RAX,0x33
JBE 0x0017de5e
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001567a0
JMP 0x0017df0c
LAB_0017de5e:
JMP 0x0017de60
LAB_0017de60:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00152b20
MOVZX ECX,word ptr [RSP + 0x3e]
CMP RAX,RCX
JNC 0x0017de79
JMP 0x0017df02
LAB_0017de79:
LEA RDI,[RSP + 0x48]
CALL 0x00183530
MOV RCX,qword ptr [RSP + 0x28]
MOV RDX,RAX
MOV RAX,qword ptr [RDX + 0xd]
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,qword ptr [RDX + 0x15]
ADD RCX,RDX
MOV qword ptr [RSP + 0x18],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x0017dec6
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0017ded0
LAB_0017dec6:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
LAB_0017ded0:
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x8]
CALL RAX
TEST AL,0x1
JNZ 0x0017deec
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001567a0
JMP 0x0017df0c
LAB_0017deec:
MOV RDI,qword ptr [RSP + 0x58]
MOVZX EAX,word ptr [RSP + 0x3e]
MOV ESI,EAX
CALL 0x00157080
JMP 0x0017dd3d
LAB_0017df02:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00183330
LAB_0017df0c:
ADD RSP,0x68
RET
|
/* AuthSession::ReadHandler() */
void __thiscall AuthSession::ReadHandler(AuthSession *this)
{
int iVar1;
long lVar2;
uchar *puVar3;
ulong uVar4;
ulong uVar5;
code *local_60;
ushort local_2a;
int8 local_28;
int8 local_20;
uchar local_11;
MessageBuffer *local_10;
AuthSession *local_8;
local_8 = this;
local_10 = (MessageBuffer *)Socket<AuthSession>::GetReadBuffer((Socket<AuthSession> *)this);
do {
lVar2 = MessageBuffer::GetActiveSize(local_10);
if (lVar2 == 0) {
LAB_0017df02:
Socket<AuthSession>::AsyncRead((Socket<AuthSession> *)this);
return;
}
puVar3 = (uchar *)MessageBuffer::GetReadPointer(local_10);
local_11 = *puVar3;
local_20 = std::
unordered_map<unsigned_char,AuthHandler,std::hash<unsigned_char>,std::equal_to<unsigned_char>,std::allocator<std::pair<unsigned_char_const,AuthHandler>>>
::find((unordered_map<unsigned_char,AuthHandler,std::hash<unsigned_char>,std::equal_to<unsigned_char>,std::allocator<std::pair<unsigned_char_const,AuthHandler>>>
*)Handlers,&local_11);
local_28 = std::
unordered_map<unsigned_char,AuthHandler,std::hash<unsigned_char>,std::equal_to<unsigned_char>,std::allocator<std::pair<unsigned_char_const,AuthHandler>>>
::end();
uVar4 = std::__detail::operator==
((_Node_const_iterator *)&local_20,(_Node_const_iterator *)&local_28);
if ((uVar4 & 1) != 0) {
MessageBuffer::Reset(local_10);
goto LAB_0017df02;
}
iVar1 = *(int *)(this + 0x1b8);
lVar2 = std::__detail::
_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>::operator->
((_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>
*)&local_20);
if (iVar1 != *(int *)(lVar2 + 1)) {
Socket<AuthSession>::CloseSocket((Socket<AuthSession> *)this);
return;
}
lVar2 = std::__detail::
_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>::operator->
((_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>
*)&local_20);
uVar4 = *(ulong *)(lVar2 + 5);
local_2a = (ushort)uVar4;
uVar5 = MessageBuffer::GetActiveSize(local_10);
if (uVar5 < (uVar4 & 0xffff)) goto LAB_0017df02;
if ((local_11 == '\0') || (local_11 == '\x02')) {
lVar2 = MessageBuffer::GetReadPointer(local_10);
local_2a = local_2a + *(short *)(lVar2 + 2);
if (0x33 < local_2a) {
Socket<AuthSession>::CloseSocket((Socket<AuthSession> *)this);
return;
}
}
uVar4 = MessageBuffer::GetActiveSize(local_10);
if (uVar4 < local_2a) goto LAB_0017df02;
lVar2 = std::__detail::
_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>::operator->
((_Node_const_iterator<std::pair<unsigned_char_const,AuthHandler>,false,false>
*)&local_20);
local_60 = *(code **)(lVar2 + 0xd);
if (((ulong)local_60 & 1) != 0) {
local_60 = *(code **)(local_60 + *(long *)(this + *(long *)(lVar2 + 0x15)) + -1);
}
uVar4 = (*local_60)(this + *(long *)(lVar2 + 0x15));
if ((uVar4 & 1) == 0) {
Socket<AuthSession>::CloseSocket((Socket<AuthSession> *)this);
return;
}
MessageBuffer::ReadCompleted(local_10,(ulong)local_2a);
} while( true );
}
|
|
14,058
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
|
monkey531[P]llama/common/json.hpp
|
explicit iter_impl(pointer object) noexcept : m_object(object)
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
m_it.object_iterator = typename object_t::iterator();
break;
}
case value_t::array:
{
m_it.array_iterator = typename array_t::iterator();
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
m_it.primitive_iterator = primitive_iterator_t();
break;
}
}
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x8(%rsp)
callq 0xee590
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0xee5b0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x5e580
movq 0x10(%rsp), %rdi
callq 0xee5d0
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xee3fe
leaq 0x12dec1(%rip), %rdi # 0x21c2a3
leaq 0x126eee(%rip), %rdx # 0x2152d7
leaq 0x132814(%rip), %rcx # 0x220c04
xorl %eax, %eax
movl $0x32ab, %esi # imm = 0x32AB
callq 0x5ef40
jmp 0xee3fe
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0xee45d
movq (%rsp), %rax
leaq 0x128a5e(%rip), %rcx # 0x216e7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30(%rsp), %rdi
callq 0xee590
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xee486
leaq 0x28(%rsp), %rdi
callq 0xee5b0
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xee486
jmp 0xee45d
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x5e580
leaq 0x20(%rsp), %rdi
callq 0xee5d0
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rax)
addq $0x48, %rsp
retq
movq %rax, %rdi
callq 0x6c1c0
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2EPSF_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_30], rdi
mov rax, [rsp+48h+var_10]
mov [rdi], rax
add rdi, 8
mov [rsp+48h+var_40], rdi
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEC2Ev; __gnu_cxx::__normal_iterator<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::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>>>>::__normal_iterator(void)
mov rdi, [rsp+48h+var_40]
add rdi, 8
call _ZN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2Ev; __gnu_cxx::__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::__normal_iterator(void)
mov rdi, [rsp+48h+var_40]
add rdi, 10h
mov [rsp+48h+var_38], rdi
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rsp+48h+var_38]; this
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tC2Ev; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t(void)
mov rax, [rsp+48h+var_30]
cmp qword ptr [rax], 0
jnz short loc_EE3FE
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
xor eax, eax
mov esi, 32ABh
call _ggml_abort
jmp short $+2
loc_EE3FE:
mov rax, [rsp+48h+var_30]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+48h+var_48], rax
sub rax, 9; switch 10 cases
ja short def_EE425; jumptable 00000000000EE425 default case
mov rax, [rsp+48h+var_48]
lea rcx, jpt_EE425
movsxd rax, ds:(jpt_EE425 - 216E7Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_EE427:
lea rdi, [rsp+48h+var_18]; jumptable 00000000000EE425 case 1
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEC2Ev; __gnu_cxx::__normal_iterator<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::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>>>>::__normal_iterator(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_18]
mov [rax+8], rcx
jmp short loc_EE486
loc_EE441:
lea rdi, [rsp+48h+var_20]; jumptable 00000000000EE425 case 2
call _ZN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2Ev; __gnu_cxx::__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::__normal_iterator(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_20]
mov [rax+10h], rcx
jmp short loc_EE486
loc_EE45B:
jmp short $+2; jumptable 00000000000EE425 cases 0,3-9
def_EE425:
lea rdi, [rsp+48h+var_28]; jumptable 00000000000EE425 default case
xor esi, esi
mov edx, 8
call _memset
lea rdi, [rsp+48h+var_28]; this
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tC2Ev; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_28]
mov [rax+18h], rcx
loc_EE486:
add rsp, 48h
retn
mov rdi, rax
call __clang_call_terminate
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::iter_impl(
_QWORD *a1,
long long a2)
{
_QWORD *result; // rax
long long v3; // [rsp+20h] [rbp-28h] BYREF
long long v4; // [rsp+28h] [rbp-20h] BYREF
_QWORD v5[3]; // [rsp+30h] [rbp-18h] BYREF
v5[2] = a1;
v5[1] = a2;
*a1 = a2;
((void (*)(void))__gnu_cxx::__normal_iterator<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::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>>>>::__normal_iterator)();
__gnu_cxx::__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::__normal_iterator(a1 + 2);
memset(a1 + 3, 0LL, sizeof(_QWORD));
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t((nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t *)(a1 + 3));
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
12971LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
switch ( *(_BYTE *)*a1 )
{
case 1:
__gnu_cxx::__normal_iterator<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::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>>>>::__normal_iterator(v5);
result = a1;
a1[1] = v5[0];
break;
case 2:
__gnu_cxx::__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::__normal_iterator(&v4);
result = a1;
a1[2] = v4;
break;
default:
memset(&v3, 0LL, sizeof(v3));
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t((nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t *)&v3);
result = a1;
a1[3] = v3;
break;
}
return result;
}
|
iter_impl:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001ee590
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x001ee5b0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV qword ptr [RSP + 0x10],RDI
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0015e580
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001ee5d0
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX],0x0
JNZ 0x001ee3fe
LAB_001ee3db:
LEA RDI,[0x31c2a3]
LEA RDX,[0x3152d7]
LEA RCX,[0x320c04]
XOR EAX,EAX
MOV ESI,0x32ab
CALL 0x0015ef40
LAB_001ee3fc:
JMP 0x001ee3fe
LAB_001ee3fe:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP],RAX
SUB RAX,0x9
JA 0x001ee45d
MOV RAX,qword ptr [RSP]
LEA RCX,[0x316e7c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
LEA RDI,[RSP + 0x30]
CALL 0x001ee590
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001ee486
caseD_2:
LEA RDI,[RSP + 0x28]
CALL 0x001ee5b0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001ee486
caseD_0:
JMP 0x001ee45d
default:
LEA RDI,[RSP + 0x20]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0015e580
LEA RDI,[RSP + 0x20]
CALL 0x001ee5d0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
LAB_001ee486:
ADD RSP,0x48
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::iter_impl(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,basic_json *param_1)
{
int8 local_28;
int8 local_20;
int8 local_18;
basic_json *local_10;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_8;
*(basic_json **)this = param_1;
local_10 = param_1;
local_8 = this;
__gnu_cxx::
__normal_iterator<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::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>>>>>
::__normal_iterator((__normal_iterator<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::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
*)(this + 8));
__gnu_cxx::
__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::__normal_iterator((__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)(this + 0x10));
memset((primitive_iterator_t *)(this + 0x18),0,8);
primitive_iterator_t::primitive_iterator_t((primitive_iterator_t *)(this + 0x18));
if (*(long *)this == 0) {
/* try { // try from 001ee3db to 001ee3fb has its CatchHandler @ 001ee48b */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x32ab,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
memset(&local_28,0,8);
primitive_iterator_t::primitive_iterator_t((primitive_iterator_t *)&local_28);
*(int8 *)(this + 0x18) = local_28;
break;
case 1:
__gnu_cxx::
__normal_iterator<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::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>>>>>
::__normal_iterator((__normal_iterator<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::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>>>>>
*)&local_18);
*(int8 *)(this + 8) = local_18;
break;
case 2:
__gnu_cxx::
__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::__normal_iterator((__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)&local_20);
*(int8 *)(this + 0x10) = local_20;
}
return;
}
|
|
14,059
|
minja::ExpressionTemplateToken::~ExpressionTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
|
O1
|
cpp
|
minja::ExpressionTemplateToken::~ExpressionTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x6f727(%rip), %rax # 0xe9ec8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x7a7b6
callq 0x34304
leaq 0x6efeb(%rip), %rax # 0xe97a8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x7a7d3
popq %rbx
jmp 0x34304
popq %rbx
retq
nop
|
_ZN5minja23ExpressionTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_7A7B6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7A7B6:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_7A7D3
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7A7D3:
pop rbx
retn
|
void minja::ExpressionTemplateToken::~ExpressionTemplateToken(minja::ExpressionTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~ExpressionTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1e9ec8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0017a7b6
CALL 0x00134304
LAB_0017a7b6:
LEA RAX,[0x1e97a8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0017a7d3
POP RBX
JMP 0x00134304
LAB_0017a7d3:
POP RBX
RET
|
/* minja::ExpressionTemplateToken::~ExpressionTemplateToken() */
void __thiscall
minja::ExpressionTemplateToken::~ExpressionTemplateToken(ExpressionTemplateToken *this)
{
*(int ***)this = &PTR__ExpressionTemplateToken_001e9ed8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001e97b8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
14,060
|
void nlohmann::json_abi_v3_11_3::detail::from_json<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>>(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> const&, 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>::string_t&)
|
llama.cpp/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<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>>(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> const&, 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>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xf02de
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x26640
movl $0x20, %edi
callq 0x25790
movq %rax, %rbx
movq %r14, %rdi
callq 0xec148
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x85146(%rip), %rsi # 0x175448
leaq 0x10(%rsp), %rdi
callq 0x638a0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0xf0374
xorl %ebp, %ebp
leaq 0xe9fb3(%rip), %rsi # 0x1da2e0
leaq -0x6c0d2(%rip), %rdx # 0x84262
movq %rbx, %rdi
callq 0x25c00
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf035a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x251b0
testb %bpl, %bpl
jne 0xf0364
jmp 0xf036c
movq %rax, %r14
movq %rbx, %rdi
callq 0x26150
movq %r14, %rdi
callq 0x25ca0
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_F02DE
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_F02DE:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F035A
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F035A:
test bpl, bpl
jnz short loc_F0364
jmp short loc_F036C
mov r14, rax
loc_F0364:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_F036C:
mov rdi, r14
call __Unwind_Resume
|
from_json<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>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001f02de
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x00126640
LAB_001f02de:
MOV EDI,0x20
CALL 0x00125790
MOV RBX,RAX
MOV RDI,R14
CALL 0x001ec148
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001f02fb:
LEA RSI,[0x275448]
LEA RDI,[RSP + 0x10]
CALL 0x001638a0
MOV BPL,0x1
LAB_001f030f:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001f0374
XOR EBP,EBP
LEA RSI,[0x2da2e0]
LEA RDX,[0x184262]
MOV RDI,RBX
CALL 0x00125c00
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<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> >(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> const&, 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>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<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>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<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>
*)param_1);
/* try { // try from 001f02fb to 001f030b has its CatchHandler @ 001f0361 */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 001f030f to 001f033b has its CatchHandler @ 001f033c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
||
14,061
|
set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_setup_actor.cc
|
static void set_setup_actor_key(PFS_setup_actor_key *key,
const char *user, uint user_length,
const char *host, uint host_length,
const char *role, uint role_length)
{
assert(user_length <= USERNAME_LENGTH);
assert(host_length <= HOSTNAME_LENGTH);
char *ptr= &key->m_hash_key[0];
memcpy(ptr, user, user_length);
ptr+= user_length;
ptr[0]= 0;
ptr++;
memcpy(ptr, host, host_length);
ptr+= host_length;
ptr[0]= 0;
ptr++;
memcpy(ptr, role, role_length);
ptr+= role_length;
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);
}
|
O0
|
cpp
|
set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x24(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl 0x10(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl 0x10(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c4(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j:
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_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_20]
mov eax, [rbp+var_24]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_24]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
mov eax, [rbp+arg_0]
mov edx, eax
call _memcpy
mov ecx, [rbp+arg_0]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+2C4h], ecx
add rsp, 40h
pop rbp
retn
|
long long set_setup_actor_key(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6,
unsigned int a7)
{
long long result; // rax
_BYTE *v8; // [rsp+8h] [rbp-38h]
_BYTE *v9; // [rsp+8h] [rbp-38h]
_BYTE *v10; // [rsp+8h] [rbp-38h]
memcpy(a1, a2, a3);
v8 = (_BYTE *)(a3 + a1);
*v8++ = 0;
memcpy(v8, a4, a5);
v9 = &v8[a5];
*v9++ = 0;
memcpy(v9, a6, a7);
v10 = &v9[a7];
*v10 = 0;
result = a1;
*(_DWORD *)(a1 + 708) = (_DWORD)v10 + 1 - a1;
return result;
}
|
set_setup_actor_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
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
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + 0x10]
MOV EDX,EAX
CALL 0x00126280
MOV ECX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c4],ECX
ADD RSP,0x40
POP RBP
RET
|
/* set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int,
char const*, unsigned int) */
void set_setup_actor_key(PFS_setup_actor_key *param_1,char *param_2,uint param_3,char *param_4,
uint param_5,char *param_6,uint param_7)
{
PFS_setup_actor_key *pPVar1;
memcpy(param_1,param_2,(ulong)param_3);
pPVar1 = param_1 + param_3;
*pPVar1 = (PFS_setup_actor_key)0x0;
pPVar1 = pPVar1 + 1;
memcpy(pPVar1,param_4,(ulong)param_5);
pPVar1 = pPVar1 + param_5;
*pPVar1 = (PFS_setup_actor_key)0x0;
pPVar1 = pPVar1 + 1;
memcpy(pPVar1,param_6,(ulong)param_7);
pPVar1[param_7] = (PFS_setup_actor_key)0x0;
*(int *)(param_1 + 0x2c4) = ((int)(pPVar1 + param_7) + 1) - (int)param_1;
return;
}
|
|
14,062
|
mjCModel::AddEquality(mjCDef*)
|
aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_model.cc
|
mjCEquality* mjCModel::AddEquality(mjCDef* def) {
return AddObjectDefault(equalities_, "equality", def);
}
|
O3
|
cpp
|
mjCModel::AddEquality(mjCDef*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xd4f46(%rip), %rsi # 0x1ce65e
leaq 0xd4f47(%rip), %rdx # 0x1ce666
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2dec0
leaq 0xd78(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xf978c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf975b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2ded0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf9784
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2ded0
movq %rbx, %rdi
callq 0x2dee0
|
_ZN8mjCModel11AddEqualityEP6mjCDef:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea rsi, aEquality; "equality"
lea rdx, aEquality+8; ""
lea r15, [rsp+48h+var_40]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [r14+0D78h]
mov rdi, r14; mjCModel *
mov rdx, r15
mov rcx, rbx
call _ZN8mjCModel16AddObjectDefaultI11mjCEqualityEEPT_RSt6vectorIS3_SaIS3_EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP6mjCDef; mjCModel::AddObjectDefault<mjCEquality>(std::vector<mjCEquality *> &,std::string,mjCDef *)
mov rbx, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_F975B
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F975B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_F9784
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F9784:
mov rdi, rbx
call __Unwind_Resume
|
long long mjCModel::AddEquality(mjCModel *this, mjCDef *a2)
{
long long v2; // rbx
void *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[6]; // [rsp+18h] [rbp-30h] BYREF
v4 = v5;
std::string::_M_construct<char const*>(&v4, "equality", "");
v2 = mjCModel::AddObjectDefault<mjCEquality>(this);
if ( v4 != v5 )
operator delete(v4, v5[0] + 1LL);
return v2;
}
|
AddEquality:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x2ce65e]
LEA RDX,[0x2ce666]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0012dec0
LEA RSI,[R14 + 0xd78]
LAB_001f9733:
MOV RDI,R14
MOV RDX,R15
MOV RCX,RBX
CALL 0x001f978c
LAB_001f9741:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001f975b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0012ded0
LAB_001f975b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* mjCModel::AddEquality(mjCDef*) */
mjCEquality * __thiscall mjCModel::AddEquality(mjCModel *this,mjCDef *param_1)
{
mjCEquality *pmVar1;
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,"equality","");
/* try { // try from 001f9733 to 001f9740 has its CatchHandler @ 001f976a */
pmVar1 = AddObjectDefault<mjCEquality>(this,this + 0xd78,local_40,param_1);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return pmVar1;
}
|
|
14,063
|
stbi__png_info_raw(stbi__png*, int*, int*, int*)
|
llama.cpp/examples/llava/../../common/stb_image.h
|
static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)
{
if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
stbi__rewind( p->s );
return 0;
}
if (x) *x = p->s->img_x;
if (y) *y = p->s->img_y;
if (comp) *comp = p->s->img_n;
return 1;
}
|
O3
|
c
|
stbi__png_info_raw(stbi__png*, int*, int*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
xorl %ebp, %ebp
movl $0x2, %esi
xorl %edx, %edx
callq 0x2f103
testl %eax, %eax
je 0x36b56
testq %r12, %r12
je 0x36b34
movq (%r14), %rax
movl (%rax), %eax
movl %eax, (%r12)
testq %r15, %r15
je 0x36b42
movq (%r14), %rax
movl 0x4(%rax), %eax
movl %eax, (%r15)
movl $0x1, %ebp
testq %rbx, %rbx
je 0x36b67
movq (%r14), %rax
movl 0x8(%rax), %eax
movl %eax, (%rbx)
jmp 0x36b67
movq (%r14), %rax
movups 0xd0(%rax), %xmm0
movups %xmm0, 0xc0(%rax)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZL18stbi__png_info_rawP9stbi__pngPiS1_S1_:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
xor ebp, ebp
mov esi, 2
xor edx, edx
call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int)
test eax, eax
jz short loc_36B56
test r12, r12
jz short loc_36B34
mov rax, [r14]
mov eax, [rax]
mov [r12], eax
loc_36B34:
test r15, r15
jz short loc_36B42
mov rax, [r14]
mov eax, [rax+4]
mov [r15], eax
loc_36B42:
mov ebp, 1
test rbx, rbx
jz short loc_36B67
mov rax, [r14]
mov eax, [rax+8]
mov [rbx], eax
jmp short loc_36B67
loc_36B56:
mov rax, [r14]
movups xmm0, xmmword ptr [rax+0D0h]
movups xmmword ptr [rax+0C0h], xmm0
loc_36B67:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long stbi__png_info_raw(long long *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
unsigned int v6; // ebp
v6 = 0;
if ( (unsigned int)stbi__parse_png_file(a1, 2, 0) )
{
if ( a2 )
*a2 = *(_DWORD *)*a1;
if ( a3 )
*a3 = *(_DWORD *)(*a1 + 4);
v6 = 1;
if ( a4 )
*a4 = *(_DWORD *)(*a1 + 8);
}
else
{
*(_OWORD *)(*a1 + 192) = *(_OWORD *)(*a1 + 208);
}
return v6;
}
|
stbi__png_info_raw:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
XOR EBP,EBP
MOV ESI,0x2
XOR EDX,EDX
CALL 0x0012f103
TEST EAX,EAX
JZ 0x00136b56
TEST R12,R12
JZ 0x00136b34
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R12],EAX
LAB_00136b34:
TEST R15,R15
JZ 0x00136b42
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [R15],EAX
LAB_00136b42:
MOV EBP,0x1
TEST RBX,RBX
JZ 0x00136b67
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBX],EAX
JMP 0x00136b67
LAB_00136b56:
MOV RAX,qword ptr [R14]
MOVUPS XMM0,xmmword ptr [RAX + 0xd0]
MOVUPS xmmword ptr [RAX + 0xc0],XMM0
LAB_00136b67:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* stbi__png_info_raw(stbi__png*, int*, int*, int*) */
int8 stbi__png_info_raw(stbi__png *param_1,int *param_2,int *param_3,int *param_4)
{
long lVar1;
int iVar2;
int8 uVar3;
uVar3 = 0;
iVar2 = stbi__parse_png_file(param_1,2,0);
if (iVar2 == 0) {
lVar1 = *(long *)param_1;
*(int8 *)(lVar1 + 0xc0) = *(int8 *)(lVar1 + 0xd0);
*(int8 *)(lVar1 + 200) = *(int8 *)(lVar1 + 0xd8);
}
else {
if (param_2 != (int *)0x0) {
*param_2 = **(int **)param_1;
}
if (param_3 != (int *)0x0) {
*param_3 = *(int *)(*(long *)param_1 + 4);
}
uVar3 = 1;
if (param_4 != (int *)0x0) {
*param_4 = *(int *)(*(long *)param_1 + 8);
}
}
return uVar3;
}
|
|
14,064
|
mi_check_index
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_check_index(MI_INFO *info, int inx)
{
if (inx == -1) /* Use last index */
inx=info->lastinx;
if (inx < 0)
{
my_errno= HA_ERR_WRONG_INDEX;
return -1;
}
if (!mi_is_key_active(info->s->state.key_map, inx))
{
my_errno= info->s->state.state.records ? HA_ERR_WRONG_INDEX :
HA_ERR_END_OF_FILE;
return -1;
}
if (info->lastinx != inx) /* Index changed */
{
info->lastinx = inx;
info->page_changed=1;
info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) |
HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND);
}
if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache))
return(-1);
return(inx);
}
|
O3
|
c
|
mi_check_index:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
cmpl $-0x1, %esi
jne 0x9eee7
movl 0x1d4(%rdi), %ebx
testl %ebx, %ebx
js 0x9ef4d
movq (%rdi), %rax
movq 0xc0(%rax), %rcx
btq %rbx, %rcx
jae 0x9ef5a
cmpl %ebx, 0x1d4(%rdi)
je 0x9ef24
movl %ebx, 0x1d4(%rdi)
movb $0x1, 0x33c(%rdi)
movl $0x401, %eax # imm = 0x401
andl 0x1d0(%rdi), %eax
orl $0x30, %eax
movl %eax, 0x1d0(%rdi)
testb $0x10, 0x1c8(%rdi)
je 0x9ef49
addq $0x220, %rdi # imm = 0x220
movl $0x1, %esi
callq 0xb0e3d
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9ef78
movl %ebx, %eax
jmp 0x9ef78
callq 0xc14ee
movl $0x7c, (%rax)
jmp 0x9ef73
cmpq $0x0, 0x18(%rax)
movl $0x89, %eax
movl $0x7c, %ebx
cmovel %eax, %ebx
callq 0xc14ee
movl %ebx, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_mi_check_index:
push rbp
mov rbp, rsp
push rbx
push rax
mov ebx, esi
cmp esi, 0FFFFFFFFh
jnz short loc_9EEE7
mov ebx, [rdi+1D4h]
loc_9EEE7:
test ebx, ebx
js short loc_9EF4D
mov rax, [rdi]
mov rcx, [rax+0C0h]
bt rcx, rbx
jnb short loc_9EF5A
cmp [rdi+1D4h], ebx
jz short loc_9EF24
mov [rdi+1D4h], ebx
mov byte ptr [rdi+33Ch], 1
mov eax, 401h
and eax, [rdi+1D0h]
or eax, 30h
mov [rdi+1D0h], eax
loc_9EF24:
test byte ptr [rdi+1C8h], 10h
jz short loc_9EF49
add rdi, 220h
mov esi, 1
call my_b_flush_io_cache
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_9EF78
loc_9EF49:
mov eax, ebx
jmp short loc_9EF78
loc_9EF4D:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_9EF73
loc_9EF5A:
cmp qword ptr [rax+18h], 0
mov eax, 89h
mov ebx, 7Ch ; '|'
cmovz ebx, eax
call _my_thread_var
mov [rax], ebx
loc_9EF73:
mov eax, 0FFFFFFFFh
loc_9EF78:
add rsp, 8
pop rbx
pop rbp
retn
|
long long mi_check_index(unsigned int *a1, unsigned int a2)
{
unsigned long long v2; // rbx
long long v3; // rcx
int v4; // ecx
long long result; // rax
int v6; // ebx
v2 = a2;
if ( a2 == -1 )
v2 = a1[117];
if ( (v2 & 0x80000000) != 0LL )
{
*(_DWORD *)my_thread_var(a1) = 124;
return 0xFFFFFFFFLL;
}
v3 = *(_QWORD *)(*(_QWORD *)a1 + 192LL);
if ( !_bittest64(&v3, v2) )
{
v6 = 124;
if ( !*(_QWORD *)(*(_QWORD *)a1 + 24LL) )
v6 = 137;
*(_DWORD *)my_thread_var(a1) = v6;
return 0xFFFFFFFFLL;
}
if ( a1[117] != (_DWORD)v2 )
{
a1[117] = v2;
*((_BYTE *)a1 + 828) = 1;
a1[116] = a1[116] & 0x401 | 0x30;
}
if ( (a1[114] & 0x10) == 0 )
return (unsigned int)v2;
v4 = my_b_flush_io_cache(a1 + 136, 1LL);
result = 0xFFFFFFFFLL;
if ( !v4 )
return (unsigned int)v2;
return result;
}
|
_mi_check_index:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EBX,ESI
CMP ESI,-0x1
JNZ 0x0019eee7
MOV EBX,dword ptr [RDI + 0x1d4]
LAB_0019eee7:
TEST EBX,EBX
JS 0x0019ef4d
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0xc0]
BT RCX,RBX
JNC 0x0019ef5a
CMP dword ptr [RDI + 0x1d4],EBX
JZ 0x0019ef24
MOV dword ptr [RDI + 0x1d4],EBX
MOV byte ptr [RDI + 0x33c],0x1
MOV EAX,0x401
AND EAX,dword ptr [RDI + 0x1d0]
OR EAX,0x30
MOV dword ptr [RDI + 0x1d0],EAX
LAB_0019ef24:
TEST byte ptr [RDI + 0x1c8],0x10
JZ 0x0019ef49
ADD RDI,0x220
MOV ESI,0x1
CALL 0x001b0e3d
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0019ef78
LAB_0019ef49:
MOV EAX,EBX
JMP 0x0019ef78
LAB_0019ef4d:
CALL 0x001c14ee
MOV dword ptr [RAX],0x7c
JMP 0x0019ef73
LAB_0019ef5a:
CMP qword ptr [RAX + 0x18],0x0
MOV EAX,0x89
MOV EBX,0x7c
CMOVZ EBX,EAX
CALL 0x001c14ee
MOV dword ptr [RAX],EBX
LAB_0019ef73:
MOV EAX,0xffffffff
LAB_0019ef78:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
ulong _mi_check_index(long *param_1,uint param_2)
{
int iVar1;
int4 *puVar2;
int4 uVar3;
ulong uVar4;
uVar4 = (ulong)param_2;
if (param_2 == 0xffffffff) {
uVar4 = (ulong)*(uint *)((long)param_1 + 0x1d4);
}
iVar1 = (int)uVar4;
if (iVar1 < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
if ((*(ulong *)(*param_1 + 0xc0) >> (uVar4 & 0x3f) & 1) != 0) {
if (*(int *)((long)param_1 + 0x1d4) != iVar1) {
*(int *)((long)param_1 + 0x1d4) = iVar1;
*(int1 *)((long)param_1 + 0x33c) = 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401 | 0x30;
}
if (((*(byte *)(param_1 + 0x39) & 0x10) != 0) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) {
return 0xffffffff;
}
return uVar4;
}
uVar3 = 0x7c;
if (*(long *)(*param_1 + 0x18) == 0) {
uVar3 = 0x89;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = uVar3;
}
return 0xffffffff;
}
|
|
14,065
|
uf_space_endspace_selected
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_space_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill((uchar*) to,(end-to),' ');
else
{
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill((uchar*) end-spaces,spaces,' ');
}
else
decode_bytes(rec,bit_buff,to,end);
}
}
|
O3
|
c
|
uf_space_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x82b09
movl (%r15), %r12d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jb 0x82b7e
testl %eax, %eax
jne 0x82b26
movq %r15, %rdi
callq 0x81f99
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
testl %r12d, %r12d
jns 0x82b91
movl $0x1f, %eax
jmp 0x82b32
movq %r15, %rdi
callq 0x81f99
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
movl $0x1f, %eax
testl %r12d, %r12d
js 0x82b7e
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jae 0x82b91
movq %r13, %rdx
movl 0x1c(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x82bb0
subl %eax, %r13d
movl %eax, %eax
leaq 0x5eda0(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r12d
movl %r13d, %ecx
shll %cl, %r12d
movq %r15, %rdi
callq 0x81f99
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r12d
jmp 0x82bc5
subq %r14, %rbx
movq %r14, %rdi
movl $0x20, %esi
movq %rbx, %rdx
jmp 0x82c14
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8288a
movl %ecx, 0x4(%r15)
shrl %cl, %r12d
movl 0x1c(%rdx), %eax
leaq 0x5ed2f(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r12d
movl %r12d, %r13d
leaq (%r14,%r13), %rax
cmpq %rbx, %rax
jbe 0x82be8
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r12
negq %r12
cmpq %rbx, %rax
je 0x82c06
leaq (%rbx,%r12), %rcx
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8288a
addq %r12, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
|
uf_space_endspace_selected_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_82B09
mov r12d, [r15]
dec eax
mov [r15+4], eax
bt r12d, eax
jb loc_82B7E
test eax, eax
jnz short loc_82B26
mov rdi, r15
call fill_buffer_0
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
test r12d, r12d
jns loc_82B91
mov eax, 1Fh
jmp short loc_82B32
loc_82B09:
mov rdi, r15
call fill_buffer_0
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
mov eax, 1Fh
test r12d, r12d
js short loc_82B7E
loc_82B26:
dec eax
mov [r15+4], eax
bt r12d, eax
jnb short loc_82B91
loc_82B32:
mov rdx, r13
mov r13d, [r13+1Ch]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_82BB0
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r12d, [rcx+rax*4]
mov ecx, r13d
shl r12d, cl
mov rdi, r15
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r12d, eax
jmp short loc_82BC5
loc_82B7E:
sub rbx, r14
mov rdi, r14
mov esi, 20h ; ' '
mov rdx, rbx
jmp loc_82C14
loc_82B91:
mov rdi, r13
mov rsi, r15
mov rdx, r14
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_82BB0:
mov [r15+4], ecx
shr r12d, cl
mov eax, [rdx+1Ch]
lea rcx, mask_0
and r12d, [rcx+rax*4]
loc_82BC5:
mov r13d, r12d
lea rax, [r14+r13]
cmp rax, rbx
jbe short loc_82BE8
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_82BE8:
mov r12, r13
neg r12
cmp rax, rbx
jz short loc_82C06
lea rcx, [rbx+r12]
mov rdi, [rbp+var_30]
mov rsi, r15
mov rdx, r14
call decode_bytes_0
loc_82C06:
add rbx, r12
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
loc_82C14:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
|
_BYTE * uf_space_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
unsigned int v6; // eax
unsigned int v7; // r12d
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // r13d
unsigned int v11; // ecx
int v12; // r13d
int v13; // r12d
unsigned int v14; // r12d
_BYTE *result; // rax
v6 = a2[1];
if ( !v6 )
{
fill_buffer_0((long long)a2);
a2[1] = 31;
v7 = *a2;
v8 = 31;
if ( (*a2 & 0x80000000) == 0 )
{
LABEL_7:
v9 = v8 - 1;
a2[1] = v9;
if ( _bittest((const int *)&v7, v9) )
goto LABEL_8;
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
return (_BYTE *)memset(a3, 32LL, a4 - a3);
}
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( _bittest((const int *)&v7, v8) )
return (_BYTE *)memset(a3, 32LL, a4 - a3);
if ( v8 )
goto LABEL_7;
fill_buffer_0((long long)a2);
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
v9 = 31;
LABEL_8:
v10 = *(_DWORD *)(a1 + 28);
v11 = v9 - v10;
if ( v9 >= v10 )
{
a2[1] = v11;
v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11);
}
else
{
v12 = v10 - v9;
v13 = (mask_0[v9] & v7) << v12;
fill_buffer_0((long long)a2);
a2[1] = 32 - v12;
v14 = (*a2 >> -(char)v12) + v13;
}
result = &a3[v14];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes_0(a1, (long long)a2, a3, &a4[-v14]);
return (_BYTE *)memset(&a4[-v14], 32LL, v14);
}
else
{
a2[10] = 1;
}
return result;
}
|
uf_space_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00182b09
MOV R12D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JC 0x00182b7e
TEST EAX,EAX
JNZ 0x00182b26
MOV RDI,R15
CALL 0x00181f99
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
TEST R12D,R12D
JNS 0x00182b91
MOV EAX,0x1f
JMP 0x00182b32
LAB_00182b09:
MOV RDI,R15
CALL 0x00181f99
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
MOV EAX,0x1f
TEST R12D,R12D
JS 0x00182b7e
LAB_00182b26:
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JNC 0x00182b91
LAB_00182b32:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x00182bb0
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18f0]
AND R12D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R12D,CL
MOV RDI,R15
CALL 0x00181f99
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R12D,EAX
JMP 0x00182bc5
LAB_00182b7e:
SUB RBX,R14
MOV RDI,R14
MOV ESI,0x20
MOV RDX,RBX
JMP 0x00182c14
LAB_00182b91:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018288a
LAB_00182bb0:
MOV dword ptr [R15 + 0x4],ECX
SHR R12D,CL
MOV EAX,dword ptr [RDX + 0x1c]
LEA RCX,[0x1e18f0]
AND R12D,dword ptr [RCX + RAX*0x4]
LAB_00182bc5:
MOV R13D,R12D
LEA RAX,[R14 + R13*0x1]
CMP RAX,RBX
JBE 0x00182be8
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00182be8:
MOV R12,R13
NEG R12
CMP RAX,RBX
JZ 0x00182c06
LEA RCX,[RBX + R12*0x1]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV RDX,R14
CALL 0x0018288a
LAB_00182c06:
ADD RBX,R12
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
LAB_00182c14:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
size_t __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if ((int)uVar5 < 0) goto LAB_00182b7e;
LAB_00182b26:
uVar3 = uVar3 - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_00182b91:
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_00182b7e:
__n = param_4 - (long)param_3;
goto LAB_00182c14;
}
if (uVar3 != 0) goto LAB_00182b26;
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if (-1 < (int)uVar5) goto LAB_00182b91;
uVar3 = 0x1f;
}
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
__n = (size_t)uVar5;
if (param_4 < (long)param_3 + __n) {
param_2[10] = 1;
return;
}
if ((long)param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
param_3 = (void *)(param_4 + -__n);
LAB_00182c14:
memset(param_3,0x20,__n);
return;
}
|
|
14,066
|
bchange
|
eloqsql/strings/bchange.c
|
void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
}
|
O3
|
c
|
bchange:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %r8, %rdx
subq %rsi, %rdx
cmpq %rcx, %rsi
jae 0x40a9e
leaq (%r15,%rdx), %rdi
addq %rbx, %rdi
addq %r15, %r8
movq %r8, %rsi
callq 0x40ac4
jmp 0x40aaa
leaq (%r15,%rbx), %rdi
addq %r15, %rsi
callq 0x335b0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x33240
nop
|
bchange:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rdi
mov rdx, r8
sub rdx, rsi
cmp rsi, rcx
jnb short loc_40A9E
lea rdi, [r15+rdx]
add rdi, rbx
add r8, r15
mov rsi, r8
call bmove_upp
jmp short loc_40AAA
loc_40A9E:
lea rdi, [r15+rbx]
add rsi, r15
call _memmove
loc_40AAA:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memcpy
|
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v7; // rdx
v7 = a5 - a2;
if ( a2 >= a4 )
memmove(a1 + a4, a1 + a2, v7);
else
bmove_upp(a4 + a1 + v7, a1 + a5, v7);
return memcpy(a1, a3, a4);
}
|
bchange:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
MOV RDX,R8
SUB RDX,RSI
CMP RSI,RCX
JNC 0x00140a9e
LEA RDI,[R15 + RDX*0x1]
ADD RDI,RBX
ADD R8,R15
MOV RSI,R8
CALL 0x00140ac4
JMP 0x00140aaa
LAB_00140a9e:
LEA RDI,[R15 + RBX*0x1]
ADD RSI,R15
CALL 0x001335b0
LAB_00140aaa:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00133240
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + (param_5 - param_2),param_5 + (long)param_1);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)(param_2 + (long)param_1),param_5 - param_2);
}
memcpy(param_1,param_3,param_4);
return;
}
|
|
14,067
|
wait_for_free_space
|
eloqsql/mysys/errors.c
|
void wait_for_free_space(const char *filename, int errors)
{
if (errors == 0)
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
my_printf_error(EE_DISK_FULL,
"Retry in %d secs. Message reprinted in %d secs",
MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
MY_WAIT_FOR_USER_TO_FIX_PANIC,
MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
(void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
}
|
O3
|
c
|
wait_for_free_space:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x29119
imull $0xcccccccd, %esi, %eax # imm = 0xCCCCCCCD
movl $0x19999998, %ecx # imm = 0x19999998
addl %ecx, %eax
rorl %eax
cmpl %ecx, %eax
ja 0x29160
jmp 0x2913d
movq %rdi, %rbx
callq 0x2656a
movl (%rax), %ecx
movl $0x844, %esi # imm = 0x844
movl $0x14, %edi
movq %rbx, %rdx
movl $0x3c, %r8d
xorl %eax, %eax
callq 0x2a6c3
leaq 0x32f30(%rip), %rsi # 0x5c074
movl $0x844, %edx # imm = 0x844
movl $0x14, %edi
movl $0x3c, %ecx
movl $0x258, %r8d # imm = 0x258
xorl %eax, %eax
callq 0x2a7dd
movl $0x3c, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x24200
|
wait_for_free_space:
push rbp
mov rbp, rsp
push rbx
push rax
test esi, esi
jz short loc_29119
imul eax, esi, 0CCCCCCCDh
mov ecx, 19999998h
add eax, ecx
ror eax, 1
cmp eax, ecx
ja short loc_29160
jmp short loc_2913D
loc_29119:
mov rbx, rdi
call _my_thread_var
mov ecx, [rax]
mov esi, 844h
mov edi, 14h
mov rdx, rbx
mov r8d, 3Ch ; '<'
xor eax, eax
call my_error
loc_2913D:
lea rsi, aRetryInDSecsMe; "Retry in %d secs. Message reprinted in "...
mov edx, 844h
mov edi, 14h
mov ecx, 3Ch ; '<'
mov r8d, 258h
xor eax, eax
call my_printf_error
loc_29160:
mov edi, 3Ch ; '<'
add rsp, 8
pop rbx
pop rbp
jmp _sleep
|
long long wait_for_free_space(int a1, int a2, long long a3, long long a4, long long a5, int a6)
{
char v6; // al
_DWORD *v7; // rax
int v8; // r9d
char v10; // [rsp-8h] [rbp-10h]
v10 = v6;
if ( !a2 )
{
v7 = (_DWORD *)my_thread_var();
my_error(20, 2116, a1, *v7, 60, v8, v10);
LABEL_5:
my_printf_error(20, (unsigned int)"Retry in %d secs. Message reprinted in %d secs", 2116, 60, 600, a6, v10);
return sleep(60LL);
}
if ( __ROR4__(-858993459 * a2 + 429496728, 1) <= 0x19999998u )
goto LABEL_5;
return sleep(60LL);
}
|
wait_for_free_space:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
TEST ESI,ESI
JZ 0x00129119
IMUL EAX,ESI,-0x33333333
MOV ECX,0x19999998
ADD EAX,ECX
ROR EAX,0x1
CMP EAX,ECX
JA 0x00129160
JMP 0x0012913d
LAB_00129119:
MOV RBX,RDI
CALL 0x0012656a
MOV ECX,dword ptr [RAX]
MOV ESI,0x844
MOV EDI,0x14
MOV RDX,RBX
MOV R8D,0x3c
XOR EAX,EAX
CALL 0x0012a6c3
LAB_0012913d:
LEA RSI,[0x15c074]
MOV EDX,0x844
MOV EDI,0x14
MOV ECX,0x3c
MOV R8D,0x258
XOR EAX,EAX
CALL 0x0012a7dd
LAB_00129160:
MOV EDI,0x3c
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00124200
|
void wait_for_free_space(int8 param_1,int param_2)
{
uint uVar1;
int4 *puVar2;
if (param_2 == 0) {
puVar2 = (int4 *)_my_thread_var();
my_error(0x14,0x844,param_1,*puVar2,0x3c);
}
else {
uVar1 = param_2 * -0x33333333 + 0x19999998;
if (0x19999998 < (uVar1 >> 1 | (uint)((uVar1 & 1) != 0) << 0x1f)) goto LAB_00129160;
}
my_printf_error(0x14,"Retry in %d secs. Message reprinted in %d secs",0x844,0x3c,600);
LAB_00129160:
sleep(0x3c);
return;
}
|
|
14,068
|
my_strnxfrm_czech
|
eloqsql/strings/ctype-czech.c
|
static size_t
my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p, * store;
int pass = 0;
size_t totlen = 0;
p = src; store = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
do
{
int add= (1 << pass) & flags; /* If this level is needed */
NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen);
if (add)
ADD_TO_RESULT(dest, len, totlen, value);
}
while (value);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, ' ', len - totlen);
totlen= len;
}
return totlen;
}
|
O0
|
c
|
my_strnxfrm_czech:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x3baf8
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x3bafa
movl -0x4c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x3bb6d
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x4c(%rbp)
je 0x3bb68
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cmpl $0x0, %eax
jne 0x3bb4b
movq -0x48(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x3bb56
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x3bdc7
movslq -0x4c(%rbp), %rcx
leaq 0x18daf8(%rip), %rax # 0x1c9670
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x3bba1
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3bb0a
cmpl $0x2, -0x34(%rbp)
jne 0x3bcad
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x99(%rbp)
jge 0x3bc00
movslq -0x4c(%rbp), %rcx
leaq 0x18da8b(%rip), %rax # 0x1c9670
movq (%rax,%rcx,8), %rax
movq -0x70(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
sete %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x3bc0c
jmp 0x3bc1a
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x3bbbb
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x3bc39
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x2, -0x4c(%rbp)
jg 0x3bc5e
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x3bc5e
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x3bc7a
jmp 0x3bb0a
cmpl $0x1, -0x4c(%rbp)
jle 0x3bc85
jmp 0x3bdc7
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x1, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x3bdc7
cmpl $0xff, -0x34(%rbp)
jne 0x3bdbb
movl $0x0, -0x74(%rbp)
cmpl $0x50, -0x74(%rbp)
jge 0x3bdb9
movslq -0x74(%rbp), %rcx
leaq 0x18d9ba(%rip), %rax # 0x1c9690
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3bd66
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x3bd41
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
movq -0x80(%rbp), %rcx
movslq -0x8c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x3bd43
jmp 0x3bd66
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x3bcf9
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x3bda9
movslq -0x74(%rbp), %rcx
leaq 0x18d90e(%rip), %rax # 0x1c9690
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3bdb9
jmp 0x3bdab
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x3bcc1
jmp 0x3bdbb
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x3bdf4
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x3bdf2
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x58(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x3bdf4
jmp 0x3bdf6
cmpl $0x0, -0x34(%rbp)
jne 0x3bafa
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x3be39
movq -0x18(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x3be39
movq -0x10(%rbp), %rdi
addq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x58(%rbp), %rdx
movl $0x20, %esi
callq 0x241b0
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strnxfrm_czech:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_4C], 0
mov [rbp+var_58], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_3BAF8
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_3BAF8:
jmp short $+2
loc_3BAFA:
mov ecx, [rbp+var_4C]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
mov [rbp+var_5C], eax
loc_3BB0A:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_3BB6D
mov [rbp+var_34], 0
cmp [rbp+var_4C], 3
jz short loc_3BB68
mov eax, [rbp+var_4C]
mov ecx, eax
add ecx, 1
mov [rbp+var_4C], ecx
cmp eax, 0
jnz short loc_3BB4B
mov rax, [rbp+var_48]
mov [rbp+var_98], rax
jmp short loc_3BB56
loc_3BB4B:
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
loc_3BB56:
mov rax, [rbp+var_98]
mov [rbp+var_40], rax
mov [rbp+var_34], 1
loc_3BB68:
jmp loc_3BDC7
loc_3BB6D:
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jnz short loc_3BBA1
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_3BB0A
loc_3BBA1:
cmp [rbp+var_34], 2
jnz loc_3BCAD
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
mov [rbp+var_70], rax
loc_3BBBB:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_99], al
jge short loc_3BC00
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_70]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
cmp eax, 2
setz al
mov [rbp+var_99], al
loc_3BC00:
mov al, [rbp+var_99]
test al, 1
jnz short loc_3BC0C
jmp short loc_3BC1A
loc_3BC0C:
mov rax, [rbp+var_70]
add rax, 1
mov [rbp+var_70], rax
jmp short loc_3BBBB
loc_3BC1A:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_3BC39
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_3BC39:
cmp [rbp+var_4C], 2
jg short loc_3BC5E
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_3BC5E
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_3BC5E:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_3BC7A
jmp loc_3BB0A
loc_3BC7A:
cmp [rbp+var_4C], 1
jle short loc_3BC85
jmp loc_3BDC7
loc_3BC85:
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
mov eax, 1
sub eax, [rbp+var_4C]
mov [rbp+var_4C], eax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rax, [rbp+var_68]
mov [rbp+var_48], rax
jmp loc_3BDC7
loc_3BCAD:
cmp [rbp+var_34], 0FFh
jnz loc_3BDBB
mov [rbp+var_74], 0
loc_3BCC1:
cmp [rbp+var_74], 50h ; 'P'
jge loc_3BDB9
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_80], rax
mov rax, [rbp+var_40]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
loc_3BCF9:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jz short loc_3BD66
mov rax, [rbp+var_88]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_3BD41
mov rax, [rbp+var_88]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_80]
movsxd rdx, [rbp+var_8C]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_3BD43
loc_3BD41:
jmp short loc_3BD66
loc_3BD43:
mov eax, [rbp+var_8C]
add eax, 1
mov [rbp+var_8C], eax
mov rax, [rbp+var_88]
add rax, 1
mov [rbp+var_88], rax
jmp short loc_3BCF9
loc_3BD66:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jnz short loc_3BDA9
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax+8]
movsxd rcx, [rbp+var_4C]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
mov rax, [rbp+var_88]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_3BDB9
loc_3BDA9:
jmp short $+2
loc_3BDAB:
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp loc_3BCC1
loc_3BDB9:
jmp short $+2
loc_3BDBB:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_3BDC7:
cmp [rbp+var_5C], 0
jz short loc_3BDF4
mov rax, [rbp+var_58]
cmp rax, [rbp+var_18]
jnb short loc_3BDF2
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_58]
mov rsi, rcx
add rsi, 1
mov [rbp+var_58], rsi
mov [rax+rcx], dl
loc_3BDF2:
jmp short $+2
loc_3BDF4:
jmp short $+2
loc_3BDF6:
cmp [rbp+var_34], 0
jnz loc_3BAFA
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_3BE39
mov rax, [rbp+var_18]
cmp rax, [rbp+var_58]
jbe short loc_3BE39
mov rdi, [rbp+var_10]
add rdi, [rbp+var_58]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_58]
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_3BE39:
mov rax, [rbp+var_58]
add rsp, 0A0h
pop rbp
retn
|
unsigned long long my_strnxfrm_czech(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
char *a5,
int a6,
int a7)
{
long long v8; // rcx
long long v9; // rcx
bool v11; // [rsp+7h] [rbp-99h]
char *v12; // [rsp+8h] [rbp-98h]
int k; // [rsp+14h] [rbp-8Ch]
char *v14; // [rsp+18h] [rbp-88h]
long long v15; // [rsp+20h] [rbp-80h]
int j; // [rsp+2Ch] [rbp-74h]
unsigned __int8 *i; // [rsp+30h] [rbp-70h]
char *v18; // [rsp+38h] [rbp-68h]
int v19; // [rsp+44h] [rbp-5Ch]
unsigned long long v20; // [rsp+48h] [rbp-58h]
int v21; // [rsp+54h] [rbp-4Ch]
char *v22; // [rsp+58h] [rbp-48h]
char *v23; // [rsp+60h] [rbp-40h]
int v24; // [rsp+6Ch] [rbp-34h]
v21 = 0;
v20 = 0LL;
v23 = a5;
v22 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
do
{
v19 = a7 & (1 << v21);
while ( 1 )
{
while ( 1 )
{
if ( v23 - a5 >= a6 )
{
v24 = 0;
if ( v21 != 3 )
{
if ( v21++ )
v12 = a5;
else
v12 = v22;
v23 = v12;
v24 = 1;
}
goto LABEL_40;
}
v8 = (unsigned __int8)*v23;
v24 = *((unsigned __int8 *)*(&CZ_SORT_TABLE + v21) + v8);
if ( *((_BYTE *)*(&CZ_SORT_TABLE + v21) + v8) )
break;
++v23;
}
if ( v24 != 2 )
break;
for ( i = (unsigned __int8 *)++v23; ; ++i )
{
v11 = 0;
if ( i - (unsigned __int8 *)a5 < a6 )
v11 = *((_BYTE *)*(&CZ_SORT_TABLE + v21) + *i) == 2;
if ( !v11 )
break;
}
if ( i - (unsigned __int8 *)a5 >= a6 )
v23 = (char *)i;
if ( v21 <= 2 && i - (unsigned __int8 *)a5 < a6 )
v23 = (char *)i;
if ( v23 - a5 < a6 )
{
if ( v21 <= 1 )
{
v18 = v23;
v21 = 1 - v21;
v23 = v22;
v22 = v18;
}
goto LABEL_40;
}
}
if ( v24 == 255 )
{
for ( j = 0; j < 80; ++j )
{
v15 = (long long)*(&doubles + 2 * j);
v14 = v23;
for ( k = 0; *(_BYTE *)(v15 + k) && v14 - a5 < a6 && *v14 == *(char *)(v15 + k); ++k )
++v14;
if ( !*(_BYTE *)(v15 + k) )
{
v24 = *((unsigned __int8 *)*(&doubles + 2 * j + 1) + v21);
v23 = v14 - 1;
break;
}
}
}
++v23;
LABEL_40:
if ( v19 && v20 < a3 )
{
v9 = v20++;
*(_BYTE *)(a2 + v9) = v24;
}
}
while ( v24 );
if ( (a7 & 0x80) != 0 && a3 > v20 )
{
memset(v20 + a2, 32LL, a3 - v20);
return a3;
}
return v20;
}
|
my_strnxfrm_czech:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x4c],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x0013baf8
MOV EAX,dword ptr [RBP + 0x10]
OR EAX,0xf
MOV dword ptr [RBP + 0x10],EAX
LAB_0013baf8:
JMP 0x0013bafa
LAB_0013bafa:
MOV ECX,dword ptr [RBP + -0x4c]
MOV EAX,0x1
SHL EAX,CL
AND EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x5c],EAX
LAB_0013bb0a:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x0013bb6d
MOV dword ptr [RBP + -0x34],0x0
CMP dword ptr [RBP + -0x4c],0x3
JZ 0x0013bb68
MOV EAX,dword ptr [RBP + -0x4c]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0x4c],ECX
CMP EAX,0x0
JNZ 0x0013bb4b
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0013bb56
LAB_0013bb4b:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
LAB_0013bb56:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x34],0x1
LAB_0013bb68:
JMP 0x0013bdc7
LAB_0013bb6d:
MOVSXD RCX,dword ptr [RBP + -0x4c]
LEA RAX,[0x2c9670]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0013bba1
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013bb0a
LAB_0013bba1:
CMP dword ptr [RBP + -0x34],0x2
JNZ 0x0013bcad
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x70],RAX
LAB_0013bbbb:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,EAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x99],AL
JGE 0x0013bc00
MOVSXD RCX,dword ptr [RBP + -0x4c]
LEA RAX,[0x2c9670]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x70]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x2
SETZ AL
MOV byte ptr [RBP + -0x99],AL
LAB_0013bc00:
MOV AL,byte ptr [RBP + -0x99]
TEST AL,0x1
JNZ 0x0013bc0c
JMP 0x0013bc1a
LAB_0013bc0c:
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x1
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0013bbbb
LAB_0013bc1a:
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x0013bc39
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013bc39:
CMP dword ptr [RBP + -0x4c],0x2
JG 0x0013bc5e
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x0013bc5e
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013bc5e:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x0013bc7a
JMP 0x0013bb0a
LAB_0013bc7a:
CMP dword ptr [RBP + -0x4c],0x1
JLE 0x0013bc85
JMP 0x0013bdc7
LAB_0013bc85:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,0x1
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013bdc7
LAB_0013bcad:
CMP dword ptr [RBP + -0x34],0xff
JNZ 0x0013bdbb
MOV dword ptr [RBP + -0x74],0x0
LAB_0013bcc1:
CMP dword ptr [RBP + -0x74],0x50
JGE 0x0013bdb9
MOVSXD RCX,dword ptr [RBP + -0x74]
LEA RAX,[0x2c9690]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x8c],0x0
LAB_0013bcf9:
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RBP + -0x8c]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x0013bd66
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x0013bd41
MOV RAX,qword ptr [RBP + -0x88]
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x80]
MOVSXD RDX,dword ptr [RBP + -0x8c]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x0013bd43
LAB_0013bd41:
JMP 0x0013bd66
LAB_0013bd43:
MOV EAX,dword ptr [RBP + -0x8c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,0x1
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0013bcf9
LAB_0013bd66:
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RBP + -0x8c]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x0013bda9
MOVSXD RCX,dword ptr [RBP + -0x74]
LEA RAX,[0x2c9690]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013bdb9
LAB_0013bda9:
JMP 0x0013bdab
LAB_0013bdab:
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
JMP 0x0013bcc1
LAB_0013bdb9:
JMP 0x0013bdbb
LAB_0013bdbb:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0013bdc7:
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x0013bdf4
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0013bdf2
MOV EAX,dword ptr [RBP + -0x34]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x58]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RBP + -0x58],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0013bdf2:
JMP 0x0013bdf4
LAB_0013bdf4:
JMP 0x0013bdf6
LAB_0013bdf6:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0013bafa
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0013be39
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0013be39
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RBP + -0x58]
MOV ESI,0x20
CALL 0x001241b0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_0013be39:
MOV RAX,qword ptr [RBP + -0x58]
ADD RSP,0xa0
POP RBP
RET
|
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4,
byte *param_5,int param_6,uint param_7)
{
char cVar1;
long lVar2;
byte *pbVar3;
byte bVar4;
bool bVar5;
byte *local_a0;
int local_94;
byte *local_90;
int local_7c;
byte *local_78;
ulong local_60;
int local_54;
byte *local_50;
byte *local_48;
local_54 = 0;
local_60 = 0;
local_50 = param_5;
local_48 = param_5;
if ((param_7 & 0xf) == 0) {
param_7 = param_7 | 0xf;
}
LAB_0013bafa:
bVar4 = (byte)local_54;
do {
while( true ) {
if ((long)param_6 <= (long)local_48 - (long)param_5) {
cVar1 = '\0';
if (local_54 != 3) {
local_a0 = param_5;
if (local_54 == 0) {
local_a0 = local_50;
}
local_48 = local_a0;
cVar1 = '\x01';
local_54 = local_54 + 1;
}
goto LAB_0013bdc7;
}
cVar1 = (&CZ_SORT_TABLE)[local_54][*local_48];
if (cVar1 != '\0') break;
local_48 = local_48 + 1;
}
if (cVar1 != '\x02') {
if (cVar1 != -1) goto LAB_0013bdbb;
local_7c = 0;
goto LAB_0013bcc1;
}
local_48 = local_48 + 1;
local_78 = local_48;
while( true ) {
bVar5 = false;
if ((long)local_78 - (long)param_5 < (long)param_6) {
bVar5 = (&CZ_SORT_TABLE)[local_54][*local_78] == '\x02';
}
if (!bVar5) break;
local_78 = local_78 + 1;
}
if ((long)param_6 <= (long)local_78 - (long)param_5) {
local_48 = local_78;
}
if ((local_54 < 3) && ((long)local_78 - (long)param_5 < (long)param_6)) {
local_48 = local_78;
}
pbVar3 = local_48;
} while ((long)param_6 <= (long)local_48 - (long)param_5);
if (local_54 < 2) {
local_48 = local_50;
local_50 = pbVar3;
local_54 = 1 - local_54;
}
goto LAB_0013bdc7;
LAB_0013bcc1:
if (0x4f < local_7c) goto LAB_0013bdbb;
lVar2 = *(long *)(doubles + (long)local_7c * 0x10);
local_94 = 0;
for (local_90 = local_48;
((*(char *)(lVar2 + local_94) != '\0' && ((long)local_90 - (long)param_5 < (long)param_6)) &&
(*local_90 == *(byte *)(lVar2 + local_94))); local_90 = local_90 + 1) {
local_94 = local_94 + 1;
}
if (*(char *)(lVar2 + local_94) == '\0') {
cVar1 = *(char *)(*(long *)(doubles + (long)local_7c * 0x10 + 8) + (long)local_54);
local_48 = local_90 + -1;
goto LAB_0013bdbb;
}
local_7c = local_7c + 1;
goto LAB_0013bcc1;
LAB_0013bdbb:
local_48 = local_48 + 1;
LAB_0013bdc7:
if (((1 << (bVar4 & 0x1f) & param_7) != 0) && (local_60 < param_3)) {
*(char *)(param_2 + local_60) = cVar1;
local_60 = local_60 + 1;
}
if (cVar1 == '\0') {
if (((param_7 & 0x80) != 0) && (local_60 < param_3)) {
memset((void *)(param_2 + local_60),0x20,param_3 - local_60);
local_60 = param_3;
}
return local_60;
}
goto LAB_0013bafa;
}
|
|
14,069
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O0
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0xb7250
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x116cd7
jmp 0x116d89
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0x5d680
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0xb7610
movq %rax, 0x20(%rsp)
leaq 0x1027c3(%rip), %rsi # 0x2194c4
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x115120
jmp 0x116d12
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0x114f70
jmp 0x116d2d
movq 0x8(%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x19503a(%rip), %rsi # 0x2abd78
leaq -0x5f685(%rip), %rdx # 0xb76c0
callq 0x5db00
jmp 0x116daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x116d74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5e548
testb $0x1, 0x13(%rsp)
jne 0x116d7d
jmp 0x116d87
movq 0x8(%rsp), %rdi
callq 0x5df80
jmp 0x116da5
movq 0x50(%rsp), %rdi
callq 0x116db0
movq %rax, %rsi
movq 0x48(%rsp), %rdi
callq 0x5e400
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x5dbc0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_stringEv; 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>::is_string(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_116CD7
jmp loc_116D89
loc_116CD7:
mov [rsp+58h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_50], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_116D12:
mov rdi, [rsp+58h+var_50]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_116D2D:
mov rdi, [rsp+58h+var_50]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_116DAF
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_116D74
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_116D74:
test [rsp+arg_B], 1
jnz short loc_116D7D
jmp short loc_116D87
loc_116D7D:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_116D87:
jmp short loc_116DA5
loc_116D89:
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rsi, rax
mov rdi, qword ptr [rsp+58h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
add rsp, 58h
retn
loc_116DA5:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_116DAF:
nop
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
_BYTE *a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-50h]
int v5[2]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v6[32]; // [rsp+28h] [rbp-30h] BYREF
int v7[2]; // [rsp+48h] [rbp-10h]
char v8[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v8 = a1;
*(_QWORD *)v7 = a2;
if ( !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>::is_string(a1) )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v8);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be string, but is ",
(nlohmann::json_abi_v3_11_3::detail **)v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)v6,
*(long long *)v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
v2 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v8);
return std::string::operator=(*(_QWORD *)v7, v2);
}
| |||
14,070
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x878ec
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1b4a0
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e434
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6c1ed(%rip), %rsi # 0xf3afd
leaq 0x10(%rsp), %rdi
callq 0x86ae1
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86912
xorl %ebp, %ebp
leaq 0xa65bd(%rip), %rsi # 0x12def8
leaq -0x2d3cc(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87970
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x87970
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8797d
movq %rbx, %rdi
callq 0x1b650
movq %r14, %rdi
callq 0x1bf70
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_878EC
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_878EC:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_87970
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_87970
mov r14, rax
mov bpl, 1
loc_87970:
test bpl, bpl
jz short loc_8797D
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8797D:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001878ec
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0011b4a0
LAB_001878ec:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e434
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00187909:
LEA RSI,[0x1f3afd]
LEA RDI,[RSP + 0x10]
CALL 0x00186ae1
MOV BPL,0x1
LAB_0018791d:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186912
XOR EBP,EBP
LEA RSI,[0x22def8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 00187909 to 00187919 has its CatchHandler @ 0018796a */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 0018791d to 00187949 has its CatchHandler @ 0018794a */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
14,071
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O2
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x64051
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x244c0
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %rbx
movq %r14, %rdi
callq 0x434f0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x51a6a(%rip), %rsi # 0xb5add
leaq 0x10(%rsp), %rdi
callq 0x6355f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x63472
xorl %ebp, %ebp
leaq 0x99e9a(%rip), %rsi # 0xfdf38
leaq -0x24025(%rip), %rdx # 0x40080
movq %rbx, %rdi
callq 0x24ee0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x251b8
testb %bpl, %bpl
jne 0x640c4
jmp 0x640cc
movq %rax, %r14
movq %rbx, %rdi
callq 0x24670
movq %r14, %rdi
callq 0x24f60
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_64051
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_64051:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_640C4
jmp short loc_640CC
mov r14, rax
loc_640C4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_640CC:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x00164051
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001244c0
LAB_00164051:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV RBX,RAX
MOV RDI,R14
CALL 0x001434f0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0016406c:
LEA RSI,[0x1b5add]
LEA RDI,[RSP + 0x10]
CALL 0x0016355f
MOV BPL,0x1
LAB_00164080:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00163472
XOR EBP,EBP
LEA RSI,[0x1fdf38]
LEA RDX,[0x140080]
MOV RDI,RBX
CALL 0x00124ee0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == '\x03') {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 0016406c to 0016407c has its CatchHandler @ 001640c1 */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 00164080 to 001640ac has its CatchHandler @ 001640ad */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
14,072
|
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [8], 0>(char const (&) [8]) const
|
monkey531[P]llama/common/json.hpp
|
constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
}
|
O3
|
cpp
|
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [8], 0>(char const (&) [8]) const:
cmpb $0x1, (%rdi)
jne 0xc798f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq (%r12), %rbx
cmpq 0x8(%r12), %rbx
je 0xc7992
movq %rsi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d2a0
testl %eax, %eax
je 0xc7982
addq $0x30, %rbx
cmpq 0x8(%r12), %rbx
jne 0xc7968
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
jmp 0xc7995
xorl %eax, %eax
retq
movq %rbx, %rax
cmpq %rbx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_C798F
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [r12]
cmp rbx, [r12+8]
jz short loc_C7992
mov r15, rsi
loc_C7968:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_C7982
add rbx, 30h ; '0'
cmp rbx, [r12+8]
jnz short loc_C7968
loc_C7982:
mov rax, rbx
mov rcx, [r14+8]
mov rbx, [rcx+8]
jmp short loc_C7995
loc_C798F:
xor eax, eax
retn
loc_C7992:
mov rax, rbx
loc_C7995:
cmp rax, rbx
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
if ( *v2 == v2[1] )
{
v4 = *v2;
}
else
{
do
{
if ( !(unsigned int)std::string::compare(v3, a2) )
break;
v3 += 48LL;
}
while ( v3 != v2[1] );
v4 = v3;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
return v4 != v3;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x001c798f
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [R12]
CMP RBX,qword ptr [R12 + 0x8]
JZ 0x001c7992
MOV R15,RSI
LAB_001c7968:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001c7982
ADD RBX,0x30
CMP RBX,qword ptr [R12 + 0x8]
JNZ 0x001c7968
LAB_001c7982:
MOV RAX,RBX
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
JMP 0x001c7995
LAB_001c798f:
XOR EAX,EAX
RET
LAB_001c7992:
MOV RAX,RBX
LAB_001c7995:
CMP RAX,RBX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)*plVar1;
pcVar4 = pcVar3;
if (pcVar3 != (char *)plVar1[1]) {
do {
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar3 = pcVar3 + 0x30;
} while (pcVar3 != (char *)plVar1[1]);
pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4);
}
|
|
14,073
|
LefDefParser::lefiSite::print(_IO_FILE*) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
|
void
lefiSite::print(FILE *f) const
{
fprintf(f, "SITE %s", name());
if (hasClass())
fprintf(f, " CLASS %s", siteClass());
if (hasSize())
fprintf(f, " SIZE %g %g", sizeX(),
sizeY());
if (hasXSymmetry())
fprintf(f, " SYMMETRY X");
if (hasYSymmetry())
fprintf(f, " SYMMETRY Y");
if (has90Symmetry())
fprintf(f, " SYMMETRY R90");
fprintf(f, "\n");
}
|
O3
|
cpp
|
LefDefParser::lefiSite::print(_IO_FILE*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdx
leaq 0x3a311(%rip), %rsi # 0x4cd0a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22c0
cmpl $0x0, 0x10(%r14)
je 0x12a1f
leaq 0x14(%r14), %rdx
leaq 0x39aef(%rip), %rsi # 0x4c504
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22c0
cmpl $0x0, 0x30(%r14)
je 0x12a43
movsd 0x20(%r14), %xmm0
movsd 0x28(%r14), %xmm1
leaq 0x3affc(%rip), %rsi # 0x4da35
movq %rbx, %rdi
movb $0x2, %al
callq 0x22c0
movl 0x34(%r14), %eax
testb $0x1, %al
je 0x12a68
leaq 0x3afef(%rip), %rdi # 0x4da41
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23b0
movl 0x34(%r14), %eax
testb $0x2, %al
je 0x12a89
leaq 0x3afda(%rip), %rdi # 0x4da4d
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23b0
movl 0x34(%r14), %eax
testb $0x4, %al
je 0x12aa6
leaq 0x3afc5(%rip), %rdi # 0x4da59
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23b0
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2270
|
_ZNK12LefDefParser8lefiSite5printEP8_IO_FILE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdx, [rdi+8]
lea rsi, aSiteS; "SITE %s"
mov rdi, rbx
xor eax, eax
call _fprintf
cmp dword ptr [r14+10h], 0
jz short loc_12A1F
lea rdx, [r14+14h]
lea rsi, aClassS; " CLASS %s"
mov rdi, rbx
xor eax, eax
call _fprintf
loc_12A1F:
cmp dword ptr [r14+30h], 0
jz short loc_12A43
movsd xmm0, qword ptr [r14+20h]
movsd xmm1, qword ptr [r14+28h]
lea rsi, aSizeGG; " SIZE %g %g"
mov rdi, rbx
mov al, 2
call _fprintf
loc_12A43:
mov eax, [r14+34h]
test al, 1
jz short loc_12A68
lea rdi, aSymmetryX_0; " SYMMETRY X"
mov esi, 0Bh
mov edx, 1
mov rcx, rbx
call _fwrite
mov eax, [r14+34h]
loc_12A68:
test al, 2
jz short loc_12A89
lea rdi, aSymmetryY_0; " SYMMETRY Y"
mov esi, 0Bh
mov edx, 1
mov rcx, rbx
call _fwrite
mov eax, [r14+34h]
loc_12A89:
test al, 4
jz short loc_12AA6
lea rdi, aSymmetryR90_0; " SYMMETRY R90"
mov esi, 0Dh
mov edx, 1
mov rcx, rbx
call _fwrite
loc_12AA6:
mov edi, 0Ah
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp _fputc
|
long long LefDefParser::lefiSite::print(long long a1, long long a2)
{
int v2; // eax
fprintf(a2, "SITE %s", *(const char **)(a1 + 8));
if ( *(_DWORD *)(a1 + 16) )
fprintf(a2, " CLASS %s", (const char *)(a1 + 20));
if ( *(_DWORD *)(a1 + 48) )
fprintf(a2, " SIZE %g %g", *(double *)(a1 + 32), *(double *)(a1 + 40));
v2 = *(_DWORD *)(a1 + 52);
if ( (v2 & 1) != 0 )
{
fwrite(" SYMMETRY X", 11LL, 1LL, a2);
v2 = *(_DWORD *)(a1 + 52);
}
if ( (v2 & 2) != 0 )
{
fwrite(" SYMMETRY Y", 11LL, 1LL, a2);
v2 = *(_DWORD *)(a1 + 52);
}
if ( (v2 & 4) != 0 )
fwrite(" SYMMETRY R90", 13LL, 1LL, a2);
return fputc(10LL, a2);
}
|
print:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,qword ptr [RDI + 0x8]
LEA RSI,[0x14cd0a]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001022c0
CMP dword ptr [R14 + 0x10],0x0
JZ 0x00112a1f
LEA RDX,[R14 + 0x14]
LEA RSI,[0x14c504]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001022c0
LAB_00112a1f:
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00112a43
MOVSD XMM0,qword ptr [R14 + 0x20]
MOVSD XMM1,qword ptr [R14 + 0x28]
LEA RSI,[0x14da35]
MOV RDI,RBX
MOV AL,0x2
CALL 0x001022c0
LAB_00112a43:
MOV EAX,dword ptr [R14 + 0x34]
TEST AL,0x1
JZ 0x00112a68
LEA RDI,[0x14da41]
MOV ESI,0xb
MOV EDX,0x1
MOV RCX,RBX
CALL 0x001023b0
MOV EAX,dword ptr [R14 + 0x34]
LAB_00112a68:
TEST AL,0x2
JZ 0x00112a89
LEA RDI,[0x14da4d]
MOV ESI,0xb
MOV EDX,0x1
MOV RCX,RBX
CALL 0x001023b0
MOV EAX,dword ptr [R14 + 0x34]
LAB_00112a89:
TEST AL,0x4
JZ 0x00112aa6
LEA RDI,[0x14da59]
MOV ESI,0xd
MOV EDX,0x1
MOV RCX,RBX
CALL 0x001023b0
LAB_00112aa6:
MOV EDI,0xa
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00102270
|
/* LefDefParser::lefiSite::print(_IO_FILE*) const */
void __thiscall LefDefParser::lefiSite::print(lefiSite *this,_IO_FILE *param_1)
{
uint uVar1;
fprintf(param_1,"SITE %s",*(int8 *)(this + 8));
if (*(int *)(this + 0x10) != 0) {
fprintf(param_1," CLASS %s",this + 0x14);
}
if (*(int *)(this + 0x30) != 0) {
fprintf(param_1," SIZE %g %g",*(int8 *)(this + 0x20),*(int8 *)(this + 0x28));
}
uVar1 = *(uint *)(this + 0x34);
if ((uVar1 & 1) != 0) {
fwrite(" SYMMETRY X",0xb,1,param_1);
uVar1 = *(uint *)(this + 0x34);
}
if ((uVar1 & 2) != 0) {
fwrite(" SYMMETRY Y",0xb,1,param_1);
uVar1 = *(uint *)(this + 0x34);
}
if ((uVar1 & 4) != 0) {
fwrite(" SYMMETRY R90",0xd,1,param_1);
}
fputc(10,param_1);
return;
}
|
|
14,074
|
coro::detail::sync_wait_task<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&> coro::detail::make_sync_wait_task<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&) (.resume)
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp
|
static auto make_sync_wait_task(awaitable_type&& a) -> sync_wait_task<return_type>
{
if constexpr (std::is_void_v<return_type>)
{
co_await std::forward<awaitable_type>(a);
co_return;
}
else
{
co_return co_await std::forward<awaitable_type>(a);
}
}
|
O3
|
cpp
|
coro::detail::sync_wait_task<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&> coro::detail::make_sync_wait_task<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&) (.resume):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x48(%rdi)
je 0x4326
leaq 0x30(%rbx), %rsi
leaq 0x10(%rbx), %r14
movq 0x38(%rbx), %rax
addq $0x10, %rax
leaq 0x20(%rbx), %rdi
movq %rax, 0x30(%rbx)
callq 0x34a0
movq $0x0, (%rbx)
movb $0x2, 0x48(%rbx)
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5458
movq 0x40(%rbx), %r14
movq %r14, 0x38(%rbx)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x433d
cmpq $0x0, (%rax)
je 0x42ea
movb $0x1, 0x48(%rbx)
movq 0x10(%r14), %r15
movq 0x18(%r14), %r12
cmpq %r12, %r15
je 0x435d
movq (%r15), %rdi
movq %r14, 0x10(%rdi)
callq *(%rdi)
addq $0x8, %r15
jmp 0x4349
movq %rbx, 0x8(%r14)
lock
subq $0x1, (%r14)
jbe 0x42ea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x3110
movq %r14, %rdi
callq 0x4db6
callq 0x33e0
jmp 0x4307
movq $0x0, (%rbx)
movb $0x2, 0x48(%rbx)
movq %rax, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x466e
|
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+48h], 0
jz short loc_4326
loc_42EA:
lea rsi, [rbx+30h]
lea r14, [rbx+10h]
mov rax, [rbx+38h]
add rax, 10h
lea rdi, [rbx+20h]
mov [rbx+30h], rax
call _ZNSt7variantIJN4coro6detail18unset_return_valueEPSt6vectorINS1_13when_all_taskIvEESaIS5_EENSt15__exception_ptr13exception_ptrEEE7emplaceILm1EJS8_EEENSt9enable_ifIX18is_constructible_vINSt19variant_alternativeIXT_ESB_E4typeEDpT0_EERSG_E4typeEDpOSH_
loc_4307:
mov qword ptr [rbx], 0
mov byte ptr [rbx+48h], 2
mov rdi, [rbx+10h]; this
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN4coro6detail15sync_wait_event3setEv; coro::detail::sync_wait_event::set(void)
loc_4326:
mov r14, [rbx+40h]
mov [rbx+38h], r14
mov rax, [r14+8]
test rax, rax
jz short loc_433D
cmp qword ptr [rax], 0
jz short loc_42EA
loc_433D:
mov byte ptr [rbx+48h], 1
mov r15, [r14+10h]
mov r12, [r14+18h]
loc_4349:
cmp r15, r12
jz short loc_435D
mov rdi, [r15]
mov [rdi+10h], r14
call qword ptr [rdi]
add r15, 8
jmp short loc_4349
loc_435D:
mov [r14+8], rbx
lock sub qword ptr [r14], 1
jbe short loc_42EA
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov rdi, rax; void *
call ___cxa_begin_catch
mov rdi, r14; this
call _ZN4coro6detail27sync_wait_task_promise_base19unhandled_exceptionEv; coro::detail::sync_wait_task_promise_base::unhandled_exception(void)
call ___cxa_end_catch
jmp loc_4307
mov qword ptr [rbx], 0
mov byte ptr [rbx+48h], 2
mov rdi, rax
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
_QWORD * ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume(
long long a1)
{
_QWORD *result; // rax
long long v3; // r14
unsigned long long v4; // r15
unsigned long long v5; // r12
long long ( **v6)(_QWORD); // rdi
if ( *(_BYTE *)(a1 + 72) )
goto LABEL_2;
v3 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 56) = v3;
result = *(_QWORD **)(v3 + 8);
if ( result )
{
if ( !*result )
goto LABEL_2;
}
*(_BYTE *)(a1 + 72) = 1;
v4 = *(_QWORD *)(v3 + 16);
v5 = *(_QWORD *)(v3 + 24);
while ( v4 != v5 )
{
v6 = *(long long ( ***)(_QWORD))v4;
*(_QWORD *)(*(_QWORD *)v4 + 16LL) = v3;
result = (_QWORD *)(*v6)(v6);
v4 += 8LL;
}
*(_QWORD *)(v3 + 8) = a1;
if ( (v4 < v5) | (_InterlockedSub64((volatile signed long long *)v3, 1uLL) == 0) )
{
LABEL_2:
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 56) + 16LL;
std::variant<coro::detail::unset_return_value,std::vector<coro::detail::when_all_task<void>> *,std::__exception_ptr::exception_ptr>::emplace<1ul,std::vector<coro::detail::when_all_task<void>> *>(
a1 + 32,
(_QWORD *)(a1 + 48));
*(_QWORD *)a1 = 0LL;
*(_BYTE *)(a1 + 72) = 2;
return (_QWORD *)coro::detail::sync_wait_event::set(*(coro::detail::sync_wait_event **)(a1 + 16));
}
return result;
}
|
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT_.resume:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x48],0x0
JZ 0x00104326
LAB_001042ea:
LEA RSI,[RBX + 0x30]
LEA R14,[RBX + 0x10]
MOV RAX,qword ptr [RBX + 0x38]
ADD RAX,0x10
LEA RDI,[RBX + 0x20]
MOV qword ptr [RBX + 0x30],RAX
LAB_00104302:
CALL 0x001034a0
LAB_00104307:
MOV qword ptr [RBX],0x0
MOV byte ptr [RBX + 0x48],0x2
MOV RDI,qword ptr [RBX + 0x10]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00105458
LAB_00104326:
MOV R14,qword ptr [RBX + 0x40]
MOV qword ptr [RBX + 0x38],R14
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x0010433d
CMP qword ptr [RAX],0x0
JZ 0x001042ea
LAB_0010433d:
MOV byte ptr [RBX + 0x48],0x1
MOV R15,qword ptr [R14 + 0x10]
MOV R12,qword ptr [R14 + 0x18]
LAB_00104349:
CMP R15,R12
JZ 0x0010435d
MOV RDI,qword ptr [R15]
MOV qword ptr [RDI + 0x10],R14
LAB_00104355:
CALL qword ptr [RDI]
LAB_00104357:
ADD R15,0x8
JMP 0x00104349
LAB_0010435d:
MOV qword ptr [R14 + 0x8],RBX
SUB.LOCK qword ptr [R14],0x1
JBE 0x001042ea
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
(int8 *param_1)
{
long lVar1;
long *plVar2;
long *plVar3;
int8 *puVar4;
long *plVar5;
if (*(char *)(param_1 + 9) == '\0') {
plVar2 = (long *)param_1[8];
param_1[7] = plVar2;
if (((long *)plVar2[1] == (long *)0x0) || (*(long *)plVar2[1] != 0)) {
*(int1 *)(param_1 + 9) = 1;
plVar3 = (long *)plVar2[3];
for (plVar5 = (long *)plVar2[2]; plVar5 != plVar3; plVar5 = plVar5 + 1) {
puVar4 = (int8 *)*plVar5;
puVar4[2] = plVar2;
/* try { // try from 00104355 to 00104356 has its CatchHandler @ 001043a1 */
(*(code *)*puVar4)();
}
plVar2[1] = (long)param_1;
LOCK();
lVar1 = *plVar2;
*plVar2 = *plVar2 + -1;
UNLOCK();
if (lVar1 != 0) {
return;
}
}
}
param_1[6] = param_1[7] + 0x10;
/* try { // try from 00104302 to 00104306 has its CatchHandler @ 00104374 */
std::
variant<coro::detail::unset_return_value,std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>*,std::__exception_ptr::exception_ptr>
::
emplace<1ul,std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>*>
((variant<coro::detail::unset_return_value,std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>*,std::__exception_ptr::exception_ptr>
*)(param_1 + 4),(vector **)(param_1 + 6));
*param_1 = 0;
*(int1 *)(param_1 + 9) = 2;
coro::detail::sync_wait_event::set((sync_wait_event *)param_1[2]);
return;
}
|
|
14,075
|
sp_make_key
|
eloqsql/storage/myisam/sp_key.c
|
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
const uchar *record, my_off_t filepos)
{
HA_KEYSEG *keyseg;
MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr];
uint len = 0;
uchar *pos;
uint dlen;
uchar *dptr;
double mbr[SPDIMS * 2];
uint i;
keyseg = &keyinfo->seg[-1];
pos = (uchar*)record + keyseg->start;
dlen = _mi_calc_blob_length(keyseg->bit_start, pos);
memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*));
if (!dptr)
{
my_errno= HA_ERR_NULL_IN_SPATIAL;
return 0;
}
sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */
for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++)
{
uint length = keyseg->length, start= keyseg->start;
double val;
DBUG_ASSERT(length == sizeof(double));
DBUG_ASSERT(!(start % sizeof(double)));
DBUG_ASSERT(start < sizeof(mbr));
DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE);
val= mbr[start / sizeof (double)];
if (isnan(val))
{
bzero(key, length);
key+= length;
len+= length;
continue;
}
if (keyseg->flag & HA_SWAP_KEY)
{
uchar buf[sizeof(double)];
float8store(buf, val);
pos= &buf[length];
while (pos > buf)
*key++ = *--pos;
}
else
{
float8store((uchar *)key, val);
key += length;
}
len+= length;
}
_mi_dpointer(info, key, filepos);
return len;
}
|
O3
|
c
|
sp_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x48(%rbp)
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
movq (%rdi), %rax
movq 0x218(%rax), %r15
movl %esi, %eax
imulq $0x70, %rax, %r12
movq 0x28(%r15,%r12), %r13
movl -0x18(%r13), %ebx
addq %rcx, %rbx
movzbl -0x6(%r13), %edi
movq %rbx, %rsi
callq 0x78c91
movzbl -0x6(%r13), %ecx
movq (%rcx,%rbx), %rcx
testq %rcx, %rcx
je 0x8ec0b
leaq (%r15,%r12), %rbx
addq $0x28, %rbx
leaq 0x4(%rcx), %rdx
addl $-0x4, %eax
leaq -0x38(%rbp), %r13
movq %rdx, (%r13)
movapd 0x4a585(%rip), %xmm0 # 0xd90f0
leaq -0x70(%rbp), %rdx
movapd %xmm0, (%rdx)
movapd %xmm0, 0x10(%rdx)
leaq (%rcx,%rax), %rsi
addq $0x4, %rsi
movq %r13, %rdi
movl $0x1, %ecx
callq 0x8ec54
movq (%rbx), %r15
cmpb $0x0, 0x18(%r15)
je 0x8ec1b
xorl %r12d, %r12d
movzwl 0x14(%r15), %ebx
movl 0x8(%r15), %eax
andl $-0x8, %eax
movsd -0x70(%rbp,%rax), %xmm0
ucomisd %xmm0, %xmm0
jp 0x8ebf9
testb $0x40, 0x12(%r15)
jne 0x8ebc7
movsd %xmm0, (%r14)
addq %rbx, %r14
jmp 0x8ebe9
movsd %xmm0, -0x38(%rbp)
testl %ebx, %ebx
je 0x8ebe9
leaq (%rbx,%rbp), %rax
addq $-0x38, %rax
movb -0x1(%rax), %cl
decq %rax
movb %cl, (%r14)
incq %r14
cmpq %r13, %rax
ja 0x8ebd8
addl %ebx, %r12d
cmpb $0x0, 0x38(%r15)
leaq 0x20(%r15), %r15
jne 0x8eb9e
jmp 0x8ec1e
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x292c0
addq %rbx, %r14
jmp 0x8ebe9
callq 0xa1b22
movl $0x9e, (%rax)
xorl %r12d, %r12d
jmp 0x8ec2e
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
movq %r14, %rsi
movq -0x48(%rbp), %rdx
callq 0x853f7
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8ec4f
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
sp_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_48], r8
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_40], rdi
mov rax, [rdi]
mov r15, [rax+218h]
mov eax, esi
imul r12, rax, 70h ; 'p'
mov r13, [r15+r12+28h]
mov ebx, [r13-18h]
add rbx, rcx
movzx edi, byte ptr [r13-6]
mov rsi, rbx
call _mi_calc_blob_length
movzx ecx, byte ptr [r13-6]
mov rcx, [rcx+rbx]
test rcx, rcx
jz loc_8EC0B
lea rbx, [r15+r12]
add rbx, 28h ; '('
lea rdx, [rcx+4]
add eax, 0FFFFFFFCh
lea r13, [rbp+var_38]
mov [r13+0], rdx
movapd xmm0, cs:xmmword_D90F0
lea rdx, [rbp+var_70]
movapd xmmword ptr [rdx], xmm0
movapd xmmword ptr [rdx+10h], xmm0
lea rsi, [rcx+rax]
add rsi, 4
mov rdi, r13
mov ecx, 1
call sp_get_geometry_mbr_0
mov r15, [rbx]
cmp byte ptr [r15+18h], 0
jz loc_8EC1B
xor r12d, r12d
loc_8EB9E:
movzx ebx, word ptr [r15+14h]
mov eax, [r15+8]
and eax, 0FFFFFFF8h
movsd xmm0, [rbp+rax+var_70]
ucomisd xmm0, xmm0
jp short loc_8EBF9
test byte ptr [r15+12h], 40h
jnz short loc_8EBC7
movsd qword ptr [r14], xmm0
add r14, rbx
jmp short loc_8EBE9
loc_8EBC7:
movsd [rbp+var_38], xmm0
test ebx, ebx
jz short loc_8EBE9
lea rax, [rbx+rbp]
add rax, 0FFFFFFFFFFFFFFC8h
loc_8EBD8:
mov cl, [rax-1]
dec rax
mov [r14], cl
inc r14
cmp rax, r13
ja short loc_8EBD8
loc_8EBE9:
add r12d, ebx
cmp byte ptr [r15+38h], 0
lea r15, [r15+20h]
jnz short loc_8EB9E
jmp short loc_8EC1E
loc_8EBF9:
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
add r14, rbx
jmp short loc_8EBE9
loc_8EC0B:
call _my_thread_var
mov dword ptr [rax], 9Eh
xor r12d, r12d
jmp short loc_8EC2E
loc_8EC1B:
xor r12d, r12d
loc_8EC1E:
mov rdi, [rbp+var_40]
mov rsi, r14
mov rdx, [rbp+var_48]
call _mi_dpointer
loc_8EC2E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_8EC4F
mov eax, r12d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8EC4F:
call ___stack_chk_fail
|
long long sp_make_key(long long *a1, unsigned int a2, _QWORD *a3, long long a4, long long a5)
{
long long v6; // r15
long long v7; // r12
long long v8; // r13
unsigned __int8 *v9; // rbx
long long v10; // rdi
int v11; // eax
long long v12; // rcx
long long v13; // rbx
long long v14; // r15
unsigned int v15; // r12d
long long v16; // rbx
char *v17; // rax
char v18; // cl
bool v19; // zf
_OWORD v21[2]; // [rsp+0h] [rbp-70h] BYREF
long long v22; // [rsp+28h] [rbp-48h]
long long *v23; // [rsp+30h] [rbp-40h]
_QWORD v24[7]; // [rsp+38h] [rbp-38h] BYREF
v22 = a5;
v24[1] = __readfsqword(0x28u);
v23 = a1;
v6 = *(_QWORD *)(*a1 + 536);
v7 = 112LL * a2;
v8 = *(_QWORD *)(v6 + v7 + 40);
v9 = (unsigned __int8 *)(a4 + *(unsigned int *)(v8 - 24));
v10 = *(unsigned __int8 *)(v8 - 6);
v11 = mi_calc_blob_length(v10, v9);
v12 = *(_QWORD *)&v9[*(unsigned __int8 *)(v8 - 6)];
if ( v12 )
{
v13 = v6 + v7 + 40;
v24[0] = v12 + 4;
v21[0] = xmmword_D90F0;
v21[1] = xmmword_D90F0;
((void ( *)(_QWORD *, long long, _OWORD *, long long))sp_get_geometry_mbr_0)(
v24,
v12 + (unsigned int)(v11 - 4) + 4,
v21,
1LL);
v14 = *(_QWORD *)v13;
if ( *(_BYTE *)(*(_QWORD *)v13 + 24LL) )
{
v15 = 0;
do
{
v16 = *(unsigned __int16 *)(v14 + 20);
if ( (*(_BYTE *)(v14 + 18) & 0x40) != 0 )
{
v24[0] = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8));
if ( (_DWORD)v16 )
{
v17 = (char *)v24 + v16;
do
{
v18 = *--v17;
*(_BYTE *)a3 = v18;
a3 = (_QWORD *)((char *)a3 + 1);
}
while ( v17 > (char *)v24 );
}
}
else
{
*a3 = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8));
a3 = (_QWORD *)((char *)a3 + v16);
}
v15 += v16;
v19 = *(_BYTE *)(v14 + 56) == 0;
v14 += 32LL;
}
while ( !v19 );
}
else
{
v15 = 0;
}
mi_dpointer(v23, (long long)a3, v22);
}
else
{
*(_DWORD *)my_thread_var(v10, (const char *)v9) = 158;
return 0;
}
return v15;
}
|
sp_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],R8
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x218]
MOV EAX,ESI
IMUL R12,RAX,0x70
MOV R13,qword ptr [R15 + R12*0x1 + 0x28]
MOV EBX,dword ptr [R13 + -0x18]
ADD RBX,RCX
MOVZX EDI,byte ptr [R13 + -0x6]
MOV RSI,RBX
CALL 0x00178c91
MOVZX ECX,byte ptr [R13 + -0x6]
MOV RCX,qword ptr [RCX + RBX*0x1]
TEST RCX,RCX
JZ 0x0018ec0b
LEA RBX,[R15 + R12*0x1]
ADD RBX,0x28
LEA RDX,[RCX + 0x4]
ADD EAX,-0x4
LEA R13,[RBP + -0x38]
MOV qword ptr [R13],RDX
MOVAPD XMM0,xmmword ptr [0x001d90f0]
LEA RDX,[RBP + -0x70]
MOVAPD xmmword ptr [RDX],XMM0
MOVAPD xmmword ptr [RDX + 0x10],XMM0
LEA RSI,[RCX + RAX*0x1]
ADD RSI,0x4
MOV RDI,R13
MOV ECX,0x1
CALL 0x0018ec54
MOV R15,qword ptr [RBX]
CMP byte ptr [R15 + 0x18],0x0
JZ 0x0018ec1b
XOR R12D,R12D
LAB_0018eb9e:
MOVZX EBX,word ptr [R15 + 0x14]
MOV EAX,dword ptr [R15 + 0x8]
AND EAX,0xfffffff8
MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70]
UCOMISD XMM0,XMM0
JP 0x0018ebf9
TEST byte ptr [R15 + 0x12],0x40
JNZ 0x0018ebc7
MOVSD qword ptr [R14],XMM0
ADD R14,RBX
JMP 0x0018ebe9
LAB_0018ebc7:
MOVSD qword ptr [RBP + -0x38],XMM0
TEST EBX,EBX
JZ 0x0018ebe9
LEA RAX,[RBX + RBP*0x1]
ADD RAX,-0x38
LAB_0018ebd8:
MOV CL,byte ptr [RAX + -0x1]
DEC RAX
MOV byte ptr [R14],CL
INC R14
CMP RAX,R13
JA 0x0018ebd8
LAB_0018ebe9:
ADD R12D,EBX
CMP byte ptr [R15 + 0x38],0x0
LEA R15,[R15 + 0x20]
JNZ 0x0018eb9e
JMP 0x0018ec1e
LAB_0018ebf9:
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001292c0
ADD R14,RBX
JMP 0x0018ebe9
LAB_0018ec0b:
CALL 0x001a1b22
MOV dword ptr [RAX],0x9e
XOR R12D,R12D
JMP 0x0018ec2e
LAB_0018ec1b:
XOR R12D,R12D
LAB_0018ec1e:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001853f7
LAB_0018ec2e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018ec4f
MOV EAX,R12D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018ec4f:
CALL 0x00129270
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int sp_make_key(long *param_1,ulong param_2,double *param_3,long param_4,int8 param_5)
{
int1 *puVar1;
char *pcVar2;
double dVar3;
ushort uVar4;
long lVar5;
int iVar6;
double *pdVar7;
int4 *puVar8;
ulong __n;
long lVar9;
long lVar10;
long in_FS_OFFSET;
double local_78 [5];
int8 local_50;
long *local_48;
double local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar10 = *(long *)(*param_1 + 0x218);
lVar9 = (param_2 & 0xffffffff) * 0x70;
lVar5 = *(long *)(lVar10 + 0x28 + lVar9);
param_4 = (ulong)*(uint *)(lVar5 + -0x18) + param_4;
local_50 = param_5;
local_48 = param_1;
iVar6 = _mi_calc_blob_length(*(int1 *)(lVar5 + -6),param_4);
lVar5 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_4);
if (lVar5 == 0) {
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x9e;
iVar6 = 0;
}
else {
local_40 = (double)(lVar5 + 4);
local_78[0] = _DAT_001d90f0;
local_78[1] = (double)_UNK_001d90f8;
local_78[2] = _DAT_001d90f0;
local_78[3] = (double)_UNK_001d90f8;
sp_get_geometry_mbr(&local_40,lVar5 + (ulong)(iVar6 - 4) + 4,local_78,1);
lVar10 = *(long *)(lVar10 + lVar9 + 0x28);
if (*(char *)(lVar10 + 0x18) == '\0') {
iVar6 = 0;
}
else {
iVar6 = 0;
do {
uVar4 = *(ushort *)(lVar10 + 0x14);
__n = (ulong)uVar4;
dVar3 = *(double *)((long)local_78 + (ulong)(*(uint *)(lVar10 + 8) & 0xfffffff8));
if (NAN(dVar3)) {
memset(param_3,0,__n);
param_3 = (double *)((long)param_3 + __n);
}
else if ((*(byte *)(lVar10 + 0x12) & 0x40) == 0) {
*param_3 = dVar3;
param_3 = (double *)((long)param_3 + __n);
}
else {
local_40 = dVar3;
if (uVar4 != 0) {
pdVar7 = (double *)((long)&local_40 + __n);
do {
puVar1 = (int1 *)((long)pdVar7 - 1);
pdVar7 = (double *)((long)pdVar7 - 1);
*(int1 *)param_3 = *puVar1;
param_3 = (double *)((long)param_3 + 1);
} while (&local_40 < pdVar7);
}
}
iVar6 = iVar6 + (uint)uVar4;
pcVar2 = (char *)(lVar10 + 0x38);
lVar10 = lVar10 + 0x20;
} while (*pcVar2 != '\0');
}
_mi_dpointer(local_48,param_3,local_50);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar6;
}
|
|
14,076
|
my_xml_error_lineno
|
eloqsql/strings/xml.c
|
uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
}
|
O3
|
c
|
my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0xd7f70
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0xd7f5c
popq %rbp
retq
nopl (%rax)
|
my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_D7F70
push rbp
mov rbp, rsp
xor eax, eax
loc_D7F5C:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_D7F5C
pop rbp
locret_D7F70:
retn
|
long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
|
my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x001d7f70
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001d7f5c:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x001d7f5c
POP RBP
LAB_001d7f70:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
|
|
14,077
|
translog_relative_LSN_encode
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_relative_LSN_encode(struct st_translog_parts *parts,
LSN base_lsn,
uint lsns, uchar *compressed_LSNs)
{
LEX_CUSTRING *part;
uint lsns_len= lsns * LSN_STORE_SIZE;
uchar buffer_src[MAX_NUMBER_OF_LSNS_PER_RECORD * LSN_STORE_SIZE];
uchar *buffer= buffer_src;
const uchar *cbuffer;
DBUG_ENTER("translog_relative_LSN_encode");
DBUG_ASSERT(parts->current != 0);
part= parts->parts + parts->current;
/* collect all LSN(s) in one chunk if it (they) is (are) divided */
if (part->length < lsns_len)
{
size_t copied= part->length;
LEX_CUSTRING *next_part;
DBUG_PRINT("info", ("Using buffer:%p", compressed_LSNs));
memcpy(buffer, part->str, part->length);
next_part= parts->parts + parts->current + 1;
do
{
DBUG_ASSERT(next_part < parts->parts + parts->elements);
if ((next_part->length + copied) < lsns_len)
{
memcpy(buffer + copied, next_part->str,
next_part->length);
copied+= next_part->length;
next_part->length= 0; next_part->str= 0;
/* delete_dynamic_element(&parts->parts, parts->current + 1); */
next_part++;
parts->current++;
part= parts->parts + parts->current;
}
else
{
size_t len= lsns_len - copied;
memcpy(buffer + copied, next_part->str, len);
copied= lsns_len;
next_part->str+= len;
next_part->length-= len;
}
} while (copied < lsns_len);
cbuffer= buffer;
}
else
{
cbuffer= part->str;
part->str+= lsns_len;
part->length-= lsns_len;
parts->current--;
part= parts->parts + parts->current;
}
{
/* Compress */
LSN ref;
int economy;
const uchar *src_ptr;
uchar *dst_ptr= compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE);
/*
We write the result in backward direction with no special sense or
tricks both directions are equal in complicity
*/
for (src_ptr= cbuffer + lsns_len - LSN_STORE_SIZE;
src_ptr >= (const uchar*)cbuffer;
src_ptr-= LSN_STORE_SIZE)
{
ref= lsn_korr(src_ptr);
dst_ptr= translog_put_LSN_diff(base_lsn, ref, dst_ptr);
}
part->length= (size_t)((compressed_LSNs +
(MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE)) -
dst_ptr);
economy= lsns_len - (uint)part->length;
parts->record_length-= economy;
DBUG_PRINT("info", ("new length of LSNs: %lu economy: %d",
(ulong)part->length, economy));
parts->total_record_length-= economy;
part->str= dst_ptr;
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_relative_LSN_encode:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
imull $0x7, -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
leaq -0x16(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x39a28
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jae 0x39b91
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x39a64
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x2a0b0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
jmp 0x39a9c
jmp 0x39a9e
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jae 0x39b2a
movq -0x50(%rbp), %rdi
addq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x2a0b0
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x68(%rbp), %rax
movq $0x0, (%rax)
movq -0x68(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x39b75
movl -0x44(%rbp), %eax
subq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rdi
addq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq -0x70(%rbp), %rdx
callq 0x2a0b0
movl -0x44(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x39b77
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jb 0x39a9a
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x39be9
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movl %eax, %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
addq $-0x7, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0x39c8a
movq -0x88(%rbp), %rax
movzbl (%rax), %eax
movq -0x88(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x88(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x88(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x3af90
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
addq $-0x7, %rax
movq %rax, -0x88(%rbp)
jmp 0x39c0d
movq -0x38(%rbp), %rcx
addq $0x12, %rcx
movq -0x90(%rbp), %rax
subq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rcx
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
jmp 0x39cc3
movl -0x7c(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x90(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
jmp 0x39ce2
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x39cfd
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
translog_relative_LSN_encode:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_2C], edx
mov [rbp+var_38], rcx
imul eax, [rbp+var_2C], 7
mov [rbp+var_44], eax
lea rax, [rbp+var_16]
mov [rbp+var_50], rax
jmp short $+2
loc_39A28:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov ecx, [rbp+var_44]
cmp rax, rcx
jnb loc_39B91
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_60], rax
jmp short $+2
loc_39A64:
mov rdi, [rbp+var_50]
mov rax, [rbp+var_40]
mov rsi, [rax]
mov rax, [rbp+var_40]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
add rax, 10h
mov [rbp+var_68], rax
loc_39A9A:
jmp short $+2
loc_39A9C:
jmp short $+2
loc_39A9E:
mov rax, [rbp+var_68]
mov rax, [rax+8]
add rax, [rbp+var_60]
mov ecx, [rbp+var_44]
cmp rax, rcx
jnb short loc_39B2A
mov rdi, [rbp+var_50]
add rdi, [rbp+var_60]
mov rax, [rbp+var_68]
mov rsi, [rax]
mov rax, [rbp+var_68]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_68]
mov rax, [rax+8]
add rax, [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_68]
mov qword ptr [rax], 0
mov rax, [rbp+var_68]
add rax, 10h
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_39B75
loc_39B2A:
mov eax, [rbp+var_44]
sub rax, [rbp+var_60]
mov [rbp+var_70], rax
mov rdi, [rbp+var_50]
add rdi, [rbp+var_60]
mov rax, [rbp+var_68]
mov rsi, [rax]
mov rdx, [rbp+var_70]
call _memcpy
mov eax, [rbp+var_44]
mov [rbp+var_60], rax
mov rcx, [rbp+var_70]
mov rax, [rbp+var_68]
add rcx, [rax]
mov [rax], rcx
mov rdx, [rbp+var_70]
mov rax, [rbp+var_68]
mov rcx, [rax+8]
sub rcx, rdx
mov [rax+8], rcx
loc_39B75:
jmp short $+2
loc_39B77:
mov rax, [rbp+var_60]
mov ecx, [rbp+var_44]
cmp rax, rcx
jb loc_39A9A
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
jmp short loc_39BE9
loc_39B91:
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_58], rax
mov edx, [rbp+var_44]
mov rax, [rbp+var_40]
mov rcx, [rax]
mov edx, edx
add rcx, rdx
mov [rax], rcx
mov eax, [rbp+var_44]
mov edx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
sub rcx, rdx
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov ecx, [rax+8]
add ecx, 0FFFFFFFFh
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
loc_39BE9:
mov rax, [rbp+var_38]
add rax, 12h
mov [rbp+var_90], rax
mov rax, [rbp+var_58]
mov ecx, [rbp+var_44]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF9h
mov [rbp+var_88], rax
loc_39C0D:
mov rax, [rbp+var_88]
cmp rax, [rbp+var_58]
jb short loc_39C8A
mov rax, [rbp+var_88]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_88]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_88]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_88]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_78], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_90]
call translog_put_LSN_diff
mov [rbp+var_90], rax
mov rax, [rbp+var_88]
add rax, 0FFFFFFFFFFFFFFF9h
mov [rbp+var_88], rax
jmp short loc_39C0D
loc_39C8A:
mov rcx, [rbp+var_38]
add rcx, 12h
mov rax, [rbp+var_90]
sub rcx, rax
mov rax, [rbp+var_40]
mov [rax+8], rcx
mov eax, [rbp+var_44]
mov rcx, [rbp+var_40]
mov rcx, [rcx+8]
sub eax, ecx
mov [rbp+var_7C], eax
mov edx, [rbp+var_7C]
mov rax, [rbp+var_20]
mov ecx, [rax]
sub ecx, edx
mov [rax], ecx
jmp short $+2
loc_39CC3:
mov edx, [rbp+var_7C]
mov rax, [rbp+var_20]
mov ecx, [rax+4]
sub ecx, edx
mov [rax+4], ecx
mov rcx, [rbp+var_90]
mov rax, [rbp+var_40]
mov [rax], rcx
jmp short $+2
loc_39CE2:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_39CFD
add rsp, 90h
pop rbp
retn
loc_39CFD:
call ___stack_chk_fail
|
unsigned long long translog_relative_LSN_encode(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-90h]
unsigned __int16 *i; // [rsp+8h] [rbp-88h]
int v7; // [rsp+14h] [rbp-7Ch]
unsigned long long v8; // [rsp+20h] [rbp-70h]
_QWORD *v9; // [rsp+28h] [rbp-68h]
unsigned long long v10; // [rsp+30h] [rbp-60h]
unsigned __int16 *v11; // [rsp+38h] [rbp-58h]
unsigned int v12; // [rsp+4Ch] [rbp-44h]
long long *v13; // [rsp+50h] [rbp-40h]
long long v15; // [rsp+70h] [rbp-20h]
_BYTE v16[14]; // [rsp+7Ah] [rbp-16h] BYREF
unsigned long long v17; // [rsp+88h] [rbp-8h]
v17 = __readfsqword(0x28u);
v15 = a1;
v12 = 7 * a3;
v13 = (long long *)(16LL * *(unsigned int *)(v15 + 8) + *(_QWORD *)(v15 + 16));
if ( v13[1] >= (unsigned long long)(unsigned int)(7 * a3) )
{
v11 = (unsigned __int16 *)*v13;
*v13 += v12;
v13[1] -= v12;
v13 = (long long *)(16LL * (unsigned int)--*(_DWORD *)(v15 + 8) + *(_QWORD *)(v15 + 16));
}
else
{
v10 = v13[1];
memcpy(v16, *v13, v10);
v9 = (_QWORD *)(16LL * *(unsigned int *)(v15 + 8) + *(_QWORD *)(v15 + 16) + 16);
do
{
if ( v10 + v9[1] >= v12 )
{
v8 = v12 - v10;
memcpy(&v16[v10], *v9, v8);
v10 = v12;
*v9 += v8;
v9[1] -= v8;
}
else
{
memcpy(&v16[v10], *v9, v9[1]);
v10 += v9[1];
v9[1] = 0LL;
*v9 = 0LL;
v9 += 2;
v13 = (long long *)(16LL * (unsigned int)++*(_DWORD *)(v15 + 8) + *(_QWORD *)(v15 + 16));
}
}
while ( v10 < v12 );
v11 = (unsigned __int16 *)v16;
}
v5 = a4 + 18;
for ( i = (unsigned __int16 *)((char *)v11 + v12 - 7); i >= v11; i = (unsigned __int16 *)((char *)i - 7) )
v5 = translog_put_LSN_diff(
a2,
*(unsigned int *)((char *)i + 3) | ((unsigned long long)((*((unsigned __int8 *)i + 2) << 16) | (unsigned int)*i) << 32),
v5);
v13[1] = a4 + 18 - v5;
v7 = v12 - v13[1];
*(_DWORD *)v15 -= v7;
*(_DWORD *)(v15 + 4) -= v7;
*v13 = v5;
return __readfsqword(0x28u);
}
|
translog_relative_LSN_encode:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
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 dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x38],RCX
IMUL EAX,dword ptr [RBP + -0x2c],0x7
MOV dword ptr [RBP + -0x44],EAX
LEA RAX,[RBP + -0x16]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00139a28
LAB_00139a28:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JNC 0x00139b91
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00139a64
LAB_00139a64:
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
ADD RAX,0x10
MOV qword ptr [RBP + -0x68],RAX
LAB_00139a9a:
JMP 0x00139a9c
LAB_00139a9c:
JMP 0x00139a9e
LAB_00139a9e:
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JNC 0x00139b2a
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x10
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00139b75
LAB_00139b2a:
MOV EAX,dword ptr [RBP + -0x44]
SUB RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x0012a0b0
MOV EAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0x60],RAX
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x68]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RDX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
LAB_00139b75:
JMP 0x00139b77
LAB_00139b77:
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JC 0x00139a9a
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00139be9
LAB_00139b91:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00139be9:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x12
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
ADD RAX,-0x7
MOV qword ptr [RBP + -0x88],RAX
LAB_00139c0d:
MOV RAX,qword ptr [RBP + -0x88]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x00139c8a
MOV RAX,qword ptr [RBP + -0x88]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x88]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x88]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x88]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x90]
CALL 0x0013af90
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,-0x7
MOV qword ptr [RBP + -0x88],RAX
JMP 0x00139c0d
LAB_00139c8a:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0x12
MOV RAX,qword ptr [RBP + -0x90]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x8]
SUB EAX,ECX
MOV dword ptr [RBP + -0x7c],EAX
MOV EDX,dword ptr [RBP + -0x7c]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SUB ECX,EDX
MOV dword ptr [RAX],ECX
JMP 0x00139cc3
LAB_00139cc3:
MOV EDX,dword ptr [RBP + -0x7c]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x4]
SUB ECX,EDX
MOV dword ptr [RAX + 0x4],ECX
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
JMP 0x00139ce2
LAB_00139ce2:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00139cfd
ADD RSP,0x90
POP RBP
RET
LAB_00139cfd:
CALL 0x0012a270
|
void translog_relative_LSN_encode(int *param_1,int8 param_2,int param_3,long param_4)
{
int3 *puVar1;
uint uVar2;
int iVar3;
size_t __n;
long in_FS_OFFSET;
long local_98;
int3 *local_90;
long *local_70;
ulong local_68;
int3 *local_60;
long *local_48;
int3 local_1e [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = param_3 * 7;
local_60 = local_1e;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
if ((ulong)local_48[1] < (ulong)uVar2) {
local_68 = local_48[1];
memcpy(local_60,(void *)*local_48,local_48[1]);
local_70 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10 + 0x10);
do {
if (local_70[1] + local_68 < (ulong)uVar2) {
memcpy((void *)((long)local_60 + local_68),(void *)*local_70,local_70[1]);
local_68 = local_70[1] + local_68;
local_70[1] = 0;
*local_70 = 0;
local_70 = local_70 + 2;
param_1[2] = param_1[2] + 1;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
}
else {
__n = uVar2 - local_68;
memcpy((void *)((long)local_60 + local_68),(void *)*local_70,__n);
local_68 = (ulong)uVar2;
*local_70 = __n + *local_70;
local_70[1] = local_70[1] - __n;
}
} while (local_68 < uVar2);
}
else {
local_60 = (int3 *)*local_48;
*local_48 = *local_48 + (ulong)uVar2;
local_48[1] = local_48[1] - (ulong)uVar2;
param_1[2] = param_1[2] + -1;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
}
local_98 = param_4 + 0x12;
puVar1 = (int3 *)((long)local_60 + (ulong)uVar2);
while (local_90 = (int3 *)((long)puVar1 + -7), local_60 <= local_90) {
local_98 = translog_put_LSN_diff
(param_2,(ulong)CONCAT34(*local_90,*(int4 *)(puVar1 + -1)),local_98);
puVar1 = local_90;
}
local_48[1] = (param_4 + 0x12) - local_98;
iVar3 = uVar2 - (int)local_48[1];
*param_1 = *param_1 - iVar3;
param_1[1] = param_1[1] - iVar3;
*local_48 = local_98;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
14,078
|
my_longlong10_to_str_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
char *dst, size_t len, int radix,
longlong val)
{
char buffer[65];
register char *p, *e;
long long_val;
uint sign= 0;
ulonglong uval = (ulonglong)val;
if (radix < 0)
{
if (val < 0)
{
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
*dst++= '-';
len--;
sign= 1;
}
}
e = p = &buffer[sizeof(buffer)-1];
*p= 0;
if (uval == 0)
{
*--p= '0';
len= 1;
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p = '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p = (char) ('0' + (long_val - quo*10));
long_val= quo;
}
len= MY_MIN(len, (size_t) (e-p));
cnv:
memcpy(dst, p, len);
return len+sign;
}
|
O3
|
c
|
my_longlong10_to_str_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r9
movq %rsi, %rdi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %cl
orb %al, %cl
jne 0xd55ce
negq %r8
movb $0x2d, (%rdi)
incq %rdi
decq %r9
leaq -0x20(%rbp), %rbx
movb $0x0, (%rbx)
movl $0x1, %r14d
jmp 0xd55e2
movb $0x0, -0x20(%rbp)
testq %r8, %r8
je 0xd566e
leaq -0x20(%rbp), %rbx
xorl %r14d, %r14d
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
testq %r8, %r8
js 0xd55f6
movq %rbx, %rsi
jmp 0xd5617
movq %r8, %rax
mulq %rcx
shrq $0x3, %rdx
leaq -0x21(%rbp), %rsi
imull $0xf6, %edx, %eax
addl %eax, %r8d
addb $0x30, %r8b
movb %r8b, (%rsi)
movq %rdx, %r8
subq %rsi, %rbx
movq %r8, %rax
mulq %rcx
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %r8d, %eax
addb $0x30, %al
movb %al, -0x1(%rsi)
decq %rsi
incq %rbx
cmpq $0x9, %r8
movq %rdx, %r8
ja 0xd561a
cmpq %rbx, %r9
cmovbq %r9, %rbx
movq %rbx, %rdx
callq 0x2a0b0
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0xd567f
addq %r14, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x21(%rbp), %rsi
movb $0x30, (%rsi)
movl $0x1, %ebx
xorl %r14d, %r14d
jmp 0xd5648
callq 0x2a280
|
my_longlong10_to_str_8bit:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r9, rdx
mov rdi, rsi
mov rax, fs:28h
mov [rbp+var_18], rax
test ecx, ecx
setns al
test r8, r8
setns cl
or cl, al
jnz short loc_D55CE
neg r8
mov byte ptr [rdi], 2Dh ; '-'
inc rdi
dec r9
lea rbx, [rbp+var_20]
mov byte ptr [rbx], 0
mov r14d, 1
jmp short loc_D55E2
loc_D55CE:
mov [rbp+var_20], 0
test r8, r8
jz loc_D566E
lea rbx, [rbp+var_20]
xor r14d, r14d
loc_D55E2:
mov rcx, 0CCCCCCCCCCCCCCCDh
test r8, r8
js short loc_D55F6
mov rsi, rbx
jmp short loc_D5617
loc_D55F6:
mov rax, r8
mul rcx
shr rdx, 3
lea rsi, [rbp+var_21]
imul eax, edx, 0F6h
add r8d, eax
add r8b, 30h ; '0'
mov [rsi], r8b
mov r8, rdx
loc_D5617:
sub rbx, rsi
loc_D561A:
mov rax, r8
mul rcx
shr rdx, 3
imul eax, edx, 0F6h
add eax, r8d
add al, 30h ; '0'
mov [rsi-1], al
dec rsi
inc rbx
cmp r8, 9
mov r8, rdx
ja short loc_D561A
cmp r9, rbx
cmovb rbx, r9
loc_D5648:
mov rdx, rbx
call _memcpy
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_D567F
add rbx, r14
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_D566E:
lea rsi, [rbp+var_21]
mov byte ptr [rsi], 30h ; '0'
mov ebx, 1
xor r14d, r14d
jmp short loc_D5648
loc_D567F:
call ___stack_chk_fail
|
_BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5)
{
_BYTE *v5; // r9
_BYTE *v6; // rdi
long long v7; // r14
char *v8; // rsi
_BYTE *v9; // rbx
bool v10; // cc
char v12; // [rsp+3Fh] [rbp-21h] BYREF
_BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF
unsigned long long v14; // [rsp+48h] [rbp-18h]
v5 = a3;
v6 = a2;
v14 = __readfsqword(0x28u);
if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL )
{
v13[0] = 0;
if ( !a5 )
{
v8 = &v12;
v12 = 48;
v9 = (_BYTE *)(&dword_0 + 1);
v7 = 0LL;
goto LABEL_12;
}
v7 = 0LL;
}
else
{
a5 = -(long long)a5;
*a2 = 45;
v6 = a2 + 1;
v5 = a3 - 1;
v13[0] = 0;
v7 = 1LL;
}
if ( (a5 & 0x8000000000000000LL) != 0LL )
{
v8 = &v12;
v12 = a5 % 0xA + 48;
a5 /= 0xAuLL;
}
else
{
v8 = v13;
}
v9 = (_BYTE *)(v13 - v8);
do
{
*--v8 = a5 % 0xA + 48;
++v9;
v10 = a5 <= 9;
a5 /= 0xAuLL;
}
while ( !v10 );
if ( v5 < v9 )
v9 = v5;
LABEL_12:
memcpy(v6, v8, v9);
return &v9[v7];
}
|
my_longlong10_to_str_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R9,RDX
MOV RDI,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS CL
OR CL,AL
JNZ 0x001d55ce
NEG R8
MOV byte ptr [RDI],0x2d
INC RDI
DEC R9
LEA RBX,[RBP + -0x20]
MOV byte ptr [RBX],0x0
MOV R14D,0x1
JMP 0x001d55e2
LAB_001d55ce:
MOV byte ptr [RBP + -0x20],0x0
TEST R8,R8
JZ 0x001d566e
LEA RBX,[RBP + -0x20]
XOR R14D,R14D
LAB_001d55e2:
MOV RCX,-0x3333333333333333
TEST R8,R8
JS 0x001d55f6
MOV RSI,RBX
JMP 0x001d5617
LAB_001d55f6:
MOV RAX,R8
MUL RCX
SHR RDX,0x3
LEA RSI,[RBP + -0x21]
IMUL EAX,EDX,0xf6
ADD R8D,EAX
ADD R8B,0x30
MOV byte ptr [RSI],R8B
MOV R8,RDX
LAB_001d5617:
SUB RBX,RSI
LAB_001d561a:
MOV RAX,R8
MUL RCX
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,R8D
ADD AL,0x30
MOV byte ptr [RSI + -0x1],AL
DEC RSI
INC RBX
CMP R8,0x9
MOV R8,RDX
JA 0x001d561a
CMP R9,RBX
CMOVC RBX,R9
LAB_001d5648:
MOV RDX,RBX
CALL 0x0012a0b0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001d567f
ADD RBX,R14
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001d566e:
LEA RSI,[RBP + -0x21]
MOV byte ptr [RSI],0x30
MOV EBX,0x1
XOR R14D,R14D
JMP 0x001d5648
LAB_001d567f:
CALL 0x0012a280
|
long my_longlong10_to_str_8bit
(int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5)
{
bool bVar1;
ulong __n;
char *__src;
long lVar2;
long in_FS_OFFSET;
char local_29 [9];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_5 < 0 && param_4 < 0) {
param_5 = -param_5;
*param_2 = 0x2d;
param_2 = param_2 + 1;
param_3 = param_3 - 1;
lVar2 = 1;
}
else {
if (param_5 == 0) {
__src = local_29;
local_29[0] = '0';
__n = 1;
lVar2 = 0;
goto LAB_001d5648;
}
lVar2 = 0;
}
__src = local_29 + 1;
if ((long)param_5 < 0) {
local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0';
__src = local_29;
param_5 = param_5 / 10;
}
__n = (long)(local_29 + 1) - (long)__src;
do {
__src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0';
__src = __src + -1;
__n = __n + 1;
bVar1 = 9 < param_5;
param_5 = param_5 / 10;
} while (bVar1);
if (param_3 < __n) {
__n = param_3;
}
LAB_001d5648:
local_29[1] = 0;
memcpy(param_2,__src,__n);
if (*(long *)(in_FS_OFFSET + 0x28) != local_20) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return __n + lVar2;
}
|
|
14,079
|
clip_image_f32_batch_free
|
monkey531[P]llama/examples/llava/clip.cpp
|
void clip_image_f32_batch_free(struct clip_image_f32_batch * batch) {
if (batch->size > 0) {
delete[] batch->data;
batch->size = 0;
}
}
|
O3
|
cpp
|
clip_image_f32_batch_free:
cmpq $0x0, 0x8(%rdi)
je 0x30dae
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x30d9b
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x30d88
movq %r15, %r12
shlq $0x5, %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x30d82
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x1dc50
addq $-0x20, %r12
jne 0x30d6c
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1e8b0
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
clip_image_f32_batch_free:
cmp qword ptr [rdi+8], 0
jz short locret_30DAE
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r14, [rdi]
test r14, r14
jz short loc_30D9B
mov r15, [r14-8]
add r14, 0FFFFFFFFFFFFFFF8h
test r15, r15
jz short loc_30D88
mov r12, r15
shl r12, 5
loc_30D6C:
mov rdi, [r14+r12-10h]; void *
test rdi, rdi
jz short loc_30D82
mov rsi, [r14+r12]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_30D82:
add r12, 0FFFFFFFFFFFFFFE0h
jnz short loc_30D6C
loc_30D88:
shl r15, 5
or r15, 8
mov rdi, r14; void *
mov rsi, r15; unsigned __int64
call __ZdaPvm; operator delete[](void *,ulong)
loc_30D9B:
mov qword ptr [rbx+8], 0
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
locret_30DAE:
retn
|
void clip_image_f32_batch_free(long long *a1)
{
long long v2; // r14
long long v3; // r15
char *v4; // r14
long long v5; // r12
void *v6; // rdi
if ( a1[1] )
{
v2 = *a1;
if ( *a1 )
{
v3 = *(_QWORD *)(v2 - 8);
v4 = (char *)(v2 - 8);
if ( v3 )
{
v5 = 32 * v3;
do
{
v6 = *(void **)&v4[v5 - 16];
if ( v6 )
operator delete(v6, *(_QWORD *)&v4[v5] - (_QWORD)v6);
v5 -= 32LL;
}
while ( v5 );
}
operator delete[](v4, (32 * v3) | 8);
}
a1[1] = 0LL;
}
}
|
clip_image_f32_batch_free:
CMP qword ptr [RDI + 0x8],0x0
JZ 0x00130dae
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI]
TEST R14,R14
JZ 0x00130d9b
MOV R15,qword ptr [R14 + -0x8]
ADD R14,-0x8
TEST R15,R15
JZ 0x00130d88
MOV R12,R15
SHL R12,0x5
LAB_00130d6c:
MOV RDI,qword ptr [R14 + R12*0x1 + -0x10]
TEST RDI,RDI
JZ 0x00130d82
MOV RSI,qword ptr [R14 + R12*0x1]
SUB RSI,RDI
CALL 0x0011dc50
LAB_00130d82:
ADD R12,-0x20
JNZ 0x00130d6c
LAB_00130d88:
SHL R15,0x5
OR R15,0x8
MOV RDI,R14
MOV RSI,R15
CALL 0x0011e8b0
LAB_00130d9b:
MOV qword ptr [RBX + 0x8],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
LAB_00130dae:
RET
|
void clip_image_f32_batch_free(long *param_1)
{
long lVar1;
long lVar2;
void *pvVar3;
long lVar4;
if (param_1[1] != 0) {
lVar1 = *param_1;
if (lVar1 != 0) {
lVar2 = *(long *)(lVar1 + -8);
if (lVar2 != 0) {
lVar4 = lVar2 << 5;
do {
pvVar3 = *(void **)(lVar1 + -0x18 + lVar4);
if (pvVar3 != (void *)0x0) {
operator_delete(pvVar3,*(long *)(lVar1 + -8 + lVar4) - (long)pvVar3);
}
lVar4 = lVar4 + -0x20;
} while (lVar4 != 0);
}
operator_delete__((void *)(lVar1 + -8),lVar2 << 5 | 8);
}
param_1[1] = 0;
}
return;
}
|
|
14,080
|
action_e_lt
|
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/parts/engine.c
|
int32_t
action_e_lt (PENGINE_T instance, uint32_t parm, uint32_t flags)
{
int32_t value ;
if (flags & (PART_ACTION_FLAG_VALIDATE)) {
return parts_valadate_int (instance, parm, flags, INT_MIN, INT_MAX) ;
}
value = parts_get_int (instance, parm, flags, INT_MIN, INT_MAX) ;
int32_t acc ;
engine_get_variable (instance, ENGINE_VARIABLE_EVENT, &acc) ;
return acc < value ;
}
|
O3
|
c
|
action_e_lt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x1, %dl
jne 0x733b
movq %rbx, %rdi
movl $0x80000000, %ecx # imm = 0x80000000
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
callq 0x82dd
movl %eax, %r14d
leaq -0x1c(%rbp), %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0xe6b1
xorl %eax, %eax
cmpl %r14d, (%r15)
setl %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x80000000, %ecx # imm = 0x80000000
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8254
|
action_e_lt:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
test dl, 1
jnz short loc_733B
mov rdi, rbx
mov ecx, 80000000h
mov r8d, 7FFFFFFFh
call parts_get_int
mov r14d, eax
lea r15, [rbp+var_1C]
mov rdi, rbx
mov esi, 3
mov rdx, r15
call engine_get_variable
xor eax, eax
cmp [r15], r14d
setl al
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_733B:
mov rdi, rbx
mov ecx, 80000000h
mov r8d, 7FFFFFFFh
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp parts_valadate_int
|
long long action_e_lt(long long a1, long long a2, long long a3)
{
long long v3; // rax
int v4; // r14d
_DWORD v6[7]; // [rsp+0h] [rbp-1Ch] BYREF
v6[0] = HIDWORD(v3);
if ( (a3 & 1) != 0 )
return parts_valadate_int(a1, a2, a3, 0x80000000LL, 0x7FFFFFFFLL);
v4 = parts_get_int(a1, a2, a3, 0x80000000LL, 0x7FFFFFFFLL);
engine_get_variable(a1, 3LL, v6);
return v6[0] < v4;
}
|
action_e_lt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST DL,0x1
JNZ 0x0010733b
MOV RDI,RBX
MOV ECX,0x80000000
MOV R8D,0x7fffffff
CALL 0x001082dd
MOV R14D,EAX
LEA R15,[RBP + -0x1c]
MOV RDI,RBX
MOV ESI,0x3
MOV RDX,R15
CALL 0x0010e6b1
XOR EAX,EAX
CMP dword ptr [R15],R14D
SETL AL
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0010733b:
MOV RDI,RBX
MOV ECX,0x80000000
MOV R8D,0x7fffffff
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00108254
|
ulong action_e_lt(int8 param_1,int8 param_2,ulong param_3)
{
int iVar1;
int8 in_RAX;
ulong uVar2;
int local_24;
local_24 = (int)((ulong)in_RAX >> 0x20);
if ((param_3 & 1) == 0) {
iVar1 = parts_get_int(param_1,param_2,param_3,0x80000000,0x7fffffff);
engine_get_variable(param_1,3,&local_24);
return (ulong)(local_24 < iVar1);
}
uVar2 = parts_valadate_int(param_1,param_2,param_3,0x80000000,0x7fffffff);
return uVar2;
}
|
|
14,081
|
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out,
size_t out_size,
uint64_t symbol_offset,
const ElfW(Shdr) * strtab,
const ElfW(Shdr) * symtab) {
if (symtab == nullptr) {
return false;
}
const size_t num_symbols = symtab->sh_size / symtab->sh_entsize;
for (unsigned i = 0; i < num_symbols;) {
size_t offset = symtab->sh_offset + i * symtab->sh_entsize;
// If we are reading Elf64_Sym's, we want to limit this array to
// 32 elements (to keep stack consumption low), otherwise we can
// have a 64 element Elf32_Sym array.
# if defined(__WORDSIZE) && __WORDSIZE == 64
const size_t NUM_SYMBOLS = 32U;
# else
const size_t NUM_SYMBOLS = 64U;
# endif
// Read at most NUM_SYMBOLS symbols at once to save read() calls.
ElfW(Sym) buf[NUM_SYMBOLS];
size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i);
const ssize_t len =
ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset);
NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0);
const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]);
NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read);
for (unsigned j = 0; j < num_symbols_in_buf; ++j) {
const ElfW(Sym)& symbol = buf[j];
uint64_t start_address = symbol.st_value;
start_address += symbol_offset;
uint64_t end_address = start_address + symbol.st_size;
if (symbol.st_value != 0 && // Skip null value symbols.
symbol.st_shndx != 0 && // Skip undefined symbols.
start_address <= pc && pc < end_address) {
ssize_t len1 = ReadFromOffset(fd, out, out_size,
strtab->sh_offset + symbol.st_name);
if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) {
memset(out, 0, out_size);
return false;
}
return true; // Obtained the symbol name.
}
}
i += num_symbols_in_buf;
}
return false;
}
|
O2
|
cpp
|
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, %r12
movq 0x360(%rsp), %rdi
xorl %ecx, %ecx
testq %rdi, %rdi
je 0x1c8d3
movq %r8, %r13
movl %esi, %r8d
movq %r9, 0x8(%rsp)
movq 0x20(%rdi), %rax
xorl %edx, %edx
divq 0x38(%rdi)
movq %rax, (%rsp)
movl %ecx, %ebx
movq %rax, %r14
subq %rbx, %r14
jbe 0x1c8ca
movq 0x38(%rdi), %rcx
imulq %rbx, %rcx
movq %rdi, %r15
addq 0x18(%rdi), %rcx
cmpq $0x20, %r14
pushq $0x20
popq %rax
cmovaeq %rax, %r14
imulq $0x18, %r14, %rdx
movl %r8d, %ebp
movl %r8d, %edi
leaq 0x20(%rsp), %rsi
callq 0x1bd2f
xorl %edx, %edx
pushq $0x18
popq %rcx
divq %rcx
testq %rdx, %rdx
jne 0x1c8e7
cmpq %r14, %rax
ja 0x1c8e7
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r15, %rdi
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x1c86e
imulq $0x18, %rcx, %rsi
movq 0x28(%rsp,%rsi), %rdx
testq %rdx, %rdx
je 0x1c86a
addq %r13, %rdx
cmpq %r12, %rdx
ja 0x1c86a
addq %rsp, %rsi
addq $0x20, %rsi
cmpw $0x0, 0x6(%rsi)
je 0x1c86a
addq 0x10(%rsi), %rdx
cmpq %r12, %rdx
ja 0x1c87a
incl %ecx
jmp 0x1c836
leal (%rax,%rbx), %ecx
movq (%rsp), %rax
jmp 0x1c7d8
movl (%rsi), %ecx
movq 0x8(%rsp), %rax
addq 0x18(%rax), %rcx
movl %r8d, %edi
movq 0x10(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %r14
movq %r14, %rdx
callq 0x1bd2f
testq %rax, %rax
jle 0x1c8b7
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7670
movb $0x1, %bpl
testq %rax, %rax
jne 0x1c8c6
xorl %ebp, %ebp
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7310
movq (%rsp), %rax
cmpq %rbx, %rax
seta %cl
andb %bpl, %cl
movl %ecx, %eax
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7320
|
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov [rsp+358h+var_340], rcx
mov qword ptr [rsp+358h+var_348], rdx
mov r12, rdi
mov rdi, [rsp+358h+arg_0]
xor ecx, ecx
test rdi, rdi
jz loc_1C8D3
mov r13, r8
mov r8d, esi; unsigned __int64
mov [rsp+358h+var_350], r9
mov rax, [rdi+20h]
xor edx, edx
div qword ptr [rdi+38h]
mov [rsp+358h+var_358], rax
loc_1C7D8:
mov ebx, ecx
mov r14, rax
sub r14, rbx
jbe loc_1C8CA
mov rcx, [rdi+38h]
imul rcx, rbx
mov r15, rdi
add rcx, [rdi+18h]; unsigned __int64
cmp r14, 20h ; ' '
push 20h ; ' '
pop rax
cmovnb r14, rax
imul rdx, r14, 18h; void *
mov ebp, r8d
mov edi, r8d; this
lea rsi, [rsp+358h+var_338]; int
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
xor edx, edx
push 18h
pop rcx
div rcx
test rdx, rdx
jnz loc_1C8E7
cmp rax, r14
ja loc_1C8E7
xor ecx, ecx
mov r8d, ebp; unsigned __int64
mov rdi, r15
loc_1C836:
mov ecx, ecx
cmp rax, rcx
jbe short loc_1C86E
imul rsi, rcx, 18h
mov rdx, [rsp+rsi+358h+var_330]
test rdx, rdx
jz short loc_1C86A
add rdx, r13
cmp rdx, r12
ja short loc_1C86A
add rsi, rsp
add rsi, 20h ; ' '
cmp word ptr [rsi+6], 0
jz short loc_1C86A
add rdx, [rsi+10h]
cmp rdx, r12
ja short loc_1C87A
loc_1C86A:
inc ecx
jmp short loc_1C836
loc_1C86E:
lea ecx, [rax+rbx]
mov rax, [rsp+358h+var_358]
jmp loc_1C7D8
loc_1C87A:
mov ecx, [rsi]
mov rax, [rsp+358h+var_350]
add rcx, [rax+18h]; unsigned __int64
mov edi, r8d; this
mov r12, qword ptr [rsp+358h+var_348]
mov rsi, r12; int
mov r14, [rsp+358h+var_340]
mov rdx, r14; void *
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
test rax, rax
jle short loc_1C8B7
mov rdi, r12
xor esi, esi
mov rdx, r14
call _memchr
mov bpl, 1
test rax, rax
jnz short loc_1C8C6
loc_1C8B7:
xor ebp, ebp
mov rdi, r12
xor esi, esi
mov rdx, r14
call _memset
loc_1C8C6:
mov rax, [rsp+358h+var_358]
loc_1C8CA:
cmp rax, rbx
setnbe cl
and cl, bpl
loc_1C8D3:
mov eax, ecx
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1C8E7:
call _abort
|
long long nglog::tools::FindSymbol(
unsigned long long a1,
unsigned int a2,
long long a3,
char *a4,
long long a5,
long long a6,
long long a7)
{
unsigned int v7; // ebp
long long v9; // rdi
unsigned int v10; // ecx
unsigned long long v13; // rax
unsigned long long v14; // rbx
unsigned long long v15; // r14
long long v16; // r15
long long v17; // rcx
long long v18; // rdi
unsigned long long v19; // rax
unsigned long long v20; // rtt
unsigned int v21; // ecx
long long v22; // rdx
unsigned long long v23; // rdx
int *v24; // rsi
unsigned long long v26; // [rsp+0h] [rbp-358h]
int v30[206]; // [rsp+20h] [rbp-338h] BYREF
v9 = a7;
v10 = 0;
if ( a7 )
{
v13 = *(_QWORD *)(a7 + 32) / *(_QWORD *)(a7 + 56);
v26 = v13;
LABEL_3:
v14 = v10;
v15 = v13 - v10;
if ( v13 > v10 )
{
v16 = v9;
v17 = *(_QWORD *)(v9 + 24) + v10 * *(_QWORD *)(v9 + 56);
if ( v15 >= 0x20 )
v15 = 32LL;
v7 = a2;
v18 = a2;
v20 = nglog::tools::ReadFromOffset(a2, (long long)v30, (char *)(24 * v15), v17);
v19 = v20 / 0x18;
if ( v20 % 0x18 || v19 > v15 )
abort(v18);
v21 = 0;
a2 = v7;
v9 = v16;
while ( 1 )
{
if ( v19 <= v21 )
{
v10 = v19 + v14;
v13 = v26;
goto LABEL_3;
}
v22 = *(_QWORD *)&v30[6 * v21 + 2];
if ( v22 )
{
v23 = a5 + v22;
if ( v23 <= a1 )
{
v24 = &v30[6 * v21];
if ( *((_WORD *)v24 + 3) )
{
if ( *((_QWORD *)v24 + 2) + v23 > a1 )
break;
}
}
}
++v21;
}
if ( (long long)nglog::tools::ReadFromOffset(v7, a3, a4, *(_QWORD *)(a6 + 24) + (unsigned int)*v24) <= 0
|| (LOBYTE(v7) = 1, !memchr(a3, 0LL, a4)) )
{
LOBYTE(v7) = 0;
memset(a3, 0LL, a4);
}
v13 = v26;
}
LOBYTE(v10) = v7 & (v13 > v14);
}
return v10;
}
|
FindSymbol:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV R12,RDI
MOV RDI,qword ptr [RSP + 0x360]
XOR ECX,ECX
TEST RDI,RDI
JZ 0x0011c8d3
MOV R13,R8
MOV R8D,ESI
MOV qword ptr [RSP + 0x8],R9
MOV RAX,qword ptr [RDI + 0x20]
XOR EDX,EDX
DIV qword ptr [RDI + 0x38]
MOV qword ptr [RSP],RAX
LAB_0011c7d8:
MOV EBX,ECX
MOV R14,RAX
SUB R14,RBX
JBE 0x0011c8ca
MOV RCX,qword ptr [RDI + 0x38]
IMUL RCX,RBX
MOV R15,RDI
ADD RCX,qword ptr [RDI + 0x18]
CMP R14,0x20
PUSH 0x20
POP RAX
CMOVNC R14,RAX
IMUL RDX,R14,0x18
MOV EBP,R8D
MOV EDI,R8D
LEA RSI,[RSP + 0x20]
CALL 0x0011bd2f
XOR EDX,EDX
PUSH 0x18
POP RCX
DIV RCX
TEST RDX,RDX
JNZ 0x0011c8e7
CMP RAX,R14
JA 0x0011c8e7
XOR ECX,ECX
MOV R8D,EBP
MOV RDI,R15
LAB_0011c836:
MOV ECX,ECX
CMP RAX,RCX
JBE 0x0011c86e
IMUL RSI,RCX,0x18
MOV RDX,qword ptr [RSP + RSI*0x1 + 0x28]
TEST RDX,RDX
JZ 0x0011c86a
ADD RDX,R13
CMP RDX,R12
JA 0x0011c86a
ADD RSI,RSP
ADD RSI,0x20
CMP word ptr [RSI + 0x6],0x0
JZ 0x0011c86a
ADD RDX,qword ptr [RSI + 0x10]
CMP RDX,R12
JA 0x0011c87a
LAB_0011c86a:
INC ECX
JMP 0x0011c836
LAB_0011c86e:
LEA ECX,[RAX + RBX*0x1]
MOV RAX,qword ptr [RSP]
JMP 0x0011c7d8
LAB_0011c87a:
MOV ECX,dword ptr [RSI]
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x18]
MOV EDI,R8D
MOV R12,qword ptr [RSP + 0x10]
MOV RSI,R12
MOV R14,qword ptr [RSP + 0x18]
MOV RDX,R14
CALL 0x0011bd2f
TEST RAX,RAX
JLE 0x0011c8b7
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
CALL 0x00107670
MOV BPL,0x1
TEST RAX,RAX
JNZ 0x0011c8c6
LAB_0011c8b7:
XOR EBP,EBP
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
CALL 0x00107310
LAB_0011c8c6:
MOV RAX,qword ptr [RSP]
LAB_0011c8ca:
CMP RAX,RBX
SETA CL
AND CL,BPL
LAB_0011c8d3:
MOV EAX,ECX
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011c8e7:
CALL 0x00107320
|
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr
const*, Elf64_Shdr const*) */
ulong nglog::tools::FindSymbol
(ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5,
Elf64_Shdr *param_6,Elf64_Shdr *param_7)
{
int1 auVar1 [16];
ulong uVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
void *pvVar6;
uint uVar7;
ulong uVar8;
byte bVar9;
int unaff_EBP;
ulong uVar10;
uint local_338;
short local_332;
long alStack_330 [96];
uVar8 = 0;
if (param_7 != (Elf64_Shdr *)0x0) {
uVar2 = param_7->sh_size / param_7->sh_entsize;
while( true ) {
bVar9 = (byte)unaff_EBP;
uVar10 = uVar2 - uVar8;
uVar3 = uVar8;
if (uVar2 < uVar8 || uVar10 == 0) break;
if (0x1f < uVar10) {
uVar10 = 0x20;
}
uVar3 = ReadFromOffset(param_2,&local_338,uVar10 * 0x18,
param_7->sh_entsize * uVar8 + param_7->sh_offset);
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar3;
uVar4 = SUB168(auVar1 / ZEXT816(0x18),0);
if ((uVar3 % 0x18 != 0) || (uVar10 < uVar4)) {
/* WARNING: Subroutine does not return */
abort();
}
for (uVar7 = 0; uVar3 = (ulong)uVar7, uVar3 < uVar4; uVar7 = uVar7 + 1) {
if ((((alStack_330[uVar3 * 3] != 0) &&
(uVar10 = alStack_330[uVar3 * 3] + param_5, uVar10 <= param_1)) &&
((&local_332)[uVar3 * 0xc] != 0)) && (param_1 < uVar10 + alStack_330[uVar3 * 3 + 1])) {
uVar3 = (ulong)(&local_338)[uVar3 * 6] + param_6->sh_offset;
lVar5 = ReadFromOffset(param_2,param_3,param_4,uVar3);
if (0 < lVar5) {
pvVar6 = memchr(param_3,0,param_4);
bVar9 = 1;
if (pvVar6 != (void *)0x0) goto LAB_0011c8ca;
}
bVar9 = 0;
memset(param_3,0,param_4);
goto LAB_0011c8ca;
}
}
uVar8 = (ulong)(uint)(SUB164(auVar1 / ZEXT816(0x18),0) + (int)uVar8);
unaff_EBP = param_2;
}
LAB_0011c8ca:
uVar8 = CONCAT71((int7)(uVar3 >> 8),uVar8 < uVar2 & bVar9);
}
return uVar8 & 0xffffffff;
}
|
|
14,082
|
hash_string
|
tsotchke[P]eshkol/src/core/utils/string_table.c
|
static uint32_t hash_string(const char* string, size_t length) {
uint32_t hash = 2166136261u; // FNV offset basis
for (size_t i = 0; i < length; i++) {
hash ^= (uint8_t)string[i];
hash *= 16777619u; // FNV prime
}
return hash;
}
|
O0
|
c
|
hash_string:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x811c9dc5, -0x14(%rbp) # imm = 0x811C9DC5
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x254f
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
imull $0x1000193, -0x14(%rbp), %eax # imm = 0x1000193
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x251b
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
hash_string:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 811C9DC5h
mov [rbp+var_20], 0
loc_251B:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnb short loc_254F
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
movzx eax, byte ptr [rax+rcx]
xor eax, [rbp+var_14]
mov [rbp+var_14], eax
imul eax, [rbp+var_14], 1000193h
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_251B
loc_254F:
mov eax, [rbp+var_14]
pop rbp
retn
|
long long hash_string(long long a1, unsigned long long a2)
{
unsigned long long i; // [rsp+0h] [rbp-20h]
unsigned int v4; // [rsp+Ch] [rbp-14h]
v4 = -2128831035;
for ( i = 0LL; i < a2; ++i )
v4 = 16777619 * (v4 ^ *(unsigned __int8 *)(a1 + i));
return v4;
}
|
hash_string:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x811c9dc5
MOV qword ptr [RBP + -0x20],0x0
LAB_0010251b:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x0010254f
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
XOR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
IMUL EAX,dword ptr [RBP + -0x14],0x1000193
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0010251b
LAB_0010254f:
MOV EAX,dword ptr [RBP + -0x14]
POP RBP
RET
|
uint hash_string(long param_1,ulong param_2)
{
int8 local_28;
int4 local_1c;
local_1c = 0x811c9dc5;
for (local_28 = 0; local_28 < param_2; local_28 = local_28 + 1) {
local_1c = (*(byte *)(param_1 + local_28) ^ local_1c) * 0x1000193;
}
return local_1c;
}
|
|
14,083
|
put_bits
|
bluesky950520[P]quickjs/libbf.c
|
static inline void put_bits(limb_t *tab, limb_t len, slimb_t pos, limb_t val)
{
limb_t i;
int p;
i = pos >> LIMB_LOG2_BITS;
p = pos & (LIMB_BITS - 1);
if (i < len)
tab[i] |= val << p;
if (p != 0) {
i++;
if (i < len) {
tab[i] |= val >> (LIMB_BITS - p);
}
}
}
|
O0
|
c
|
put_bits:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movq -0x18(%rsp), %rax
sarq $0x6, %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
andq $0x3f, %rax
movl %eax, -0x2c(%rsp)
movq -0x28(%rsp), %rax
cmpq -0x10(%rsp), %rax
jae 0x10308b
movq -0x20(%rsp), %rdx
movl -0x2c(%rsp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq -0x8(%rsp), %rax
movq -0x28(%rsp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x2c(%rsp)
je 0x1030d5
movq -0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
cmpq -0x10(%rsp), %rax
jae 0x1030d3
movq -0x20(%rsp), %rdx
movl $0x40, %eax
subl -0x2c(%rsp), %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdx
movq -0x8(%rsp), %rax
movq -0x28(%rsp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1030d5
retq
nopw %cs:(%rax,%rax)
|
put_bits:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov [rsp+var_20], rcx
mov rax, [rsp+var_18]
sar rax, 6
mov [rsp+var_28], rax
mov rax, [rsp+var_18]
and rax, 3Fh
mov [rsp+var_2C], eax
mov rax, [rsp+var_28]
cmp rax, [rsp+var_10]
jnb short loc_10308B
mov rdx, [rsp+var_20]
mov eax, [rsp+var_2C]
mov ecx, eax
shl rdx, cl
mov rax, [rsp+var_8]
mov rcx, [rsp+var_28]
or rdx, [rax+rcx*8]
mov [rax+rcx*8], rdx
loc_10308B:
cmp [rsp+var_2C], 0
jz short locret_1030D5
mov rax, [rsp+var_28]
add rax, 1
mov [rsp+var_28], rax
mov rax, [rsp+var_28]
cmp rax, [rsp+var_10]
jnb short loc_1030D3
mov rdx, [rsp+var_20]
mov eax, 40h ; '@'
sub eax, [rsp+var_2C]
mov eax, eax
mov ecx, eax
shr rdx, cl
mov rax, [rsp+var_8]
mov rcx, [rsp+var_28]
or rdx, [rax+rcx*8]
mov [rax+rcx*8], rdx
loc_1030D3:
jmp short $+2
locret_1030D5:
retn
|
long long put_bits(long long a1, unsigned long long a2, long long a3, unsigned long long a4)
{
long long result; // rax
char v5; // [rsp+0h] [rbp-2Ch]
long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+4h] [rbp-28h]
v6 = a3 >> 6;
v5 = a3 & 0x3F;
result = a3 >> 6;
if ( a3 >> 6 < a2 )
{
result = a1;
*(_QWORD *)(a1 + 8 * v6) |= a4 << v5;
}
if ( (a3 & 0x3F) != 0 )
{
v7 = v6 + 1;
result = v7;
if ( v7 < a2 )
{
result = a1;
*(_QWORD *)(a1 + 8 * v7) |= a4 >> (64 - v5);
}
}
return result;
}
| |||
14,084
|
put_bits
|
bluesky950520[P]quickjs/libbf.c
|
static inline void put_bits(limb_t *tab, limb_t len, slimb_t pos, limb_t val)
{
limb_t i;
int p;
i = pos >> LIMB_LOG2_BITS;
p = pos & (LIMB_BITS - 1);
if (i < len)
tab[i] |= val << p;
if (p != 0) {
i++;
if (i < len) {
tab[i] |= val >> (LIMB_BITS - p);
}
}
}
|
O2
|
c
|
put_bits:
movq %rcx, %rax
movq %rdx, %rcx
movq %rdx, %r8
sarq $0x6, %r8
andl $0x3f, %edx
cmpq %rsi, %r8
jae 0x7f49c
movq %rax, %r9
shlq %cl, %r9
orq %r9, (%rdi,%r8,8)
testl %edx, %edx
je 0x7f4b5
leaq 0x1(%r8), %rcx
cmpq %rsi, %rcx
jae 0x7f4b5
negb %dl
movl %edx, %ecx
shrq %cl, %rax
orq %rax, 0x8(%rdi,%r8,8)
retq
nop
|
put_bits:
mov rax, rcx
mov rcx, rdx
mov r8, rdx
sar r8, 6
and edx, 3Fh
cmp r8, rsi
jnb short loc_7F49C
mov r9, rax
shl r9, cl
or [rdi+r8*8], r9
loc_7F49C:
test edx, edx
jz short locret_7F4B5
lea rcx, [r8+1]
cmp rcx, rsi
jnb short locret_7F4B5
neg dl
mov ecx, edx
shr rax, cl
or [rdi+r8*8+8], rax
locret_7F4B5:
retn
|
unsigned long long put_bits(long long a1, unsigned long long a2, long long a3, unsigned long long a4)
{
unsigned long long result; // rax
char v5; // cl
unsigned long long v6; // r8
int v7; // edx
result = a4;
v5 = a3;
v6 = a3 >> 6;
v7 = a3 & 0x3F;
if ( v6 < a2 )
*(_QWORD *)(a1 + 8 * v6) |= result << v5;
if ( v7 )
{
if ( v6 + 1 < a2 )
{
result >>= -(char)v7;
*(_QWORD *)(a1 + 8 * v6 + 8) |= result;
}
}
return result;
}
|
put_bits:
MOV RAX,RCX
MOV RCX,RDX
MOV R8,RDX
SAR R8,0x6
AND EDX,0x3f
CMP R8,RSI
JNC 0x0017f49c
MOV R9,RAX
SHL R9,CL
OR qword ptr [RDI + R8*0x8],R9
LAB_0017f49c:
TEST EDX,EDX
JZ 0x0017f4b5
LEA RCX,[R8 + 0x1]
CMP RCX,RSI
JNC 0x0017f4b5
NEG DL
MOV ECX,EDX
SHR RAX,CL
OR qword ptr [RDI + R8*0x8 + 0x8],RAX
LAB_0017f4b5:
RET
|
void put_bits(long param_1,ulong param_2,ulong param_3,ulong param_4)
{
ulong *puVar1;
ulong uVar2;
uVar2 = (long)param_3 >> 6;
if (uVar2 < param_2) {
puVar1 = (ulong *)(param_1 + uVar2 * 8);
*puVar1 = *puVar1 | param_4 << ((byte)param_3 & 0x3f);
}
if (((param_3 & 0x3f) != 0) && (uVar2 + 1 < param_2)) {
puVar1 = (ulong *)(param_1 + 8 + uVar2 * 8);
*puVar1 = *puVar1 | param_4 >> (-((byte)param_3 & 0x3f) & 0x3f);
}
return;
}
|
|
14,085
|
minja::ForNode::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 {
// https://jinja.palletsprojects.com/en/3.0.x/templates/#for
if (!iterable) throw std::runtime_error("ForNode.iterable is null");
if (!body) throw std::runtime_error("ForNode.body is null");
auto iterable_value = iterable->evaluate(context);
Value::CallableType loop_function;
std::function<void(Value&)> visit = [&](Value& iter) {
auto filtered_items = Value::array();
if (!iter.is_null()) {
if (!iterable_value.is_iterable()) {
throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump());
}
iterable_value.for_each([&](Value & item) {
destructuring_assign(var_names, context, item);
if (!condition || condition->evaluate(context).to_bool()) {
filtered_items.push_back(item);
}
});
}
if (filtered_items.empty()) {
if (else_body) {
else_body->render(out, context);
}
} else {
auto loop = recursive ? Value::callable(loop_function) : Value::object();
loop.set("length", (int64_t) filtered_items.size());
size_t cycle_index = 0;
loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.empty() || !args.kwargs.empty()) {
throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg");
}
auto item = args.args[cycle_index];
cycle_index = (cycle_index + 1) % args.args.size();
return item;
}));
auto loop_context = Context::make(Value::object(), context);
loop_context->set("loop", loop);
for (size_t i = 0, n = filtered_items.size(); i < n; ++i) {
auto & item = filtered_items.at(i);
destructuring_assign(var_names, loop_context, item);
loop.set("index", (int64_t) i + 1);
loop.set("index0", (int64_t) i);
loop.set("revindex", (int64_t) (n - i));
loop.set("revindex0", (int64_t) (n - i - 1));
loop.set("length", (int64_t) n);
loop.set("first", i == 0);
loop.set("last", i == (n - 1));
loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value());
loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value());
try {
body->render(out, loop_context);
} catch (const LoopControlException & e) {
if (e.control_type == LoopControlType::Break) break;
if (e.control_type == LoopControlType::Continue) continue;
}
}
}
};
if (recursive) {
loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) {
throw std::runtime_error("loop() expects exactly 1 positional iterable argument");
}
auto & items = args.args[0];
visit(items);
return Value();
};
}
visit(iterable_value);
}
|
O2
|
cpp
|
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x74a52
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
je 0x74a6e
movq %rdx, %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x63f0a
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x40(%rsp), %rsi
movq %r12, (%rsi)
movq %rbx, 0x8(%rsi)
movq %r15, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x74b3a
cmpb $0x1, 0x68(%rbx)
jne 0x74a18
leaq 0x40(%rsp), %rsi
movq %r14, (%rsi)
movq %rsp, %rdi
callq 0x74b82
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x6ece4
leaq 0x20(%rsp), %rdi
callq 0x49072
movq %rsp, %rdi
callq 0x49072
leaq 0x68(%rsp), %rdi
callq 0x6419a
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x411ae(%rip), %rsi # 0xb5c12
movq %rax, %rdi
callq 0x23330
jmp 0x74a88
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x411ab(%rip), %rsi # 0xb5c2b
movq %rax, %rdi
callq 0x23330
movq 0x8a559(%rip), %rsi # 0xfefe8
movq 0x8a4b2(%rip), %rdx # 0xfef48
movq %r14, %rdi
callq 0x23f00
jmp 0x74aa0
movq %rax, %rbx
movq %r14, %rdi
callq 0x236a0
jmp 0x74ad1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x49072
jmp 0x74abf
movq %rax, %rbx
movq %rsp, %rdi
callq 0x49072
leaq 0x68(%rsp), %rdi
callq 0x6419a
movq %rbx, %rdi
callq 0x23f80
nop
|
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0B8h
mov r14, rsi
mov rsi, [rdi+38h]
test rsi, rsi
jz loc_74A52
mov rbx, rdi
cmp qword ptr [rdi+58h], 0
jz loc_74A6E
mov r15, rdx
lea r12, [rsp+0D8h+var_70]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
mov rax, rsp
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
lea rsi, [rsp+0D8h+var_98]
mov [rsi], r12
mov [rsi+8], rbx
mov [rsi+10h], r15
mov [rsi+18h], r14
mov [rsi+20h], rax
lea r14, [rsp+0D8h+var_B8]
mov rdi, r14
call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&)
cmp byte ptr [rbx+68h], 1
jnz short loc_74A18
lea rsi, [rsp+0D8h+var_98]
mov [rsi], r14
mov rdi, rsp
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_
loc_74A18:
lea rdi, [rsp+0D8h+var_B8]
lea rsi, [rsp+0D8h+var_70]
call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &)
lea rdi, [rsp+0D8h+var_B8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rsp, 0B8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_74A52:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeIterabl; "ForNode.iterable is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_74A88
loc_74A6E:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeBodyIsN; "ForNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_74A88:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_74AA0:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_74AD1
mov rbx, rax
lea rdi, [rsp+0D8h+var_B8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_74ABF
mov rbx, rax
loc_74ABF:
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_74AD1:
mov rdi, rbx
call __Unwind_Resume
|
void minja::ForNode::do_render(long long a1, long long a2, long long a3)
{
void (***v4)(void); // rsi
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
std::runtime_error *exception; // r14
_BYTE v11[32]; // [rsp+0h] [rbp-D8h] BYREF
_BYTE v12[32]; // [rsp+20h] [rbp-B8h] BYREF
_QWORD v13[5]; // [rsp+40h] [rbp-98h] BYREF
_BYTE v14[112]; // [rsp+68h] [rbp-70h] BYREF
v4 = *(void (****)(void))(a1 + 56);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.iterable is null");
goto LABEL_8;
}
if ( !*(_QWORD *)(a1 + 88) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.body is null");
LABEL_8:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v14, v4);
v13[0] = v14;
v13[1] = a1;
v13[2] = a3;
v13[3] = a2;
v13[4] = v11;
std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(
v12,
v13,
v6,
v7,
v8,
v9,
0LL,
0LL,
0LL,
0LL);
if ( *(_BYTE *)(a1 + 104) == 1 )
{
v13[0] = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(v11);
}
std::function<void ()(minja::Value &)>::operator()((long long)v12);
std::_Function_base::~_Function_base((std::_Function_base *)v12);
std::_Function_base::~_Function_base((std::_Function_base *)v11);
minja::Value::~Value((minja::Value *)v14);
}
|
do_render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RSI
MOV RSI,qword ptr [RDI + 0x38]
TEST RSI,RSI
JZ 0x00174a52
MOV RBX,RDI
CMP qword ptr [RDI + 0x58],0x0
JZ 0x00174a6e
MOV R15,RDX
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x00163f0a
XORPS XMM0,XMM0
MOV RAX,RSP
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],R12
MOV qword ptr [RSI + 0x8],RBX
MOV qword ptr [RSI + 0x10],R15
MOV qword ptr [RSI + 0x18],R14
MOV qword ptr [RSI + 0x20],RAX
LAB_001749f5:
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x00174b3a
CMP byte ptr [RBX + 0x68],0x1
JNZ 0x00174a18
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],R14
MOV RDI,RSP
CALL 0x00174b82
LAB_00174a18:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x68]
CALL 0x0016ece4
LAB_00174a27:
LEA RDI,[RSP + 0x20]
CALL 0x00149072
MOV RDI,RSP
CALL 0x00149072
LEA RDI,[RSP + 0x68]
CALL 0x0016419a
ADD RSP,0xb8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00174a52:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_00174a5d:
LEA RSI,[0x1b5c12]
MOV RDI,RAX
CALL 0x00123330
LAB_00174a6c:
JMP 0x00174a88
LAB_00174a6e:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_00174a79:
LEA RSI,[0x1b5c2b]
MOV RDI,RAX
CALL 0x00123330
LAB_00174a88:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R14
CALL 0x00123f00
|
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2)
{
runtime_error *this_00;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
_lambda_minja__Value___1_ local_b8 [32];
Expression *local_98;
ForNode *local_90;
shared_ptr *local_88;
ostringstream *local_80;
int1 *local_78;
Expression local_70 [80];
if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00174a5d to 00174a6b has its CatchHandler @ 00174aa0 */
std::runtime_error::runtime_error(this_00,"ForNode.iterable is null");
}
else {
if (*(long *)(this + 0x58) != 0) {
Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38));
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
/* try { // try from 001749f5 to 00174a01 has its CatchHandler @ 00174abc */
local_98 = local_70;
local_90 = this;
local_88 = param_2;
local_80 = param_1;
local_78 = (int1 *)&local_d8;
std::function<void(minja::Value&)>::
function<minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void>
(local_b8);
if (this[0x68] == (ForNode)0x1) {
local_98 = (Expression *)local_b8;
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>
*)&local_d8,
(_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *)
&local_98);
}
/* try { // try from 00174a18 to 00174a26 has its CatchHandler @ 00174aad */
std::function<void(minja::Value&)>::operator()
((function<void(minja::Value&)> *)local_b8,(Value *)local_70);
std::_Function_base::~_Function_base((_Function_base *)local_b8);
std::_Function_base::~_Function_base((_Function_base *)&local_d8);
Value::~Value((Value *)local_70);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00174a79 to 00174a87 has its CatchHandler @ 00174a9e */
std::runtime_error::runtime_error(this_00,"ForNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
|
|
14,086
|
atoi_octal
|
eloqsql/mysys/my_init.c
|
static ulong atoi_octal(const char *str)
{
long int tmp;
while (*str && my_isspace(&my_charset_latin1, *str))
str++;
str2int(str,
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
0, INT_MAX, &tmp);
return (ulong) tmp;
}
|
O3
|
c
|
atoi_octal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb (%rdi), %al
movl $0xa, %esi
testb %al, %al
je 0xa03ea
leaq 0x30dc0e(%rip), %rcx # 0x3adfd0
movq 0x40(%rcx), %rcx
movzbl %al, %edx
testb $0x8, 0x1(%rcx,%rdx)
je 0xa03dc
movb 0x1(%rdi), %al
incq %rdi
testb %al, %al
jne 0xa03c6
jmp 0xa03ea
xorl %ecx, %ecx
cmpb $0x30, %al
setne %cl
leal 0x8(,%rcx,2), %esi
leaq -0x10(%rbp), %rbx
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
movq %rbx, %r8
callq 0xd7f20
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
atoi_octal:
push rbp
mov rbp, rsp
push rbx
push rax
mov al, [rdi]
mov esi, 0Ah
test al, al
jz short loc_A03EA
lea rcx, my_charset_latin1
mov rcx, [rcx+40h]
loc_A03C6:
movzx edx, al
test byte ptr [rcx+rdx+1], 8
jz short loc_A03DC
mov al, [rdi+1]
inc rdi
test al, al
jnz short loc_A03C6
jmp short loc_A03EA
loc_A03DC:
xor ecx, ecx
cmp al, 30h ; '0'
setnz cl
lea esi, ds:8[rcx*2]
loc_A03EA:
lea rbx, [rbp+var_10]
mov ecx, 7FFFFFFFh
xor edx, edx
mov r8, rbx
call str2int
mov rax, [rbx]
add rsp, 8
pop rbx
pop rbp
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> atoi_octal(unsigned __int8 *a1)
{
unsigned __int8 v1; // al
long long v2; // rsi
_BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF
v1 = *a1;
v2 = 10LL;
if ( *a1 )
{
while ( (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + v1 + 1LL) & 8) != 0 )
{
v1 = *++a1;
if ( !v1 )
goto LABEL_6;
}
v2 = 2 * (unsigned int)(v1 != 48) + 8;
}
LABEL_6:
str2int(a1, v2, 0LL, 0x7FFFFFFFLL, v3);
}
|
atoi_octal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV AL,byte ptr [RDI]
MOV ESI,0xa
TEST AL,AL
JZ 0x001a03ea
LEA RCX,[0x4adfd0]
MOV RCX,qword ptr [RCX + 0x40]
LAB_001a03c6:
MOVZX EDX,AL
TEST byte ptr [RCX + RDX*0x1 + 0x1],0x8
JZ 0x001a03dc
MOV AL,byte ptr [RDI + 0x1]
INC RDI
TEST AL,AL
JNZ 0x001a03c6
JMP 0x001a03ea
LAB_001a03dc:
XOR ECX,ECX
CMP AL,0x30
SETNZ CL
LEA ESI,[0x8 + RCX*0x2]
LAB_001a03ea:
LEA RBX,[RBP + -0x10]
MOV ECX,0x7fffffff
XOR EDX,EDX
MOV R8,RBX
CALL 0x001d7f20
MOV RAX,qword ptr [RBX]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 atoi_octal(byte *param_1)
{
byte bVar1;
int8 in_RAX;
char cVar2;
int8 local_18;
bVar1 = *param_1;
cVar2 = '\n';
do {
if (bVar1 == 0) {
LAB_001a03ea:
local_18 = in_RAX;
str2int(param_1,cVar2,0,0x7fffffff,&local_18);
return local_18;
}
if ((PTR_ctype_latin1_004ae010[(ulong)bVar1 + 1] & 8) == 0) {
cVar2 = (bVar1 != 0x30) * '\x02' + '\b';
goto LAB_001a03ea;
}
bVar1 = param_1[1];
param_1 = param_1 + 1;
} while( true );
}
|
|
14,087
|
quantize_row_q4_K_ref
|
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
|
void quantize_row_q4_K_ref(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k) {
assert(k % QK_K == 0);
const int nb = k / QK_K;
uint8_t L[QK_K];
uint8_t Laux[32];
float weights[32];
float mins[QK_K/32];
float scales[QK_K/32];
for (int i = 0; i < nb; i++) {
float max_scale = 0; // as we are deducting the min, scales are always positive
float max_min = 0;
for (int j = 0; j < QK_K/32; ++j) {
//scales[j] = make_qkx1_quants(32, 15, x + 32*j, L + 32*j, &mins[j], 9, 0.5f);
float sum_x2 = 0;
for (int l = 0; l < 32; ++l) sum_x2 += x[32*j + l] * x[32*j + l];
float av_x = sqrtf(sum_x2/32);
for (int l = 0; l < 32; ++l) weights[l] = av_x + fabsf(x[32*j + l]);
scales[j] = make_qkx2_quants(32, 15, x + 32*j, weights, L + 32*j, &mins[j], Laux, -1.f, 0.1f, 20, false);
float scale = scales[j];
if (scale > max_scale) {
max_scale = scale;
}
float min = mins[j];
if (min > max_min) {
max_min = min;
}
}
float inv_scale = max_scale > 0 ? 63.f/max_scale : 0.f;
float inv_min = max_min > 0 ? 63.f/max_min : 0.f;
for (int j = 0; j < QK_K/32; ++j) {
uint8_t ls = nearest_int(inv_scale*scales[j]);
uint8_t lm = nearest_int(inv_min*mins[j]);
ls = MIN(63, ls);
lm = MIN(63, lm);
if (j < 4) {
y[i].scales[j] = ls;
y[i].scales[j+4] = lm;
} else {
y[i].scales[j+4] = (ls & 0xF) | ((lm & 0xF) << 4);
y[i].scales[j-4] |= ((ls >> 4) << 6);
y[i].scales[j-0] |= ((lm >> 4) << 6);
}
}
y[i].d = GGML_FP32_TO_FP16(max_scale/63.f);
y[i].dmin = GGML_FP32_TO_FP16(max_min/63.f);
uint8_t sc, m;
for (int j = 0; j < QK_K/32; ++j) {
get_scale_min_k4(j, y[i].scales, &sc, &m);
const float d = GGML_FP16_TO_FP32(y[i].d) * sc;
if (!d) continue;
const float dm = GGML_FP16_TO_FP32(y[i].dmin) * m;
for (int ii = 0; ii < 32; ++ii) {
int l = nearest_int((x[32*j + ii] + dm)/d);
l = MAX(0, MIN(15, l));
L[32*j + ii] = l;
}
}
uint8_t * q = y[i].qs;
for (int j = 0; j < QK_K; j += 64) {
for (int l = 0; l < 32; ++l) q[l] = L[j + l] | (L[j + l + 32] << 4);
q += 32;
}
x += QK_K;
}
}
|
O2
|
c
|
quantize_row_q4_K_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, %rax
movq %rdi, %r14
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
xorl %edi, %edi
testl %eax, %eax
cmovlel %edi, %eax
movq %rax, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
leaq 0x8(%rsi), %rbp
movss 0x1c8f1(%rip), %xmm3 # 0x4f648
cmpq 0x20(%rsp), %rdi
je 0x330c1
movq %rdi, 0x10(%rsp)
xorps %xmm4, %xmm4
movq %r14, %r15
xorl %r13d, %r13d
xorps %xmm5, %xmm5
cmpq $0x8, %r13
movss %xmm4, 0x4(%rsp)
je 0x32e71
movq %r13, %rbx
shlq $0x5, %rbx
xorps %xmm0, %xmm0
xorl %eax, %eax
cmpq $0x20, %rax
je 0x32da8
movss (%r15,%rax,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rax
jmp 0x32d8f
mulss 0x1c8b0(%rip), %xmm0 # 0x4f660
ucomiss 0x1c871(%rip), %xmm0 # 0x4f628
movss %xmm5, 0x8(%rsp)
jb 0x32dc5
sqrtss %xmm0, %xmm0
jmp 0x32dca
callq 0x1eae0
movaps 0x1824f(%rip), %xmm2 # 0x4b020
xorl %eax, %eax
cmpq $0x20, %rax
je 0x32df4
movss (%r15,%rax,4), %xmm1
andps %xmm2, %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x90(%rsp,%rax,4)
incq %rax
jmp 0x32dd3
leaq (%r14,%rbx,4), %rdx
leaq (%rsp,%rbx), %r8
addq $0x110, %r8 # imm = 0x110
leaq (%rsp,%r13,4), %r12
addq $0x50, %r12
subq $0x8, %rsp
pushq $0x20
popq %rdi
pushq $0xf
popq %rsi
leaq 0x98(%rsp), %rcx
movq %r12, %r9
movss 0x1c83c(%rip), %xmm0 # 0x4f664
pushq $0x0
pushq $0x14
leaq 0x88(%rsp), %rax
pushq %rax
callq 0x31883
addq $0x20, %rsp
movaps %xmm0, %xmm5
movss %xmm0, 0x30(%rsp,%r13,4)
maxss 0x8(%rsp), %xmm5
movss (%r12), %xmm1
maxss 0x4(%rsp), %xmm1
incq %r13
subq $-0x80, %r15
movaps %xmm1, %xmm4
movss 0x1c7dc(%rip), %xmm3 # 0x4f648
jmp 0x32d73
movss 0x1c7ef(%rip), %xmm2 # 0x4f668
movaps %xmm2, %xmm1
divss %xmm5, %xmm1
xorps %xmm0, %xmm0
cmpltss %xmm5, %xmm0
andps %xmm1, %xmm0
divss %xmm4, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm4, %xmm1
andps %xmm2, %xmm1
xorl %eax, %eax
movq 0x10(%rsp), %rbx
movl $0xff, %r8d
pushq $0x3f
popq %r9
cmpq $0x8, %rax
je 0x32f25
movss 0x30(%rsp,%rax,4), %xmm2
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
movd %xmm2, %ecx
andl %r8d, %ecx
cmpl %r9d, %ecx
jb 0x32ece
movl %r9d, %ecx
movss 0x50(%rsp,%rax,4), %xmm2
mulss %xmm1, %xmm2
addss %xmm3, %xmm2
movd %xmm2, %edx
andl %r8d, %edx
cmpl %r9d, %edx
jb 0x32eeb
movl %r9d, %edx
cmpq $0x3, %rax
ja 0x32efb
movb %cl, -0x4(%rbp,%rax)
movb %dl, (%rbp,%rax)
jmp 0x32f20
movl %ecx, %esi
andl $0xf, %esi
movl %edx, %edi
shll $0x4, %edi
orl %esi, %edi
movb %dil, (%rbp,%rax)
shlb $0x2, %cl
andb $-0x40, %cl
orb %cl, -0x8(%rbp,%rax)
shlb $0x2, %dl
andb $-0x40, %dl
orb %dl, -0x4(%rbp,%rax)
incq %rax
jmp 0x32eab
movss 0x1c73b(%rip), %xmm0 # 0x4f668
divss %xmm0, %xmm5
movaps %xmm5, %xmm0
callq 0x30a5a
movl %eax, %r13d
imulq $0x90, %rbx, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax), %r15
leaq (%rcx,%rax), %r12
addq $0x4, %r12
movw %r13w, -0x4(%r12)
movss 0x4(%rsp), %xmm0
divss 0x1c700(%rip), %xmm0 # 0x4f668
callq 0x30a5a
movss 0x1c6d3(%rip), %xmm3 # 0x4f648
movw %ax, -0x2(%r12)
movzwl %r13w, %ecx
movq 0x3a022(%rip), %rdx # 0x6cfa8
movss (%rdx,%rcx,4), %xmm0
movss %xmm0, 0x4(%rsp)
movzwl %ax, %eax
movq %rax, 0x8(%rsp)
movq %r14, 0x28(%rsp)
movq %r14, %rbx
leaq 0x110(%rsp), %r14
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x3305e
movl %r13d, %edi
movq %r12, %rsi
leaq 0x3(%rsp), %rdx
leaq 0x2(%rsp), %rcx
callq 0x330d3
movss 0x1c675(%rip), %xmm3 # 0x4f648
movzbl 0x3(%rsp), %eax
cvtsi2ss %eax, %xmm0
mulss 0x4(%rsp), %xmm0
ucomiss 0x1c63f(%rip), %xmm0 # 0x4f628
jne 0x32fed
jnp 0x3304e
movzbl 0x2(%rsp), %eax
cvtsi2ss %eax, %xmm1
movq 0x39fab(%rip), %rax # 0x6cfa8
movq 0x8(%rsp), %rcx
mulss (%rax,%rcx,4), %xmm1
xorl %eax, %eax
cmpq $0x20, %rax
je 0x3304e
movss (%rbx,%rax,4), %xmm2
addss %xmm1, %xmm2
divss %xmm0, %xmm2
addss %xmm3, %xmm2
movd %xmm2, %ecx
andl $0x7fffff, %ecx # imm = 0x7FFFFF
movl $0x40000f, %edx # imm = 0x40000F
cmpl %edx, %ecx
jb 0x33038
movl $0x40000f, %ecx # imm = 0x40000F
cmpl $0x400001, %ecx # imm = 0x400001
jae 0x33045
movl $0x400000, %ecx # imm = 0x400000
movb %cl, (%r14,%rax)
incq %rax
jmp 0x33009
incq %r13
addq $0x20, %r14
subq $-0x80, %rbx
jmp 0x32fac
addq $0x10, %r15
leaq 0x130(%rsp), %rax
xorl %ecx, %ecx
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %rdi
cmpq $0xff, %rcx
ja 0x330ab
xorl %edx, %edx
cmpq $0x20, %rdx
je 0x3309d
movb (%rax,%rdx), %sil
shlb $0x4, %sil
orb -0x20(%rax,%rdx), %sil
movb %sil, (%r15,%rdx)
incq %rdx
jmp 0x33081
addq $0x20, %r15
addq $0x40, %rcx
addq $0x40, %rax
jmp 0x33076
addq $0x400, %r14 # imm = 0x400
incq %rdi
addq $0x90, %rbp
jmp 0x32d57
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_row_q4_K_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov rax, rdx
mov r14, rdi
mov ecx, 100h
cqo
idiv rcx
xor edi, edi
test eax, eax
cmovle eax, edi
mov [rsp+248h+var_228], rax
mov [rsp+248h+var_230], rsi
lea rbp, [rsi+8]
movss xmm3, cs:dword_4F648
loc_32D57:
cmp rdi, [rsp+248h+var_228]
jz loc_330C1
mov [rsp+248h+var_238], rdi
xorps xmm4, xmm4
mov r15, r14
xor r13d, r13d
xorps xmm5, xmm5
loc_32D73:
cmp r13, 8
movss [rsp+248h+var_244], xmm4
jz loc_32E71
mov rbx, r13
shl rbx, 5
xorps xmm0, xmm0
xor eax, eax
loc_32D8F:
cmp rax, 20h ; ' '
jz short loc_32DA8
movss xmm1, dword ptr [r15+rax*4]
mulss xmm1, xmm1
addss xmm0, xmm1
inc rax
jmp short loc_32D8F
loc_32DA8:
mulss xmm0, cs:dword_4F660
ucomiss xmm0, cs:dword_4F628
movss dword ptr [rsp+248h+var_240], xmm5
jb short loc_32DC5
sqrtss xmm0, xmm0
jmp short loc_32DCA
loc_32DC5:
call _sqrtf
loc_32DCA:
movaps xmm2, cs:xmmword_4B020
xor eax, eax
loc_32DD3:
cmp rax, 20h ; ' '
jz short loc_32DF4
movss xmm1, dword ptr [r15+rax*4]
andps xmm1, xmm2
addss xmm1, xmm0
movss [rsp+rax*4+248h+var_1B8], xmm1
inc rax
jmp short loc_32DD3
loc_32DF4:
lea rdx, [r14+rbx*4]
lea r8, [rsp+rbx+248h+var_248]
add r8, 110h
lea r12, [rsp+r13*4+248h+var_248]
add r12, 50h ; 'P'
sub rsp, 8
push 20h ; ' '
pop rdi
push 0Fh
pop rsi
lea rcx, [rsp+250h+var_1B8]
mov r9, r12
movss xmm0, cs:dword_4F664
push 0
push 14h
lea rax, [rsp+260h+var_1D8]
push rax
call make_qkx2_quants
add rsp, 20h
movaps xmm5, xmm0
movss [rsp+r13*4+248h+var_218], xmm0
maxss xmm5, dword ptr [rsp+248h+var_240]
movss xmm1, dword ptr [r12]
maxss xmm1, [rsp+248h+var_244]
inc r13
sub r15, 0FFFFFFFFFFFFFF80h
movaps xmm4, xmm1
movss xmm3, cs:dword_4F648
jmp loc_32D73
loc_32E71:
movss xmm2, cs:dword_4F668
movaps xmm1, xmm2
divss xmm1, xmm5
xorps xmm0, xmm0
cmpltss xmm0, xmm5
andps xmm0, xmm1
divss xmm2, xmm4
xorps xmm1, xmm1
cmpltss xmm1, xmm4
andps xmm1, xmm2
xor eax, eax
mov rbx, [rsp+248h+var_238]
mov r8d, 0FFh
push 3Fh ; '?'
pop r9
loc_32EAB:
cmp rax, 8
jz short loc_32F25
movss xmm2, [rsp+rax*4+248h+var_218]
mulss xmm2, xmm0
addss xmm2, xmm3
movd ecx, xmm2
and ecx, r8d
cmp ecx, r9d
jb short loc_32ECE
mov ecx, r9d
loc_32ECE:
movss xmm2, [rsp+rax*4+248h+var_1F8]
mulss xmm2, xmm1
addss xmm2, xmm3
movd edx, xmm2
and edx, r8d
cmp edx, r9d
jb short loc_32EEB
mov edx, r9d
loc_32EEB:
cmp rax, 3
ja short loc_32EFB
mov [rbp+rax-4], cl
mov [rbp+rax+0], dl
jmp short loc_32F20
loc_32EFB:
mov esi, ecx
and esi, 0Fh
mov edi, edx
shl edi, 4
or edi, esi
mov [rbp+rax+0], dil
shl cl, 2
and cl, 0C0h
or [rbp+rax-8], cl
shl dl, 2
and dl, 0C0h
or [rbp+rax-4], dl
loc_32F20:
inc rax
jmp short loc_32EAB
loc_32F25:
movss xmm0, cs:dword_4F668
divss xmm5, xmm0
movaps xmm0, xmm5
call ggml_compute_fp32_to_fp16_0
mov r13d, eax
imul rax, rbx, 90h
mov rcx, [rsp+248h+var_230]
lea r15, [rcx+rax]
lea r12, [rcx+rax]
add r12, 4
mov [r12-4], r13w
movss xmm0, [rsp+248h+var_244]
divss xmm0, cs:dword_4F668
call ggml_compute_fp32_to_fp16_0
movss xmm3, cs:dword_4F648
mov [r12-2], ax
movzx ecx, r13w
mov rdx, cs:ggml_table_f32_f16_ptr
movss xmm0, dword ptr [rdx+rcx*4]
movss [rsp+248h+var_244], xmm0
movzx eax, ax
mov [rsp+248h+var_240], rax
mov [rsp+248h+var_220], r14
mov rbx, r14
lea r14, [rsp+248h+var_138]
xor r13d, r13d
loc_32FAC:
cmp r13, 8
jz loc_3305E
mov edi, r13d
mov rsi, r12
lea rdx, [rsp+248h+var_245]
lea rcx, [rsp+248h+var_246]
call get_scale_min_k4
movss xmm3, cs:dword_4F648
movzx eax, [rsp+248h+var_245]
cvtsi2ss xmm0, eax
mulss xmm0, [rsp+248h+var_244]
ucomiss xmm0, cs:dword_4F628
jnz short loc_32FED
jnp short loc_3304E
loc_32FED:
movzx eax, [rsp+248h+var_246]
cvtsi2ss xmm1, eax
mov rax, cs:ggml_table_f32_f16_ptr
mov rcx, [rsp+248h+var_240]
mulss xmm1, dword ptr [rax+rcx*4]
xor eax, eax
loc_33009:
cmp rax, 20h ; ' '
jz short loc_3304E
movss xmm2, dword ptr [rbx+rax*4]
addss xmm2, xmm1
divss xmm2, xmm0
addss xmm2, xmm3
movd ecx, xmm2
and ecx, 7FFFFFh
mov edx, 40000Fh
cmp ecx, edx
jb short loc_33038
mov ecx, 40000Fh
loc_33038:
cmp ecx, 400001h
jnb short loc_33045
mov ecx, 400000h
loc_33045:
mov [r14+rax], cl
inc rax
jmp short loc_33009
loc_3304E:
inc r13
add r14, 20h ; ' '
sub rbx, 0FFFFFFFFFFFFFF80h
jmp loc_32FAC
loc_3305E:
add r15, 10h
lea rax, [rsp+248h+var_118]
xor ecx, ecx
mov r14, [rsp+248h+var_220]
mov rdi, [rsp+248h+var_238]
loc_33076:
cmp rcx, 0FFh
ja short loc_330AB
xor edx, edx
loc_33081:
cmp rdx, 20h ; ' '
jz short loc_3309D
mov sil, [rax+rdx]
shl sil, 4
or sil, [rax+rdx-20h]
mov [r15+rdx], sil
inc rdx
jmp short loc_33081
loc_3309D:
add r15, 20h ; ' '
add rcx, 40h ; '@'
add rax, 40h ; '@'
jmp short loc_33076
loc_330AB:
add r14, 400h
inc rdi
add rbp, 90h
jmp loc_32D57
loc_330C1:
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long quantize_row_q4_K_ref(long long a1, long long a2, long long a3)
{
long long result; // rax
long long n; // rdx
long long v6; // rdi
long long v7; // rbp
__m128 v8; // xmm4
long long v9; // r15
long long v10; // r13
__m128 v11; // xmm5
float v12; // xmm0_4
long long i; // rax
float v14; // xmm0_4
long long j; // rax
float *v16; // r12
float v17; // xmm0_4
__m128i v18; // xmm2
double v19; // xmm1_8
unsigned long long v20; // rax
long long v21; // rbx
__m128i v22; // xmm2
unsigned int v23; // ecx
unsigned int v24; // edx
unsigned __int16 v25; // r13
unsigned __int16 *v26; // r15
__m128i v27; // xmm0
unsigned __int16 v28; // ax
double v29; // xmm0_8
long long v30; // rbx
_OWORD *v31; // r14
long long k; // r13
long long m; // rax
unsigned int v34; // ecx
_WORD *v35; // r15
unsigned long long v36; // rcx
long long v37; // r14
long long v38; // rdi
unsigned __int8 v39; // [rsp+2h] [rbp-246h] BYREF
unsigned __int8 v40; // [rsp+3h] [rbp-245h] BYREF
float v41; // [rsp+4h] [rbp-244h]
long long v42; // [rsp+8h] [rbp-240h]
long long v43; // [rsp+10h] [rbp-238h]
long long v44; // [rsp+18h] [rbp-230h]
long long v45; // [rsp+20h] [rbp-228h]
long long v46; // [rsp+28h] [rbp-220h]
_DWORD v47[16]; // [rsp+30h] [rbp-218h] BYREF
char v48[32]; // [rsp+70h] [rbp-1D8h] BYREF
unsigned int v49[32]; // [rsp+90h] [rbp-1B8h] BYREF
_OWORD v50[2]; // [rsp+110h] [rbp-138h] BYREF
char v51; // [rsp+130h] [rbp-118h] BYREF
result = a3 / 256;
n = a3 % 256;
v6 = 0LL;
if ( (int)result <= 0 )
result = 0LL;
v45 = result;
v44 = a2;
v7 = a2 + 8;
while ( v6 != v45 )
{
v43 = v6;
v8.m128_i32[0] = 0;
v9 = a1;
v10 = 0LL;
v11 = 0LL;
while ( 1 )
{
v41 = v8.m128_f32[0];
if ( v10 == 8 )
break;
v12 = 0.0;
for ( i = 0LL; i != 32; ++i )
v12 = v12 + (float)(*(float *)(v9 + 4 * i) * *(float *)(v9 + 4 * i));
v14 = v12 * 0.03125;
LODWORD(v42) = v11.m128_i32[0];
if ( v14 < 0.0 )
sqrtf(v6, a2, n);
else
v14 = fsqrt(v14);
for ( j = 0LL; j != 32; ++j )
*(float *)&v49[j] = fabs(*(float *)(v9 + 4 * j)) + v14;
v16 = (float *)&v47[v10 + 8];
v6 = 32LL;
a2 = 15LL;
make_qkx2_quants(
32LL,
15,
(float *)(a1 + (v10 << 7)),
v49,
(long long)&v50[2 * v10],
v16,
-1.0,
(long long)v48,
20,
0);
v11 = (__m128)0xBF800000;
v47[v10] = -1082130432;
v11.m128_f32[0] = fmaxf(-1.0, *(float *)&v42);
++v10;
v9 += 128LL;
v8.m128_i32[0] = fmaxf(*v16, v41);
}
v18.m128i_i32[1] = 0;
LODWORD(v17) = _mm_cmplt_ss((__m128)0LL, v11).m128_u32[0] & COERCE_UNSIGNED_INT(63.0 / v11.m128_f32[0]);
*(float *)v18.m128i_i32 = 63.0 / v8.m128_f32[0];
*(_QWORD *)&v19 = _mm_cmplt_ss((__m128)0LL, v8).m128_u64[0] & v18.m128i_i64[0];
v20 = 0LL;
v21 = v43;
while ( v20 != 8 )
{
v22 = (__m128i)(unsigned int)v47[v20];
*(float *)v22.m128i_i32 = (float)(*(float *)v22.m128i_i32 * v17) + 12582912.0;
v23 = (unsigned __int8)_mm_cvtsi128_si32(v22);
if ( v23 >= 0x3F )
LOBYTE(v23) = 63;
v18 = (__m128i)(unsigned int)v47[v20 + 8];
*(float *)v18.m128i_i32 = (float)(*(float *)v18.m128i_i32 * *(float *)&v19) + 12582912.0;
v24 = (unsigned __int8)_mm_cvtsi128_si32(v18);
if ( v24 >= 0x3F )
LOBYTE(v24) = 63;
if ( v20 > 3 )
{
a2 = v23 & 0xF;
*(_BYTE *)(v7 + v20) = a2 | (16 * v24);
*(_BYTE *)(v7 + v20 - 8) |= (4 * v23) & 0xC0;
*(_BYTE *)(v7 + v20 - 4) |= (4 * v24) & 0xC0;
}
else
{
*(_BYTE *)(v7 + v20 - 4) = v23;
*(_BYTE *)(v7 + v20) = v24;
}
++v20;
}
v11.m128_f32[0] = v11.m128_f32[0] / 63.0;
v25 = ggml_compute_fp32_to_fp16_0((__m128i)v11);
v26 = (unsigned __int16 *)(v44 + 144 * v21);
*v26 = v25;
v27 = (__m128i)LODWORD(v41);
*(float *)v27.m128i_i32 = v41 / 63.0;
v28 = ggml_compute_fp32_to_fp16_0(v27);
v26[1] = v28;
n = (long long)ggml_table_f32_f16;
*(_QWORD *)&v29 = LODWORD(ggml_table_f32_f16[v25]);
v41 = ggml_table_f32_f16[v25];
v42 = v28;
v46 = a1;
v30 = a1;
v31 = v50;
for ( k = 0LL; k != 8; ++k )
{
a2 = (long long)(v26 + 2);
get_scale_min_k4(
(unsigned int)k,
v26 + 2,
&v40,
&v39,
v29,
v19,
*(double *)v18.m128i_i64,
COERCE_DOUBLE(1262485504LL));
*(float *)&v29 = (float)v40 * v41;
if ( *(float *)&v29 != 0.0 )
{
*(float *)&v19 = (float)v39 * ggml_table_f32_f16[v42];
for ( m = 0LL; m != 32; ++m )
{
v18 = (__m128i)*(unsigned int *)(v30 + 4 * m);
*(float *)v18.m128i_i32 = (float)((float)(*(float *)v18.m128i_i32 + *(float *)&v19) / *(float *)&v29)
+ 12582912.0;
v34 = _mm_cvtsi128_si32(v18) & 0x7FFFFF;
n = 4194319LL;
if ( v34 >= 0x40000F )
v34 = 4194319;
if ( v34 < 0x400001 )
LOBYTE(v34) = 0;
*((_BYTE *)v31 + m) = v34;
}
}
v31 += 2;
v30 += 128LL;
}
v35 = v26 + 8;
result = (long long)&v51;
v36 = 0LL;
v37 = v46;
v38 = v43;
while ( v36 <= 0xFF )
{
for ( n = 0LL; n != 32; ++n )
{
LOBYTE(a2) = *(_BYTE *)(result + n - 32) | (16 * *(_BYTE *)(result + n));
*((_BYTE *)v35 + n) = a2;
}
v35 += 16;
v36 += 64LL;
result += 64LL;
}
a1 = v37 + 1024;
v6 = v38 + 1;
v7 += 144LL;
}
return result;
}
|
quantize_row_q4_K_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV RAX,RDX
MOV R14,RDI
MOV ECX,0x100
CQO
IDIV RCX
XOR EDI,EDI
TEST EAX,EAX
CMOVLE EAX,EDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x18],RSI
LEA RBP,[RSI + 0x8]
MOVSS XMM3,dword ptr [0x0014f648]
LAB_00132d57:
CMP RDI,qword ptr [RSP + 0x20]
JZ 0x001330c1
MOV qword ptr [RSP + 0x10],RDI
XORPS XMM4,XMM4
MOV R15,R14
XOR R13D,R13D
XORPS XMM5,XMM5
LAB_00132d73:
CMP R13,0x8
MOVSS dword ptr [RSP + 0x4],XMM4
JZ 0x00132e71
MOV RBX,R13
SHL RBX,0x5
XORPS XMM0,XMM0
XOR EAX,EAX
LAB_00132d8f:
CMP RAX,0x20
JZ 0x00132da8
MOVSS XMM1,dword ptr [R15 + RAX*0x4]
MULSS XMM1,XMM1
ADDSS XMM0,XMM1
INC RAX
JMP 0x00132d8f
LAB_00132da8:
MULSS XMM0,dword ptr [0x0014f660]
UCOMISS XMM0,dword ptr [0x0014f628]
MOVSS dword ptr [RSP + 0x8],XMM5
JC 0x00132dc5
SQRTSS XMM0,XMM0
JMP 0x00132dca
LAB_00132dc5:
CALL 0x0011eae0
LAB_00132dca:
MOVAPS XMM2,xmmword ptr [0x0014b020]
XOR EAX,EAX
LAB_00132dd3:
CMP RAX,0x20
JZ 0x00132df4
MOVSS XMM1,dword ptr [R15 + RAX*0x4]
ANDPS XMM1,XMM2
ADDSS XMM1,XMM0
MOVSS dword ptr [RSP + RAX*0x4 + 0x90],XMM1
INC RAX
JMP 0x00132dd3
LAB_00132df4:
LEA RDX,[R14 + RBX*0x4]
LEA R8,[RSP + RBX*0x1]
ADD R8,0x110
LEA R12,[RSP + R13*0x4]
ADD R12,0x50
SUB RSP,0x8
PUSH 0x20
POP RDI
PUSH 0xf
POP RSI
LEA RCX,[RSP + 0x98]
MOV R9,R12
MOVSS XMM0,dword ptr [0x0014f664]
PUSH 0x0
PUSH 0x14
LEA RAX,[RSP + 0x88]
PUSH RAX
CALL 0x00131883
ADD RSP,0x20
MOVAPS XMM5,XMM0
MOVSS dword ptr [RSP + R13*0x4 + 0x30],XMM0
MAXSS XMM5,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [R12]
MAXSS XMM1,dword ptr [RSP + 0x4]
INC R13
SUB R15,-0x80
MOVAPS XMM4,XMM1
MOVSS XMM3,dword ptr [0x0014f648]
JMP 0x00132d73
LAB_00132e71:
MOVSS XMM2,dword ptr [0x0014f668]
MOVAPS XMM1,XMM2
DIVSS XMM1,XMM5
XORPS XMM0,XMM0
CMPLTSS XMM0,XMM5
ANDPS XMM0,XMM1
DIVSS XMM2,XMM4
XORPS XMM1,XMM1
CMPLTSS XMM1,XMM4
ANDPS XMM1,XMM2
XOR EAX,EAX
MOV RBX,qword ptr [RSP + 0x10]
MOV R8D,0xff
PUSH 0x3f
POP R9
LAB_00132eab:
CMP RAX,0x8
JZ 0x00132f25
MOVSS XMM2,dword ptr [RSP + RAX*0x4 + 0x30]
MULSS XMM2,XMM0
ADDSS XMM2,XMM3
MOVD ECX,XMM2
AND ECX,R8D
CMP ECX,R9D
JC 0x00132ece
MOV ECX,R9D
LAB_00132ece:
MOVSS XMM2,dword ptr [RSP + RAX*0x4 + 0x50]
MULSS XMM2,XMM1
ADDSS XMM2,XMM3
MOVD EDX,XMM2
AND EDX,R8D
CMP EDX,R9D
JC 0x00132eeb
MOV EDX,R9D
LAB_00132eeb:
CMP RAX,0x3
JA 0x00132efb
MOV byte ptr [RBP + RAX*0x1 + -0x4],CL
MOV byte ptr [RBP + RAX*0x1],DL
JMP 0x00132f20
LAB_00132efb:
MOV ESI,ECX
AND ESI,0xf
MOV EDI,EDX
SHL EDI,0x4
OR EDI,ESI
MOV byte ptr [RBP + RAX*0x1],DIL
SHL CL,0x2
AND CL,0xc0
OR byte ptr [RBP + RAX*0x1 + -0x8],CL
SHL DL,0x2
AND DL,0xc0
OR byte ptr [RBP + RAX*0x1 + -0x4],DL
LAB_00132f20:
INC RAX
JMP 0x00132eab
LAB_00132f25:
MOVSS XMM0,dword ptr [0x0014f668]
DIVSS XMM5,XMM0
MOVAPS XMM0,XMM5
CALL 0x00130a5a
MOV R13D,EAX
IMUL RAX,RBX,0x90
MOV RCX,qword ptr [RSP + 0x18]
LEA R15,[RCX + RAX*0x1]
LEA R12,[RCX + RAX*0x1]
ADD R12,0x4
MOV word ptr [R12 + -0x4],R13W
MOVSS XMM0,dword ptr [RSP + 0x4]
DIVSS XMM0,dword ptr [0x0014f668]
CALL 0x00130a5a
MOVSS XMM3,dword ptr [0x0014f648]
MOV word ptr [R12 + -0x2],AX
MOVZX ECX,R13W
MOV RDX,qword ptr [0x0016cfa8]
MOVSS XMM0,dword ptr [RDX + RCX*0x4]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVZX EAX,AX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x28],R14
MOV RBX,R14
LEA R14,[RSP + 0x110]
XOR R13D,R13D
LAB_00132fac:
CMP R13,0x8
JZ 0x0013305e
MOV EDI,R13D
MOV RSI,R12
LEA RDX,[RSP + 0x3]
LEA RCX,[RSP + 0x2]
CALL 0x001330d3
MOVSS XMM3,dword ptr [0x0014f648]
MOVZX EAX,byte ptr [RSP + 0x3]
CVTSI2SS XMM0,EAX
MULSS XMM0,dword ptr [RSP + 0x4]
UCOMISS XMM0,dword ptr [0x0014f628]
JNZ 0x00132fed
JNP 0x0013304e
LAB_00132fed:
MOVZX EAX,byte ptr [RSP + 0x2]
CVTSI2SS XMM1,EAX
MOV RAX,qword ptr [0x0016cfa8]
MOV RCX,qword ptr [RSP + 0x8]
MULSS XMM1,dword ptr [RAX + RCX*0x4]
XOR EAX,EAX
LAB_00133009:
CMP RAX,0x20
JZ 0x0013304e
MOVSS XMM2,dword ptr [RBX + RAX*0x4]
ADDSS XMM2,XMM1
DIVSS XMM2,XMM0
ADDSS XMM2,XMM3
MOVD ECX,XMM2
AND ECX,0x7fffff
MOV EDX,0x40000f
CMP ECX,EDX
JC 0x00133038
MOV ECX,0x40000f
LAB_00133038:
CMP ECX,0x400001
JNC 0x00133045
MOV ECX,0x400000
LAB_00133045:
MOV byte ptr [R14 + RAX*0x1],CL
INC RAX
JMP 0x00133009
LAB_0013304e:
INC R13
ADD R14,0x20
SUB RBX,-0x80
JMP 0x00132fac
LAB_0013305e:
ADD R15,0x10
LEA RAX,[RSP + 0x130]
XOR ECX,ECX
MOV R14,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x10]
LAB_00133076:
CMP RCX,0xff
JA 0x001330ab
XOR EDX,EDX
LAB_00133081:
CMP RDX,0x20
JZ 0x0013309d
MOV SIL,byte ptr [RAX + RDX*0x1]
SHL SIL,0x4
OR SIL,byte ptr [RAX + RDX*0x1 + -0x20]
MOV byte ptr [R15 + RDX*0x1],SIL
INC RDX
JMP 0x00133081
LAB_0013309d:
ADD R15,0x20
ADD RCX,0x40
ADD RAX,0x40
JMP 0x00133076
LAB_001330ab:
ADD R14,0x400
INC RDI
ADD RBP,0x90
JMP 0x00132d57
LAB_001330c1:
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_q4_K_ref(long param_1,long param_2,long param_3)
{
ushort *puVar1;
byte *pbVar2;
ushort uVar3;
ushort uVar4;
long lVar5;
ulong uVar6;
byte bVar7;
uint uVar8;
long lVar9;
long lVar10;
ulong uVar11;
int1 *puVar12;
long lVar13;
float fVar14;
float fVar15;
float fVar16;
float fVar17;
float fVar18;
float fVar19;
byte local_246;
byte local_245;
float local_244;
ulong local_240;
ulong local_238;
long local_230;
ulong local_228;
long local_220;
float afStack_218 [8];
float local_1f8 [8];
int1 local_1d8 [32];
float local_1b8 [32];
int1 local_138 [32];
int1 local_118 [232];
local_238 = 0;
local_228 = param_3 / 0x100 & 0xffffffff;
if ((int)(param_3 / 0x100) < 1) {
local_228 = local_238;
}
lVar9 = param_2 + 8;
fVar14 = DAT_0014f648;
local_230 = param_2;
for (; local_238 != local_228; local_238 = local_238 + 1) {
fVar18 = 0.0;
fVar19 = 0.0;
lVar13 = param_1;
for (lVar10 = 0; uVar11 = local_238, local_244 = fVar18, lVar10 != 8; lVar10 = lVar10 + 1) {
fVar14 = 0.0;
for (lVar5 = 0; lVar5 != 0x20; lVar5 = lVar5 + 1) {
fVar18 = *(float *)(lVar13 + lVar5 * 4);
fVar14 = fVar14 + fVar18 * fVar18;
}
fVar14 = fVar14 * _DAT_0014f660;
local_240 = CONCAT44(local_240._4_4_,fVar19);
if (fVar14 < DAT_0014f628) {
fVar14 = sqrtf(fVar14);
}
else {
fVar14 = SQRT(fVar14);
}
for (lVar5 = 0; lVar5 != 0x20; lVar5 = lVar5 + 1) {
local_1b8[lVar5] = (float)(*(uint *)(lVar13 + lVar5 * 4) & _DAT_0014b020) + fVar14;
}
fVar19 = (float)make_qkx2_quants(DAT_0014f664,0x20,0xf,param_1 + lVar10 * 0x80,local_1b8,
local_138 + lVar10 * 0x20,local_1f8 + lVar10,local_1d8,0x14,0
);
afStack_218[lVar10] = fVar19;
if (fVar19 <= (float)local_240) {
fVar19 = (float)local_240;
}
fVar18 = local_1f8[lVar10];
if (fVar18 <= local_244) {
fVar18 = local_244;
}
lVar13 = lVar13 + 0x80;
fVar14 = DAT_0014f648;
}
fVar15 = DAT_0014f668 / fVar19;
fVar16 = DAT_0014f668 / fVar18;
for (uVar6 = 0; uVar6 != 8; uVar6 = uVar6 + 1) {
fVar17 = afStack_218[uVar6] * (float)(-(uint)(0.0 < fVar19) & (uint)fVar15) + fVar14;
bVar7 = SUB41(fVar17,0);
if (0x3e < ((uint)fVar17 & 0xff)) {
bVar7 = 0x3f;
}
uVar8 = (uint)(local_1f8[uVar6] * (float)(-(uint)(0.0 < fVar18) & (uint)fVar16) + fVar14) &
0xff;
if (0x3e < uVar8) {
uVar8 = 0x3f;
}
if (uVar6 < 4) {
*(byte *)(lVar9 + -4 + uVar6) = bVar7;
*(byte *)(lVar9 + uVar6) = (byte)uVar8;
}
else {
*(byte *)(lVar9 + uVar6) = (byte)(uVar8 << 4) | bVar7 & 0xf;
pbVar2 = (byte *)(lVar9 + -8 + uVar6);
*pbVar2 = *pbVar2 | (bVar7 & 0x30) << 2;
pbVar2 = (byte *)(lVar9 + -4 + uVar6);
*pbVar2 = *pbVar2 | ((byte)uVar8 & 0x30) << 2;
}
}
uVar3 = ggml_compute_fp32_to_fp16(fVar19 / DAT_0014f668);
lVar13 = local_230 + uVar11 * 0x90;
puVar1 = (ushort *)(local_230 + uVar11 * 0x90);
*puVar1 = uVar3;
uVar4 = ggml_compute_fp32_to_fp16(local_244 / DAT_0014f668);
fVar14 = DAT_0014f648;
puVar1[1] = uVar4;
local_244 = *(float *)(PTR_ggml_table_f32_f16_0016cfa8 + (ulong)uVar3 * 4);
local_240 = (ulong)uVar4;
puVar12 = local_138;
local_220 = param_1;
for (uVar11 = 0; uVar11 != 8; uVar11 = uVar11 + 1) {
get_scale_min_k4(uVar11 & 0xffffffff,puVar1 + 2,&local_245);
fVar14 = (float)local_245 * local_244;
if ((fVar14 != DAT_0014f628) || (NAN(fVar14) || NAN(DAT_0014f628))) {
fVar18 = *(float *)(PTR_ggml_table_f32_f16_0016cfa8 + local_240 * 4);
for (lVar10 = 0; lVar10 != 0x20; lVar10 = lVar10 + 1) {
uVar8 = (uint)((*(float *)(param_1 + lVar10 * 4) + (float)local_246 * fVar18) / fVar14 +
DAT_0014f648) & 0x7fffff;
if (0x40000e < uVar8) {
uVar8 = 0x40000f;
}
if (uVar8 < 0x400001) {
uVar8 = 0;
}
puVar12[lVar10] = (char)uVar8;
}
}
puVar12 = puVar12 + 0x20;
param_1 = param_1 + 0x80;
fVar14 = DAT_0014f648;
}
lVar13 = lVar13 + 0x10;
puVar12 = local_118;
for (uVar11 = 0; uVar11 < 0x100; uVar11 = uVar11 + 0x40) {
for (lVar10 = 0; lVar10 != 0x20; lVar10 = lVar10 + 1) {
*(int1 *)(lVar13 + lVar10) = puVar12[lVar10] << 4 | puVar12[lVar10 + -0x20];
}
lVar13 = lVar13 + 0x20;
puVar12 = puVar12 + 0x40;
}
param_1 = local_220 + 0x400;
lVar9 = lVar9 + 0x90;
}
return;
}
|
|
14,088
|
pfs_register_stage_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_register_stage_v1(const char *category,
PSI_stage_info_v1 **info_array,
int count)
{
char formatted_name[PFS_MAX_INFO_NAME_LENGTH];
size_t prefix_length;
size_t len;
size_t full_length;
PSI_stage_info_v1 *info;
assert(category != NULL);
assert(info_array != NULL);
if (unlikely(build_prefix(&stage_instrument_prefix, category,
formatted_name, &prefix_length)) ||
! pfs_initialized)
{
for (; count>0; count--, info_array++)
(*info_array)->m_key= 0;
return ;
}
for (; count>0; count--, info_array++)
{
info= *info_array;
DBUG_ASSERT(info != NULL);
DBUG_ASSERT(info->m_name != NULL);
len= (int)strlen(info->m_name);
DBUG_ASSERT(len <= 64); // see table_threads.cc near PROCESSLIST_STATE
full_length= prefix_length + len;
if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH))
{
memcpy(formatted_name + prefix_length, info->m_name, len);
info->m_key= register_stage_class(formatted_name,
(uint)prefix_length,
(uint)full_length,
info->m_flags);
}
else
{
pfs_print_error("register_stage_v1: name too long <%s> <%s>\n",
category, info->m_name);
info->m_key= 0;
}
}
return;
}
|
O0
|
cpp
|
pfs_register_stage_v1:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x98(%rbp)
movq %rsi, -0xa0(%rbp)
movl %edx, -0xa4(%rbp)
movq -0x98(%rbp), %rsi
leaq -0x90(%rbp), %rdx
leaq 0x1e7bd7(%rip), %rdi # 0x214908
leaq -0xb0(%rbp), %rcx
callq 0x2c390
cmpl $0x0, %eax
jne 0x2cd4e
leaq 0x39f533(%rip), %rax # 0x3cc27c
testb $0x1, (%rax)
jne 0x2cd91
jmp 0x2cd50
cmpl $0x0, -0xa4(%rbp)
jle 0x2cd8c
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movl -0xa4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0xa0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xa0(%rbp)
jmp 0x2cd50
jmp 0x2ceb0
jmp 0x2cd93
cmpl $0x0, -0xa4(%rbp)
jle 0x2ceae
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
jmp 0x2cdb3
jmp 0x2cdb5
jmp 0x2cdb7
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x26150
cltq
movq %rax, -0xb8(%rbp)
jmp 0x2cdd2
movq -0xb0(%rbp), %rax
addq -0xb8(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x80, -0xc0(%rbp)
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2ce59
leaq -0x90(%rbp), %rdi
addq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0xb8(%rbp), %rdx
callq 0x26280
leaq -0x90(%rbp), %rdi
movq -0xb0(%rbp), %rax
movl %eax, %esi
movq -0xc0(%rbp), %rax
movl %eax, %edx
movq -0xc8(%rbp), %rax
movl 0x10(%rax), %ecx
callq 0x4e7b0
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2ce86
movq -0x98(%rbp), %rsi
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x825ab(%rip), %rdi # 0xaf41d
movb $0x0, %al
callq 0x29c10
movq -0xc8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x2ce88
movl -0xa4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0xa0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xa0(%rbp)
jmp 0x2cd93
jmp 0x2ceb0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2cecb
addq $0xd0, %rsp
popq %rbp
retq
callq 0x26360
|
pfs_register_stage_v1:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_98], rdi
mov [rbp+var_A0], rsi
mov [rbp+var_A4], edx
mov rsi, [rbp+var_98]
lea rdx, [rbp+var_90]
lea rdi, stage_instrument_prefix
lea rcx, [rbp+var_B0]
call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *)
cmp eax, 0
jnz short loc_2CD4E
lea rax, pfs_initialized
test byte ptr [rax], 1
jnz short loc_2CD91
loc_2CD4E:
jmp short $+2
loc_2CD50:
cmp [rbp+var_A4], 0
jle short loc_2CD8C
mov rax, [rbp+var_A0]
mov rax, [rax]
mov dword ptr [rax], 0
mov eax, [rbp+var_A4]
add eax, 0FFFFFFFFh
mov [rbp+var_A4], eax
mov rax, [rbp+var_A0]
add rax, 8
mov [rbp+var_A0], rax
jmp short loc_2CD50
loc_2CD8C:
jmp loc_2CEB0
loc_2CD91:
jmp short $+2
loc_2CD93:
cmp [rbp+var_A4], 0
jle loc_2CEAE
mov rax, [rbp+var_A0]
mov rax, [rax]
mov [rbp+var_C8], rax
jmp short $+2
loc_2CDB3:
jmp short $+2
loc_2CDB5:
jmp short $+2
loc_2CDB7:
mov rax, [rbp+var_C8]
mov rdi, [rax+8]
call _strlen
cdqe
mov [rbp+var_B8], rax
jmp short $+2
loc_2CDD2:
mov rax, qword ptr [rbp+var_B0]
add rax, [rbp+var_B8]
mov qword ptr [rbp+var_C0], rax
cmp qword ptr [rbp+var_C0], 80h
setbe al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_2CE59
lea rdi, [rbp+var_90]
add rdi, qword ptr [rbp+var_B0]
mov rax, [rbp+var_C8]
mov rsi, [rax+8]
mov rdx, [rbp+var_B8]
call _memcpy
lea rdi, [rbp+var_90]; char *
mov rax, qword ptr [rbp+var_B0]
mov esi, eax; unsigned int
mov rax, qword ptr [rbp+var_C0]
mov edx, eax; unsigned int
mov rax, [rbp+var_C8]
mov ecx, [rax+10h]; int
call _Z20register_stage_classPKcjji; register_stage_class(char const*,uint,uint,int)
mov ecx, eax
mov rax, [rbp+var_C8]
mov [rax], ecx
jmp short loc_2CE86
loc_2CE59:
mov rsi, [rbp+var_98]
mov rax, [rbp+var_C8]
mov rdx, [rax+8]
lea rdi, aRegisterStageV; "register_stage_v1: name too long <%s> <"...
mov al, 0
call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...)
mov rax, [rbp+var_C8]
mov dword ptr [rax], 0
loc_2CE86:
jmp short $+2
loc_2CE88:
mov eax, [rbp+var_A4]
add eax, 0FFFFFFFFh
mov [rbp+var_A4], eax
mov rax, [rbp+var_A0]
add rax, 8
mov [rbp+var_A0], rax
jmp loc_2CD93
loc_2CEAE:
jmp short $+2
loc_2CEB0:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2CECB
add rsp, 0D0h
pop rbp
retn
loc_2CECB:
call ___stack_chk_fail
|
unsigned long long pfs_register_stage_v1(long long a1, long long *a2, int a3)
{
long long v4; // [rsp+8h] [rbp-C8h]
unsigned int v5; // [rsp+10h] [rbp-C0h]
long long v6; // [rsp+18h] [rbp-B8h]
unsigned int v7[3]; // [rsp+20h] [rbp-B0h] BYREF
int v8; // [rsp+2Ch] [rbp-A4h]
long long *v9; // [rsp+30h] [rbp-A0h]
long long v10; // [rsp+38h] [rbp-98h]
char v11[136]; // [rsp+40h] [rbp-90h] BYREF
unsigned long long v12; // [rsp+C8h] [rbp-8h]
v12 = __readfsqword(0x28u);
v10 = a1;
v9 = a2;
v8 = a3;
if ( !(unsigned int)build_prefix(&stage_instrument_prefix, a1, (long long)v11, v7) && (pfs_initialized & 1) != 0 )
{
while ( v8 > 0 )
{
v4 = *v9;
v6 = (int)strlen(*(_QWORD *)(*v9 + 8));
v5 = v6 + v7[0];
if ( (unsigned long long)(v6 + *(_QWORD *)v7) > 0x80 )
{
pfs_print_error("register_stage_v1: name too long <%s> <%s>\n");
*(_DWORD *)v4 = 0;
}
else
{
memcpy(&v11[*(_QWORD *)v7], *(_QWORD *)(v4 + 8), v6);
*(_DWORD *)v4 = register_stage_class(v11, v7[0], v5, *(_DWORD *)(v4 + 16));
}
--v8;
++v9;
}
}
else
{
while ( v8 > 0 )
{
*(_DWORD *)*v9 = 0;
--v8;
++v9;
}
}
return __readfsqword(0x28u);
}
|
pfs_register_stage_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x98],RDI
MOV qword ptr [RBP + -0xa0],RSI
MOV dword ptr [RBP + -0xa4],EDX
MOV RSI,qword ptr [RBP + -0x98]
LEA RDX,[RBP + -0x90]
LEA RDI,[0x314908]
LEA RCX,[RBP + -0xb0]
CALL 0x0012c390
CMP EAX,0x0
JNZ 0x0012cd4e
LEA RAX,[0x4cc27c]
TEST byte ptr [RAX],0x1
JNZ 0x0012cd91
LAB_0012cd4e:
JMP 0x0012cd50
LAB_0012cd50:
CMP dword ptr [RBP + -0xa4],0x0
JLE 0x0012cd8c
MOV RAX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0xa4]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0xa0]
ADD RAX,0x8
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0012cd50
LAB_0012cd8c:
JMP 0x0012ceb0
LAB_0012cd91:
JMP 0x0012cd93
LAB_0012cd93:
CMP dword ptr [RBP + -0xa4],0x0
JLE 0x0012ceae
MOV RAX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0012cdb3
LAB_0012cdb3:
JMP 0x0012cdb5
LAB_0012cdb5:
JMP 0x0012cdb7
LAB_0012cdb7:
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00126150
CDQE
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x0012cdd2
LAB_0012cdd2:
MOV RAX,qword ptr [RBP + -0xb0]
ADD RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xc0],RAX
CMP qword ptr [RBP + -0xc0],0x80
SETBE AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0012ce59
LEA RDI,[RBP + -0x90]
ADD RDI,qword ptr [RBP + -0xb0]
MOV RAX,qword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0xb8]
CALL 0x00126280
LEA RDI,[RBP + -0x90]
MOV RAX,qword ptr [RBP + -0xb0]
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV ECX,dword ptr [RAX + 0x10]
CALL 0x0014e7b0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV dword ptr [RAX],ECX
JMP 0x0012ce86
LAB_0012ce59:
MOV RSI,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[0x1af41d]
MOV AL,0x0
CALL 0x00129c10
MOV RAX,qword ptr [RBP + -0xc8]
MOV dword ptr [RAX],0x0
LAB_0012ce86:
JMP 0x0012ce88
LAB_0012ce88:
MOV EAX,dword ptr [RBP + -0xa4]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0xa0]
ADD RAX,0x8
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0012cd93
LAB_0012ceae:
JMP 0x0012ceb0
LAB_0012ceb0:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012cecb
ADD RSP,0xd0
POP RBP
RET
LAB_0012cecb:
CALL 0x00126360
|
void pfs_register_stage_v1(char *param_1,int8 *param_2,int param_3)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
size_t sVar4;
ulong uVar5;
long in_FS_OFFSET;
ulong local_b8;
int local_ac;
int8 *local_a8;
char *local_a0;
char local_98 [136];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_ac = param_3;
local_a8 = param_2;
local_a0 = param_1;
iVar2 = build_prefix((st_mysql_const_lex_string *)stage_instrument_prefix,param_1,local_98,
&local_b8);
if ((iVar2 == 0) && ((pfs_initialized & 1) != 0)) {
for (; 0 < local_ac; local_ac = local_ac + -1) {
puVar1 = (int4 *)*local_a8;
sVar4 = strlen(*(char **)(puVar1 + 2));
uVar5 = local_b8 + (long)(int)sVar4;
if (uVar5 < 0x81) {
memcpy(local_98 + local_b8,*(void **)(puVar1 + 2),(long)(int)sVar4);
uVar3 = register_stage_class(local_98,(uint)local_b8,(uint)uVar5,puVar1[4]);
*puVar1 = uVar3;
}
else {
pfs_print_error("register_stage_v1: name too long <%s> <%s>\n",local_a0,
*(int8 *)(puVar1 + 2));
*puVar1 = 0;
}
local_a8 = local_a8 + 1;
}
}
else {
for (; 0 < local_ac; local_ac = local_ac + -1) {
*(int4 *)*local_a8 = 0;
local_a8 = local_a8 + 1;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
14,089
|
AppenderConsole::InitColors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::basic_string_view<char, std::char_traits<char>>)
|
SylCore-WoTLK/src/common/Logging/AppenderConsole.cpp
|
void AppenderConsole::InitColors(std::string const& name, std::string_view str)
{
if (str.empty())
{
_colored = false;
return;
}
std::vector<std::string_view> colorStrs = Acore::Tokenize(str, ' ', false);
if (colorStrs.size() != NUM_ENABLED_LOG_LEVELS)
{
throw InvalidAppenderArgsException(Acore::StringFormat("Log::CreateAppenderFromConfig: Invalid color data '{}' for console appender {} (expected {} entries, got {})",
str, name, NUM_ENABLED_LOG_LEVELS, colorStrs.size()));
}
for (uint8 i = 0; i < NUM_ENABLED_LOG_LEVELS; ++i)
{
if (Optional<uint8> color = Acore::StringTo<uint8>(colorStrs[i]); color && EnumUtils::IsValid<ColorTypes>(*color))
{
_colors[i] = static_cast<ColorTypes>(*color);
}
else
{
throw InvalidAppenderArgsException(Acore::StringFormat("Log::CreateAppenderFromConfig: Invalid color '{}' for log level {} on console appender {}",
colorStrs[i], EnumUtils::ToTitle(static_cast<LogLevel>(i)), name));
}
}
_colored = true;
}
|
O3
|
cpp
|
AppenderConsole::InitColors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::basic_string_view<char, std::char_traits<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
movq %rdx, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
testq %rdx, %rdx
je 0xc7e5d
movq %rsi, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl $0x20, %ecx
xorl %r8d, %r8d
callq 0xc4c9c
movq 0x8(%r15), %rax
subq (%r15), %rax
cmpq $0x60, %rax
jne 0xc7ef5
xorl %r13d, %r13d
leaq 0x28(%rsp), %r15
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movq 0x8(%rax,%r13), %rdi
movq (%rax,%r13), %r12
addq %rdi, %r12
movq %r12, %rsi
movq %r15, %rdx
movl $0xa, %ecx
callq 0x6bfd3
cmpq %r12, %rax
jne 0xc7e71
testl %edx, %edx
jne 0xc7e71
movzbl 0x28(%rsp), %ebp
movl %ebp, %edi
callq 0xc82d4
testb %al, %al
je 0xc7e71
movl %ebp, 0x34(%r14,%rbx,4)
incq %rbx
addq $0x10, %r13
cmpq $0x6, %rbx
jne 0xc7df3
movb $0x1, 0x32(%r14)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc7e62
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xd32e8
jmp 0xc7e62
movb $0x0, 0x32(%r14)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b6a0
movq %rax, %r14
movq 0x10(%rsp), %r15
movzbl %bl, %esi
leaq 0x60(%rsp), %rdi
callq 0xc8d84
addq %r13, %r15
movq 0x68(%rsp), %rax
leaq 0x48(%rsp), %r8
movq %rax, (%r8)
leaq 0x478d8(%rip), %rsi # 0x10f77f
leaq 0x28(%rsp), %rdi
movl $0x59, %edx
movq %r15, %rcx
movq 0x8(%rsp), %r9
callq 0xc81ed
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1bbb0
leaq 0xa0713(%rip), %rax # 0x1685e8
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x9fb6f(%rip), %rsi # 0x167a50
movq 0xa40b8(%rip), %rdx # 0x16bfa0
movq %r14, %rdi
callq 0x1baf0
jmp 0xc7f77
movl $0x10, %edi
callq 0x1b6a0
movq %rax, %r14
leaq 0x48(%rsp), %r9
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movb $0x6, (%r9)
sarq $0x4, %rax
leaq 0x60(%rsp), %rcx
movq %rax, (%rcx)
movq %rcx, (%rsp)
leaq 0x477e6(%rip), %rsi # 0x10f712
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rcx
movl $0x6c, %edx
movq 0x8(%rsp), %r8
callq 0xc8128
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1bbb0
leaq 0xa068c(%rip), %rax # 0x1685e8
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x9fae8(%rip), %rsi # 0x167a50
movq 0xa4031(%rip), %rdx # 0x16bfa0
movq %r14, %rdi
callq 0x1baf0
jmp 0xc7f7b
jmp 0xc7fa0
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc7f99
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd32e8
testb %bpl, %bpl
jne 0xc7fa3
jmp 0xc7fb0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1c130
jmp 0xc7fb0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc7fc7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xd32e8
movq %rbx, %rdi
callq 0x1bba0
nop
|
_ZN15AppenderConsole10InitColorsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS3_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rdi
mov [rsp+0A8h+var_58], rdx
mov [rsp+0A8h+var_50], rcx
test rdx, rdx
jz loc_C7E5D
mov [rsp+0A8h+var_A0], rsi
lea r15, [rsp+0A8h+var_98]
mov rdi, r15
mov rsi, rdx
mov rdx, rcx
mov ecx, 20h ; ' '
xor r8d, r8d
call _ZN5Acore8TokenizeESt17basic_string_viewIcSt11char_traitsIcEEcb; Acore::Tokenize(std::string_view,char,bool)
mov rax, [r15+8]
sub rax, [r15]
cmp rax, 60h ; '`'
jnz loc_C7EF5
xor r13d, r13d
lea r15, [rsp+0A8h+var_80]
xor ebx, ebx
loc_C7DF3:
mov rax, [rsp+0A8h+var_98]
mov rdi, [rax+r13+8]
mov r12, [rax+r13]
add r12, rdi
mov rsi, r12
mov rdx, r15
mov ecx, 0Ah
call _ZSt10from_charsIhTnNSt9enable_ifIXsr5__or_ISt5__or_IJS1_IJSt7is_sameINSt9remove_cvIT_E4typeEaES2_IS6_sES2_IS6_iES2_IS6_lES2_IS6_xES2_IS6_nEEES1_IJS2_IS6_hES2_IS6_tES2_IS6_jES2_IS6_mES2_IS6_yES2_IS6_oEEEEES2_IcS6_EEE5valueEiE4typeELi0EESt17from_chars_resultPKcSR_RS4_i
cmp rax, r12
jnz short loc_C7E71
test edx, edx
jnz short loc_C7E71
movzx ebp, [rsp+0A8h+var_80]
mov edi, ebp
call _ZN9EnumUtils7IsValidI10ColorTypesEEbT_; EnumUtils::IsValid<ColorTypes>(ColorTypes)
test al, al
jz short loc_C7E71
mov [r14+rbx*4+34h], ebp
inc rbx
add r13, 10h
cmp rbx, 6
jnz short loc_C7DF3
mov byte ptr [r14+32h], 1
mov rdi, [rsp+0A8h+var_98]; void *
test rdi, rdi
jz short loc_C7E62
mov rsi, [rsp+0A8h+var_88]
sub rsi, rdi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_C7E62
loc_C7E5D:
mov byte ptr [r14+32h], 0
loc_C7E62:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C7E71:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov r15, [rsp+0A8h+var_98]
movzx esi, bl
lea rdi, [rsp+0A8h+var_48]
call _ZN5Acore4Impl13EnumUtilsImpl9EnumUtilsI8LogLevelE8ToStringES3_; Acore::Impl::EnumUtilsImpl::EnumUtils<LogLevel>::ToString(LogLevel)
add r15, r13
mov rax, [rsp+0A8h+var_40]
lea r8, [rsp+0A8h+var_60]
mov [r8], rax
lea rsi, aLogCreateappen_3; "Log::CreateAppenderFromConfig: Invalid "...
lea rdi, [rsp+0A8h+var_80]
mov edx, 59h ; 'Y'
mov rcx, r15
mov r9, [rsp+0A8h+var_A0]
call _ZN5Acore12StringFormatIJRSt17basic_string_viewIcSt11char_traitsIcEEPKcRKNSt7__cxx1112basic_stringIcS3_SaIcEEEEEESB_N3fmt3v1019basic_format_stringIcJDpNSF_13type_identityIT_E4typeEEEEDpOSI_; Acore::StringFormat<std::string_view &,char const*,std::string const&>(fmt::v10::basic_format_string<char,fmt::v10::type_identity<std::string_view &,char const*,std::string const&>::type>,std::string_view &,char const*,std::string const&&&)
mov bpl, 1
lea rsi, [rsp+0A8h+var_80]
mov rdi, r14
call __ZNSt12length_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::length_error::length_error(std::string const&)
lea rax, off_1685E8
mov [r14], rax
xor ebp, ebp
lea rsi, _ZTI28InvalidAppenderArgsException; lptinfo
mov rdx, cs:_ZNSt12length_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_C7F77
loc_C7EF5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea r9, [rsp+0A8h+var_60]
mov rax, [rsp+0A8h+var_90]
sub rax, [rsp+0A8h+var_98]
mov byte ptr [r9], 6
sar rax, 4
lea rcx, [rsp+0A8h+var_48]
mov [rcx], rax
mov [rsp+0A8h+var_A8], rcx
lea rsi, aLogCreateappen_4; "Log::CreateAppenderFromConfig: Invalid "...
lea rdi, [rsp+0A8h+var_80]
lea rcx, [rsp+0A8h+var_58]
mov edx, 6Ch ; 'l'
mov r8, [rsp+0A8h+var_A0]
call _ZN5Acore12StringFormatIJRSt17basic_string_viewIcSt11char_traitsIcEERKNSt7__cxx1112basic_stringIcS3_SaIcEEE8LogLevelmEEES9_N3fmt3v1019basic_format_stringIcJDpNSE_13type_identityIT_E4typeEEEEDpOSH_; Acore::StringFormat<std::string_view &,std::string const&,LogLevel,ulong>(fmt::v10::basic_format_string<char,fmt::v10::type_identity<std::string_view &,std::string const&,LogLevel,ulong>::type>,std::string_view &,std::string const&,LogLevel,ulong&&)
mov bpl, 1
lea rsi, [rsp+0A8h+var_80]
mov rdi, r14
call __ZNSt12length_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::length_error::length_error(std::string const&)
lea rax, off_1685E8
mov [r14], rax
xor ebp, ebp
lea rsi, _ZTI28InvalidAppenderArgsException; lptinfo
mov rdx, cs:_ZNSt12length_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_C7F77:
jmp short loc_C7F7B
jmp short loc_C7FA0
loc_C7F7B:
mov rbx, rax
lea rax, [rsp+0A8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C7F99
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C7F99:
test bpl, bpl
jnz short loc_C7FA3
jmp short loc_C7FB0
loc_C7FA0:
mov rbx, rax
loc_C7FA3:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_C7FB0
mov rbx, rax
loc_C7FB0:
mov rdi, [rsp+0A8h+var_98]; void *
test rdi, rdi
jz short loc_C7FC7
mov rsi, [rsp+0A8h+var_88]
sub rsi, rdi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C7FC7:
mov rdi, rbx
call __Unwind_Resume
|
void AppenderConsole::InitColors(long long a1, long long a2, unsigned long long a3, long long a4)
{
unsigned int v5; // r8d
long long v6; // r13
long long i; // rbx
_BYTE *v8; // rdi
unsigned __int8 *v9; // r12
int v10; // edx
int v11; // ebp
_QWORD *v12; // r14
char *v13; // r15
_QWORD *exception; // r14
void *v15; // [rsp+10h] [rbp-98h] BYREF
long long v16; // [rsp+18h] [rbp-90h]
long long v17; // [rsp+20h] [rbp-88h]
_BYTE v18[16]; // [rsp+28h] [rbp-80h] BYREF
long long v19; // [rsp+48h] [rbp-60h] BYREF
_QWORD v20[2]; // [rsp+50h] [rbp-58h] BYREF
_QWORD v21[9]; // [rsp+60h] [rbp-48h] BYREF
v20[0] = a3;
v20[1] = a4;
if ( a3 )
{
Acore::Tokenize((long long)&v15, a3, a4, 32, 0);
if ( v16 - (_QWORD)v15 != 96 )
{
exception = __cxa_allocate_exception(0x10uLL);
LOBYTE(v19) = 6;
v21[0] = (v16 - (long long)v15) >> 4;
Acore::StringFormat<std::string_view &,std::string const&,LogLevel,unsigned long>(
v18,
"Log::CreateAppenderFromConfig: Invalid color data '{}' for console appender {} (expected {} entries, got {})",
108LL,
v20,
a2,
&v19,
v21);
std::length_error::length_error(exception, v18);
*exception = off_1685E8;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'InvalidAppenderArgsException,
(void (*)(void *))&std::length_error::~length_error);
}
v6 = 0LL;
for ( i = 0LL; i != 6; ++i )
{
v8 = *(_BYTE **)((char *)v15 + v6 + 8);
v9 = &v8[*(_QWORD *)((char *)v15 + v6)];
if ( ZSt10from_charsIhTnNSt9enable_ifIXsr5__or_ISt5__or_IJS1_IJSt7is_sameINSt9remove_cvIT_E4typeEaES2_IS6_sES2_IS6_iES2_IS6_lES2_IS6_xES2_IS6_nEEES1_IJS2_IS6_hES2_IS6_tES2_IS6_jES2_IS6_mES2_IS6_yES2_IS6_oEEEEES2_IcS6_EEE5valueEiE4typeELi0EESt17from_chars_resultPKcSR_RS4_i(
v8,
v9,
v18,
10,
v5) != v9
|| v10
|| (v11 = v18[0], !(unsigned __int8)EnumUtils::IsValid<ColorTypes>(v18[0])) )
{
v12 = __cxa_allocate_exception(0x10uLL);
v13 = (char *)v15;
Acore::Impl::EnumUtilsImpl::EnumUtils<LogLevel>::ToString(v21, (unsigned __int8)i);
v19 = v21[1];
Acore::StringFormat<std::string_view &,char const*,std::string const&>(
v18,
"Log::CreateAppenderFromConfig: Invalid color '{}' for log level {} on console appender {}",
89LL,
&v13[v6],
&v19,
a2);
std::length_error::length_error(v12, v18);
*v12 = off_1685E8;
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'InvalidAppenderArgsException,
(void (*)(void *))&std::length_error::~length_error);
}
*(_DWORD *)(a1 + 4 * i + 52) = v11;
v6 += 16LL;
}
*(_BYTE *)(a1 + 50) = 1;
if ( v15 )
operator delete(v15, v17 - (_QWORD)v15);
}
else
{
*(_BYTE *)(a1 + 50) = 0;
}
}
|
InitColors:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RDI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x58],RCX
TEST RDX,RDX
JZ 0x001c7e5d
MOV qword ptr [RSP + 0x8],RSI
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV RSI,RDX
MOV RDX,RCX
MOV ECX,0x20
XOR R8D,R8D
CALL 0x001c4c9c
MOV RAX,qword ptr [R15 + 0x8]
SUB RAX,qword ptr [R15]
CMP RAX,0x60
JNZ 0x001c7ef5
XOR R13D,R13D
LEA R15,[RSP + 0x28]
XOR EBX,EBX
LAB_001c7df3:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + R13*0x1 + 0x8]
MOV R12,qword ptr [RAX + R13*0x1]
ADD R12,RDI
LAB_001c7e04:
MOV RSI,R12
MOV RDX,R15
MOV ECX,0xa
CALL 0x0016bfd3
CMP RAX,R12
JNZ 0x001c7e71
TEST EDX,EDX
JNZ 0x001c7e71
MOVZX EBP,byte ptr [RSP + 0x28]
MOV EDI,EBP
CALL 0x001c82d4
LAB_001c7e29:
TEST AL,AL
JZ 0x001c7e71
MOV dword ptr [R14 + RBX*0x4 + 0x34],EBP
INC RBX
ADD R13,0x10
CMP RBX,0x6
JNZ 0x001c7df3
MOV byte ptr [R14 + 0x32],0x1
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001c7e62
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x001d32e8
JMP 0x001c7e62
LAB_001c7e5d:
MOV byte ptr [R14 + 0x32],0x0
LAB_001c7e62:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c7e71:
MOV EDI,0x10
CALL 0x0011b6a0
MOV R14,RAX
MOV R15,qword ptr [RSP + 0x10]
LAB_001c7e83:
MOVZX ESI,BL
LEA RDI,[RSP + 0x60]
CALL 0x001c8d84
ADD R15,R13
MOV RAX,qword ptr [RSP + 0x68]
LEA R8,[RSP + 0x48]
MOV qword ptr [R8],RAX
LEA RSI,[0x20f77f]
LEA RDI,[RSP + 0x28]
MOV EDX,0x59
MOV RCX,R15
MOV R9,qword ptr [RSP + 0x8]
CALL 0x001c81ed
MOV BPL,0x1
LAB_001c7ec1:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011bbb0
LEA RAX,[0x2685e8]
MOV qword ptr [R14],RAX
XOR EBP,EBP
LEA RSI,[0x267a50]
MOV RDX,qword ptr [0x0026bfa0]
MOV RDI,R14
CALL 0x0011baf0
LAB_001c7ef5:
MOV EDI,0x10
CALL 0x0011b6a0
MOV R14,RAX
LEA R9,[RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,qword ptr [RSP + 0x10]
MOV byte ptr [R9],0x6
SAR RAX,0x4
LEA RCX,[RSP + 0x60]
MOV qword ptr [RCX],RAX
LAB_001c7f21:
MOV qword ptr [RSP],RCX
LEA RSI,[0x20f712]
LEA RDI,[RSP + 0x28]
LEA RCX,[RSP + 0x50]
MOV EDX,0x6c
MOV R8,qword ptr [RSP + 0x8]
CALL 0x001c8128
MOV BPL,0x1
LAB_001c7f48:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011bbb0
LEA RAX,[0x2685e8]
MOV qword ptr [R14],RAX
XOR EBP,EBP
LEA RSI,[0x267a50]
MOV RDX,qword ptr [0x0026bfa0]
MOV RDI,R14
CALL 0x0011baf0
|
/* AppenderConsole::InitColors(std::__cxx11::string const&, std::basic_string_view<char,
std::char_traits<char> >) */
void AppenderConsole::InitColors(long param_1,int8 param_2,long param_3,int8 param_4)
{
long lVar1;
bool bVar2;
length_error *plVar3;
ulong uVar4;
uint uVar5;
long lVar6;
long lVar7;
int1 auVar8 [12];
void *local_98;
long local_90;
long local_88;
string local_80 [32];
int8 local_60;
long local_58;
int8 local_50;
long local_48;
int8 local_40;
if (param_3 == 0) {
*(int1 *)(param_1 + 0x32) = 0;
}
else {
local_58 = param_3;
local_50 = param_4;
Acore::Tokenize(&local_98,param_3,param_4,0x20,0);
if (local_90 - (long)local_98 != 0x60) {
plVar3 = (length_error *)__cxa_allocate_exception(0x10);
local_60 = CONCAT71(local_60._1_7_,6);
local_48 = local_90 - (long)local_98 >> 4;
/* try { // try from 001c7f21 to 001c7f44 has its CatchHandler @ 001c7f79 */
Acore::
StringFormat<std::basic_string_view<char,std::char_traits<char>>&,std::__cxx11::string_const&,LogLevel,unsigned_long>
(local_80,
"Log::CreateAppenderFromConfig: Invalid color data \'{}\' for console appender {} (expected {} entries, got {})"
,0x6c,&local_58,param_2,&local_60,&local_48);
/* try { // try from 001c7f48 to 001c7f76 has its CatchHandler @ 001c7f77 */
std::length_error::length_error(plVar3,local_80);
*(int ***)plVar3 = &PTR__length_error_002685e8;
/* WARNING: Subroutine does not return */
__cxa_throw(plVar3,&InvalidAppenderArgsException::typeinfo,PTR__length_error_0026bfa0);
}
lVar7 = 0;
uVar4 = 0;
do {
lVar1 = *(long *)((long)local_98 + lVar7 + 8);
lVar6 = *(long *)((long)local_98 + lVar7) + lVar1;
/* try { // try from 001c7e04 to 001c7e28 has its CatchHandler @ 001c7fad */
auVar8 = _ZSt10from_charsIhTnNSt9enable_ifIXsr5__or_ISt5__or_IJS1_IJSt7is_sameINSt9remove_cvIT_E4typeEaES2_IS6_sES2_IS6_iES2_IS6_lES2_IS6_xES2_IS6_nEEES1_IJS2_IS6_hES2_IS6_tES2_IS6_jES2_IS6_mES2_IS6_yES2_IS6_oEEEEES2_IcS6_EEE5valueEiE4typeELi0EESt17from_chars_resultPKcSR_RS4_i
(lVar1,lVar6,local_80,10);
if ((auVar8._0_8_ != lVar6) || (auVar8._8_4_ != 0)) {
LAB_001c7e71:
plVar3 = (length_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c7e83 to 001c7ebd has its CatchHandler @ 001c7fa0 */
Acore::Impl::EnumUtilsImpl::EnumUtils<LogLevel>::ToString
((EnumUtils<LogLevel> *)&local_48,uVar4 & 0xff);
local_60 = local_40;
Acore::
StringFormat<std::basic_string_view<char,std::char_traits<char>>&,char_const*,std::__cxx11::string_const&>
(local_80,
"Log::CreateAppenderFromConfig: Invalid color \'{}\' for log level {} on console appender {}"
,0x59,(long)local_98 + lVar7,&local_60,param_2);
/* try { // try from 001c7ec1 to 001c7eef has its CatchHandler @ 001c7f7b */
std::length_error::length_error(plVar3,local_80);
*(int ***)plVar3 = &PTR__length_error_002685e8;
/* WARNING: Subroutine does not return */
__cxa_throw(plVar3,&InvalidAppenderArgsException::typeinfo,PTR__length_error_0026bfa0);
}
uVar5 = (uint)(byte)local_80[0];
bVar2 = EnumUtils::IsValid<ColorTypes>(uVar5);
if (!bVar2) goto LAB_001c7e71;
*(uint *)(param_1 + 0x34 + uVar4 * 4) = uVar5;
uVar4 = uVar4 + 1;
lVar7 = lVar7 + 0x10;
} while (uVar4 != 6);
*(int1 *)(param_1 + 0x32) = 1;
if (local_98 != (void *)0x0) {
operator_delete(local_98,local_88 - (long)local_98);
}
}
return;
}
|
|
14,090
|
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
bool fs_validate_filename(const std::string & filename) {
if (!filename.length()) {
// Empty filename invalid
return false;
}
if (filename.length() > 255) {
// Limit at common largest possible filename on Linux filesystems
// to avoid unnecessary further validation
// (On systems with smaller limits it will be caught by the OS)
return false;
}
std::u32string filename_utf32;
try {
#if defined(__clang__)
// disable C++17 deprecation warning for std::codecvt_utf8
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter;
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
filename_utf32 = converter.from_bytes(filename);
// If the reverse conversion mismatches, it means overlong UTF-8 sequences were used,
// or invalid encodings were encountered. Reject such attempts
std::string filename_reencoded = converter.to_bytes(filename_utf32);
if (filename_reencoded != filename) {
return false;
}
} catch (const std::exception &) {
return false;
}
// Check for forbidden codepoints:
// - Control characters
// - Unicode equivalents of illegal characters
// - UTF-16 surrogate pairs
// - UTF-8 replacement character
// - Byte order mark (BOM)
// - Illegal characters: / \ : * ? " < > |
for (char32_t c : filename_utf32) {
if (c <= 0x1F // Control characters (C0)
|| c == 0x7F // Control characters (DEL)
|| (c >= 0x80 && c <= 0x9F) // Control characters (C1)
|| c == 0xFF0E // Fullwidth Full Stop (period equivalent)
|| c == 0x2215 // Division Slash (forward slash equivalent)
|| c == 0x2216 // Set Minus (backslash equivalent)
|| (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs
|| c == 0xFFFD // Replacement Character (UTF-8)
|| c == 0xFEFF // Byte Order Mark (BOM)
|| c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters
|| c == '?' || c == '"' || c == '<' || c == '>' || c == '|') {
return false;
}
}
// Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename
// Unicode and other whitespace is not affected, only 0x20 space
if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') {
return false;
}
// Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead)
if (filename.find("..") != std::string::npos) {
return false;
}
// Reject "."
if (filename == ".") {
return false;
}
return true;
}
|
O0
|
cpp
|
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x118(%rsp)
movq 0x118(%rsp), %rdi
callq 0x5aa40
cmpq $0x0, %rax
jne 0xf13df
movb $0x0, 0x127(%rsp)
jmp 0xf1777
movq 0x118(%rsp), %rdi
callq 0x5aa40
cmpq $0xff, %rax
jbe 0xf1401
movb $0x0, 0x127(%rsp)
jmp 0xf1777
leaq 0xf8(%rsp), %rdi
callq 0xfad60
leaq 0x98(%rsp), %rdi
callq 0xfade0
jmp 0xf141d
movq 0x118(%rsp), %rdx
leaq 0x68(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xfaea0
jmp 0xf1439
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x68(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xfaf20
movq 0x8(%rsp), %rdi
callq 0xfb160
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xfb1a0
jmp 0xf1478
movq 0x118(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0xfb220
testb $0x1, %al
jne 0xf1493
jmp 0xf1519
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf1521
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf14dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xfb250
movl 0x8c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xf1768
movq 0x90(%rsp), %rdi
callq 0x5a0e0
movq %rax, 0x38(%rsp)
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
callq 0x5ae10
jmp 0xf1548
movl $0x0, 0x44(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5b648
leaq 0x98(%rsp), %rdi
callq 0xfb250
movl 0x44(%rsp), %eax
testl %eax, %eax
jne 0xf1759
jmp 0xf1546
jmp 0xf1566
jmp 0xf1759
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf1768
leaq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0xfb290
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0xfb2c0
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xfb320
testb $0x1, %al
jne 0xf15a9
jmp 0xf1692
leaq 0x28(%rsp), %rdi
callq 0xfb360
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
cmpl $0x1f, 0x1c(%rsp)
jbe 0xf166c
cmpl $0x7f, 0x1c(%rsp)
je 0xf166c
cmpl $0x80, 0x1c(%rsp)
jb 0xf15e7
cmpl $0x9f, 0x1c(%rsp)
jbe 0xf166c
cmpl $0xff0e, 0x1c(%rsp) # imm = 0xFF0E
je 0xf166c
cmpl $0x2215, 0x1c(%rsp) # imm = 0x2215
je 0xf166c
cmpl $0x2216, 0x1c(%rsp) # imm = 0x2216
je 0xf166c
cmpl $0xd800, 0x1c(%rsp) # imm = 0xD800
jb 0xf1619
cmpl $0xdfff, 0x1c(%rsp) # imm = 0xDFFF
jbe 0xf166c
cmpl $0xfffd, 0x1c(%rsp) # imm = 0xFFFD
je 0xf166c
cmpl $0xfeff, 0x1c(%rsp) # imm = 0xFEFF
je 0xf166c
cmpl $0x2f, 0x1c(%rsp)
je 0xf166c
cmpl $0x5c, 0x1c(%rsp)
je 0xf166c
cmpl $0x3a, 0x1c(%rsp)
je 0xf166c
cmpl $0x2a, 0x1c(%rsp)
je 0xf166c
cmpl $0x3f, 0x1c(%rsp)
je 0xf166c
cmpl $0x22, 0x1c(%rsp)
je 0xf166c
cmpl $0x3c, 0x1c(%rsp)
je 0xf166c
cmpl $0x3e, 0x1c(%rsp)
je 0xf166c
cmpl $0x7c, 0x1c(%rsp)
jne 0xf1681
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf1759
jmp 0xf1683
leaq 0x28(%rsp), %rdi
callq 0xfb370
jmp 0xf1591
movq 0x118(%rsp), %rdi
callq 0x5a260
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xf16d1
movq 0x118(%rsp), %rdi
callq 0x5afd0
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xf16d1
movq 0x118(%rsp), %rdi
callq 0x5afd0
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xf16e3
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf1759
movq 0x118(%rsp), %rdi
leaq 0x11d6be(%rip), %rsi # 0x20edb0
xorl %eax, %eax
movl %eax, %edx
callq 0x5a060
cmpq $-0x1, %rax
je 0xf1713
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf1759
movq 0x118(%rsp), %rdi
leaq 0x11d68f(%rip), %rsi # 0x20edb1
callq 0x91240
movb %al, 0x7(%rsp)
jmp 0xf172d
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xf1737
jmp 0xf1749
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf1759
movb $0x1, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0xfb160
jmp 0xf1777
leaq 0xf8(%rsp), %rdi
callq 0xfb160
jmp 0xf1788
movb 0x127(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp # imm = 0x128
retq
movq 0x90(%rsp), %rdi
callq 0x5ac00
nopw %cs:(%rax,%rax)
|
_Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 128h
mov [rsp+128h+var_10], rdi
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rax, 0
jnz short loc_F13DF
mov [rsp+128h+var_1], 0
jmp loc_F1777
loc_F13DF:
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rax, 0FFh
jbe short loc_F1401
mov [rsp+128h+var_1], 0
jmp loc_F1777
loc_F1401:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2Ev; std::basic_string<char32_t>::basic_string(void)
lea rdi, [rsp+128h+var_90]; int
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void)
jmp short $+2
loc_F141D:
mov rdx, [rsp+128h+var_10]
lea rdi, [rsp+128h+var_C0]
lea rsi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&)
jmp short $+2
loc_F1439:
lea rdi, [rsp+128h+var_30]
mov [rsp+128h+var_118], rdi
lea rsi, [rsp+128h+var_C0]
mov [rsp+128h+var_120], rsi
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&)
mov rdi, [rsp+128h+var_120]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
mov rdx, [rsp+128h+var_118]
lea rdi, [rsp+128h+var_E0]
lea rsi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&)
jmp short $+2
loc_F1478:
mov rsi, [rsp+128h+var_10]
lea rdi, [rsp+128h+var_E0]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&)
test al, 1
jnz short loc_F1493
jmp loc_F1519
loc_F1493:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F1521
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
jmp short loc_F14DC
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
lea rdi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert()
loc_F14DC:
mov eax, [rsp+128h+var_9C]
mov ecx, 1
cmp eax, ecx
jnz loc_F1768
mov rdi, [rsp+128h+var_98]; void *
call ___cxa_begin_catch
mov [rsp+128h+var_F0], rax
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
call ___cxa_end_catch
jmp short loc_F1548
loc_F1519:
mov [rsp+128h+var_E4], 0
loc_F1521:
lea rdi, [rsp+128h+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert()
mov eax, [rsp+128h+var_E4]
test eax, eax
jnz loc_F1759
jmp short $+2
loc_F1546:
jmp short loc_F1566
loc_F1548:
jmp loc_F1759
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
jmp loc_F1768
loc_F1566:
lea rax, [rsp+128h+var_30]
mov [rsp+128h+var_F8], rax
mov rdi, [rsp+128h+var_F8]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE5beginEv; std::basic_string<char32_t>::begin(void)
mov [rsp+128h+var_100], rax
mov rdi, [rsp+128h+var_F8]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE3endEv; std::basic_string<char32_t>::end(void)
mov [rsp+128h+var_108], rax
loc_F1591:
lea rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_108]
call _ZN9__gnu_cxxneIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&,__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&)
test al, 1
jnz short loc_F15A9
jmp loc_F1692
loc_F15A9:
lea rdi, [rsp+128h+var_100]
call _ZNK9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEdeEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(void)
mov eax, [rax]
mov [rsp+128h+var_10C], eax
cmp [rsp+128h+var_10C], 1Fh
jbe loc_F166C
cmp [rsp+128h+var_10C], 7Fh
jz loc_F166C
cmp [rsp+128h+var_10C], 80h
jb short loc_F15E7
cmp [rsp+128h+var_10C], 9Fh
jbe loc_F166C
loc_F15E7:
cmp [rsp+128h+var_10C], 0FF0Eh
jz short loc_F166C
cmp [rsp+128h+var_10C], 2215h
jz short loc_F166C
cmp [rsp+128h+var_10C], 2216h
jz short loc_F166C
cmp [rsp+128h+var_10C], 0D800h
jb short loc_F1619
cmp [rsp+128h+var_10C], 0DFFFh
jbe short loc_F166C
loc_F1619:
cmp [rsp+128h+var_10C], 0FFFDh
jz short loc_F166C
cmp [rsp+128h+var_10C], 0FEFFh
jz short loc_F166C
cmp [rsp+128h+var_10C], 2Fh ; '/'
jz short loc_F166C
cmp [rsp+128h+var_10C], 5Ch ; '\'
jz short loc_F166C
cmp [rsp+128h+var_10C], 3Ah ; ':'
jz short loc_F166C
cmp [rsp+128h+var_10C], 2Ah ; '*'
jz short loc_F166C
cmp [rsp+128h+var_10C], 3Fh ; '?'
jz short loc_F166C
cmp [rsp+128h+var_10C], 22h ; '"'
jz short loc_F166C
cmp [rsp+128h+var_10C], 3Ch ; '<'
jz short loc_F166C
cmp [rsp+128h+var_10C], 3Eh ; '>'
jz short loc_F166C
cmp [rsp+128h+var_10C], 7Ch ; '|'
jnz short loc_F1681
loc_F166C:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp loc_F1759
loc_F1681:
jmp short $+2
loc_F1683:
lea rdi, [rsp+128h+var_100]
call _ZN9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEppEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(void)
jmp loc_F1591
loc_F1692:
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void)
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_F16D1
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void)
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_F16D1
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void)
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz short loc_F16E3
loc_F16D1:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F1759
loc_F16E3:
mov rdi, [rsp+128h+var_10]
lea rsi, aN0N1+7; ".."
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_F1713
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F1759
loc_F1713:
mov rdi, [rsp+128h+var_10]
lea rsi, aN0N1+8; "."
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+128h+var_121], al
jmp short $+2
loc_F172D:
mov al, [rsp+128h+var_121]
test al, 1
jnz short loc_F1737
jmp short loc_F1749
loc_F1737:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F1759
loc_F1749:
mov [rsp+128h+var_1], 1
mov [rsp+128h+var_E4], 1
loc_F1759:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
jmp short loc_F1777
loc_F1768:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
jmp short loc_F1788
loc_F1777:
mov al, [rsp+128h+var_1]
and al, 1
add rsp, 128h
retn
loc_F1788:
mov rdi, [rsp+128h+var_98]
call __Unwind_Resume
|
bool fs_validate_filename(long long a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+0h] [rbp-128h]
int v8; // [rsp+8h] [rbp-120h]
void *v9; // [rsp+10h] [rbp-118h]
int v10; // [rsp+18h] [rbp-110h]
unsigned int v11; // [rsp+1Ch] [rbp-10Ch]
long long v12; // [rsp+20h] [rbp-108h] BYREF
_QWORD v13[2]; // [rsp+28h] [rbp-100h] BYREF
int v14; // [rsp+44h] [rbp-E4h]
_BYTE v15[32]; // [rsp+48h] [rbp-E0h] BYREF
_BYTE v16[36]; // [rsp+68h] [rbp-C0h] BYREF
int v17[24]; // [rsp+98h] [rbp-90h] BYREF
_BYTE v18[32]; // [rsp+F8h] [rbp-30h] BYREF
long long v19; // [rsp+118h] [rbp-10h]
bool v20; // [rsp+127h] [rbp-1h]
v19 = a1;
if ( std::string::length(a1) )
{
if ( (unsigned long long)std::string::length(v19) <= 0xFF )
{
std::basic_string<char32_t>::basic_string(v18);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(
(int)v17,
a2,
v2,
v3,
v4,
v5,
v7,
v8,
v9,
v10,
v12);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(
v16,
v17,
v19);
std::basic_string<char32_t>::operator=();
std::basic_string<char32_t>::~basic_string(v16);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(
v15,
v17,
v18);
if ( (std::operator!=<char>(v15, v19) & 1) != 0 )
{
v20 = 0;
v14 = 1;
}
else
{
v14 = 0;
}
std::string::~string(v15);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v17);
if ( !v14 )
{
v13[1] = v18;
v13[0] = std::basic_string<char32_t>::begin(v18);
v12 = std::basic_string<char32_t>::end(v18);
while ( (__gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(v13, &v12) & 1) != 0 )
{
v11 = *(_DWORD *)__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(v13);
if ( v11 <= 0x1F
|| v11 == 127
|| v11 >= 0x80 && v11 <= 0x9F
|| v11 == 65294
|| v11 == 8725
|| v11 == 8726
|| v11 >= 0xD800 && v11 <= 0xDFFF
|| v11 == 65533
|| v11 == 65279
|| v11 == 47
|| v11 == 92
|| v11 == 58
|| v11 == 42
|| v11 == 63
|| v11 == 34
|| v11 == 60
|| v11 == 62
|| v11 == 124 )
{
v20 = 0;
v14 = 1;
goto LABEL_41;
}
__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(v13);
}
if ( *(_BYTE *)std::string::front(v19) == 32
|| *(_BYTE *)std::string::back(v19) == 32
|| *(_BYTE *)std::string::back(v19) == 46 )
{
v20 = 0;
v14 = 1;
}
else
{
v20 = std::string::find(v19, "..", 0LL) == -1 && !std::operator==<char>(v19, (long long)".");
v14 = 1;
}
}
LABEL_41:
std::basic_string<char32_t>::~basic_string(v18);
}
else
{
return 0;
}
}
else
{
return 0;
}
return v20;
}
|
fs_validate_filename:
SUB RSP,0x128
MOV qword ptr [RSP + 0x118],RDI
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015aa40
CMP RAX,0x0
JNZ 0x001f13df
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001f1777
LAB_001f13df:
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015aa40
CMP RAX,0xff
JBE 0x001f1401
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001f1777
LAB_001f1401:
LEA RDI,[RSP + 0xf8]
CALL 0x001fad60
LAB_001f140e:
LEA RDI,[RSP + 0x98]
CALL 0x001fade0
JMP 0x001f141d
LAB_001f141d:
MOV RDX,qword ptr [RSP + 0x118]
LAB_001f1425:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x98]
CALL 0x001faea0
JMP 0x001f1439
LAB_001f1439:
LEA RDI,[RSP + 0xf8]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x68]
MOV qword ptr [RSP + 0x8],RSI
CALL 0x001faf20
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001fb160
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x98]
CALL 0x001fb1a0
LAB_001f1476:
JMP 0x001f1478
LAB_001f1478:
MOV RSI,qword ptr [RSP + 0x118]
LEA RDI,[RSP + 0x48]
CALL 0x001fb220
TEST AL,0x1
JNZ 0x001f1493
JMP 0x001f1519
LAB_001f1493:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f1521
LAB_001f1519:
MOV dword ptr [RSP + 0x44],0x0
LAB_001f1521:
LEA RDI,[RSP + 0x48]
CALL 0x0015b648
LEA RDI,[RSP + 0x98]
CALL 0x001fb250
MOV EAX,dword ptr [RSP + 0x44]
TEST EAX,EAX
JNZ 0x001f1759
JMP 0x001f1546
LAB_001f1546:
JMP 0x001f1566
LAB_001f1566:
LEA RAX,[RSP + 0xf8]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001fb290
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001fb2c0
MOV qword ptr [RSP + 0x20],RAX
LAB_001f1591:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x001fb320
TEST AL,0x1
JNZ 0x001f15a9
JMP 0x001f1692
LAB_001f15a9:
LEA RDI,[RSP + 0x28]
CALL 0x001fb360
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x1f
JBE 0x001f166c
CMP dword ptr [RSP + 0x1c],0x7f
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x80
JC 0x001f15e7
CMP dword ptr [RSP + 0x1c],0x9f
JBE 0x001f166c
LAB_001f15e7:
CMP dword ptr [RSP + 0x1c],0xff0e
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x2215
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x2216
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0xd800
JC 0x001f1619
CMP dword ptr [RSP + 0x1c],0xdfff
JBE 0x001f166c
LAB_001f1619:
CMP dword ptr [RSP + 0x1c],0xfffd
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0xfeff
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x2f
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x5c
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x3a
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x2a
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x3f
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x22
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x3c
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x3e
JZ 0x001f166c
CMP dword ptr [RSP + 0x1c],0x7c
JNZ 0x001f1681
LAB_001f166c:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f1759
LAB_001f1681:
JMP 0x001f1683
LAB_001f1683:
LEA RDI,[RSP + 0x28]
CALL 0x001fb370
JMP 0x001f1591
LAB_001f1692:
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015a260
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001f16d1
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015afd0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001f16d1
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015afd0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001f16e3
LAB_001f16d1:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f1759
LAB_001f16e3:
MOV RDI,qword ptr [RSP + 0x118]
LEA RSI,[0x30edb0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015a060
CMP RAX,-0x1
JZ 0x001f1713
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f1759
LAB_001f1713:
MOV RDI,qword ptr [RSP + 0x118]
LEA RSI,[0x30edb1]
CALL 0x00191240
LAB_001f1727:
MOV byte ptr [RSP + 0x7],AL
JMP 0x001f172d
LAB_001f172d:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001f1737
JMP 0x001f1749
LAB_001f1737:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f1759
LAB_001f1749:
MOV byte ptr [RSP + 0x127],0x1
MOV dword ptr [RSP + 0x44],0x1
LAB_001f1759:
LEA RDI,[RSP + 0xf8]
CALL 0x001fb160
JMP 0x001f1777
LAB_001f1777:
MOV AL,byte ptr [RSP + 0x127]
AND AL,0x1
ADD RSP,0x128
RET
|
/* fs_validate_filename(std::__cxx11::string const&) */
ulong fs_validate_filename(string *param_1)
{
uint uVar1;
bool bVar2;
long lVar3;
ulong uVar4;
uint *puVar5;
char *pcVar6;
int8 local_108;
int8 local_100;
u32string *local_f8;
uint local_e4;
u32string local_e0 [32];
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
local_c0 [48];
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
local_90 [96];
u32string local_30 [32];
string *local_10;
int1 local_1;
local_10 = param_1;
lVar3 = std::__cxx11::string::length();
if (lVar3 == 0) {
local_1 = 0;
uVar4 = 0;
}
else {
uVar4 = std::__cxx11::string::length();
if (uVar4 < 0x100) {
std::__cxx11::u32string::u32string(local_30);
/* try { // try from 001f140e to 001f141a has its CatchHandler @ 001f14a5 */
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::wstring_convert(local_90);
/* try { // try from 001f1425 to 001f1475 has its CatchHandler @ 001f14bb */
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::from_bytes(local_c0,(string *)local_90);
std::__cxx11::u32string::operator=(local_30,(u32string *)local_c0);
std::__cxx11::u32string::~u32string((u32string *)local_c0);
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::to_bytes(local_e0);
bVar2 = std::operator!=((string *)local_e0,local_10);
if (bVar2) {
local_1 = 0;
}
local_e4 = (uint)bVar2;
std::__cxx11::string::~string((string *)local_e0);
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::~wstring_convert(local_90);
if (local_e4 == 0) {
local_f8 = local_30;
local_100 = std::__cxx11::u32string::begin(local_f8);
local_108 = std::__cxx11::u32string::end(local_f8);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_100,(__normal_iterator *)&local_108),
bVar2) {
puVar5 = (uint *)__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::
operator*((__normal_iterator<char32_t*,std::__cxx11::u32string> *)
&local_100);
uVar1 = *puVar5;
if ((((((uVar1 < 0x20) || (uVar1 == 0x7f)) || ((0x7f < uVar1 && (uVar1 < 0xa0)))) ||
((uVar1 == 0xff0e || (uVar1 == 0x2215)))) ||
((uVar1 == 0x2216 ||
((((0xd7ff < uVar1 && (uVar1 < 0xe000)) || (uVar1 == 0xfffd)) ||
(((uVar1 == 0xfeff || (uVar1 == 0x2f)) ||
((uVar1 == 0x5c || ((uVar1 == 0x3a || (uVar1 == 0x2a)))))))))))) ||
((uVar1 == 0x3f ||
((((uVar1 == 0x22 || (uVar1 == 0x3c)) || (uVar1 == 0x3e)) || (uVar1 == 0x7c)))))) {
local_1 = 0;
local_e4 = 1;
goto LAB_001f1759;
}
__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::operator++
((__normal_iterator<char32_t*,std::__cxx11::u32string> *)&local_100);
}
pcVar6 = (char *)std::__cxx11::string::front();
if (((*pcVar6 == ' ') || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == ' ')) ||
(pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == '.')) {
local_1 = 0;
local_e4 = 1;
}
else {
lVar3 = std::__cxx11::string::find((char *)local_10,0x30edb0);
if (lVar3 == -1) {
bVar2 = std::operator==(local_10,".");
if (bVar2) {
local_1 = 0;
local_e4 = 1;
}
else {
local_1 = 1;
local_e4 = 1;
}
}
else {
local_1 = 0;
local_e4 = 1;
}
}
}
LAB_001f1759:
uVar4 = std::__cxx11::u32string::~u32string(local_30);
}
else {
local_1 = 0;
}
}
return CONCAT71((int7)(uVar4 >> 8),local_1) & 0xffffffffffffff01;
}
|
|
14,091
|
coro::net::make_socket(coro::net::socket::options const&)
|
AlayaLite/build_O3/_deps/libcoro-src/src/net/socket.cpp
|
auto make_socket(const socket::options& opts) -> socket
{
socket s{::socket(static_cast<int>(opts.domain), socket::type_to_os(opts.type), 0)};
if (s.native_handle() < 0)
{
throw std::runtime_error{"Failed to create socket."};
}
if (opts.blocking == socket::blocking_t::no)
{
if (s.blocking(socket::blocking_t::no) == false)
{
throw std::runtime_error{"Failed to set socket to non-blocking mode."};
}
}
return s;
}
|
O3
|
cpp
|
coro::net::make_socket(coro::net::socket::options const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ebp
movl 0x4(%rsi), %edi
callq 0x89f8
movl %ebp, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x3080
movl %eax, (%rbx)
testl %eax, %eax
js 0x8b97
cmpl $0x1, 0x8(%r14)
jne 0x8b89
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8ac2
testb %al, %al
je 0x8bb5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1a23(%rip), %rsi # 0xa5ce
movq %rax, %rdi
callq 0x3100
jmp 0x8bd1
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1a1e(%rip), %rsi # 0xa5e7
movq %rax, %rdi
callq 0x3100
movq 0x7418(%rip), %rsi # 0xfff0
movq 0x73b9(%rip), %rdx # 0xff98
movq %r14, %rdi
callq 0x3410
jmp 0x8be9
movq %rax, %r15
movq %r14, %rdi
callq 0x3200
jmp 0x8bf9
movq %rax, %r15
movq %rbx, %rdi
callq 0x8d50
movq %r15, %rdi
callq 0x3430
|
_ZN4coro3net11make_socketERKNS0_6socket7optionsE:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov ebp, [rsi]
mov edi, [rsi+4]
call _ZN4coro3net6socket10type_to_osENS1_6type_tE; coro::net::socket::type_to_os(coro::net::socket::type_t)
mov edi, ebp
mov esi, eax
xor edx, edx
call _socket
mov [rbx], eax
test eax, eax
js short loc_8B97
cmp dword ptr [r14+8], 1
jnz short loc_8B89
mov rdi, rbx
mov esi, 1
call _ZN4coro3net6socket8blockingENS1_10blocking_tE; coro::net::socket::blocking(coro::net::socket::blocking_t)
test al, al
jz short loc_8BB5
loc_8B89:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8B97:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFailedToCreate; "Failed to create socket."
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_8BD1
loc_8BB5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFailedToSetSoc; "Failed to set socket to non-blocking mo"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_8BD1:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_8BE9:
mov r15, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_8BF9
mov r15, rax
loc_8BF9:
mov rdi, rbx; this
call _ZN4coro3net6socketD2Ev; coro::net::socket::~socket()
mov rdi, r15
call __Unwind_Resume
|
unsigned int * coro::net::make_socket(unsigned int *a1, unsigned int *a2)
{
unsigned int v2; // ebp
unsigned int v3; // eax
int v4; // eax
std::runtime_error *exception; // r14
v2 = *a2;
v3 = coro::net::socket::type_to_os(a2[1]);
v4 = socket(v2, v3, 0LL);
*a1 = v4;
if ( v4 < 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Failed to create socket.");
goto LABEL_7;
}
if ( a2[2] == 1 && !(unsigned __int8)coro::net::socket::blocking(a1, 1) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Failed to set socket to non-blocking mode.");
LABEL_7:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1;
}
|
make_socket:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EBP,dword ptr [RSI]
MOV EDI,dword ptr [RSI + 0x4]
CALL 0x001089f8
MOV EDI,EBP
MOV ESI,EAX
XOR EDX,EDX
CALL 0x00103080
MOV dword ptr [RBX],EAX
TEST EAX,EAX
JS 0x00108b97
CMP dword ptr [R14 + 0x8],0x1
JNZ 0x00108b89
LAB_00108b78:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00108ac2
LAB_00108b85:
TEST AL,AL
JZ 0x00108bb5
LAB_00108b89:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00108b97:
MOV EDI,0x10
CALL 0x00103150
MOV R14,RAX
LAB_00108ba4:
LEA RSI,[0x10a5ce]
MOV RDI,RAX
CALL 0x00103100
LAB_00108bb3:
JMP 0x00108bd1
LAB_00108bb5:
MOV EDI,0x10
CALL 0x00103150
MOV R14,RAX
LAB_00108bc2:
LEA RSI,[0x10a5e7]
MOV RDI,RAX
CALL 0x00103100
LAB_00108bd1:
MOV RSI,qword ptr [0x0010fff0]
MOV RDX,qword ptr [0x0010ff98]
MOV RDI,R14
CALL 0x00103410
|
/* coro::net::make_socket(coro::net::socket::options const&) */
net * __thiscall coro::net::make_socket(net *this,options *param_1)
{
char cVar1;
int __type;
int iVar2;
runtime_error *this_00;
iVar2 = *(int *)param_1;
__type = socket::type_to_os(*(int4 *)(param_1 + 4));
iVar2 = ::socket(iVar2,__type,0);
*(int *)this = iVar2;
if (iVar2 < 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00108ba4 to 00108bb2 has its CatchHandler @ 00108be9 */
std::runtime_error::runtime_error(this_00,"Failed to create socket.");
LAB_00108bd1:
/* try { // try from 00108bd1 to 00108be6 has its CatchHandler @ 00108bf6 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0010fff0,PTR__runtime_error_0010ff98);
}
if (*(int *)(param_1 + 8) == 1) {
/* try { // try from 00108b78 to 00108b84 has its CatchHandler @ 00108bf6 */
cVar1 = socket::blocking((socket *)this,1);
if (cVar1 == '\0') {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00108bc2 to 00108bd0 has its CatchHandler @ 00108be7 */
std::runtime_error::runtime_error(this_00,"Failed to set socket to non-blocking mode.");
goto LAB_00108bd1;
}
}
return this;
}
|
|
14,092
|
MNN::Express::Executor::RuntimeManager::setCache(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)
|
mnn-tts/MNN/express/Executor.cpp
|
void Executor::RuntimeManager::setCache(std::string cacheName) {
std::lock_guard<std::mutex> _l(mLock);
mInside->mCache.reset(new Cache);
mInside->mCache->cacheFile = cacheName;
if (nullptr == mInside->mCache->cacheFile.c_str()) {
MNN_ERROR("Empty cacheFile\n");
return;
}
std::unique_ptr<FileLoader> loader(new FileLoader(mInside->mCache->cacheFile.c_str(), true));
if (!loader->valid()) {
MNN_ERROR("Load Cache file error.\n");
return;
}
bool result = loader->read();
if (!result) {
MNN_ERROR("Load Cache file error.\n");
return;
}
if (loader->size() == 0) {
MNN_ERROR("Load Cache file error.\n");
return;
}
bool success = loader->merge(mInside->mCache->cacheBuffer);
if (!success) {
MNN_ERROR("Alloc memory for Cache error.\n");
return;
}
// load cache
bool valid = loadCache(mInside->mInfo, mInside->mCache->cacheBuffer.get() + mInside->mCache->cacheOffset,
mInside->mCache->cacheBuffer.size() - mInside->mCache->cacheOffset);
if(!valid) {
// Reset cache
loadCache(mInside->mInfo, nullptr, 0);
MNN_PRINT("Cache invalid, will be reset\n");
} else {
mInside->mCache->lastCacheSize = mInside->mCache->cacheBuffer.size() - mInside->mCache->cacheOffset;
}
}
|
O0
|
cpp
|
MNN::Express::Executor::RuntimeManager::setCache(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>):
subq $0x98, %rsp
movq %rsi, 0x58(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rsi
movq %rsi, 0x60(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x12fa0
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rax
addq $0x48, %rax
movq %rax, 0x48(%rsp)
movl $0x48, %edi
callq 0x123b0
movq %rax, %rdi
movq %rdi, 0x50(%rsp)
callq 0x15db0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x15d60
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x58(%rsp), %rsi
movq %rax, %rdi
addq $0x28, %rdi
callq 0x12bc0
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq %rax, %rdi
addq $0x28, %rdi
callq 0x15e10
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x15aa4
leaq 0xf4755(%rip), %rdi # 0x10a1e5
movb $0x0, %al
callq 0x12060
movl $0x1, 0x7c(%rsp)
jmp 0x15d46
movl $0x50, %edi
callq 0x123b0
movq %rax, %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x40(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq %rax, %rdi
addq $0x28, %rdi
callq 0x15e10
movq 0x40(%rsp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x12ab0
movq 0x40(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x15e20
leaq 0x70(%rsp), %rdi
callq 0x15e40
movq %rax, %rdi
callq 0x15e50
testb $0x1, %al
jne 0x15b26
leaq 0xf46e4(%rip), %rdi # 0x10a1f6
movb $0x0, %al
callq 0x12060
movl $0x1, 0x7c(%rsp)
jmp 0x15d3c
leaq 0x70(%rsp), %rdi
callq 0x15e40
movq %rax, %rdi
callq 0x12150
andb $0x1, %al
movb %al, 0x6f(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x15b60
leaq 0xf46aa(%rip), %rdi # 0x10a1f6
movb $0x0, %al
callq 0x12060
movl $0x1, 0x7c(%rsp)
jmp 0x15d3c
leaq 0x70(%rsp), %rdi
callq 0x15e40
movq %rax, %rdi
callq 0x15e70
cmpq $0x0, %rax
jne 0x15b93
leaq 0xf4677(%rip), %rdi # 0x10a1f6
movb $0x0, %al
callq 0x12060
movl $0x1, 0x7c(%rsp)
jmp 0x15d3c
leaq 0x70(%rsp), %rdi
callq 0x15e40
movq %rax, %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x38(%rsp), %rdi
movq %rax, %rsi
addq $0x10, %rsi
callq 0x12830
andb $0x1, %al
movb %al, 0x6e(%rsp)
testb $0x1, 0x6e(%rsp)
jne 0x15bf0
leaq 0xf4632(%rip), %rdi # 0x10a20e
movb $0x0, %al
callq 0x12060
movl $0x1, 0x7c(%rsp)
jmp 0x15d3c
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rcx
addq $0x38, %rcx
movq %rcx, 0x28(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq %rax, %rdi
addq $0x10, %rdi
callq 0x15ee0
movq %rax, %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x18(%rsp), %rcx
movq %rax, %rdx
movq 0x60(%rsp), %rax
addq 0x20(%rdx), %rcx
movq %rcx, 0x30(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq %rax, %rdi
addq $0x10, %rdi
callq 0x15ef0
movl %eax, %ecx
movq 0x60(%rsp), %rax
movslq %ecx, %rcx
movq %rcx, 0x20(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
subq 0x20(%rax), %rdx
callq 0x15e80
andb $0x1, %al
movb %al, 0x6d(%rsp)
testb $0x1, 0x6d(%rsp)
jne 0x15cce
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x15e80
leaq 0xf4568(%rip), %rdi # 0x10a22d
movb $0x0, %al
callq 0x12060
jmp 0x15d34
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq %rax, %rdi
addq $0x10, %rdi
callq 0x15ef0
movl %eax, %ecx
movq 0x60(%rsp), %rax
movslq %ecx, %rcx
movq %rcx, 0x8(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x8(%rsp), %rcx
movq %rax, %rdx
movq 0x60(%rsp), %rax
subq 0x20(%rdx), %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rax), %rdi
addq $0x48, %rdi
callq 0x15e00
movq 0x10(%rsp), %rcx
movq %rcx, 0x40(%rax)
movl $0x0, 0x7c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x15f00
leaq 0x80(%rsp), %rdi
callq 0x13300
addq $0x98, %rsp
retq
nopl (%rax,%rax)
|
_ZN3MNN7Express8Executor14RuntimeManager8setCacheENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
sub rsp, 98h
mov [rsp+98h+var_40], rsi
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov rsi, [rsp+98h+var_8]
mov [rsp+98h+var_38], rsi
lea rdi, [rsp+98h+var_18]
call _ZNSt3__110lock_guardINS_5mutexEEC2B8nn200100ERS1_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rax, [rsp+98h+var_38]
mov rax, [rax+28h]
add rax, 48h ; 'H'
mov [rsp+98h+var_50], rax
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov [rsp+98h+var_48], rdi
call _ZN3MNN7Express5CacheC2Ev; MNN::Express::Cache::Cache(void)
mov rdi, [rsp+98h+var_50]
mov rsi, [rsp+98h+var_48]
call _ZNSt3__110shared_ptrIN3MNN7Express5CacheEE5resetB8nn200100IS3_TnNS_9enable_ifIXsr29__raw_pointer_compatible_withIT_S3_EE5valueEiE4typeELi0EEEvPS7_
mov rax, [rsp+98h+var_38]
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rsi, [rsp+98h+var_40]
mov rdi, rax
add rdi, 28h ; '('
call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&)
mov rax, [rsp+98h+var_38]
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, rax
add rdi, 28h ; '('
call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strB8nn200100Ev; std::string::c_str(void)
mov rcx, rax
xor eax, eax
cmp rax, rcx
jnz short loc_15AA4
lea rdi, aEmptyCachefile; "Empty cacheFile\n"
mov al, 0
call _printf
mov [rsp+98h+var_1C], 1
jmp loc_15D46
loc_15AA4:
mov edi, 50h ; 'P'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov rax, [rsp+98h+var_38]
mov [rsp+98h+var_58], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, rax
add rdi, 28h ; '('
call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strB8nn200100Ev; std::string::c_str(void)
mov rdi, [rsp+98h+var_58]; this
mov rsi, rax; char *
mov edx, 1; bool
call __ZN3MNN10FileLoaderC1EPKcb; MNN::FileLoader::FileLoader(char const*,bool)
mov rsi, [rsp+98h+var_58]
lea rdi, [rsp+98h+var_28]
call _ZNSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::FileLoader>::unique_ptr<true,void>(MNN::FileLoader*)
lea rdi, [rsp+98h+var_28]
call _ZNKSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEptB8nn200100Ev; std::unique_ptr<MNN::FileLoader>::operator->(void)
mov rdi, rax; this
call _ZNK3MNN10FileLoader5validEv; MNN::FileLoader::valid(void)
test al, 1
jnz short loc_15B26
lea rdi, aLoadCacheFileE; "Load Cache file error.\n"
mov al, 0
call _printf
mov [rsp+98h+var_1C], 1
jmp loc_15D3C
loc_15B26:
lea rdi, [rsp+98h+var_28]
call _ZNKSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEptB8nn200100Ev; std::unique_ptr<MNN::FileLoader>::operator->(void)
mov rdi, rax; this
call __ZN3MNN10FileLoader4readEv; MNN::FileLoader::read(void)
and al, 1
mov [rsp+98h+var_29], al
test [rsp+98h+var_29], 1
jnz short loc_15B60
lea rdi, aLoadCacheFileE; "Load Cache file error.\n"
mov al, 0
call _printf
mov [rsp+98h+var_1C], 1
jmp loc_15D3C
loc_15B60:
lea rdi, [rsp+98h+var_28]
call _ZNKSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEptB8nn200100Ev; std::unique_ptr<MNN::FileLoader>::operator->(void)
mov rdi, rax; this
call _ZNK3MNN10FileLoader4sizeEv; MNN::FileLoader::size(void)
cmp rax, 0
jnz short loc_15B93
lea rdi, aLoadCacheFileE; "Load Cache file error.\n"
mov al, 0
call _printf
mov [rsp+98h+var_1C], 1
jmp loc_15D3C
loc_15B93:
lea rdi, [rsp+98h+var_28]
call _ZNKSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEptB8nn200100Ev; std::unique_ptr<MNN::FileLoader>::operator->(void)
mov rcx, rax
mov rax, [rsp+98h+var_38]
mov [rsp+98h+var_60], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, [rsp+98h+var_60]
mov rsi, rax
add rsi, 10h
call __ZN3MNN10FileLoader5mergeERNS_11AutoStorageIhEE; MNN::FileLoader::merge(MNN::AutoStorage<uchar> &)
and al, 1
mov [rsp+98h+var_2A], al
test [rsp+98h+var_2A], 1
jnz short loc_15BF0
lea rdi, aAllocMemoryFor; "Alloc memory for Cache error.\n"
mov al, 0
call _printf
mov [rsp+98h+var_1C], 1
jmp loc_15D3C
loc_15BF0:
mov rax, [rsp+98h+var_38]
mov rcx, [rax+28h]
add rcx, 38h ; '8'
mov [rsp+98h+var_70], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, rax
add rdi, 10h
call _ZNK3MNN11AutoStorageIhE3getEv; MNN::AutoStorage<uchar>::get(void)
mov rcx, rax
mov rax, [rsp+98h+var_38]
mov [rsp+98h+var_80], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rcx, [rsp+98h+var_80]
mov rdx, rax
mov rax, [rsp+98h+var_38]
add rcx, [rdx+20h]
mov [rsp+98h+var_68], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, rax
add rdi, 10h
call _ZNK3MNN11AutoStorageIhE4sizeEv; MNN::AutoStorage<uchar>::size(void)
mov ecx, eax
mov rax, [rsp+98h+var_38]
movsxd rcx, ecx
mov [rsp+98h+var_78], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdx, [rsp+98h+var_78]
mov rdi, [rsp+98h+var_70]
mov rsi, [rsp+98h+var_68]
sub rdx, [rax+20h]
call _ZN3MNN7ExpressL9loadCacheERNSt3__110shared_ptrINS_7RuntimeEEEPKvm; MNN::Express::loadCache(std::shared_ptr<MNN::Runtime> &,void const*,ulong)
and al, 1
mov [rsp+98h+var_2B], al
test [rsp+98h+var_2B], 1
jnz short loc_15CCE
mov rax, [rsp+98h+var_38]
mov rdi, [rax+28h]
add rdi, 38h ; '8'
xor eax, eax
mov edx, eax
mov rsi, rdx
call _ZN3MNN7ExpressL9loadCacheERNSt3__110shared_ptrINS_7RuntimeEEEPKvm; MNN::Express::loadCache(std::shared_ptr<MNN::Runtime> &,void const*,ulong)
lea rdi, aCacheInvalidWi; "Cache invalid, will be reset\n"
mov al, 0
call _printf
jmp short loc_15D34
loc_15CCE:
mov rax, [rsp+98h+var_38]
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rdi, rax
add rdi, 10h
call _ZNK3MNN11AutoStorageIhE4sizeEv; MNN::AutoStorage<uchar>::size(void)
mov ecx, eax
mov rax, [rsp+98h+var_38]
movsxd rcx, ecx
mov [rsp+98h+var_90], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rcx, [rsp+98h+var_90]
mov rdx, rax
mov rax, [rsp+98h+var_38]
sub rcx, [rdx+20h]
mov [rsp+98h+var_88], rcx
mov rdi, [rax+28h]
add rdi, 48h ; 'H'
call _ZNKSt3__110shared_ptrIN3MNN7Express5CacheEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Cache>::operator->(void)
mov rcx, [rsp+98h+var_88]
mov [rax+40h], rcx
loc_15D34:
mov [rsp+98h+var_1C], 0
loc_15D3C:
lea rdi, [rsp+98h+var_28]
call _ZNSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::FileLoader>::~unique_ptr()
loc_15D46:
lea rdi, [rsp+98h+var_18]
call _ZNSt3__110lock_guardINS_5mutexEED2B8nn200100Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 98h
retn
|
std::mutex ** MNN::Express::Executor::RuntimeManager::setCache(std::mutex *a1, std::mutex *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
const char *v5; // rax
MNN::FileLoader *v6; // rax
MNN::FileLoader *v7; // rax
MNN::FileLoader *v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v15; // [rsp+8h] [rbp-90h]
long long v16; // [rsp+10h] [rbp-88h]
long long v17; // [rsp+18h] [rbp-80h]
long long v18; // [rsp+20h] [rbp-78h]
long long v19; // [rsp+28h] [rbp-70h]
long long v20; // [rsp+30h] [rbp-68h]
long long v21; // [rsp+38h] [rbp-60h]
MNN::FileLoader *v22; // [rsp+40h] [rbp-58h]
long long v23; // [rsp+48h] [rbp-50h]
MNN::Express::Cache *v24; // [rsp+50h] [rbp-48h]
_BYTE v25[12]; // [rsp+70h] [rbp-28h] BYREF
int v26; // [rsp+7Ch] [rbp-1Ch]
std::mutex *v27[3]; // [rsp+80h] [rbp-18h] BYREF
v27[2] = a1;
v27[1] = a2;
std::lock_guard<std::mutex>::lock_guard[abi:nn200100](v27, a1);
v23 = *((_QWORD *)a1 + 5) + 72LL;
v24 = (MNN::Express::Cache *)operator new(0x48uLL);
MNN::Express::Cache::Cache(v24);
ZNSt3__110shared_ptrIN3MNN7Express5CacheEE5resetB8nn200100IS3_TnNS_9enable_ifIXsr29__raw_pointer_compatible_withIT_S3_EE5valueEiE4typeELi0EEEvPS7_(
v23,
v24);
v2 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
std::string::operator=(v2 + 40, a2);
v3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
if ( std::string::c_str[abi:nn200100](v3 + 40) )
{
v22 = (MNN::FileLoader *)operator new(0x50uLL);
v4 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
v5 = (const char *)std::string::c_str[abi:nn200100](v4 + 40);
MNN::FileLoader::FileLoader(v22, v5, 1);
std::unique_ptr<MNN::FileLoader>::unique_ptr[abi:nn200100]<true,void>(v25, v22);
v6 = (MNN::FileLoader *)std::unique_ptr<MNN::FileLoader>::operator->[abi:nn200100](v25);
if ( (MNN::FileLoader::valid(v6) & 1) != 0
&& (v7 = (MNN::FileLoader *)std::unique_ptr<MNN::FileLoader>::operator->[abi:nn200100](v25),
(MNN::FileLoader::read(v7) & 1) != 0)
&& (v8 = (MNN::FileLoader *)std::unique_ptr<MNN::FileLoader>::operator->[abi:nn200100](v25),
MNN::FileLoader::size(v8)) )
{
v21 = std::unique_ptr<MNN::FileLoader>::operator->[abi:nn200100](v25);
v9 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
if ( (MNN::FileLoader::merge(v21, v9 + 16) & 1) != 0 )
{
v19 = *((_QWORD *)a1 + 5) + 56LL;
v10 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
v17 = MNN::AutoStorage<unsigned char>::get(v10 + 16);
v20 = *(_QWORD *)(std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL) + 32)
+ v17;
v11 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
v18 = (int)MNN::AutoStorage<unsigned char>::size(v11 + 16);
v12 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
if ( (MNN::Express::loadCache(v19, v20, v18 - *(_QWORD *)(v12 + 32)) & 1) != 0 )
{
v13 = std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL);
v15 = (int)MNN::AutoStorage<unsigned char>::size(v13 + 16);
v16 = v15
- *(_QWORD *)(std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL)
+ 32);
*(_QWORD *)(std::shared_ptr<MNN::Express::Cache>::operator->[abi:nn200100](*((_QWORD *)a1 + 5) + 72LL) + 64) = v16;
}
else
{
MNN::Express::loadCache(*((_QWORD *)a1 + 5) + 56LL, 0LL, 0LL);
printf("Cache invalid, will be reset\n");
}
v26 = 0;
}
else
{
printf("Alloc memory for Cache error.\n");
v26 = 1;
}
}
else
{
printf("Load Cache file error.\n");
v26 = 1;
}
std::unique_ptr<MNN::FileLoader>::~unique_ptr[abi:nn200100](v25);
}
else
{
printf("Empty cacheFile\n");
v26 = 1;
}
return std::lock_guard<std::mutex>::~lock_guard[abi:nn200100](v27);
}
|
setCache:
SUB RSP,0x98
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV RSI,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x60],RSI
LEA RDI,[RSP + 0x80]
CALL 0x00112fa0
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX + 0x28]
ADD RAX,0x48
MOV qword ptr [RSP + 0x48],RAX
MOV EDI,0x48
CALL 0x001123b0
MOV RDI,RAX
MOV qword ptr [RSP + 0x50],RDI
CALL 0x00115db0
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00115d60
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RSI,qword ptr [RSP + 0x58]
MOV RDI,RAX
ADD RDI,0x28
CALL 0x00112bc0
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,RAX
ADD RDI,0x28
CALL 0x00115e10
MOV RCX,RAX
XOR EAX,EAX
CMP RAX,RCX
JNZ 0x00115aa4
LEA RDI,[0x20a1e5]
MOV AL,0x0
CALL 0x00112060
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x00115d46
LAB_00115aa4:
MOV EDI,0x50
CALL 0x001123b0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x40],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,RAX
ADD RDI,0x28
CALL 0x00115e10
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,RAX
MOV EDX,0x1
CALL 0x00112ab0
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x70]
CALL 0x00115e20
LEA RDI,[RSP + 0x70]
CALL 0x00115e40
MOV RDI,RAX
CALL 0x00115e50
TEST AL,0x1
JNZ 0x00115b26
LEA RDI,[0x20a1f6]
MOV AL,0x0
CALL 0x00112060
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x00115d3c
LAB_00115b26:
LEA RDI,[RSP + 0x70]
CALL 0x00115e40
MOV RDI,RAX
CALL 0x00112150
AND AL,0x1
MOV byte ptr [RSP + 0x6f],AL
TEST byte ptr [RSP + 0x6f],0x1
JNZ 0x00115b60
LEA RDI,[0x20a1f6]
MOV AL,0x0
CALL 0x00112060
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x00115d3c
LAB_00115b60:
LEA RDI,[RSP + 0x70]
CALL 0x00115e40
MOV RDI,RAX
CALL 0x00115e70
CMP RAX,0x0
JNZ 0x00115b93
LEA RDI,[0x20a1f6]
MOV AL,0x0
CALL 0x00112060
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x00115d3c
LAB_00115b93:
LEA RDI,[RSP + 0x70]
CALL 0x00115e40
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,RAX
ADD RSI,0x10
CALL 0x00112830
AND AL,0x1
MOV byte ptr [RSP + 0x6e],AL
TEST byte ptr [RSP + 0x6e],0x1
JNZ 0x00115bf0
LEA RDI,[0x20a20e]
MOV AL,0x0
CALL 0x00112060
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x00115d3c
LAB_00115bf0:
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RAX + 0x28]
ADD RCX,0x38
MOV qword ptr [RSP + 0x28],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,RAX
ADD RDI,0x10
CALL 0x00115ee0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x18],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x60]
ADD RCX,qword ptr [RDX + 0x20]
MOV qword ptr [RSP + 0x30],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,RAX
ADD RDI,0x10
CALL 0x00115ef0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RCX,ECX
MOV qword ptr [RSP + 0x20],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
SUB RDX,qword ptr [RAX + 0x20]
CALL 0x00115e80
AND AL,0x1
MOV byte ptr [RSP + 0x6d],AL
TEST byte ptr [RSP + 0x6d],0x1
JNZ 0x00115cce
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x38
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x00115e80
LEA RDI,[0x20a22d]
MOV AL,0x0
CALL 0x00112060
JMP 0x00115d34
LAB_00115cce:
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RDI,RAX
ADD RDI,0x10
CALL 0x00115ef0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RCX,ECX
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x60]
SUB RCX,qword ptr [RDX + 0x20]
MOV qword ptr [RSP + 0x10],RCX
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x48
CALL 0x00115e00
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x40],RCX
LAB_00115d34:
MOV dword ptr [RSP + 0x7c],0x0
LAB_00115d3c:
LEA RDI,[RSP + 0x70]
CALL 0x00115f00
LAB_00115d46:
LEA RDI,[RSP + 0x80]
CALL 0x00113300
ADD RSP,0x98
RET
|
/* MNN::Express::Executor::RuntimeManager::setCache(std::string) */
void __thiscall
MNN::Express::Executor::RuntimeManager::setCache(RuntimeManager *this,string *param_2)
{
byte bVar1;
int iVar2;
Cache *this_00;
long lVar3;
FileLoader *pFVar4;
char *pcVar5;
ulong uVar6;
AutoStorage *pAVar7;
long lVar8;
long lVar9;
long lVar10;
FileLoader>> local_28 [12];
int4 local_1c;
lock_guard<std::mutex> local_18 [8];
string *local_10;
RuntimeManager *local_8;
local_10 = param_2;
local_8 = this;
std::lock_guard<std::mutex>::lock_guard_abi_nn200100_(local_18,(mutex *)this);
lVar3 = *(long *)(this + 0x28);
this_00 = (Cache *)operator_new(0x48);
Cache::Cache(this_00);
_ZNSt3__110shared_ptrIN3MNN7Express5CacheEE5resetB8nn200100IS3_TnNS_9enable_ifIXsr29__raw_pointer_compatible_withIT_S3_EE5valueEiE4typeELi0EEEvPS7_
(lVar3 + 0x48,this_00);
lVar3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
std::string::operator=((string *)(lVar3 + 0x28),param_2);
lVar3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
lVar3 = std::string::c_str_abi_nn200100_((string *)(lVar3 + 0x28));
if (lVar3 == 0) {
printf("Empty cacheFile\n");
local_1c = 1;
}
else {
pFVar4 = (FileLoader *)operator_new(0x50);
lVar3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
pcVar5 = (char *)std::string::c_str_abi_nn200100_((string *)(lVar3 + 0x28));
MNN::FileLoader::FileLoader(pFVar4,pcVar5,true);
_ZNSt3__110unique_ptrIN3MNN10FileLoaderENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_28,pFVar4);
pFVar4 = (FileLoader *)
std::unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>>::
operator->[abi_nn200100_(local_28);
uVar6 = FileLoader::valid(pFVar4);
if ((uVar6 & 1) == 0) {
printf("Load Cache file error.\n");
local_1c = 1;
}
else {
std::unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>>::
operator->[abi_nn200100_(local_28);
bVar1 = MNN::FileLoader::read();
if ((bVar1 & 1) == 0) {
printf("Load Cache file error.\n");
local_1c = 1;
}
else {
pFVar4 = (FileLoader *)
std::unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>>::
operator->[abi_nn200100_(local_28);
lVar3 = FileLoader::size(pFVar4);
if (lVar3 == 0) {
printf("Load Cache file error.\n");
local_1c = 1;
}
else {
pAVar7 = (AutoStorage *)
std::unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>>::
operator->[abi_nn200100_(local_28);
std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
bVar1 = MNN::FileLoader::merge(pAVar7);
if ((bVar1 & 1) == 0) {
printf("Alloc memory for Cache error.\n");
local_1c = 1;
}
else {
lVar3 = *(long *)(this + 0x28);
lVar8 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
lVar9 = AutoStorage<unsigned_char>::get((AutoStorage<unsigned_char> *)(lVar8 + 0x10));
lVar8 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
lVar8 = *(long *)(lVar8 + 0x20);
lVar10 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
iVar2 = AutoStorage<unsigned_char>::size((AutoStorage<unsigned_char> *)(lVar10 + 0x10));
lVar10 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
bVar1 = loadCache((shared_ptr *)(lVar3 + 0x38),(void *)(lVar9 + lVar8),
(long)iVar2 - *(long *)(lVar10 + 0x20));
if ((bVar1 & 1) == 0) {
loadCache((shared_ptr *)(*(long *)(this + 0x28) + 0x38),(void *)0x0,0);
printf("Cache invalid, will be reset\n");
}
else {
lVar3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
iVar2 = AutoStorage<unsigned_char>::size((AutoStorage<unsigned_char> *)(lVar3 + 0x10))
;
lVar3 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
lVar3 = *(long *)(lVar3 + 0x20);
lVar8 = std::shared_ptr<MNN::Express::Cache>::operator->[abi_nn200100_
((Cache> *)(*(long *)(this + 0x28) + 0x48));
*(long *)(lVar8 + 0x40) = iVar2 - lVar3;
}
local_1c = 0;
}
}
}
}
std::unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>>::~unique_ptr_abi_nn200100_
((unique_ptr<MNN::FileLoader,std::default_delete<MNN::FileLoader>> *)local_28);
}
std::lock_guard<std::mutex>::~lock_guard_abi_nn200100_(local_18);
return;
}
|
|
14,093
|
pagecache_unpin_by_link
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_unpin_by_link(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
LSN lsn)
{
DBUG_ENTER("pagecache_unpin_by_link");
DBUG_PRINT("enter", ("block: %p fd: %u page: %lu",
block, (uint) block->hash_link->file.file,
(ulong) block->hash_link->pageno));
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
/*
As soon as we keep lock cache can be used, and we have lock because want
unlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
/* we can't unpin such page without unlock */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0);
inc_counter_for_resize_op(pagecache);
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/*
We can just unpin only with keeping read lock because:
a) we can't pin without any lock
b) we can't unpin keeping write lock
*/
if (make_lock_and_pin(pagecache, block,
PAGECACHE_LOCK_LEFT_READLOCKED,
PAGECACHE_UNPIN, FALSE))
DBUG_ASSERT(0); /* should not happend */
/*
Link the block into the LRU chain if it's the last submitted request
for the block and block will not be pinned.
See NOTE for pagecache_unlock about registering requests.
*/
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
pagecache_unpin_by_link:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc8(%rdi), %rbx
cmpq $0x0, 0x108(%rdi)
jne 0x321c9
movq %rbx, %rdi
callq 0x29220
incq 0x68(%r14)
testq %r12, %r12
je 0x3216b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x31a96
decl 0x64(%r15)
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x31cc3
decq 0x68(%r14)
jne 0x321ad
movq 0x110(%r14), %rax
testq %rax, %rax
je 0x321ad
movq 0x88(%rax), %r15
movq 0x38(%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x321f4
movq %r15, %rdi
callq 0x295c0
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x321e2
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0xa70db(%rip), %rsi # 0xd92ab
movq %rbx, %rdi
movl $0xdad, %edx # imm = 0xDAD
callq 0x2eb8f
jmp 0x32154
leaq 0x353e27(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x321b9
leaq 0x353e15(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x321a5
|
pagecache_unpin_by_link:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rdx
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+0C8h]
cmp qword ptr [rdi+108h], 0
jnz short loc_321C9
mov rdi, rbx
call _pthread_mutex_lock
loc_32154:
inc qword ptr [r14+68h]
test r12, r12
jz short loc_3216B
mov rdi, r14
mov rsi, r12
mov rdx, r15
call check_and_set_lsn
loc_3216B:
dec dword ptr [r15+64h]
mov rdi, r14
mov rsi, r15
mov edx, 1
call unreg_request
dec qword ptr [r14+68h]
jnz short loc_321AD
mov rax, [r14+110h]
test rax, rax
jz short loc_321AD
mov r15, [rax+88h]
mov rdi, [r15+38h]
add r15, 8
test rdi, rdi
jnz short loc_321F4
loc_321A5:
mov rdi, r15
call _pthread_cond_signal
loc_321AD:
mov rdi, [r14+108h]
test rdi, rdi
jnz short loc_321E2
loc_321B9:
mov rdi, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_321C9:
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 0DADh
call psi_mutex_lock
jmp loc_32154
loc_321E2:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_321B9
loc_321F4:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_321A5
|
long long pagecache_unpin_by_link(_QWORD *a1, long long a2, signed long long a3)
{
_QWORD *v5; // rbx
long long v7; // rax
long long v8; // r15
long long v9; // rdi
long long v10; // r15
v5 = a1 + 25;
if ( a1[33] )
psi_mutex_lock(
(long long)(a1 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xDADu);
else
pthread_mutex_lock(a1 + 25);
++a1[13];
if ( a3 )
check_and_set_lsn((long long)a1, a3, a2);
--*(_DWORD *)(a2 + 100);
unreg_request(a1, a2, 1);
if ( a1[13]-- == 1LL )
{
v7 = a1[34];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 136);
v9 = *(_QWORD *)(v8 + 56);
v10 = v8 + 8;
if ( v9 )
PSI_server[46]();
pthread_cond_signal(v10);
}
}
if ( a1[33] )
PSI_server[44]();
return pthread_mutex_unlock(v5);
}
|
pagecache_unpin_by_link:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0xc8]
CMP qword ptr [RDI + 0x108],0x0
JNZ 0x001321c9
MOV RDI,RBX
CALL 0x00129220
LAB_00132154:
INC qword ptr [R14 + 0x68]
TEST R12,R12
JZ 0x0013216b
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00131a96
LAB_0013216b:
DEC dword ptr [R15 + 0x64]
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x1
CALL 0x00131cc3
DEC qword ptr [R14 + 0x68]
JNZ 0x001321ad
MOV RAX,qword ptr [R14 + 0x110]
TEST RAX,RAX
JZ 0x001321ad
MOV R15,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [R15 + 0x38]
ADD R15,0x8
TEST RDI,RDI
JNZ 0x001321f4
LAB_001321a5:
MOV RDI,R15
CALL 0x001295c0
LAB_001321ad:
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x001321e2
LAB_001321b9:
MOV RDI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_001321c9:
LEA RSI,[0x1d92ab]
MOV RDI,RBX
MOV EDX,0xdad
CALL 0x0012eb8f
JMP 0x00132154
LAB_001321e2:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001321b9
LAB_001321f4:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001321a5
|
void pagecache_unpin_by_link(long param_1,long param_2,long param_3)
{
long *plVar1;
pthread_mutex_t *__mutex;
long lVar2;
__mutex = (pthread_mutex_t *)(param_1 + 200);
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xdad);
}
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
if (param_3 != 0) {
check_and_set_lsn(param_1,param_3,param_2);
}
*(int *)(param_2 + 100) = *(int *)(param_2 + 100) + -1;
unreg_request(param_1,param_2,1);
plVar1 = (long *)(param_1 + 0x68);
*plVar1 = *plVar1 + -1;
if ((*plVar1 == 0) && (*(long *)(param_1 + 0x110) != 0)) {
lVar2 = *(long *)(*(long *)(param_1 + 0x110) + 0x88);
if (*(long *)(lVar2 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar2 + 8));
}
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
|
|
14,094
|
mi_ck_write_tree
|
eloqsql/storage/myisam/mi_write.c
|
int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key,
uint key_length)
{
int error;
DBUG_ENTER("_mi_ck_write_tree");
error= tree_insert(&info->bulk_insert[keynr], key,
key_length + info->s->rec_reflength,
info->bulk_insert[keynr].custom_arg) ? 0 : HA_ERR_OUT_OF_MEM ;
DBUG_RETURN(error);
}
|
O0
|
c
|
mi_ck_write_tree:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0xc(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
addl 0x338(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq 0x230(%rax), %rcx
callq 0xfc200
movq %rax, %rdx
movl $0x80, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_mi_ck_write_tree:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+80h]
mov eax, [rbp+var_C]
imul rax, 298h
add rdi, rax
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rax, [rbp+var_8]
mov rax, [rax]
add edx, [rax+338h]
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov ecx, [rbp+var_C]
imul rcx, 298h
add rax, rcx
mov rcx, [rax+230h]
call tree_insert
mov rdx, rax
mov eax, 80h
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
|
long long mi_ck_write_tree(_QWORD *a1, unsigned int a2, long long a3, int a4)
{
long long v4; // rdx
long long result; // rax
v4 = tree_insert(
664LL * a2 + a1[16],
a3,
(unsigned int)(*(_DWORD *)(*a1 + 824LL) + a4),
*(_QWORD *)(664LL * a2 + a1[16] + 560));
LODWORD(result) = 128;
if ( v4 )
LODWORD(result) = 0;
return (unsigned int)result;
}
|
_mi_ck_write_tree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x80]
MOV EAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
ADD EDX,dword ptr [RAX + 0x338]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV RCX,qword ptr [RAX + 0x230]
CALL 0x001fc200
MOV RDX,RAX
MOV EAX,0x80
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int4 _mi_ck_write_tree(long *param_1,uint param_2,int8 param_3,int param_4)
{
int4 uVar1;
long lVar2;
lVar2 = tree_insert(param_1[0x10] + (ulong)param_2 * 0x298,param_3,
param_4 + *(int *)(*param_1 + 0x338));
uVar1 = 0x80;
if (lVar2 != 0) {
uVar1 = 0;
}
return uVar1;
}
|
|
14,095
|
test_bug4026
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_bug4026(MYSQL *mysql)
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[2];
MYSQL_TIME time_in, time_out;
MYSQL_TIME datetime_in, datetime_out;
const char *stmt_text;
int rc;
/* Check that microseconds are inserted and selected successfully */
/* Create a statement handle and prepare it with select */
stmt= mysql_stmt_init(mysql);
stmt_text= "SELECT ?, ?";
rc= mysql_stmt_prepare(stmt, SL(stmt_text));
check_stmt_rc(rc, stmt);
/* Bind input buffers */
memset(my_bind, '\0', sizeof(MYSQL_BIND) * 2);
memset(&time_in, '\0', sizeof(MYSQL_TIME));
memset(&time_out, '\0', sizeof(MYSQL_TIME));
memset(&datetime_in, '\0', sizeof(MYSQL_TIME));
memset(&datetime_out, '\0', sizeof(MYSQL_TIME));
my_bind[0].buffer_type= MYSQL_TYPE_TIME;
my_bind[0].buffer= (void *) &time_in;
my_bind[1].buffer_type= MYSQL_TYPE_DATETIME;
my_bind[1].buffer= (void *) &datetime_in;
time_in.hour= 23;
time_in.minute= 59;
time_in.second= 59;
time_in.second_part= 123456;
/*
This is not necessary, just to make DIE_UNLESS below work: this field
is filled in when time is received from server
*/
time_in.time_type= MYSQL_TIMESTAMP_TIME;
datetime_in= time_in;
datetime_in.year= 2003;
datetime_in.month= 12;
datetime_in.day= 31;
datetime_in.time_type= MYSQL_TIMESTAMP_DATETIME;
mysql_stmt_bind_param(stmt, my_bind);
/* Execute the select statement */
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
my_bind[0].buffer= (void *) &time_out;
my_bind[1].buffer= (void *) &datetime_out;
mysql_stmt_bind_result(stmt, my_bind);
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 0, "rc != 0");
FAIL_UNLESS(memcmp(&time_in, &time_out, sizeof(time_in)) == 0, "time_in != time_out");
FAIL_UNLESS(memcmp(&datetime_in, &datetime_out, sizeof(datetime_in)) == 0, "datetime_in != datetime_out");
mysql_stmt_close(stmt);
return OK;
}
|
O0
|
c
|
test_bug4026:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp # imm = 0x1C0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
leaq 0x42baa(%rip), %rax # 0x68d5d
movq %rax, -0x1a8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1a8(%rbp), %rdi
callq 0x141a0
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1ac(%rbp)
cmpl $0x0, -0x1ac(%rbp)
je 0x26236
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3f379(%rip), %rdi # 0x65590
leaq 0x3fe4f(%rip), %rdx # 0x6606d
movl $0x8c0, %ecx # imm = 0x8C0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x264a6
jmp 0x26238
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0xe0, %edx
callq 0x14260
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x14260
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x14260
leaq -0x178(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x14260
leaq -0x1a0(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x14260
movl $0xb, -0xa0(%rbp)
leaq -0x128(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl $0xc, -0x30(%rbp)
leaq -0x178(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x17, -0x11c(%rbp)
movl $0x3b, -0x118(%rbp)
movl $0x3b, -0x114(%rbp)
movq $0x1e240, -0x110(%rbp) # imm = 0x1E240
movl $0x2, -0x104(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movl $0x28, %edx
callq 0x14370
movl $0x7d3, -0x178(%rbp) # imm = 0x7D3
movl $0xc, -0x174(%rbp)
movl $0x1f, -0x170(%rbp)
movl $0x1, -0x154(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x432c0
movq -0x18(%rbp), %rdi
callq 0x46580
movl %eax, -0x1ac(%rbp)
cmpl $0x0, -0x1ac(%rbp)
je 0x2638e
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3f221(%rip), %rdi # 0x65590
leaq 0x3fcf7(%rip), %rdx # 0x6606d
movl $0x8e0, %ecx # imm = 0x8E0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x264a6
jmp 0x26390
leaq -0x150(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0x1a0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x43940
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1ac(%rbp)
cmpl $0x0, -0x1ac(%rbp)
je 0x263fe
leaq 0x3f1b8(%rip), %rdi # 0x65590
leaq 0x4298a(%rip), %rsi # 0x68d69
leaq 0x3fc87(%rip), %rdx # 0x6606d
movl $0x8e7, %ecx # imm = 0x8E7
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x264a6
jmp 0x26400
jmp 0x26402
leaq -0x128(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x28, %edx
callq 0x141b0
cmpl $0x0, %eax
je 0x26449
leaq 0x3f16a(%rip), %rdi # 0x65590
leaq 0x409e0(%rip), %rsi # 0x66e0d
leaq 0x3fc39(%rip), %rdx # 0x6606d
movl $0x8e8, %ecx # imm = 0x8E8
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x264a6
jmp 0x2644b
jmp 0x2644d
leaq -0x178(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0x28, %edx
callq 0x141b0
cmpl $0x0, %eax
je 0x26494
leaq 0x3f11f(%rip), %rdi # 0x65590
leaq 0x428f9(%rip), %rsi # 0x68d71
leaq 0x3fbee(%rip), %rdx # 0x6606d
movl $0x8e9, %ecx # imm = 0x8E9
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x264a6
jmp 0x26496
movq -0x18(%rbp), %rdi
callq 0x43eb0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp # imm = 0x1C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
test_bug4026:
push rbp
mov rbp, rsp
sub rsp, 1C0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
lea rax, aSelect_0; "SELECT ?, ?"
mov [rbp+var_1A8], rax
mov rax, [rbp+var_18]
mov [rbp+var_1C0], rax
mov rax, [rbp+var_1A8]
mov [rbp+var_1B8], rax
mov rdi, [rbp+var_1A8]
call _strlen
mov rdi, [rbp+var_1C0]
mov rsi, [rbp+var_1B8]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1AC], eax
cmp [rbp+var_1AC], 0
jz short loc_26236
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 8C0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_264A6
loc_26236:
jmp short $+2
loc_26238:
lea rdi, [rbp+var_100]
xor esi, esi
mov edx, 0E0h
call _memset
lea rdi, [rbp+var_128]
xor esi, esi
mov edx, 28h ; '('
call _memset
lea rdi, [rbp+var_150]
xor esi, esi
mov edx, 28h ; '('
call _memset
lea rdi, [rbp+var_178]
xor esi, esi
mov edx, 28h ; '('
call _memset
lea rdi, [rbp+var_1A0]
xor esi, esi
mov edx, 28h ; '('
call _memset
mov [rbp+var_A0], 0Bh
lea rax, [rbp+var_128]
mov [rbp+var_F0], rax
mov [rbp+var_30], 0Ch
lea rax, [rbp+var_178]
mov [rbp+var_80], rax
mov [rbp+var_11C], 17h
mov [rbp+var_118], 3Bh ; ';'
mov [rbp+var_114], 3Bh ; ';'
mov [rbp+var_110], offset loc_1E240
mov [rbp+var_104], 2
lea rdi, [rbp+var_178]
lea rsi, [rbp+var_128]
mov edx, 28h ; '('
call _memcpy
mov [rbp+var_178], 7D3h
mov [rbp+var_174], 0Ch
mov [rbp+var_170], 1Fh
mov [rbp+var_154], 1
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_100]
call mysql_stmt_bind_param
mov rdi, [rbp+var_18]
call mysql_stmt_execute
mov [rbp+var_1AC], eax
cmp [rbp+var_1AC], 0
jz short loc_2638E
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 8E0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_264A6
loc_2638E:
jmp short $+2
loc_26390:
lea rax, [rbp+var_150]
mov [rbp+var_F0], rax
lea rax, [rbp+var_1A0]
mov [rbp+var_80], rax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_100]
call mysql_stmt_bind_result
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1AC], eax
cmp [rbp+var_1AC], 0
jz short loc_263FE
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc0_0; "rc != 0"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 8E7h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_264A6
loc_263FE:
jmp short $+2
loc_26400:
jmp short $+2
loc_26402:
lea rdi, [rbp+var_128]
lea rsi, [rbp+var_150]
mov edx, 28h ; '('
call _memcmp
cmp eax, 0
jz short loc_26449
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aTimeInTimeOut; "time_in != time_out"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 8E8h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_264A6
loc_26449:
jmp short $+2
loc_2644B:
jmp short $+2
loc_2644D:
lea rdi, [rbp+var_178]
lea rsi, [rbp+var_1A0]
mov edx, 28h ; '('
call _memcmp
cmp eax, 0
jz short loc_26494
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aDatetimeInDate; "datetime_in != datetime_out"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 8E9h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_264A6
loc_26494:
jmp short $+2
loc_26496:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov [rbp+var_4], 0
loc_264A6:
mov eax, [rbp+var_4]
add rsp, 1C0h
pop rbp
retn
|
long long test_bug4026(long long a1)
{
long long v1; // rax
int v2; // eax
int v3; // r8d
int v4; // r9d
int v5; // eax
int v6; // r8d
int v7; // r9d
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
_BYTE v15[40]; // [rsp+20h] [rbp-1A0h] BYREF
_DWORD v16[10]; // [rsp+48h] [rbp-178h] BYREF
_BYTE v17[40]; // [rsp+70h] [rbp-150h] BYREF
_BYTE v18[12]; // [rsp+98h] [rbp-128h] BYREF
int v19; // [rsp+A4h] [rbp-11Ch]
int v20; // [rsp+A8h] [rbp-118h]
int v21; // [rsp+ACh] [rbp-114h]
void *v22; // [rsp+B0h] [rbp-110h]
int v23; // [rsp+BCh] [rbp-104h]
_BYTE v24[16]; // [rsp+C0h] [rbp-100h] BYREF
_BYTE *v25; // [rsp+D0h] [rbp-F0h]
int v26; // [rsp+120h] [rbp-A0h]
_BYTE *v27; // [rsp+140h] [rbp-80h]
int v28; // [rsp+190h] [rbp-30h]
long long v29; // [rsp+1A8h] [rbp-18h]
long long v30; // [rsp+1B0h] [rbp-10h]
v30 = a1;
v29 = mysql_stmt_init(a1);
v1 = strlen("SELECT ?, ?");
if ( (unsigned int)mysql_stmt_prepare(v29, "SELECT ?, ?", v1) )
{
v2 = mysql_stmt_error(v29);
diag(
(unsigned int)"Error: %s (%s: %d)",
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2240,
v3,
v4);
return 1;
}
else
{
memset(v24, 0LL, 224LL);
memset(v18, 0LL, 40LL);
memset(v17, 0LL, sizeof(v17));
memset(v16, 0LL, sizeof(v16));
memset(v15, 0LL, sizeof(v15));
v26 = 11;
v25 = v18;
v28 = 12;
v27 = v16;
v19 = 23;
v20 = 59;
v21 = 59;
v22 = &loc_1E240;
v23 = 2;
memcpy(v16, v18, sizeof(v16));
v16[0] = 2003;
v16[1] = 12;
v16[2] = 31;
v16[9] = 1;
mysql_stmt_bind_param(v29, v24);
if ( (unsigned int)mysql_stmt_execute(v29) )
{
v5 = mysql_stmt_error(v29);
diag(
(unsigned int)"Error: %s (%s: %d)",
v5,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2272,
v6,
v7);
return 1;
}
else
{
v25 = v17;
v27 = v15;
mysql_stmt_bind_result(v29, v24);
if ( (unsigned int)mysql_stmt_fetch(v29) )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 0",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2279,
v8,
v9);
return 1;
}
else if ( !(unsigned int)memcmp(v18, v17, 40LL) )
{
if ( !(unsigned int)memcmp(v16, v15, 40LL) )
{
mysql_stmt_close(v29);
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"datetime_in != datetime_out",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2281,
v12,
v13);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"time_in != time_out",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2280,
v10,
v11);
return 1;
}
}
}
}
|
test_bug4026:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1c0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x168d5d]
MOV qword ptr [RBP + -0x1a8],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x1c0],RAX
MOV RAX,qword ptr [RBP + -0x1a8]
MOV qword ptr [RBP + -0x1b8],RAX
MOV RDI,qword ptr [RBP + -0x1a8]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x1c0]
MOV RSI,qword ptr [RBP + -0x1b8]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1ac],EAX
CMP dword ptr [RBP + -0x1ac],0x0
JZ 0x00126236
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x8c0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001264a6
LAB_00126236:
JMP 0x00126238
LAB_00126238:
LEA RDI,[RBP + -0x100]
XOR ESI,ESI
MOV EDX,0xe0
CALL 0x00114260
LEA RDI,[RBP + -0x128]
XOR ESI,ESI
MOV EDX,0x28
CALL 0x00114260
LEA RDI,[RBP + -0x150]
XOR ESI,ESI
MOV EDX,0x28
CALL 0x00114260
LEA RDI,[RBP + -0x178]
XOR ESI,ESI
MOV EDX,0x28
CALL 0x00114260
LEA RDI,[RBP + -0x1a0]
XOR ESI,ESI
MOV EDX,0x28
CALL 0x00114260
MOV dword ptr [RBP + -0xa0],0xb
LEA RAX,[RBP + -0x128]
MOV qword ptr [RBP + -0xf0],RAX
MOV dword ptr [RBP + -0x30],0xc
LEA RAX,[RBP + -0x178]
MOV qword ptr [RBP + -0x80],RAX
MOV dword ptr [RBP + -0x11c],0x17
MOV dword ptr [RBP + -0x118],0x3b
MOV dword ptr [RBP + -0x114],0x3b
MOV qword ptr [RBP + -0x110],0x1e240
MOV dword ptr [RBP + -0x104],0x2
LEA RDI,[RBP + -0x178]
LEA RSI,[RBP + -0x128]
MOV EDX,0x28
CALL 0x00114370
MOV dword ptr [RBP + -0x178],0x7d3
MOV dword ptr [RBP + -0x174],0xc
MOV dword ptr [RBP + -0x170],0x1f
MOV dword ptr [RBP + -0x154],0x1
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x100]
CALL 0x001432c0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146580
MOV dword ptr [RBP + -0x1ac],EAX
CMP dword ptr [RBP + -0x1ac],0x0
JZ 0x0012638e
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x8e0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001264a6
LAB_0012638e:
JMP 0x00126390
LAB_00126390:
LEA RAX,[RBP + -0x150]
MOV qword ptr [RBP + -0xf0],RAX
LEA RAX,[RBP + -0x1a0]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x100]
CALL 0x00143940
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1ac],EAX
CMP dword ptr [RBP + -0x1ac],0x0
JZ 0x001263fe
LEA RDI,[0x165590]
LEA RSI,[0x168d69]
LEA RDX,[0x16606d]
MOV ECX,0x8e7
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001264a6
LAB_001263fe:
JMP 0x00126400
LAB_00126400:
JMP 0x00126402
LAB_00126402:
LEA RDI,[RBP + -0x128]
LEA RSI,[RBP + -0x150]
MOV EDX,0x28
CALL 0x001141b0
CMP EAX,0x0
JZ 0x00126449
LEA RDI,[0x165590]
LEA RSI,[0x166e0d]
LEA RDX,[0x16606d]
MOV ECX,0x8e8
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001264a6
LAB_00126449:
JMP 0x0012644b
LAB_0012644b:
JMP 0x0012644d
LAB_0012644d:
LEA RDI,[RBP + -0x178]
LEA RSI,[RBP + -0x1a0]
MOV EDX,0x28
CALL 0x001141b0
CMP EAX,0x0
JZ 0x00126494
LEA RDI,[0x165590]
LEA RSI,[0x168d71]
LEA RDX,[0x16606d]
MOV ECX,0x8e9
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001264a6
LAB_00126494:
JMP 0x00126496
LAB_00126496:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV dword ptr [RBP + -0x4],0x0
LAB_001264a6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x1c0
POP RBP
RET
|
int4 test_bug4026(int8 param_1)
{
int iVar1;
int8 uVar2;
size_t sVar3;
int1 local_1a8 [40];
int4 local_180;
int4 local_17c;
int4 local_178;
int4 local_15c;
int1 local_158 [40];
int1 local_130 [12];
int4 local_124;
int4 local_120;
int4 local_11c;
int8 local_118;
int4 local_10c;
int1 local_108 [16];
int1 *local_f8;
int4 local_a8;
int4 *local_88;
int4 local_38;
int8 local_20;
int8 local_18;
int4 local_c;
local_18 = param_1;
uVar2 = mysql_stmt_init(param_1);
local_20 = uVar2;
sVar3 = strlen("SELECT ?, ?");
iVar1 = mysql_stmt_prepare(uVar2,"SELECT ?, ?",sVar3);
if (iVar1 == 0) {
memset(local_108,0,0xe0);
memset(local_130,0,0x28);
memset(local_158,0,0x28);
memset(&local_180,0,0x28);
memset(local_1a8,0,0x28);
local_a8 = 0xb;
local_f8 = local_130;
local_38 = 0xc;
local_88 = &local_180;
local_124 = 0x17;
local_120 = 0x3b;
local_11c = 0x3b;
local_118 = 0x1e240;
local_10c = 2;
memcpy(&local_180,local_130,0x28);
local_180 = 0x7d3;
local_17c = 0xc;
local_178 = 0x1f;
local_15c = 1;
mysql_stmt_bind_param(local_20,local_108);
iVar1 = mysql_stmt_execute(local_20);
if (iVar1 == 0) {
local_f8 = local_158;
local_88 = (int4 *)local_1a8;
mysql_stmt_bind_result(local_20,local_108);
iVar1 = mysql_stmt_fetch(local_20);
if (iVar1 == 0) {
iVar1 = memcmp(local_130,local_158,0x28);
if (iVar1 == 0) {
iVar1 = memcmp(&local_180,local_1a8,0x28);
if (iVar1 == 0) {
mysql_stmt_close(local_20);
local_c = 0;
}
else {
diag("Error: %s (%s: %d)","datetime_in != datetime_out",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x8e9);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","time_in != time_out",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x8e8);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 0",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x8e7);
local_c = 1;
}
}
else {
uVar2 = mysql_stmt_error(local_20);
diag("Error: %s (%s: %d)",uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x8e0
);
local_c = 1;
}
}
else {
uVar2 = mysql_stmt_error(local_20);
diag("Error: %s (%s: %d)",uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x8c0);
local_c = 1;
}
return local_c;
}
|
|
14,096
|
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::deallocate(PFS_table_share_index*)
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
void deallocate(value_type *safe_pfs)
{
/* Find the containing page */
PFS_opaque_container_page *opaque_page= safe_pfs->m_page;
array_type *page= reinterpret_cast<array_type *> (opaque_page);
/* Mark the object free */
safe_pfs->m_lock.allocated_to_free();
/* Flag the containing page as not full. */
page->m_full= false;
/* Flag the overall container as not full. */
m_full= false;
}
|
O0
|
c
|
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::deallocate(PFS_table_share_index*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x7d8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x7e0, %rdi # imm = 0x7E0
callq 0x31d50
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movb $0x0, (%rcx)
movb $0x0, 0x9(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN29PFS_buffer_scalable_containerI8PFS_hostLi128ELi128E14PFS_host_array18PFS_host_allocatorE10deallocateEPS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+7D8h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
add rdi, 7E0h; this
call _ZN8pfs_lock17allocated_to_freeEv; pfs_lock::allocated_to_free(void)
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
mov byte ptr [rcx], 0
mov byte ptr [rax+9], 0
add rsp, 30h
pop rbp
retn
|
long long PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate(
long long a1,
long long a2)
{
long long result; // rax
_BYTE *v3; // [rsp+10h] [rbp-20h]
v3 = *(_BYTE **)(a2 + 2008);
pfs_lock::allocated_to_free((pfs_lock *)(a2 + 2016));
result = a1;
*v3 = 0;
*(_BYTE *)(a1 + 9) = 0;
return result;
}
|
deallocate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x7d8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x7e0
CALL 0x00131d50
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RCX],0x0
MOV byte ptr [RAX + 0x9],0x0
ADD RSP,0x30
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array,
PFS_host_allocator>::deallocate(PFS_host*) */
void __thiscall
PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate
(PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator> *this,
PFS_host *param_1)
{
int1 *puVar1;
puVar1 = *(int1 **)(param_1 + 0x7d8);
pfs_lock::allocated_to_free((pfs_lock *)(param_1 + 0x7e0));
*puVar1 = 0;
this[9] = (PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>)0x0;
return;
}
|
|
14,097
|
JS_AddIntrinsicProxy
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicProxy(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROXY)) {
init_class_range(rt, js_proxy_class_def, JS_CLASS_PROXY,
countof(js_proxy_class_def));
rt->class_array[JS_CLASS_PROXY].exotic = &js_proxy_exotic_methods;
rt->class_array[JS_CLASS_PROXY].call = js_proxy_call;
}
obj1 = JS_NewCFunction2(ctx, js_proxy_constructor, "Proxy", 2,
JS_CFUNC_constructor, 0);
JS_SetConstructorBit(ctx, obj1, TRUE);
JS_SetPropertyFunctionList(ctx, obj1, js_proxy_funcs,
countof(js_proxy_funcs));
JS_DefinePropertyValueStr(ctx, ctx->global_obj, "Proxy",
obj1, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
|
O0
|
c
|
JS_AddIntrinsicProxy:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x30, %esi
callq 0x29230
cmpl $0x0, %eax
jne 0x262ca
movq 0x28(%rsp), %rdi
leaq 0x10aa89(%rip), %rsi # 0x130d10
movl $0x30, %edx
movl $0x1, %ecx
callq 0x224f0
movq 0x28(%rsp), %rax
movq 0x80(%rax), %rax
leaq 0x10aa7f(%rip), %rcx # 0x130d28
movq %rcx, 0x7a0(%rax)
movq 0x28(%rsp), %rax
movq 0x80(%rax), %rax
leaq 0x2c21d(%rip), %rcx # 0x524e0
movq %rcx, 0x798(%rax)
movq 0x30(%rsp), %rdi
leaq 0x2c57a(%rip), %rsi # 0x52850
leaq 0xe7b81(%rip), %rdx # 0x10de5e
movl $0x2, %r8d
xorl %r9d, %r9d
movl %r8d, %ecx
callq 0x2a5b0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movl $0x1, %ecx
callq 0x38140
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x10aa25(%rip), %rcx # 0x130d60
movl $0x1, %r8d
callq 0x4cb00
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x1a0(%rax), %rsi
movq 0x1a8(%rax), %rdx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
leaq 0xe7aef(%rip), %rcx # 0x10de5e
movl $0x3, (%rsp)
callq 0x374e0
addq $0x38, %rsp
retq
|
JS_AddIntrinsicProxy:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rax, [rsp+38h+var_8]
mov rax, [rax+18h]
mov [rsp+38h+var_10], rax
mov rdi, [rsp+38h+var_10]
mov esi, 30h ; '0'
call JS_IsRegisteredClass
cmp eax, 0
jnz short loc_262CA
mov rdi, [rsp+38h+var_10]
lea rsi, js_proxy_class_def
mov edx, 30h ; '0'
mov ecx, 1
call init_class_range
mov rax, [rsp+38h+var_10]
mov rax, [rax+80h]
lea rcx, js_proxy_exotic_methods
mov [rax+7A0h], rcx
mov rax, [rsp+38h+var_10]
mov rax, [rax+80h]
lea rcx, js_proxy_call
mov [rax+798h], rcx
loc_262CA:
mov rdi, [rsp+38h+var_8]
lea rsi, js_proxy_constructor
lea rdx, aProxy; "Proxy"
mov r8d, 2
xor r9d, r9d
mov ecx, r8d
call JS_NewCFunction2
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_28], rdx
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_18], rax
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_20]
mov rdx, [rsp+38h+var_18]
mov ecx, 1
call JS_SetConstructorBit
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_20]
mov rdx, [rsp+38h+var_18]
lea rcx, js_proxy_funcs
mov r8d, 1
call JS_SetPropertyFunctionList
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_8]
mov rsi, [rax+1A0h]
mov rdx, [rax+1A8h]
mov r8, [rsp+38h+var_20]
mov r9, [rsp+38h+var_18]
lea rcx, aProxy; "Proxy"
mov [rsp+38h+var_38], 3
call JS_DefinePropertyValueStr
add rsp, 38h
retn
|
long long JS_AddIntrinsicProxy(_QWORD *a1)
{
long long v1; // rdx
long long v3; // [rsp+8h] [rbp-30h]
long long v4; // [rsp+20h] [rbp-18h]
long long v5; // [rsp+28h] [rbp-10h]
v5 = a1[3];
if ( !(unsigned int)JS_IsRegisteredClass(v5, 48LL) )
{
init_class_range(v5, (long long)&js_proxy_class_def, 48, 1);
*(_QWORD *)(*(_QWORD *)(v5 + 128) + 1952LL) = js_proxy_exotic_methods;
*(_QWORD *)(*(_QWORD *)(v5 + 128) + 1944LL) = js_proxy_call;
}
v3 = JS_NewCFunction2(a1, js_proxy_constructor, "Proxy", 2LL, 2LL, 0LL);
v4 = v1;
JS_SetConstructorBit(a1, v3, v1, 1LL);
JS_SetPropertyFunctionList(a1, v3, v4, &js_proxy_funcs, 1LL);
return JS_DefinePropertyValueStr((_DWORD)a1, a1[52], a1[53], (unsigned int)"Proxy", v3, v4, 3);
}
|
JS_AddIntrinsicProxy:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x30
CALL 0x00129230
CMP EAX,0x0
JNZ 0x001262ca
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x230d10]
MOV EDX,0x30
MOV ECX,0x1
CALL 0x001224f0
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x80]
LEA RCX,[0x230d28]
MOV qword ptr [RAX + 0x7a0],RCX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x80]
LEA RCX,[0x1524e0]
MOV qword ptr [RAX + 0x798],RCX
LAB_001262ca:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x152850]
LEA RDX,[0x20de5e]
MOV R8D,0x2
XOR R9D,R9D
MOV ECX,R8D
CALL 0x0012a5b0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,0x1
CALL 0x00138140
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LEA RCX,[0x230d60]
MOV R8D,0x1
CALL 0x0014cb00
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RAX + 0x1a0]
MOV RDX,qword ptr [RAX + 0x1a8]
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
LEA RCX,[0x20de5e]
MOV dword ptr [RSP],0x3
CALL 0x001374e0
ADD RSP,0x38
RET
|
void JS_AddIntrinsicProxy(long param_1)
{
long lVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
lVar1 = *(long *)(param_1 + 0x18);
iVar2 = JS_IsRegisteredClass(lVar1,0x30);
if (iVar2 == 0) {
init_class_range(lVar1,js_proxy_class_def,0x30,1);
*(int1 **)(*(long *)(lVar1 + 0x80) + 0x7a0) = js_proxy_exotic_methods;
*(code **)(*(long *)(lVar1 + 0x80) + 0x798) = js_proxy_call;
}
auVar5 = JS_NewCFunction2(param_1,js_proxy_constructor,"Proxy",2,2,0);
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
JS_SetConstructorBit(param_1,uVar3,uVar4,1);
JS_SetPropertyFunctionList(param_1,uVar3,uVar4,js_proxy_funcs,1);
JS_DefinePropertyValueStr
(param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8),"Proxy",uVar3
,uVar4,3);
return;
}
|
|
14,098
|
JS_AddIntrinsicProxy
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicProxy(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROXY)) {
init_class_range(rt, js_proxy_class_def, JS_CLASS_PROXY,
countof(js_proxy_class_def));
rt->class_array[JS_CLASS_PROXY].exotic = &js_proxy_exotic_methods;
rt->class_array[JS_CLASS_PROXY].call = js_proxy_call;
}
obj1 = JS_NewCFunction2(ctx, js_proxy_constructor, "Proxy", 2,
JS_CFUNC_constructor, 0);
JS_SetConstructorBit(ctx, obj1, TRUE);
JS_SetPropertyFunctionList(ctx, obj1, js_proxy_funcs,
countof(js_proxy_funcs));
JS_DefinePropertyValueStr(ctx, ctx->global_obj, "Proxy",
obj1, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
|
O1
|
c
|
JS_AddIntrinsicProxy:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x31, 0x78(%r14)
jb 0x1eb10
movq 0x80(%r14), %rax
cmpl $0x0, 0x780(%rax)
jne 0x1eb4c
leaq 0xa9129(%rip), %rsi # 0xc7c40
movq %r14, %rdi
movl $0x30, %edx
movl $0x1, %ecx
callq 0x1ce49
movq 0x80(%r14), %rax
leaq 0xa9121(%rip), %rcx # 0xc7c58
movq %rcx, 0x7a0(%rax)
leaq 0x16acd(%rip), %rcx # 0x35612
movq %rcx, 0x798(%rax)
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x16e5d(%rip), %rsi # 0x359b8
leaq 0x80298(%rip), %rdx # 0x9edfa
movq %rbx, %rdi
movl $0x2, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x21006
movq %rax, %r14
movq %rdx, %r15
movq %rax, 0x18(%rsp)
cmpl $-0x1, %r15d
jne 0x1eb92
movq 0x18(%rsp), %rax
orb $0x10, 0x5(%rax)
leaq 0xa90f7(%rip), %rcx # 0xc7c90
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %r8d
callq 0x32c67
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
movl $0x3, (%rsp)
leaq 0x80231(%rip), %rcx # 0x9edfa
movq %rbx, %rdi
movq %r14, %r8
movq %r15, %r9
callq 0x26c57
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
JS_AddIntrinsicProxy:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov r14, [rdi+18h]
cmp dword ptr [r14+78h], 31h ; '1'
jb short loc_1EB10
mov rax, [r14+80h]
cmp dword ptr [rax+780h], 0
jnz short loc_1EB4C
loc_1EB10:
lea rsi, js_proxy_class_def
mov rdi, r14
mov edx, 30h ; '0'
mov ecx, 1
call init_class_range
mov rax, [r14+80h]
lea rcx, js_proxy_exotic_methods
mov [rax+7A0h], rcx
lea rcx, js_proxy_call
mov [rax+798h], rcx
loc_1EB4C:
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+38h+var_38], xmm0
lea rsi, js_proxy_constructor
lea rdx, aProxy; "Proxy"
mov rdi, rbx
mov ecx, 2
mov r8d, 2
xor r9d, r9d
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov [rsp+38h+var_20], rax
cmp r15d, 0FFFFFFFFh
jnz short loc_1EB92
mov rax, [rsp+38h+var_20]
or byte ptr [rax+5], 10h
loc_1EB92:
lea rcx, js_proxy_funcs
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r8d, 1
call JS_SetPropertyFunctionList
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
mov dword ptr [rsp+38h+var_38], 3
lea rcx, aProxy; "Proxy"
mov rdi, rbx
mov r8, r14
mov r9, r15
call JS_DefinePropertyValueStr
add rsp, 20h
pop rbx
pop r14
pop r15
retn
|
long long JS_AddIntrinsicProxy(long long *a1)
{
long long v1; // r14
long long v2; // rax
long long v3; // rdx
long long v4; // r14
int v5; // r15d
v1 = a1[3];
if ( *(_DWORD *)(v1 + 120) < 0x31u || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 1920LL) )
{
init_class_range(a1[3], (long long)&js_proxy_class_def, 0x30u, 1);
v2 = *(_QWORD *)(v1 + 128);
*(_QWORD *)(v2 + 1952) = js_proxy_exotic_methods;
*(_QWORD *)(v2 + 1944) = js_proxy_call;
}
v4 = JS_NewCFunction3((_DWORD)a1, (unsigned int)js_proxy_constructor, (unsigned int)"Proxy", 2, 2, 0, a1[9], a1[10]);
v5 = v3;
if ( (_DWORD)v3 == -1 )
*(_BYTE *)(v4 + 5) |= 0x10u;
JS_SetPropertyFunctionList(a1, v4, v3, &js_proxy_funcs, 1LL);
return JS_DefinePropertyValueStr((_DWORD)a1, a1[52], a1[53], (unsigned int)"Proxy", v4, v5, 3);
}
| |||
14,099
|
JS_AddIntrinsicProxy
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicProxy(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROXY)) {
init_class_range(rt, js_proxy_class_def, JS_CLASS_PROXY,
countof(js_proxy_class_def));
rt->class_array[JS_CLASS_PROXY].exotic = &js_proxy_exotic_methods;
rt->class_array[JS_CLASS_PROXY].call = js_proxy_call;
}
obj1 = JS_NewCFunction2(ctx, js_proxy_constructor, "Proxy", 2,
JS_CFUNC_constructor, 0);
JS_SetConstructorBit(ctx, obj1, TRUE);
JS_SetPropertyFunctionList(ctx, obj1, js_proxy_funcs,
countof(js_proxy_funcs));
JS_DefinePropertyValueStr(ctx, ctx->global_obj, "Proxy",
obj1, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
|
O2
|
c
|
JS_AddIntrinsicProxy:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x31, 0x78(%r14)
jb 0x192f6
movq 0x80(%r14), %rax
cmpl $0x0, 0x780(%rax)
jne 0x1932e
leaq 0x9c943(%rip), %rsi # 0xb5c40
pushq $0x30
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
callq 0x17611
movq 0x80(%r14), %rax
leaq 0x9c93f(%rip), %rcx # 0xb5c58
movq %rcx, 0x7a0(%rax)
leaq 0x15bf1(%rip), %rcx # 0x2ef18
movq %rcx, 0x798(%rax)
leaq 0x15ef1(%rip), %rsi # 0x2f226
leaq 0x6ca0e(%rip), %rdx # 0x85d4a
pushq $0x2
popq %rcx
movq %rbx, %rdi
movl %ecx, %r8d
xorl %r9d, %r9d
callq 0x1b2dd
movq %rax, %r14
movq %rdx, %r15
cmpl $-0x1, %r15d
jne 0x1935e
orb $0x10, 0x5(%r14)
leaq 0x9c92b(%rip), %rcx # 0xb5c90
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2c3ff
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
movl $0x3, (%rsp)
leaq 0x6c9b7(%rip), %rcx # 0x85d4a
movq %rbx, %rdi
movq %r14, %r8
movq %r15, %r9
callq 0x20a2b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
JS_AddIntrinsicProxy:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
mov r14, [rdi+18h]
cmp dword ptr [r14+78h], 31h ; '1'
jb short loc_192F6
mov rax, [r14+80h]
cmp dword ptr [rax+780h], 0
jnz short loc_1932E
loc_192F6:
lea rsi, js_proxy_class_def
push 30h ; '0'
pop rdx
push 1
pop rcx
mov rdi, r14
call init_class_range
mov rax, [r14+80h]
lea rcx, js_proxy_exotic_methods
mov [rax+7A0h], rcx
lea rcx, js_proxy_call
mov [rax+798h], rcx
loc_1932E:
lea rsi, js_proxy_constructor
lea rdx, aProxy; "Proxy"
push 2
pop rcx
mov rdi, rbx
mov r8d, ecx
xor r9d, r9d
call JS_NewCFunction2
mov r14, rax
mov r15, rdx
cmp r15d, 0FFFFFFFFh
jnz short loc_1935E
or byte ptr [r14+5], 10h
loc_1935E:
lea rcx, js_proxy_funcs
push 1
pop r8
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_SetPropertyFunctionList
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
mov [rsp+28h+var_28], 3
lea rcx, aProxy; "Proxy"
mov rdi, rbx
mov r8, r14
mov r9, r15
call JS_DefinePropertyValueStr
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long JS_AddIntrinsicProxy(long long *a1)
{
long long v1; // r14
long long v2; // rax
long long v3; // rax
long long v4; // rdx
int v5; // r14d
int v6; // r15d
v1 = a1[3];
if ( *(_DWORD *)(v1 + 120) < 0x31u || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 1920LL) )
{
init_class_range(a1[3], (long long)&js_proxy_class_def, 0x30u, 1LL);
v2 = *(_QWORD *)(v1 + 128);
*(_QWORD *)(v2 + 1952) = js_proxy_exotic_methods;
*(_QWORD *)(v2 + 1944) = js_proxy_call;
}
v3 = JS_NewCFunction2(a1, js_proxy_constructor, "Proxy", 2LL, 2LL, 0LL);
v5 = v3;
v6 = v4;
if ( (_DWORD)v4 == -1 )
*(_BYTE *)(v3 + 5) |= 0x10u;
JS_SetPropertyFunctionList(a1, v3, v4, &js_proxy_funcs, 1LL);
return JS_DefinePropertyValueStr((_DWORD)a1, a1[52], a1[53], (unsigned int)"Proxy", v5, v6, 3);
}
|
JS_AddIntrinsicProxy:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
CMP dword ptr [R14 + 0x78],0x31
JC 0x001192f6
MOV RAX,qword ptr [R14 + 0x80]
CMP dword ptr [RAX + 0x780],0x0
JNZ 0x0011932e
LAB_001192f6:
LEA RSI,[0x1b5c40]
PUSH 0x30
POP RDX
PUSH 0x1
POP RCX
MOV RDI,R14
CALL 0x00117611
MOV RAX,qword ptr [R14 + 0x80]
LEA RCX,[0x1b5c58]
MOV qword ptr [RAX + 0x7a0],RCX
LEA RCX,[0x12ef18]
MOV qword ptr [RAX + 0x798],RCX
LAB_0011932e:
LEA RSI,[0x12f226]
LEA RDX,[0x185d4a]
PUSH 0x2
POP RCX
MOV RDI,RBX
MOV R8D,ECX
XOR R9D,R9D
CALL 0x0011b2dd
MOV R14,RAX
MOV R15,RDX
CMP R15D,-0x1
JNZ 0x0011935e
OR byte ptr [R14 + 0x5],0x10
LAB_0011935e:
LEA RCX,[0x1b5c90]
PUSH 0x1
POP R8
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0012c3ff
MOV RSI,qword ptr [RBX + 0x1a0]
MOV RDX,qword ptr [RBX + 0x1a8]
MOV dword ptr [RSP],0x3
LEA RCX,[0x185d4a]
MOV RDI,RBX
MOV R8,R14
MOV R9,R15
CALL 0x00120a2b
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
void JS_AddIntrinsicProxy(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x18);
if ((*(uint *)(lVar1 + 0x78) < 0x31) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x780) == 0)) {
init_class_range(lVar1,js_proxy_class_def,0x30,1);
lVar1 = *(long *)(lVar1 + 0x80);
*(int1 **)(lVar1 + 0x7a0) = js_proxy_exotic_methods;
*(code **)(lVar1 + 0x798) = js_proxy_call;
}
auVar2 = JS_NewCFunction2(param_1,js_proxy_constructor,"Proxy",2,2,0);
lVar1 = auVar2._0_8_;
if (auVar2._8_4_ == -1) {
*(byte *)(lVar1 + 5) = *(byte *)(lVar1 + 5) | 0x10;
}
JS_SetPropertyFunctionList(param_1,lVar1,auVar2._8_8_,js_proxy_funcs,1);
JS_DefinePropertyValueStr
(param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8),"Proxy",lVar1
,auVar2._8_8_,3);
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.